ECS / Client / update_gateway

update_gateway

ECS.Client.update_gateway(**kwargs)

Modifies the configuration of a gateway. You can change only the properties that can be applied without interrupting traffic, and the configuration variant that you provide must match the gateway’s type. UpdateGateway is an asynchronous operation: the changes are applied to each load balancer the gateway manages, and the gateway reports a status of UPDATE_IN_PROGRESS until the update completes. If Amazon ECS can’t update one or more resources, it makes a best effort to update the rest and the gateway status changes to UPDATE_FAILED. Use DescribeGateway to inspect the gateway’s statusReason and failures list, which gives the ARN of each load balancer that was not updated and the operation, error code, and message for each failure.

If you specify infrastructureRoleArn, you must have the iam:PassRole permission for that role.

See also: AWS API Documentation

Request Syntax

response = client.update_gateway(
    gateway='string',
    infrastructureRoleArn='string',
    deletionProtection=True|False,
    configuration={
        'hostSharedAlb': {
            'networkConfiguration': {
                'inboundSecurityGroup': 'string'
            },
            'maxAlbCount': 123,
            'webACLArn': 'string',
            'accessLogs': {
                'destination': {
                    's3': {
                        'bucket': 'string',
                        'prefix': 'string'
                    }
                }
            },
            'httpDesync': 'monitor'|'defensive'|'strictest',
            'testTrafficRules': {
                'header': {
                    'name': 'string',
                    'values': [
                        'string',
                    ]
                }
            }
        }
    },
    propagateTags='NONE'|'GATEWAY'
)
Parameters:
  • gateway (string) –

    [REQUIRED]

    The name or Amazon Resource Name (ARN) of the gateway to update.

  • infrastructureRoleArn (string) – The Amazon Resource Name (ARN) of the IAM role that the gateway assumes to manage infrastructure on your behalf.

  • deletionProtection (boolean) – Specifies whether to enable deletion protection for the gateway. When enabled, the gateway can’t be deleted.

  • configuration (dict) –

    The updated type-specific configuration for the gateway. The configuration variant must match the gateway’s existing type, and only mutable fields can be changed.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: hostSharedAlb.

    • hostSharedAlb (dict) –

      The mutable configuration for a host-based, shared Application Load Balancer gateway.

      • networkConfiguration (dict) –

        The mutable network configuration for the load balancers that the gateway manages.

        • inboundSecurityGroup (string) –

          The ID of a security group that you provide to control inbound traffic to the load balancers that the gateway manages. When you specify a security group, the gateway doesn’t create inbound rules on the security group it manages.

      • maxAlbCount (integer) –

        The maximum number of Application Load Balancers that the gateway manages.

      • webACLArn (string) –

        The Amazon Resource Name (ARN) of the WAF web ACL to associate with the load balancers that the gateway manages.

      • accessLogs (dict) –

        The access log configuration for the load balancers that the gateway manages.

        • destination (dict) –

          The destination where access logs are delivered.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: s3.

          • s3 (dict) –

            The Amazon S3 destination for access logs.

            • bucket (string) – [REQUIRED]

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

            • prefix (string) –

              The object key prefix for the access logs in the Amazon S3 bucket.

      • httpDesync (string) –

        The desync mitigation mode for the load balancers that the gateway manages.

      • testTrafficRules (dict) –

        The rules that route test traffic for progressive deployments.

        • header (dict) –

          The header-based rule that identifies test traffic.

          • name (string) – [REQUIRED]

            The name of the header to match for test traffic routing.

          • values (list) – [REQUIRED]

            The header values to match for test traffic routing.

            • (string) –

  • propagateTags (string) – Specifies whether to propagate the tags from the gateway to the infrastructure that the gateway manages. If you don’t specify a value, the gateway’s existing setting is unchanged.

Return type:

dict

Returns:

Response Syntax

{
    'gatewayArn': 'string',
    'name': 'string',
    'status': 'ACTIVE'|'UPDATE_IN_PROGRESS'|'UPDATE_COMPLETE'|'UPDATE_FAILED'|'DELETED'
}

Response Structure

  • (dict) –

    • gatewayArn (string) –

      The Amazon Resource Name (ARN) of the gateway.

    • name (string) –

      The name of the gateway.

    • status (string) –

      The status of the gateway. After a successful update request, the status is UPDATE_IN_PROGRESS.

Exceptions

  • ECS.Client.exceptions.AccessDeniedException

  • ECS.Client.exceptions.ServerException

  • ECS.Client.exceptions.InvalidParameterException

  • ECS.Client.exceptions.ClientException

  • ECS.Client.exceptions.GatewayNotFoundException

  • ECS.Client.exceptions.UnsupportedFeatureException