ElasticLoadBalancing class

A load balancer can distribute incoming traffic across your EC2 instances. This enables you to increase the availability of your application. The load balancer also monitors the health of its registered instances and ensures that it routes traffic only to healthy instances. You configure your load balancer to accept incoming traffic by specifying one or more listeners, which are configured with a protocol and port number for connections from clients to the load balancer and a protocol and port number for connections from the load balancer to the instances.

Constructors

ElasticLoadBalancing({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shapes Map<String, Shape>
final

Methods

addTags({required List<String> loadBalancerNames, required List<Tag> tags}) Future<void>
Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.
applySecurityGroupsToLoadBalancer({required String loadBalancerName, required List<String> securityGroups}) Future<ApplySecurityGroupsToLoadBalancerOutput>
Associates one or more security groups with your load balancer in a virtual private cloud (VPC). The specified security groups override the previously associated security groups.
attachLoadBalancerToSubnets({required String loadBalancerName, required List<String> subnets}) Future<AttachLoadBalancerToSubnetsOutput>
Adds one or more subnets to the set of configured subnets for the specified load balancer.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
configureHealthCheck({required HealthCheck healthCheck, required String loadBalancerName}) Future<ConfigureHealthCheckOutput>
Specifies the health check settings to use when evaluating the health state of your EC2 instances.
createAppCookieStickinessPolicy({required String cookieName, required String loadBalancerName, required String policyName}) Future<void>
Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners.
createLBCookieStickinessPolicy({required String loadBalancerName, required String policyName, int? cookieExpirationPeriod}) Future<void>
Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners.
createLoadBalancer({required List<Listener> listeners, required String loadBalancerName, List<String>? availabilityZones, String? scheme, List<String>? securityGroups, List<String>? subnets, List<Tag>? tags}) Future<CreateAccessPointOutput>
Creates a Classic Load Balancer.
createLoadBalancerListeners({required List<Listener> listeners, required String loadBalancerName}) Future<void>
Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.
createLoadBalancerPolicy({required String loadBalancerName, required String policyName, required String policyTypeName, List<PolicyAttribute>? policyAttributes}) Future<void>
Creates a policy with the specified attributes for the specified load balancer.
deleteLoadBalancer({required String loadBalancerName}) Future<void>
Deletes the specified load balancer.
deleteLoadBalancerListeners({required String loadBalancerName, required List<int> loadBalancerPorts}) Future<void>
Deletes the specified listeners from the specified load balancer.
deleteLoadBalancerPolicy({required String loadBalancerName, required String policyName}) Future<void>
Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.
deregisterInstancesFromLoadBalancer({required List<Instance> instances, required String loadBalancerName}) Future<DeregisterEndPointsOutput>
Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.
describeAccountLimits({String? marker, int? pageSize}) Future<DescribeAccountLimitsOutput>
Describes the current Elastic Load Balancing resource limits for your AWS account.
describeInstanceHealth({required String loadBalancerName, List<Instance>? instances}) Future<DescribeEndPointStateOutput>
Describes the state of the specified instances with respect to the specified load balancer. If no instances are specified, the call describes the state of all instances that are currently registered with the load balancer. If instances are specified, their state is returned even if they are no longer registered with the load balancer. The state of terminated instances is not returned.
describeLoadBalancerAttributes({required String loadBalancerName}) Future<DescribeLoadBalancerAttributesOutput>
Describes the attributes for the specified load balancer.
describeLoadBalancerPolicies({String? loadBalancerName, List<String>? policyNames}) Future<DescribeLoadBalancerPoliciesOutput>
Describes the specified policies.
describeLoadBalancerPolicyTypes({List<String>? policyTypeNames}) Future<DescribeLoadBalancerPolicyTypesOutput>
Describes the specified load balancer policy types or all load balancer policy types.
describeLoadBalancers({List<String>? loadBalancerNames, String? marker, int? pageSize}) Future<DescribeAccessPointsOutput>
Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.
describeTags({required List<String> loadBalancerNames}) Future<DescribeTagsOutput>
Describes the tags associated with the specified load balancers.
detachLoadBalancerFromSubnets({required String loadBalancerName, required List<String> subnets}) Future<DetachLoadBalancerFromSubnetsOutput>
Removes the specified subnets from the set of configured subnets for the load balancer.
disableAvailabilityZonesForLoadBalancer({required List<String> availabilityZones, required String loadBalancerName}) Future<RemoveAvailabilityZonesOutput>
Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.
enableAvailabilityZonesForLoadBalancer({required List<String> availabilityZones, required String loadBalancerName}) Future<AddAvailabilityZonesOutput>
Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.
modifyLoadBalancerAttributes({required LoadBalancerAttributes loadBalancerAttributes, required String loadBalancerName}) Future<ModifyLoadBalancerAttributesOutput>
Modifies the attributes of the specified load balancer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerInstancesWithLoadBalancer({required List<Instance> instances, required String loadBalancerName}) Future<RegisterEndPointsOutput>
Adds the specified instances to the specified load balancer.
removeTags({required List<String> loadBalancerNames, required List<TagKeyOnly> tags}) Future<void>
Removes one or more tags from the specified load balancer.
setLoadBalancerListenerSSLCertificate({required String loadBalancerName, required int loadBalancerPort, required String sSLCertificateId}) Future<void>
Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate that was used on the same load balancer and port.
setLoadBalancerPoliciesForBackendServer({required int instancePort, required String loadBalancerName, required List<String> policyNames}) Future<void>
Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies. At this time, only the back-end server authentication policy type can be applied to the instance ports; this policy type is composed of multiple public key policies.
setLoadBalancerPoliciesOfListener({required String loadBalancerName, required int loadBalancerPort, required List<String> policyNames}) Future<void>
Replaces the current set of policies for the specified load balancer port with the specified set of policies.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited