AWS SDK for PHP 3.x (original) (raw)

Client: Aws\ElasticLoadBalancing\ElasticLoadBalancingClient

Service ID: elasticloadbalancing

Version: 2012-06-01

This page describes the parameters and results for the operations of the Elastic Load Balancing (2012-06-01), and shows how to use the Aws\ElasticLoadBalancing\ElasticLoadBalancingClientobject to call the described operations. This documentation is specific to the 2012-06-01 API version of the service.

Operation Summary

Each of the following operations can be created from a client using$client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

AddTags ( array $params = [] )

Adds the specified tags to the specified load balancer.

ApplySecurityGroupsToLoadBalancer ( array $params = [] )

Associates one or more security groups with your load balancer in a virtual private cloud (VPC).

AttachLoadBalancerToSubnets ( array $params = [] )

Adds one or more subnets to the set of configured subnets for the specified load balancer.

ConfigureHealthCheck ( array $params = [] )

Specifies the health check settings to use when evaluating the health state of your EC2 instances.

CreateAppCookieStickinessPolicy ( array $params = [] )

Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie.

CreateLBCookieStickinessPolicy ( array $params = [] )

Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period.

CreateLoadBalancer ( array $params = [] )

Creates a Classic Load Balancer.

CreateLoadBalancerListeners ( array $params = [] )

Creates one or more listeners for the specified load balancer.

CreateLoadBalancerPolicy ( array $params = [] )

Creates a policy with the specified attributes for the specified load balancer.

DeleteLoadBalancer ( array $params = [] )

Deletes the specified load balancer.

DeleteLoadBalancerListeners ( array $params = [] )

Deletes the specified listeners from the specified load balancer.

DeleteLoadBalancerPolicy ( array $params = [] )

Deletes the specified policy from the specified load balancer.

DeregisterInstancesFromLoadBalancer ( array $params = [] )

Deregisters the specified instances from the specified load balancer.

DescribeAccountLimits ( array $params = [] )

Describes the current Elastic Load Balancing resource limits for your AWS account.

DescribeInstanceHealth ( array $params = [] )

Describes the state of the specified instances with respect to the specified load balancer.

DescribeLoadBalancerAttributes ( array $params = [] )

Describes the attributes for the specified load balancer.

DescribeLoadBalancerPolicies ( array $params = [] )

Describes the specified policies.

DescribeLoadBalancerPolicyTypes ( array $params = [] )

Describes the specified load balancer policy types or all load balancer policy types.

DescribeLoadBalancers ( array $params = [] )

Describes the specified the load balancers.

DescribeTags ( array $params = [] )

Describes the tags associated with the specified load balancers.

DetachLoadBalancerFromSubnets ( array $params = [] )

Removes the specified subnets from the set of configured subnets for the load balancer.

DisableAvailabilityZonesForLoadBalancer ( array $params = [] )

Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

EnableAvailabilityZonesForLoadBalancer ( array $params = [] )

Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

ModifyLoadBalancerAttributes ( array $params = [] )

Modifies the attributes of the specified load balancer.

RegisterInstancesWithLoadBalancer ( array $params = [] )

Adds the specified instances to the specified load balancer.

RemoveTags ( array $params = [] )

Removes one or more tags from the specified load balancer.

SetLoadBalancerListenerSSLCertificate ( array $params = [] )

Sets the certificate that terminates the specified listener's SSL connections.

SetLoadBalancerPoliciesForBackendServer ( array $params = [] )

Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies.

SetLoadBalancerPoliciesOfListener ( array $params = [] )

Replaces the current set of policies for the specified load balancer port with the specified set of policies.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

DescribeInstanceHealth

DescribeLoadBalancerPolicies

DescribeLoadBalancerPolicyTypes

DescribeLoadBalancers

Waiters

Waiters allow you to poll a resource until it enters into a desired state. A waiter has a name used to describe what it does, and is associated with an API operation. When creating a waiter, you can provide the API operation parameters associated with the corresponding operation. Waiters can be accessed using the getWaiter($waiterName, $operationParameters) method of a client object. This client supports the following waiters:

Waiter name API Operation Delay Max Attempts
InstanceDeregistered DescribeInstanceHealth 15 40
AnyInstanceInService DescribeInstanceHealth 15 40
InstanceInService DescribeInstanceHealth 15 40

Operations

AddTags

result=result = result=client->addTags([/* ... /]); promise=promise = promise=client->addTagsAsync([/ ... */]);

Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.

Each tag consists of a key and an optional value. If a tag with the same key is already associated with the load balancer, AddTags updates its value.

For more information, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->addTags([ 'LoadBalancerNames' => ['', ...], // REQUIRED 'Tags' => [ // REQUIRED [ 'Key' => '', // REQUIRED 'Value' => '', ], // ... ], ]);

Parameter Details

Members

LoadBalancerNames

Required: Yes

Type: Array of strings

The name of the load balancer. You can specify one load balancer only.

Tags

Required: Yes

Type: Array of Tag structures

The tags.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

TooManyTagsException:

The quota for the number of tags that can be assigned to a load balancer has been reached.

DuplicateTagKeysException:

A tag key was specified more than once.

Examples

Example 1: To add tags to a load balancer

This example adds two tags to the specified load balancer. result=result = result=client->addTags([ 'LoadBalancerNames' => [ 'my-load-balancer', ], 'Tags' => [ [ 'Key' => 'project', 'Value' => 'lima', ], [ 'Key' => 'department', 'Value' => 'digital-media', ], ], ]);

ApplySecurityGroupsToLoadBalancer

result=result = result=client->applySecurityGroupsToLoadBalancer([/* ... /]); promise=promise = promise=client->applySecurityGroupsToLoadBalancerAsync([/ ... */]);

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.

For more information, see Security Groups for Load Balancers in a VPC in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->applySecurityGroupsToLoadBalancer([ 'LoadBalancerName' => '', // REQUIRED 'SecurityGroups' => ['', ...], // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

SecurityGroups

Required: Yes

Type: Array of strings

The IDs of the security groups to associate with the load balancer. Note that you cannot specify the name of the security group.

Result Syntax

[ 'SecurityGroups' => ['', ...], ]

Result Details

Members

SecurityGroups

The IDs of the security groups associated with the load balancer.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

InvalidSecurityGroupException:

One or more of the specified security groups do not exist.

Examples

Example 1: To associate a security group with a load balancer in a VPC

This example associates a security group with the specified load balancer in a VPC. result=result = result=client->applySecurityGroupsToLoadBalancer([ 'LoadBalancerName' => 'my-load-balancer', 'SecurityGroups' => [ 'sg-fc448899', ], ]);

Result syntax:

[ 'SecurityGroups' => [ 'sg-fc448899', ], ]

AttachLoadBalancerToSubnets

result=result = result=client->attachLoadBalancerToSubnets([/* ... /]); promise=promise = promise=client->attachLoadBalancerToSubnetsAsync([/ ... */]);

Adds one or more subnets to the set of configured subnets for the specified load balancer.

The load balancer evenly distributes requests across all registered subnets. For more information, see Add or Remove Subnets for Your Load Balancer in a VPC in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->attachLoadBalancerToSubnets([ 'LoadBalancerName' => '', // REQUIRED 'Subnets' => ['', ...], // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Subnets

Required: Yes

Type: Array of strings

The IDs of the subnets to add. You can add only one subnet per Availability Zone.

Result Syntax

[ 'Subnets' => ['', ...], ]

Result Details

Members

Subnets

The IDs of the subnets attached to the load balancer.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

SubnetNotFoundException:

One or more of the specified subnets do not exist.

InvalidSubnetException:

The specified VPC has no associated Internet gateway.

Examples

Example 1: To attach subnets to a load balancer

This example adds the specified subnet to the set of configured subnets for the specified load balancer. result=result = result=client->attachLoadBalancerToSubnets([ 'LoadBalancerName' => 'my-load-balancer', 'Subnets' => [ 'subnet-0ecac448', ], ]);

Result syntax:

[ 'Subnets' => [ 'subnet-15aaab61', 'subnet-0ecac448', ], ]

ConfigureHealthCheck

result=result = result=client->configureHealthCheck([/* ... /]); promise=promise = promise=client->configureHealthCheckAsync([/ ... */]);

Specifies the health check settings to use when evaluating the health state of your EC2 instances.

For more information, see Configure Health Checks for Your Load Balancer in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->configureHealthCheck([ 'HealthCheck' => [ // REQUIRED 'HealthyThreshold' => , // REQUIRED 'Interval' => , // REQUIRED 'Target' => '', // REQUIRED 'Timeout' => , // REQUIRED 'UnhealthyThreshold' => , // REQUIRED ], 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

HealthCheck

Required: Yes

Type: HealthCheck structure

The configuration information.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[ 'HealthCheck' => [ 'HealthyThreshold' => , 'Interval' => , 'Target' => '', 'Timeout' => , 'UnhealthyThreshold' => , ], ]

Result Details

Members

HealthCheck

Type: HealthCheck structure

The updated health check.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

Examples

Example 1: To specify the health check settings for your backend EC2 instances

This example specifies the health check settings used to evaluate the health of your backend EC2 instances. result=result = result=client->configureHealthCheck([ 'HealthCheck' => [ 'HealthyThreshold' => 2, 'Interval' => 30, 'Target' => 'HTTP:80/png', 'Timeout' => 3, 'UnhealthyThreshold' => 2, ], 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'HealthCheck' => [ 'HealthyThreshold' => 2, 'Interval' => 30, 'Target' => 'HTTP:80/png', 'Timeout' => 3, 'UnhealthyThreshold' => 2, ], ]

CreateAppCookieStickinessPolicy

result=result = result=client->createAppCookieStickinessPolicy([/* ... /]); promise=promise = promise=client->createAppCookieStickinessPolicyAsync([/ ... */]);

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.

This policy is similar to the policy created by CreateLBCookieStickinessPolicy, except that the lifetime of the special Elastic Load Balancing cookie, AWSELB, follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer only inserts a new stickiness cookie when the application response includes a new application cookie.

If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.

For more information, see Application-Controlled Session Stickiness in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->createAppCookieStickinessPolicy([ 'CookieName' => '', // REQUIRED 'LoadBalancerName' => '', // REQUIRED 'PolicyName' => '', // REQUIRED ]);

Parameter Details

Members

CookieName

Required: Yes

Type: string

The name of the application cookie used for stickiness.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

PolicyName

Required: Yes

Type: string

The name of the policy being created. Policy names must consist of alphanumeric characters and dashes (-). This name must be unique within the set of policies for this load balancer.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

DuplicatePolicyNameException:

A policy with the specified name already exists for this load balancer.

TooManyPoliciesException:

The quota for the number of policies for this load balancer has been reached.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

Examples

Example 1: To generate a stickiness policy for your load balancer

This example generates a stickiness policy that follows the sticky session lifetimes of the application-generated cookie. result=result = result=client->createAppCookieStickinessPolicy([ 'CookieName' => 'my-app-cookie', 'LoadBalancerName' => 'my-load-balancer', 'PolicyName' => 'my-app-cookie-policy', ]);

CreateLBCookieStickinessPolicy

result=result = result=client->createLBCookieStickinessPolicy([/* ... /]); promise=promise = promise=client->createLBCookieStickinessPolicyAsync([/ ... */]);

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.

When a load balancer implements this policy, the load balancer uses a special cookie to track the instance for each request. When the load balancer receives a request, it first checks to see if this cookie is present in the request. If so, the load balancer sends the request to the application server specified in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load-balancing algorithm.

A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is based on the cookie expiration time, which is specified in the policy configuration.

For more information, see Duration-Based Session Stickiness in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->createLBCookieStickinessPolicy([ 'CookieExpirationPeriod' => , 'LoadBalancerName' => '', // REQUIRED 'PolicyName' => '', // REQUIRED ]);

Parameter Details

Members

CookieExpirationPeriod

The time period, in seconds, after which the cookie should be considered stale. If you do not specify this parameter, the default value is 0, which indicates that the sticky session should last for the duration of the browser session.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

PolicyName

Required: Yes

Type: string

The name of the policy being created. Policy names must consist of alphanumeric characters and dashes (-). This name must be unique within the set of policies for this load balancer.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

DuplicatePolicyNameException:

A policy with the specified name already exists for this load balancer.

TooManyPoliciesException:

The quota for the number of policies for this load balancer has been reached.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

Examples

Example 1: To generate a duration-based stickiness policy for your load balancer

This example generates a stickiness policy with sticky session lifetimes controlled by the specified expiration period. result=result = result=client->createLBCookieStickinessPolicy([ 'CookieExpirationPeriod' => 60, 'LoadBalancerName' => 'my-load-balancer', 'PolicyName' => 'my-duration-cookie-policy', ]);

CreateLoadBalancer

result=result = result=client->createLoadBalancer([/* ... /]); promise=promise = promise=client->createLoadBalancerAsync([/ ... */]);

Creates a Classic Load Balancer.

You can add listeners, security groups, subnets, and tags when you create your load balancer, or you can add them later using CreateLoadBalancerListeners, ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, and AddTags.

To describe your current load balancers, see DescribeLoadBalancers. When you are finished with a load balancer, you can delete it using DeleteLoadBalancer.

You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account. For more information, see Limits for Your Classic Load Balancer in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->createLoadBalancer([ 'AvailabilityZones' => ['', ...], 'Listeners' => [ // REQUIRED [ 'InstancePort' => , // REQUIRED 'InstanceProtocol' => '', 'LoadBalancerPort' => , // REQUIRED 'Protocol' => '', // REQUIRED 'SSLCertificateId' => '', ], // ... ], 'LoadBalancerName' => '', // REQUIRED 'Scheme' => '', 'SecurityGroups' => ['', ...], 'Subnets' => ['', ...], 'Tags' => [ [ 'Key' => '', // REQUIRED 'Value' => '', ], // ... ], ]);

Parameter Details

Members

AvailabilityZones

One or more Availability Zones from the same region as the load balancer.

You must specify at least one Availability Zone.

You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.

Listeners

Required: Yes

Type: Array of Listener structures

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.

Scheme

The type of a load balancer. Valid only for load balancers in a VPC.

By default, Elastic Load Balancing creates an Internet-facing load balancer with a DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see Load Balancer Scheme in the Elastic Load Balancing User Guide.

Specify internal to create a load balancer with a DNS name that resolves to private IP addresses.

SecurityGroups

The IDs of the security groups to assign to the load balancer.

Subnets

The IDs of the subnets in your VPC to attach to the load balancer. Specify one subnet per Availability Zone specified in AvailabilityZones.

Tags

Type: Array of Tag structures

A list of tags to assign to the load balancer.

For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.

Result Syntax

[ 'DNSName' => '', ]

Result Details

Members

DNSName

The DNS name of the load balancer.

Errors

DuplicateAccessPointNameException:

The specified load balancer name already exists for this account.

TooManyAccessPointsException:

The quota for the number of load balancers has been reached.

CertificateNotFoundException:

The specified ARN does not refer to a valid SSL certificate in AWS Identity and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if you recently uploaded the certificate to IAM, this error might indicate that the certificate is not fully available yet.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

SubnetNotFoundException:

One or more of the specified subnets do not exist.

InvalidSubnetException:

The specified VPC has no associated Internet gateway.

InvalidSecurityGroupException:

One or more of the specified security groups do not exist.

InvalidSchemeException:

The specified value for the schema is not valid. You can only specify a scheme for load balancers in a VPC.

TooManyTagsException:

The quota for the number of tags that can be assigned to a load balancer has been reached.

DuplicateTagKeysException:

A tag key was specified more than once.

UnsupportedProtocolException:

The specified protocol or signature version is not supported.

OperationNotPermittedException:

This operation is not allowed.

Examples

Example 1: To create an HTTP load balancer in a VPC

This example creates a load balancer with an HTTP listener in a VPC. result=result = result=client->createLoadBalancer([ 'Listeners' => [ [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 80, 'Protocol' => 'HTTP', ], ], 'LoadBalancerName' => 'my-load-balancer', 'SecurityGroups' => [ 'sg-a61988c3', ], 'Subnets' => [ 'subnet-15aaab61', ], ]);

Result syntax:

[ 'DNSName' => 'my-load-balancer-1234567890.us-west-2.elb.amazonaws.com', ]

Example 2: To create an HTTP load balancer in EC2-Classic

This example creates a load balancer with an HTTP listener in EC2-Classic. result=result = result=client->createLoadBalancer([ 'AvailabilityZones' => [ 'us-west-2a', ], 'Listeners' => [ [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 80, 'Protocol' => 'HTTP', ], ], 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'DNSName' => 'my-load-balancer-123456789.us-west-2.elb.amazonaws.com', ]

Example 3: To create an HTTPS load balancer in a VPC

This example creates a load balancer with an HTTPS listener in a VPC. result=result = result=client->createLoadBalancer([ 'Listeners' => [ [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 80, 'Protocol' => 'HTTP', ], [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 443, 'Protocol' => 'HTTPS', 'SSLCertificateId' => 'arn:aws:iam::123456789012:server-certificate/my-server-cert', ], ], 'LoadBalancerName' => 'my-load-balancer', 'SecurityGroups' => [ 'sg-a61988c3', ], 'Subnets' => [ 'subnet-15aaab61', ], ]);

Result syntax:

[ 'DNSName' => 'my-load-balancer-1234567890.us-west-2.elb.amazonaws.com', ]

Example 4: To create an HTTPS load balancer in EC2-Classic

This example creates a load balancer with an HTTPS listener in EC2-Classic. result=result = result=client->createLoadBalancer([ 'AvailabilityZones' => [ 'us-west-2a', ], 'Listeners' => [ [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 80, 'Protocol' => 'HTTP', ], [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 443, 'Protocol' => 'HTTPS', 'SSLCertificateId' => 'arn:aws:iam::123456789012:server-certificate/my-server-cert', ], ], 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'DNSName' => 'my-load-balancer-123456789.us-west-2.elb.amazonaws.com', ]

Example 5: To create an internal load balancer

This example creates an internal load balancer with an HTTP listener in a VPC. result=result = result=client->createLoadBalancer([ 'Listeners' => [ [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 80, 'Protocol' => 'HTTP', ], ], 'LoadBalancerName' => 'my-load-balancer', 'Scheme' => 'internal', 'SecurityGroups' => [ 'sg-a61988c3', ], 'Subnets' => [ 'subnet-15aaab61', ], ]);

Result syntax:

[ 'DNSName' => 'internal-my-load-balancer-123456789.us-west-2.elb.amazonaws.com', ]

CreateLoadBalancerListeners

result=result = result=client->createLoadBalancerListeners([/* ... /]); promise=promise = promise=client->createLoadBalancerListenersAsync([/ ... */]);

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.

For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->createLoadBalancerListeners([ 'Listeners' => [ // REQUIRED [ 'InstancePort' => , // REQUIRED 'InstanceProtocol' => '', 'LoadBalancerPort' => , // REQUIRED 'Protocol' => '', // REQUIRED 'SSLCertificateId' => '', ], // ... ], 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

Listeners

Required: Yes

Type: Array of Listener structures

The listeners.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

DuplicateListenerException:

A listener already exists for the specified load balancer name and port, but with a different instance port, protocol, or SSL certificate.

CertificateNotFoundException:

The specified ARN does not refer to a valid SSL certificate in AWS Identity and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if you recently uploaded the certificate to IAM, this error might indicate that the certificate is not fully available yet.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

UnsupportedProtocolException:

The specified protocol or signature version is not supported.

Examples

Example 1: To create an HTTP listener for a load balancer

This example creates a listener for your load balancer at port 80 using the HTTP protocol. result=result = result=client->createLoadBalancerListeners([ 'Listeners' => [ [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 80, 'Protocol' => 'HTTP', ], ], 'LoadBalancerName' => 'my-load-balancer', ]);

Example 2: To create an HTTPS listener for a load balancer

This example creates a listener for your load balancer at port 443 using the HTTPS protocol. result=result = result=client->createLoadBalancerListeners([ 'Listeners' => [ [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 443, 'Protocol' => 'HTTPS', 'SSLCertificateId' => 'arn:aws:iam::123456789012:server-certificate/my-server-cert', ], ], 'LoadBalancerName' => 'my-load-balancer', ]);

CreateLoadBalancerPolicy

result=result = result=client->createLoadBalancerPolicy([/* ... /]); promise=promise = promise=client->createLoadBalancerPolicyAsync([/ ... */]);

Creates a policy with the specified attributes for the specified load balancer.

Policies are settings that are saved for your load balancer and that can be applied to the listener or the application server, depending on the policy type.

Parameter Syntax

result=result = result=client->createLoadBalancerPolicy([ 'LoadBalancerName' => '', // REQUIRED 'PolicyAttributes' => [ [ 'AttributeName' => '', 'AttributeValue' => '', ], // ... ], 'PolicyName' => '', // REQUIRED 'PolicyTypeName' => '', // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

PolicyAttributes

Type: Array of PolicyAttribute structures

The policy attributes.

PolicyName

Required: Yes

Type: string

The name of the load balancer policy to be created. This name must be unique within the set of policies for this load balancer.

PolicyTypeName

Required: Yes

Type: string

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

PolicyTypeNotFoundException:

One or more of the specified policy types do not exist.

DuplicatePolicyNameException:

A policy with the specified name already exists for this load balancer.

TooManyPoliciesException:

The quota for the number of policies for this load balancer has been reached.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

Examples

Example 1: To create a policy that enables Proxy Protocol on a load balancer

This example creates a policy that enables Proxy Protocol on the specified load balancer. result=result = result=client->createLoadBalancerPolicy([ 'LoadBalancerName' => 'my-load-balancer', 'PolicyAttributes' => [ [ 'AttributeName' => 'ProxyProtocol', 'AttributeValue' => 'true', ], ], 'PolicyName' => 'my-ProxyProtocol-policy', 'PolicyTypeName' => 'ProxyProtocolPolicyType', ]);

Example 2: To create a public key policy

This example creates a public key policy. result=result = result=client->createLoadBalancerPolicy([ 'LoadBalancerName' => 'my-load-balancer', 'PolicyAttributes' => [ [ 'AttributeName' => 'PublicKey', 'AttributeValue' => 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwAYUjnfyEyXr1pxjhFWBpMlggUcqoi3kl+dS74kj//c6x7ROtusUaeQCTgIUkayttRDWchuqo1pHC1u+n5xxXnBBe2ejbb2WRsKIQ5rXEeixsjFpFsojpSQKkzhVGI6mJVZBJDVKSHmswnwLBdofLhzvllpovBPTHe+o4haAWvDBALJU0pkSI1FecPHcs2hwxf14zHoXy1e2k36A64nXW43wtfx5qcVSIxtCEOjnYRg7RPvybaGfQ+v6Iaxb/+7J5kEvZhTFQId+bSiJImF1FSUT1W1xwzBZPUbcUkkXDj45vC2s3Z8E+Lk7a3uZhvsQHLZnrfuWjBWGWvZ/MhZYgEXAMPLE', ], ], 'PolicyName' => 'my-PublicKey-policy', 'PolicyTypeName' => 'PublicKeyPolicyType', ]);

Example 3: To create a backend server authentication policy

This example creates a backend server authentication policy that enables authentication on your backend instance using a public key policy. result=result = result=client->createLoadBalancerPolicy([ 'LoadBalancerName' => 'my-load-balancer', 'PolicyAttributes' => [ [ 'AttributeName' => 'PublicKeyPolicyName', 'AttributeValue' => 'my-PublicKey-policy', ], ], 'PolicyName' => 'my-authentication-policy', 'PolicyTypeName' => 'BackendServerAuthenticationPolicyType', ]);

DeleteLoadBalancer

result=result = result=client->deleteLoadBalancer([/* ... /]); promise=promise = promise=client->deleteLoadBalancerAsync([/ ... */]);

Deletes the specified load balancer.

If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.

If the load balancer does not exist or has already been deleted, the call to DeleteLoadBalancer still succeeds.

Parameter Syntax

result=result = result=client->deleteLoadBalancer([ 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

There are no errors described for this operation.

Examples

Example 1: To delete a load balancer

This example deletes the specified load balancer. result=result = result=client->deleteLoadBalancer([ 'LoadBalancerName' => 'my-load-balancer', ]);

DeleteLoadBalancerListeners

result=result = result=client->deleteLoadBalancerListeners([/* ... /]); promise=promise = promise=client->deleteLoadBalancerListenersAsync([/ ... */]);

Deletes the specified listeners from the specified load balancer.

Parameter Syntax

result=result = result=client->deleteLoadBalancerListeners([ 'LoadBalancerName' => '', // REQUIRED 'LoadBalancerPorts' => [, ...], // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

LoadBalancerPorts

Required: Yes

Type: Array of ints

The client port numbers of the listeners.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

Examples

Example 1: To delete a listener from your load balancer

This example deletes the listener for the specified port from the specified load balancer. result=result = result=client->deleteLoadBalancerListeners([ 'LoadBalancerName' => 'my-load-balancer', 'LoadBalancerPorts' => [ 80, ], ]);

DeleteLoadBalancerPolicy

result=result = result=client->deleteLoadBalancerPolicy([/* ... /]); promise=promise = promise=client->deleteLoadBalancerPolicyAsync([/ ... */]);

Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.

Parameter Syntax

result=result = result=client->deleteLoadBalancerPolicy([ 'LoadBalancerName' => '', // REQUIRED 'PolicyName' => '', // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

PolicyName

Required: Yes

Type: string

The name of the policy.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

Examples

Example 1: To delete a policy from your load balancer

This example deletes the specified policy from the specified load balancer. The policy must not be enabled on any listener. result=result = result=client->deleteLoadBalancerPolicy([ 'LoadBalancerName' => 'my-load-balancer', 'PolicyName' => 'my-duration-cookie-policy', ]);

DeregisterInstancesFromLoadBalancer

result=result = result=client->deregisterInstancesFromLoadBalancer([/* ... /]); promise=promise = promise=client->deregisterInstancesFromLoadBalancerAsync([/ ... */]);

Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.

You can use DescribeLoadBalancers to verify that the instance is deregistered from the load balancer.

For more information, see Register or De-Register EC2 Instances in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->deregisterInstancesFromLoadBalancer([ 'Instances' => [ // REQUIRED [ 'InstanceId' => '', ], // ... ], 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

Instances

Required: Yes

Type: Array of Instance structures

The IDs of the instances.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[ 'Instances' => [ [ 'InstanceId' => '', ], // ... ], ]

Result Details

Members

Instances

Type: Array of Instance structures

The remaining instances registered with the load balancer.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

InvalidEndPointException:

The specified endpoint is not valid.

Examples

Example 1: To deregister instances from a load balancer

This example deregisters the specified instance from the specified load balancer. result=result = result=client->deregisterInstancesFromLoadBalancer([ 'Instances' => [ [ 'InstanceId' => 'i-d6f6fae3', ], ], 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'Instances' => [ [ 'InstanceId' => 'i-207d9717', ], [ 'InstanceId' => 'i-afefb49b', ], ], ]

DescribeAccountLimits

result=result = result=client->describeAccountLimits([/* ... /]); promise=promise = promise=client->describeAccountLimitsAsync([/ ... */]);

Describes the current Elastic Load Balancing resource limits for your AWS account.

For more information, see Limits for Your Classic Load Balancer in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->describeAccountLimits([ 'Marker' => '', 'PageSize' => , ]);

Parameter Details

Members

Marker

The marker for the next set of results. (You received this marker from a previous call.)

PageSize

The maximum number of results to return with this call.

Result Syntax

[ 'Limits' => [ [ 'Max' => '', 'Name' => '', ], // ... ], 'NextMarker' => '', ]

Result Details

Members

Limits

Type: Array of Limit structures

Information about the limits.

NextMarker

The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

Errors

There are no errors described for this operation.

DescribeInstanceHealth

result=result = result=client->describeInstanceHealth([/* ... /]); promise=promise = promise=client->describeInstanceHealthAsync([/ ... */]);

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.

Parameter Syntax

result=result = result=client->describeInstanceHealth([ 'Instances' => [ [ 'InstanceId' => '', ], // ... ], 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

Instances

Type: Array of Instance structures

The IDs of the instances.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[ 'InstanceStates' => [ [ 'Description' => '', 'InstanceId' => '', 'ReasonCode' => '', 'State' => '', ], // ... ], ]

Result Details

Members

InstanceStates

Type: Array of InstanceState structures

Information about the health of the instances.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

InvalidEndPointException:

The specified endpoint is not valid.

Examples

Example 1: To describe the health of the instances for a load balancer

This example describes the health of the instances for the specified load balancer. result=result = result=client->describeInstanceHealth([ 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'InstanceStates' => [ [ 'Description' => 'N/A', 'InstanceId' => 'i-207d9717', 'ReasonCode' => 'N/A', 'State' => 'InService', ], [ 'Description' => 'N/A', 'InstanceId' => 'i-afefb49b', 'ReasonCode' => 'N/A', 'State' => 'InService', ], ], ]

DescribeLoadBalancerAttributes

result=result = result=client->describeLoadBalancerAttributes([/* ... /]); promise=promise = promise=client->describeLoadBalancerAttributesAsync([/ ... */]);

Describes the attributes for the specified load balancer.

Parameter Syntax

result=result = result=client->describeLoadBalancerAttributes([ 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[ 'LoadBalancerAttributes' => [ 'AccessLog' => [ 'EmitInterval' => , 'Enabled' => true || false, 'S3BucketName' => '', 'S3BucketPrefix' => '', ], 'AdditionalAttributes' => [ [ 'Key' => '', 'Value' => '', ], // ... ], 'ConnectionDraining' => [ 'Enabled' => true || false, 'Timeout' => , ], 'ConnectionSettings' => [ 'IdleTimeout' => , ], 'CrossZoneLoadBalancing' => [ 'Enabled' => true || false, ], ], ]

Result Details

Members

LoadBalancerAttributes

Type: LoadBalancerAttributes structure

Information about the load balancer attributes.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

LoadBalancerAttributeNotFoundException:

The specified load balancer attribute does not exist.

Examples

Example 1: To describe the attributes of a load balancer

This example describes the attributes of the specified load balancer. result=result = result=client->describeLoadBalancerAttributes([ 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'LoadBalancerAttributes' => [ 'AccessLog' => [ 'Enabled' => , ], 'ConnectionDraining' => [ 'Enabled' => , 'Timeout' => 300, ], 'ConnectionSettings' => [ 'IdleTimeout' => 60, ], 'CrossZoneLoadBalancing' => [ 'Enabled' => , ], ], ]

DescribeLoadBalancerPolicies

result=result = result=client->describeLoadBalancerPolicies([/* ... /]); promise=promise = promise=client->describeLoadBalancerPoliciesAsync([/ ... */]);

Describes the specified policies.

If you specify a load balancer name, the action returns the descriptions of all policies created for the load balancer. If you specify a policy name associated with your load balancer, the action returns the description of that policy. If you don't specify a load balancer name, the action returns descriptions of the specified sample policies, or descriptions of all sample policies. The names of the sample policies have the ELBSample- prefix.

Parameter Syntax

result=result = result=client->describeLoadBalancerPolicies([ 'LoadBalancerName' => '', 'PolicyNames' => ['', ...], ]);

Parameter Details

Members

LoadBalancerName

The name of the load balancer.

PolicyNames

The names of the policies.

Result Syntax

[ 'PolicyDescriptions' => [ [ 'PolicyAttributeDescriptions' => [ [ 'AttributeName' => '', 'AttributeValue' => '', ], // ... ], 'PolicyName' => '', 'PolicyTypeName' => '', ], // ... ], ]

Result Details

Members

PolicyDescriptions

Type: Array of PolicyDescription structures

Information about the policies.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

PolicyNotFoundException:

One or more of the specified policies do not exist.

Examples

Example 1: To describe a policy associated with a load balancer

This example describes the specified policy associated with the specified load balancer. result=result = result=client->describeLoadBalancerPolicies([ 'LoadBalancerName' => 'my-load-balancer', 'PolicyNames' => [ 'my-authentication-policy', ], ]);

Result syntax:

[ 'PolicyDescriptions' => [ [ 'PolicyAttributeDescriptions' => [ [ 'AttributeName' => 'PublicKeyPolicyName', 'AttributeValue' => 'my-PublicKey-policy', ], ], 'PolicyName' => 'my-authentication-policy', 'PolicyTypeName' => 'BackendServerAuthenticationPolicyType', ], ], ]

DescribeLoadBalancerPolicyTypes

result=result = result=client->describeLoadBalancerPolicyTypes([/* ... /]); promise=promise = promise=client->describeLoadBalancerPolicyTypesAsync([/ ... */]);

Describes the specified load balancer policy types or all load balancer policy types.

The description of each type indicates how it can be used. For example, some policies can be used only with layer 7 listeners, some policies can be used only with layer 4 listeners, and some policies can be used only with your EC2 instances.

You can use CreateLoadBalancerPolicy to create a policy configuration for any of these policy types. Then, depending on the policy type, use either SetLoadBalancerPoliciesOfListener or SetLoadBalancerPoliciesForBackendServer to set the policy.

Parameter Syntax

result=result = result=client->describeLoadBalancerPolicyTypes([ 'PolicyTypeNames' => ['', ...], ]);

Parameter Details

Members

PolicyTypeNames

The names of the policy types. If no names are specified, describes all policy types defined by Elastic Load Balancing.

Result Syntax

[ 'PolicyTypeDescriptions' => [ [ 'Description' => '', 'PolicyAttributeTypeDescriptions' => [ [ 'AttributeName' => '', 'AttributeType' => '', 'Cardinality' => '', 'DefaultValue' => '', 'Description' => '', ], // ... ], 'PolicyTypeName' => '', ], // ... ], ]

Result Details

Members

PolicyTypeDescriptions

Type: Array of PolicyTypeDescription structures

Information about the policy types.

Errors

PolicyTypeNotFoundException:

One or more of the specified policy types do not exist.

Examples

Example 1: To describe a load balancer policy type defined by Elastic Load Balancing

This example describes the specified load balancer policy type. result=result = result=client->describeLoadBalancerPolicyTypes([ 'PolicyTypeNames' => [ 'ProxyProtocolPolicyType', ], ]);

Result syntax:

[ 'PolicyTypeDescriptions' => [ [ 'Description' => 'Policy that controls whether to include the IP address and port of the originating request for TCP messages. This policy operates on TCP listeners only.', 'PolicyAttributeTypeDescriptions' => [ [ 'AttributeName' => 'ProxyProtocol', 'AttributeType' => 'Boolean', 'Cardinality' => 'ONE', ], ], 'PolicyTypeName' => 'ProxyProtocolPolicyType', ], ], ]

DescribeLoadBalancers

result=result = result=client->describeLoadBalancers([/* ... /]); promise=promise = promise=client->describeLoadBalancersAsync([/ ... */]);

Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.

Parameter Syntax

result=result = result=client->describeLoadBalancers([ 'LoadBalancerNames' => ['', ...], 'Marker' => '', 'PageSize' => , ]);

Parameter Details

Members

LoadBalancerNames

The names of the load balancers.

Marker

The marker for the next set of results. (You received this marker from a previous call.)

PageSize

The maximum number of results to return with this call (a number from 1 to 400). The default is 400.

Result Syntax

[ 'LoadBalancerDescriptions' => [ [ 'AvailabilityZones' => ['', ...], 'BackendServerDescriptions' => [ [ 'InstancePort' => , 'PolicyNames' => ['', ...], ], // ... ], 'CanonicalHostedZoneName' => '', 'CanonicalHostedZoneNameID' => '', 'CreatedTime' => , 'DNSName' => '', 'HealthCheck' => [ 'HealthyThreshold' => , 'Interval' => , 'Target' => '', 'Timeout' => , 'UnhealthyThreshold' => , ], 'Instances' => [ [ 'InstanceId' => '', ], // ... ], 'ListenerDescriptions' => [ [ 'Listener' => [ 'InstancePort' => , 'InstanceProtocol' => '', 'LoadBalancerPort' => , 'Protocol' => '', 'SSLCertificateId' => '', ], 'PolicyNames' => ['', ...], ], // ... ], 'LoadBalancerName' => '', 'Policies' => [ 'AppCookieStickinessPolicies' => [ [ 'CookieName' => '', 'PolicyName' => '', ], // ... ], 'LBCookieStickinessPolicies' => [ [ 'CookieExpirationPeriod' => , 'PolicyName' => '', ], // ... ], 'OtherPolicies' => ['', ...], ], 'Scheme' => '', 'SecurityGroups' => ['', ...], 'SourceSecurityGroup' => [ 'GroupName' => '', 'OwnerAlias' => '', ], 'Subnets' => ['', ...], 'VPCId' => '', ], // ... ], 'NextMarker' => '', ]

Result Details

Members

LoadBalancerDescriptions

Type: Array of LoadBalancerDescription structures

Information about the load balancers.

NextMarker

The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

DependencyThrottleException:

A request made by Elastic Load Balancing to another service exceeds the maximum request rate permitted for your account.

Examples

Example 1: To describe one of your load balancers

This example describes the specified load balancer. result=result = result=client->describeLoadBalancers([ 'LoadBalancerNames' => [ 'my-load-balancer', ], ]);

Result syntax:

[ 'LoadBalancerDescriptions' => [ [ 'AvailabilityZones' => [ 'us-west-2a', ], 'BackendServerDescriptions' => [ [ 'InstancePort' => 80, 'PolicyNames' => [ 'my-ProxyProtocol-policy', ], ], ], 'CanonicalHostedZoneName' => 'my-load-balancer-1234567890.us-west-2.elb.amazonaws.com', 'CanonicalHostedZoneNameID' => 'Z3DZXE0EXAMPLE', 'CreatedTime' => , 'DNSName' => 'my-load-balancer-1234567890.us-west-2.elb.amazonaws.com', 'HealthCheck' => [ 'HealthyThreshold' => 2, 'Interval' => 30, 'Target' => 'HTTP:80/png', 'Timeout' => 3, 'UnhealthyThreshold' => 2, ], 'Instances' => [ [ 'InstanceId' => 'i-207d9717', ], [ 'InstanceId' => 'i-afefb49b', ], ], 'ListenerDescriptions' => [ [ 'Listener' => [ 'InstancePort' => 80, 'InstanceProtocol' => 'HTTP', 'LoadBalancerPort' => 80, 'Protocol' => 'HTTP', ], 'PolicyNames' => [ ], ], [ 'Listener' => [ 'InstancePort' => 443, 'InstanceProtocol' => 'HTTPS', 'LoadBalancerPort' => 443, 'Protocol' => 'HTTPS', 'SSLCertificateId' => 'arn:aws:iam::123456789012:server-certificate/my-server-cert', ], 'PolicyNames' => [ 'ELBSecurityPolicy-2015-03', ], ], ], 'LoadBalancerName' => 'my-load-balancer', 'Policies' => [ 'AppCookieStickinessPolicies' => [ ], 'LBCookieStickinessPolicies' => [ [ 'CookieExpirationPeriod' => 60, 'PolicyName' => 'my-duration-cookie-policy', ], ], 'OtherPolicies' => [ 'my-PublicKey-policy', 'my-authentication-policy', 'my-SSLNegotiation-policy', 'my-ProxyProtocol-policy', 'ELBSecurityPolicy-2015-03', ], ], 'Scheme' => 'internet-facing', 'SecurityGroups' => [ 'sg-a61988c3', ], 'SourceSecurityGroup' => [ 'GroupName' => 'my-elb-sg', 'OwnerAlias' => '123456789012', ], 'Subnets' => [ 'subnet-15aaab61', ], 'VPCId' => 'vpc-a01106c2', ], ], ]

DescribeTags

result=result = result=client->describeTags([/* ... /]); promise=promise = promise=client->describeTagsAsync([/ ... */]);

Describes the tags associated with the specified load balancers.

Parameter Syntax

result=result = result=client->describeTags([ 'LoadBalancerNames' => ['', ...], // REQUIRED ]);

Parameter Details

Members

LoadBalancerNames

Required: Yes

Type: Array of strings

The names of the load balancers.

Result Syntax

[ 'TagDescriptions' => [ [ 'LoadBalancerName' => '', 'Tags' => [ [ 'Key' => '', 'Value' => '', ], // ... ], ], // ... ], ]

Result Details

Members

TagDescriptions

Type: Array of TagDescription structures

Information about the tags.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

Examples

Example 1: To describe the tags for a load balancer

This example describes the tags for the specified load balancer. result=result = result=client->describeTags([ 'LoadBalancerNames' => [ 'my-load-balancer', ], ]);

Result syntax:

[ 'TagDescriptions' => [ [ 'LoadBalancerName' => 'my-load-balancer', 'Tags' => [ [ 'Key' => 'project', 'Value' => 'lima', ], [ 'Key' => 'department', 'Value' => 'digital-media', ], ], ], ], ]

DetachLoadBalancerFromSubnets

result=result = result=client->detachLoadBalancerFromSubnets([/* ... /]); promise=promise = promise=client->detachLoadBalancerFromSubnetsAsync([/ ... */]);

Removes the specified subnets from the set of configured subnets for the load balancer.

After a subnet is removed, all EC2 instances registered with the load balancer in the removed subnet go into the OutOfService state. Then, the load balancer balances the traffic among the remaining routable subnets.

Parameter Syntax

result=result = result=client->detachLoadBalancerFromSubnets([ 'LoadBalancerName' => '', // REQUIRED 'Subnets' => ['', ...], // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Subnets

Required: Yes

Type: Array of strings

The IDs of the subnets.

Result Syntax

[ 'Subnets' => ['', ...], ]

Result Details

Members

Subnets

The IDs of the remaining subnets for the load balancer.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

Examples

Example 1: To detach a load balancer from a subnet

This example detaches the specified load balancer from the specified subnet. result=result = result=client->detachLoadBalancerFromSubnets([ 'LoadBalancerName' => 'my-load-balancer', 'Subnets' => [ 'subnet-0ecac448', ], ]);

Result syntax:

[ 'Subnets' => [ 'subnet-15aaab61', ], ]

DisableAvailabilityZonesForLoadBalancer

result=result = result=client->disableAvailabilityZonesForLoadBalancer([/* ... /]); promise=promise = promise=client->disableAvailabilityZonesForLoadBalancerAsync([/ ... */]);

Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets.

There must be at least one Availability Zone registered with a load balancer at all times. After an Availability Zone is removed, all instances registered with the load balancer that are in the removed Availability Zone go into the OutOfService state. Then, the load balancer attempts to equally balance the traffic among its remaining Availability Zones.

For more information, see Add or Remove Availability Zones in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->disableAvailabilityZonesForLoadBalancer([ 'AvailabilityZones' => ['', ...], // REQUIRED 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

AvailabilityZones

Required: Yes

Type: Array of strings

The Availability Zones.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[ 'AvailabilityZones' => ['', ...], ]

Result Details

Members

AvailabilityZones

The remaining Availability Zones for the load balancer.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

Examples

Example 1: To disable an Availability Zone for a load balancer

This example removes the specified Availability Zone from the set of Availability Zones for the specified load balancer. result=result = result=client->disableAvailabilityZonesForLoadBalancer([ 'AvailabilityZones' => [ 'us-west-2a', ], 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'AvailabilityZones' => [ 'us-west-2b', ], ]

EnableAvailabilityZonesForLoadBalancer

result=result = result=client->enableAvailabilityZonesForLoadBalancer([/* ... /]); promise=promise = promise=client->enableAvailabilityZonesForLoadBalancerAsync([/ ... */]);

Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

For load balancers in a non-default VPC, use AttachLoadBalancerToSubnets.

The load balancer evenly distributes requests across all its registered Availability Zones that contain instances. For more information, see Add or Remove Availability Zones in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->enableAvailabilityZonesForLoadBalancer([ 'AvailabilityZones' => ['', ...], // REQUIRED 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

AvailabilityZones

Required: Yes

Type: Array of strings

The Availability Zones. These must be in the same region as the load balancer.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[ 'AvailabilityZones' => ['', ...], ]

Result Details

Members

AvailabilityZones

The updated list of Availability Zones for the load balancer.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

Examples

Example 1: To enable an Availability Zone for a load balancer

This example adds the specified Availability Zone to the specified load balancer. result=result = result=client->enableAvailabilityZonesForLoadBalancer([ 'AvailabilityZones' => [ 'us-west-2b', ], 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'AvailabilityZones' => [ 'us-west-2a', 'us-west-2b', ], ]

ModifyLoadBalancerAttributes

result=result = result=client->modifyLoadBalancerAttributes([/* ... /]); promise=promise = promise=client->modifyLoadBalancerAttributesAsync([/ ... */]);

Modifies the attributes of the specified load balancer.

You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, and CrossZoneLoadBalancing by either enabling or disabling them. Or, you can modify the load balancer attribute ConnectionSettings by specifying an idle connection timeout value for your load balancer.

For more information, see the following in the Classic Load Balancers Guide:

Parameter Syntax

result=result = result=client->modifyLoadBalancerAttributes([ 'LoadBalancerAttributes' => [ // REQUIRED 'AccessLog' => [ 'EmitInterval' => , 'Enabled' => true || false, // REQUIRED 'S3BucketName' => '', 'S3BucketPrefix' => '', ], 'AdditionalAttributes' => [ [ 'Key' => '', 'Value' => '', ], // ... ], 'ConnectionDraining' => [ 'Enabled' => true || false, // REQUIRED 'Timeout' => , ], 'ConnectionSettings' => [ 'IdleTimeout' => , // REQUIRED ], 'CrossZoneLoadBalancing' => [ 'Enabled' => true || false, // REQUIRED ], ], 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

LoadBalancerAttributes

Required: Yes

Type: LoadBalancerAttributes structure

The attributes for the load balancer.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[ 'LoadBalancerAttributes' => [ 'AccessLog' => [ 'EmitInterval' => , 'Enabled' => true || false, 'S3BucketName' => '', 'S3BucketPrefix' => '', ], 'AdditionalAttributes' => [ [ 'Key' => '', 'Value' => '', ], // ... ], 'ConnectionDraining' => [ 'Enabled' => true || false, 'Timeout' => , ], 'ConnectionSettings' => [ 'IdleTimeout' => , ], 'CrossZoneLoadBalancing' => [ 'Enabled' => true || false, ], ], 'LoadBalancerName' => '', ]

Result Details

Members

LoadBalancerAttributes

Type: LoadBalancerAttributes structure

Information about the load balancer attributes.

LoadBalancerName

The name of the load balancer.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

LoadBalancerAttributeNotFoundException:

The specified load balancer attribute does not exist.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

Examples

Example 1: To enable cross-zone load balancing

This example enables cross-zone load balancing for the specified load balancer. result=result = result=client->modifyLoadBalancerAttributes([ 'LoadBalancerAttributes' => [ 'CrossZoneLoadBalancing' => [ 'Enabled' => 1, ], ], 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'LoadBalancerAttributes' => [ 'CrossZoneLoadBalancing' => [ 'Enabled' => 1, ], ], 'LoadBalancerName' => 'my-load-balancer', ]

Example 2: To enable connection draining

This example enables connection draining for the specified load balancer. result=result = result=client->modifyLoadBalancerAttributes([ 'LoadBalancerAttributes' => [ 'ConnectionDraining' => [ 'Enabled' => 1, 'Timeout' => 300, ], ], 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'LoadBalancerAttributes' => [ 'ConnectionDraining' => [ 'Enabled' => 1, 'Timeout' => 300, ], ], 'LoadBalancerName' => 'my-load-balancer', ]

RegisterInstancesWithLoadBalancer

result=result = result=client->registerInstancesWithLoadBalancer([/* ... /]); promise=promise = promise=client->registerInstancesWithLoadBalancerAsync([/ ... */]);

Adds the specified instances to the specified load balancer.

The instance must be a running instance in the same network as the load balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic instances to that VPC and then register the linked EC2-Classic instances with the load balancer in the VPC.

Note that RegisterInstanceWithLoadBalancer completes when the request has been registered. Instance registration takes a little time to complete. To check the state of the registered instances, use DescribeLoadBalancers or DescribeInstanceHealth.

After the instance is registered, it starts receiving traffic and requests from the load balancer. Any instance that is not in one of the Availability Zones registered for the load balancer is moved to the OutOfService state. If an Availability Zone is added to the load balancer later, any instances registered with the load balancer move to the InService state.

To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer.

For more information, see Register or De-Register EC2 Instances in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->registerInstancesWithLoadBalancer([ 'Instances' => [ // REQUIRED [ 'InstanceId' => '', ], // ... ], 'LoadBalancerName' => '', // REQUIRED ]);

Parameter Details

Members

Instances

Required: Yes

Type: Array of Instance structures

The IDs of the instances.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

Result Syntax

[ 'Instances' => [ [ 'InstanceId' => '', ], // ... ], ]

Result Details

Members

Instances

Type: Array of Instance structures

The updated list of instances for the load balancer.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

InvalidEndPointException:

The specified endpoint is not valid.

Examples

Example 1: To register instances with a load balancer

This example registers the specified instance with the specified load balancer. result=result = result=client->registerInstancesWithLoadBalancer([ 'Instances' => [ [ 'InstanceId' => 'i-d6f6fae3', ], ], 'LoadBalancerName' => 'my-load-balancer', ]);

Result syntax:

[ 'Instances' => [ [ 'InstanceId' => 'i-d6f6fae3', ], [ 'InstanceId' => 'i-207d9717', ], [ 'InstanceId' => 'i-afefb49b', ], ], ]

RemoveTags

result=result = result=client->removeTags([/* ... /]); promise=promise = promise=client->removeTagsAsync([/ ... */]);

Removes one or more tags from the specified load balancer.

Parameter Syntax

result=result = result=client->removeTags([ 'LoadBalancerNames' => ['', ...], // REQUIRED 'Tags' => [ // REQUIRED [ 'Key' => '', ], // ... ], ]);

Parameter Details

Members

LoadBalancerNames

Required: Yes

Type: Array of strings

The name of the load balancer. You can specify a maximum of one load balancer name.

Tags

Required: Yes

Type: Array of TagKeyOnly structures

The list of tag keys to remove.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

Examples

Example 1: To remove tags from a load balancer

This example removes the specified tag from the specified load balancer. result=result = result=client->removeTags([ 'LoadBalancerNames' => [ 'my-load-balancer', ], 'Tags' => [ [ 'Key' => 'project', ], ], ]); result=result = result=client->setLoadBalancerListenerSSLCertificate([/* ... /]); promise=promise = promise=client->setLoadBalancerListenerSSLCertificateAsync([/ ... */]);

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.

For more information about updating your SSL certificate, see Replace the SSL Certificate for Your Load Balancer in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->setLoadBalancerListenerSSLCertificate([ 'LoadBalancerName' => '', // REQUIRED 'LoadBalancerPort' => , // REQUIRED 'SSLCertificateId' => '', // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

LoadBalancerPort

The port that uses the specified SSL certificate.

SSLCertificateId

Required: Yes

Type: string

The Amazon Resource Name (ARN) of the SSL certificate.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

CertificateNotFoundException:

The specified ARN does not refer to a valid SSL certificate in AWS Identity and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if you recently uploaded the certificate to IAM, this error might indicate that the certificate is not fully available yet.

AccessPointNotFoundException:

The specified load balancer does not exist.

ListenerNotFoundException:

The load balancer does not have a listener configured at the specified port.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

UnsupportedProtocolException:

The specified protocol or signature version is not supported.

Examples

This example replaces the existing SSL certificate for the specified HTTPS listener. result=result = result=client->setLoadBalancerListenerSSLCertificate([ 'LoadBalancerName' => 'my-load-balancer', 'LoadBalancerPort' => 443, 'SSLCertificateId' => 'arn:aws:iam::123456789012:server-certificate/new-server-cert', ]);

SetLoadBalancerPoliciesForBackendServer

result=result = result=client->setLoadBalancerPoliciesForBackendServer([/* ... /]); promise=promise = promise=client->setLoadBalancerPoliciesForBackendServerAsync([/ ... */]);

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.

Each time you use SetLoadBalancerPoliciesForBackendServer to enable the policies, use the PolicyNames parameter to list the policies that you want to enable.

You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify that the policy is associated with the EC2 instance.

For more information about enabling back-end instance authentication, see Configure Back-end Instance Authentication in the Classic Load Balancers Guide. For more information about Proxy Protocol, see Configure Proxy Protocol Support in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->setLoadBalancerPoliciesForBackendServer([ 'InstancePort' => , // REQUIRED 'LoadBalancerName' => '', // REQUIRED 'PolicyNames' => ['', ...], // REQUIRED ]);

Parameter Details

Members

InstancePort

The port number associated with the EC2 instance.

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

PolicyNames

Required: Yes

Type: Array of strings

The names of the policies. If the list is empty, then all current polices are removed from the EC2 instance.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

PolicyNotFoundException:

One or more of the specified policies do not exist.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

Examples

Example 1: To replace the policies associated with a port for a backend instance

This example replaces the policies that are currently associated with the specified port. result=result = result=client->setLoadBalancerPoliciesForBackendServer([ 'InstancePort' => 80, 'LoadBalancerName' => 'my-load-balancer', 'PolicyNames' => [ 'my-ProxyProtocol-policy', ], ]);

SetLoadBalancerPoliciesOfListener

result=result = result=client->setLoadBalancerPoliciesOfListener([/* ... /]); promise=promise = promise=client->setLoadBalancerPoliciesOfListenerAsync([/ ... */]);

Replaces the current set of policies for the specified load balancer port with the specified set of policies.

To enable back-end server authentication, use SetLoadBalancerPoliciesForBackendServer.

For more information about setting policies, see Update the SSL Negotiation Configuration, Duration-Based Session Stickiness, and Application-Controlled Session Stickiness in the Classic Load Balancers Guide.

Parameter Syntax

result=result = result=client->setLoadBalancerPoliciesOfListener([ 'LoadBalancerName' => '', // REQUIRED 'LoadBalancerPort' => , // REQUIRED 'PolicyNames' => ['', ...], // REQUIRED ]);

Parameter Details

Members

LoadBalancerName

Required: Yes

Type: string

The name of the load balancer.

LoadBalancerPort

The external port of the load balancer.

PolicyNames

Required: Yes

Type: Array of strings

The names of the policies. This list must include all policies to be enabled. If you omit a policy that is currently enabled, it is disabled. If the list is empty, all current policies are disabled.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

AccessPointNotFoundException:

The specified load balancer does not exist.

PolicyNotFoundException:

One or more of the specified policies do not exist.

ListenerNotFoundException:

The load balancer does not have a listener configured at the specified port.

InvalidConfigurationRequestException:

The requested configuration change is not valid.

Examples

Example 1: To replace the policies associated with a listener

This example replaces the policies that are currently associated with the specified listener. result=result = result=client->setLoadBalancerPoliciesOfListener([ 'LoadBalancerName' => 'my-load-balancer', 'LoadBalancerPort' => 80, 'PolicyNames' => [ 'my-SSLNegotiation-policy', ], ]);

Shapes

AccessLog

Description

Information about the AccessLog attribute.

Members

EmitInterval

The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes

Enabled

Required: Yes

Type: boolean

Specifies whether access logs are enabled for the load balancer.

S3BucketName

The name of the Amazon S3 bucket where the access logs are stored.

S3BucketPrefix

The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod. If the prefix is not provided, the log is placed at the root level of the bucket.

AccessPointNotFoundException

Description

The specified load balancer does not exist.

Members

AddAvailabilityZonesOutput

Description

Contains the output of EnableAvailabilityZonesForLoadBalancer.

Members

AvailabilityZones

The updated list of Availability Zones for the load balancer.

AddTagsOutput

Description

Contains the output of AddTags.

Members

AdditionalAttribute

Description

Information about additional load balancer attributes.

Members

Key

The name of the attribute.

The following attribute is supported.

Value

This value of the attribute.

AppCookieStickinessPolicy

Description

Information about a policy for application-controlled session stickiness.

Members

CookieName

The name of the application cookie used for stickiness.

PolicyName

The mnemonic name for the policy being created. The name must be unique within a set of policies for this load balancer.

ApplySecurityGroupsToLoadBalancerOutput

Description

Contains the output of ApplySecurityGroupsToLoadBalancer.

Members

SecurityGroups

The IDs of the security groups associated with the load balancer.

AttachLoadBalancerToSubnetsOutput

Description

Contains the output of AttachLoadBalancerToSubnets.

Members

Subnets

The IDs of the subnets attached to the load balancer.

BackendServerDescription

Description

Information about the configuration of an EC2 instance.

Members

InstancePort

The port on which the EC2 instance is listening.

PolicyNames

The names of the policies enabled for the EC2 instance.

CertificateNotFoundException

Description

The specified ARN does not refer to a valid SSL certificate in AWS Identity and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if you recently uploaded the certificate to IAM, this error might indicate that the certificate is not fully available yet.

Members

ConfigureHealthCheckOutput

Description

Contains the output of ConfigureHealthCheck.

Members

HealthCheck

Type: HealthCheck structure

The updated health check.

ConnectionDraining

Description

Information about the ConnectionDraining attribute.

Members

Enabled

Required: Yes

Type: boolean

Specifies whether connection draining is enabled for the load balancer.

Timeout

The maximum time, in seconds, to keep the existing connections open before deregistering the instances.

ConnectionSettings

Description

Information about the ConnectionSettings attribute.

Members

IdleTimeout

The time, in seconds, that the connection is allowed to be idle (no data has been sent over the connection) before it is closed by the load balancer.

CreateAccessPointOutput

Description

Contains the output for CreateLoadBalancer.

Members

DNSName

The DNS name of the load balancer.

CreateAppCookieStickinessPolicyOutput

Description

Contains the output for CreateAppCookieStickinessPolicy.

Members

CreateLBCookieStickinessPolicyOutput

Description

Contains the output for CreateLBCookieStickinessPolicy.

Members

CreateLoadBalancerListenerOutput

Description

Contains the parameters for CreateLoadBalancerListener.

Members

CreateLoadBalancerPolicyOutput

Description

Contains the output of CreateLoadBalancerPolicy.

Members

CrossZoneLoadBalancing

Description

Information about the CrossZoneLoadBalancing attribute.

Members

Enabled

Required: Yes

Type: boolean

Specifies whether cross-zone load balancing is enabled for the load balancer.

DeleteAccessPointOutput

Description

Contains the output of DeleteLoadBalancer.

Members

DeleteLoadBalancerListenerOutput

Description

Contains the output of DeleteLoadBalancerListeners.

Members

DeleteLoadBalancerPolicyOutput

Description

Contains the output of DeleteLoadBalancerPolicy.

Members

DependencyThrottleException

Description

A request made by Elastic Load Balancing to another service exceeds the maximum request rate permitted for your account.

Members

DeregisterEndPointsOutput

Description

Contains the output of DeregisterInstancesFromLoadBalancer.

Members

Instances

Type: Array of Instance structures

The remaining instances registered with the load balancer.

DescribeAccessPointsOutput

Description

Contains the parameters for DescribeLoadBalancers.

Members

LoadBalancerDescriptions

Type: Array of LoadBalancerDescription structures

Information about the load balancers.

NextMarker

The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

DescribeAccountLimitsOutput

Members

Limits

Type: Array of Limit structures

Information about the limits.

NextMarker

The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

DescribeEndPointStateOutput

Description

Contains the output for DescribeInstanceHealth.

Members

InstanceStates

Type: Array of InstanceState structures

Information about the health of the instances.

DescribeLoadBalancerAttributesOutput

Description

Contains the output of DescribeLoadBalancerAttributes.

Members

LoadBalancerAttributes

Type: LoadBalancerAttributes structure

Information about the load balancer attributes.

DescribeLoadBalancerPoliciesOutput

Description

Contains the output of DescribeLoadBalancerPolicies.

Members

PolicyDescriptions

Type: Array of PolicyDescription structures

Information about the policies.

DescribeLoadBalancerPolicyTypesOutput

Description

Contains the output of DescribeLoadBalancerPolicyTypes.

Members

PolicyTypeDescriptions

Type: Array of PolicyTypeDescription structures

Information about the policy types.

DescribeTagsOutput

Description

Contains the output for DescribeTags.

Members

TagDescriptions

Type: Array of TagDescription structures

Information about the tags.

DetachLoadBalancerFromSubnetsOutput

Description

Contains the output of DetachLoadBalancerFromSubnets.

Members

Subnets

The IDs of the remaining subnets for the load balancer.

DuplicateAccessPointNameException

Description

The specified load balancer name already exists for this account.

Members

DuplicateListenerException

Description

A listener already exists for the specified load balancer name and port, but with a different instance port, protocol, or SSL certificate.

Members

DuplicatePolicyNameException

Description

A policy with the specified name already exists for this load balancer.

Members

DuplicateTagKeysException

Description

A tag key was specified more than once.

Members

HealthCheck

Description

Information about a health check.

Members

HealthyThreshold

The number of consecutive health checks successes required before moving the instance to the Healthy state.

Interval

The approximate interval, in seconds, between health checks of an individual instance.

Target

Required: Yes

Type: string

The instance being checked. The protocol is either TCP, HTTP, HTTPS, or SSL. The range of valid ports is one (1) through 65535.

TCP is the default, specified as a TCP: port pair, for example "TCP:5000". In this case, a health check simply attempts to open a TCP connection to the instance on the specified port. Failure to connect within the configured timeout is considered unhealthy.

SSL is also specified as SSL: port pair, for example, SSL:5000.

For HTTP/HTTPS, you must include a ping path in the string. HTTP is specified as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle". In this case, a HTTP GET request is issued to the instance on the given port and path. Any answer other than "200 OK" within the timeout period is considered unhealthy.

The total length of the HTTP ping target must be 1024 16-bit Unicode characters or less.

Timeout

The amount of time, in seconds, during which no response means a failed health check.

This value must be less than the Interval value.

UnhealthyThreshold

The number of consecutive health check failures required before moving the instance to the Unhealthy state.

Instance

Description

The ID of an EC2 instance.

Members

InstanceId

The instance ID.

InstanceState

Description

Information about the state of an EC2 instance.

Members

Description

A description of the instance state. This string can contain one or more of the following messages.

InstanceId

The ID of the instance.

ReasonCode

Information about the cause of OutOfService instances. Specifically, whether the cause is Elastic Load Balancing or the instance.

Valid values: ELB | Instance | N/A

State

The current state of the instance.

Valid values: InService | OutOfService | Unknown

InvalidConfigurationRequestException

Description

The requested configuration change is not valid.

Members

InvalidEndPointException

Description

The specified endpoint is not valid.

Members

InvalidSchemeException

Description

The specified value for the schema is not valid. You can only specify a scheme for load balancers in a VPC.

Members

InvalidSecurityGroupException

Description

One or more of the specified security groups do not exist.

Members

InvalidSubnetException

Description

The specified VPC has no associated Internet gateway.

Members

LBCookieStickinessPolicy

Description

Information about a policy for duration-based session stickiness.

Members

CookieExpirationPeriod

The time period, in seconds, after which the cookie should be considered stale. If this parameter is not specified, the stickiness session lasts for the duration of the browser session.

PolicyName

The name of the policy. This name must be unique within the set of policies for this load balancer.

Limit

Description

Information about an Elastic Load Balancing resource limit for your AWS account.

Members

Max

The maximum value of the limit.

Name

The name of the limit. The possible values are:

Listener

Description
Members

InstancePort

The port on which the instance is listening.

InstanceProtocol

The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL.

If the front-end protocol is TCP or SSL, the back-end protocol must be TCP or SSL. If the front-end protocol is HTTP or HTTPS, the back-end protocol must be HTTP or HTTPS.

If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.

If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.

LoadBalancerPort

The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.

Protocol

Required: Yes

Type: string

The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.

SSLCertificateId

The Amazon Resource Name (ARN) of the server certificate.

ListenerDescription

Description

The policies enabled for a listener.

Members

Listener

The listener.

PolicyNames

The policies. If there are no policies enabled, the list is empty.

ListenerNotFoundException

Description

The load balancer does not have a listener configured at the specified port.

Members

LoadBalancerAttributeNotFoundException

Description

The specified load balancer attribute does not exist.

Members

LoadBalancerAttributes

Description

The attributes for a load balancer.

Members

AccessLog

Type: AccessLog structure

If enabled, the load balancer captures detailed information of all requests and delivers the information to the Amazon S3 bucket that you specify.

For more information, see Enable Access Logs in the Classic Load Balancers Guide.

AdditionalAttributes

Type: Array of AdditionalAttribute structures

Any additional attributes.

ConnectionDraining

Type: ConnectionDraining structure

If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy instance.

For more information, see Configure Connection Draining in the Classic Load Balancers Guide.

ConnectionSettings

Type: ConnectionSettings structure

If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

By default, Elastic Load Balancing maintains a 60-second idle connection timeout for both front-end and back-end connections of your load balancer. For more information, see Configure Idle Connection Timeout in the Classic Load Balancers Guide.

CrossZoneLoadBalancing

Type: CrossZoneLoadBalancing structure

If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones.

For more information, see Configure Cross-Zone Load Balancing in the Classic Load Balancers Guide.

LoadBalancerDescription

Description

Information about a load balancer.

Members

AvailabilityZones

The Availability Zones for the load balancer.

BackendServerDescriptions

Type: Array of BackendServerDescription structures

Information about your EC2 instances.

CanonicalHostedZoneName

CanonicalHostedZoneNameID

The ID of the Amazon Route 53 hosted zone for the load balancer.

CreatedTime

Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the load balancer was created.

DNSName

The DNS name of the load balancer.

HealthCheck

Type: HealthCheck structure

Information about the health checks conducted on the load balancer.

Instances

Type: Array of Instance structures

The IDs of the instances for the load balancer.

ListenerDescriptions

Type: Array of ListenerDescription structures

The listeners for the load balancer.

LoadBalancerName

The name of the load balancer.

Policies

The policies defined for the load balancer.

Scheme

The type of load balancer. Valid only for load balancers in a VPC.

If Scheme is internet-facing, the load balancer has a public DNS name that resolves to a public IP address.

If Scheme is internal, the load balancer has a public DNS name that resolves to a private IP address.

SecurityGroups

The security groups for the load balancer. Valid only for load balancers in a VPC.

SourceSecurityGroup

Type: SourceSecurityGroup structure

The security group for the load balancer, which you can use as part of your inbound rules for your registered instances. To only allow traffic from load balancers, add a security group rule that specifies this source security group as the inbound source.

Subnets

The IDs of the subnets for the load balancer.

VPCId

The ID of the VPC for the load balancer.

ModifyLoadBalancerAttributesOutput

Description

Contains the output of ModifyLoadBalancerAttributes.

Members

LoadBalancerAttributes

Type: LoadBalancerAttributes structure

Information about the load balancer attributes.

LoadBalancerName

The name of the load balancer.

OperationNotPermittedException

Description

This operation is not allowed.

Members

Policies

Description

The policies for a load balancer.

Members

AppCookieStickinessPolicies

Type: Array of AppCookieStickinessPolicy structures

LBCookieStickinessPolicies

Type: Array of LBCookieStickinessPolicy structures

OtherPolicies

The policies other than the stickiness policies.

PolicyAttribute

Description

Information about a policy attribute.

Members

AttributeName

The name of the attribute.

AttributeValue

The value of the attribute.

PolicyAttributeDescription

Description

Information about a policy attribute.

Members

AttributeName

The name of the attribute.

AttributeValue

The value of the attribute.

PolicyAttributeTypeDescription

Description

Information about a policy attribute type.

Members

AttributeName

The name of the attribute.

AttributeType

The type of the attribute. For example, Boolean or Integer.

Cardinality

The cardinality of the attribute.

Valid values:

DefaultValue

The default value of the attribute, if applicable.

Description

A description of the attribute.

PolicyDescription

Description

Information about a policy.

Members

PolicyAttributeDescriptions

Type: Array of PolicyAttributeDescription structures

The policy attributes.

PolicyName

The name of the policy.

PolicyTypeName

The name of the policy type.

PolicyNotFoundException

Description

One or more of the specified policies do not exist.

Members

PolicyTypeDescription

Description

Information about a policy type.

Members

Description

A description of the policy type.

PolicyAttributeTypeDescriptions

Type: Array of PolicyAttributeTypeDescription structures

The description of the policy attributes associated with the policies defined by Elastic Load Balancing.

PolicyTypeName

The name of the policy type.

PolicyTypeNotFoundException

Description

One or more of the specified policy types do not exist.

Members

RegisterEndPointsOutput

Description

Contains the output of RegisterInstancesWithLoadBalancer.

Members

Instances

Type: Array of Instance structures

The updated list of instances for the load balancer.

RemoveAvailabilityZonesOutput

Description

Contains the output for DisableAvailabilityZonesForLoadBalancer.

Members

AvailabilityZones

The remaining Availability Zones for the load balancer.

RemoveTagsOutput

Description

Contains the output of RemoveTags.

Members
Description

Contains the output of SetLoadBalancerListenerSSLCertificate.

Members

SetLoadBalancerPoliciesForBackendServerOutput

Description

Contains the output of SetLoadBalancerPoliciesForBackendServer.

Members

SetLoadBalancerPoliciesOfListenerOutput

Description

Contains the output of SetLoadBalancePoliciesOfListener.

Members

SourceSecurityGroup

Description

Information about a source security group.

Members

GroupName

The name of the security group.

OwnerAlias

The owner of the security group.

SubnetNotFoundException

Description

One or more of the specified subnets do not exist.

Members

Tag

Description

Information about a tag.

Members

Key

Required: Yes

Type: string

The key of the tag.

Value

The value of the tag.

TagDescription

Description

The tags associated with a load balancer.

Members

LoadBalancerName

The name of the load balancer.

Tags

Type: Array of Tag structures

The tags.

TagKeyOnly

Description

The key of a tag.

Members

Key

The name of the key.

TooManyAccessPointsException

Description

The quota for the number of load balancers has been reached.

Members

TooManyPoliciesException

Description

The quota for the number of policies for this load balancer has been reached.

Members

TooManyTagsException

Description

The quota for the number of tags that can be assigned to a load balancer has been reached.

Members

UnsupportedProtocolException

Description

The specified protocol or signature version is not supported.

Members