Skip to content

ECS  >  Operations  >  create_gateway

create_gateway

Operation

create_gateway async

create_gateway(input: CreateGatewayInput, plugins: list[Plugin] | None = None) -> CreateGatewayOutput

Creates a gateway. A gateway defines and dynamically manages ingress paths for your Amazon ECS services, handling traffic routing and infrastructure across multiple services while optimizing infrastructure usage. CreateGateway is a synchronous operation and the gateway is returned with a status of ACTIVE. The load balancers and other infrastructure that a gateway manages aren't created until a service in an associated cluster begins using the gateway.

To use this operation, you must have the iam:PassRole permission for the infrastructure role that you specify in infrastructureRoleArn.

Parameters:

Name Type Description Default
input CreateGatewayInput

An instance of CreateGatewayInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateGatewayOutput

An instance of CreateGatewayOutput.

Input

CreateGatewayInput dataclass

Bases: _SerdeShape

Dataclass for CreateGatewayInput structure.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error.

This field is autopopulated if not provided.

configuration class-attribute instance-attribute
configuration: GatewayConfiguration | None = ...

The type-specific configuration for the gateway. Exactly one configuration variant must be set, and it determines the gateway type. For example, hostSharedAlb configures a gateway that uses Application Load Balancers with host-based routing.

deletion_protection class-attribute instance-attribute
deletion_protection: bool | None = ...

Specifies whether to enable deletion protection for the gateway. When enabled, the gateway can't be deleted, and the gateway propagates this setting to the load balancers it manages. The default is true.

infrastructure_role_arn class-attribute instance-attribute
infrastructure_role_arn: str | None = ...

The Amazon Resource Name (ARN) of the IAM role that the gateway assumes to create and manage infrastructure on your behalf.

name class-attribute instance-attribute
name: str | None = ...

The name for the gateway. The name must be unique within your account and can be up to 255 characters.

propagate_tags class-attribute instance-attribute
propagate_tags: str | None = ...

Specifies whether to propagate the tags from the gateway to the infrastructure that the gateway manages. The default is GATEWAY.

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

The metadata that you apply to the gateway to help you categorize and organize it. Each tag consists of a key and an optional value. Depending on propagateTags, these tags can be applied to the infrastructure the gateway manages.

Output

CreateGatewayOutput dataclass

Bases: _SerdeShape

Dataclass for CreateGatewayOutput structure.

Attributes

gateway_arn class-attribute instance-attribute
gateway_arn: str | None = ...

The Amazon Resource Name (ARN) of the gateway.

name class-attribute instance-attribute
name: str | None = ...

The name of the gateway.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

status class-attribute instance-attribute
status: str | None = ...

The status of the gateway. A newly created gateway is always ACTIVE.