ElasticLoadBalancingv2 ********************** Client ====== class ElasticLoadBalancingv2.Client A low-level client representing Elastic Load Balancing (Elastic Load Balancing v2) A load balancer distributes incoming traffic across targets, such as your EC2 instances. This enables you to increase the availability of your application. The load balancer also monitors the health of its registered targets and ensures that it routes traffic only to healthy targets. You configure your load balancer to accept incoming traffic by specifying one or more listeners, which are configured with a protocol and port number for connections from clients to the load balancer. You configure a target group with a protocol and port number for connections from the load balancer to the targets, and with health check settings to be used when checking the health status of the targets. Elastic Load Balancing supports the following types of load balancers: Application Load Balancers, Network Load Balancers, Gateway Load Balancers, and Classic Load Balancers. This reference covers the following load balancer types: * Application Load Balancer - Operates at the application layer (layer 7) and supports HTTP and HTTPS. * Network Load Balancer - Operates at the transport layer (layer 4) and supports TCP, TLS, and UDP. * Gateway Load Balancer - Operates at the network layer (layer 3). For more information, see the Elastic Load Balancing User Guide. All Elastic Load Balancing operations are idempotent, which means that they complete at most one time. If you repeat an operation, it succeeds. import boto3 client = boto3.client('elbv2') These are the available methods: * add_listener_certificates * add_tags * add_trust_store_revocations * can_paginate * close * create_listener * create_load_balancer * create_rule * create_target_group * create_trust_store * delete_listener * delete_load_balancer * delete_rule * delete_shared_trust_store_association * delete_target_group * delete_trust_store * deregister_targets * describe_account_limits * describe_capacity_reservation * describe_listener_attributes * describe_listener_certificates * describe_listeners * describe_load_balancer_attributes * describe_load_balancers * describe_rules * describe_ssl_policies * describe_tags * describe_target_group_attributes * describe_target_groups * describe_target_health * describe_trust_store_associations * describe_trust_store_revocations * describe_trust_stores * get_paginator * get_resource_policy * get_trust_store_ca_certificates_bundle * get_trust_store_revocation_content * get_waiter * modify_capacity_reservation * modify_ip_pools * modify_listener * modify_listener_attributes * modify_load_balancer_attributes * modify_rule * modify_target_group * modify_target_group_attributes * modify_trust_store * register_targets * remove_listener_certificates * remove_tags * remove_trust_store_revocations * set_ip_address_type * set_rule_priorities * set_security_groups * set_subnets Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * DescribeAccountLimits * DescribeListenerCertificates * DescribeListeners * DescribeLoadBalancers * DescribeRules * DescribeSSLPolicies * DescribeTargetGroups * DescribeTrustStoreAssociations * DescribeTrustStoreRevocations * DescribeTrustStores Waiters ======= Waiters are available on a client instance via the "get_waiter" method. For more detailed instructions and examples on the usage or waiters, see the waiters user guide. The available waiters are: * LoadBalancerAvailable * LoadBalancerExists * LoadBalancersDeleted * TargetDeregistered * TargetInService ElasticLoadBalancingv2 / Waiter / LoadBalancersDeleted LoadBalancersDeleted ******************** class ElasticLoadBalancingv2.Waiter.LoadBalancersDeleted waiter = client.get_waiter('load_balancers_deleted') wait(**kwargs) Polls "ElasticLoadBalancingv2.Client.describe_load_balancers()" every 15 seconds until a successful state is reached. An error is raised after 40 failed checks. See also: AWS API Documentation **Request Syntax** waiter.wait( LoadBalancerArns=[ 'string', ], Names=[ 'string', ], Marker='string', PageSize=123, WaiterConfig={ 'Delay': 123, 'MaxAttempts': 123 } ) Parameters: * **LoadBalancerArns** (*list*) -- The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call. * *(string) --* * **Names** (*list*) -- The names of the load balancers. * *(string) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. * **WaiterConfig** (*dict*) -- A dictionary that provides parameters to control waiting behavior. * **Delay** *(integer) --* The amount of time in seconds to wait between attempts. Default: 15 * **MaxAttempts** *(integer) --* The maximum number of attempts to be made. Default: 40 Returns: None ElasticLoadBalancingv2 / Waiter / LoadBalancerAvailable LoadBalancerAvailable ********************* class ElasticLoadBalancingv2.Waiter.LoadBalancerAvailable waiter = client.get_waiter('load_balancer_available') wait(**kwargs) Polls "ElasticLoadBalancingv2.Client.describe_load_balancers()" every 15 seconds until a successful state is reached. An error is raised after 40 failed checks. See also: AWS API Documentation **Request Syntax** waiter.wait( LoadBalancerArns=[ 'string', ], Names=[ 'string', ], Marker='string', PageSize=123, WaiterConfig={ 'Delay': 123, 'MaxAttempts': 123 } ) Parameters: * **LoadBalancerArns** (*list*) -- The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call. * *(string) --* * **Names** (*list*) -- The names of the load balancers. * *(string) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. * **WaiterConfig** (*dict*) -- A dictionary that provides parameters to control waiting behavior. * **Delay** *(integer) --* The amount of time in seconds to wait between attempts. Default: 15 * **MaxAttempts** *(integer) --* The maximum number of attempts to be made. Default: 40 Returns: None ElasticLoadBalancingv2 / Waiter / TargetInService TargetInService *************** class ElasticLoadBalancingv2.Waiter.TargetInService waiter = client.get_waiter('target_in_service') wait(**kwargs) Polls "ElasticLoadBalancingv2.Client.describe_target_health()" every 15 seconds until a successful state is reached. An error is raised after 40 failed checks. See also: AWS API Documentation **Request Syntax** waiter.wait( TargetGroupArn='string', Targets=[ { 'Id': 'string', 'Port': 123, 'AvailabilityZone': 'string' }, ], Include=[ 'AnomalyDetection'|'All', ], WaiterConfig={ 'Delay': 123, 'MaxAttempts': 123 } ) Parameters: * **TargetGroupArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the target group. * **Targets** (*list*) -- The targets. * *(dict) --* Information about a target. * **Id** *(string) --* **[REQUIRED]** 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** *(integer) --* 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. * **AvailabilityZone** *(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". * **Include** (*list*) -- Used to include anomaly detection information. * *(string) --* * **WaiterConfig** (*dict*) -- A dictionary that provides parameters to control waiting behavior. * **Delay** *(integer) --* The amount of time in seconds to wait between attempts. Default: 15 * **MaxAttempts** *(integer) --* The maximum number of attempts to be made. Default: 40 Returns: None ElasticLoadBalancingv2 / Waiter / LoadBalancerExists LoadBalancerExists ****************** class ElasticLoadBalancingv2.Waiter.LoadBalancerExists waiter = client.get_waiter('load_balancer_exists') wait(**kwargs) Polls "ElasticLoadBalancingv2.Client.describe_load_balancers()" every 15 seconds until a successful state is reached. An error is raised after 40 failed checks. See also: AWS API Documentation **Request Syntax** waiter.wait( LoadBalancerArns=[ 'string', ], Names=[ 'string', ], Marker='string', PageSize=123, WaiterConfig={ 'Delay': 123, 'MaxAttempts': 123 } ) Parameters: * **LoadBalancerArns** (*list*) -- The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call. * *(string) --* * **Names** (*list*) -- The names of the load balancers. * *(string) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. * **WaiterConfig** (*dict*) -- A dictionary that provides parameters to control waiting behavior. * **Delay** *(integer) --* The amount of time in seconds to wait between attempts. Default: 15 * **MaxAttempts** *(integer) --* The maximum number of attempts to be made. Default: 40 Returns: None ElasticLoadBalancingv2 / Waiter / TargetDeregistered TargetDeregistered ****************** class ElasticLoadBalancingv2.Waiter.TargetDeregistered waiter = client.get_waiter('target_deregistered') wait(**kwargs) Polls "ElasticLoadBalancingv2.Client.describe_target_health()" every 15 seconds until a successful state is reached. An error is raised after 40 failed checks. See also: AWS API Documentation **Request Syntax** waiter.wait( TargetGroupArn='string', Targets=[ { 'Id': 'string', 'Port': 123, 'AvailabilityZone': 'string' }, ], Include=[ 'AnomalyDetection'|'All', ], WaiterConfig={ 'Delay': 123, 'MaxAttempts': 123 } ) Parameters: * **TargetGroupArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the target group. * **Targets** (*list*) -- The targets. * *(dict) --* Information about a target. * **Id** *(string) --* **[REQUIRED]** 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** *(integer) --* 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. * **AvailabilityZone** *(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". * **Include** (*list*) -- Used to include anomaly detection information. * *(string) --* * **WaiterConfig** (*dict*) -- A dictionary that provides parameters to control waiting behavior. * **Delay** *(integer) --* The amount of time in seconds to wait between attempts. Default: 15 * **MaxAttempts** *(integer) --* The maximum number of attempts to be made. Default: 40 Returns: None ElasticLoadBalancingv2 / Paginator / DescribeListeners DescribeListeners ***************** class ElasticLoadBalancingv2.Paginator.DescribeListeners paginator = client.get_paginator('describe_listeners') paginate(**kwargs) Creates an iterator that will paginate through responses from "ElasticLoadBalancingv2.Client.describe_listeners()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( LoadBalancerArn='string', ListenerArns=[ 'string', ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **LoadBalancerArn** (*string*) -- The Amazon Resource Name (ARN) of the load balancer. * **ListenerArns** (*list*) -- The Amazon Resource Names (ARN) of the listeners. * *(string) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'Listeners': [ { 'ListenerArn': 'string', 'LoadBalancerArn': 'string', 'Port': 123, 'Protocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], 'SslPolicy': 'string', 'DefaultActions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], 'AlpnPolicy': [ 'string', ], 'MutualAuthentication': { 'Mode': 'string', 'TrustStoreArn': 'string', 'IgnoreClientCertificateExpiry': True|False, 'TrustStoreAssociationStatus': 'active'|'removed', 'AdvertiseTrustStoreCaNames': 'on'|'off' } }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **Listeners** *(list) --* Information about the listeners. * *(dict) --* Information about a listener. * **ListenerArn** *(string) --* The Amazon Resource Name (ARN) of the listener. * **LoadBalancerArn** *(string) --* The Amazon Resource Name (ARN) of the load balancer. * **Port** *(integer) --* The port on which the load balancer is listening. * **Protocol** *(string) --* The protocol for connections from clients to the load balancer. * **Certificates** *(list) --* [HTTPS or TLS listener] The default certificate for the listener. * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. * **SslPolicy** *(string) --* [HTTPS or TLS listener] The security policy that defines which protocols and ciphers are supported. * **DefaultActions** *(list) --* The default actions for the listener. * *(dict) --* 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. * **Type** *(string) --* The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate-oidc". * **Issuer** *(string) --* The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent- encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed- response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **AlpnPolicy** *(list) --* [TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy. * *(string) --* * **MutualAuthentication** *(dict) --* The mutual authentication configuration information. * **Mode** *(string) --* The client certificate handling method. Options are "off", "passthrough" or "verify". The default value is "off". * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **IgnoreClientCertificateExpiry** *(boolean) --* Indicates whether expired client certificates are ignored. * **TrustStoreAssociationStatus** *(string) --* Indicates a shared trust stores association status. * **AdvertiseTrustStoreCaNames** *(string) --* Indicates whether trust store CA certificate names are advertised. * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Paginator / DescribeTrustStoreRevocations DescribeTrustStoreRevocations ***************************** class ElasticLoadBalancingv2.Paginator.DescribeTrustStoreRevocations paginator = client.get_paginator('describe_trust_store_revocations') paginate(**kwargs) Creates an iterator that will paginate through responses from " ElasticLoadBalancingv2.Client.describe_trust_store_revocations( )". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( TrustStoreArn='string', RevocationIds=[ 123, ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. * **RevocationIds** (*list*) -- The revocation IDs of the revocation files you want to describe. * *(integer) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'TrustStoreRevocations': [ { 'TrustStoreArn': 'string', 'RevocationId': 123, 'RevocationType': 'CRL', 'NumberOfRevokedEntries': 123 }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **TrustStoreRevocations** *(list) --* Information about the revocation file in the trust store. * *(dict) --* Information about the revocations used by a trust store. * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **RevocationId** *(integer) --* The revocation ID of a revocation file in use. * **RevocationType** *(string) --* The type of revocation file. * **NumberOfRevokedEntries** *(integer) --* The number of revoked certificates. * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Paginator / DescribeTrustStoreAssociations DescribeTrustStoreAssociations ****************************** class ElasticLoadBalancingv2.Paginator.DescribeTrustStoreAssociations paginator = client.get_paginator('describe_trust_store_associations') paginate(**kwargs) Creates an iterator that will paginate through responses from " ElasticLoadBalancingv2.Client.describe_trust_store_associations ()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( TrustStoreArn='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'TrustStoreAssociations': [ { 'ResourceArn': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **TrustStoreAssociations** *(list) --* Information about the resources the trust store is associated to. * *(dict) --* Information about the resources a trust store is associated with. * **ResourceArn** *(string) --* The Amazon Resource Name (ARN) of the resource. * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Paginator / DescribeAccountLimits DescribeAccountLimits ********************* class ElasticLoadBalancingv2.Paginator.DescribeAccountLimits paginator = client.get_paginator('describe_account_limits') paginate(**kwargs) Creates an iterator that will paginate through responses from "ElasticLoadBalancingv2.Client.describe_account_limits()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max- items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'Limits': [ { 'Name': 'string', 'Max': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **Limits** *(list) --* Information about the limits. * *(dict) --* Information about an Elastic Load Balancing resource limit for your Amazon Web Services account. For more information, see the following: * Quotas for your Application Load Balancers * Quotas for your Network Load Balancers * Quotas for your Gateway Load Balancers * **Name** *(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 * **Max** *(string) --* The maximum value of the limit. * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Paginator / DescribeSSLPolicies DescribeSSLPolicies ******************* class ElasticLoadBalancingv2.Paginator.DescribeSSLPolicies paginator = client.get_paginator('describe_ssl_policies') paginate(**kwargs) Creates an iterator that will paginate through responses from "ElasticLoadBalancingv2.Client.describe_ssl_policies()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( Names=[ 'string', ], LoadBalancerType='application'|'network'|'gateway', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **Names** (*list*) -- The names of the policies. * *(string) --* * **LoadBalancerType** (*string*) -- The type of load balancer. The default lists the SSL policies for all load balancers. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'SslPolicies': [ { 'SslProtocols': [ 'string', ], 'Ciphers': [ { 'Name': 'string', 'Priority': 123 }, ], 'Name': 'string', 'SupportedLoadBalancerTypes': [ 'string', ] }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **SslPolicies** *(list) --* Information about the security policies. * *(dict) --* Information about a policy used for SSL negotiation. * **SslProtocols** *(list) --* The protocols. * *(string) --* * **Ciphers** *(list) --* The ciphers. * *(dict) --* Information about a cipher used in a policy. * **Name** *(string) --* The name of the cipher. * **Priority** *(integer) --* The priority of the cipher. * **Name** *(string) --* The name of the policy. * **SupportedLoadBalancerTypes** *(list) --* The supported load balancers. * *(string) --* * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Paginator / DescribeListenerCertificates DescribeListenerCertificates **************************** class ElasticLoadBalancingv2.Paginator.DescribeListenerCertificates paginator = client.get_paginator('describe_listener_certificates') paginate(**kwargs) Creates an iterator that will paginate through responses from " ElasticLoadBalancingv2.Client.describe_listener_certificates()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( ListenerArn='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **ListenerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Names (ARN) of the listener. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **Certificates** *(list) --* Information about the certificates. * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Paginator / DescribeRules DescribeRules ************* class ElasticLoadBalancingv2.Paginator.DescribeRules paginator = client.get_paginator('describe_rules') paginate(**kwargs) Creates an iterator that will paginate through responses from "ElasticLoadBalancingv2.Client.describe_rules()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( ListenerArn='string', RuleArns=[ 'string', ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **ListenerArn** (*string*) -- The Amazon Resource Name (ARN) of the listener. * **RuleArns** (*list*) -- The Amazon Resource Names (ARN) of the rules. * *(string) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'Rules': [ { 'RuleArn': 'string', 'Priority': 'string', 'Conditions': [ { 'Field': 'string', 'Values': [ 'string', ], 'HostHeaderConfig': { 'Values': [ 'string', ] }, 'PathPatternConfig': { 'Values': [ 'string', ] }, 'HttpHeaderConfig': { 'HttpHeaderName': 'string', 'Values': [ 'string', ] }, 'QueryStringConfig': { 'Values': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'HttpRequestMethodConfig': { 'Values': [ 'string', ] }, 'SourceIpConfig': { 'Values': [ 'string', ] } }, ], 'Actions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], 'IsDefault': True|False }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **Rules** *(list) --* Information about the rules. * *(dict) --* Information about a rule. * **RuleArn** *(string) --* The Amazon Resource Name (ARN) of the rule. * **Priority** *(string) --* The priority. * **Conditions** *(list) --* 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". * *(dict) --* 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 can't be empty. For more information, see Quotas for your Application Load Balancers. * **Field** *(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" * **Values** *(list) --* 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 &) * * (matches 0 or more characters) * ? (matches exactly 1 character) * *(string) --* * **HostHeaderConfig** *(dict) --* Information for a host header condition. Specify only when "Field" is "host-header". * **Values** *(list) --* 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). You must include at least one "." character. You can include only alphabetical characters after the final "." character. If you specify multiple strings, the condition is satisfied if one of the strings matches the host name. * *(string) --* * **PathPatternConfig** *(dict) --* Information for a path pattern condition. Specify only when "Field" is "path-pattern". * **Values** *(list) --* 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 a query string condition. * *(string) --* * **HttpHeaderConfig** *(dict) --* Information for an HTTP header condition. Specify only when "Field" is "http-header". * **HttpHeaderName** *(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. Instead, use a host condition. * **Values** *(list) --* 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. * *(string) --* * **QueryStringConfig** *(dict) --* Information for a query string condition. Specify only when "Field" is "query-string". * **Values** *(list) --* 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. * *(dict) --* Information about a key/value pair. * **Key** *(string) --* The key. You can omit the key. * **Value** *(string) --* The value. * **HttpRequestMethodConfig** *(dict) --* Information for an HTTP method condition. Specify only when "Field" is "http-request-method". * **Values** *(list) --* 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. * *(string) --* * **SourceIpConfig** *(dict) --* Information for a source IP condition. Specify only when "Field" is "source-ip". * **Values** *(list) --* 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 an HTTP header condition. The total number of values must be less than, or equal to five. * *(string) --* * **Actions** *(list) --* 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. * *(dict) --* 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. * **Type** *(string) --* The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate-oidc". * **Issuer** *(string) --* The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent- encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed- response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **IsDefault** *(boolean) --* Indicates whether this is the default rule. * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Paginator / DescribeTargetGroups DescribeTargetGroups ******************** class ElasticLoadBalancingv2.Paginator.DescribeTargetGroups paginator = client.get_paginator('describe_target_groups') paginate(**kwargs) Creates an iterator that will paginate through responses from "ElasticLoadBalancingv2.Client.describe_target_groups()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( LoadBalancerArn='string', TargetGroupArns=[ 'string', ], Names=[ 'string', ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **LoadBalancerArn** (*string*) -- The Amazon Resource Name (ARN) of the load balancer. * **TargetGroupArns** (*list*) -- The Amazon Resource Names (ARN) of the target groups. * *(string) --* * **Names** (*list*) -- The names of the target groups. * *(string) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'TargetGroupName': 'string', 'Protocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'Port': 123, 'VpcId': 'string', 'HealthCheckProtocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'HealthCheckPort': 'string', 'HealthCheckEnabled': True|False, 'HealthCheckIntervalSeconds': 123, 'HealthCheckTimeoutSeconds': 123, 'HealthyThresholdCount': 123, 'UnhealthyThresholdCount': 123, 'HealthCheckPath': 'string', 'Matcher': { 'HttpCode': 'string', 'GrpcCode': 'string' }, 'LoadBalancerArns': [ 'string', ], 'TargetType': 'instance'|'ip'|'lambda'|'alb', 'ProtocolVersion': 'string', 'IpAddressType': 'ipv4'|'ipv6' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **TargetGroups** *(list) --* Information about the target groups. * *(dict) --* Information about a target group. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **TargetGroupName** *(string) --* The name of the target group. * **Protocol** *(string) --* The protocol to use for routing traffic to the targets. * **Port** *(integer) --* The port on which the targets are listening. This parameter is not used if the target is a Lambda function. * **VpcId** *(string) --* The ID of the VPC for the targets. * **HealthCheckProtocol** *(string) --* The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks. * **HealthCheckPort** *(string) --* The port to use to connect with the target. * **HealthCheckEnabled** *(boolean) --* Indicates whether health checks are enabled. * **HealthCheckIntervalSeconds** *(integer) --* The approximate amount of time, in seconds, between health checks of an individual target. * **HealthCheckTimeoutSeconds** *(integer) --* The amount of time, in seconds, during which no response means a failed health check. * **HealthyThresholdCount** *(integer) --* The number of consecutive health checks successes required before considering an unhealthy target healthy. * **UnhealthyThresholdCount** *(integer) --* The number of consecutive health check failures required before considering the target unhealthy. * **HealthCheckPath** *(string) --* The destination for health checks on the targets. * **Matcher** *(dict) --* The HTTP or gRPC codes to use when checking for a successful response from a target. * **HttpCode** *(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. * **GrpcCode** *(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. * **LoadBalancerArns** *(list) --* 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. * *(string) --* * **TargetType** *(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). * **ProtocolVersion** *(string) --* [HTTP/HTTPS protocol] The protocol version. The possible values are "GRPC", "HTTP1", and "HTTP2". * **IpAddressType** *(string) --* The IP address type. The default value is "ipv4". * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Paginator / DescribeLoadBalancers DescribeLoadBalancers ********************* class ElasticLoadBalancingv2.Paginator.DescribeLoadBalancers paginator = client.get_paginator('describe_load_balancers') paginate(**kwargs) Creates an iterator that will paginate through responses from "ElasticLoadBalancingv2.Client.describe_load_balancers()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( LoadBalancerArns=[ 'string', ], Names=[ 'string', ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **LoadBalancerArns** (*list*) -- The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call. * *(string) --* * **Names** (*list*) -- The names of the load balancers. * *(string) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'LoadBalancers': [ { 'LoadBalancerArn': 'string', 'DNSName': 'string', 'CanonicalHostedZoneId': 'string', 'CreatedTime': datetime(2015, 1, 1), 'LoadBalancerName': 'string', 'Scheme': 'internet-facing'|'internal', 'VpcId': 'string', 'State': { 'Code': 'active'|'provisioning'|'active_impaired'|'failed', 'Reason': 'string' }, 'Type': 'application'|'network'|'gateway', 'AvailabilityZones': [ { 'ZoneName': 'string', 'SubnetId': 'string', 'OutpostId': 'string', 'LoadBalancerAddresses': [ { 'IpAddress': 'string', 'AllocationId': 'string', 'PrivateIPv4Address': 'string', 'IPv6Address': 'string' }, ], 'SourceNatIpv6Prefixes': [ 'string', ] }, ], 'SecurityGroups': [ 'string', ], 'IpAddressType': 'ipv4'|'dualstack'|'dualstack-without-public-ipv4', 'CustomerOwnedIpv4Pool': 'string', 'EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic': 'string', 'EnablePrefixForIpv6SourceNat': 'on'|'off', 'IpamPools': { 'Ipv4IpamPoolId': 'string' } }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **LoadBalancers** *(list) --* Information about the load balancers. * *(dict) --* Information about a load balancer. * **LoadBalancerArn** *(string) --* The Amazon Resource Name (ARN) of the load balancer. * **DNSName** *(string) --* The public DNS name of the load balancer. * **CanonicalHostedZoneId** *(string) --* The ID of the Amazon Route 53 hosted zone associated with the load balancer. * **CreatedTime** *(datetime) --* The date and time the load balancer was created. * **LoadBalancerName** *(string) --* The name of the load balancer. * **Scheme** *(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. * **VpcId** *(string) --* The ID of the VPC for the load balancer. * **State** *(dict) --* The state of the load balancer. * **Code** *(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 is "active_impaired". If the load balancer could not be set up, its state is "failed". * **Reason** *(string) --* A description of the state. * **Type** *(string) --* The type of load balancer. * **AvailabilityZones** *(list) --* The subnets for the load balancer. * *(dict) --* Information about an Availability Zone. * **ZoneName** *(string) --* The name of the Availability Zone. * **SubnetId** *(string) --* The ID of the subnet. You can specify one subnet per Availability Zone. * **OutpostId** *(string) --* [Application Load Balancers on Outposts] The ID of the Outpost. * **LoadBalancerAddresses** *(list) --* [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. * *(dict) --* Information about a static IP address for a load balancer. * **IpAddress** *(string) --* The static IP address. * **AllocationId** *(string) --* [Network Load Balancers] The allocation ID of the Elastic IP address for an internal-facing load balancer. * **PrivateIPv4Address** *(string) --* [Network Load Balancers] The private IPv4 address for an internal load balancer. * **IPv6Address** *(string) --* [Network Load Balancers] The IPv6 address. * **SourceNatIpv6Prefixes** *(list) --* [Network Load Balancers with UDP listeners] The IPv6 prefixes to use for source NAT. For each subnet, specify an IPv6 prefix (/80 netmask) from the subnet CIDR block or "auto_assigned" to use an IPv6 prefix selected at random from the subnet CIDR block. * *(string) --* * **SecurityGroups** *(list) --* The IDs of the security groups for the load balancer. * *(string) --* * **IpAddressType** *(string) --* The type of IP addresses used for public or private connections by the subnets attached to your load balancer. [Application Load Balancers] The possible values are "ipv4" (IPv4 addresses), "dualstack" (IPv4 and IPv6 addresses), and "dualstack-without-public-ipv4" (public IPv6 addresses and private IPv4 and IPv6 addresses). [Network Load Balancers and Gateway Load Balancers] The possible values are "ipv4" (IPv4 addresses) and "dualstack" (IPv4 and IPv6 addresses). * **CustomerOwnedIpv4Pool** *(string) --* [Application Load Balancers on Outposts] The ID of the customer-owned address pool. * **EnforceSecurityGroupInboundRulesOnPrivateLinkTraff ic** *(string) --* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink. * **EnablePrefixForIpv6SourceNat** *(string) --* [Network Load Balancers with UDP listeners] Indicates whether to use an IPv6 prefix from each subnet for source NAT. The IP address type must be "dualstack". The default value is "off". * **IpamPools** *(dict) --* [Application Load Balancers] The IPAM pool in use by the load balancer, if configured. * **Ipv4IpamPoolId** *(string) --* The ID of the IPv4 IPAM pool. * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Paginator / DescribeTrustStores DescribeTrustStores ******************* class ElasticLoadBalancingv2.Paginator.DescribeTrustStores paginator = client.get_paginator('describe_trust_stores') paginate(**kwargs) Creates an iterator that will paginate through responses from "ElasticLoadBalancingv2.Client.describe_trust_stores()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( TrustStoreArns=[ 'string', ], Names=[ 'string', ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **TrustStoreArns** (*list*) -- The Amazon Resource Name (ARN) of the trust store. * *(string) --* * **Names** (*list*) -- The names of the trust stores. * *(string) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'TrustStores': [ { 'Name': 'string', 'TrustStoreArn': 'string', 'Status': 'ACTIVE'|'CREATING', 'NumberOfCaCertificates': 123, 'TotalRevokedEntries': 123 }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **TrustStores** *(list) --* Information about the trust stores. * *(dict) --* Information about a trust store. * **Name** *(string) --* The name of the trust store. * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **Status** *(string) --* The current status of the trust store. * **NumberOfCaCertificates** *(integer) --* The number of ca certificates in the trust store. * **TotalRevokedEntries** *(integer) --* The number of revoked certificates in the trust store. * **NextToken** *(string) --* A token to resume pagination. ElasticLoadBalancingv2 / Client / deregister_targets deregister_targets ****************** ElasticLoadBalancingv2.Client.deregister_targets(**kwargs) 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: * Deregistration delay in the *Application Load Balancers User Guide* * Deregistration delay in the *Network Load Balancers User Guide* * Deregistration delay in the *Gateway Load Balancers User Guide* Note: If the specified target does not exist, the action returns successfully. See also: AWS API Documentation **Request Syntax** response = client.deregister_targets( TargetGroupArn='string', Targets=[ { 'Id': 'string', 'Port': 123, 'AvailabilityZone': 'string' }, ] ) Parameters: * **TargetGroupArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the target group. * **Targets** (*list*) -- **[REQUIRED]** 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. * *(dict) --* Information about a target. * **Id** *(string) --* **[REQUIRED]** 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** *(integer) --* 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. * **AvailabilityZone** *(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". Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.InvalidTargetException" **Examples** This example deregisters the specified instance from the specified target group. response = client.deregister_targets( TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', Targets=[ { 'Id': 'i-0f76fade', }, ], ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / get_paginator get_paginator ************* ElasticLoadBalancingv2.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. ElasticLoadBalancingv2 / Client / create_target_group create_target_group ******************* ElasticLoadBalancingv2.Client.create_target_group(**kwargs) Creates a target group. For more information, see the following: * Target groups for your Application Load Balancers * Target groups for your Network Load Balancers * Target groups for your Gateway Load Balancers 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. See also: AWS API Documentation **Request Syntax** response = client.create_target_group( Name='string', Protocol='HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', ProtocolVersion='string', Port=123, VpcId='string', HealthCheckProtocol='HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', HealthCheckPort='string', HealthCheckEnabled=True|False, HealthCheckPath='string', HealthCheckIntervalSeconds=123, HealthCheckTimeoutSeconds=123, HealthyThresholdCount=123, UnhealthyThresholdCount=123, Matcher={ 'HttpCode': 'string', 'GrpcCode': 'string' }, TargetType='instance'|'ip'|'lambda'|'alb', Tags=[ { 'Key': 'string', 'Value': 'string' }, ], IpAddressType='ipv4'|'ipv6' ) Parameters: * **Name** (*string*) -- **[REQUIRED]** 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. * **Protocol** (*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** (*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. * **Port** (*integer*) -- 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. * **VpcId** (*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. * **HealthCheckProtocol** (*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. * **HealthCheckPort** (*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. * **HealthCheckEnabled** (*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 can't be disabled. * **HealthCheckPath** (*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. * **HealthCheckIntervalSeconds** (*integer*) -- 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. * **HealthCheckTimeoutSeconds** (*integer*) -- 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** (*integer*) -- 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. * **UnhealthyThresholdCount** (*integer*) -- 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. * **Matcher** (*dict*) -- [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. * **HttpCode** *(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. * **GrpcCode** *(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. * **TargetType** (*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. * **Tags** (*list*) -- The tags to assign to the target group. * *(dict) --* Information about a tag. * **Key** *(string) --* **[REQUIRED]** The key of the tag. * **Value** *(string) --* The value of the tag. * **IpAddressType** (*string*) -- The IP address type. The default value is "ipv4". Return type: dict Returns: **Response Syntax** { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'TargetGroupName': 'string', 'Protocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'Port': 123, 'VpcId': 'string', 'HealthCheckProtocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'HealthCheckPort': 'string', 'HealthCheckEnabled': True|False, 'HealthCheckIntervalSeconds': 123, 'HealthCheckTimeoutSeconds': 123, 'HealthyThresholdCount': 123, 'UnhealthyThresholdCount': 123, 'HealthCheckPath': 'string', 'Matcher': { 'HttpCode': 'string', 'GrpcCode': 'string' }, 'LoadBalancerArns': [ 'string', ], 'TargetType': 'instance'|'ip'|'lambda'|'alb', 'ProtocolVersion': 'string', 'IpAddressType': 'ipv4'|'ipv6' }, ] } **Response Structure** * *(dict) --* * **TargetGroups** *(list) --* Information about the target group. * *(dict) --* Information about a target group. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **TargetGroupName** *(string) --* The name of the target group. * **Protocol** *(string) --* The protocol to use for routing traffic to the targets. * **Port** *(integer) --* The port on which the targets are listening. This parameter is not used if the target is a Lambda function. * **VpcId** *(string) --* The ID of the VPC for the targets. * **HealthCheckProtocol** *(string) --* The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks. * **HealthCheckPort** *(string) --* The port to use to connect with the target. * **HealthCheckEnabled** *(boolean) --* Indicates whether health checks are enabled. * **HealthCheckIntervalSeconds** *(integer) --* The approximate amount of time, in seconds, between health checks of an individual target. * **HealthCheckTimeoutSeconds** *(integer) --* The amount of time, in seconds, during which no response means a failed health check. * **HealthyThresholdCount** *(integer) --* The number of consecutive health checks successes required before considering an unhealthy target healthy. * **UnhealthyThresholdCount** *(integer) --* The number of consecutive health check failures required before considering the target unhealthy. * **HealthCheckPath** *(string) --* The destination for health checks on the targets. * **Matcher** *(dict) --* The HTTP or gRPC codes to use when checking for a successful response from a target. * **HttpCode** *(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. * **GrpcCode** *(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. * **LoadBalancerArns** *(list) --* 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. * *(string) --* * **TargetType** *(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). * **ProtocolVersion** *(string) --* [HTTP/HTTPS protocol] The protocol version. The possible values are "GRPC", "HTTP1", and "HTTP2". * **IpAddressType** *(string) --* The IP address type. The default value is "ipv4". **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.DuplicateTargetGroupNa meException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTargetGroupsExc eption" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTagsException" **Examples** 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. response = client.create_target_group( Name='my-targets', Port=80, Protocol='HTTP', VpcId='vpc-3ac0fb5f', ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / modify_listener_attributes modify_listener_attributes ************************** ElasticLoadBalancingv2.Client.modify_listener_attributes(**kwargs) Modifies the specified attributes of the specified listener. See also: AWS API Documentation **Request Syntax** response = client.modify_listener_attributes( ListenerArn='string', Attributes=[ { 'Key': 'string', 'Value': 'string' }, ] ) Parameters: * **ListenerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the listener. * **Attributes** (*list*) -- **[REQUIRED]** The listener attributes. * *(dict) --* Information about a listener attribute. * **Key** *(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. The following attributes are only supported by Application Load Balancers. * "routing.http.request.x_amzn_mtls_clientcert_serial_num ber.header_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Serial-Number** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_issuer.hea der_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Issuer** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_subject.he ader_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Subject** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_validity.h eader_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Validity** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_leaf.heade r_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Leaf** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert.header_nam e" - Enables you to modify the header name of the **X -Amzn-Mtls-Clientcert** HTTP request header. * "routing.http.request.x_amzn_tls_version.header_name" - Enables you to modify the header name of the **X-Amzn- Tls-Version** HTTP request header. * "routing.http.request.x_amzn_tls_cipher_suite.header_na me" - Enables you to modify the header name of the **X -Amzn-Tls-Cipher-Suite** HTTP request header. * "routing.http.response.server.enabled" - Enables you to allow or remove the HTTP response server header. * "routing.http.response.strict_transport_security.header _value" - Informs browsers that the site should only be accessed using HTTPS, and that any future attempts to access it using HTTP should automatically be converted to HTTPS. * "routing.http.response.access_control_allow_origin.head er_value" - Specifies which origins are allowed to access the server. * "routing.http.response.access_control_allow_methods.hea der_value" - Returns which HTTP methods are allowed when accessing the server from a different origin. * "routing.http.response.access_control_allow_headers.hea der_value" - Specifies which headers can be used during the request. * "routing.http.response.access_control_allow_credentials .header_value" - Indicates whether the browser should include credentials such as cookies or authentication when making requests. * "routing.http.response.access_control_expose_headers.he ader_value" - Returns which headers the browser can expose to the requesting client. * "routing.http.response.access_control_max_age.header_va lue" - Specifies how long the results of a preflight request can be cached, in seconds. * "routing.http.response.content_security_policy.header_v alue" - Specifies restrictions enforced by the browser to help minimize the risk of certain types of security threats. * "routing.http.response.x_content_type_options.header_va lue" - Indicates whether the MIME types advertised in the **Content-Type** headers should be followed and not be changed. * "routing.http.response.x_frame_options.header_value" - Indicates whether the browser is allowed to render a page in a **frame**, **iframe**, **embed** or **object**. * **Value** *(string) --* The value of the attribute. Return type: dict Returns: **Response Syntax** { 'Attributes': [ { 'Key': 'string', 'Value': 'string' }, ] } **Response Structure** * *(dict) --* * **Attributes** *(list) --* Information about the listener attributes. * *(dict) --* Information about a listener attribute. * **Key** *(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. The following attributes are only supported by Application Load Balancers. * "routing.http.request.x_amzn_mtls_clientcert_serial_n umber.header_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Serial-Number** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_issuer.h eader_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Issuer** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_subject. header_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Subject** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_validity .header_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Validity** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_leaf.hea der_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Leaf** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert.header_n ame" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert** HTTP request header. * "routing.http.request.x_amzn_tls_version.header_name" - Enables you to modify the header name of the **X -Amzn-Tls-Version** HTTP request header. * "routing.http.request.x_amzn_tls_cipher_suite.header_ name" - Enables you to modify the header name of the **X-Amzn-Tls-Cipher-Suite** HTTP request header. * "routing.http.response.server.enabled" - Enables you to allow or remove the HTTP response server header. * "routing.http.response.strict_transport_security.head er_value" - Informs browsers that the site should only be accessed using HTTPS, and that any future attempts to access it using HTTP should automatically be converted to HTTPS. * "routing.http.response.access_control_allow_origin.he ader_value" - Specifies which origins are allowed to access the server. * "routing.http.response.access_control_allow_methods.h eader_value" - Returns which HTTP methods are allowed when accessing the server from a different origin. * "routing.http.response.access_control_allow_headers.h eader_value" - Specifies which headers can be used during the request. * "routing.http.response.access_control_allow_credentia ls.header_value" - Indicates whether the browser should include credentials such as cookies or authentication when making requests. * "routing.http.response.access_control_expose_headers. header_value" - Returns which headers the browser can expose to the requesting client. * "routing.http.response.access_control_max_age.header_ value" - Specifies how long the results of a preflight request can be cached, in seconds. * "routing.http.response.content_security_policy.header _value" - Specifies restrictions enforced by the browser to help minimize the risk of certain types of security threats. * "routing.http.response.x_content_type_options.header_ value" - Indicates whether the MIME types advertised in the **Content-Type** headers should be followed and not be changed. * "routing.http.response.x_frame_options.header_value" - Indicates whether the browser is allowed to render a page in a **frame**, **iframe**, **embed** or **object**. * **Value** *(string) --* The value of the attribute. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" ElasticLoadBalancingv2 / Client / modify_target_group_attributes modify_target_group_attributes ****************************** ElasticLoadBalancingv2.Client.modify_target_group_attributes(**kwargs) Modifies the specified attributes of the specified target group. See also: AWS API Documentation **Request Syntax** response = client.modify_target_group_attributes( TargetGroupArn='string', Attributes=[ { 'Key': 'string', 'Value': 'string' }, ] ) Parameters: * **TargetGroupArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the target group. * **Attributes** (*list*) -- **[REQUIRED]** The target group attributes. * *(dict) --* Information about a target group attribute. * **Key** *(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_targe ts.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 1. * "target_group_health.dns_failover.minimum_healthy_targe ts.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_he althy_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_he althy_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 can't 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.e nabled" - Indicates whether the load balancer terminates connections to unhealthy targets. The value is "true" or "false". The default is "true". This attribute can't be enabled for UDP and TCP_UDP target groups. * "target_health_state.unhealthy.draining_interval_second s" - 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_heal th_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") can't be set independently. The value you set for both attributes must be the same. * **Value** *(string) --* The value of the attribute. Return type: dict Returns: **Response Syntax** { 'Attributes': [ { 'Key': 'string', 'Value': 'string' }, ] } **Response Structure** * *(dict) --* * **Attributes** *(list) --* Information about the target group attributes. * *(dict) --* Information about a target group attribute. * **Key** *(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_tar gets.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 1. * "target_group_health.dns_failover.minimum_healthy_tar gets.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 can't 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". This attribute can't be enabled for UDP and TCP_UDP target groups. * "target_health_state.unhealthy.draining_interval_seco nds" - 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_termin ation.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") can't be set independently. The value you set for both attributes must be the same. * **Value** *(string) --* The value of the attribute. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" **Examples** This example sets the deregistration delay timeout to the specified value for the specified target group. response = client.modify_target_group_attributes( Attributes=[ { 'Key': 'deregistration_delay.timeout_seconds', 'Value': '600', }, ], TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / create_rule create_rule *********** ElasticLoadBalancingv2.Client.create_rule(**kwargs) 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*. See also: AWS API Documentation **Request Syntax** response = client.create_rule( ListenerArn='string', Conditions=[ { 'Field': 'string', 'Values': [ 'string', ], 'HostHeaderConfig': { 'Values': [ 'string', ] }, 'PathPatternConfig': { 'Values': [ 'string', ] }, 'HttpHeaderConfig': { 'HttpHeaderName': 'string', 'Values': [ 'string', ] }, 'QueryStringConfig': { 'Values': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'HttpRequestMethodConfig': { 'Values': [ 'string', ] }, 'SourceIpConfig': { 'Values': [ 'string', ] } }, ], Priority=123, Actions=[ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ] ) Parameters: * **ListenerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the listener. * **Conditions** (*list*) -- **[REQUIRED]** The conditions. * *(dict) --* 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 can't be empty. For more information, see Quotas for your Application Load Balancers. * **Field** *(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" * **Values** *(list) --* 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 &) * * (matches 0 or more characters) * ? (matches exactly 1 character) * *(string) --* * **HostHeaderConfig** *(dict) --* Information for a host header condition. Specify only when "Field" is "host-header". * **Values** *(list) --* 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). You must include at least one "." character. You can include only alphabetical characters after the final "." character. If you specify multiple strings, the condition is satisfied if one of the strings matches the host name. * *(string) --* * **PathPatternConfig** *(dict) --* Information for a path pattern condition. Specify only when "Field" is "path-pattern". * **Values** *(list) --* 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 a query string condition. * *(string) --* * **HttpHeaderConfig** *(dict) --* Information for an HTTP header condition. Specify only when "Field" is "http-header". * **HttpHeaderName** *(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. Instead, use a host condition. * **Values** *(list) --* 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. * *(string) --* * **QueryStringConfig** *(dict) --* Information for a query string condition. Specify only when "Field" is "query-string". * **Values** *(list) --* 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. * *(dict) --* Information about a key/value pair. * **Key** *(string) --* The key. You can omit the key. * **Value** *(string) --* The value. * **HttpRequestMethodConfig** *(dict) --* Information for an HTTP method condition. Specify only when "Field" is "http-request-method". * **Values** *(list) --* 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. * *(string) --* * **SourceIpConfig** *(dict) --* Information for a source IP condition. Specify only when "Field" is "source-ip". * **Values** *(list) --* 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 an HTTP header condition. The total number of values must be less than, or equal to five. * *(string) --* * **Priority** (*integer*) -- **[REQUIRED]** The rule priority. A listener can't have multiple rules with the same priority. * **Actions** (*list*) -- **[REQUIRED]** The actions. * *(dict) --* 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. * **Type** *(string) --* **[REQUIRED]** The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate-oidc". * **Issuer** *(string) --* **[REQUIRED]** The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* **[REQUIRED]** The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* **[REQUIRED]** The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* **[REQUIRED]** The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* **[REQUIRED]** The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* **[REQUIRED]** The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* **[REQUIRED]** The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent-encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* **[REQUIRED]** The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* **[REQUIRED]** The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **Tags** (*list*) -- The tags to assign to the rule. * *(dict) --* Information about a tag. * **Key** *(string) --* **[REQUIRED]** The key of the tag. * **Value** *(string) --* The value of the tag. Return type: dict Returns: **Response Syntax** { 'Rules': [ { 'RuleArn': 'string', 'Priority': 'string', 'Conditions': [ { 'Field': 'string', 'Values': [ 'string', ], 'HostHeaderConfig': { 'Values': [ 'string', ] }, 'PathPatternConfig': { 'Values': [ 'string', ] }, 'HttpHeaderConfig': { 'HttpHeaderName': 'string', 'Values': [ 'string', ] }, 'QueryStringConfig': { 'Values': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'HttpRequestMethodConfig': { 'Values': [ 'string', ] }, 'SourceIpConfig': { 'Values': [ 'string', ] } }, ], 'Actions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], 'IsDefault': True|False }, ] } **Response Structure** * *(dict) --* * **Rules** *(list) --* Information about the rule. * *(dict) --* Information about a rule. * **RuleArn** *(string) --* The Amazon Resource Name (ARN) of the rule. * **Priority** *(string) --* The priority. * **Conditions** *(list) --* 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". * *(dict) --* 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 can't be empty. For more information, see Quotas for your Application Load Balancers. * **Field** *(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" * **Values** *(list) --* 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 &) * * (matches 0 or more characters) * ? (matches exactly 1 character) * *(string) --* * **HostHeaderConfig** *(dict) --* Information for a host header condition. Specify only when "Field" is "host-header". * **Values** *(list) --* 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). You must include at least one "." character. You can include only alphabetical characters after the final "." character. If you specify multiple strings, the condition is satisfied if one of the strings matches the host name. * *(string) --* * **PathPatternConfig** *(dict) --* Information for a path pattern condition. Specify only when "Field" is "path-pattern". * **Values** *(list) --* 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 a query string condition. * *(string) --* * **HttpHeaderConfig** *(dict) --* Information for an HTTP header condition. Specify only when "Field" is "http-header". * **HttpHeaderName** *(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. Instead, use a host condition. * **Values** *(list) --* 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. * *(string) --* * **QueryStringConfig** *(dict) --* Information for a query string condition. Specify only when "Field" is "query-string". * **Values** *(list) --* 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. * *(dict) --* Information about a key/value pair. * **Key** *(string) --* The key. You can omit the key. * **Value** *(string) --* The value. * **HttpRequestMethodConfig** *(dict) --* Information for an HTTP method condition. Specify only when "Field" is "http-request-method". * **Values** *(list) --* 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. * *(string) --* * **SourceIpConfig** *(dict) --* Information for a source IP condition. Specify only when "Field" is "source-ip". * **Values** *(list) --* 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 an HTTP header condition. The total number of values must be less than, or equal to five. * *(string) --* * **Actions** *(list) --* 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. * *(dict) --* 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. * **Type** *(string) --* The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate- oidc". * **Issuer** *(string) --* The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent- encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **IsDefault** *(boolean) --* Indicates whether this is the default rule. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.PriorityInUseException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTargetGroupsExc eption" * "ElasticLoadBalancingv2.Client.exceptions.TooManyRulesException" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupAssociation LimitException" * "ElasticLoadBalancingv2.Client.exceptions.IncompatibleProtocolsE xception" * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyRegistrationsFo rTargetIdException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTargetsExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.UnsupportedProtocolExc eption" * "ElasticLoadBalancingv2.Client.exceptions.TooManyActionsExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.InvalidLoadBalancerAct ionException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyUniqueTargetGro upsPerLoadBalancerException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTagsException" **Examples** This example creates a rule that forwards requests to the specified target group if the URL contains the specified pattern (for example, /img/>>*<<). response = client.create_rule( 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, ) print(response) Expected Output: { 'Rules': [ { 'Actions': [ { 'TargetGroupArn': 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', 'Type': 'forward', }, ], 'Conditions': [ { 'Field': 'path-pattern', 'Values': [ '/img/*', ], }, ], 'IsDefault': False, 'Priority': '10', 'RuleArn': 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / can_paginate can_paginate ************ ElasticLoadBalancingv2.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. ElasticLoadBalancingv2 / Client / add_listener_certificates add_listener_certificates ************************* ElasticLoadBalancingv2.Client.add_listener_certificates(**kwargs) 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 SSL certificates in the *Application Load Balancers Guide* or Server certificates in the *Network Load Balancers Guide*. See also: AWS API Documentation **Request Syntax** response = client.add_listener_certificates( ListenerArn='string', Certificates=[ { 'CertificateArn': 'string', 'IsDefault': True|False }, ] ) Parameters: * **ListenerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the listener. * **Certificates** (*list*) -- **[REQUIRED]** The certificate to add. You can specify one certificate per call. Set "CertificateArn" to the certificate ARN but do not set "IsDefault". * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. Return type: dict Returns: **Response Syntax** { 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ] } **Response Structure** * *(dict) --* * **Certificates** *(list) --* Information about the certificates in the certificate list. * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.TooManyCertificatesExc eption" * "ElasticLoadBalancingv2.Client.exceptions.CertificateNotFoundExc eption" ElasticLoadBalancingv2 / Client / delete_rule delete_rule *********** ElasticLoadBalancingv2.Client.delete_rule(**kwargs) Deletes the specified rule. You can't delete the default rule. See also: AWS API Documentation **Request Syntax** response = client.delete_rule( RuleArn='string' ) Parameters: **RuleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the rule. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException" * "ElasticLoadBalancingv2.Client.exceptions.OperationNotPermittedE xception" **Examples** This example deletes the specified rule. response = client.delete_rule( RuleArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3', ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / create_listener create_listener *************** ElasticLoadBalancingv2.Client.create_listener(**kwargs) Creates a listener for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer. For more information, see the following: * Listeners for your Application Load Balancers * Listeners for your Network Load Balancers * Listeners for your Gateway Load Balancers 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. See also: AWS API Documentation **Request Syntax** response = client.create_listener( LoadBalancerArn='string', Protocol='HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', Port=123, SslPolicy='string', Certificates=[ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], DefaultActions=[ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], AlpnPolicy=[ 'string', ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ], MutualAuthentication={ 'Mode': 'string', 'TrustStoreArn': 'string', 'IgnoreClientCertificateExpiry': True|False, 'TrustStoreAssociationStatus': 'active'|'removed', 'AdvertiseTrustStoreCaNames': 'on'|'off' } ) Parameters: * **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. * **Protocol** (*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 can't specify a protocol for a Gateway Load Balancer. * **Port** (*integer*) -- The port on which the load balancer is listening. You can't specify a port for a Gateway Load Balancer. * **SslPolicy** (*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*. * **Certificates** (*list*) -- [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". * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. * **DefaultActions** (*list*) -- **[REQUIRED]** The actions for the default rule. * *(dict) --* 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. * **Type** *(string) --* **[REQUIRED]** The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate-oidc". * **Issuer** *(string) --* **[REQUIRED]** The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* **[REQUIRED]** The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* **[REQUIRED]** The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* **[REQUIRED]** The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* **[REQUIRED]** The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* **[REQUIRED]** The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* **[REQUIRED]** The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent-encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* **[REQUIRED]** The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* **[REQUIRED]** The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **AlpnPolicy** (*list*) -- [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*. * *(string) --* * **Tags** (*list*) -- The tags to assign to the listener. * *(dict) --* Information about a tag. * **Key** *(string) --* **[REQUIRED]** The key of the tag. * **Value** *(string) --* The value of the tag. * **MutualAuthentication** (*dict*) -- The mutual authentication configuration information. * **Mode** *(string) --* The client certificate handling method. Options are "off", "passthrough" or "verify". The default value is "off". * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **IgnoreClientCertificateExpiry** *(boolean) --* Indicates whether expired client certificates are ignored. * **TrustStoreAssociationStatus** *(string) --* Indicates a shared trust stores association status. * **AdvertiseTrustStoreCaNames** *(string) --* Indicates whether trust store CA certificate names are advertised. Return type: dict Returns: **Response Syntax** { 'Listeners': [ { 'ListenerArn': 'string', 'LoadBalancerArn': 'string', 'Port': 123, 'Protocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], 'SslPolicy': 'string', 'DefaultActions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], 'AlpnPolicy': [ 'string', ], 'MutualAuthentication': { 'Mode': 'string', 'TrustStoreArn': 'string', 'IgnoreClientCertificateExpiry': True|False, 'TrustStoreAssociationStatus': 'active'|'removed', 'AdvertiseTrustStoreCaNames': 'on'|'off' } }, ] } **Response Structure** * *(dict) --* * **Listeners** *(list) --* Information about the listener. * *(dict) --* Information about a listener. * **ListenerArn** *(string) --* The Amazon Resource Name (ARN) of the listener. * **LoadBalancerArn** *(string) --* The Amazon Resource Name (ARN) of the load balancer. * **Port** *(integer) --* The port on which the load balancer is listening. * **Protocol** *(string) --* The protocol for connections from clients to the load balancer. * **Certificates** *(list) --* [HTTPS or TLS listener] The default certificate for the listener. * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. * **SslPolicy** *(string) --* [HTTPS or TLS listener] The security policy that defines which protocols and ciphers are supported. * **DefaultActions** *(list) --* The default actions for the listener. * *(dict) --* 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. * **Type** *(string) --* The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate- oidc". * **Issuer** *(string) --* The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent- encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **AlpnPolicy** *(list) --* [TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy. * *(string) --* * **MutualAuthentication** *(dict) --* The mutual authentication configuration information. * **Mode** *(string) --* The client certificate handling method. Options are "off", "passthrough" or "verify". The default value is "off". * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **IgnoreClientCertificateExpiry** *(boolean) --* Indicates whether expired client certificates are ignored. * **TrustStoreAssociationStatus** *(string) --* Indicates a shared trust stores association status. * **AdvertiseTrustStoreCaNames** *(string) --* Indicates whether trust store CA certificate names are advertised. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.DuplicateListenerExcep tion" * "ElasticLoadBalancingv2.Client.exceptions.TooManyListenersExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.TooManyCertificatesExc eption" * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupAssociation LimitException" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" * "ElasticLoadBalancingv2.Client.exceptions.IncompatibleProtocolsE xception" * "ElasticLoadBalancingv2.Client.exceptions.SSLPolicyNotFoundExcep tion" * "ElasticLoadBalancingv2.Client.exceptions.CertificateNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.UnsupportedProtocolExc eption" * "ElasticLoadBalancingv2.Client.exceptions.TooManyRegistrationsFo rTargetIdException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTargetsExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.TooManyActionsExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.InvalidLoadBalancerAct ionException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyUniqueTargetGro upsPerLoadBalancerException" * "ElasticLoadBalancingv2.Client.exceptions.ALPNPolicyNotSupported Exception" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTagsException" * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotReadyExce ption" **Examples** This example creates an HTTP listener for the specified load balancer that forwards requests to the specified target group. response = client.create_listener( 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', ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } 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). response = client.create_listener( 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', ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / describe_target_groups describe_target_groups ********************** ElasticLoadBalancingv2.Client.describe_target_groups(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.describe_target_groups( LoadBalancerArn='string', TargetGroupArns=[ 'string', ], Names=[ 'string', ], Marker='string', PageSize=123 ) Parameters: * **LoadBalancerArn** (*string*) -- The Amazon Resource Name (ARN) of the load balancer. * **TargetGroupArns** (*list*) -- The Amazon Resource Names (ARN) of the target groups. * *(string) --* * **Names** (*list*) -- The names of the target groups. * *(string) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. Return type: dict Returns: **Response Syntax** { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'TargetGroupName': 'string', 'Protocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'Port': 123, 'VpcId': 'string', 'HealthCheckProtocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'HealthCheckPort': 'string', 'HealthCheckEnabled': True|False, 'HealthCheckIntervalSeconds': 123, 'HealthCheckTimeoutSeconds': 123, 'HealthyThresholdCount': 123, 'UnhealthyThresholdCount': 123, 'HealthCheckPath': 'string', 'Matcher': { 'HttpCode': 'string', 'GrpcCode': 'string' }, 'LoadBalancerArns': [ 'string', ], 'TargetType': 'instance'|'ip'|'lambda'|'alb', 'ProtocolVersion': 'string', 'IpAddressType': 'ipv4'|'ipv6' }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **TargetGroups** *(list) --* Information about the target groups. * *(dict) --* Information about a target group. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **TargetGroupName** *(string) --* The name of the target group. * **Protocol** *(string) --* The protocol to use for routing traffic to the targets. * **Port** *(integer) --* The port on which the targets are listening. This parameter is not used if the target is a Lambda function. * **VpcId** *(string) --* The ID of the VPC for the targets. * **HealthCheckProtocol** *(string) --* The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks. * **HealthCheckPort** *(string) --* The port to use to connect with the target. * **HealthCheckEnabled** *(boolean) --* Indicates whether health checks are enabled. * **HealthCheckIntervalSeconds** *(integer) --* The approximate amount of time, in seconds, between health checks of an individual target. * **HealthCheckTimeoutSeconds** *(integer) --* The amount of time, in seconds, during which no response means a failed health check. * **HealthyThresholdCount** *(integer) --* The number of consecutive health checks successes required before considering an unhealthy target healthy. * **UnhealthyThresholdCount** *(integer) --* The number of consecutive health check failures required before considering the target unhealthy. * **HealthCheckPath** *(string) --* The destination for health checks on the targets. * **Matcher** *(dict) --* The HTTP or gRPC codes to use when checking for a successful response from a target. * **HttpCode** *(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. * **GrpcCode** *(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. * **LoadBalancerArns** *(list) --* 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. * *(string) --* * **TargetType** *(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). * **ProtocolVersion** *(string) --* [HTTP/HTTPS protocol] The protocol version. The possible values are "GRPC", "HTTP1", and "HTTP2". * **IpAddressType** *(string) --* The IP address type. The default value is "ipv4". * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" **Examples** This example describes the specified target group. response = client.describe_target_groups( TargetGroupArns=[ 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', ], ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / describe_listener_certificates describe_listener_certificates ****************************** ElasticLoadBalancingv2.Client.describe_listener_certificates(**kwargs) 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*. See also: AWS API Documentation **Request Syntax** response = client.describe_listener_certificates( ListenerArn='string', Marker='string', PageSize=123 ) Parameters: * **ListenerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Names (ARN) of the listener. * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. Return type: dict Returns: **Response Syntax** { 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **Certificates** *(list) --* Information about the certificates. * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" ElasticLoadBalancingv2 / Client / set_rule_priorities set_rule_priorities ******************* ElasticLoadBalancingv2.Client.set_rule_priorities(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.set_rule_priorities( RulePriorities=[ { 'RuleArn': 'string', 'Priority': 123 }, ] ) Parameters: **RulePriorities** (*list*) -- **[REQUIRED]** The rule priorities. * *(dict) --* Information about the priorities for the rules for a listener. * **RuleArn** *(string) --* The Amazon Resource Name (ARN) of the rule. * **Priority** *(integer) --* The rule priority. Return type: dict Returns: **Response Syntax** { 'Rules': [ { 'RuleArn': 'string', 'Priority': 'string', 'Conditions': [ { 'Field': 'string', 'Values': [ 'string', ], 'HostHeaderConfig': { 'Values': [ 'string', ] }, 'PathPatternConfig': { 'Values': [ 'string', ] }, 'HttpHeaderConfig': { 'HttpHeaderName': 'string', 'Values': [ 'string', ] }, 'QueryStringConfig': { 'Values': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'HttpRequestMethodConfig': { 'Values': [ 'string', ] }, 'SourceIpConfig': { 'Values': [ 'string', ] } }, ], 'Actions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], 'IsDefault': True|False }, ] } **Response Structure** * *(dict) --* * **Rules** *(list) --* Information about the rules. * *(dict) --* Information about a rule. * **RuleArn** *(string) --* The Amazon Resource Name (ARN) of the rule. * **Priority** *(string) --* The priority. * **Conditions** *(list) --* 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". * *(dict) --* 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 can't be empty. For more information, see Quotas for your Application Load Balancers. * **Field** *(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" * **Values** *(list) --* 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 &) * * (matches 0 or more characters) * ? (matches exactly 1 character) * *(string) --* * **HostHeaderConfig** *(dict) --* Information for a host header condition. Specify only when "Field" is "host-header". * **Values** *(list) --* 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). You must include at least one "." character. You can include only alphabetical characters after the final "." character. If you specify multiple strings, the condition is satisfied if one of the strings matches the host name. * *(string) --* * **PathPatternConfig** *(dict) --* Information for a path pattern condition. Specify only when "Field" is "path-pattern". * **Values** *(list) --* 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 a query string condition. * *(string) --* * **HttpHeaderConfig** *(dict) --* Information for an HTTP header condition. Specify only when "Field" is "http-header". * **HttpHeaderName** *(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. Instead, use a host condition. * **Values** *(list) --* 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. * *(string) --* * **QueryStringConfig** *(dict) --* Information for a query string condition. Specify only when "Field" is "query-string". * **Values** *(list) --* 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. * *(dict) --* Information about a key/value pair. * **Key** *(string) --* The key. You can omit the key. * **Value** *(string) --* The value. * **HttpRequestMethodConfig** *(dict) --* Information for an HTTP method condition. Specify only when "Field" is "http-request-method". * **Values** *(list) --* 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. * *(string) --* * **SourceIpConfig** *(dict) --* Information for a source IP condition. Specify only when "Field" is "source-ip". * **Values** *(list) --* 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 an HTTP header condition. The total number of values must be less than, or equal to five. * *(string) --* * **Actions** *(list) --* 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. * *(dict) --* 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. * **Type** *(string) --* The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate- oidc". * **Issuer** *(string) --* The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent- encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **IsDefault** *(boolean) --* Indicates whether this is the default rule. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException" * "ElasticLoadBalancingv2.Client.exceptions.PriorityInUseException" * "ElasticLoadBalancingv2.Client.exceptions.OperationNotPermittedE xception" **Examples** This example sets the priority of the specified rule. response = client.set_rule_priorities( RulePriorities=[ { 'Priority': 5, 'RuleArn': 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3', }, ], ) print(response) Expected Output: { 'Rules': [ { 'Actions': [ { 'TargetGroupArn': 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', 'Type': 'forward', }, ], 'Conditions': [ { 'Field': 'path-pattern', 'Values': [ '/img/*', ], }, ], 'IsDefault': False, 'Priority': '5', 'RuleArn': 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/1291d13826f405c3', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / describe_listeners describe_listeners ****************** ElasticLoadBalancingv2.Client.describe_listeners(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.describe_listeners( LoadBalancerArn='string', ListenerArns=[ 'string', ], Marker='string', PageSize=123 ) Parameters: * **LoadBalancerArn** (*string*) -- The Amazon Resource Name (ARN) of the load balancer. * **ListenerArns** (*list*) -- The Amazon Resource Names (ARN) of the listeners. * *(string) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. Return type: dict Returns: **Response Syntax** { 'Listeners': [ { 'ListenerArn': 'string', 'LoadBalancerArn': 'string', 'Port': 123, 'Protocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], 'SslPolicy': 'string', 'DefaultActions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], 'AlpnPolicy': [ 'string', ], 'MutualAuthentication': { 'Mode': 'string', 'TrustStoreArn': 'string', 'IgnoreClientCertificateExpiry': True|False, 'TrustStoreAssociationStatus': 'active'|'removed', 'AdvertiseTrustStoreCaNames': 'on'|'off' } }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **Listeners** *(list) --* Information about the listeners. * *(dict) --* Information about a listener. * **ListenerArn** *(string) --* The Amazon Resource Name (ARN) of the listener. * **LoadBalancerArn** *(string) --* The Amazon Resource Name (ARN) of the load balancer. * **Port** *(integer) --* The port on which the load balancer is listening. * **Protocol** *(string) --* The protocol for connections from clients to the load balancer. * **Certificates** *(list) --* [HTTPS or TLS listener] The default certificate for the listener. * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. * **SslPolicy** *(string) --* [HTTPS or TLS listener] The security policy that defines which protocols and ciphers are supported. * **DefaultActions** *(list) --* The default actions for the listener. * *(dict) --* 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. * **Type** *(string) --* The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate- oidc". * **Issuer** *(string) --* The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent- encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **AlpnPolicy** *(list) --* [TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy. * *(string) --* * **MutualAuthentication** *(dict) --* The mutual authentication configuration information. * **Mode** *(string) --* The client certificate handling method. Options are "off", "passthrough" or "verify". The default value is "off". * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **IgnoreClientCertificateExpiry** *(boolean) --* Indicates whether expired client certificates are ignored. * **TrustStoreAssociationStatus** *(string) --* Indicates a shared trust stores association status. * **AdvertiseTrustStoreCaNames** *(string) --* Indicates whether trust store CA certificate names are advertised. * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.UnsupportedProtocolExc eption" **Examples** This example describes the specified listener. response = client.describe_listeners( ListenerArns=[ 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2', ], ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / describe_trust_store_revocations describe_trust_store_revocations ******************************** ElasticLoadBalancingv2.Client.describe_trust_store_revocations(**kwargs) Describes the revocation files in use by the specified trust store or revocation files. See also: AWS API Documentation **Request Syntax** response = client.describe_trust_store_revocations( TrustStoreArn='string', RevocationIds=[ 123, ], Marker='string', PageSize=123 ) Parameters: * **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. * **RevocationIds** (*list*) -- The revocation IDs of the revocation files you want to describe. * *(integer) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. Return type: dict Returns: **Response Syntax** { 'TrustStoreRevocations': [ { 'TrustStoreArn': 'string', 'RevocationId': 123, 'RevocationType': 'CRL', 'NumberOfRevokedEntries': 123 }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **TrustStoreRevocations** *(list) --* Information about the revocation file in the trust store. * *(dict) --* Information about the revocations used by a trust store. * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **RevocationId** *(integer) --* The revocation ID of a revocation file in use. * **RevocationType** *(string) --* The type of revocation file. * **NumberOfRevokedEntries** *(integer) --* The number of revoked certificates. * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" * "ElasticLoadBalancingv2.Client.exceptions.RevocationIdNotFoundEx ception" ElasticLoadBalancingv2 / Client / describe_tags describe_tags ************* ElasticLoadBalancingv2.Client.describe_tags(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.describe_tags( ResourceArns=[ 'string', ] ) Parameters: **ResourceArns** (*list*) -- **[REQUIRED]** The Amazon Resource Names (ARN) of the resources. You can specify up to 20 resources in a single call. * *(string) --* Return type: dict Returns: **Response Syntax** { 'TagDescriptions': [ { 'ResourceArn': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] } **Response Structure** * *(dict) --* * **TagDescriptions** *(list) --* Information about the tags. * *(dict) --* The tags associated with a resource. * **ResourceArn** *(string) --* The Amazon Resource Name (ARN) of the resource. * **Tags** *(list) --* Information about the tags. * *(dict) --* Information about a tag. * **Key** *(string) --* The key of the tag. * **Value** *(string) --* The value of the tag. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException" * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" **Examples** This example describes the tags assigned to the specified load balancer. response = client.describe_tags( ResourceArns=[ 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', ], ) print(response) Expected Output: { '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', }, ], }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / create_load_balancer create_load_balancer ******************** ElasticLoadBalancingv2.Client.create_load_balancer(**kwargs) Creates an Application Load Balancer, Network Load Balancer, or Gateway Load Balancer. For more information, see the following: * Application Load Balancers * Network Load Balancers * Gateway Load Balancers 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. See also: AWS API Documentation **Request Syntax** response = client.create_load_balancer( Name='string', Subnets=[ 'string', ], SubnetMappings=[ { 'SubnetId': 'string', 'AllocationId': 'string', 'PrivateIPv4Address': 'string', 'IPv6Address': 'string', 'SourceNatIpv6Prefix': 'string' }, ], SecurityGroups=[ 'string', ], Scheme='internet-facing'|'internal', Tags=[ { 'Key': 'string', 'Value': 'string' }, ], Type='application'|'network'|'gateway', IpAddressType='ipv4'|'dualstack'|'dualstack-without-public-ipv4', CustomerOwnedIpv4Pool='string', EnablePrefixForIpv6SourceNat='on'|'off', IpamPools={ 'Ipv4IpamPoolId': 'string' } ) Parameters: * **Name** (*string*) -- **[REQUIRED]** 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-". * **Subnets** (*list*) -- 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 and Gateway Load Balancers] You can specify subnets from one or more Availability Zones. * *(string) --* * **SubnetMappings** (*list*) -- 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 can't 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 can't specify Elastic IP addresses for your subnets. * *(dict) --* Information about a subnet mapping. * **SubnetId** *(string) --* The ID of the subnet. * **AllocationId** *(string) --* [Network Load Balancers] The allocation ID of the Elastic IP address for an internet-facing load balancer. * **PrivateIPv4Address** *(string) --* [Network Load Balancers] The private IPv4 address for an internal load balancer. * **IPv6Address** *(string) --* [Network Load Balancers] The IPv6 address. * **SourceNatIpv6Prefix** *(string) --* [Network Load Balancers with UDP listeners] The IPv6 prefix to use for source NAT. Specify an IPv6 prefix (/80 netmask) from the subnet CIDR block or "auto_assigned" to use an IPv6 prefix selected at random from the subnet CIDR block. * **SecurityGroups** (*list*) -- [Application Load Balancers and Network Load Balancers] The IDs of the security groups for the load balancer. * *(string) --* * **Scheme** (*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 can't specify a scheme for a Gateway Load Balancer. * **Tags** (*list*) -- The tags to assign to the load balancer. * *(dict) --* Information about a tag. * **Key** *(string) --* **[REQUIRED]** The key of the tag. * **Value** *(string) --* The value of the tag. * **Type** (*string*) -- The type of load balancer. The default is "application". * **IpAddressType** (*string*) -- The IP address type. Internal load balancers must use "ipv4". [Application Load Balancers] The possible values are "ipv4" (IPv4 addresses), "dualstack" (IPv4 and IPv6 addresses), and "dualstack-without-public-ipv4" (public IPv6 addresses and private IPv4 and IPv6 addresses). [Network Load Balancers and Gateway Load Balancers] The possible values are "ipv4" (IPv4 addresses) and "dualstack" (IPv4 and IPv6 addresses). * **CustomerOwnedIpv4Pool** (*string*) -- [Application Load Balancers on Outposts] The ID of the customer-owned address pool (CoIP pool). * **EnablePrefixForIpv6SourceNat** (*string*) -- [Network Load Balancers with UDP listeners] Indicates whether to use an IPv6 prefix from each subnet for source NAT. The IP address type must be "dualstack". The default value is "off". * **IpamPools** (*dict*) -- [Application Load Balancers] The IPAM pools to use with the load balancer. * **Ipv4IpamPoolId** *(string) --* The ID of the IPv4 IPAM pool. Return type: dict Returns: **Response Syntax** { 'LoadBalancers': [ { 'LoadBalancerArn': 'string', 'DNSName': 'string', 'CanonicalHostedZoneId': 'string', 'CreatedTime': datetime(2015, 1, 1), 'LoadBalancerName': 'string', 'Scheme': 'internet-facing'|'internal', 'VpcId': 'string', 'State': { 'Code': 'active'|'provisioning'|'active_impaired'|'failed', 'Reason': 'string' }, 'Type': 'application'|'network'|'gateway', 'AvailabilityZones': [ { 'ZoneName': 'string', 'SubnetId': 'string', 'OutpostId': 'string', 'LoadBalancerAddresses': [ { 'IpAddress': 'string', 'AllocationId': 'string', 'PrivateIPv4Address': 'string', 'IPv6Address': 'string' }, ], 'SourceNatIpv6Prefixes': [ 'string', ] }, ], 'SecurityGroups': [ 'string', ], 'IpAddressType': 'ipv4'|'dualstack'|'dualstack-without-public-ipv4', 'CustomerOwnedIpv4Pool': 'string', 'EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic': 'string', 'EnablePrefixForIpv6SourceNat': 'on'|'off', 'IpamPools': { 'Ipv4IpamPoolId': 'string' } }, ] } **Response Structure** * *(dict) --* * **LoadBalancers** *(list) --* Information about the load balancer. * *(dict) --* Information about a load balancer. * **LoadBalancerArn** *(string) --* The Amazon Resource Name (ARN) of the load balancer. * **DNSName** *(string) --* The public DNS name of the load balancer. * **CanonicalHostedZoneId** *(string) --* The ID of the Amazon Route 53 hosted zone associated with the load balancer. * **CreatedTime** *(datetime) --* The date and time the load balancer was created. * **LoadBalancerName** *(string) --* The name of the load balancer. * **Scheme** *(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. * **VpcId** *(string) --* The ID of the VPC for the load balancer. * **State** *(dict) --* The state of the load balancer. * **Code** *(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 is "active_impaired". If the load balancer could not be set up, its state is "failed". * **Reason** *(string) --* A description of the state. * **Type** *(string) --* The type of load balancer. * **AvailabilityZones** *(list) --* The subnets for the load balancer. * *(dict) --* Information about an Availability Zone. * **ZoneName** *(string) --* The name of the Availability Zone. * **SubnetId** *(string) --* The ID of the subnet. You can specify one subnet per Availability Zone. * **OutpostId** *(string) --* [Application Load Balancers on Outposts] The ID of the Outpost. * **LoadBalancerAddresses** *(list) --* [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. * *(dict) --* Information about a static IP address for a load balancer. * **IpAddress** *(string) --* The static IP address. * **AllocationId** *(string) --* [Network Load Balancers] The allocation ID of the Elastic IP address for an internal-facing load balancer. * **PrivateIPv4Address** *(string) --* [Network Load Balancers] The private IPv4 address for an internal load balancer. * **IPv6Address** *(string) --* [Network Load Balancers] The IPv6 address. * **SourceNatIpv6Prefixes** *(list) --* [Network Load Balancers with UDP listeners] The IPv6 prefixes to use for source NAT. For each subnet, specify an IPv6 prefix (/80 netmask) from the subnet CIDR block or "auto_assigned" to use an IPv6 prefix selected at random from the subnet CIDR block. * *(string) --* * **SecurityGroups** *(list) --* The IDs of the security groups for the load balancer. * *(string) --* * **IpAddressType** *(string) --* The type of IP addresses used for public or private connections by the subnets attached to your load balancer. [Application Load Balancers] The possible values are "ipv4" (IPv4 addresses), "dualstack" (IPv4 and IPv6 addresses), and "dualstack-without-public-ipv4" (public IPv6 addresses and private IPv4 and IPv6 addresses). [Network Load Balancers and Gateway Load Balancers] The possible values are "ipv4" (IPv4 addresses) and "dualstack" (IPv4 and IPv6 addresses). * **CustomerOwnedIpv4Pool** *(string) --* [Application Load Balancers on Outposts] The ID of the customer-owned address pool. * **EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic** *(string) --* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink. * **EnablePrefixForIpv6SourceNat** *(string) --* [Network Load Balancers with UDP listeners] Indicates whether to use an IPv6 prefix from each subnet for source NAT. The IP address type must be "dualstack". The default value is "off". * **IpamPools** *(dict) --* [Application Load Balancers] The IPAM pool in use by the load balancer, if configured. * **Ipv4IpamPoolId** *(string) --* The ID of the IPv4 IPAM pool. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.DuplicateLoadBalancerN ameException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyLoadBalancersEx ception" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" * "ElasticLoadBalancingv2.Client.exceptions.SubnetNotFoundExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.InvalidSubnetException" * "ElasticLoadBalancingv2.Client.exceptions.InvalidSecurityGroupEx ception" * "ElasticLoadBalancingv2.Client.exceptions.InvalidSchemeException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTagsException" * "ElasticLoadBalancingv2.Client.exceptions.DuplicateTagKeysExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.ResourceInUseException" * "ElasticLoadBalancingv2.Client.exceptions.AllocationIdNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.AvailabilityZoneNotSup portedException" * "ElasticLoadBalancingv2.Client.exceptions.OperationNotPermittedE xception" **Examples** This example creates an Internet-facing load balancer and enables the Availability Zones for the specified subnets. response = client.create_load_balancer( Name='my-load-balancer', Subnets=[ 'subnet-b7d581c0', 'subnet-8360a9e7', ], ) print(response) Expected Output: { 'LoadBalancers': [ { 'AvailabilityZones': [ { 'SubnetId': 'subnet-8360a9e7', 'ZoneName': 'us-west-2a', }, { 'SubnetId': 'subnet-b7d581c0', 'ZoneName': 'us-west-2b', }, ], 'CanonicalHostedZoneId': 'Z2P70J7EXAMPLE', 'CreatedTime': datetime(2016, 3, 25, 21, 26, 12, 4, 85, 0), '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', }, ], 'ResponseMetadata': { '...': '...', }, } This example creates an internal load balancer and enables the Availability Zones for the specified subnets. response = client.create_load_balancer( Name='my-internal-load-balancer', Scheme='internal', SecurityGroups=[ ], Subnets=[ 'subnet-b7d581c0', 'subnet-8360a9e7', ], ) print(response) Expected Output: { 'LoadBalancers': [ { 'AvailabilityZones': [ { 'SubnetId': 'subnet-8360a9e7', 'ZoneName': 'us-west-2a', }, { 'SubnetId': 'subnet-b7d581c0', 'ZoneName': 'us-west-2b', }, ], 'CanonicalHostedZoneId': 'Z2P70J7EXAMPLE', 'CreatedTime': datetime(2016, 3, 25, 21, 29, 48, 4, 85, 0), '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / set_subnets set_subnets *********** ElasticLoadBalancingv2.Client.set_subnets(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.set_subnets( LoadBalancerArn='string', Subnets=[ 'string', ], SubnetMappings=[ { 'SubnetId': 'string', 'AllocationId': 'string', 'PrivateIPv4Address': 'string', 'IPv6Address': 'string', 'SourceNatIpv6Prefix': 'string' }, ], IpAddressType='ipv4'|'dualstack'|'dualstack-without-public-ipv4', EnablePrefixForIpv6SourceNat='on'|'off' ) Parameters: * **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. * **Subnets** (*list*) -- 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 and Gateway Load Balancers] You can specify subnets from one or more Availability Zones. * *(string) --* * **SubnetMappings** (*list*) -- 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 can't 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. * *(dict) --* Information about a subnet mapping. * **SubnetId** *(string) --* The ID of the subnet. * **AllocationId** *(string) --* [Network Load Balancers] The allocation ID of the Elastic IP address for an internet-facing load balancer. * **PrivateIPv4Address** *(string) --* [Network Load Balancers] The private IPv4 address for an internal load balancer. * **IPv6Address** *(string) --* [Network Load Balancers] The IPv6 address. * **SourceNatIpv6Prefix** *(string) --* [Network Load Balancers with UDP listeners] The IPv6 prefix to use for source NAT. Specify an IPv6 prefix (/80 netmask) from the subnet CIDR block or "auto_assigned" to use an IPv6 prefix selected at random from the subnet CIDR block. * **IpAddressType** (*string*) -- The IP address type. [Application Load Balancers] The possible values are "ipv4" (IPv4 addresses), "dualstack" (IPv4 and IPv6 addresses), and "dualstack-without-public-ipv4" (public IPv6 addresses and private IPv4 and IPv6 addresses). [Network Load Balancers and Gateway Load Balancers] The possible values are "ipv4" (IPv4 addresses) and "dualstack" (IPv4 and IPv6 addresses). * **EnablePrefixForIpv6SourceNat** (*string*) -- [Network Load Balancers with UDP listeners] Indicates whether to use an IPv6 prefix from each subnet for source NAT. The IP address type must be "dualstack". The default value is "off". Return type: dict Returns: **Response Syntax** { 'AvailabilityZones': [ { 'ZoneName': 'string', 'SubnetId': 'string', 'OutpostId': 'string', 'LoadBalancerAddresses': [ { 'IpAddress': 'string', 'AllocationId': 'string', 'PrivateIPv4Address': 'string', 'IPv6Address': 'string' }, ], 'SourceNatIpv6Prefixes': [ 'string', ] }, ], 'IpAddressType': 'ipv4'|'dualstack'|'dualstack-without-public-ipv4', 'EnablePrefixForIpv6SourceNat': 'on'|'off' } **Response Structure** * *(dict) --* * **AvailabilityZones** *(list) --* Information about the subnets. * *(dict) --* Information about an Availability Zone. * **ZoneName** *(string) --* The name of the Availability Zone. * **SubnetId** *(string) --* The ID of the subnet. You can specify one subnet per Availability Zone. * **OutpostId** *(string) --* [Application Load Balancers on Outposts] The ID of the Outpost. * **LoadBalancerAddresses** *(list) --* [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. * *(dict) --* Information about a static IP address for a load balancer. * **IpAddress** *(string) --* The static IP address. * **AllocationId** *(string) --* [Network Load Balancers] The allocation ID of the Elastic IP address for an internal-facing load balancer. * **PrivateIPv4Address** *(string) --* [Network Load Balancers] The private IPv4 address for an internal load balancer. * **IPv6Address** *(string) --* [Network Load Balancers] The IPv6 address. * **SourceNatIpv6Prefixes** *(list) --* [Network Load Balancers with UDP listeners] The IPv6 prefixes to use for source NAT. For each subnet, specify an IPv6 prefix (/80 netmask) from the subnet CIDR block or "auto_assigned" to use an IPv6 prefix selected at random from the subnet CIDR block. * *(string) --* * **IpAddressType** *(string) --* The IP address type. * **EnablePrefixForIpv6SourceNat** *(string) --* [Network Load Balancers] Indicates whether to use an IPv6 prefix from each subnet for source NAT. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" * "ElasticLoadBalancingv2.Client.exceptions.SubnetNotFoundExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.InvalidSubnetException" * "ElasticLoadBalancingv2.Client.exceptions.AllocationIdNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.AvailabilityZoneNotSup portedException" * "ElasticLoadBalancingv2.Client.exceptions.CapacityReservationPen dingException" **Examples** This example enables the Availability Zones for the specified subnets for the specified load balancer. response = client.set_subnets( LoadBalancerArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', Subnets=[ 'subnet-8360a9e7', 'subnet-b7d581c0', ], ) print(response) Expected Output: { 'AvailabilityZones': [ { 'SubnetId': 'subnet-8360a9e7', 'ZoneName': 'us-west-2a', }, { 'SubnetId': 'subnet-b7d581c0', 'ZoneName': 'us-west-2b', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / modify_capacity_reservation modify_capacity_reservation *************************** ElasticLoadBalancingv2.Client.modify_capacity_reservation(**kwargs) Modifies the capacity reservation of the specified load balancer. When modifying capacity reservation, you must include at least one "MinimumLoadBalancerCapacity" or "ResetCapacityReservation". See also: AWS API Documentation **Request Syntax** response = client.modify_capacity_reservation( LoadBalancerArn='string', MinimumLoadBalancerCapacity={ 'CapacityUnits': 123 }, ResetCapacityReservation=True|False ) Parameters: * **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. * **MinimumLoadBalancerCapacity** (*dict*) -- The minimum load balancer capacity reserved. * **CapacityUnits** *(integer) --* The number of capacity units. * **ResetCapacityReservation** (*boolean*) -- Resets the capacity reservation. Return type: dict Returns: **Response Syntax** { 'LastModifiedTime': datetime(2015, 1, 1), 'DecreaseRequestsRemaining': 123, 'MinimumLoadBalancerCapacity': { 'CapacityUnits': 123 }, 'CapacityReservationState': [ { 'State': { 'Code': 'provisioned'|'pending'|'rebalancing'|'failed', 'Reason': 'string' }, 'AvailabilityZone': 'string', 'EffectiveCapacityUnits': 123.0 }, ] } **Response Structure** * *(dict) --* * **LastModifiedTime** *(datetime) --* The last time the capacity reservation was modified. * **DecreaseRequestsRemaining** *(integer) --* The amount of daily capacity decreases remaining. * **MinimumLoadBalancerCapacity** *(dict) --* The requested minimum capacity reservation for the load balancer * **CapacityUnits** *(integer) --* The number of capacity units. * **CapacityReservationState** *(list) --* The state of the capacity reservation. * *(dict) --* The capacity reservation status for each Availability Zone. * **State** *(dict) --* The state of the capacity reservation. * **Code** *(string) --* The status code. * **Reason** *(string) --* The reason code for the status. * **AvailabilityZone** *(string) --* Information about the Availability Zone. * **EffectiveCapacityUnits** *(float) --* The number of effective capacity units. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" * "ElasticLoadBalancingv2.Client.exceptions.CapacityUnitsLimitExce ededException" * "ElasticLoadBalancingv2.Client.exceptions.CapacityReservationPen dingException" * "ElasticLoadBalancingv2.Client.exceptions.InsufficientCapacityEx ception" * "ElasticLoadBalancingv2.Client.exceptions.CapacityDecreaseReques tsLimitExceededException" * "ElasticLoadBalancingv2.Client.exceptions.PriorRequestNotComplet eException" * "ElasticLoadBalancingv2.Client.exceptions.OperationNotPermittedE xception" ElasticLoadBalancingv2 / Client / create_trust_store create_trust_store ****************** ElasticLoadBalancingv2.Client.create_trust_store(**kwargs) Creates a trust store. For more information, see Mutual TLS for Application Load Balancers. See also: AWS API Documentation **Request Syntax** response = client.create_trust_store( Name='string', CaCertificatesBundleS3Bucket='string', CaCertificatesBundleS3Key='string', CaCertificatesBundleS3ObjectVersion='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] ) Parameters: * **Name** (*string*) -- **[REQUIRED]** The name of the trust store. This name must be unique per region and can't be changed after creation. * **CaCertificatesBundleS3Bucket** (*string*) -- **[REQUIRED]** The Amazon S3 bucket for the ca certificates bundle. * **CaCertificatesBundleS3Key** (*string*) -- **[REQUIRED]** The Amazon S3 path for the ca certificates bundle. * **CaCertificatesBundleS3ObjectVersion** (*string*) -- The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used. * **Tags** (*list*) -- The tags to assign to the trust store. * *(dict) --* Information about a tag. * **Key** *(string) --* **[REQUIRED]** The key of the tag. * **Value** *(string) --* The value of the tag. Return type: dict Returns: **Response Syntax** { 'TrustStores': [ { 'Name': 'string', 'TrustStoreArn': 'string', 'Status': 'ACTIVE'|'CREATING', 'NumberOfCaCertificates': 123, 'TotalRevokedEntries': 123 }, ] } **Response Structure** * *(dict) --* * **TrustStores** *(list) --* Information about the trust store created. * *(dict) --* Information about a trust store. * **Name** *(string) --* The name of the trust store. * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **Status** *(string) --* The current status of the trust store. * **NumberOfCaCertificates** *(integer) --* The number of ca certificates in the trust store. * **TotalRevokedEntries** *(integer) --* The number of revoked certificates in the trust store. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.DuplicateTrustStoreNam eException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTrustStoresExce ption" * "ElasticLoadBalancingv2.Client.exceptions.InvalidCaCertificatesB undleException" * "ElasticLoadBalancingv2.Client.exceptions.CaCertificatesBundleNo tFoundException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTagsException" * "ElasticLoadBalancingv2.Client.exceptions.DuplicateTagKeysExcept ion" ElasticLoadBalancingv2 / Client / describe_rules describe_rules ************** ElasticLoadBalancingv2.Client.describe_rules(**kwargs) Describes the specified rules or the rules for the specified listener. You must specify either a listener or one or more rules. See also: AWS API Documentation **Request Syntax** response = client.describe_rules( ListenerArn='string', RuleArns=[ 'string', ], Marker='string', PageSize=123 ) Parameters: * **ListenerArn** (*string*) -- The Amazon Resource Name (ARN) of the listener. * **RuleArns** (*list*) -- The Amazon Resource Names (ARN) of the rules. * *(string) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. Return type: dict Returns: **Response Syntax** { 'Rules': [ { 'RuleArn': 'string', 'Priority': 'string', 'Conditions': [ { 'Field': 'string', 'Values': [ 'string', ], 'HostHeaderConfig': { 'Values': [ 'string', ] }, 'PathPatternConfig': { 'Values': [ 'string', ] }, 'HttpHeaderConfig': { 'HttpHeaderName': 'string', 'Values': [ 'string', ] }, 'QueryStringConfig': { 'Values': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'HttpRequestMethodConfig': { 'Values': [ 'string', ] }, 'SourceIpConfig': { 'Values': [ 'string', ] } }, ], 'Actions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], 'IsDefault': True|False }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **Rules** *(list) --* Information about the rules. * *(dict) --* Information about a rule. * **RuleArn** *(string) --* The Amazon Resource Name (ARN) of the rule. * **Priority** *(string) --* The priority. * **Conditions** *(list) --* 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". * *(dict) --* 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 can't be empty. For more information, see Quotas for your Application Load Balancers. * **Field** *(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" * **Values** *(list) --* 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 &) * * (matches 0 or more characters) * ? (matches exactly 1 character) * *(string) --* * **HostHeaderConfig** *(dict) --* Information for a host header condition. Specify only when "Field" is "host-header". * **Values** *(list) --* 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). You must include at least one "." character. You can include only alphabetical characters after the final "." character. If you specify multiple strings, the condition is satisfied if one of the strings matches the host name. * *(string) --* * **PathPatternConfig** *(dict) --* Information for a path pattern condition. Specify only when "Field" is "path-pattern". * **Values** *(list) --* 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 a query string condition. * *(string) --* * **HttpHeaderConfig** *(dict) --* Information for an HTTP header condition. Specify only when "Field" is "http-header". * **HttpHeaderName** *(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. Instead, use a host condition. * **Values** *(list) --* 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. * *(string) --* * **QueryStringConfig** *(dict) --* Information for a query string condition. Specify only when "Field" is "query-string". * **Values** *(list) --* 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. * *(dict) --* Information about a key/value pair. * **Key** *(string) --* The key. You can omit the key. * **Value** *(string) --* The value. * **HttpRequestMethodConfig** *(dict) --* Information for an HTTP method condition. Specify only when "Field" is "http-request-method". * **Values** *(list) --* 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. * *(string) --* * **SourceIpConfig** *(dict) --* Information for a source IP condition. Specify only when "Field" is "source-ip". * **Values** *(list) --* 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 an HTTP header condition. The total number of values must be less than, or equal to five. * *(string) --* * **Actions** *(list) --* 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. * *(dict) --* 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. * **Type** *(string) --* The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate- oidc". * **Issuer** *(string) --* The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent- encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **IsDefault** *(boolean) --* Indicates whether this is the default rule. * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException" * "ElasticLoadBalancingv2.Client.exceptions.UnsupportedProtocolExc eption" **Examples** This example describes the specified rule. response = client.describe_rules( RuleArns=[ 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee', ], ) print(response) Expected Output: { 'Rules': [ { 'Actions': [ { 'TargetGroupArn': 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', 'Type': 'forward', }, ], 'Conditions': [ { 'Field': 'path-pattern', 'Values': [ '/img/*', ], }, ], 'IsDefault': False, 'Priority': '10', 'RuleArn': 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / delete_trust_store delete_trust_store ****************** ElasticLoadBalancingv2.Client.delete_trust_store(**kwargs) Deletes a trust store. See also: AWS API Documentation **Request Syntax** response = client.delete_trust_store( TrustStoreArn='string' ) Parameters: **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreInUseExcepti on" ElasticLoadBalancingv2 / Client / get_waiter get_waiter ********** ElasticLoadBalancingv2.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" ElasticLoadBalancingv2 / Client / describe_target_group_attributes describe_target_group_attributes ******************************** ElasticLoadBalancingv2.Client.describe_target_group_attributes(**kwargs) Describes the attributes for the specified target group. For more information, see the following: * Target group attributes in the *Application Load Balancers Guide* * Target group attributes in the *Network Load Balancers Guide* * Target group attributes in the *Gateway Load Balancers Guide* See also: AWS API Documentation **Request Syntax** response = client.describe_target_group_attributes( TargetGroupArn='string' ) Parameters: **TargetGroupArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the target group. Return type: dict Returns: **Response Syntax** { 'Attributes': [ { 'Key': 'string', 'Value': 'string' }, ] } **Response Structure** * *(dict) --* * **Attributes** *(list) --* Information about the target group attributes * *(dict) --* Information about a target group attribute. * **Key** *(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_tar gets.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 1. * "target_group_health.dns_failover.minimum_healthy_tar gets.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 can't 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". This attribute can't be enabled for UDP and TCP_UDP target groups. * "target_health_state.unhealthy.draining_interval_seco nds" - 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_termin ation.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") can't be set independently. The value you set for both attributes must be the same. * **Value** *(string) --* The value of the attribute. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" **Examples** This example describes the attributes of the specified target group. response = client.describe_target_group_attributes( TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / get_trust_store_revocation_content get_trust_store_revocation_content ********************************** ElasticLoadBalancingv2.Client.get_trust_store_revocation_content(**kwargs) Retrieves the specified revocation file. This action returns a pre-signed S3 URI which is active for ten minutes. See also: AWS API Documentation **Request Syntax** response = client.get_trust_store_revocation_content( TrustStoreArn='string', RevocationId=123 ) Parameters: * **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. * **RevocationId** (*integer*) -- **[REQUIRED]** The revocation ID of the revocation file. Return type: dict Returns: **Response Syntax** { 'Location': 'string' } **Response Structure** * *(dict) --* * **Location** *(string) --* The revocation files Amazon S3 URI. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" * "ElasticLoadBalancingv2.Client.exceptions.RevocationIdNotFoundEx ception" ElasticLoadBalancingv2 / Client / describe_trust_stores describe_trust_stores ********************* ElasticLoadBalancingv2.Client.describe_trust_stores(**kwargs) Describes all trust stores for the specified account. See also: AWS API Documentation **Request Syntax** response = client.describe_trust_stores( TrustStoreArns=[ 'string', ], Names=[ 'string', ], Marker='string', PageSize=123 ) Parameters: * **TrustStoreArns** (*list*) -- The Amazon Resource Name (ARN) of the trust store. * *(string) --* * **Names** (*list*) -- The names of the trust stores. * *(string) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. Return type: dict Returns: **Response Syntax** { 'TrustStores': [ { 'Name': 'string', 'TrustStoreArn': 'string', 'Status': 'ACTIVE'|'CREATING', 'NumberOfCaCertificates': 123, 'TotalRevokedEntries': 123 }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **TrustStores** *(list) --* Information about the trust stores. * *(dict) --* Information about a trust store. * **Name** *(string) --* The name of the trust store. * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **Status** *(string) --* The current status of the trust store. * **NumberOfCaCertificates** *(integer) --* The number of ca certificates in the trust store. * **TotalRevokedEntries** *(integer) --* The number of revoked certificates in the trust store. * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" ElasticLoadBalancingv2 / Client / describe_ssl_policies describe_ssl_policies ********************* ElasticLoadBalancingv2.Client.describe_ssl_policies(**kwargs) Describes the specified policies or all policies used for SSL negotiation. For more information, see Security policies in the *Application Load Balancers Guide* and Security policies in the *Network Load Balancers Guide*. See also: AWS API Documentation **Request Syntax** response = client.describe_ssl_policies( Names=[ 'string', ], Marker='string', PageSize=123, LoadBalancerType='application'|'network'|'gateway' ) Parameters: * **Names** (*list*) -- The names of the policies. * *(string) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. * **LoadBalancerType** (*string*) -- The type of load balancer. The default lists the SSL policies for all load balancers. Return type: dict Returns: **Response Syntax** { 'SslPolicies': [ { 'SslProtocols': [ 'string', ], 'Ciphers': [ { 'Name': 'string', 'Priority': 123 }, ], 'Name': 'string', 'SupportedLoadBalancerTypes': [ 'string', ] }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **SslPolicies** *(list) --* Information about the security policies. * *(dict) --* Information about a policy used for SSL negotiation. * **SslProtocols** *(list) --* The protocols. * *(string) --* * **Ciphers** *(list) --* The ciphers. * *(dict) --* Information about a cipher used in a policy. * **Name** *(string) --* The name of the cipher. * **Priority** *(integer) --* The priority of the cipher. * **Name** *(string) --* The name of the policy. * **SupportedLoadBalancerTypes** *(list) --* The supported load balancers. * *(string) --* * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.SSLPolicyNotFoundExcep tion" **Examples** This example describes the specified policy used for SSL negotiation. response = client.describe_ssl_policies( Names=[ 'ELBSecurityPolicy-2015-05', ], ) print(response) Expected Output: { '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', ], }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / modify_trust_store modify_trust_store ****************** ElasticLoadBalancingv2.Client.modify_trust_store(**kwargs) Update the ca certificate bundle for the specified trust store. See also: AWS API Documentation **Request Syntax** response = client.modify_trust_store( TrustStoreArn='string', CaCertificatesBundleS3Bucket='string', CaCertificatesBundleS3Key='string', CaCertificatesBundleS3ObjectVersion='string' ) Parameters: * **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. * **CaCertificatesBundleS3Bucket** (*string*) -- **[REQUIRED]** The Amazon S3 bucket for the ca certificates bundle. * **CaCertificatesBundleS3Key** (*string*) -- **[REQUIRED]** The Amazon S3 path for the ca certificates bundle. * **CaCertificatesBundleS3ObjectVersion** (*string*) -- The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used. Return type: dict Returns: **Response Syntax** { 'TrustStores': [ { 'Name': 'string', 'TrustStoreArn': 'string', 'Status': 'ACTIVE'|'CREATING', 'NumberOfCaCertificates': 123, 'TotalRevokedEntries': 123 }, ] } **Response Structure** * *(dict) --* * **TrustStores** *(list) --* Information about the modified trust store. * *(dict) --* Information about a trust store. * **Name** *(string) --* The name of the trust store. * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **Status** *(string) --* The current status of the trust store. * **NumberOfCaCertificates** *(integer) --* The number of ca certificates in the trust store. * **TotalRevokedEntries** *(integer) --* The number of revoked certificates in the trust store. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" * "ElasticLoadBalancingv2.Client.exceptions.InvalidCaCertificatesB undleException" * "ElasticLoadBalancingv2.Client.exceptions.CaCertificatesBundleNo tFoundException" ElasticLoadBalancingv2 / Client / modify_load_balancer_attributes modify_load_balancer_attributes ******************************* ElasticLoadBalancingv2.Client.modify_load_balancer_attributes(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.modify_load_balancer_attributes( LoadBalancerArn='string', Attributes=[ { 'Key': 'string', 'Value': 'string' }, ] ) Parameters: * **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. * **Attributes** (*list*) -- **[REQUIRED]** The load balancer attributes. * *(dict) --* Information about a load balancer attribute. * **Key** *(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 can't 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. * "zonal_shift.config.enabled" - Indicates whether zonal shift is enabled. The possible values are "true" and "false". The default is "false". 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.enabl ed" - 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. * "secondary_ips.auto_assigned.per_subnet" - The number of secondary IP addresses to configure for your load balancer nodes. Use to address port allocation errors if you can't add targets. The valid range is 0 to 7. The default is 0. After you set this value, you can't decrease it. * **Value** *(string) --* The value of the attribute. Return type: dict Returns: **Response Syntax** { 'Attributes': [ { 'Key': 'string', 'Value': 'string' }, ] } **Response Structure** * *(dict) --* * **Attributes** *(list) --* Information about the load balancer attributes. * *(dict) --* Information about a load balancer attribute. * **Key** *(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 can't 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. * "zonal_shift.config.enabled" - Indicates whether zonal shift is enabled. The possible values are "true" and "false". The default is "false". 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.ena bled" - 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. * "secondary_ips.auto_assigned.per_subnet" - The number of secondary IP addresses to configure for your load balancer nodes. Use to address port allocation errors if you can't add targets. The valid range is 0 to 7. The default is 0. After you set this value, you can't decrease it. * **Value** *(string) --* The value of the attribute. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" **Examples** This example enables deletion protection for the specified load balancer. response = client.modify_load_balancer_attributes( Attributes=[ { 'Key': 'deletion_protection.enabled', 'Value': 'true', }, ], LoadBalancerArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', ) print(response) Expected Output: { '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': '', }, ], 'ResponseMetadata': { '...': '...', }, } This example changes the idle timeout value for the specified load balancer. response = client.modify_load_balancer_attributes( Attributes=[ { 'Key': 'idle_timeout.timeout_seconds', 'Value': '30', }, ], LoadBalancerArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', ) print(response) Expected Output: { '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': '', }, ], 'ResponseMetadata': { '...': '...', }, } 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. response = client.modify_load_balancer_attributes( 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', ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / modify_listener modify_listener *************** ElasticLoadBalancingv2.Client.modify_listener(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.modify_listener( ListenerArn='string', Port=123, Protocol='HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', SslPolicy='string', Certificates=[ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], DefaultActions=[ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], AlpnPolicy=[ 'string', ], MutualAuthentication={ 'Mode': 'string', 'TrustStoreArn': 'string', 'IgnoreClientCertificateExpiry': True|False, 'TrustStoreAssociationStatus': 'active'|'removed', 'AdvertiseTrustStoreCaNames': 'on'|'off' } ) Parameters: * **ListenerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the listener. * **Port** (*integer*) -- The port for connections from clients to the load balancer. You can't specify a port for a Gateway Load Balancer. * **Protocol** (*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 can't specify a protocol for a Gateway Load Balancer. * **SslPolicy** (*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*. * **Certificates** (*list*) -- [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". * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. * **DefaultActions** (*list*) -- The actions for the default rule. * *(dict) --* 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. * **Type** *(string) --* **[REQUIRED]** The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate-oidc". * **Issuer** *(string) --* **[REQUIRED]** The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* **[REQUIRED]** The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* **[REQUIRED]** The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* **[REQUIRED]** The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* **[REQUIRED]** The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* **[REQUIRED]** The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* **[REQUIRED]** The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent-encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* **[REQUIRED]** The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* **[REQUIRED]** The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **AlpnPolicy** (*list*) -- [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*. * *(string) --* * **MutualAuthentication** (*dict*) -- The mutual authentication configuration information. * **Mode** *(string) --* The client certificate handling method. Options are "off", "passthrough" or "verify". The default value is "off". * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **IgnoreClientCertificateExpiry** *(boolean) --* Indicates whether expired client certificates are ignored. * **TrustStoreAssociationStatus** *(string) --* Indicates a shared trust stores association status. * **AdvertiseTrustStoreCaNames** *(string) --* Indicates whether trust store CA certificate names are advertised. Return type: dict Returns: **Response Syntax** { 'Listeners': [ { 'ListenerArn': 'string', 'LoadBalancerArn': 'string', 'Port': 123, 'Protocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'Certificates': [ { 'CertificateArn': 'string', 'IsDefault': True|False }, ], 'SslPolicy': 'string', 'DefaultActions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], 'AlpnPolicy': [ 'string', ], 'MutualAuthentication': { 'Mode': 'string', 'TrustStoreArn': 'string', 'IgnoreClientCertificateExpiry': True|False, 'TrustStoreAssociationStatus': 'active'|'removed', 'AdvertiseTrustStoreCaNames': 'on'|'off' } }, ] } **Response Structure** * *(dict) --* * **Listeners** *(list) --* Information about the modified listener. * *(dict) --* Information about a listener. * **ListenerArn** *(string) --* The Amazon Resource Name (ARN) of the listener. * **LoadBalancerArn** *(string) --* The Amazon Resource Name (ARN) of the load balancer. * **Port** *(integer) --* The port on which the load balancer is listening. * **Protocol** *(string) --* The protocol for connections from clients to the load balancer. * **Certificates** *(list) --* [HTTPS or TLS listener] The default certificate for the listener. * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. * **SslPolicy** *(string) --* [HTTPS or TLS listener] The security policy that defines which protocols and ciphers are supported. * **DefaultActions** *(list) --* The default actions for the listener. * *(dict) --* 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. * **Type** *(string) --* The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate- oidc". * **Issuer** *(string) --* The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent- encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **AlpnPolicy** *(list) --* [TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy. * *(string) --* * **MutualAuthentication** *(dict) --* The mutual authentication configuration information. * **Mode** *(string) --* The client certificate handling method. Options are "off", "passthrough" or "verify". The default value is "off". * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **IgnoreClientCertificateExpiry** *(boolean) --* Indicates whether expired client certificates are ignored. * **TrustStoreAssociationStatus** *(string) --* Indicates a shared trust stores association status. * **AdvertiseTrustStoreCaNames** *(string) --* Indicates whether trust store CA certificate names are advertised. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.DuplicateListenerExcep tion" * "ElasticLoadBalancingv2.Client.exceptions.TooManyListenersExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.TooManyCertificatesExc eption" * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupAssociation LimitException" * "ElasticLoadBalancingv2.Client.exceptions.IncompatibleProtocolsE xception" * "ElasticLoadBalancingv2.Client.exceptions.SSLPolicyNotFoundExcep tion" * "ElasticLoadBalancingv2.Client.exceptions.CertificateNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" * "ElasticLoadBalancingv2.Client.exceptions.UnsupportedProtocolExc eption" * "ElasticLoadBalancingv2.Client.exceptions.TooManyRegistrationsFo rTargetIdException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTargetsExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.TooManyActionsExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.InvalidLoadBalancerAct ionException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyUniqueTargetGro upsPerLoadBalancerException" * "ElasticLoadBalancingv2.Client.exceptions.ALPNPolicyNotSupported Exception" * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotReadyExce ption" **Examples** This example changes the default action for the specified listener. response = client.modify_listener( 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', ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } This example changes the server certificate for the specified HTTPS listener. response = client.modify_listener( 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', ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / describe_capacity_reservation describe_capacity_reservation ***************************** ElasticLoadBalancingv2.Client.describe_capacity_reservation(**kwargs) Describes the capacity reservation status for the specified load balancer. See also: AWS API Documentation **Request Syntax** response = client.describe_capacity_reservation( LoadBalancerArn='string' ) Parameters: **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. Return type: dict Returns: **Response Syntax** { 'LastModifiedTime': datetime(2015, 1, 1), 'DecreaseRequestsRemaining': 123, 'MinimumLoadBalancerCapacity': { 'CapacityUnits': 123 }, 'CapacityReservationState': [ { 'State': { 'Code': 'provisioned'|'pending'|'rebalancing'|'failed', 'Reason': 'string' }, 'AvailabilityZone': 'string', 'EffectiveCapacityUnits': 123.0 }, ] } **Response Structure** * *(dict) --* * **LastModifiedTime** *(datetime) --* The last time the capacity reservation was modified. * **DecreaseRequestsRemaining** *(integer) --* The amount of daily capacity decreases remaining. * **MinimumLoadBalancerCapacity** *(dict) --* The requested minimum capacity reservation for the load balancer * **CapacityUnits** *(integer) --* The number of capacity units. * **CapacityReservationState** *(list) --* The state of the capacity reservation. * *(dict) --* The capacity reservation status for each Availability Zone. * **State** *(dict) --* The state of the capacity reservation. * **Code** *(string) --* The status code. * **Reason** *(string) --* The reason code for the status. * **AvailabilityZone** *(string) --* Information about the Availability Zone. * **EffectiveCapacityUnits** *(float) --* The number of effective capacity units. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" ElasticLoadBalancingv2 / Client / describe_load_balancer_attributes describe_load_balancer_attributes ********************************* ElasticLoadBalancingv2.Client.describe_load_balancer_attributes(**kwargs) Describes the attributes for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer. For more information, see the following: * Load balancer attributes in the *Application Load Balancers Guide* * Load balancer attributes in the *Network Load Balancers Guide* * Load balancer attributes in the *Gateway Load Balancers Guide* See also: AWS API Documentation **Request Syntax** response = client.describe_load_balancer_attributes( LoadBalancerArn='string' ) Parameters: **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. Return type: dict Returns: **Response Syntax** { 'Attributes': [ { 'Key': 'string', 'Value': 'string' }, ] } **Response Structure** * *(dict) --* * **Attributes** *(list) --* Information about the load balancer attributes. * *(dict) --* Information about a load balancer attribute. * **Key** *(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 can't 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. * "zonal_shift.config.enabled" - Indicates whether zonal shift is enabled. The possible values are "true" and "false". The default is "false". 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.ena bled" - 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. * "secondary_ips.auto_assigned.per_subnet" - The number of secondary IP addresses to configure for your load balancer nodes. Use to address port allocation errors if you can't add targets. The valid range is 0 to 7. The default is 0. After you set this value, you can't decrease it. * **Value** *(string) --* The value of the attribute. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" **Examples** This example describes the attributes of the specified load balancer. response = client.describe_load_balancer_attributes( LoadBalancerArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', ) print(response) Expected Output: { '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': '', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / remove_trust_store_revocations remove_trust_store_revocations ****************************** ElasticLoadBalancingv2.Client.remove_trust_store_revocations(**kwargs) Removes the specified revocation file from the specified trust store. See also: AWS API Documentation **Request Syntax** response = client.remove_trust_store_revocations( TrustStoreArn='string', RevocationIds=[ 123, ] ) Parameters: * **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. * **RevocationIds** (*list*) -- **[REQUIRED]** The revocation IDs of the revocation files you want to remove. * *(integer) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" * "ElasticLoadBalancingv2.Client.exceptions.RevocationIdNotFoundEx ception" ElasticLoadBalancingv2 / Client / add_trust_store_revocations add_trust_store_revocations *************************** ElasticLoadBalancingv2.Client.add_trust_store_revocations(**kwargs) Adds the specified revocation file to the specified trust store. See also: AWS API Documentation **Request Syntax** response = client.add_trust_store_revocations( TrustStoreArn='string', RevocationContents=[ { 'S3Bucket': 'string', 'S3Key': 'string', 'S3ObjectVersion': 'string', 'RevocationType': 'CRL' }, ] ) Parameters: * **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. * **RevocationContents** (*list*) -- The revocation file to add. * *(dict) --* Information about a revocation file. * **S3Bucket** *(string) --* The Amazon S3 bucket for the revocation file. * **S3Key** *(string) --* The Amazon S3 path for the revocation file. * **S3ObjectVersion** *(string) --* The Amazon S3 object version of the revocation file. * **RevocationType** *(string) --* The type of revocation file. Return type: dict Returns: **Response Syntax** { 'TrustStoreRevocations': [ { 'TrustStoreArn': 'string', 'RevocationId': 123, 'RevocationType': 'CRL', 'NumberOfRevokedEntries': 123 }, ] } **Response Structure** * *(dict) --* * **TrustStoreRevocations** *(list) --* Information about the revocation file added to the trust store. * *(dict) --* Information about a revocation file in use by a trust store. * **TrustStoreArn** *(string) --* The Amazon Resource Name (ARN) of the trust store. * **RevocationId** *(integer) --* The revocation ID of the revocation file. * **RevocationType** *(string) --* The type of revocation file. * **NumberOfRevokedEntries** *(integer) --* The number of revoked certificates. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" * "ElasticLoadBalancingv2.Client.exceptions.InvalidRevocationConte ntException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTrustStoreRevoc ationEntriesException" * "ElasticLoadBalancingv2.Client.exceptions.RevocationContentNotFo undException" ElasticLoadBalancingv2 / Client / describe_account_limits describe_account_limits *********************** ElasticLoadBalancingv2.Client.describe_account_limits(**kwargs) Describes the current Elastic Load Balancing resource limits for your Amazon Web Services account. For more information, see the following: * Quotas for your Application Load Balancers * Quotas for your Network Load Balancers * Quotas for your Gateway Load Balancers See also: AWS API Documentation **Request Syntax** response = client.describe_account_limits( Marker='string', PageSize=123 ) Parameters: * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. Return type: dict Returns: **Response Syntax** { 'Limits': [ { 'Name': 'string', 'Max': 'string' }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **Limits** *(list) --* Information about the limits. * *(dict) --* Information about an Elastic Load Balancing resource limit for your Amazon Web Services account. For more information, see the following: * Quotas for your Application Load Balancers * Quotas for your Network Load Balancers * Quotas for your Gateway Load Balancers * **Name** *(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 * **Max** *(string) --* The maximum value of the limit. * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. ElasticLoadBalancingv2 / Client / set_ip_address_type set_ip_address_type ******************* ElasticLoadBalancingv2.Client.set_ip_address_type(**kwargs) Sets the type of IP addresses used by the subnets of the specified load balancer. See also: AWS API Documentation **Request Syntax** response = client.set_ip_address_type( LoadBalancerArn='string', IpAddressType='ipv4'|'dualstack'|'dualstack-without-public-ipv4' ) Parameters: * **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. * **IpAddressType** (*string*) -- **[REQUIRED]** The IP address type. Internal load balancers must use "ipv4". [Application Load Balancers] The possible values are "ipv4" (IPv4 addresses), "dualstack" (IPv4 and IPv6 addresses), and "dualstack-without-public-ipv4" (public IPv6 addresses and private IPv4 and IPv6 addresses). Application Load Balancer authentication supports IPv4 addresses only when connecting to an Identity Provider (IdP) or Amazon Cognito endpoint. Without a public IPv4 address the load balancer can't complete the authentication process, resulting in HTTP 500 errors. [Network Load Balancers and Gateway Load Balancers] The possible values are "ipv4" (IPv4 addresses) and "dualstack" (IPv4 and IPv6 addresses). Return type: dict Returns: **Response Syntax** { 'IpAddressType': 'ipv4'|'dualstack'|'dualstack-without-public-ipv4' } **Response Structure** * *(dict) --* * **IpAddressType** *(string) --* The IP address type. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" * "ElasticLoadBalancingv2.Client.exceptions.InvalidSubnetException" ElasticLoadBalancingv2 / Client / set_security_groups set_security_groups ******************* ElasticLoadBalancingv2.Client.set_security_groups(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.set_security_groups( LoadBalancerArn='string', SecurityGroups=[ 'string', ], EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic='on'|'off' ) Parameters: * **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. * **SecurityGroups** (*list*) -- **[REQUIRED]** The IDs of the security groups. * *(string) --* * **EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic** (*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". Return type: dict Returns: **Response Syntax** { 'SecurityGroupIds': [ 'string', ], 'EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic': 'on'|'off' } **Response Structure** * *(dict) --* * **SecurityGroupIds** *(list) --* The IDs of the security groups associated with the load balancer. * *(string) --* * **EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic** *(string) --* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" * "ElasticLoadBalancingv2.Client.exceptions.InvalidSecurityGroupEx ception" **Examples** This example associates the specified security group with the specified load balancer. response = client.set_security_groups( LoadBalancerArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', SecurityGroups=[ 'sg-5943793c', ], ) print(response) Expected Output: { 'SecurityGroupIds': [ 'sg-5943793c', ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / modify_ip_pools modify_ip_pools *************** ElasticLoadBalancingv2.Client.modify_ip_pools(**kwargs) [Application Load Balancers] Modify the IP pool associated to a load balancer. See also: AWS API Documentation **Request Syntax** response = client.modify_ip_pools( LoadBalancerArn='string', IpamPools={ 'Ipv4IpamPoolId': 'string' }, RemoveIpamPools=[ 'ipv4', ] ) Parameters: * **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. * **IpamPools** (*dict*) -- The IPAM pools to be modified. * **Ipv4IpamPoolId** *(string) --* The ID of the IPv4 IPAM pool. * **RemoveIpamPools** (*list*) -- Remove the IP pools in use by the load balancer. * *(string) --* Return type: dict Returns: **Response Syntax** { 'IpamPools': { 'Ipv4IpamPoolId': 'string' } } **Response Structure** * *(dict) --* * **IpamPools** *(dict) --* The IPAM pool ID. * **Ipv4IpamPoolId** *(string) --* The ID of the IPv4 IPAM pool. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" ElasticLoadBalancingv2 / Client / add_tags add_tags ******** ElasticLoadBalancingv2.Client.add_tags(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.add_tags( ResourceArns=[ 'string', ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ] ) Parameters: * **ResourceArns** (*list*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource. * *(string) --* * **Tags** (*list*) -- **[REQUIRED]** The tags. * *(dict) --* Information about a tag. * **Key** *(string) --* **[REQUIRED]** The key of the tag. * **Value** *(string) --* The value of the tag. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.DuplicateTagKeysExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTagsException" * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException" * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" **Examples** This example adds the specified tags to the specified load balancer. response = client.add_tags( ResourceArns=[ 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', ], Tags=[ { 'Key': 'project', 'Value': 'lima', }, { 'Key': 'department', 'Value': 'digital-media', }, ], ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / describe_listener_attributes describe_listener_attributes **************************** ElasticLoadBalancingv2.Client.describe_listener_attributes(**kwargs) Describes the attributes for the specified listener. See also: AWS API Documentation **Request Syntax** response = client.describe_listener_attributes( ListenerArn='string' ) Parameters: **ListenerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the listener. Return type: dict Returns: **Response Syntax** { 'Attributes': [ { 'Key': 'string', 'Value': 'string' }, ] } **Response Structure** * *(dict) --* * **Attributes** *(list) --* Information about the listener attributes. * *(dict) --* Information about a listener attribute. * **Key** *(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. The following attributes are only supported by Application Load Balancers. * "routing.http.request.x_amzn_mtls_clientcert_serial_n umber.header_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Serial-Number** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_issuer.h eader_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Issuer** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_subject. header_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Subject** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_validity .header_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Validity** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert_leaf.hea der_name" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert-Leaf** HTTP request header. * "routing.http.request.x_amzn_mtls_clientcert.header_n ame" - Enables you to modify the header name of the **X-Amzn-Mtls-Clientcert** HTTP request header. * "routing.http.request.x_amzn_tls_version.header_name" - Enables you to modify the header name of the **X -Amzn-Tls-Version** HTTP request header. * "routing.http.request.x_amzn_tls_cipher_suite.header_ name" - Enables you to modify the header name of the **X-Amzn-Tls-Cipher-Suite** HTTP request header. * "routing.http.response.server.enabled" - Enables you to allow or remove the HTTP response server header. * "routing.http.response.strict_transport_security.head er_value" - Informs browsers that the site should only be accessed using HTTPS, and that any future attempts to access it using HTTP should automatically be converted to HTTPS. * "routing.http.response.access_control_allow_origin.he ader_value" - Specifies which origins are allowed to access the server. * "routing.http.response.access_control_allow_methods.h eader_value" - Returns which HTTP methods are allowed when accessing the server from a different origin. * "routing.http.response.access_control_allow_headers.h eader_value" - Specifies which headers can be used during the request. * "routing.http.response.access_control_allow_credentia ls.header_value" - Indicates whether the browser should include credentials such as cookies or authentication when making requests. * "routing.http.response.access_control_expose_headers. header_value" - Returns which headers the browser can expose to the requesting client. * "routing.http.response.access_control_max_age.header_ value" - Specifies how long the results of a preflight request can be cached, in seconds. * "routing.http.response.content_security_policy.header _value" - Specifies restrictions enforced by the browser to help minimize the risk of certain types of security threats. * "routing.http.response.x_content_type_options.header_ value" - Indicates whether the MIME types advertised in the **Content-Type** headers should be followed and not be changed. * "routing.http.response.x_frame_options.header_value" - Indicates whether the browser is allowed to render a page in a **frame**, **iframe**, **embed** or **object**. * **Value** *(string) --* The value of the attribute. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" ElasticLoadBalancingv2 / Client / delete_listener delete_listener *************** ElasticLoadBalancingv2.Client.delete_listener(**kwargs) Deletes the specified listener. Alternatively, your listener is deleted when you delete the load balancer to which it is attached. See also: AWS API Documentation **Request Syntax** response = client.delete_listener( ListenerArn='string' ) Parameters: **ListenerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the listener. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.ResourceInUseException" **Examples** This example deletes the specified listener. response = client.delete_listener( ListenerArn='arn:aws:elasticloadbalancing:ua-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2', ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / close close ***** ElasticLoadBalancingv2.Client.close() Closes underlying endpoint connections. ElasticLoadBalancingv2 / Client / get_resource_policy get_resource_policy ******************* ElasticLoadBalancingv2.Client.get_resource_policy(**kwargs) Retrieves the resource policy for a specified resource. See also: AWS API Documentation **Request Syntax** response = client.get_resource_policy( ResourceArn='string' ) Parameters: **ResourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource. Return type: dict Returns: **Response Syntax** { 'Policy': 'string' } **Response Structure** * *(dict) --* * **Policy** *(string) --* The content of the resource policy. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ResourceNotFoundExcept ion" ElasticLoadBalancingv2 / Client / delete_shared_trust_store_association delete_shared_trust_store_association ************************************* ElasticLoadBalancingv2.Client.delete_shared_trust_store_association(**kwargs) Deletes a shared trust store association. See also: AWS API Documentation **Request Syntax** response = client.delete_shared_trust_store_association( TrustStoreArn='string', ResourceArn='string' ) Parameters: * **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. * **ResourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" * "ElasticLoadBalancingv2.Client.exceptions.DeleteAssociationSameA ccountException" * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreAssociationN otFoundException" ElasticLoadBalancingv2 / Client / remove_listener_certificates remove_listener_certificates **************************** ElasticLoadBalancingv2.Client.remove_listener_certificates(**kwargs) Removes the specified certificate from the certificate list for the specified HTTPS or TLS listener. See also: AWS API Documentation **Request Syntax** response = client.remove_listener_certificates( ListenerArn='string', Certificates=[ { 'CertificateArn': 'string', 'IsDefault': True|False }, ] ) Parameters: * **ListenerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the listener. * **Certificates** (*list*) -- **[REQUIRED]** The certificate to remove. You can specify one certificate per call. Set "CertificateArn" to the certificate ARN but do not set "IsDefault". * *(dict) --* Information about an SSL server certificate. * **CertificateArn** *(string) --* The Amazon Resource Name (ARN) of the certificate. * **IsDefault** *(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. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.OperationNotPermittedE xception" ElasticLoadBalancingv2 / Client / describe_load_balancers describe_load_balancers *********************** ElasticLoadBalancingv2.Client.describe_load_balancers(**kwargs) Describes the specified load balancers or all of your load balancers. See also: AWS API Documentation **Request Syntax** response = client.describe_load_balancers( LoadBalancerArns=[ 'string', ], Names=[ 'string', ], Marker='string', PageSize=123 ) Parameters: * **LoadBalancerArns** (*list*) -- The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call. * *(string) --* * **Names** (*list*) -- The names of the load balancers. * *(string) --* * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. Return type: dict Returns: **Response Syntax** { 'LoadBalancers': [ { 'LoadBalancerArn': 'string', 'DNSName': 'string', 'CanonicalHostedZoneId': 'string', 'CreatedTime': datetime(2015, 1, 1), 'LoadBalancerName': 'string', 'Scheme': 'internet-facing'|'internal', 'VpcId': 'string', 'State': { 'Code': 'active'|'provisioning'|'active_impaired'|'failed', 'Reason': 'string' }, 'Type': 'application'|'network'|'gateway', 'AvailabilityZones': [ { 'ZoneName': 'string', 'SubnetId': 'string', 'OutpostId': 'string', 'LoadBalancerAddresses': [ { 'IpAddress': 'string', 'AllocationId': 'string', 'PrivateIPv4Address': 'string', 'IPv6Address': 'string' }, ], 'SourceNatIpv6Prefixes': [ 'string', ] }, ], 'SecurityGroups': [ 'string', ], 'IpAddressType': 'ipv4'|'dualstack'|'dualstack-without-public-ipv4', 'CustomerOwnedIpv4Pool': 'string', 'EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic': 'string', 'EnablePrefixForIpv6SourceNat': 'on'|'off', 'IpamPools': { 'Ipv4IpamPoolId': 'string' } }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **LoadBalancers** *(list) --* Information about the load balancers. * *(dict) --* Information about a load balancer. * **LoadBalancerArn** *(string) --* The Amazon Resource Name (ARN) of the load balancer. * **DNSName** *(string) --* The public DNS name of the load balancer. * **CanonicalHostedZoneId** *(string) --* The ID of the Amazon Route 53 hosted zone associated with the load balancer. * **CreatedTime** *(datetime) --* The date and time the load balancer was created. * **LoadBalancerName** *(string) --* The name of the load balancer. * **Scheme** *(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. * **VpcId** *(string) --* The ID of the VPC for the load balancer. * **State** *(dict) --* The state of the load balancer. * **Code** *(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 is "active_impaired". If the load balancer could not be set up, its state is "failed". * **Reason** *(string) --* A description of the state. * **Type** *(string) --* The type of load balancer. * **AvailabilityZones** *(list) --* The subnets for the load balancer. * *(dict) --* Information about an Availability Zone. * **ZoneName** *(string) --* The name of the Availability Zone. * **SubnetId** *(string) --* The ID of the subnet. You can specify one subnet per Availability Zone. * **OutpostId** *(string) --* [Application Load Balancers on Outposts] The ID of the Outpost. * **LoadBalancerAddresses** *(list) --* [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. * *(dict) --* Information about a static IP address for a load balancer. * **IpAddress** *(string) --* The static IP address. * **AllocationId** *(string) --* [Network Load Balancers] The allocation ID of the Elastic IP address for an internal-facing load balancer. * **PrivateIPv4Address** *(string) --* [Network Load Balancers] The private IPv4 address for an internal load balancer. * **IPv6Address** *(string) --* [Network Load Balancers] The IPv6 address. * **SourceNatIpv6Prefixes** *(list) --* [Network Load Balancers with UDP listeners] The IPv6 prefixes to use for source NAT. For each subnet, specify an IPv6 prefix (/80 netmask) from the subnet CIDR block or "auto_assigned" to use an IPv6 prefix selected at random from the subnet CIDR block. * *(string) --* * **SecurityGroups** *(list) --* The IDs of the security groups for the load balancer. * *(string) --* * **IpAddressType** *(string) --* The type of IP addresses used for public or private connections by the subnets attached to your load balancer. [Application Load Balancers] The possible values are "ipv4" (IPv4 addresses), "dualstack" (IPv4 and IPv6 addresses), and "dualstack-without-public-ipv4" (public IPv6 addresses and private IPv4 and IPv6 addresses). [Network Load Balancers and Gateway Load Balancers] The possible values are "ipv4" (IPv4 addresses) and "dualstack" (IPv4 and IPv6 addresses). * **CustomerOwnedIpv4Pool** *(string) --* [Application Load Balancers on Outposts] The ID of the customer-owned address pool. * **EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic** *(string) --* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through Amazon Web Services PrivateLink. * **EnablePrefixForIpv6SourceNat** *(string) --* [Network Load Balancers with UDP listeners] Indicates whether to use an IPv6 prefix from each subnet for source NAT. The IP address type must be "dualstack". The default value is "off". * **IpamPools** *(dict) --* [Application Load Balancers] The IPAM pool in use by the load balancer, if configured. * **Ipv4IpamPoolId** *(string) --* The ID of the IPv4 IPAM pool. * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" **Examples** This example describes the specified load balancer. response = client.describe_load_balancers( LoadBalancerArns=[ 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', ], ) print(response) Expected Output: { 'LoadBalancers': [ { 'AvailabilityZones': [ { 'SubnetId': 'subnet-8360a9e7', 'ZoneName': 'us-west-2a', }, { 'SubnetId': 'subnet-b7d581c0', 'ZoneName': 'us-west-2b', }, ], 'CanonicalHostedZoneId': 'Z2P70J7EXAMPLE', 'CreatedTime': datetime(2016, 3, 25, 21, 26, 12, 4, 85, 0), '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / get_trust_store_ca_certificates_bundle get_trust_store_ca_certificates_bundle ************************************** ElasticLoadBalancingv2.Client.get_trust_store_ca_certificates_bundle(**kwargs) Retrieves the ca certificate bundle. This action returns a pre-signed S3 URI which is active for ten minutes. See also: AWS API Documentation **Request Syntax** response = client.get_trust_store_ca_certificates_bundle( TrustStoreArn='string' ) Parameters: **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. Return type: dict Returns: **Response Syntax** { 'Location': 'string' } **Response Structure** * *(dict) --* * **Location** *(string) --* The ca certificate bundles Amazon S3 URI. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" ElasticLoadBalancingv2 / Client / delete_target_group delete_target_group ******************* ElasticLoadBalancingv2.Client.delete_target_group(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.delete_target_group( TargetGroupArn='string' ) Parameters: **TargetGroupArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the target group. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.ResourceInUseException" **Examples** This example deletes the specified target group. response = client.delete_target_group( TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / remove_tags remove_tags *********** ElasticLoadBalancingv2.Client.remove_tags(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.remove_tags( ResourceArns=[ 'string', ], TagKeys=[ 'string', ] ) Parameters: * **ResourceArns** (*list*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource. * *(string) --* * **TagKeys** (*list*) -- **[REQUIRED]** The tag keys for the tags to remove. * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.ListenerNotFoundExcept ion" * "ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTagsException" * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption" **Examples** This example removes the specified tags from the specified load balancer. response = client.remove_tags( ResourceArns=[ 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', ], TagKeys=[ 'project', 'department', ], ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / modify_target_group modify_target_group ******************* ElasticLoadBalancingv2.Client.modify_target_group(**kwargs) Modifies the health checks used when evaluating the health state of the targets in the specified target group. See also: AWS API Documentation **Request Syntax** response = client.modify_target_group( TargetGroupArn='string', HealthCheckProtocol='HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', HealthCheckPort='string', HealthCheckPath='string', HealthCheckEnabled=True|False, HealthCheckIntervalSeconds=123, HealthCheckTimeoutSeconds=123, HealthyThresholdCount=123, UnhealthyThresholdCount=123, Matcher={ 'HttpCode': 'string', 'GrpcCode': 'string' } ) Parameters: * **TargetGroupArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the target group. * **HealthCheckProtocol** (*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. * **HealthCheckPort** (*string*) -- The port the load balancer uses when performing health checks on targets. * **HealthCheckPath** (*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. * **HealthCheckEnabled** (*boolean*) -- Indicates whether health checks are enabled. * **HealthCheckIntervalSeconds** (*integer*) -- The approximate amount of time, in seconds, between health checks of an individual target. * **HealthCheckTimeoutSeconds** (*integer*) -- [HTTP/HTTPS health checks] The amount of time, in seconds, during which no response means a failed health check. * **HealthyThresholdCount** (*integer*) -- The number of consecutive health checks successes required before considering an unhealthy target healthy. * **UnhealthyThresholdCount** (*integer*) -- The number of consecutive health check failures required before considering the target unhealthy. * **Matcher** (*dict*) -- [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. * **HttpCode** *(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. * **GrpcCode** *(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. Return type: dict Returns: **Response Syntax** { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'TargetGroupName': 'string', 'Protocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'Port': 123, 'VpcId': 'string', 'HealthCheckProtocol': 'HTTP'|'HTTPS'|'TCP'|'TLS'|'UDP'|'TCP_UDP'|'GENEVE', 'HealthCheckPort': 'string', 'HealthCheckEnabled': True|False, 'HealthCheckIntervalSeconds': 123, 'HealthCheckTimeoutSeconds': 123, 'HealthyThresholdCount': 123, 'UnhealthyThresholdCount': 123, 'HealthCheckPath': 'string', 'Matcher': { 'HttpCode': 'string', 'GrpcCode': 'string' }, 'LoadBalancerArns': [ 'string', ], 'TargetType': 'instance'|'ip'|'lambda'|'alb', 'ProtocolVersion': 'string', 'IpAddressType': 'ipv4'|'ipv6' }, ] } **Response Structure** * *(dict) --* * **TargetGroups** *(list) --* Information about the modified target group. * *(dict) --* Information about a target group. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **TargetGroupName** *(string) --* The name of the target group. * **Protocol** *(string) --* The protocol to use for routing traffic to the targets. * **Port** *(integer) --* The port on which the targets are listening. This parameter is not used if the target is a Lambda function. * **VpcId** *(string) --* The ID of the VPC for the targets. * **HealthCheckProtocol** *(string) --* The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks. * **HealthCheckPort** *(string) --* The port to use to connect with the target. * **HealthCheckEnabled** *(boolean) --* Indicates whether health checks are enabled. * **HealthCheckIntervalSeconds** *(integer) --* The approximate amount of time, in seconds, between health checks of an individual target. * **HealthCheckTimeoutSeconds** *(integer) --* The amount of time, in seconds, during which no response means a failed health check. * **HealthyThresholdCount** *(integer) --* The number of consecutive health checks successes required before considering an unhealthy target healthy. * **UnhealthyThresholdCount** *(integer) --* The number of consecutive health check failures required before considering the target unhealthy. * **HealthCheckPath** *(string) --* The destination for health checks on the targets. * **Matcher** *(dict) --* The HTTP or gRPC codes to use when checking for a successful response from a target. * **HttpCode** *(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. * **GrpcCode** *(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. * **LoadBalancerArns** *(list) --* 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. * *(string) --* * **TargetType** *(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). * **ProtocolVersion** *(string) --* [HTTP/HTTPS protocol] The protocol version. The possible values are "GRPC", "HTTP1", and "HTTP2". * **IpAddressType** *(string) --* The IP address type. The default value is "ipv4". **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.InvalidConfigurationRe questException" **Examples** This example changes the configuration of the health checks used to evaluate the health of the targets for the specified target group. response = client.modify_target_group( HealthCheckPort='443', HealthCheckProtocol='HTTPS', TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-https-targets/2453ed029918f21f', ) print(response) Expected Output: { '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', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / describe_target_health describe_target_health ********************** ElasticLoadBalancingv2.Client.describe_target_health(**kwargs) Describes the health of the specified targets or all of your targets. See also: AWS API Documentation **Request Syntax** response = client.describe_target_health( TargetGroupArn='string', Targets=[ { 'Id': 'string', 'Port': 123, 'AvailabilityZone': 'string' }, ], Include=[ 'AnomalyDetection'|'All', ] ) Parameters: * **TargetGroupArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the target group. * **Targets** (*list*) -- The targets. * *(dict) --* Information about a target. * **Id** *(string) --* **[REQUIRED]** 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** *(integer) --* 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. * **AvailabilityZone** *(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". * **Include** (*list*) -- Used to include anomaly detection information. * *(string) --* Return type: dict Returns: **Response Syntax** { 'TargetHealthDescriptions': [ { 'Target': { 'Id': 'string', 'Port': 123, 'AvailabilityZone': 'string' }, 'HealthCheckPort': 'string', 'TargetHealth': { 'State': 'initial'|'healthy'|'unhealthy'|'unhealthy.draining'|'unused'|'draining'|'unavailable', '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', 'Description': 'string' }, 'AnomalyDetection': { 'Result': 'anomalous'|'normal', 'MitigationInEffect': 'yes'|'no' }, 'AdministrativeOverride': { 'State': 'unknown'|'no_override'|'zonal_shift_active'|'zonal_shift_delegated_to_dns', 'Reason': 'AdministrativeOverride.Unknown'|'AdministrativeOverride.NoOverride'|'AdministrativeOverride.ZonalShiftActive'|'AdministrativeOverride.ZonalShiftDelegatedToDns', 'Description': 'string' } }, ] } **Response Structure** * *(dict) --* * **TargetHealthDescriptions** *(list) --* Information about the health of the targets. * *(dict) --* Information about the health of a target. * **Target** *(dict) --* The description of the target. * **Id** *(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** *(integer) --* 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. * **AvailabilityZone** *(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". * **HealthCheckPort** *(string) --* The port to use to connect with the target. * **TargetHealth** *(dict) --* The health information for the target. * **State** *(string) --* The state of the target. * **Reason** *(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. * **Description** *(string) --* A description of the target health that provides additional details. If the state is "healthy", a description is not provided. * **AnomalyDetection** *(dict) --* The anomaly detection result for the target. If no anomalies were detected, the result is "normal". If anomalies were detected, the result is "anomalous". * **Result** *(string) --* The latest anomaly detection result. * **MitigationInEffect** *(string) --* Indicates whether anomaly mitigation is in progress. * **AdministrativeOverride** *(dict) --* The administrative override information for the target. * **State** *(string) --* The state of the override. * **Reason** *(string) --* The reason code for the state. * **Description** *(string) --* A description of the override state that provides additional details. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.InvalidTargetException" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.HealthUnavailableExcep tion" **Examples** 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. response = client.describe_target_health( TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', ) print(response) Expected Output: { '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', }, }, ], 'ResponseMetadata': { '...': '...', }, } This example describes the health of the specified target. This target is healthy. response = client.describe_target_health( TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', Targets=[ { 'Id': 'i-0f76fade', 'Port': 80, }, ], ) print(response) Expected Output: { 'TargetHealthDescriptions': [ { 'HealthCheckPort': '80', 'Target': { 'Id': 'i-0f76fade', 'Port': 80, }, 'TargetHealth': { 'State': 'healthy', }, }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / register_targets register_targets **************** ElasticLoadBalancingv2.Client.register_targets(**kwargs) 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. For more information, see the following: * Register targets for your Application Load Balancer * Register targets for your Network Load Balancer * Register targets for your Gateway Load Balancer See also: AWS API Documentation **Request Syntax** response = client.register_targets( TargetGroupArn='string', Targets=[ { 'Id': 'string', 'Port': 123, 'AvailabilityZone': 'string' }, ] ) Parameters: * **TargetGroupArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the target group. * **Targets** (*list*) -- **[REQUIRED]** The targets. * *(dict) --* Information about a target. * **Id** *(string) --* **[REQUIRED]** 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** *(integer) --* 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. * **AvailabilityZone** *(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". Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTargetsExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.InvalidTargetException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyRegistrationsFo rTargetIdException" **Examples** This example registers the specified instances with the specified target group. response = client.register_targets( TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', Targets=[ { 'Id': 'i-80c8dd94', }, { 'Id': 'i-ceddcd4d', }, ], ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } 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. response = client.register_targets( TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-new-targets/3bb63f11dfb0faf9', Targets=[ { 'Id': 'i-80c8dd94', 'Port': 80, }, { 'Id': 'i-80c8dd94', 'Port': 766, }, ], ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / modify_rule modify_rule *********** ElasticLoadBalancingv2.Client.modify_rule(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.modify_rule( RuleArn='string', Conditions=[ { 'Field': 'string', 'Values': [ 'string', ], 'HostHeaderConfig': { 'Values': [ 'string', ] }, 'PathPatternConfig': { 'Values': [ 'string', ] }, 'HttpHeaderConfig': { 'HttpHeaderName': 'string', 'Values': [ 'string', ] }, 'QueryStringConfig': { 'Values': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'HttpRequestMethodConfig': { 'Values': [ 'string', ] }, 'SourceIpConfig': { 'Values': [ 'string', ] } }, ], Actions=[ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ] ) Parameters: * **RuleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the rule. * **Conditions** (*list*) -- The conditions. * *(dict) --* 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 can't be empty. For more information, see Quotas for your Application Load Balancers. * **Field** *(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" * **Values** *(list) --* 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 &) * * (matches 0 or more characters) * ? (matches exactly 1 character) * *(string) --* * **HostHeaderConfig** *(dict) --* Information for a host header condition. Specify only when "Field" is "host-header". * **Values** *(list) --* 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). You must include at least one "." character. You can include only alphabetical characters after the final "." character. If you specify multiple strings, the condition is satisfied if one of the strings matches the host name. * *(string) --* * **PathPatternConfig** *(dict) --* Information for a path pattern condition. Specify only when "Field" is "path-pattern". * **Values** *(list) --* 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 a query string condition. * *(string) --* * **HttpHeaderConfig** *(dict) --* Information for an HTTP header condition. Specify only when "Field" is "http-header". * **HttpHeaderName** *(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. Instead, use a host condition. * **Values** *(list) --* 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. * *(string) --* * **QueryStringConfig** *(dict) --* Information for a query string condition. Specify only when "Field" is "query-string". * **Values** *(list) --* 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. * *(dict) --* Information about a key/value pair. * **Key** *(string) --* The key. You can omit the key. * **Value** *(string) --* The value. * **HttpRequestMethodConfig** *(dict) --* Information for an HTTP method condition. Specify only when "Field" is "http-request-method". * **Values** *(list) --* 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. * *(string) --* * **SourceIpConfig** *(dict) --* Information for a source IP condition. Specify only when "Field" is "source-ip". * **Values** *(list) --* 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 an HTTP header condition. The total number of values must be less than, or equal to five. * *(string) --* * **Actions** (*list*) -- The actions. * *(dict) --* 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. * **Type** *(string) --* **[REQUIRED]** The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate-oidc". * **Issuer** *(string) --* **[REQUIRED]** The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* **[REQUIRED]** The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* **[REQUIRED]** The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* **[REQUIRED]** The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* **[REQUIRED]** The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* **[REQUIRED]** The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* **[REQUIRED]** The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent-encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* **[REQUIRED]** The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* **[REQUIRED]** The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. Return type: dict Returns: **Response Syntax** { 'Rules': [ { 'RuleArn': 'string', 'Priority': 'string', 'Conditions': [ { 'Field': 'string', 'Values': [ 'string', ], 'HostHeaderConfig': { 'Values': [ 'string', ] }, 'PathPatternConfig': { 'Values': [ 'string', ] }, 'HttpHeaderConfig': { 'HttpHeaderName': 'string', 'Values': [ 'string', ] }, 'QueryStringConfig': { 'Values': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'HttpRequestMethodConfig': { 'Values': [ 'string', ] }, 'SourceIpConfig': { 'Values': [ 'string', ] } }, ], 'Actions': [ { 'Type': 'forward'|'authenticate-oidc'|'authenticate-cognito'|'redirect'|'fixed-response', 'TargetGroupArn': 'string', 'AuthenticateOidcConfig': { 'Issuer': 'string', 'AuthorizationEndpoint': 'string', 'TokenEndpoint': 'string', 'UserInfoEndpoint': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate', 'UseExistingClientSecret': True|False }, 'AuthenticateCognitoConfig': { 'UserPoolArn': 'string', 'UserPoolClientId': 'string', 'UserPoolDomain': 'string', 'SessionCookieName': 'string', 'Scope': 'string', 'SessionTimeout': 123, 'AuthenticationRequestExtraParams': { 'string': 'string' }, 'OnUnauthenticatedRequest': 'deny'|'allow'|'authenticate' }, 'Order': 123, 'RedirectConfig': { 'Protocol': 'string', 'Port': 'string', 'Host': 'string', 'Path': 'string', 'Query': 'string', 'StatusCode': 'HTTP_301'|'HTTP_302' }, 'FixedResponseConfig': { 'MessageBody': 'string', 'StatusCode': 'string', 'ContentType': 'string' }, 'ForwardConfig': { 'TargetGroups': [ { 'TargetGroupArn': 'string', 'Weight': 123 }, ], 'TargetGroupStickinessConfig': { 'Enabled': True|False, 'DurationSeconds': 123 } } }, ], 'IsDefault': True|False }, ] } **Response Structure** * *(dict) --* * **Rules** *(list) --* Information about the modified rule. * *(dict) --* Information about a rule. * **RuleArn** *(string) --* The Amazon Resource Name (ARN) of the rule. * **Priority** *(string) --* The priority. * **Conditions** *(list) --* 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". * *(dict) --* 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 can't be empty. For more information, see Quotas for your Application Load Balancers. * **Field** *(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" * **Values** *(list) --* 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 &) * * (matches 0 or more characters) * ? (matches exactly 1 character) * *(string) --* * **HostHeaderConfig** *(dict) --* Information for a host header condition. Specify only when "Field" is "host-header". * **Values** *(list) --* 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). You must include at least one "." character. You can include only alphabetical characters after the final "." character. If you specify multiple strings, the condition is satisfied if one of the strings matches the host name. * *(string) --* * **PathPatternConfig** *(dict) --* Information for a path pattern condition. Specify only when "Field" is "path-pattern". * **Values** *(list) --* 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 a query string condition. * *(string) --* * **HttpHeaderConfig** *(dict) --* Information for an HTTP header condition. Specify only when "Field" is "http-header". * **HttpHeaderName** *(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. Instead, use a host condition. * **Values** *(list) --* 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. * *(string) --* * **QueryStringConfig** *(dict) --* Information for a query string condition. Specify only when "Field" is "query-string". * **Values** *(list) --* 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. * *(dict) --* Information about a key/value pair. * **Key** *(string) --* The key. You can omit the key. * **Value** *(string) --* The value. * **HttpRequestMethodConfig** *(dict) --* Information for an HTTP method condition. Specify only when "Field" is "http-request-method". * **Values** *(list) --* 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. * *(string) --* * **SourceIpConfig** *(dict) --* Information for a source IP condition. Specify only when "Field" is "source-ip". * **Values** *(list) --* 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 an HTTP header condition. The total number of values must be less than, or equal to five. * *(string) --* * **Actions** *(list) --* 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. * *(dict) --* 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. * **Type** *(string) --* The type of action. * **TargetGroupArn** *(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. * **AuthenticateOidcConfig** *(dict) --* [HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify only when "Type" is "authenticate- oidc". * **Issuer** *(string) --* The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **AuthorizationEndpoint** *(string) --* The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **TokenEndpoint** *(string) --* The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **UserInfoEndpoint** *(string) --* The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path. * **ClientId** *(string) --* The OAuth 2.0 client identifier. * **ClientSecret** *(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. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **UseExistingClientSecret** *(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. * **AuthenticateCognitoConfig** *(dict) --* [HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when "Type" is "authenticate-cognito". * **UserPoolArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Cognito user pool. * **UserPoolClientId** *(string) --* The ID of the Amazon Cognito user pool client. * **UserPoolDomain** *(string) --* The domain prefix or fully-qualified domain name of the Amazon Cognito user pool. * **SessionCookieName** *(string) --* The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie. * **Scope** *(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. * **SessionTimeout** *(integer) --* The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days). * **AuthenticationRequestExtraParams** *(dict) --* The query parameters (up to 10) to include in the redirect request to the authorization endpoint. * *(string) --* * *(string) --* * **OnUnauthenticatedRequest** *(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. * **Order** *(integer) --* 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** *(dict) --* [Application Load Balancer] Information for creating a redirect action. Specify only when "Type" is "redirect". * **Protocol** *(string) --* The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP. * **Port** *(string) --* The port. You can specify a value from 1 to 65535 or #{port}. * **Host** *(string) --* The hostname. This component is not percent- encoded. The hostname can contain #{host}. * **Path** *(string) --* The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. * **Query** *(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** *(string) --* The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302). * **FixedResponseConfig** *(dict) --* [Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only when "Type" is "fixed-response". * **MessageBody** *(string) --* The message. * **StatusCode** *(string) --* The HTTP response code (2XX, 4XX, or 5XX). * **ContentType** *(string) --* The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json * **ForwardConfig** *(dict) --* 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". * **TargetGroups** *(list) --* The target groups. For Network Load Balancers, you can specify a single target group. * *(dict) --* Information about how traffic will be distributed between multiple target groups in a forward rule. * **TargetGroupArn** *(string) --* The Amazon Resource Name (ARN) of the target group. * **Weight** *(integer) --* The weight. The range is 0 to 999. * **TargetGroupStickinessConfig** *(dict) --* The target group stickiness for the rule. * **Enabled** *(boolean) --* Indicates whether target group stickiness is enabled. * **DurationSeconds** *(integer) --* 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). You must specify this value when enabling target group stickiness. * **IsDefault** *(boolean) --* Indicates whether this is the default rule. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupAssociation LimitException" * "ElasticLoadBalancingv2.Client.exceptions.IncompatibleProtocolsE xception" * "ElasticLoadBalancingv2.Client.exceptions.RuleNotFoundException" * "ElasticLoadBalancingv2.Client.exceptions.OperationNotPermittedE xception" * "ElasticLoadBalancingv2.Client.exceptions.TooManyRegistrationsFo rTargetIdException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyTargetsExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.TargetGroupNotFoundExc eption" * "ElasticLoadBalancingv2.Client.exceptions.UnsupportedProtocolExc eption" * "ElasticLoadBalancingv2.Client.exceptions.TooManyActionsExceptio n" * "ElasticLoadBalancingv2.Client.exceptions.InvalidLoadBalancerAct ionException" * "ElasticLoadBalancingv2.Client.exceptions.TooManyUniqueTargetGro upsPerLoadBalancerException" **Examples** This example modifies the condition for the specified rule. response = client.modify_rule( Conditions=[ { 'Field': 'path-pattern', 'Values': [ '/images/*', ], }, ], RuleArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee', ) print(response) Expected Output: { 'Rules': [ { 'Actions': [ { 'TargetGroupArn': 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', 'Type': 'forward', }, ], 'Conditions': [ { 'Field': 'path-pattern', 'Values': [ '/images/*', ], }, ], 'IsDefault': False, 'Priority': '10', 'RuleArn': 'arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee', }, ], 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / delete_load_balancer delete_load_balancer ******************** ElasticLoadBalancingv2.Client.delete_load_balancer(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.delete_load_balancer( LoadBalancerArn='string' ) Parameters: **LoadBalancerArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the load balancer. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.LoadBalancerNotFoundEx ception" * "ElasticLoadBalancingv2.Client.exceptions.OperationNotPermittedE xception" * "ElasticLoadBalancingv2.Client.exceptions.ResourceInUseException" **Examples** This example deletes the specified load balancer. response = client.delete_load_balancer( LoadBalancerArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', ) print(response) Expected Output: { 'ResponseMetadata': { '...': '...', }, } ElasticLoadBalancingv2 / Client / describe_trust_store_associations describe_trust_store_associations ********************************* ElasticLoadBalancingv2.Client.describe_trust_store_associations(**kwargs) Describes all resources associated with the specified trust store. See also: AWS API Documentation **Request Syntax** response = client.describe_trust_store_associations( TrustStoreArn='string', Marker='string', PageSize=123 ) Parameters: * **TrustStoreArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the trust store. * **Marker** (*string*) -- The marker for the next set of results. (You received this marker from a previous call.) * **PageSize** (*integer*) -- The maximum number of results to return with this call. Return type: dict Returns: **Response Syntax** { 'TrustStoreAssociations': [ { 'ResourceArn': 'string' }, ], 'NextMarker': 'string' } **Response Structure** * *(dict) --* * **TrustStoreAssociations** *(list) --* Information about the resources the trust store is associated to. * *(dict) --* Information about the resources a trust store is associated with. * **ResourceArn** *(string) --* The Amazon Resource Name (ARN) of the resource. * **NextMarker** *(string) --* If there are additional results, this is the marker for the next set of results. Otherwise, this is null. **Exceptions** * "ElasticLoadBalancingv2.Client.exceptions.TrustStoreNotFoundExce ption"