SDK for PHP 3.x

Client: Aws\ElasticLoadBalancingV2\ElasticLoadBalancingV2Client
Service ID: elasticloadbalancingv2
Version: 2015-12-01

This page describes the parameters and results for the operations of the Elastic Load Balancing (2015-12-01), and shows how to use the Aws\ElasticLoadBalancingV2\ElasticLoadBalancingV2Client object to call the described operations. This documentation is specific to the 2015-12-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 */).

AddListenerCertificates ( array $params = [] )
Adds the specified SSL server certificate to the certificate list for the specified HTTPS or TLS listener.
AddTags ( array $params = [] )
Adds the specified tags to the specified Elastic Load Balancing resource.
AddTrustStoreRevocations ( array $params = [] )
Adds the specified revocation file to the specified trust store.
CreateListener ( array $params = [] )
Creates a listener for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
CreateLoadBalancer ( array $params = [] )
Creates an Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
CreateRule ( array $params = [] )
Creates a rule for the specified listener.
CreateTargetGroup ( array $params = [] )
Creates a target group.
CreateTrustStore ( array $params = [] )
Creates a trust store.
DeleteListener ( array $params = [] )
Deletes the specified listener.
DeleteLoadBalancer ( array $params = [] )
Deletes the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
DeleteRule ( array $params = [] )
Deletes the specified rule.
DeleteSharedTrustStoreAssociation ( array $params = [] )
Deletes a shared trust store association.
DeleteTargetGroup ( array $params = [] )
Deletes the specified target group.
DeleteTrustStore ( array $params = [] )
Deletes a trust store.
DeregisterTargets ( array $params = [] )
Deregisters the specified targets from the specified target group.
DescribeAccountLimits ( array $params = [] )
Describes the current Elastic Load Balancing resource limits for your Amazon Web Services account.
DescribeListenerAttributes ( array $params = [] )
Describes the attributes for the specified listener.
DescribeListenerCertificates ( array $params = [] )
Describes the default certificate and the certificate list for the specified HTTPS or TLS listener.
DescribeListeners ( array $params = [] )
Describes the specified listeners or the listeners for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
DescribeLoadBalancerAttributes ( array $params = [] )
Describes the attributes for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
DescribeLoadBalancers ( array $params = [] )
Describes the specified load balancers or all of your load balancers.
DescribeRules ( array $params = [] )
Describes the specified rules or the rules for the specified listener.
DescribeSSLPolicies ( array $params = [] )
Describes the specified policies or all policies used for SSL negotiation.
DescribeTags ( array $params = [] )
Describes the tags for the specified Elastic Load Balancing resources.
DescribeTargetGroupAttributes ( array $params = [] )
Describes the attributes for the specified target group.
DescribeTargetGroups ( array $params = [] )
Describes the specified target groups or all of your target groups.
DescribeTargetHealth ( array $params = [] )
Describes the health of the specified targets or all of your targets.
DescribeTrustStoreAssociations ( array $params = [] )
Describes all resources associated with the specified trust store.
DescribeTrustStoreRevocations ( array $params = [] )
Describes the revocation files in use by the specified trust store or revocation files.
DescribeTrustStores ( array $params = [] )
Describes all trust stores for the specified account.
GetResourcePolicy ( array $params = [] )
Retrieves the resource policy for a specified resource.
GetTrustStoreCaCertificatesBundle ( array $params = [] )
Retrieves the ca certificate bundle.
GetTrustStoreRevocationContent ( array $params = [] )
Retrieves the specified revocation file.
ModifyListener ( array $params = [] )
Replaces the specified properties of the specified listener.
ModifyListenerAttributes ( array $params = [] )
Modifies the specified attributes of the specified listener.
ModifyLoadBalancerAttributes ( array $params = [] )
Modifies the specified attributes of the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
ModifyRule ( array $params = [] )
Replaces the specified properties of the specified rule.
ModifyTargetGroup ( array $params = [] )
Modifies the health checks used when evaluating the health state of the targets in the specified target group.
ModifyTargetGroupAttributes ( array $params = [] )
Modifies the specified attributes of the specified target group.
ModifyTrustStore ( array $params = [] )
Update the ca certificate bundle for the specified trust store.
RegisterTargets ( array $params = [] )
Registers the specified targets with the specified target group.
RemoveListenerCertificates ( array $params = [] )
Removes the specified certificate from the certificate list for the specified HTTPS or TLS listener.
RemoveTags ( array $params = [] )
Removes the specified tags from the specified Elastic Load Balancing resources.
RemoveTrustStoreRevocations ( array $params = [] )
Removes the specified revocation file from the specified trust store.
SetIpAddressType ( array $params = [] )
Sets the type of IP addresses used by the subnets of the specified load balancer.
SetRulePriorities ( array $params = [] )
Sets the priorities of the specified rules.
SetSecurityGroups ( array $params = [] )
Associates the specified security groups with the specified Application Load Balancer or Network Load Balancer.
SetSubnets ( array $params = [] )
Enables the Availability Zones for the specified public subnets for the specified Application Load Balancer, Network Load Balancer or Gateway Load Balancer.

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:

DescribeListenerCertificates
DescribeListeners
DescribeLoadBalancers
DescribeRules
DescribeTargetGroups
DescribeTrustStoreAssociations
DescribeTrustStoreRevocations
DescribeTrustStores

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
LoadBalancerExists DescribeLoadBalancers 15 40
LoadBalancerAvailable DescribeLoadBalancers 15 40
LoadBalancersDeleted DescribeLoadBalancers 15 40
TargetInService DescribeTargetHealth 15 40
TargetDeregistered DescribeTargetHealth 15 40

Operations

AddListenerCertificates

$result = $client->addListenerCertificates([/* ... */]);
$promise = $client->addListenerCertificatesAsync([/* ... */]);

Adds the specified SSL server certificate to the certificate list for the specified HTTPS or TLS listener.

If the certificate in already in the certificate list, the call is successful but the certificate is not added again.

For more information, see HTTPS listeners in the Application Load Balancers Guide or TLS listeners in the Network Load Balancers Guide.

Parameter Syntax

$result = $client->addListenerCertificates([
    'Certificates' => [ // REQUIRED
        [
            'CertificateArn' => '<string>',
            'IsDefault' => true || false,
        ],
        // ...
    ],
    'ListenerArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
Certificates
Required: Yes
Type: Array of Certificate structures

The certificate to add. You can specify one certificate per call. Set CertificateArn to the certificate ARN but do not set IsDefault.

ListenerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the listener.

Result Syntax

[
    'Certificates' => [
        [
            'CertificateArn' => '<string>',
            'IsDefault' => true || false,
        ],
        // ...
    ],
]

Result Details

Members
Certificates
Type: Array of Certificate structures

Information about the certificates in the certificate list.

Errors

ListenerNotFoundException:

The specified listener does not exist.

TooManyCertificatesException:

You've reached the limit on the number of certificates per load balancer.

CertificateNotFoundException:

The specified certificate does not exist.

AddTags

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

Adds the specified tags to the specified Elastic Load Balancing resource. You can tag your Application Load Balancers, Network Load Balancers, Gateway Load Balancers, target groups, trust stores, listeners, and rules.

Each tag consists of a key and an optional value. If a resource already has a tag with the same key, AddTags updates its value.

Parameter Syntax

$result = $client->addTags([
    'ResourceArns' => ['<string>', ...], // REQUIRED
    'Tags' => [ // REQUIRED
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
ResourceArns
Required: Yes
Type: Array of strings

The Amazon Resource Name (ARN) of the resource.

Tags
Required: Yes
Type: Array of Tag structures

The tags.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

DuplicateTagKeysException:

A tag key was specified more than once.

TooManyTagsException:

You've reached the limit on the number of tags for this resource.

LoadBalancerNotFoundException:

The specified load balancer does not exist.

TargetGroupNotFoundException:

The specified target group does not exist.

ListenerNotFoundException:

The specified listener does not exist.

RuleNotFoundException:

The specified rule does not exist.

TrustStoreNotFoundException:

The specified trust store does not exist.

Examples

Example 1: To add tags to a load balancer

This example adds the specified tags to the specified load balancer.

$result = $client->addTags([
    'ResourceArns' => [
        'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
    ],
    'Tags' => [
        [
            'Key' => 'project',
            'Value' => 'lima',
        ],
        [
            'Key' => 'department',
            'Value' => 'digital-media',
        ],
    ],
]);

AddTrustStoreRevocations

$result = $client->addTrustStoreRevocations([/* ... */]);
$promise = $client->addTrustStoreRevocationsAsync([/* ... */]);

Adds the specified revocation file to the specified trust store.

Parameter Syntax

$result = $client->addTrustStoreRevocations([
    'RevocationContents' => [
        [
            'RevocationType' => 'CRL',
            'S3Bucket' => '<string>',
            'S3Key' => '<string>',
            'S3ObjectVersion' => '<string>',
        ],
        // ...
    ],
    'TrustStoreArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
RevocationContents
Type: Array of RevocationContent structures

The revocation file to add.

TrustStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[
    'TrustStoreRevocations' => [
        [
            'NumberOfRevokedEntries' => <integer>,
            'RevocationId' => <integer>,
            'RevocationType' => 'CRL',
            'TrustStoreArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
TrustStoreRevocations
Type: Array of TrustStoreRevocation structures

Information about the revocation file added to the trust store.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

InvalidRevocationContentException:

The provided revocation file is an invalid format, or uses an incorrect algorithm.

TooManyTrustStoreRevocationEntriesException:

The specified trust store has too many revocation entries.

RevocationContentNotFoundException:

The specified revocation file does not exist.

CreateListener

$result = $client->createListener([/* ... */]);
$promise = $client->createListenerAsync([/* ... */]);

Creates a listener for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.

For more information, see the following:

This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple listeners with the same settings, each call succeeds.

Parameter Syntax

$result = $client->createListener([
    'AlpnPolicy' => ['<string>', ...],
    'Certificates' => [
        [
            'CertificateArn' => '<string>',
            'IsDefault' => true || false,
        ],
        // ...
    ],
    'DefaultActions' => [ // REQUIRED
        [
            'AuthenticateCognitoConfig' => [
                'AuthenticationRequestExtraParams' => ['<string>', ...],
                'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                'Scope' => '<string>',
                'SessionCookieName' => '<string>',
                'SessionTimeout' => <integer>,
                'UserPoolArn' => '<string>', // REQUIRED
                'UserPoolClientId' => '<string>', // REQUIRED
                'UserPoolDomain' => '<string>', // REQUIRED
            ],
            'AuthenticateOidcConfig' => [
                'AuthenticationRequestExtraParams' => ['<string>', ...],
                'AuthorizationEndpoint' => '<string>', // REQUIRED
                'ClientId' => '<string>', // REQUIRED
                'ClientSecret' => '<string>',
                'Issuer' => '<string>', // REQUIRED
                'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                'Scope' => '<string>',
                'SessionCookieName' => '<string>',
                'SessionTimeout' => <integer>,
                'TokenEndpoint' => '<string>', // REQUIRED
                'UseExistingClientSecret' => true || false,
                'UserInfoEndpoint' => '<string>', // REQUIRED
            ],
            'FixedResponseConfig' => [
                'ContentType' => '<string>',
                'MessageBody' => '<string>',
                'StatusCode' => '<string>', // REQUIRED
            ],
            'ForwardConfig' => [
                'TargetGroupStickinessConfig' => [
                    'DurationSeconds' => <integer>,
                    'Enabled' => true || false,
                ],
                'TargetGroups' => [
                    [
                        'TargetGroupArn' => '<string>',
                        'Weight' => <integer>,
                    ],
                    // ...
                ],
            ],
            'Order' => <integer>,
            'RedirectConfig' => [
                'Host' => '<string>',
                'Path' => '<string>',
                'Port' => '<string>',
                'Protocol' => '<string>',
                'Query' => '<string>',
                'StatusCode' => 'HTTP_301|HTTP_302', // REQUIRED
            ],
            'TargetGroupArn' => '<string>',
            'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response', // REQUIRED
        ],
        // ...
    ],
    'LoadBalancerArn' => '<string>', // REQUIRED
    'MutualAuthentication' => [
        'IgnoreClientCertificateExpiry' => true || false,
        'Mode' => '<string>',
        'TrustStoreArn' => '<string>',
        'TrustStoreAssociationStatus' => 'active|removed',
    ],
    'Port' => <integer>,
    'Protocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
    'SslPolicy' => '<string>',
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
AlpnPolicy
Type: Array of strings

[TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) policy. You can specify one policy name. The following are the possible values:

  • HTTP1Only

  • HTTP2Only

  • HTTP2Optional

  • HTTP2Preferred

  • None

For more information, see ALPN policies in the Network Load Balancers Guide.

Certificates
Type: Array of Certificate structures

[HTTPS and TLS listeners] The default certificate for the listener. You must provide exactly one certificate. Set CertificateArn to the certificate ARN but do not set IsDefault.

DefaultActions
Required: Yes
Type: Array of Action structures

The actions for the default rule.

LoadBalancerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the load balancer.

MutualAuthentication

The mutual authentication configuration information.

Port
Type: int

The port on which the load balancer is listening. You cannot specify a port for a Gateway Load Balancer.

Protocol
Type: string

The protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, and TCP_UDP. You can’t specify the UDP or TCP_UDP protocol if dual-stack mode is enabled. You cannot specify a protocol for a Gateway Load Balancer.

SslPolicy
Type: string

[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported.

For more information, see Security policies in the Application Load Balancers Guide and Security policies in the Network Load Balancers Guide.

Tags
Type: Array of Tag structures

The tags to assign to the listener.

Result Syntax

[
    'Listeners' => [
        [
            'AlpnPolicy' => ['<string>', ...],
            'Certificates' => [
                [
                    'CertificateArn' => '<string>',
                    'IsDefault' => true || false,
                ],
                // ...
            ],
            'DefaultActions' => [
                [
                    'AuthenticateCognitoConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'UserPoolArn' => '<string>',
                        'UserPoolClientId' => '<string>',
                        'UserPoolDomain' => '<string>',
                    ],
                    'AuthenticateOidcConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'AuthorizationEndpoint' => '<string>',
                        'ClientId' => '<string>',
                        'ClientSecret' => '<string>',
                        'Issuer' => '<string>',
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'TokenEndpoint' => '<string>',
                        'UseExistingClientSecret' => true || false,
                        'UserInfoEndpoint' => '<string>',
                    ],
                    'FixedResponseConfig' => [
                        'ContentType' => '<string>',
                        'MessageBody' => '<string>',
                        'StatusCode' => '<string>',
                    ],
                    'ForwardConfig' => [
                        'TargetGroupStickinessConfig' => [
                            'DurationSeconds' => <integer>,
                            'Enabled' => true || false,
                        ],
                        'TargetGroups' => [
                            [
                                'TargetGroupArn' => '<string>',
                                'Weight' => <integer>,
                            ],
                            // ...
                        ],
                    ],
                    'Order' => <integer>,
                    'RedirectConfig' => [
                        'Host' => '<string>',
                        'Path' => '<string>',
                        'Port' => '<string>',
                        'Protocol' => '<string>',
                        'Query' => '<string>',
                        'StatusCode' => 'HTTP_301|HTTP_302',
                    ],
                    'TargetGroupArn' => '<string>',
                    'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response',
                ],
                // ...
            ],
            'ListenerArn' => '<string>',
            'LoadBalancerArn' => '<string>',
            'MutualAuthentication' => [
                'IgnoreClientCertificateExpiry' => true || false,
                'Mode' => '<string>',
                'TrustStoreArn' => '<string>',
                'TrustStoreAssociationStatus' => 'active|removed',
            ],
            'Port' => <integer>,
            'Protocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
            'SslPolicy' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Listeners
Type: Array of Listener structures

Information about the listener.

Errors

DuplicateListenerException:

A listener with the specified port already exists.

TooManyListenersException:

You've reached the limit on the number of listeners per load balancer.

TooManyCertificatesException:

You've reached the limit on the number of certificates per load balancer.

LoadBalancerNotFoundException:

The specified load balancer does not exist.

TargetGroupNotFoundException:

The specified target group does not exist.

TargetGroupAssociationLimitException:

You've reached the limit on the number of load balancers per target group.

InvalidConfigurationRequestException:

The requested configuration is not valid.

IncompatibleProtocolsException:

The specified configuration is not valid with this protocol.

SSLPolicyNotFoundException:

The specified SSL policy does not exist.

CertificateNotFoundException:

The specified certificate does not exist.

UnsupportedProtocolException:

The specified protocol is not supported.

TooManyRegistrationsForTargetIdException:

You've reached the limit on the number of times a target can be registered with a load balancer.

TooManyTargetsException:

You've reached the limit on the number of targets.

TooManyActionsException:

You've reached the limit on the number of actions per rule.

InvalidLoadBalancerActionException:

The requested action is not valid.

TooManyUniqueTargetGroupsPerLoadBalancerException:

You've reached the limit on the number of unique target groups per load balancer across all listeners. If a target group is used by multiple actions for a load balancer, it is counted as only one use.

ALPNPolicyNotSupportedException:

The specified ALPN policy is not supported.

TooManyTagsException:

You've reached the limit on the number of tags for this resource.

TrustStoreNotFoundException:

The specified trust store does not exist.

TrustStoreNotReadyException:

The specified trust store is not active.

Examples

Example 1: To create an HTTP listener

This example creates an HTTP listener for the specified load balancer that forwards requests to the specified target group.

$result = $client->createListener([
    'DefaultActions' => [
        [
            'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
            'Type' => 'forward',
        ],
    ],
    'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
    'Port' => 80,
    'Protocol' => 'HTTP',
]);

Result syntax:

[
    'Listeners' => [
        [
            'DefaultActions' => [
                [
                    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
                    'Type' => 'forward',
                ],
            ],
            'ListenerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2',
            'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            'Port' => 80,
            'Protocol' => 'HTTP',
        ],
    ],
]
Example 2: To create an HTTPS listener

This example creates an HTTPS listener for the specified load balancer that forwards requests to the specified target group. Note that you must specify an SSL certificate for an HTTPS listener. You can create and manage certificates using AWS Certificate Manager (ACM). Alternatively, you can create a certificate using SSL/TLS tools, get the certificate signed by a certificate authority (CA), and upload the certificate to AWS Identity and Access Management (IAM).

$result = $client->createListener([
    'Certificates' => [
        [
            'CertificateArn' => 'arn:aws:iam::123456789012:server-certificate/my-server-cert',
        ],
    ],
    'DefaultActions' => [
        [
            'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
            'Type' => 'forward',
        ],
    ],
    'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
    'Port' => 443,
    'Protocol' => 'HTTPS',
    'SslPolicy' => 'ELBSecurityPolicy-2015-05',
]);

Result syntax:

[
    'Listeners' => [
        [
            'Certificates' => [
                [
                    'CertificateArn' => 'arn:aws:iam::123456789012:server-certificate/my-server-cert',
                ],
            ],
            'DefaultActions' => [
                [
                    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
                    'Type' => 'forward',
                ],
            ],
            'ListenerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2',
            'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            'Port' => 443,
            'Protocol' => 'HTTPS',
            'SslPolicy' => 'ELBSecurityPolicy-2015-05',
        ],
    ],
]

CreateLoadBalancer

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

Creates an Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.

For more information, see the following:

This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple load balancers with the same settings, each call succeeds.

Parameter Syntax

$result = $client->createLoadBalancer([
    'CustomerOwnedIpv4Pool' => '<string>',
    'IpAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
    'Name' => '<string>', // REQUIRED
    'Scheme' => 'internet-facing|internal',
    'SecurityGroups' => ['<string>', ...],
    'SubnetMappings' => [
        [
            'AllocationId' => '<string>',
            'IPv6Address' => '<string>',
            'PrivateIPv4Address' => '<string>',
            'SubnetId' => '<string>',
        ],
        // ...
    ],
    'Subnets' => ['<string>', ...],
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
    'Type' => 'application|network|gateway',
]);

Parameter Details

Members
CustomerOwnedIpv4Pool
Type: string

[Application Load Balancers on Outposts] The ID of the customer-owned address pool (CoIP pool).

IpAddressType
Type: string

Note: Internal load balancers must use the ipv4 IP address type.

[Application Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses), dualstack (for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4 (for IPv6 only public addresses, with private IPv4 and IPv6 addresses).

[Network Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). You can’t specify dualstack for a load balancer with a UDP or TCP_UDP listener.

[Gateway Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses).

Name
Required: Yes
Type: string

The name of the load balancer.

This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, must not begin or end with a hyphen, and must not begin with "internal-".

Scheme
Type: string

The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the internet.

The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route requests only from clients with access to the VPC for the load balancer.

The default is an Internet-facing load balancer.

You cannot specify a scheme for a Gateway Load Balancer.

SecurityGroups
Type: Array of strings

[Application Load Balancers and Network Load Balancers] The IDs of the security groups for the load balancer.

SubnetMappings
Type: Array of SubnetMapping structures

The IDs of the subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings, but not both.

[Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets.

[Application Load Balancers on Outposts] You must specify one Outpost subnet.

[Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones.

[Network Load Balancers] You can specify subnets from one or more Availability Zones. You can specify one Elastic IP address per subnet if you need static IP addresses for your internet-facing load balancer. For internal load balancers, you can specify one private IP address per subnet from the IPv4 range of the subnet. For internet-facing load balancer, you can specify one IPv6 address per subnet.

[Gateway Load Balancers] You can specify subnets from one or more Availability Zones. You cannot specify Elastic IP addresses for your subnets.

Subnets
Type: Array of strings

The IDs of the subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings, but not both. To specify an Elastic IP address, specify subnet mappings instead of subnets.

[Application Load Balancers] You must specify subnets from at least two Availability Zones.

[Application Load Balancers on Outposts] You must specify one Outpost subnet.

[Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones.

[Network Load Balancers] You can specify subnets from one or more Availability Zones.

[Gateway Load Balancers] You can specify subnets from one or more Availability Zones.

Tags
Type: Array of Tag structures

The tags to assign to the load balancer.

Type
Type: string

The type of load balancer. The default is application.

Result Syntax

[
    'LoadBalancers' => [
        [
            'AvailabilityZones' => [
                [
                    'LoadBalancerAddresses' => [
                        [
                            'AllocationId' => '<string>',
                            'IPv6Address' => '<string>',
                            'IpAddress' => '<string>',
                            'PrivateIPv4Address' => '<string>',
                        ],
                        // ...
                    ],
                    'OutpostId' => '<string>',
                    'SubnetId' => '<string>',
                    'ZoneName' => '<string>',
                ],
                // ...
            ],
            'CanonicalHostedZoneId' => '<string>',
            'CreatedTime' => <DateTime>,
            'CustomerOwnedIpv4Pool' => '<string>',
            'DNSName' => '<string>',
            'EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic' => '<string>',
            'IpAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
            'LoadBalancerArn' => '<string>',
            'LoadBalancerName' => '<string>',
            'Scheme' => 'internet-facing|internal',
            'SecurityGroups' => ['<string>', ...],
            'State' => [
                'Code' => 'active|provisioning|active_impaired|failed',
                'Reason' => '<string>',
            ],
            'Type' => 'application|network|gateway',
            'VpcId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
LoadBalancers
Type: Array of LoadBalancer structures

Information about the load balancer.

Errors

DuplicateLoadBalancerNameException:

A load balancer with the specified name already exists.

TooManyLoadBalancersException:

You've reached the limit on the number of load balancers for your Amazon Web Services account.

InvalidConfigurationRequestException:

The requested configuration is not valid.

SubnetNotFoundException:

The specified subnet does not exist.

InvalidSubnetException:

The specified subnet is out of available addresses.

InvalidSecurityGroupException:

The specified security group does not exist.

InvalidSchemeException:

The requested scheme is not valid.

TooManyTagsException:

You've reached the limit on the number of tags for this resource.

DuplicateTagKeysException:

A tag key was specified more than once.

ResourceInUseException:

A specified resource is in use.

AllocationIdNotFoundException:

The specified allocation ID does not exist.

AvailabilityZoneNotSupportedException:

The specified Availability Zone is not supported.

OperationNotPermittedException:

This operation is not allowed.

Examples

Example 1: To create an Internet-facing load balancer

This example creates an Internet-facing load balancer and enables the Availability Zones for the specified subnets.

$result = $client->createLoadBalancer([
    'Name' => 'my-load-balancer',
    'Subnets' => [
        'subnet-b7d581c0',
        'subnet-8360a9e7',
    ],
]);

Result syntax:

[
    'LoadBalancers' => [
        [
            'AvailabilityZones' => [
                [
                    'SubnetId' => 'subnet-8360a9e7',
                    'ZoneName' => 'us-west-2a',
                ],
                [
                    'SubnetId' => 'subnet-b7d581c0',
                    'ZoneName' => 'us-west-2b',
                ],
            ],
            'CanonicalHostedZoneId' => 'Z2P70J7EXAMPLE',
            'CreatedTime' => ,
            'DNSName' => 'my-load-balancer-424835706.us-west-2.elb.amazonaws.com',
            'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            'LoadBalancerName' => 'my-load-balancer',
            'Scheme' => 'internet-facing',
            'SecurityGroups' => [
                'sg-5943793c',
            ],
            'State' => [
                'Code' => 'provisioning',
            ],
            'Type' => 'application',
            'VpcId' => 'vpc-3ac0fb5f',
        ],
    ],
]
Example 2: To create an internal load balancer

This example creates an internal load balancer and enables the Availability Zones for the specified subnets.

$result = $client->createLoadBalancer([
    'Name' => 'my-internal-load-balancer',
    'Scheme' => 'internal',
    'SecurityGroups' => [
    ],
    'Subnets' => [
        'subnet-b7d581c0',
        'subnet-8360a9e7',
    ],
]);

Result syntax:

[
    'LoadBalancers' => [
        [
            'AvailabilityZones' => [
                [
                    'SubnetId' => 'subnet-8360a9e7',
                    'ZoneName' => 'us-west-2a',
                ],
                [
                    'SubnetId' => 'subnet-b7d581c0',
                    'ZoneName' => 'us-west-2b',
                ],
            ],
            'CanonicalHostedZoneId' => 'Z2P70J7EXAMPLE',
            'CreatedTime' => ,
            'DNSName' => 'internal-my-internal-load-balancer-1529930873.us-west-2.elb.amazonaws.com',
            'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/5b49b8d4303115c2',
            'LoadBalancerName' => 'my-internal-load-balancer',
            'Scheme' => 'internal',
            'SecurityGroups' => [
                'sg-5943793c',
            ],
            'State' => [
                'Code' => 'provisioning',
            ],
            'Type' => 'application',
            'VpcId' => 'vpc-3ac0fb5f',
        ],
    ],
]

CreateRule

$result = $client->createRule([/* ... */]);
$promise = $client->createRuleAsync([/* ... */]);

Creates a rule for the specified listener. The listener must be associated with an Application Load Balancer.

Each rule consists of a priority, one or more actions, and one or more conditions. Rules are evaluated in priority order, from the lowest value to the highest value. When the conditions for a rule are met, its actions are performed. If the conditions for no rules are met, the actions for the default rule are performed. For more information, see Listener rules in the Application Load Balancers Guide.

Parameter Syntax

$result = $client->createRule([
    'Actions' => [ // REQUIRED
        [
            'AuthenticateCognitoConfig' => [
                'AuthenticationRequestExtraParams' => ['<string>', ...],
                'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                'Scope' => '<string>',
                'SessionCookieName' => '<string>',
                'SessionTimeout' => <integer>,
                'UserPoolArn' => '<string>', // REQUIRED
                'UserPoolClientId' => '<string>', // REQUIRED
                'UserPoolDomain' => '<string>', // REQUIRED
            ],
            'AuthenticateOidcConfig' => [
                'AuthenticationRequestExtraParams' => ['<string>', ...],
                'AuthorizationEndpoint' => '<string>', // REQUIRED
                'ClientId' => '<string>', // REQUIRED
                'ClientSecret' => '<string>',
                'Issuer' => '<string>', // REQUIRED
                'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                'Scope' => '<string>',
                'SessionCookieName' => '<string>',
                'SessionTimeout' => <integer>,
                'TokenEndpoint' => '<string>', // REQUIRED
                'UseExistingClientSecret' => true || false,
                'UserInfoEndpoint' => '<string>', // REQUIRED
            ],
            'FixedResponseConfig' => [
                'ContentType' => '<string>',
                'MessageBody' => '<string>',
                'StatusCode' => '<string>', // REQUIRED
            ],
            'ForwardConfig' => [
                'TargetGroupStickinessConfig' => [
                    'DurationSeconds' => <integer>,
                    'Enabled' => true || false,
                ],
                'TargetGroups' => [
                    [
                        'TargetGroupArn' => '<string>',
                        'Weight' => <integer>,
                    ],
                    // ...
                ],
            ],
            'Order' => <integer>,
            'RedirectConfig' => [
                'Host' => '<string>',
                'Path' => '<string>',
                'Port' => '<string>',
                'Protocol' => '<string>',
                'Query' => '<string>',
                'StatusCode' => 'HTTP_301|HTTP_302', // REQUIRED
            ],
            'TargetGroupArn' => '<string>',
            'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response', // REQUIRED
        ],
        // ...
    ],
    'Conditions' => [ // REQUIRED
        [
            'Field' => '<string>',
            'HostHeaderConfig' => [
                'Values' => ['<string>', ...],
            ],
            'HttpHeaderConfig' => [
                'HttpHeaderName' => '<string>',
                'Values' => ['<string>', ...],
            ],
            'HttpRequestMethodConfig' => [
                'Values' => ['<string>', ...],
            ],
            'PathPatternConfig' => [
                'Values' => ['<string>', ...],
            ],
            'QueryStringConfig' => [
                'Values' => [
                    [
                        'Key' => '<string>',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
            ],
            'SourceIpConfig' => [
                'Values' => ['<string>', ...],
            ],
            'Values' => ['<string>', ...],
        ],
        // ...
    ],
    'ListenerArn' => '<string>', // REQUIRED
    'Priority' => <integer>, // REQUIRED
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
Actions
Required: Yes
Type: Array of Action structures

The actions.

Conditions
Required: Yes
Type: Array of RuleCondition structures

The conditions.

ListenerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the listener.

Priority
Required: Yes
Type: int

The rule priority. A listener can't have multiple rules with the same priority.

Tags
Type: Array of Tag structures

The tags to assign to the rule.

Result Syntax

[
    'Rules' => [
        [
            'Actions' => [
                [
                    'AuthenticateCognitoConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'UserPoolArn' => '<string>',
                        'UserPoolClientId' => '<string>',
                        'UserPoolDomain' => '<string>',
                    ],
                    'AuthenticateOidcConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'AuthorizationEndpoint' => '<string>',
                        'ClientId' => '<string>',
                        'ClientSecret' => '<string>',
                        'Issuer' => '<string>',
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'TokenEndpoint' => '<string>',
                        'UseExistingClientSecret' => true || false,
                        'UserInfoEndpoint' => '<string>',
                    ],
                    'FixedResponseConfig' => [
                        'ContentType' => '<string>',
                        'MessageBody' => '<string>',
                        'StatusCode' => '<string>',
                    ],
                    'ForwardConfig' => [
                        'TargetGroupStickinessConfig' => [
                            'DurationSeconds' => <integer>,
                            'Enabled' => true || false,
                        ],
                        'TargetGroups' => [
                            [
                                'TargetGroupArn' => '<string>',
                                'Weight' => <integer>,
                            ],
                            // ...
                        ],
                    ],
                    'Order' => <integer>,
                    'RedirectConfig' => [
                        'Host' => '<string>',
                        'Path' => '<string>',
                        'Port' => '<string>',
                        'Protocol' => '<string>',
                        'Query' => '<string>',
                        'StatusCode' => 'HTTP_301|HTTP_302',
                    ],
                    'TargetGroupArn' => '<string>',
                    'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response',
                ],
                // ...
            ],
            'Conditions' => [
                [
                    'Field' => '<string>',
                    'HostHeaderConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'HttpHeaderConfig' => [
                        'HttpHeaderName' => '<string>',
                        'Values' => ['<string>', ...],
                    ],
                    'HttpRequestMethodConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'PathPatternConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'QueryStringConfig' => [
                        'Values' => [
                            [
                                'Key' => '<string>',
                                'Value' => '<string>',
                            ],
                            // ...
                        ],
                    ],
                    'SourceIpConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'Values' => ['<string>', ...],
                ],
                // ...
            ],
            'IsDefault' => true || false,
            'Priority' => '<string>',
            'RuleArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Rules
Type: Array of Rule structures

Information about the rule.

Errors

PriorityInUseException:

The specified priority is in use.

TooManyTargetGroupsException:

You've reached the limit on the number of target groups for your Amazon Web Services account.

TooManyRulesException:

You've reached the limit on the number of rules per load balancer.

TargetGroupAssociationLimitException:

You've reached the limit on the number of load balancers per target group.

IncompatibleProtocolsException:

The specified configuration is not valid with this protocol.

ListenerNotFoundException:

The specified listener does not exist.

TargetGroupNotFoundException:

The specified target group does not exist.

InvalidConfigurationRequestException:

The requested configuration is not valid.

TooManyRegistrationsForTargetIdException:

You've reached the limit on the number of times a target can be registered with a load balancer.

TooManyTargetsException:

You've reached the limit on the number of targets.

UnsupportedProtocolException:

The specified protocol is not supported.

TooManyActionsException:

You've reached the limit on the number of actions per rule.

InvalidLoadBalancerActionException:

The requested action is not valid.

TooManyUniqueTargetGroupsPerLoadBalancerException:

You've reached the limit on the number of unique target groups per load balancer across all listeners. If a target group is used by multiple actions for a load balancer, it is counted as only one use.

TooManyTagsException:

You've reached the limit on the number of tags for this resource.

Examples

Example 1: To create a rule

This example creates a rule that forwards requests to the specified target group if the URL contains the specified pattern (for example, /img/*).

$result = $client->createRule([
    'Actions' => [
        [
            'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
            'Type' => 'forward',
        ],
    ],
    'Conditions' => [
        [
            'Field' => 'path-pattern',
            'Values' => [
                '/img/*',
            ],
        ],
    ],
    'ListenerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2',
    'Priority' => 10,
]);

Result syntax:

[
    'Rules' => [
        [
            'Actions' => [
                [
                    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
                    'Type' => 'forward',
                ],
            ],
            'Conditions' => [
                [
                    'Field' => 'path-pattern',
                    'Values' => [
                        '/img/*',
                    ],
                ],
            ],
            'IsDefault' => ,
            'Priority' => '10',
            'RuleArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee',
        ],
    ],
]

CreateTargetGroup

$result = $client->createTargetGroup([/* ... */]);
$promise = $client->createTargetGroupAsync([/* ... */]);

Creates a target group.

For more information, see the following:

This operation is idempotent, which means that it completes at most one time. If you attempt to create multiple target groups with the same settings, each call succeeds.

Parameter Syntax

$result = $client->createTargetGroup([
    'HealthCheckEnabled' => true || false,
    'HealthCheckIntervalSeconds' => <integer>,
    'HealthCheckPath' => '<string>',
    'HealthCheckPort' => '<string>',
    'HealthCheckProtocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
    'HealthCheckTimeoutSeconds' => <integer>,
    'HealthyThresholdCount' => <integer>,
    'IpAddressType' => 'ipv4|ipv6',
    'Matcher' => [
        'GrpcCode' => '<string>',
        'HttpCode' => '<string>',
    ],
    'Name' => '<string>', // REQUIRED
    'Port' => <integer>,
    'Protocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
    'ProtocolVersion' => '<string>',
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
    'TargetType' => 'instance|ip|lambda|alb',
    'UnhealthyThresholdCount' => <integer>,
    'VpcId' => '<string>',
]);

Parameter Details

Members
HealthCheckEnabled
Type: boolean

Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.

HealthCheckIntervalSeconds
Type: int

The approximate amount of time, in seconds, between health checks of an individual target. The range is 5-300. If the target group protocol is TCP, TLS, UDP, TCP_UDP, HTTP or HTTPS, the default is 30 seconds. If the target group protocol is GENEVE, the default is 10 seconds. If the target type is lambda, the default is 35 seconds.

HealthCheckPath
Type: string

[HTTP/HTTPS health checks] The destination for health checks on the targets.

[HTTP1 or HTTP2 protocol version] The ping path. The default is /.

[GRPC protocol version] The path of a custom health check method with the format /package.service/method. The default is /Amazon Web Services.ALB/healthcheck.

HealthCheckPort
Type: string

The port the load balancer uses when performing health checks on targets. If the protocol is HTTP, HTTPS, TCP, TLS, UDP, or TCP_UDP, the default is traffic-port, which is the port on which each target receives traffic from the load balancer. If the protocol is GENEVE, the default is port 80.

HealthCheckProtocol
Type: string

The protocol the load balancer uses when performing health checks on targets. For Application Load Balancers, the default is HTTP. For Network Load Balancers and Gateway Load Balancers, the default is TCP. The TCP protocol is not supported for health checks if the protocol of the target group is HTTP or HTTPS. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.

HealthCheckTimeoutSeconds
Type: int

The amount of time, in seconds, during which no response from a target means a failed health check. The range is 2–120 seconds. For target groups with a protocol of HTTP, the default is 6 seconds. For target groups with a protocol of TCP, TLS or HTTPS, the default is 10 seconds. For target groups with a protocol of GENEVE, the default is 5 seconds. If the target type is lambda, the default is 30 seconds.

HealthyThresholdCount
Type: int

The number of consecutive health check successes required before considering a target healthy. The range is 2-10. If the target group protocol is TCP, TCP_UDP, UDP, TLS, HTTP or HTTPS, the default is 5. For target groups with a protocol of GENEVE, the default is 5. If the target type is lambda, the default is 5.

IpAddressType
Type: string

The type of IP address used for this target group. The possible values are ipv4 and ipv6. This is an optional parameter. If not specified, the IP address type defaults to ipv4.

Matcher
Type: Matcher structure

[HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target. For target groups with a protocol of TCP, TCP_UDP, UDP or TLS the range is 200-599. For target groups with a protocol of HTTP or HTTPS, the range is 200-499. For target groups with a protocol of GENEVE, the range is 200-399.

Name
Required: Yes
Type: string

The name of the target group.

This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.

Port
Type: int

The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply. If the protocol is GENEVE, the supported port is 6081.

Protocol
Type: string

The protocol to use for routing traffic to the targets. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, or TCP_UDP. For Gateway Load Balancers, the supported protocol is GENEVE. A TCP_UDP listener must be associated with a TCP_UDP target group. If the target is a Lambda function, this parameter does not apply.

ProtocolVersion
Type: string

[HTTP/HTTPS protocol] The protocol version. Specify GRPC to send requests to targets using gRPC. Specify HTTP2 to send requests to targets using HTTP/2. The default is HTTP1, which sends requests to targets using HTTP/1.1.

Tags
Type: Array of Tag structures

The tags to assign to the target group.

TargetType
Type: string

The type of target that you must specify when registering targets with this target group. You can't specify targets for a target group using more than one target type.

  • instance - Register targets by instance ID. This is the default value.

  • ip - Register targets by IP address. You can specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.

  • lambda - Register a single Lambda function as a target.

  • alb - Register a single Application Load Balancer as a target.

UnhealthyThresholdCount
Type: int

The number of consecutive health check failures required before considering a target unhealthy. The range is 2-10. If the target group protocol is TCP, TCP_UDP, UDP, TLS, HTTP or HTTPS, the default is 2. For target groups with a protocol of GENEVE, the default is 2. If the target type is lambda, the default is 5.

VpcId
Type: string

The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply. Otherwise, this parameter is required.

Result Syntax

[
    'TargetGroups' => [
        [
            'HealthCheckEnabled' => true || false,
            'HealthCheckIntervalSeconds' => <integer>,
            'HealthCheckPath' => '<string>',
            'HealthCheckPort' => '<string>',
            'HealthCheckProtocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
            'HealthCheckTimeoutSeconds' => <integer>,
            'HealthyThresholdCount' => <integer>,
            'IpAddressType' => 'ipv4|ipv6',
            'LoadBalancerArns' => ['<string>', ...],
            'Matcher' => [
                'GrpcCode' => '<string>',
                'HttpCode' => '<string>',
            ],
            'Port' => <integer>,
            'Protocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
            'ProtocolVersion' => '<string>',
            'TargetGroupArn' => '<string>',
            'TargetGroupName' => '<string>',
            'TargetType' => 'instance|ip|lambda|alb',
            'UnhealthyThresholdCount' => <integer>,
            'VpcId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
TargetGroups
Type: Array of TargetGroup structures

Information about the target group.

Errors

DuplicateTargetGroupNameException:

A target group with the specified name already exists.

TooManyTargetGroupsException:

You've reached the limit on the number of target groups for your Amazon Web Services account.

InvalidConfigurationRequestException:

The requested configuration is not valid.

TooManyTagsException:

You've reached the limit on the number of tags for this resource.

Examples

Example 1: To create a target group

This example creates a target group that you can use to route traffic to targets using HTTP on port 80. This target group uses the default health check configuration.

$result = $client->createTargetGroup([
    'Name' => 'my-targets',
    'Port' => 80,
    'Protocol' => 'HTTP',
    'VpcId' => 'vpc-3ac0fb5f',
]);

Result syntax:

[
    'TargetGroups' => [
        [
            'HealthCheckIntervalSeconds' => 30,
            'HealthCheckPath' => '/',
            'HealthCheckPort' => 'traffic-port',
            'HealthCheckProtocol' => 'HTTP',
            'HealthCheckTimeoutSeconds' => 5,
            'HealthyThresholdCount' => 5,
            'Matcher' => [
                'HttpCode' => '200',
            ],
            'Port' => 80,
            'Protocol' => 'HTTP',
            'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
            'TargetGroupName' => 'my-targets',
            'UnhealthyThresholdCount' => 2,
            'VpcId' => 'vpc-3ac0fb5f',
        ],
    ],
]

CreateTrustStore

$result = $client->createTrustStore([/* ... */]);
$promise = $client->createTrustStoreAsync([/* ... */]);

Creates a trust store.

Parameter Syntax

$result = $client->createTrustStore([
    'CaCertificatesBundleS3Bucket' => '<string>', // REQUIRED
    'CaCertificatesBundleS3Key' => '<string>', // REQUIRED
    'CaCertificatesBundleS3ObjectVersion' => '<string>',
    'Name' => '<string>', // REQUIRED
    'Tags' => [
        [
            'Key' => '<string>', // REQUIRED
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
CaCertificatesBundleS3Bucket
Required: Yes
Type: string

The Amazon S3 bucket for the ca certificates bundle.

CaCertificatesBundleS3Key
Required: Yes
Type: string

The Amazon S3 path for the ca certificates bundle.

CaCertificatesBundleS3ObjectVersion
Type: string

The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.

Name
Required: Yes
Type: string

The name of the trust store.

This name must be unique per region and cannot be changed after creation.

Tags
Type: Array of Tag structures

The tags to assign to the trust store.

Result Syntax

[
    'TrustStores' => [
        [
            'Name' => '<string>',
            'NumberOfCaCertificates' => <integer>,
            'Status' => 'ACTIVE|CREATING',
            'TotalRevokedEntries' => <integer>,
            'TrustStoreArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
TrustStores
Type: Array of TrustStore structures

Information about the trust store created.

Errors

DuplicateTrustStoreNameException:

A trust store with the specified name already exists.

TooManyTrustStoresException:

You've reached the limit on the number of trust stores for your Amazon Web Services account.

InvalidCaCertificatesBundleException:

The specified ca certificate bundle is in an invalid format, or corrupt.

CaCertificatesBundleNotFoundException:

The specified ca certificate bundle does not exist.

TooManyTagsException:

You've reached the limit on the number of tags for this resource.

DuplicateTagKeysException:

A tag key was specified more than once.

DeleteListener

$result = $client->deleteListener([/* ... */]);
$promise = $client->deleteListenerAsync([/* ... */]);

Deletes the specified listener.

Alternatively, your listener is deleted when you delete the load balancer to which it is attached.

Parameter Syntax

$result = $client->deleteListener([
    'ListenerArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
ListenerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the listener.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ListenerNotFoundException:

The specified listener does not exist.

ResourceInUseException:

A specified resource is in use.

Examples

Example 1: To delete a listener

This example deletes the specified listener.

$result = $client->deleteListener([
    'ListenerArn' => 'arn:aws:elasticloadbalancing:ua-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2',
]);

DeleteLoadBalancer

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

Deletes the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer. Deleting a load balancer also deletes its listeners.

You can't delete a load balancer if deletion protection is enabled. If the load balancer does not exist or has already been deleted, the call succeeds.

Deleting a load balancer does not affect its registered targets. For example, your EC2 instances continue to run and are still registered to their target groups. If you no longer need these EC2 instances, you can stop or terminate them.

Parameter Syntax

$result = $client->deleteLoadBalancer([
    'LoadBalancerArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
LoadBalancerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the load balancer.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

OperationNotPermittedException:

This operation is not allowed.

ResourceInUseException:

A specified resource is in use.

Examples

Example 1: To delete a load balancer

This example deletes the specified load balancer.

$result = $client->deleteLoadBalancer([
    'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
]);

DeleteRule

$result = $client->deleteRule([/* ... */]);
$promise = $client->deleteRuleAsync([/* ... */]);

Deletes the specified rule.

You can't delete the default rule.

Parameter Syntax

$result = $client->deleteRule([
    'RuleArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
RuleArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the rule.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

RuleNotFoundException:

The specified rule does not exist.

OperationNotPermittedException:

This operation is not allowed.

Examples

Example 1: To delete a rule

This example deletes the specified rule.

$result = $client->deleteRule([
    'RuleArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3',
]);

DeleteSharedTrustStoreAssociation

$result = $client->deleteSharedTrustStoreAssociation([/* ... */]);
$promise = $client->deleteSharedTrustStoreAssociationAsync([/* ... */]);

Deletes a shared trust store association.

Parameter Syntax

$result = $client->deleteSharedTrustStoreAssociation([
    'ResourceArn' => '<string>', // REQUIRED
    'TrustStoreArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource.

TrustStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

DeleteAssociationSameAccountException:

The specified association cannot be within the same account.

TrustStoreAssociationNotFoundException:

The specified association does not exist.

Examples

Example 1: Delete a shared trust store association

This example deletes the association between the specified trust store and the specified load balancer.

$result = $client->deleteSharedTrustStoreAssociation([
    'ResourceArn' => 'arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/my-load-balancer/80233fa81d678c2c',
    'TrustStoreArn' => 'arn:aws:elasticloadbalancing:us-east-1:123456789012:truststore/my-trust-store/73e2d6bc24d8a063',
]);

DeleteTargetGroup

$result = $client->deleteTargetGroup([/* ... */]);
$promise = $client->deleteTargetGroupAsync([/* ... */]);

Deletes the specified target group.

You can delete a target group if it is not referenced by any actions. Deleting a target group also deletes any associated health checks. Deleting a target group does not affect its registered targets. For example, any EC2 instances continue to run until you stop or terminate them.

Parameter Syntax

$result = $client->deleteTargetGroup([
    'TargetGroupArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
TargetGroupArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the target group.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceInUseException:

A specified resource is in use.

Examples

Example 1: To delete a target group

This example deletes the specified target group.

$result = $client->deleteTargetGroup([
    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
]);

DeleteTrustStore

$result = $client->deleteTrustStore([/* ... */]);
$promise = $client->deleteTrustStoreAsync([/* ... */]);

Deletes a trust store.

Parameter Syntax

$result = $client->deleteTrustStore([
    'TrustStoreArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
TrustStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

TrustStoreInUseException:

The specified trust store is currently in use.

DeregisterTargets

$result = $client->deregisterTargets([/* ... */]);
$promise = $client->deregisterTargetsAsync([/* ... */]);

Deregisters the specified targets from the specified target group. After the targets are deregistered, they no longer receive traffic from the load balancer.

The load balancer stops sending requests to targets that are deregistering, but uses connection draining to ensure that in-flight traffic completes on the existing connections. This deregistration delay is configured by default but can be updated for each target group.

For more information, see the following:

Note: If the specified target does not exist, the action returns successfully.

Parameter Syntax

$result = $client->deregisterTargets([
    'TargetGroupArn' => '<string>', // REQUIRED
    'Targets' => [ // REQUIRED
        [
            'AvailabilityZone' => '<string>',
            'Id' => '<string>', // REQUIRED
            'Port' => <integer>,
        ],
        // ...
    ],
]);

Parameter Details

Members
TargetGroupArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the target group.

Targets
Required: Yes
Type: Array of TargetDescription structures

The targets. If you specified a port override when you registered a target, you must specify both the target ID and the port when you deregister it.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

TargetGroupNotFoundException:

The specified target group does not exist.

InvalidTargetException:

The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.

Examples

Example 1: To deregister a target from a target group

This example deregisters the specified instance from the specified target group.

$result = $client->deregisterTargets([
    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
    'Targets' => [
        [
            'Id' => 'i-0f76fade',
        ],
    ],
]);

DescribeAccountLimits

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

Describes the current Elastic Load Balancing resource limits for your Amazon Web Services account.

For more information, see the following:

Parameter Syntax

$result = $client->describeAccountLimits([
    'Marker' => '<string>',
    'PageSize' => <integer>,
]);

Parameter Details

Members
Marker
Type: string

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

PageSize
Type: int

The maximum number of results to return with this call.

Result Syntax

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

Result Details

Members
Limits
Type: Array of Limit structures

Information about the limits.

NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

Errors

There are no errors described for this operation.

DescribeListenerAttributes

$result = $client->describeListenerAttributes([/* ... */]);
$promise = $client->describeListenerAttributesAsync([/* ... */]);

Describes the attributes for the specified listener.

Parameter Syntax

$result = $client->describeListenerAttributes([
    'ListenerArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
ListenerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the listener.

Result Syntax

[
    'Attributes' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Attributes
Type: Array of ListenerAttribute structures

Information about the listener attributes.

Errors

ListenerNotFoundException:

The specified listener does not exist.

Examples

Example 1: Describe listener attributes

This example describes the attributes of the specified listener.

$result = $client->describeListenerAttributes([
    'ListenerArn' => 'aws:elasticloadbalancing:us-east-1:123456789012:listener/net/my-listener/73e2d6bc24d8a067/d5dc06411fa5bcea',
]);

Result syntax:

[
]

DescribeListenerCertificates

$result = $client->describeListenerCertificates([/* ... */]);
$promise = $client->describeListenerCertificatesAsync([/* ... */]);

Describes the default certificate and the certificate list for the specified HTTPS or TLS listener.

If the default certificate is also in the certificate list, it appears twice in the results (once with IsDefault set to true and once with IsDefault set to false).

For more information, see SSL certificates in the Application Load Balancers Guide or Server certificates in the Network Load Balancers Guide.

Parameter Syntax

$result = $client->describeListenerCertificates([
    'ListenerArn' => '<string>', // REQUIRED
    'Marker' => '<string>',
    'PageSize' => <integer>,
]);

Parameter Details

Members
ListenerArn
Required: Yes
Type: string

The Amazon Resource Names (ARN) of the listener.

Marker
Type: string

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

PageSize
Type: int

The maximum number of results to return with this call.

Result Syntax

[
    'Certificates' => [
        [
            'CertificateArn' => '<string>',
            'IsDefault' => true || false,
        ],
        // ...
    ],
    'NextMarker' => '<string>',
]

Result Details

Members
Certificates
Type: Array of Certificate structures

Information about the certificates.

NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

Errors

ListenerNotFoundException:

The specified listener does not exist.

DescribeListeners

$result = $client->describeListeners([/* ... */]);
$promise = $client->describeListenersAsync([/* ... */]);

Describes the specified listeners or the listeners for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer. You must specify either a load balancer or one or more listeners.

Parameter Syntax

$result = $client->describeListeners([
    'ListenerArns' => ['<string>', ...],
    'LoadBalancerArn' => '<string>',
    'Marker' => '<string>',
    'PageSize' => <integer>,
]);

Parameter Details

Members
ListenerArns
Type: Array of strings

The Amazon Resource Names (ARN) of the listeners.

LoadBalancerArn
Type: string

The Amazon Resource Name (ARN) of the load balancer.

Marker
Type: string

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

PageSize
Type: int

The maximum number of results to return with this call.

Result Syntax

[
    'Listeners' => [
        [
            'AlpnPolicy' => ['<string>', ...],
            'Certificates' => [
                [
                    'CertificateArn' => '<string>',
                    'IsDefault' => true || false,
                ],
                // ...
            ],
            'DefaultActions' => [
                [
                    'AuthenticateCognitoConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'UserPoolArn' => '<string>',
                        'UserPoolClientId' => '<string>',
                        'UserPoolDomain' => '<string>',
                    ],
                    'AuthenticateOidcConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'AuthorizationEndpoint' => '<string>',
                        'ClientId' => '<string>',
                        'ClientSecret' => '<string>',
                        'Issuer' => '<string>',
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'TokenEndpoint' => '<string>',
                        'UseExistingClientSecret' => true || false,
                        'UserInfoEndpoint' => '<string>',
                    ],
                    'FixedResponseConfig' => [
                        'ContentType' => '<string>',
                        'MessageBody' => '<string>',
                        'StatusCode' => '<string>',
                    ],
                    'ForwardConfig' => [
                        'TargetGroupStickinessConfig' => [
                            'DurationSeconds' => <integer>,
                            'Enabled' => true || false,
                        ],
                        'TargetGroups' => [
                            [
                                'TargetGroupArn' => '<string>',
                                'Weight' => <integer>,
                            ],
                            // ...
                        ],
                    ],
                    'Order' => <integer>,
                    'RedirectConfig' => [
                        'Host' => '<string>',
                        'Path' => '<string>',
                        'Port' => '<string>',
                        'Protocol' => '<string>',
                        'Query' => '<string>',
                        'StatusCode' => 'HTTP_301|HTTP_302',
                    ],
                    'TargetGroupArn' => '<string>',
                    'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response',
                ],
                // ...
            ],
            'ListenerArn' => '<string>',
            'LoadBalancerArn' => '<string>',
            'MutualAuthentication' => [
                'IgnoreClientCertificateExpiry' => true || false,
                'Mode' => '<string>',
                'TrustStoreArn' => '<string>',
                'TrustStoreAssociationStatus' => 'active|removed',
            ],
            'Port' => <integer>,
            'Protocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
            'SslPolicy' => '<string>',
        ],
        // ...
    ],
    'NextMarker' => '<string>',
]

Result Details

Members
Listeners
Type: Array of Listener structures

Information about the listeners.

NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

Errors

ListenerNotFoundException:

The specified listener does not exist.

LoadBalancerNotFoundException:

The specified load balancer does not exist.

UnsupportedProtocolException:

The specified protocol is not supported.

Examples

Example 1: To describe a listener

This example describes the specified listener.

$result = $client->describeListeners([
    'ListenerArns' => [
        'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2',
    ],
]);

Result syntax:

[
    'Listeners' => [
        [
            'DefaultActions' => [
                [
                    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
                    'Type' => 'forward',
                ],
            ],
            'ListenerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2',
            'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            'Port' => 80,
            'Protocol' => 'HTTP',
        ],
    ],
]

DescribeLoadBalancerAttributes

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

Describes the attributes for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.

For more information, see the following:

Parameter Syntax

$result = $client->describeLoadBalancerAttributes([
    'LoadBalancerArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
LoadBalancerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the load balancer.

Result Syntax

[
    'Attributes' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Attributes
Type: Array of LoadBalancerAttribute structures

Information about the load balancer attributes.

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

Examples

Example 1: To describe load balancer attributes

This example describes the attributes of the specified load balancer.

$result = $client->describeLoadBalancerAttributes([
    'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
]);

Result syntax:

[
    'Attributes' => [
        [
            'Key' => 'access_logs.s3.enabled',
            'Value' => 'false',
        ],
        [
            'Key' => 'idle_timeout.timeout_seconds',
            'Value' => '60',
        ],
        [
            'Key' => 'access_logs.s3.prefix',
            'Value' => '',
        ],
        [
            'Key' => 'deletion_protection.enabled',
            'Value' => 'false',
        ],
        [
            'Key' => 'access_logs.s3.bucket',
            'Value' => '',
        ],
    ],
]

DescribeLoadBalancers

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

Describes the specified load balancers or all of your load balancers.

Parameter Syntax

$result = $client->describeLoadBalancers([
    'LoadBalancerArns' => ['<string>', ...],
    'Marker' => '<string>',
    'Names' => ['<string>', ...],
    'PageSize' => <integer>,
]);

Parameter Details

Members
LoadBalancerArns
Type: Array of strings

The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call.

Marker
Type: string

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

Names
Type: Array of strings

The names of the load balancers.

PageSize
Type: int

The maximum number of results to return with this call.

Result Syntax

[
    'LoadBalancers' => [
        [
            'AvailabilityZones' => [
                [
                    'LoadBalancerAddresses' => [
                        [
                            'AllocationId' => '<string>',
                            'IPv6Address' => '<string>',
                            'IpAddress' => '<string>',
                            'PrivateIPv4Address' => '<string>',
                        ],
                        // ...
                    ],
                    'OutpostId' => '<string>',
                    'SubnetId' => '<string>',
                    'ZoneName' => '<string>',
                ],
                // ...
            ],
            'CanonicalHostedZoneId' => '<string>',
            'CreatedTime' => <DateTime>,
            'CustomerOwnedIpv4Pool' => '<string>',
            'DNSName' => '<string>',
            'EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic' => '<string>',
            'IpAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
            'LoadBalancerArn' => '<string>',
            'LoadBalancerName' => '<string>',
            'Scheme' => 'internet-facing|internal',
            'SecurityGroups' => ['<string>', ...],
            'State' => [
                'Code' => 'active|provisioning|active_impaired|failed',
                'Reason' => '<string>',
            ],
            'Type' => 'application|network|gateway',
            'VpcId' => '<string>',
        ],
        // ...
    ],
    'NextMarker' => '<string>',
]

Result Details

Members
LoadBalancers
Type: Array of LoadBalancer structures

Information about the load balancers.

NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

Examples

Example 1: To describe a load balancer

This example describes the specified load balancer.

$result = $client->describeLoadBalancers([
    'LoadBalancerArns' => [
        'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
    ],
]);

Result syntax:

[
    'LoadBalancers' => [
        [
            'AvailabilityZones' => [
                [
                    'SubnetId' => 'subnet-8360a9e7',
                    'ZoneName' => 'us-west-2a',
                ],
                [
                    'SubnetId' => 'subnet-b7d581c0',
                    'ZoneName' => 'us-west-2b',
                ],
            ],
            'CanonicalHostedZoneId' => 'Z2P70J7EXAMPLE',
            'CreatedTime' => ,
            'DNSName' => 'my-load-balancer-424835706.us-west-2.elb.amazonaws.com',
            'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            'LoadBalancerName' => 'my-load-balancer',
            'Scheme' => 'internet-facing',
            'SecurityGroups' => [
                'sg-5943793c',
            ],
            'State' => [
                'Code' => 'active',
            ],
            'Type' => 'application',
            'VpcId' => 'vpc-3ac0fb5f',
        ],
    ],
]

DescribeRules

$result = $client->describeRules([/* ... */]);
$promise = $client->describeRulesAsync([/* ... */]);

Describes the specified rules or the rules for the specified listener. You must specify either a listener or one or more rules.

Parameter Syntax

$result = $client->describeRules([
    'ListenerArn' => '<string>',
    'Marker' => '<string>',
    'PageSize' => <integer>,
    'RuleArns' => ['<string>', ...],
]);

Parameter Details

Members
ListenerArn
Type: string

The Amazon Resource Name (ARN) of the listener.

Marker
Type: string

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

PageSize
Type: int

The maximum number of results to return with this call.

RuleArns
Type: Array of strings

The Amazon Resource Names (ARN) of the rules.

Result Syntax

[
    'NextMarker' => '<string>',
    'Rules' => [
        [
            'Actions' => [
                [
                    'AuthenticateCognitoConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'UserPoolArn' => '<string>',
                        'UserPoolClientId' => '<string>',
                        'UserPoolDomain' => '<string>',
                    ],
                    'AuthenticateOidcConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'AuthorizationEndpoint' => '<string>',
                        'ClientId' => '<string>',
                        'ClientSecret' => '<string>',
                        'Issuer' => '<string>',
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'TokenEndpoint' => '<string>',
                        'UseExistingClientSecret' => true || false,
                        'UserInfoEndpoint' => '<string>',
                    ],
                    'FixedResponseConfig' => [
                        'ContentType' => '<string>',
                        'MessageBody' => '<string>',
                        'StatusCode' => '<string>',
                    ],
                    'ForwardConfig' => [
                        'TargetGroupStickinessConfig' => [
                            'DurationSeconds' => <integer>,
                            'Enabled' => true || false,
                        ],
                        'TargetGroups' => [
                            [
                                'TargetGroupArn' => '<string>',
                                'Weight' => <integer>,
                            ],
                            // ...
                        ],
                    ],
                    'Order' => <integer>,
                    'RedirectConfig' => [
                        'Host' => '<string>',
                        'Path' => '<string>',
                        'Port' => '<string>',
                        'Protocol' => '<string>',
                        'Query' => '<string>',
                        'StatusCode' => 'HTTP_301|HTTP_302',
                    ],
                    'TargetGroupArn' => '<string>',
                    'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response',
                ],
                // ...
            ],
            'Conditions' => [
                [
                    'Field' => '<string>',
                    'HostHeaderConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'HttpHeaderConfig' => [
                        'HttpHeaderName' => '<string>',
                        'Values' => ['<string>', ...],
                    ],
                    'HttpRequestMethodConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'PathPatternConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'QueryStringConfig' => [
                        'Values' => [
                            [
                                'Key' => '<string>',
                                'Value' => '<string>',
                            ],
                            // ...
                        ],
                    ],
                    'SourceIpConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'Values' => ['<string>', ...],
                ],
                // ...
            ],
            'IsDefault' => true || false,
            'Priority' => '<string>',
            'RuleArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

Rules
Type: Array of Rule structures

Information about the rules.

Errors

ListenerNotFoundException:

The specified listener does not exist.

RuleNotFoundException:

The specified rule does not exist.

UnsupportedProtocolException:

The specified protocol is not supported.

Examples

Example 1: To describe a rule

This example describes the specified rule.

$result = $client->describeRules([
    'RuleArns' => [
        'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee',
    ],
]);

Result syntax:

[
    'Rules' => [
        [
            'Actions' => [
                [
                    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
                    'Type' => 'forward',
                ],
            ],
            'Conditions' => [
                [
                    'Field' => 'path-pattern',
                    'Values' => [
                        '/img/*',
                    ],
                ],
            ],
            'IsDefault' => ,
            'Priority' => '10',
            'RuleArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee',
        ],
    ],
]

DescribeSSLPolicies

$result = $client->describeSSLPolicies([/* ... */]);
$promise = $client->describeSSLPoliciesAsync([/* ... */]);

Describes the specified policies or all policies used for SSL negotiation.

For more information, see Security policies in the Application Load Balancers Guide or Security policies in the Network Load Balancers Guide.

Parameter Syntax

$result = $client->describeSSLPolicies([
    'LoadBalancerType' => 'application|network|gateway',
    'Marker' => '<string>',
    'Names' => ['<string>', ...],
    'PageSize' => <integer>,
]);

Parameter Details

Members
LoadBalancerType
Type: string

The type of load balancer. The default lists the SSL policies for all load balancers.

Marker
Type: string

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

Names
Type: Array of strings

The names of the policies.

PageSize
Type: int

The maximum number of results to return with this call.

Result Syntax

[
    'NextMarker' => '<string>',
    'SslPolicies' => [
        [
            'Ciphers' => [
                [
                    'Name' => '<string>',
                    'Priority' => <integer>,
                ],
                // ...
            ],
            'Name' => '<string>',
            'SslProtocols' => ['<string>', ...],
            'SupportedLoadBalancerTypes' => ['<string>', ...],
        ],
        // ...
    ],
]

Result Details

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

SslPolicies
Type: Array of SslPolicy structures

Information about the security policies.

Errors

SSLPolicyNotFoundException:

The specified SSL policy does not exist.

Examples

Example 1: To describe a policy used for SSL negotiation

This example describes the specified policy used for SSL negotiation.

$result = $client->describeSSLPolicies([
    'Names' => [
        'ELBSecurityPolicy-2015-05',
    ],
]);

Result syntax:

[
    'SslPolicies' => [
        [
            'Ciphers' => [
                [
                    'Name' => 'ECDHE-ECDSA-AES128-GCM-SHA256',
                    'Priority' => 1,
                ],
                [
                    'Name' => 'ECDHE-RSA-AES128-GCM-SHA256',
                    'Priority' => 2,
                ],
                [
                    'Name' => 'ECDHE-ECDSA-AES128-SHA256',
                    'Priority' => 3,
                ],
                [
                    'Name' => 'ECDHE-RSA-AES128-SHA256',
                    'Priority' => 4,
                ],
                [
                    'Name' => 'ECDHE-ECDSA-AES128-SHA',
                    'Priority' => 5,
                ],
                [
                    'Name' => 'ECDHE-RSA-AES128-SHA',
                    'Priority' => 6,
                ],
                [
                    'Name' => 'DHE-RSA-AES128-SHA',
                    'Priority' => 7,
                ],
                [
                    'Name' => 'ECDHE-ECDSA-AES256-GCM-SHA384',
                    'Priority' => 8,
                ],
                [
                    'Name' => 'ECDHE-RSA-AES256-GCM-SHA384',
                    'Priority' => 9,
                ],
                [
                    'Name' => 'ECDHE-ECDSA-AES256-SHA384',
                    'Priority' => 10,
                ],
                [
                    'Name' => 'ECDHE-RSA-AES256-SHA384',
                    'Priority' => 11,
                ],
                [
                    'Name' => 'ECDHE-RSA-AES256-SHA',
                    'Priority' => 12,
                ],
                [
                    'Name' => 'ECDHE-ECDSA-AES256-SHA',
                    'Priority' => 13,
                ],
                [
                    'Name' => 'AES128-GCM-SHA256',
                    'Priority' => 14,
                ],
                [
                    'Name' => 'AES128-SHA256',
                    'Priority' => 15,
                ],
                [
                    'Name' => 'AES128-SHA',
                    'Priority' => 16,
                ],
                [
                    'Name' => 'AES256-GCM-SHA384',
                    'Priority' => 17,
                ],
                [
                    'Name' => 'AES256-SHA256',
                    'Priority' => 18,
                ],
                [
                    'Name' => 'AES256-SHA',
                    'Priority' => 19,
                ],
            ],
            'Name' => 'ELBSecurityPolicy-2015-05',
            'SslProtocols' => [
                'TLSv1',
                'TLSv1.1',
                'TLSv1.2',
            ],
        ],
    ],
]

DescribeTags

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

Describes the tags for the specified Elastic Load Balancing resources. You can describe the tags for one or more Application Load Balancers, Network Load Balancers, Gateway Load Balancers, target groups, listeners, or rules.

Parameter Syntax

$result = $client->describeTags([
    'ResourceArns' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArns
Required: Yes
Type: Array of strings

The Amazon Resource Names (ARN) of the resources. You can specify up to 20 resources in a single call.

Result Syntax

[
    'TagDescriptions' => [
        [
            'ResourceArn' => '<string>',
            'Tags' => [
                [
                    'Key' => '<string>',
                    'Value' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
]

Result Details

Members
TagDescriptions
Type: Array of TagDescription structures

Information about the tags.

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

TargetGroupNotFoundException:

The specified target group does not exist.

ListenerNotFoundException:

The specified listener does not exist.

RuleNotFoundException:

The specified rule does not exist.

TrustStoreNotFoundException:

The specified trust store does not exist.

Examples

Example 1: To describe the tags assigned to a load balancer

This example describes the tags assigned to the specified load balancer.

$result = $client->describeTags([
    'ResourceArns' => [
        'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
    ],
]);

Result syntax:

[
    'TagDescriptions' => [
        [
            'ResourceArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            'Tags' => [
                [
                    'Key' => 'project',
                    'Value' => 'lima',
                ],
                [
                    'Key' => 'department',
                    'Value' => 'digital-media',
                ],
            ],
        ],
    ],
]

DescribeTargetGroupAttributes

$result = $client->describeTargetGroupAttributes([/* ... */]);
$promise = $client->describeTargetGroupAttributesAsync([/* ... */]);

Describes the attributes for the specified target group.

For more information, see the following:

Parameter Syntax

$result = $client->describeTargetGroupAttributes([
    'TargetGroupArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
TargetGroupArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the target group.

Result Syntax

[
    'Attributes' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Attributes
Type: Array of TargetGroupAttribute structures

Information about the target group attributes

Errors

TargetGroupNotFoundException:

The specified target group does not exist.

Examples

Example 1: To describe target group attributes

This example describes the attributes of the specified target group.

$result = $client->describeTargetGroupAttributes([
    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
]);

Result syntax:

[
    'Attributes' => [
        [
            'Key' => 'stickiness.enabled',
            'Value' => 'false',
        ],
        [
            'Key' => 'deregistration_delay.timeout_seconds',
            'Value' => '300',
        ],
        [
            'Key' => 'stickiness.type',
            'Value' => 'lb_cookie',
        ],
        [
            'Key' => 'stickiness.lb_cookie.duration_seconds',
            'Value' => '86400',
        ],
    ],
]

DescribeTargetGroups

$result = $client->describeTargetGroups([/* ... */]);
$promise = $client->describeTargetGroupsAsync([/* ... */]);

Describes the specified target groups or all of your target groups. By default, all target groups are described. Alternatively, you can specify one of the following to filter the results: the ARN of the load balancer, the names of one or more target groups, or the ARNs of one or more target groups.

Parameter Syntax

$result = $client->describeTargetGroups([
    'LoadBalancerArn' => '<string>',
    'Marker' => '<string>',
    'Names' => ['<string>', ...],
    'PageSize' => <integer>,
    'TargetGroupArns' => ['<string>', ...],
]);

Parameter Details

Members
LoadBalancerArn
Type: string

The Amazon Resource Name (ARN) of the load balancer.

Marker
Type: string

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

Names
Type: Array of strings

The names of the target groups.

PageSize
Type: int

The maximum number of results to return with this call.

TargetGroupArns
Type: Array of strings

The Amazon Resource Names (ARN) of the target groups.

Result Syntax

[
    'NextMarker' => '<string>',
    'TargetGroups' => [
        [
            'HealthCheckEnabled' => true || false,
            'HealthCheckIntervalSeconds' => <integer>,
            'HealthCheckPath' => '<string>',
            'HealthCheckPort' => '<string>',
            'HealthCheckProtocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
            'HealthCheckTimeoutSeconds' => <integer>,
            'HealthyThresholdCount' => <integer>,
            'IpAddressType' => 'ipv4|ipv6',
            'LoadBalancerArns' => ['<string>', ...],
            'Matcher' => [
                'GrpcCode' => '<string>',
                'HttpCode' => '<string>',
            ],
            'Port' => <integer>,
            'Protocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
            'ProtocolVersion' => '<string>',
            'TargetGroupArn' => '<string>',
            'TargetGroupName' => '<string>',
            'TargetType' => 'instance|ip|lambda|alb',
            'UnhealthyThresholdCount' => <integer>,
            'VpcId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

TargetGroups
Type: Array of TargetGroup structures

Information about the target groups.

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

TargetGroupNotFoundException:

The specified target group does not exist.

Examples

Example 1: To describe a target group

This example describes the specified target group.

$result = $client->describeTargetGroups([
    'TargetGroupArns' => [
        'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
    ],
]);

Result syntax:

[
    'TargetGroups' => [
        [
            'HealthCheckIntervalSeconds' => 30,
            'HealthCheckPath' => '/',
            'HealthCheckPort' => 'traffic-port',
            'HealthCheckProtocol' => 'HTTP',
            'HealthCheckTimeoutSeconds' => 5,
            'HealthyThresholdCount' => 5,
            'LoadBalancerArns' => [
                'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            ],
            'Matcher' => [
                'HttpCode' => '200',
            ],
            'Port' => 80,
            'Protocol' => 'HTTP',
            'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
            'TargetGroupName' => 'my-targets',
            'UnhealthyThresholdCount' => 2,
            'VpcId' => 'vpc-3ac0fb5f',
        ],
    ],
]

DescribeTargetHealth

$result = $client->describeTargetHealth([/* ... */]);
$promise = $client->describeTargetHealthAsync([/* ... */]);

Describes the health of the specified targets or all of your targets.

Parameter Syntax

$result = $client->describeTargetHealth([
    'Include' => ['<string>', ...],
    'TargetGroupArn' => '<string>', // REQUIRED
    'Targets' => [
        [
            'AvailabilityZone' => '<string>',
            'Id' => '<string>', // REQUIRED
            'Port' => <integer>,
        ],
        // ...
    ],
]);

Parameter Details

Members
Include
Type: Array of strings

Used to include anomaly detection information.

TargetGroupArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the target group.

Targets
Type: Array of TargetDescription structures

The targets.

Result Syntax

[
    'TargetHealthDescriptions' => [
        [
            'AnomalyDetection' => [
                'MitigationInEffect' => 'yes|no',
                'Result' => 'anomalous|normal',
            ],
            'HealthCheckPort' => '<string>',
            'Target' => [
                'AvailabilityZone' => '<string>',
                'Id' => '<string>',
                'Port' => <integer>,
            ],
            'TargetHealth' => [
                'Description' => '<string>',
                'Reason' => 'Elb.RegistrationInProgress|Elb.InitialHealthChecking|Target.ResponseCodeMismatch|Target.Timeout|Target.FailedHealthChecks|Target.NotRegistered|Target.NotInUse|Target.DeregistrationInProgress|Target.InvalidState|Target.IpUnusable|Target.HealthCheckDisabled|Elb.InternalError',
                'State' => 'initial|healthy|unhealthy|unhealthy.draining|unused|draining|unavailable',
            ],
        ],
        // ...
    ],
]

Result Details

Members
TargetHealthDescriptions
Type: Array of TargetHealthDescription structures

Information about the health of the targets.

Errors

InvalidTargetException:

The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.

TargetGroupNotFoundException:

The specified target group does not exist.

HealthUnavailableException:

The health of the specified targets could not be retrieved due to an internal error.

Examples

Example 1: To describe the health of the targets for a target group

This example describes the health of the targets for the specified target group. One target is healthy but the other is not specified in an action, so it can't receive traffic from the load balancer.

$result = $client->describeTargetHealth([
    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
]);

Result syntax:

[
    'TargetHealthDescriptions' => [
        [
            'Target' => [
                'Id' => 'i-0f76fade',
                'Port' => 80,
            ],
            'TargetHealth' => [
                'Description' => 'Given target group is not configured to receive traffic from ELB',
                'Reason' => 'Target.NotInUse',
                'State' => 'unused',
            ],
        ],
        [
            'HealthCheckPort' => '80',
            'Target' => [
                'Id' => 'i-0f76fade',
                'Port' => 80,
            ],
            'TargetHealth' => [
                'State' => 'healthy',
            ],
        ],
    ],
]
Example 2: To describe the health of a target

This example describes the health of the specified target. This target is healthy.

$result = $client->describeTargetHealth([
    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
    'Targets' => [
        [
            'Id' => 'i-0f76fade',
            'Port' => 80,
        ],
    ],
]);

Result syntax:

[
    'TargetHealthDescriptions' => [
        [
            'HealthCheckPort' => '80',
            'Target' => [
                'Id' => 'i-0f76fade',
                'Port' => 80,
            ],
            'TargetHealth' => [
                'State' => 'healthy',
            ],
        ],
    ],
]

DescribeTrustStoreAssociations

$result = $client->describeTrustStoreAssociations([/* ... */]);
$promise = $client->describeTrustStoreAssociationsAsync([/* ... */]);

Describes all resources associated with the specified trust store.

Parameter Syntax

$result = $client->describeTrustStoreAssociations([
    'Marker' => '<string>',
    'PageSize' => <integer>,
    'TrustStoreArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
Marker
Type: string

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

PageSize
Type: int

The maximum number of results to return with this call.

TrustStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[
    'NextMarker' => '<string>',
    'TrustStoreAssociations' => [
        [
            'ResourceArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

TrustStoreAssociations
Type: Array of TrustStoreAssociation structures

Information about the resources the trust store is associated to.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

DescribeTrustStoreRevocations

$result = $client->describeTrustStoreRevocations([/* ... */]);
$promise = $client->describeTrustStoreRevocationsAsync([/* ... */]);

Describes the revocation files in use by the specified trust store or revocation files.

Parameter Syntax

$result = $client->describeTrustStoreRevocations([
    'Marker' => '<string>',
    'PageSize' => <integer>,
    'RevocationIds' => [<integer>, ...],
    'TrustStoreArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
Marker
Type: string

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

PageSize
Type: int

The maximum number of results to return with this call.

RevocationIds
Type: Array of long (int|float)s

The revocation IDs of the revocation files you want to describe.

TrustStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[
    'NextMarker' => '<string>',
    'TrustStoreRevocations' => [
        [
            'NumberOfRevokedEntries' => <integer>,
            'RevocationId' => <integer>,
            'RevocationType' => 'CRL',
            'TrustStoreArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

TrustStoreRevocations
Type: Array of DescribeTrustStoreRevocation structures

Information about the revocation file in the trust store.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

RevocationIdNotFoundException:

The specified revocation ID does not exist.

DescribeTrustStores

$result = $client->describeTrustStores([/* ... */]);
$promise = $client->describeTrustStoresAsync([/* ... */]);

Describes all trust stores for the specified account.

Parameter Syntax

$result = $client->describeTrustStores([
    'Marker' => '<string>',
    'Names' => ['<string>', ...],
    'PageSize' => <integer>,
    'TrustStoreArns' => ['<string>', ...],
]);

Parameter Details

Members
Marker
Type: string

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

Names
Type: Array of strings

The names of the trust stores.

PageSize
Type: int

The maximum number of results to return with this call.

TrustStoreArns
Type: Array of strings

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[
    'NextMarker' => '<string>',
    'TrustStores' => [
        [
            'Name' => '<string>',
            'NumberOfCaCertificates' => <integer>,
            'Status' => 'ACTIVE|CREATING',
            'TotalRevokedEntries' => <integer>,
            'TrustStoreArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

TrustStores
Type: Array of TrustStore structures

Information about the trust stores.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

GetResourcePolicy

$result = $client->getResourcePolicy([/* ... */]);
$promise = $client->getResourcePolicyAsync([/* ... */]);

Retrieves the resource policy for a specified resource.

Parameter Syntax

$result = $client->getResourcePolicy([
    'ResourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource.

Result Syntax

[
    'Policy' => '<string>',
]

Result Details

Members
Policy
Type: string

The content of the resource policy.

Errors

ResourceNotFoundException:

The specified resource does not exist.

Examples

Example 1: Retrieve a resource policy

This example retrieves the resource policy for the specified trust store.

$result = $client->getResourcePolicy([
    'ResourceArn' => 'arn:aws:elasticloadbalancing:us-east-1:123456789012:truststore/my-trust-store/73e2d6bc24d8a067',
]);

GetTrustStoreCaCertificatesBundle

$result = $client->getTrustStoreCaCertificatesBundle([/* ... */]);
$promise = $client->getTrustStoreCaCertificatesBundleAsync([/* ... */]);

Retrieves the ca certificate bundle.

This action returns a pre-signed S3 URI which is active for ten minutes.

Parameter Syntax

$result = $client->getTrustStoreCaCertificatesBundle([
    'TrustStoreArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
TrustStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[
    'Location' => '<string>',
]

Result Details

Members
Location
Type: string

The ca certificate bundles Amazon S3 URI.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

GetTrustStoreRevocationContent

$result = $client->getTrustStoreRevocationContent([/* ... */]);
$promise = $client->getTrustStoreRevocationContentAsync([/* ... */]);

Retrieves the specified revocation file.

This action returns a pre-signed S3 URI which is active for ten minutes.

Parameter Syntax

$result = $client->getTrustStoreRevocationContent([
    'RevocationId' => <integer>, // REQUIRED
    'TrustStoreArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
RevocationId
Required: Yes
Type: long (int|float)

The revocation ID of the revocation file.

TrustStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[
    'Location' => '<string>',
]

Result Details

Members
Location
Type: string

The revocation files Amazon S3 URI.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

RevocationIdNotFoundException:

The specified revocation ID does not exist.

ModifyListener

$result = $client->modifyListener([/* ... */]);
$promise = $client->modifyListenerAsync([/* ... */]);

Replaces the specified properties of the specified listener. Any properties that you do not specify remain unchanged.

Changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the security policy and default certificate properties. If you change the protocol from HTTP to HTTPS, or from TCP to TLS, you must add the security policy and default certificate properties.

To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.

Parameter Syntax

$result = $client->modifyListener([
    'AlpnPolicy' => ['<string>', ...],
    'Certificates' => [
        [
            'CertificateArn' => '<string>',
            'IsDefault' => true || false,
        ],
        // ...
    ],
    'DefaultActions' => [
        [
            'AuthenticateCognitoConfig' => [
                'AuthenticationRequestExtraParams' => ['<string>', ...],
                'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                'Scope' => '<string>',
                'SessionCookieName' => '<string>',
                'SessionTimeout' => <integer>,
                'UserPoolArn' => '<string>', // REQUIRED
                'UserPoolClientId' => '<string>', // REQUIRED
                'UserPoolDomain' => '<string>', // REQUIRED
            ],
            'AuthenticateOidcConfig' => [
                'AuthenticationRequestExtraParams' => ['<string>', ...],
                'AuthorizationEndpoint' => '<string>', // REQUIRED
                'ClientId' => '<string>', // REQUIRED
                'ClientSecret' => '<string>',
                'Issuer' => '<string>', // REQUIRED
                'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                'Scope' => '<string>',
                'SessionCookieName' => '<string>',
                'SessionTimeout' => <integer>,
                'TokenEndpoint' => '<string>', // REQUIRED
                'UseExistingClientSecret' => true || false,
                'UserInfoEndpoint' => '<string>', // REQUIRED
            ],
            'FixedResponseConfig' => [
                'ContentType' => '<string>',
                'MessageBody' => '<string>',
                'StatusCode' => '<string>', // REQUIRED
            ],
            'ForwardConfig' => [
                'TargetGroupStickinessConfig' => [
                    'DurationSeconds' => <integer>,
                    'Enabled' => true || false,
                ],
                'TargetGroups' => [
                    [
                        'TargetGroupArn' => '<string>',
                        'Weight' => <integer>,
                    ],
                    // ...
                ],
            ],
            'Order' => <integer>,
            'RedirectConfig' => [
                'Host' => '<string>',
                'Path' => '<string>',
                'Port' => '<string>',
                'Protocol' => '<string>',
                'Query' => '<string>',
                'StatusCode' => 'HTTP_301|HTTP_302', // REQUIRED
            ],
            'TargetGroupArn' => '<string>',
            'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response', // REQUIRED
        ],
        // ...
    ],
    'ListenerArn' => '<string>', // REQUIRED
    'MutualAuthentication' => [
        'IgnoreClientCertificateExpiry' => true || false,
        'Mode' => '<string>',
        'TrustStoreArn' => '<string>',
        'TrustStoreAssociationStatus' => 'active|removed',
    ],
    'Port' => <integer>,
    'Protocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
    'SslPolicy' => '<string>',
]);

Parameter Details

Members
AlpnPolicy
Type: Array of strings

[TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) policy. You can specify one policy name. The following are the possible values:

  • HTTP1Only

  • HTTP2Only

  • HTTP2Optional

  • HTTP2Preferred

  • None

For more information, see ALPN policies in the Network Load Balancers Guide.

Certificates
Type: Array of Certificate structures

[HTTPS and TLS listeners] The default certificate for the listener. You must provide exactly one certificate. Set CertificateArn to the certificate ARN but do not set IsDefault.

DefaultActions
Type: Array of Action structures

The actions for the default rule.

ListenerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the listener.

MutualAuthentication

The mutual authentication configuration information.

Port
Type: int

The port for connections from clients to the load balancer. You cannot specify a port for a Gateway Load Balancer.

Protocol
Type: string

The protocol for connections from clients to the load balancer. Application Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers support the TCP, TLS, UDP, and TCP_UDP protocols. You can’t change the protocol to UDP or TCP_UDP if dual-stack mode is enabled. You cannot specify a protocol for a Gateway Load Balancer.

SslPolicy
Type: string

[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported.

For more information, see Security policies in the Application Load Balancers Guide or Security policies in the Network Load Balancers Guide.

Result Syntax

[
    'Listeners' => [
        [
            'AlpnPolicy' => ['<string>', ...],
            'Certificates' => [
                [
                    'CertificateArn' => '<string>',
                    'IsDefault' => true || false,
                ],
                // ...
            ],
            'DefaultActions' => [
                [
                    'AuthenticateCognitoConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'UserPoolArn' => '<string>',
                        'UserPoolClientId' => '<string>',
                        'UserPoolDomain' => '<string>',
                    ],
                    'AuthenticateOidcConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'AuthorizationEndpoint' => '<string>',
                        'ClientId' => '<string>',
                        'ClientSecret' => '<string>',
                        'Issuer' => '<string>',
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'TokenEndpoint' => '<string>',
                        'UseExistingClientSecret' => true || false,
                        'UserInfoEndpoint' => '<string>',
                    ],
                    'FixedResponseConfig' => [
                        'ContentType' => '<string>',
                        'MessageBody' => '<string>',
                        'StatusCode' => '<string>',
                    ],
                    'ForwardConfig' => [
                        'TargetGroupStickinessConfig' => [
                            'DurationSeconds' => <integer>,
                            'Enabled' => true || false,
                        ],
                        'TargetGroups' => [
                            [
                                'TargetGroupArn' => '<string>',
                                'Weight' => <integer>,
                            ],
                            // ...
                        ],
                    ],
                    'Order' => <integer>,
                    'RedirectConfig' => [
                        'Host' => '<string>',
                        'Path' => '<string>',
                        'Port' => '<string>',
                        'Protocol' => '<string>',
                        'Query' => '<string>',
                        'StatusCode' => 'HTTP_301|HTTP_302',
                    ],
                    'TargetGroupArn' => '<string>',
                    'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response',
                ],
                // ...
            ],
            'ListenerArn' => '<string>',
            'LoadBalancerArn' => '<string>',
            'MutualAuthentication' => [
                'IgnoreClientCertificateExpiry' => true || false,
                'Mode' => '<string>',
                'TrustStoreArn' => '<string>',
                'TrustStoreAssociationStatus' => 'active|removed',
            ],
            'Port' => <integer>,
            'Protocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
            'SslPolicy' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Listeners
Type: Array of Listener structures

Information about the modified listener.

Errors

DuplicateListenerException:

A listener with the specified port already exists.

TooManyListenersException:

You've reached the limit on the number of listeners per load balancer.

TooManyCertificatesException:

You've reached the limit on the number of certificates per load balancer.

ListenerNotFoundException:

The specified listener does not exist.

TargetGroupNotFoundException:

The specified target group does not exist.

TargetGroupAssociationLimitException:

You've reached the limit on the number of load balancers per target group.

IncompatibleProtocolsException:

The specified configuration is not valid with this protocol.

SSLPolicyNotFoundException:

The specified SSL policy does not exist.

CertificateNotFoundException:

The specified certificate does not exist.

InvalidConfigurationRequestException:

The requested configuration is not valid.

UnsupportedProtocolException:

The specified protocol is not supported.

TooManyRegistrationsForTargetIdException:

You've reached the limit on the number of times a target can be registered with a load balancer.

TooManyTargetsException:

You've reached the limit on the number of targets.

TooManyActionsException:

You've reached the limit on the number of actions per rule.

InvalidLoadBalancerActionException:

The requested action is not valid.

TooManyUniqueTargetGroupsPerLoadBalancerException:

You've reached the limit on the number of unique target groups per load balancer across all listeners. If a target group is used by multiple actions for a load balancer, it is counted as only one use.

ALPNPolicyNotSupportedException:

The specified ALPN policy is not supported.

TrustStoreNotFoundException:

The specified trust store does not exist.

TrustStoreNotReadyException:

The specified trust store is not active.

Examples

Example 1: To change the default action for a listener

This example changes the default action for the specified listener.

$result = $client->modifyListener([
    'DefaultActions' => [
        [
            'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-new-targets/2453ed029918f21f',
            'Type' => 'forward',
        ],
    ],
    'ListenerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2',
]);

Result syntax:

[
    'Listeners' => [
        [
            'DefaultActions' => [
                [
                    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-new-targets/2453ed029918f21f',
                    'Type' => 'forward',
                ],
            ],
            'ListenerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2',
            'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            'Port' => 80,
            'Protocol' => 'HTTP',
        ],
    ],
]
Example 2: To change the server certificate

This example changes the server certificate for the specified HTTPS listener.

$result = $client->modifyListener([
    'Certificates' => [
        [
            'CertificateArn' => 'arn:aws:iam::123456789012:server-certificate/my-new-server-cert',
        ],
    ],
    'ListenerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/0467ef3c8400ae65',
]);

Result syntax:

[
    'Listeners' => [
        [
            'Certificates' => [
                [
                    'CertificateArn' => 'arn:aws:iam::123456789012:server-certificate/my-new-server-cert',
                ],
            ],
            'DefaultActions' => [
                [
                    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
                    'Type' => 'forward',
                ],
            ],
            'ListenerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/0467ef3c8400ae65',
            'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            'Port' => 443,
            'Protocol' => 'HTTPS',
            'SslPolicy' => 'ELBSecurityPolicy-2015-05',
        ],
    ],
]

ModifyListenerAttributes

$result = $client->modifyListenerAttributes([/* ... */]);
$promise = $client->modifyListenerAttributesAsync([/* ... */]);

Modifies the specified attributes of the specified listener.

Parameter Syntax

$result = $client->modifyListenerAttributes([
    'Attributes' => [ // REQUIRED
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
    'ListenerArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
Attributes
Required: Yes
Type: Array of ListenerAttribute structures

The listener attributes.

ListenerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the listener.

Result Syntax

[
    'Attributes' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Attributes
Type: Array of ListenerAttribute structures

Information about the listener attributes.

Errors

ListenerNotFoundException:

The specified listener does not exist.

InvalidConfigurationRequestException:

The requested configuration is not valid.

ModifyLoadBalancerAttributes

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

Modifies the specified attributes of the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.

If any of the specified attributes can't be modified as requested, the call fails. Any existing attributes that you do not modify retain their current values.

Parameter Syntax

$result = $client->modifyLoadBalancerAttributes([
    'Attributes' => [ // REQUIRED
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
    'LoadBalancerArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
Attributes
Required: Yes
Type: Array of LoadBalancerAttribute structures

The load balancer attributes.

LoadBalancerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the load balancer.

Result Syntax

[
    'Attributes' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Attributes
Type: Array of LoadBalancerAttribute structures

Information about the load balancer attributes.

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

InvalidConfigurationRequestException:

The requested configuration is not valid.

Examples

Example 1: To enable deletion protection

This example enables deletion protection for the specified load balancer.

$result = $client->modifyLoadBalancerAttributes([
    'Attributes' => [
        [
            'Key' => 'deletion_protection.enabled',
            'Value' => 'true',
        ],
    ],
    'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
]);

Result syntax:

[
    'Attributes' => [
        [
            'Key' => 'deletion_protection.enabled',
            'Value' => 'true',
        ],
        [
            'Key' => 'access_logs.s3.enabled',
            'Value' => 'false',
        ],
        [
            'Key' => 'idle_timeout.timeout_seconds',
            'Value' => '60',
        ],
        [
            'Key' => 'access_logs.s3.prefix',
            'Value' => '',
        ],
        [
            'Key' => 'access_logs.s3.bucket',
            'Value' => '',
        ],
    ],
]
Example 2: To change the idle timeout

This example changes the idle timeout value for the specified load balancer.

$result = $client->modifyLoadBalancerAttributes([
    'Attributes' => [
        [
            'Key' => 'idle_timeout.timeout_seconds',
            'Value' => '30',
        ],
    ],
    'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
]);

Result syntax:

[
    'Attributes' => [
        [
            'Key' => 'idle_timeout.timeout_seconds',
            'Value' => '30',
        ],
        [
            'Key' => 'access_logs.s3.enabled',
            'Value' => 'false',
        ],
        [
            'Key' => 'access_logs.s3.prefix',
            'Value' => '',
        ],
        [
            'Key' => 'deletion_protection.enabled',
            'Value' => 'true',
        ],
        [
            'Key' => 'access_logs.s3.bucket',
            'Value' => '',
        ],
    ],
]
Example 3: To enable access logs

This example enables access logs for the specified load balancer. Note that the S3 bucket must exist in the same region as the load balancer and must have a policy attached that grants access to the Elastic Load Balancing service.

$result = $client->modifyLoadBalancerAttributes([
    'Attributes' => [
        [
            'Key' => 'access_logs.s3.enabled',
            'Value' => 'true',
        ],
        [
            'Key' => 'access_logs.s3.bucket',
            'Value' => 'my-loadbalancer-logs',
        ],
        [
            'Key' => 'access_logs.s3.prefix',
            'Value' => 'myapp',
        ],
    ],
    'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
]);

Result syntax:

[
    'Attributes' => [
        [
            'Key' => 'access_logs.s3.enabled',
            'Value' => 'true',
        ],
        [
            'Key' => 'access_logs.s3.bucket',
            'Value' => 'my-load-balancer-logs',
        ],
        [
            'Key' => 'access_logs.s3.prefix',
            'Value' => 'myapp',
        ],
        [
            'Key' => 'idle_timeout.timeout_seconds',
            'Value' => '60',
        ],
        [
            'Key' => 'deletion_protection.enabled',
            'Value' => 'false',
        ],
    ],
]

ModifyRule

$result = $client->modifyRule([/* ... */]);
$promise = $client->modifyRuleAsync([/* ... */]);

Replaces the specified properties of the specified rule. Any properties that you do not specify are unchanged.

To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.

Parameter Syntax

$result = $client->modifyRule([
    'Actions' => [
        [
            'AuthenticateCognitoConfig' => [
                'AuthenticationRequestExtraParams' => ['<string>', ...],
                'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                'Scope' => '<string>',
                'SessionCookieName' => '<string>',
                'SessionTimeout' => <integer>,
                'UserPoolArn' => '<string>', // REQUIRED
                'UserPoolClientId' => '<string>', // REQUIRED
                'UserPoolDomain' => '<string>', // REQUIRED
            ],
            'AuthenticateOidcConfig' => [
                'AuthenticationRequestExtraParams' => ['<string>', ...],
                'AuthorizationEndpoint' => '<string>', // REQUIRED
                'ClientId' => '<string>', // REQUIRED
                'ClientSecret' => '<string>',
                'Issuer' => '<string>', // REQUIRED
                'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                'Scope' => '<string>',
                'SessionCookieName' => '<string>',
                'SessionTimeout' => <integer>,
                'TokenEndpoint' => '<string>', // REQUIRED
                'UseExistingClientSecret' => true || false,
                'UserInfoEndpoint' => '<string>', // REQUIRED
            ],
            'FixedResponseConfig' => [
                'ContentType' => '<string>',
                'MessageBody' => '<string>',
                'StatusCode' => '<string>', // REQUIRED
            ],
            'ForwardConfig' => [
                'TargetGroupStickinessConfig' => [
                    'DurationSeconds' => <integer>,
                    'Enabled' => true || false,
                ],
                'TargetGroups' => [
                    [
                        'TargetGroupArn' => '<string>',
                        'Weight' => <integer>,
                    ],
                    // ...
                ],
            ],
            'Order' => <integer>,
            'RedirectConfig' => [
                'Host' => '<string>',
                'Path' => '<string>',
                'Port' => '<string>',
                'Protocol' => '<string>',
                'Query' => '<string>',
                'StatusCode' => 'HTTP_301|HTTP_302', // REQUIRED
            ],
            'TargetGroupArn' => '<string>',
            'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response', // REQUIRED
        ],
        // ...
    ],
    'Conditions' => [
        [
            'Field' => '<string>',
            'HostHeaderConfig' => [
                'Values' => ['<string>', ...],
            ],
            'HttpHeaderConfig' => [
                'HttpHeaderName' => '<string>',
                'Values' => ['<string>', ...],
            ],
            'HttpRequestMethodConfig' => [
                'Values' => ['<string>', ...],
            ],
            'PathPatternConfig' => [
                'Values' => ['<string>', ...],
            ],
            'QueryStringConfig' => [
                'Values' => [
                    [
                        'Key' => '<string>',
                        'Value' => '<string>',
                    ],
                    // ...
                ],
            ],
            'SourceIpConfig' => [
                'Values' => ['<string>', ...],
            ],
            'Values' => ['<string>', ...],
        ],
        // ...
    ],
    'RuleArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
Actions
Type: Array of Action structures

The actions.

Conditions
Type: Array of RuleCondition structures

The conditions.

RuleArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the rule.

Result Syntax

[
    'Rules' => [
        [
            'Actions' => [
                [
                    'AuthenticateCognitoConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'UserPoolArn' => '<string>',
                        'UserPoolClientId' => '<string>',
                        'UserPoolDomain' => '<string>',
                    ],
                    'AuthenticateOidcConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'AuthorizationEndpoint' => '<string>',
                        'ClientId' => '<string>',
                        'ClientSecret' => '<string>',
                        'Issuer' => '<string>',
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'TokenEndpoint' => '<string>',
                        'UseExistingClientSecret' => true || false,
                        'UserInfoEndpoint' => '<string>',
                    ],
                    'FixedResponseConfig' => [
                        'ContentType' => '<string>',
                        'MessageBody' => '<string>',
                        'StatusCode' => '<string>',
                    ],
                    'ForwardConfig' => [
                        'TargetGroupStickinessConfig' => [
                            'DurationSeconds' => <integer>,
                            'Enabled' => true || false,
                        ],
                        'TargetGroups' => [
                            [
                                'TargetGroupArn' => '<string>',
                                'Weight' => <integer>,
                            ],
                            // ...
                        ],
                    ],
                    'Order' => <integer>,
                    'RedirectConfig' => [
                        'Host' => '<string>',
                        'Path' => '<string>',
                        'Port' => '<string>',
                        'Protocol' => '<string>',
                        'Query' => '<string>',
                        'StatusCode' => 'HTTP_301|HTTP_302',
                    ],
                    'TargetGroupArn' => '<string>',
                    'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response',
                ],
                // ...
            ],
            'Conditions' => [
                [
                    'Field' => '<string>',
                    'HostHeaderConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'HttpHeaderConfig' => [
                        'HttpHeaderName' => '<string>',
                        'Values' => ['<string>', ...],
                    ],
                    'HttpRequestMethodConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'PathPatternConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'QueryStringConfig' => [
                        'Values' => [
                            [
                                'Key' => '<string>',
                                'Value' => '<string>',
                            ],
                            // ...
                        ],
                    ],
                    'SourceIpConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'Values' => ['<string>', ...],
                ],
                // ...
            ],
            'IsDefault' => true || false,
            'Priority' => '<string>',
            'RuleArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Rules
Type: Array of Rule structures

Information about the modified rule.

Errors

TargetGroupAssociationLimitException:

You've reached the limit on the number of load balancers per target group.

IncompatibleProtocolsException:

The specified configuration is not valid with this protocol.

RuleNotFoundException:

The specified rule does not exist.

OperationNotPermittedException:

This operation is not allowed.

TooManyRegistrationsForTargetIdException:

You've reached the limit on the number of times a target can be registered with a load balancer.

TooManyTargetsException:

You've reached the limit on the number of targets.

TargetGroupNotFoundException:

The specified target group does not exist.

UnsupportedProtocolException:

The specified protocol is not supported.

TooManyActionsException:

You've reached the limit on the number of actions per rule.

InvalidLoadBalancerActionException:

The requested action is not valid.

TooManyUniqueTargetGroupsPerLoadBalancerException:

You've reached the limit on the number of unique target groups per load balancer across all listeners. If a target group is used by multiple actions for a load balancer, it is counted as only one use.

Examples

Example 1: To modify a rule

This example modifies the condition for the specified rule.

$result = $client->modifyRule([
    'Conditions' => [
        [
            'Field' => 'path-pattern',
            'Values' => [
                '/images/*',
            ],
        ],
    ],
    'RuleArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee',
]);

Result syntax:

[
    'Rules' => [
        [
            'Actions' => [
                [
                    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
                    'Type' => 'forward',
                ],
            ],
            'Conditions' => [
                [
                    'Field' => 'path-pattern',
                    'Values' => [
                        '/images/*',
                    ],
                ],
            ],
            'IsDefault' => ,
            'Priority' => '10',
            'RuleArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee',
        ],
    ],
]

ModifyTargetGroup

$result = $client->modifyTargetGroup([/* ... */]);
$promise = $client->modifyTargetGroupAsync([/* ... */]);

Modifies the health checks used when evaluating the health state of the targets in the specified target group.

Parameter Syntax

$result = $client->modifyTargetGroup([
    'HealthCheckEnabled' => true || false,
    'HealthCheckIntervalSeconds' => <integer>,
    'HealthCheckPath' => '<string>',
    'HealthCheckPort' => '<string>',
    'HealthCheckProtocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
    'HealthCheckTimeoutSeconds' => <integer>,
    'HealthyThresholdCount' => <integer>,
    'Matcher' => [
        'GrpcCode' => '<string>',
        'HttpCode' => '<string>',
    ],
    'TargetGroupArn' => '<string>', // REQUIRED
    'UnhealthyThresholdCount' => <integer>,
]);

Parameter Details

Members
HealthCheckEnabled
Type: boolean

Indicates whether health checks are enabled.

HealthCheckIntervalSeconds
Type: int

The approximate amount of time, in seconds, between health checks of an individual target.

HealthCheckPath
Type: string

[HTTP/HTTPS health checks] The destination for health checks on the targets.

[HTTP1 or HTTP2 protocol version] The ping path. The default is /.

[GRPC protocol version] The path of a custom health check method with the format /package.service/method. The default is /Amazon Web Services.ALB/healthcheck.

HealthCheckPort
Type: string

The port the load balancer uses when performing health checks on targets.

HealthCheckProtocol
Type: string

The protocol the load balancer uses when performing health checks on targets. For Application Load Balancers, the default is HTTP. For Network Load Balancers and Gateway Load Balancers, the default is TCP. The TCP protocol is not supported for health checks if the protocol of the target group is HTTP or HTTPS. It is supported for health checks only if the protocol of the target group is TCP, TLS, UDP, or TCP_UDP. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.

HealthCheckTimeoutSeconds
Type: int

[HTTP/HTTPS health checks] The amount of time, in seconds, during which no response means a failed health check.

HealthyThresholdCount
Type: int

The number of consecutive health checks successes required before considering an unhealthy target healthy.

Matcher
Type: Matcher structure

[HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target. For target groups with a protocol of TCP, TCP_UDP, UDP or TLS the range is 200-599. For target groups with a protocol of HTTP or HTTPS, the range is 200-499. For target groups with a protocol of GENEVE, the range is 200-399.

TargetGroupArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the target group.

UnhealthyThresholdCount
Type: int

The number of consecutive health check failures required before considering the target unhealthy.

Result Syntax

[
    'TargetGroups' => [
        [
            'HealthCheckEnabled' => true || false,
            'HealthCheckIntervalSeconds' => <integer>,
            'HealthCheckPath' => '<string>',
            'HealthCheckPort' => '<string>',
            'HealthCheckProtocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
            'HealthCheckTimeoutSeconds' => <integer>,
            'HealthyThresholdCount' => <integer>,
            'IpAddressType' => 'ipv4|ipv6',
            'LoadBalancerArns' => ['<string>', ...],
            'Matcher' => [
                'GrpcCode' => '<string>',
                'HttpCode' => '<string>',
            ],
            'Port' => <integer>,
            'Protocol' => 'HTTP|HTTPS|TCP|TLS|UDP|TCP_UDP|GENEVE',
            'ProtocolVersion' => '<string>',
            'TargetGroupArn' => '<string>',
            'TargetGroupName' => '<string>',
            'TargetType' => 'instance|ip|lambda|alb',
            'UnhealthyThresholdCount' => <integer>,
            'VpcId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
TargetGroups
Type: Array of TargetGroup structures

Information about the modified target group.

Errors

TargetGroupNotFoundException:

The specified target group does not exist.

InvalidConfigurationRequestException:

The requested configuration is not valid.

Examples

Example 1: To modify the health check configuration for a target group

This example changes the configuration of the health checks used to evaluate the health of the targets for the specified target group.

$result = $client->modifyTargetGroup([
    'HealthCheckPort' => '443',
    'HealthCheckProtocol' => 'HTTPS',
    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-https-targets/2453ed029918f21f',
]);

Result syntax:

[
    'TargetGroups' => [
        [
            'HealthCheckIntervalSeconds' => 30,
            'HealthCheckPort' => '443',
            'HealthCheckProtocol' => 'HTTPS',
            'HealthCheckTimeoutSeconds' => 5,
            'HealthyThresholdCount' => 5,
            'LoadBalancerArns' => [
                'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
            ],
            'Matcher' => [
                'HttpCode' => '200',
            ],
            'Port' => 443,
            'Protocol' => 'HTTPS',
            'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-https-targets/2453ed029918f21f',
            'TargetGroupName' => 'my-https-targets',
            'UnhealthyThresholdCount' => 2,
            'VpcId' => 'vpc-3ac0fb5f',
        ],
    ],
]

ModifyTargetGroupAttributes

$result = $client->modifyTargetGroupAttributes([/* ... */]);
$promise = $client->modifyTargetGroupAttributesAsync([/* ... */]);

Modifies the specified attributes of the specified target group.

Parameter Syntax

$result = $client->modifyTargetGroupAttributes([
    'Attributes' => [ // REQUIRED
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
    'TargetGroupArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
Attributes
Required: Yes
Type: Array of TargetGroupAttribute structures

The target group attributes.

TargetGroupArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the target group.

Result Syntax

[
    'Attributes' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Attributes
Type: Array of TargetGroupAttribute structures

Information about the target group attributes.

Errors

TargetGroupNotFoundException:

The specified target group does not exist.

InvalidConfigurationRequestException:

The requested configuration is not valid.

Examples

Example 1: To modify the deregistration delay timeout

This example sets the deregistration delay timeout to the specified value for the specified target group.

$result = $client->modifyTargetGroupAttributes([
    'Attributes' => [
        [
            'Key' => 'deregistration_delay.timeout_seconds',
            'Value' => '600',
        ],
    ],
    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
]);

Result syntax:

[
    'Attributes' => [
        [
            'Key' => 'stickiness.enabled',
            'Value' => 'false',
        ],
        [
            'Key' => 'deregistration_delay.timeout_seconds',
            'Value' => '600',
        ],
        [
            'Key' => 'stickiness.type',
            'Value' => 'lb_cookie',
        ],
        [
            'Key' => 'stickiness.lb_cookie.duration_seconds',
            'Value' => '86400',
        ],
    ],
]

ModifyTrustStore

$result = $client->modifyTrustStore([/* ... */]);
$promise = $client->modifyTrustStoreAsync([/* ... */]);

Update the ca certificate bundle for the specified trust store.

Parameter Syntax

$result = $client->modifyTrustStore([
    'CaCertificatesBundleS3Bucket' => '<string>', // REQUIRED
    'CaCertificatesBundleS3Key' => '<string>', // REQUIRED
    'CaCertificatesBundleS3ObjectVersion' => '<string>',
    'TrustStoreArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
CaCertificatesBundleS3Bucket
Required: Yes
Type: string

The Amazon S3 bucket for the ca certificates bundle.

CaCertificatesBundleS3Key
Required: Yes
Type: string

The Amazon S3 path for the ca certificates bundle.

CaCertificatesBundleS3ObjectVersion
Type: string

The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.

TrustStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[
    'TrustStores' => [
        [
            'Name' => '<string>',
            'NumberOfCaCertificates' => <integer>,
            'Status' => 'ACTIVE|CREATING',
            'TotalRevokedEntries' => <integer>,
            'TrustStoreArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
TrustStores
Type: Array of TrustStore structures

Information about the modified trust store.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

InvalidCaCertificatesBundleException:

The specified ca certificate bundle is in an invalid format, or corrupt.

CaCertificatesBundleNotFoundException:

The specified ca certificate bundle does not exist.

RegisterTargets

$result = $client->registerTargets([/* ... */]);
$promise = $client->registerTargetsAsync([/* ... */]);

Registers the specified targets with the specified target group.

If the target is an EC2 instance, it must be in the running state when you register it.

By default, the load balancer routes requests to registered targets using the protocol and port for the target group. Alternatively, you can override the port for a target when you register it. You can register each EC2 instance or IP address with the same target group multiple times using different ports.

With a Network Load Balancer, you cannot register instances by instance ID if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these types by IP address.

Parameter Syntax

$result = $client->registerTargets([
    'TargetGroupArn' => '<string>', // REQUIRED
    'Targets' => [ // REQUIRED
        [
            'AvailabilityZone' => '<string>',
            'Id' => '<string>', // REQUIRED
            'Port' => <integer>,
        ],
        // ...
    ],
]);

Parameter Details

Members
TargetGroupArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the target group.

Targets
Required: Yes
Type: Array of TargetDescription structures

The targets.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

TargetGroupNotFoundException:

The specified target group does not exist.

TooManyTargetsException:

You've reached the limit on the number of targets.

InvalidTargetException:

The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.

TooManyRegistrationsForTargetIdException:

You've reached the limit on the number of times a target can be registered with a load balancer.

Examples

Example 1: To register targets with a target group

This example registers the specified instances with the specified target group.

$result = $client->registerTargets([
    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
    'Targets' => [
        [
            'Id' => 'i-80c8dd94',
        ],
        [
            'Id' => 'i-ceddcd4d',
        ],
    ],
]);
Example 2: To register targets with a target group using port overrides

This example registers the specified instance with the specified target group using multiple ports. This enables you to register ECS containers on the same instance as targets in the target group.

$result = $client->registerTargets([
    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-new-targets/3bb63f11dfb0faf9',
    'Targets' => [
        [
            'Id' => 'i-80c8dd94',
            'Port' => 80,
        ],
        [
            'Id' => 'i-80c8dd94',
            'Port' => 766,
        ],
    ],
]);

RemoveListenerCertificates

$result = $client->removeListenerCertificates([/* ... */]);
$promise = $client->removeListenerCertificatesAsync([/* ... */]);

Removes the specified certificate from the certificate list for the specified HTTPS or TLS listener.

Parameter Syntax

$result = $client->removeListenerCertificates([
    'Certificates' => [ // REQUIRED
        [
            'CertificateArn' => '<string>',
            'IsDefault' => true || false,
        ],
        // ...
    ],
    'ListenerArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
Certificates
Required: Yes
Type: Array of Certificate structures

The certificate to remove. You can specify one certificate per call. Set CertificateArn to the certificate ARN but do not set IsDefault.

ListenerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the listener.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ListenerNotFoundException:

The specified listener does not exist.

OperationNotPermittedException:

This operation is not allowed.

RemoveTags

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

Removes the specified tags from the specified Elastic Load Balancing resources. You can remove the tags for one or more Application Load Balancers, Network Load Balancers, Gateway Load Balancers, target groups, listeners, or rules.

Parameter Syntax

$result = $client->removeTags([
    'ResourceArns' => ['<string>', ...], // REQUIRED
    'TagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArns
Required: Yes
Type: Array of strings

The Amazon Resource Name (ARN) of the resource.

TagKeys
Required: Yes
Type: Array of strings

The tag keys for the tags to remove.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

TargetGroupNotFoundException:

The specified target group does not exist.

ListenerNotFoundException:

The specified listener does not exist.

RuleNotFoundException:

The specified rule does not exist.

TooManyTagsException:

You've reached the limit on the number of tags for this resource.

TrustStoreNotFoundException:

The specified trust store does not exist.

Examples

Example 1: To remove tags from a load balancer

This example removes the specified tags from the specified load balancer.

$result = $client->removeTags([
    'ResourceArns' => [
        'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
    ],
    'TagKeys' => [
        'project',
        'department',
    ],
]);

RemoveTrustStoreRevocations

$result = $client->removeTrustStoreRevocations([/* ... */]);
$promise = $client->removeTrustStoreRevocationsAsync([/* ... */]);

Removes the specified revocation file from the specified trust store.

Parameter Syntax

$result = $client->removeTrustStoreRevocations([
    'RevocationIds' => [<integer>, ...], // REQUIRED
    'TrustStoreArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
RevocationIds
Required: Yes
Type: Array of long (int|float)s

The revocation IDs of the revocation files you want to remove.

TrustStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the trust store.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

TrustStoreNotFoundException:

The specified trust store does not exist.

RevocationIdNotFoundException:

The specified revocation ID does not exist.

SetIpAddressType

$result = $client->setIpAddressType([/* ... */]);
$promise = $client->setIpAddressTypeAsync([/* ... */]);

Sets the type of IP addresses used by the subnets of the specified load balancer.

Parameter Syntax

$result = $client->setIpAddressType([
    'IpAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4', // REQUIRED
    'LoadBalancerArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
IpAddressType
Required: Yes
Type: string

Note: Internal load balancers must use the ipv4 IP address type.

[Application Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses), dualstack (for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4 (for IPv6 only public addresses, with private IPv4 and IPv6 addresses).

Note: Application Load Balancer authentication only supports IPv4 addresses when connecting to an Identity Provider (IdP) or Amazon Cognito endpoint. Without a public IPv4 address the load balancer cannot complete the authentication process, resulting in HTTP 500 errors.

[Network Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). You can’t specify dualstack for a load balancer with a UDP or TCP_UDP listener.

[Gateway Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses).

LoadBalancerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the load balancer.

Result Syntax

[
    'IpAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
]

Result Details

Members
IpAddressType
Type: string

The IP address type.

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

InvalidConfigurationRequestException:

The requested configuration is not valid.

InvalidSubnetException:

The specified subnet is out of available addresses.

SetRulePriorities

$result = $client->setRulePriorities([/* ... */]);
$promise = $client->setRulePrioritiesAsync([/* ... */]);

Sets the priorities of the specified rules.

You can reorder the rules as long as there are no priority conflicts in the new order. Any existing rules that you do not specify retain their current priority.

Parameter Syntax

$result = $client->setRulePriorities([
    'RulePriorities' => [ // REQUIRED
        [
            'Priority' => <integer>,
            'RuleArn' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
RulePriorities
Required: Yes
Type: Array of RulePriorityPair structures

The rule priorities.

Result Syntax

[
    'Rules' => [
        [
            'Actions' => [
                [
                    'AuthenticateCognitoConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'UserPoolArn' => '<string>',
                        'UserPoolClientId' => '<string>',
                        'UserPoolDomain' => '<string>',
                    ],
                    'AuthenticateOidcConfig' => [
                        'AuthenticationRequestExtraParams' => ['<string>', ...],
                        'AuthorizationEndpoint' => '<string>',
                        'ClientId' => '<string>',
                        'ClientSecret' => '<string>',
                        'Issuer' => '<string>',
                        'OnUnauthenticatedRequest' => 'deny|allow|authenticate',
                        'Scope' => '<string>',
                        'SessionCookieName' => '<string>',
                        'SessionTimeout' => <integer>,
                        'TokenEndpoint' => '<string>',
                        'UseExistingClientSecret' => true || false,
                        'UserInfoEndpoint' => '<string>',
                    ],
                    'FixedResponseConfig' => [
                        'ContentType' => '<string>',
                        'MessageBody' => '<string>',
                        'StatusCode' => '<string>',
                    ],
                    'ForwardConfig' => [
                        'TargetGroupStickinessConfig' => [
                            'DurationSeconds' => <integer>,
                            'Enabled' => true || false,
                        ],
                        'TargetGroups' => [
                            [
                                'TargetGroupArn' => '<string>',
                                'Weight' => <integer>,
                            ],
                            // ...
                        ],
                    ],
                    'Order' => <integer>,
                    'RedirectConfig' => [
                        'Host' => '<string>',
                        'Path' => '<string>',
                        'Port' => '<string>',
                        'Protocol' => '<string>',
                        'Query' => '<string>',
                        'StatusCode' => 'HTTP_301|HTTP_302',
                    ],
                    'TargetGroupArn' => '<string>',
                    'Type' => 'forward|authenticate-oidc|authenticate-cognito|redirect|fixed-response',
                ],
                // ...
            ],
            'Conditions' => [
                [
                    'Field' => '<string>',
                    'HostHeaderConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'HttpHeaderConfig' => [
                        'HttpHeaderName' => '<string>',
                        'Values' => ['<string>', ...],
                    ],
                    'HttpRequestMethodConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'PathPatternConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'QueryStringConfig' => [
                        'Values' => [
                            [
                                'Key' => '<string>',
                                'Value' => '<string>',
                            ],
                            // ...
                        ],
                    ],
                    'SourceIpConfig' => [
                        'Values' => ['<string>', ...],
                    ],
                    'Values' => ['<string>', ...],
                ],
                // ...
            ],
            'IsDefault' => true || false,
            'Priority' => '<string>',
            'RuleArn' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Rules
Type: Array of Rule structures

Information about the rules.

Errors

RuleNotFoundException:

The specified rule does not exist.

PriorityInUseException:

The specified priority is in use.

OperationNotPermittedException:

This operation is not allowed.

Examples

Example 1: To set the rule priority

This example sets the priority of the specified rule.

$result = $client->setRulePriorities([
    'RulePriorities' => [
        [
            'Priority' => 5,
            'RuleArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3',
        ],
    ],
]);

Result syntax:

[
    'Rules' => [
        [
            'Actions' => [
                [
                    'TargetGroupArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
                    'Type' => 'forward',
                ],
            ],
            'Conditions' => [
                [
                    'Field' => 'path-pattern',
                    'Values' => [
                        '/img/*',
                    ],
                ],
            ],
            'IsDefault' => ,
            'Priority' => '5',
            'RuleArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3',
        ],
    ],
]

SetSecurityGroups

$result = $client->setSecurityGroups([/* ... */]);
$promise = $client->setSecurityGroupsAsync([/* ... */]);

Associates the specified security groups with the specified Application Load Balancer or Network Load Balancer. The specified security groups override the previously associated security groups.

You can't perform this operation on a Network Load Balancer unless you specified a security group for the load balancer when you created it.

You can't associate a security group with a Gateway Load Balancer.

Parameter Syntax

$result = $client->setSecurityGroups([
    'EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic' => 'on|off',
    'LoadBalancerArn' => '<string>', // REQUIRED
    'SecurityGroups' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic
Type: string

Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink. The default is on.

LoadBalancerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the load balancer.

SecurityGroups
Required: Yes
Type: Array of strings

The IDs of the security groups.

Result Syntax

[
    'EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic' => 'on|off',
    'SecurityGroupIds' => ['<string>', ...],
]

Result Details

Members
EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic
Type: string

Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink.

SecurityGroupIds
Type: Array of strings

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

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

InvalidConfigurationRequestException:

The requested configuration is not valid.

InvalidSecurityGroupException:

The specified security group does not exist.

Examples

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

This example associates the specified security group with the specified load balancer.

$result = $client->setSecurityGroups([
    'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
    'SecurityGroups' => [
        'sg-5943793c',
    ],
]);

Result syntax:

[
    'SecurityGroupIds' => [
        'sg-5943793c',
    ],
]

SetSubnets

$result = $client->setSubnets([/* ... */]);
$promise = $client->setSubnetsAsync([/* ... */]);

Enables the Availability Zones for the specified public subnets for the specified Application Load Balancer, Network Load Balancer or Gateway Load Balancer. The specified subnets replace the previously enabled subnets.

When you specify subnets for a Network Load Balancer, or Gateway Load Balancer you must include all subnets that were enabled previously, with their existing configurations, plus any additional subnets.

Parameter Syntax

$result = $client->setSubnets([
    'IpAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
    'LoadBalancerArn' => '<string>', // REQUIRED
    'SubnetMappings' => [
        [
            'AllocationId' => '<string>',
            'IPv6Address' => '<string>',
            'PrivateIPv4Address' => '<string>',
            'SubnetId' => '<string>',
        ],
        // ...
    ],
    'Subnets' => ['<string>', ...],
]);

Parameter Details

Members
IpAddressType
Type: string

[Application Load Balancers] The IP address type. The possible values are ipv4 (for only IPv4 addresses), dualstack (for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4 (for IPv6 only public addresses, with private IPv4 and IPv6 addresses).

[Network Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). You can’t specify dualstack for a load balancer with a UDP or TCP_UDP listener.

[Gateway Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses).

LoadBalancerArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the load balancer.

SubnetMappings
Type: Array of SubnetMapping structures

The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.

[Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets.

[Application Load Balancers on Outposts] You must specify one Outpost subnet.

[Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones.

[Network Load Balancers] You can specify subnets from one or more Availability Zones. You can specify one Elastic IP address per subnet if you need static IP addresses for your internet-facing load balancer. For internal load balancers, you can specify one private IP address per subnet from the IPv4 range of the subnet. For internet-facing load balancer, you can specify one IPv6 address per subnet.

[Gateway Load Balancers] You can specify subnets from one or more Availability Zones.

Subnets
Type: Array of strings

The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.

[Application Load Balancers] You must specify subnets from at least two Availability Zones.

[Application Load Balancers on Outposts] You must specify one Outpost subnet.

[Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones.

[Network Load Balancers] You can specify subnets from one or more Availability Zones.

[Gateway Load Balancers] You can specify subnets from one or more Availability Zones.

Result Syntax

[
    'AvailabilityZones' => [
        [
            'LoadBalancerAddresses' => [
                [
                    'AllocationId' => '<string>',
                    'IPv6Address' => '<string>',
                    'IpAddress' => '<string>',
                    'PrivateIPv4Address' => '<string>',
                ],
                // ...
            ],
            'OutpostId' => '<string>',
            'SubnetId' => '<string>',
            'ZoneName' => '<string>',
        ],
        // ...
    ],
    'IpAddressType' => 'ipv4|dualstack|dualstack-without-public-ipv4',
]

Result Details

Members
AvailabilityZones
Type: Array of AvailabilityZone structures

Information about the subnets.

IpAddressType
Type: string

[Application Load Balancers] The IP address type.

[Network Load Balancers] The IP address type.

[Gateway Load Balancers] The IP address type.

Errors

LoadBalancerNotFoundException:

The specified load balancer does not exist.

InvalidConfigurationRequestException:

The requested configuration is not valid.

SubnetNotFoundException:

The specified subnet does not exist.

InvalidSubnetException:

The specified subnet is out of available addresses.

AllocationIdNotFoundException:

The specified allocation ID does not exist.

AvailabilityZoneNotSupportedException:

The specified Availability Zone is not supported.

Examples

Example 1: To enable Availability Zones for a load balancer

This example enables the Availability Zones for the specified subnets for the specified load balancer.

$result = $client->setSubnets([
    'LoadBalancerArn' => 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188',
    'Subnets' => [
        'subnet-8360a9e7',
        'subnet-b7d581c0',
    ],
]);

Result syntax:

[
    'AvailabilityZones' => [
        [
            'SubnetId' => 'subnet-8360a9e7',
            'ZoneName' => 'us-west-2a',
        ],
        [
            'SubnetId' => 'subnet-b7d581c0',
            'ZoneName' => 'us-west-2b',
        ],
    ],
]

Shapes

ALPNPolicyNotSupportedException

Description

The specified ALPN policy is not supported.

Members

Action

Description

Information about an action.

Each rule must include exactly one of the following types of actions: forward, fixed-response, or redirect, and it must be the last action to be performed.

Members
AuthenticateCognitoConfig

[HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when Type is authenticate-cognito.

AuthenticateOidcConfig

[HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.

FixedResponseConfig
Type: FixedResponseActionConfig structure

[Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when Type is fixed-response.

ForwardConfig
Type: ForwardActionConfig structure

Information for creating an action that distributes requests among one or more target groups. For Network Load Balancers, you can specify a single target group. Specify only when Type is forward. If you specify both ForwardConfig and TargetGroupArn, you can specify only one target group using ForwardConfig and it must be the same target group specified in TargetGroupArn.

Order
Type: int

The order for the action. This value is required for rules with multiple actions. The action with the lowest value for order is performed first.

RedirectConfig
Type: RedirectActionConfig structure

[Application Load Balancer] Information for creating a redirect action. Specify only when Type is redirect.

TargetGroupArn
Type: string

The Amazon Resource Name (ARN) of the target group. Specify only when Type is forward and you want to route to a single target group. To route to one or more target groups, use ForwardConfig instead.

Type
Required: Yes
Type: string

The type of action.

AddListenerCertificatesOutput

Members
Certificates
Type: Array of Certificate structures

Information about the certificates in the certificate list.

AddTagsOutput

Members

AddTrustStoreRevocationsOutput

Members
TrustStoreRevocations
Type: Array of TrustStoreRevocation structures

Information about the revocation file added to the trust store.

AllocationIdNotFoundException

Description

The specified allocation ID does not exist.

Members

AnomalyDetection

Description

Information about anomaly detection and mitigation.

Members
MitigationInEffect
Type: string

Indicates whether anomaly mitigation is in progress.

Result
Type: string

The latest anomaly detection result.

AuthenticateCognitoActionConfig

Description

Request parameters to use when integrating with Amazon Cognito to authenticate users.

Members
AuthenticationRequestExtraParams
Type: Associative array of custom strings keys (AuthenticateCognitoActionAuthenticationRequestParamName) to strings

The query parameters (up to 10) to include in the redirect request to the authorization endpoint.

OnUnauthenticatedRequest
Type: string

The behavior if the user is not authenticated. The following are possible values:

  • deny - Return an HTTP 401 Unauthorized error.

  • allow - Allow the request to be forwarded to the target.

  • authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.

Scope
Type: string

The set of user claims to be requested from the IdP. The default is openid.

To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.

SessionCookieName
Type: string

The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.

SessionTimeout
Type: long (int|float)

The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).

UserPoolArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the Amazon Cognito user pool.

UserPoolClientId
Required: Yes
Type: string

The ID of the Amazon Cognito user pool client.

UserPoolDomain
Required: Yes
Type: string

The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.

AuthenticateOidcActionConfig

Description

Request parameters when using an identity provider (IdP) that is compliant with OpenID Connect (OIDC) to authenticate users.

Members
AuthenticationRequestExtraParams
Type: Associative array of custom strings keys (AuthenticateOidcActionAuthenticationRequestParamName) to strings

The query parameters (up to 10) to include in the redirect request to the authorization endpoint.

AuthorizationEndpoint
Required: Yes
Type: string

The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.

ClientId
Required: Yes
Type: string

The OAuth 2.0 client identifier.

ClientSecret
Type: string

The OAuth 2.0 client secret. This parameter is required if you are creating a rule. If you are modifying a rule, you can omit this parameter if you set UseExistingClientSecret to true.

Issuer
Required: Yes
Type: string

The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.

OnUnauthenticatedRequest
Type: string

The behavior if the user is not authenticated. The following are possible values:

  • deny - Return an HTTP 401 Unauthorized error.

  • allow - Allow the request to be forwarded to the target.

  • authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.

Scope
Type: string

The set of user claims to be requested from the IdP. The default is openid.

To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.

SessionCookieName
Type: string

The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.

SessionTimeout
Type: long (int|float)

The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).

TokenEndpoint
Required: Yes
Type: string

The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.

UseExistingClientSecret
Type: boolean

Indicates whether to use the existing client secret when modifying a rule. If you are creating a rule, you can omit this parameter or set it to false.

UserInfoEndpoint
Required: Yes
Type: string

The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.

AvailabilityZone

Description

Information about an Availability Zone.

Members
LoadBalancerAddresses
Type: Array of LoadBalancerAddress structures

[Network Load Balancers] If you need static IP addresses for your load balancer, you can specify one Elastic IP address per Availability Zone when you create an internal-facing load balancer. For internal load balancers, you can specify a private IP address from the IPv4 range of the subnet.

OutpostId
Type: string

[Application Load Balancers on Outposts] The ID of the Outpost.

SubnetId
Type: string

The ID of the subnet. You can specify one subnet per Availability Zone.

ZoneName
Type: string

The name of the Availability Zone.

AvailabilityZoneNotSupportedException

Description

The specified Availability Zone is not supported.

Members

CaCertificatesBundleNotFoundException

Description

The specified ca certificate bundle does not exist.

Members

Certificate

Description

Information about an SSL server certificate.

Members
CertificateArn
Type: string

The Amazon Resource Name (ARN) of the certificate.

IsDefault
Type: boolean

Indicates whether the certificate is the default certificate. Do not set this value when specifying a certificate as an input. This value is not included in the output when describing a listener, but is included when describing listener certificates.

CertificateNotFoundException

Description

The specified certificate does not exist.

Members

Cipher

Description

Information about a cipher used in a policy.

Members
Name
Type: string

The name of the cipher.

Priority
Type: int

The priority of the cipher.

CreateListenerOutput

Members
Listeners
Type: Array of Listener structures

Information about the listener.

CreateLoadBalancerOutput

Members
LoadBalancers
Type: Array of LoadBalancer structures

Information about the load balancer.

CreateRuleOutput

Members
Rules
Type: Array of Rule structures

Information about the rule.

CreateTargetGroupOutput

Members
TargetGroups
Type: Array of TargetGroup structures

Information about the target group.

CreateTrustStoreOutput

Members
TrustStores
Type: Array of TrustStore structures

Information about the trust store created.

DeleteAssociationSameAccountException

Description

The specified association cannot be within the same account.

Members

DeleteListenerOutput

Members

DeleteLoadBalancerOutput

Members

DeleteRuleOutput

Members

DeleteSharedTrustStoreAssociationOutput

Members

DeleteTargetGroupOutput

Members

DeleteTrustStoreOutput

Members

DeregisterTargetsOutput

Members

DescribeAccountLimitsOutput

Members
Limits
Type: Array of Limit structures

Information about the limits.

NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

DescribeListenerAttributesOutput

Members
Attributes
Type: Array of ListenerAttribute structures

Information about the listener attributes.

DescribeListenerCertificatesOutput

Members
Certificates
Type: Array of Certificate structures

Information about the certificates.

NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

DescribeListenersOutput

Members
Listeners
Type: Array of Listener structures

Information about the listeners.

NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

DescribeLoadBalancerAttributesOutput

Members
Attributes
Type: Array of LoadBalancerAttribute structures

Information about the load balancer attributes.

DescribeLoadBalancersOutput

Members
LoadBalancers
Type: Array of LoadBalancer structures

Information about the load balancers.

NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

DescribeRulesOutput

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

Rules
Type: Array of Rule structures

Information about the rules.

DescribeSSLPoliciesOutput

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

SslPolicies
Type: Array of SslPolicy structures

Information about the security policies.

DescribeTagsOutput

Members
TagDescriptions
Type: Array of TagDescription structures

Information about the tags.

DescribeTargetGroupAttributesOutput

Members
Attributes
Type: Array of TargetGroupAttribute structures

Information about the target group attributes

DescribeTargetGroupsOutput

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

TargetGroups
Type: Array of TargetGroup structures

Information about the target groups.

DescribeTargetHealthOutput

Members
TargetHealthDescriptions
Type: Array of TargetHealthDescription structures

Information about the health of the targets.

DescribeTrustStoreAssociationsOutput

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

TrustStoreAssociations
Type: Array of TrustStoreAssociation structures

Information about the resources the trust store is associated to.

DescribeTrustStoreRevocation

Description

Information about the revocations used by a trust store.

Members
NumberOfRevokedEntries
Type: long (int|float)

The number of revoked certificates.

RevocationId
Type: long (int|float)

The revocation ID of a revocation file in use.

RevocationType
Type: string

The type of revocation file.

TrustStoreArn
Type: string

The Amazon Resource Name (ARN) of the trust store.

DescribeTrustStoreRevocationsOutput

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

TrustStoreRevocations
Type: Array of DescribeTrustStoreRevocation structures

Information about the revocation file in the trust store.

DescribeTrustStoresOutput

Members
NextMarker
Type: string

If there are additional results, this is the marker for the next set of results. Otherwise, this is null.

TrustStores
Type: Array of TrustStore structures

Information about the trust stores.

DuplicateListenerException

Description

A listener with the specified port already exists.

Members

DuplicateLoadBalancerNameException

Description

A load balancer with the specified name already exists.

Members

DuplicateTagKeysException

Description

A tag key was specified more than once.

Members

DuplicateTargetGroupNameException

Description

A target group with the specified name already exists.

Members

DuplicateTrustStoreNameException

Description

A trust store with the specified name already exists.

Members

FixedResponseActionConfig

Description

Information about an action that returns a custom HTTP response.

Members
ContentType
Type: string

The content type.

Valid Values: text/plain | text/css | text/html | application/javascript | application/json

MessageBody
Type: string

The message.

StatusCode
Required: Yes
Type: string

The HTTP response code (2XX, 4XX, or 5XX).

ForwardActionConfig

Description

Information about a forward action.

Members
TargetGroupStickinessConfig
Type: TargetGroupStickinessConfig structure

The target group stickiness for the rule.

TargetGroups
Type: Array of TargetGroupTuple structures

The target groups. For Network Load Balancers, you can specify a single target group.

GetResourcePolicyOutput

Members
Policy
Type: string

The content of the resource policy.

GetTrustStoreCaCertificatesBundleOutput

Members
Location
Type: string

The ca certificate bundles Amazon S3 URI.

GetTrustStoreRevocationContentOutput

Members
Location
Type: string

The revocation files Amazon S3 URI.

HealthUnavailableException

Description

The health of the specified targets could not be retrieved due to an internal error.

Members

HostHeaderConditionConfig

Description

Information about a host header condition.

Members
Values
Type: Array of strings

The host names. The maximum size of each name is 128 characters. The comparison is case insensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character).

If you specify multiple strings, the condition is satisfied if one of the strings matches the host name.

HttpHeaderConditionConfig

Description

Information about an HTTP header condition.

There is a set of standard HTTP header fields. You can also define custom HTTP header fields.

Members
HttpHeaderName
Type: string

The name of the HTTP header field. The maximum size is 40 characters. The header name is case insensitive. The allowed characters are specified by RFC 7230. Wildcards are not supported.

You can't use an HTTP header condition to specify the host header. Use HostHeaderConditionConfig to specify a host header condition.

Values
Type: Array of strings

The strings to compare against the value of the HTTP header. The maximum size of each string is 128 characters. The comparison strings are case insensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character).

If the same header appears multiple times in the request, we search them in order until a match is found.

If you specify multiple strings, the condition is satisfied if one of the strings matches the value of the HTTP header. To require that all of the strings are a match, create one condition per string.

HttpRequestMethodConditionConfig

Description

Information about an HTTP method condition.

HTTP defines a set of request methods, also referred to as HTTP verbs. For more information, see the HTTP Method Registry. You can also define custom HTTP methods.

Members
Values
Type: Array of strings

The name of the request method. The maximum size is 40 characters. The allowed characters are A-Z, hyphen (-), and underscore (_). The comparison is case sensitive. Wildcards are not supported; therefore, the method name must be an exact match.

If you specify multiple strings, the condition is satisfied if one of the strings matches the HTTP request method. We recommend that you route GET and HEAD requests in the same way, because the response to a HEAD request may be cached.

IncompatibleProtocolsException

Description

The specified configuration is not valid with this protocol.

Members

InvalidCaCertificatesBundleException

Description

The specified ca certificate bundle is in an invalid format, or corrupt.

Members

InvalidConfigurationRequestException

Description

The requested configuration is not valid.

Members

InvalidLoadBalancerActionException

Description

The requested action is not valid.

Members

InvalidRevocationContentException

Description

The provided revocation file is an invalid format, or uses an incorrect algorithm.

Members

InvalidSchemeException

Description

The requested scheme is not valid.

Members

InvalidSecurityGroupException

Description

The specified security group does not exist.

Members

InvalidSubnetException

Description

The specified subnet is out of available addresses.

Members

InvalidTargetException

Description

The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.

Members

Limit

Description

Information about an Elastic Load Balancing resource limit for your Amazon Web Services account.

For more information, see the following:

Members
Max
Type: string

The maximum value of the limit.

Name
Type: string

The name of the limit. The possible values are:

  • application-load-balancers

  • condition-values-per-alb-rule

  • condition-wildcards-per-alb-rule

  • gateway-load-balancers

  • gateway-load-balancers-per-vpc

  • geneve-target-groups

  • listeners-per-application-load-balancer

  • listeners-per-network-load-balancer

  • network-load-balancers

  • rules-per-application-load-balancer

  • target-groups

  • target-groups-per-action-on-application-load-balancer

  • target-groups-per-action-on-network-load-balancer

  • target-groups-per-application-load-balancer

  • targets-per-application-load-balancer

  • targets-per-availability-zone-per-gateway-load-balancer

  • targets-per-availability-zone-per-network-load-balancer

  • targets-per-network-load-balancer

Listener

Description

Information about a listener.

Members
AlpnPolicy
Type: Array of strings

[TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy.

Certificates
Type: Array of Certificate structures

[HTTPS or TLS listener] The default certificate for the listener.

DefaultActions
Type: Array of Action structures

The default actions for the listener.

ListenerArn
Type: string

The Amazon Resource Name (ARN) of the listener.

LoadBalancerArn
Type: string

The Amazon Resource Name (ARN) of the load balancer.

MutualAuthentication

The mutual authentication configuration information.

Port
Type: int

The port on which the load balancer is listening.

Protocol
Type: string

The protocol for connections from clients to the load balancer.

SslPolicy
Type: string

[HTTPS or TLS listener] The security policy that defines which protocols and ciphers are supported.

ListenerAttribute

Description

Information about a listener attribute.

Members
Key
Type: string

The name of the attribute.

The following attribute is supported by Network Load Balancers, and Gateway Load Balancers.

  • tcp.idle_timeout.seconds - The tcp idle timeout value, in seconds. The valid range is 60-6000 seconds. The default is 350 seconds.

Value
Type: string

The value of the attribute.

ListenerNotFoundException

Description

The specified listener does not exist.

Members

LoadBalancer

Description

Information about a load balancer.

Members
AvailabilityZones
Type: Array of AvailabilityZone structures

The subnets for the load balancer.

CanonicalHostedZoneId
Type: string

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

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

The date and time the load balancer was created.

CustomerOwnedIpv4Pool
Type: string

[Application Load Balancers on Outposts] The ID of the customer-owned address pool.

DNSName
Type: string

The public DNS name of the load balancer.

EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic
Type: string

Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink.

IpAddressType
Type: string

[Application Load Balancers] The type of IP addresses used for public or private connections by the subnets attached to your load balancer. The possible values are ipv4 (for only IPv4 addresses), dualstack (for IPv4 and IPv6 addresses), and dualstack-without-public-ipv4 (for IPv6 only public addresses, with private IPv4 and IPv6 addresses).

[Network Load Balancers and Gateway Load Balancers] The type of IP addresses used for public or private connections by the subnets attached to your load balancer. The possible values are ipv4 (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses).

LoadBalancerArn
Type: string

The Amazon Resource Name (ARN) of the load balancer.

LoadBalancerName
Type: string

The name of the load balancer.

Scheme
Type: string

The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the internet.

The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can route requests only from clients with access to the VPC for the load balancer.

SecurityGroups
Type: Array of strings

The IDs of the security groups for the load balancer.

State
Type: LoadBalancerState structure

The state of the load balancer.

Type
Type: string

The type of load balancer.

VpcId
Type: string

The ID of the VPC for the load balancer.

LoadBalancerAddress

Description

Information about a static IP address for a load balancer.

Members
AllocationId
Type: string

[Network Load Balancers] The allocation ID of the Elastic IP address for an internal-facing load balancer.

IPv6Address
Type: string

[Network Load Balancers] The IPv6 address.

IpAddress
Type: string

The static IP address.

PrivateIPv4Address
Type: string

[Network Load Balancers] The private IPv4 address for an internal load balancer.

LoadBalancerAttribute

Description

Information about a load balancer attribute.

Members
Key
Type: string

The name of the attribute.

The following attributes are supported by all load balancers:

  • deletion_protection.enabled - Indicates whether deletion protection is enabled. The value is true or false. The default is false.

  • load_balancing.cross_zone.enabled - Indicates whether cross-zone load balancing is enabled. The possible values are true and false. The default for Network Load Balancers and Gateway Load Balancers is false. The default for Application Load Balancers is true, and cannot be changed.

The following attributes are supported by both Application Load Balancers and Network Load Balancers:

  • access_logs.s3.enabled - Indicates whether access logs are enabled. The value is true or false. The default is false.

  • access_logs.s3.bucket - The name of the S3 bucket for the access logs. This attribute is required if access logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy that grants Elastic Load Balancing permissions to write to the bucket.

  • access_logs.s3.prefix - The prefix for the location in the S3 bucket for the access logs.

  • ipv6.deny_all_igw_traffic - Blocks internet gateway (IGW) access to the load balancer. It is set to false for internet-facing load balancers and true for internal load balancers, preventing unintended access to your internal load balancer through an internet gateway.

The following attributes are supported by only Application Load Balancers:

  • idle_timeout.timeout_seconds - The idle timeout value, in seconds. The valid range is 1-4000 seconds. The default is 60 seconds.

  • client_keep_alive.seconds - The client keep alive value, in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds.

  • connection_logs.s3.enabled - Indicates whether connection logs are enabled. The value is true or false. The default is false.

  • connection_logs.s3.bucket - The name of the S3 bucket for the connection logs. This attribute is required if connection logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy that grants Elastic Load Balancing permissions to write to the bucket.

  • connection_logs.s3.prefix - The prefix for the location in the S3 bucket for the connection logs.

  • routing.http.desync_mitigation_mode - Determines how the load balancer handles requests that might pose a security risk to your application. The possible values are monitor, defensive, and strictest. The default is defensive.

  • routing.http.drop_invalid_header_fields.enabled - Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false). The default is false.

  • routing.http.preserve_host_header.enabled - Indicates whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. The possible values are true and false. The default is false.

  • routing.http.x_amzn_tls_version_and_cipher_suite.enabled - Indicates whether the two headers (x-amzn-tls-version and x-amzn-tls-cipher-suite), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. The x-amzn-tls-version header has information about the TLS protocol version negotiated with the client, and the x-amzn-tls-cipher-suite header has information about the cipher suite negotiated with the client. Both headers are in OpenSSL format. The possible values for the attribute are true and false. The default is false.

  • routing.http.xff_client_port.enabled - Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer. The possible values are true and false. The default is false.

  • routing.http.xff_header_processing.mode - Enables you to modify, preserve, or remove the X-Forwarded-For header in the HTTP request before the Application Load Balancer sends the request to the target. The possible values are append, preserve, and remove. The default is append.

    • If the value is append, the Application Load Balancer adds the client IP address (of the last hop) to the X-Forwarded-For header in the HTTP request before it sends it to targets.

    • If the value is preserve the Application Load Balancer preserves the X-Forwarded-For header in the HTTP request, and sends it to targets without any change.

    • If the value is remove, the Application Load Balancer removes the X-Forwarded-For header in the HTTP request before it sends it to targets.

  • routing.http2.enabled - Indicates whether HTTP/2 is enabled. The possible values are true and false. The default is true. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens.

  • waf.fail_open.enabled - Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to Amazon Web Services WAF. The possible values are true and false. The default is false.

The following attributes are supported by only Network Load Balancers:

  • dns_record.client_routing_policy - Indicates how traffic is distributed among the load balancer Availability Zones. The possible values are availability_zone_affinity with 100 percent zonal affinity, partial_availability_zone_affinity with 85 percent zonal affinity, and any_availability_zone with 0 percent zonal affinity.

Value
Type: string

The value of the attribute.

LoadBalancerNotFoundException

Description

The specified load balancer does not exist.

Members

LoadBalancerState

Description

Information about the state of the load balancer.

Members
Code
Type: string

The state code. The initial state of the load balancer is provisioning. After the load balancer is fully set up and ready to route traffic, its state is active. If load balancer is routing traffic but does not have the resources it needs to scale, its state isactive_impaired. If the load balancer could not be set up, its state is failed.

Reason
Type: string

A description of the state.

Matcher

Description

The codes to use when checking for a successful response from a target. If the protocol version is gRPC, these are gRPC codes. Otherwise, these are HTTP codes.

Members
GrpcCode
Type: string

You can specify values between 0 and 99. You can specify multiple values (for example, "0,1") or a range of values (for example, "0-5"). The default value is 12.

HttpCode
Type: string

For Application Load Balancers, you can specify values between 200 and 499, with the default value being 200. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").

For Network Load Balancers, you can specify values between 200 and 599, with the default value being 200-399. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").

For Gateway Load Balancers, this must be "200–399".

Note that when using shorthand syntax, some values such as commas need to be escaped.

ModifyListenerAttributesOutput

Members
Attributes
Type: Array of ListenerAttribute structures

Information about the listener attributes.

ModifyListenerOutput

Members
Listeners
Type: Array of Listener structures

Information about the modified listener.

ModifyLoadBalancerAttributesOutput

Members
Attributes
Type: Array of LoadBalancerAttribute structures

Information about the load balancer attributes.

ModifyRuleOutput

Members
Rules
Type: Array of Rule structures

Information about the modified rule.

ModifyTargetGroupAttributesOutput

Members
Attributes
Type: Array of TargetGroupAttribute structures

Information about the target group attributes.

ModifyTargetGroupOutput

Members
TargetGroups
Type: Array of TargetGroup structures

Information about the modified target group.

ModifyTrustStoreOutput

Members
TrustStores
Type: Array of TrustStore structures

Information about the modified trust store.

MutualAuthenticationAttributes

Description

Information about the mutual authentication attributes of a listener.

Members
IgnoreClientCertificateExpiry
Type: boolean

Indicates whether expired client certificates are ignored.

Mode
Type: string

The client certificate handling method. Options are off, passthrough or verify. The default value is off.

TrustStoreArn
Type: string

The Amazon Resource Name (ARN) of the trust store.

TrustStoreAssociationStatus
Type: string

Indicates a shared trust stores association status.

OperationNotPermittedException

Description

This operation is not allowed.

Members

PathPatternConditionConfig

Description

Information about a path pattern condition.

Members
Values
Type: Array of strings

The path patterns to compare against the request URL. The maximum size of each string is 128 characters. The comparison is case sensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character).

If you specify multiple strings, the condition is satisfied if one of them matches the request URL. The path pattern is compared only to the path of the URL, not to its query string. To compare against the query string, use QueryStringConditionConfig.

PriorityInUseException

Description

The specified priority is in use.

Members

QueryStringConditionConfig

Description

Information about a query string condition.

The query string component of a URI starts after the first '?' character and is terminated by either a '#' character or the end of the URI. A typical query string contains key/value pairs separated by '&' characters. The allowed characters are specified by RFC 3986. Any character can be percentage encoded.

Members
Values
Type: Array of QueryStringKeyValuePair structures

The key/value pairs or values to find in the query string. The maximum size of each string is 128 characters. The comparison is case insensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character). To search for a literal '*' or '?' character in a query string, you must escape these characters in Values using a '\' character.

If you specify multiple key/value pairs or values, the condition is satisfied if one of them is found in the query string.

QueryStringKeyValuePair

Description

Information about a key/value pair.

Members
Key
Type: string

The key. You can omit the key.

Value
Type: string

The value.

RedirectActionConfig

Description

Information about a redirect action.

A URI consists of the following components: protocol://hostname:port/path?query. You must modify at least one of the following components to avoid a redirect loop: protocol, hostname, port, or path. Any components that you do not modify retain their original values.

You can reuse URI components using the following reserved keywords:

  • #{protocol}

  • #{host}

  • #{port}

  • #{path} (the leading "/" is removed)

  • #{query}

For example, you can change the path to "/new/#{path}", the hostname to "example.#{host}", or the query to "#{query}&value=xyz".

Members
Host
Type: string

The hostname. This component is not percent-encoded. The hostname can contain #{host}.

Path
Type: string

The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}.

Port
Type: string

The port. You can specify a value from 1 to 65535 or #{port}.

Protocol
Type: string

The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS to HTTP.

Query
Type: string

The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading "?", as it is automatically added. You can specify any of the reserved keywords.

StatusCode
Required: Yes
Type: string

The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302).

RegisterTargetsOutput

Members

RemoveListenerCertificatesOutput

Members

RemoveTagsOutput

Members

RemoveTrustStoreRevocationsOutput

Members

ResourceInUseException

Description

A specified resource is in use.

Members

ResourceNotFoundException

Description

The specified resource does not exist.

Members

RevocationContent

Description

Information about a revocation file.

Members
RevocationType
Type: string

The type of revocation file.

S3Bucket
Type: string

The Amazon S3 bucket for the revocation file.

S3Key
Type: string

The Amazon S3 path for the revocation file.

S3ObjectVersion
Type: string

The Amazon S3 object version of the revocation file.

RevocationContentNotFoundException

Description

The specified revocation file does not exist.

Members

RevocationIdNotFoundException

Description

The specified revocation ID does not exist.

Members

Rule

Description

Information about a rule.

Members
Actions
Type: Array of Action structures

The actions. Each rule must include exactly one of the following types of actions: forward, redirect, or fixed-response, and it must be the last action to be performed.

Conditions
Type: Array of RuleCondition structures

The conditions. Each rule can include zero or one of the following conditions: http-request-method, host-header, path-pattern, and source-ip, and zero or more of the following conditions: http-header and query-string.

IsDefault
Type: boolean

Indicates whether this is the default rule.

Priority
Type: string

The priority.

RuleArn
Type: string

The Amazon Resource Name (ARN) of the rule.

RuleCondition

Description

Information about a condition for a rule.

Each rule can optionally include up to one of each of the following conditions: http-request-method, host-header, path-pattern, and source-ip. Each rule can also optionally include one or more of each of the following conditions: http-header and query-string. Note that the value for a condition cannot be empty.

For more information, see Quotas for your Application Load Balancers.

Members
Field
Type: string

The field in the HTTP request. The following are the possible values:

  • http-header

  • http-request-method

  • host-header

  • path-pattern

  • query-string

  • source-ip

HostHeaderConfig
Type: HostHeaderConditionConfig structure

Information for a host header condition. Specify only when Field is host-header.

HttpHeaderConfig
Type: HttpHeaderConditionConfig structure

Information for an HTTP header condition. Specify only when Field is http-header.

HttpRequestMethodConfig

Information for an HTTP method condition. Specify only when Field is http-request-method.

PathPatternConfig
Type: PathPatternConditionConfig structure

Information for a path pattern condition. Specify only when Field is path-pattern.

QueryStringConfig
Type: QueryStringConditionConfig structure

Information for a query string condition. Specify only when Field is query-string.

SourceIpConfig
Type: SourceIpConditionConfig structure

Information for a source IP condition. Specify only when Field is source-ip.

Values
Type: Array of strings

The condition value. Specify only when Field is host-header or path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use HostHeaderConfig or PathPatternConfig.

If Field is host-header and you are not using HostHeaderConfig, you can specify a single host name (for example, my.example.com) in Values. A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters.

  • A-Z, a-z, 0-9

  • - .

  • * (matches 0 or more characters)

  • ? (matches exactly 1 character)

If Field is path-pattern and you are not using PathPatternConfig, you can specify a single path pattern (for example, /img/*) in Values. A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.

  • A-Z, a-z, 0-9

  • _ - . $ / ~ " ' @ : +

  • & (using &amp;)

  • * (matches 0 or more characters)

  • ? (matches exactly 1 character)

RuleNotFoundException

Description

The specified rule does not exist.

Members

RulePriorityPair

Description

Information about the priorities for the rules for a listener.

Members
Priority
Type: int

The rule priority.

RuleArn
Type: string

The Amazon Resource Name (ARN) of the rule.

SSLPolicyNotFoundException

Description

The specified SSL policy does not exist.

Members

SetIpAddressTypeOutput

Members
IpAddressType
Type: string

The IP address type.

SetRulePrioritiesOutput

Members
Rules
Type: Array of Rule structures

Information about the rules.

SetSecurityGroupsOutput

Members
EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic
Type: string

Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink.

SecurityGroupIds
Type: Array of strings

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

SetSubnetsOutput

Members
AvailabilityZones
Type: Array of AvailabilityZone structures

Information about the subnets.

IpAddressType
Type: string

[Application Load Balancers] The IP address type.

[Network Load Balancers] The IP address type.

[Gateway Load Balancers] The IP address type.

SourceIpConditionConfig

Description

Information about a source IP condition.

You can use this condition to route based on the IP address of the source that connects to the load balancer. If a client is behind a proxy, this is the IP address of the proxy not the IP address of the client.

Members
Values
Type: Array of strings

The source IP addresses, in CIDR format. You can use both IPv4 and IPv6 addresses. Wildcards are not supported.

If you specify multiple addresses, the condition is satisfied if the source IP address of the request matches one of the CIDR blocks. This condition is not satisfied by the addresses in the X-Forwarded-For header. To search for addresses in the X-Forwarded-For header, use HttpHeaderConditionConfig.

The total number of values must be less than, or equal to five.

SslPolicy

Description

Information about a policy used for SSL negotiation.

Members
Ciphers
Type: Array of Cipher structures

The ciphers.

Name
Type: string

The name of the policy.

SslProtocols
Type: Array of strings

The protocols.

SupportedLoadBalancerTypes
Type: Array of strings

The supported load balancers.

SubnetMapping

Description

Information about a subnet mapping.

Members
AllocationId
Type: string

[Network Load Balancers] The allocation ID of the Elastic IP address for an internet-facing load balancer.

IPv6Address
Type: string

[Network Load Balancers] The IPv6 address.

PrivateIPv4Address
Type: string

[Network Load Balancers] The private IPv4 address for an internal load balancer.

SubnetId
Type: string

The ID of the subnet.

SubnetNotFoundException

Description

The specified subnet does not exist.

Members

Tag

Description

Information about a tag.

Members
Key
Required: Yes
Type: string

The key of the tag.

Value
Type: string

The value of the tag.

TagDescription

Description

The tags associated with a resource.

Members
ResourceArn
Type: string

The Amazon Resource Name (ARN) of the resource.

Tags
Type: Array of Tag structures

Information about the tags.

TargetDescription

Description

Information about a target.

Members
AvailabilityZone
Type: string

An Availability Zone or all. This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.

For Application Load Balancer target groups, the specified Availability Zone value is only applicable when cross-zone load balancing is off. Otherwise the parameter is ignored and treated as all.

This parameter is not supported if the target type of the target group is instance or alb.

If the target type is ip and the IP address is in a subnet of the VPC for the target group, the Availability Zone is automatically detected and this parameter is optional. If the IP address is outside the VPC, this parameter is required.

For Application Load Balancer target groups with cross-zone load balancing off, if the target type is ip and the IP address is outside of the VPC for the target group, this should be an Availability Zone inside the VPC for the target group.

If the target type is lambda, this parameter is optional and the only supported value is all.

Id
Required: Yes
Type: string

The ID of the target. If the target type of the target group is instance, specify an instance ID. If the target type is ip, specify an IP address. If the target type is lambda, specify the ARN of the Lambda function. If the target type is alb, specify the ARN of the Application Load Balancer target.

Port
Type: int

The port on which the target is listening. If the target group protocol is GENEVE, the supported port is 6081. If the target type is alb, the targeted Application Load Balancer must have at least one listener whose port matches the target group port. This parameter is not used if the target is a Lambda function.

TargetGroup

Description

Information about a target group.

Members
HealthCheckEnabled
Type: boolean

Indicates whether health checks are enabled.

HealthCheckIntervalSeconds
Type: int

The approximate amount of time, in seconds, between health checks of an individual target.

HealthCheckPath
Type: string

The destination for health checks on the targets.

HealthCheckPort
Type: string

The port to use to connect with the target.

HealthCheckProtocol
Type: string

The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.

HealthCheckTimeoutSeconds
Type: int

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

HealthyThresholdCount
Type: int

The number of consecutive health checks successes required before considering an unhealthy target healthy.

IpAddressType
Type: string

The type of IP address used for this target group. The possible values are ipv4 and ipv6. This is an optional parameter. If not specified, the IP address type defaults to ipv4.

LoadBalancerArns
Type: Array of strings

The Amazon Resource Name (ARN) of the load balancer that routes traffic to this target group. You can use each target group with only one load balancer.

Matcher
Type: Matcher structure

The HTTP or gRPC codes to use when checking for a successful response from a target.

Port
Type: int

The port on which the targets are listening. This parameter is not used if the target is a Lambda function.

Protocol
Type: string

The protocol to use for routing traffic to the targets.

ProtocolVersion
Type: string

[HTTP/HTTPS protocol] The protocol version. The possible values are GRPC, HTTP1, and HTTP2.

TargetGroupArn
Type: string

The Amazon Resource Name (ARN) of the target group.

TargetGroupName
Type: string

The name of the target group.

TargetType
Type: string

The type of target that you must specify when registering targets with this target group. The possible values are instance (register targets by instance ID), ip (register targets by IP address), lambda (register a single Lambda function as a target), or alb (register a single Application Load Balancer as a target).

UnhealthyThresholdCount
Type: int

The number of consecutive health check failures required before considering the target unhealthy.

VpcId
Type: string

The ID of the VPC for the targets.

TargetGroupAssociationLimitException

Description

You've reached the limit on the number of load balancers per target group.

Members

TargetGroupAttribute

Description

Information about a target group attribute.

Members
Key
Type: string

The name of the attribute.

The following attributes are supported by all load balancers:

  • deregistration_delay.timeout_seconds - The amount of time, in seconds, for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. If the target is a Lambda function, this attribute is not supported.

  • stickiness.enabled - Indicates whether target stickiness is enabled. The value is true or false. The default is false.

  • stickiness.type - Indicates the type of stickiness. The possible values are:

    • lb_cookie and app_cookie for Application Load Balancers.

    • source_ip for Network Load Balancers.

    • source_ip_dest_ip and source_ip_dest_ip_proto for Gateway Load Balancers.

The following attributes are supported by Application Load Balancers and Network Load Balancers:

  • load_balancing.cross_zone.enabled - Indicates whether cross zone load balancing is enabled. The value is true, false or use_load_balancer_configuration. The default is use_load_balancer_configuration.

  • target_group_health.dns_failover.minimum_healthy_targets.count - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are off or an integer from 1 to the maximum number of targets. The default is off.

  • target_group_health.dns_failover.minimum_healthy_targets.percentage - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, mark the zone as unhealthy in DNS, so that traffic is routed only to healthy zones. The possible values are off or an integer from 1 to 100. The default is off.

  • target_group_health.unhealthy_state_routing.minimum_healthy_targets.count - The minimum number of targets that must be healthy. If the number of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are 1 to the maximum number of targets. The default is 1.

  • target_group_health.unhealthy_state_routing.minimum_healthy_targets.percentage - The minimum percentage of targets that must be healthy. If the percentage of healthy targets is below this value, send traffic to all targets, including unhealthy targets. The possible values are off or an integer from 1 to 100. The default is off.

The following attributes are supported only if the load balancer is an Application Load Balancer and the target is an instance or an IP address:

  • load_balancing.algorithm.type - The load balancing algorithm determines how the load balancer selects targets when routing requests. The value is round_robin, least_outstanding_requests, or weighted_random. The default is round_robin.

  • load_balancing.algorithm.anomaly_mitigation - Only available when load_balancing.algorithm.type is weighted_random. Indicates whether anomaly mitigation is enabled. The value is on or off. The default is off.

  • slow_start.duration_seconds - The time period, in seconds, during which a newly registered target receives an increasing share of the traffic to the target group. After this time period ends, the target receives its full share of traffic. The range is 30-900 seconds (15 minutes). The default is 0 seconds (disabled).

  • stickiness.app_cookie.cookie_name - Indicates the name of the application-based cookie. Names that start with the following prefixes are not allowed: AWSALB, AWSALBAPP, and AWSALBTG; they're reserved for use by the load balancer.

  • stickiness.app_cookie.duration_seconds - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the application-based cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).

  • stickiness.lb_cookie.duration_seconds - The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).

The following attribute is supported only if the load balancer is an Application Load Balancer and the target is a Lambda function:

  • lambda.multi_value_headers.enabled - Indicates whether the request and response headers that are exchanged between the load balancer and the Lambda function include arrays of values or strings. The value is true or false. The default is false. If the value is false and the request contains a duplicate header field name or query parameter key, the load balancer uses the last value sent by the client.

The following attributes are supported only by Network Load Balancers:

  • deregistration_delay.connection_termination.enabled - Indicates whether the load balancer terminates connections at the end of the deregistration timeout. The value is true or false. For new UDP/TCP_UDP target groups the default is true. Otherwise, the default is false.

  • preserve_client_ip.enabled - Indicates whether client IP preservation is enabled. The value is true or false. The default is disabled if the target group type is IP address and the target group protocol is TCP or TLS. Otherwise, the default is enabled. Client IP preservation cannot be disabled for UDP and TCP_UDP target groups.

  • proxy_protocol_v2.enabled - Indicates whether Proxy Protocol version 2 is enabled. The value is true or false. The default is false.

  • target_health_state.unhealthy.connection_termination.enabled - Indicates whether the load balancer terminates connections to unhealthy targets. The value is true or false. The default is true.

  • target_health_state.unhealthy.draining_interval_seconds - The amount of time for Elastic Load Balancing to wait before changing the state of an unhealthy target from unhealthy.draining to unhealthy. The range is 0-360000 seconds. The default value is 0 seconds.

    Note: This attribute can only be configured when target_health_state.unhealthy.connection_termination.enabled is false.

The following attributes are supported only by Gateway Load Balancers:

  • target_failover.on_deregistration - Indicates how the Gateway Load Balancer handles existing flows when a target is deregistered. The possible values are rebalance and no_rebalance. The default is no_rebalance. The two attributes (target_failover.on_deregistration and target_failover.on_unhealthy) can't be set independently. The value you set for both attributes must be the same.

  • target_failover.on_unhealthy - Indicates how the Gateway Load Balancer handles existing flows when a target is unhealthy. The possible values are rebalance and no_rebalance. The default is no_rebalance. The two attributes (target_failover.on_deregistration and target_failover.on_unhealthy) cannot be set independently. The value you set for both attributes must be the same.

Value
Type: string

The value of the attribute.

TargetGroupNotFoundException

Description

The specified target group does not exist.

Members

TargetGroupStickinessConfig

Description

Information about the target group stickiness for a rule.

Members
DurationSeconds
Type: int

The time period, in seconds, during which requests from a client should be routed to the same target group. The range is 1-604800 seconds (7 days).

Enabled
Type: boolean

Indicates whether target group stickiness is enabled.

TargetGroupTuple

Description

Information about how traffic will be distributed between multiple target groups in a forward rule.

Members
TargetGroupArn
Type: string

The Amazon Resource Name (ARN) of the target group.

Weight
Type: int

The weight. The range is 0 to 999.

TargetHealth

Description

Information about the current health of a target.

Members
Description
Type: string

A description of the target health that provides additional details. If the state is healthy, a description is not provided.

Reason
Type: string

The reason code.

If the target state is healthy, a reason code is not provided.

If the target state is initial, the reason code can be one of the following values:

  • Elb.RegistrationInProgress - The target is in the process of being registered with the load balancer.

  • Elb.InitialHealthChecking - The load balancer is still sending the target the minimum number of health checks required to determine its health status.

If the target state is unhealthy, the reason code can be one of the following values:

  • Target.ResponseCodeMismatch - The health checks did not return an expected HTTP code. Applies only to Application Load Balancers and Gateway Load Balancers.

  • Target.Timeout - The health check requests timed out. Applies only to Application Load Balancers and Gateway Load Balancers.

  • Target.FailedHealthChecks - The load balancer received an error while establishing a connection to the target or the target response was malformed.

  • Elb.InternalError - The health checks failed due to an internal error. Applies only to Application Load Balancers.

If the target state is unused, the reason code can be one of the following values:

  • Target.NotRegistered - The target is not registered with the target group.

  • Target.NotInUse - The target group is not used by any load balancer or the target is in an Availability Zone that is not enabled for its load balancer.

  • Target.InvalidState - The target is in the stopped or terminated state.

  • Target.IpUnusable - The target IP address is reserved for use by a load balancer.

If the target state is draining, the reason code can be the following value:

  • Target.DeregistrationInProgress - The target is in the process of being deregistered and the deregistration delay period has not expired.

If the target state is unavailable, the reason code can be the following value:

  • Target.HealthCheckDisabled - Health checks are disabled for the target group. Applies only to Application Load Balancers.

  • Elb.InternalError - Target health is unavailable due to an internal error. Applies only to Network Load Balancers.

State
Type: string

The state of the target.

TargetHealthDescription

Description

Information about the health of a target.

Members
AnomalyDetection
Type: AnomalyDetection structure

The anomaly detection result for the target.

If no anomalies were detected, the result is normal.

If anomalies were detected, the result is anomalous.

HealthCheckPort
Type: string

The port to use to connect with the target.

Target
Type: TargetDescription structure

The description of the target.

TargetHealth
Type: TargetHealth structure

The health information for the target.

TooManyActionsException

Description

You've reached the limit on the number of actions per rule.

Members

TooManyCertificatesException

Description

You've reached the limit on the number of certificates per load balancer.

Members

TooManyListenersException

Description

You've reached the limit on the number of listeners per load balancer.

Members

TooManyLoadBalancersException

Description

You've reached the limit on the number of load balancers for your Amazon Web Services account.

Members

TooManyRegistrationsForTargetIdException

Description

You've reached the limit on the number of times a target can be registered with a load balancer.

Members

TooManyRulesException

Description

You've reached the limit on the number of rules per load balancer.

Members

TooManyTagsException

Description

You've reached the limit on the number of tags for this resource.

Members

TooManyTargetGroupsException

Description

You've reached the limit on the number of target groups for your Amazon Web Services account.

Members

TooManyTargetsException

Description

You've reached the limit on the number of targets.

Members

TooManyTrustStoreRevocationEntriesException

Description

The specified trust store has too many revocation entries.

Members

TooManyTrustStoresException

Description

You've reached the limit on the number of trust stores for your Amazon Web Services account.

Members

TooManyUniqueTargetGroupsPerLoadBalancerException

Description

You've reached the limit on the number of unique target groups per load balancer across all listeners. If a target group is used by multiple actions for a load balancer, it is counted as only one use.

Members

TrustStore

Description

Information about a trust store.

Members
Name
Type: string

The name of the trust store.

NumberOfCaCertificates
Type: int

The number of ca certificates in the trust store.

Status
Type: string

The current status of the trust store.

TotalRevokedEntries
Type: long (int|float)

The number of revoked certificates in the trust store.

TrustStoreArn
Type: string

The Amazon Resource Name (ARN) of the trust store.

TrustStoreAssociation

Description

Information about the resources a trust store is associated with.

Members
ResourceArn
Type: string

The Amazon Resource Name (ARN) of the resource.

TrustStoreAssociationNotFoundException

Description

The specified association does not exist.

Members

TrustStoreInUseException

Description

The specified trust store is currently in use.

Members

TrustStoreNotFoundException

Description

The specified trust store does not exist.

Members

TrustStoreNotReadyException

Description

The specified trust store is not active.

Members

TrustStoreRevocation

Description

Information about a revocation file in use by a trust store.

Members
NumberOfRevokedEntries
Type: long (int|float)

The number of revoked certificates.

RevocationId
Type: long (int|float)

The revocation ID of the revocation file.

RevocationType
Type: string

The type of revocation file.

TrustStoreArn
Type: string

The Amazon Resource Name (ARN) of the trust store.

UnsupportedProtocolException

Description

The specified protocol is not supported.

Members