Skip to content

create_transit_gateway

Operation

create_transit_gateway

create_transit_gateway(request: CreateTransitGatewayInput | CreateTransitGatewayInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateTransitGatewayInputDict]) -> CreateTransitGatewayOutput

Creates a transit gateway.

You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks. After the transit gateway enters the available state, you can attach your VPCs and VPN connections to the transit gateway.

To attach your VPCs, use CreateTransitGatewayVpcAttachment.

To attach a VPN connection, use CreateCustomerGateway to create a customer gateway and specify the ID of the customer gateway and the ID of the transit gateway in a call to CreateVpnConnection.

When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. You can use CreateTransitGatewayRouteTable to create additional transit gateway route tables. If you disable automatic route propagation, we do not create a default transit gateway route table. You can use EnableTransitGatewayRouteTablePropagation to propagate routes from a resource attachment to a transit gateway route table. If you disable automatic associations, you can use AssociateTransitGatewayRouteTable to associate a resource attachment with a transit gateway route table.

Parameters:

Name Type Description Default
request CreateTransitGatewayInput | CreateTransitGatewayInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[CreateTransitGatewayInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateTransitGatewayOutput

An instance of CreateTransitGatewayOutput.

create_transit_gateway async

create_transit_gateway(request: CreateTransitGatewayInput | CreateTransitGatewayInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateTransitGatewayInputDict]) -> CreateTransitGatewayOutput

Creates a transit gateway.

You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks. After the transit gateway enters the available state, you can attach your VPCs and VPN connections to the transit gateway.

To attach your VPCs, use CreateTransitGatewayVpcAttachment.

To attach a VPN connection, use CreateCustomerGateway to create a customer gateway and specify the ID of the customer gateway and the ID of the transit gateway in a call to CreateVpnConnection.

When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. You can use CreateTransitGatewayRouteTable to create additional transit gateway route tables. If you disable automatic route propagation, we do not create a default transit gateway route table. You can use EnableTransitGatewayRouteTablePropagation to propagate routes from a resource attachment to a transit gateway route table. If you disable automatic associations, you can use AssociateTransitGatewayRouteTable to associate a resource attachment with a transit gateway route table.

Parameters:

Name Type Description Default
request CreateTransitGatewayInput | CreateTransitGatewayInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[CreateTransitGatewayInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateTransitGatewayOutput

An instance of CreateTransitGatewayOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CreateTransitGatewayInputDict

Bases: TypedDict

Dictionary form of CreateTransitGatewayInput.

Attributes

description instance-attribute
description: str | None

A description of the transit gateway.

dry_run instance-attribute
dry_run: bool | None

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

options instance-attribute

The transit gateway options.

tag_specifications instance-attribute
tag_specifications: Sequence[TagSpecification | TagSpecificationDict] | None

The tags to apply to the transit gateway.

CreateTransitGatewayInput dataclass

Bases: _SerdeShape

Dataclass for CreateTransitGatewayInput structure.

Attributes

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

A description of the transit gateway.

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

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

options class-attribute instance-attribute
options: TransitGatewayRequestOptions | None = ...

The transit gateway options.

tag_specifications class-attribute instance-attribute
tag_specifications: list[TagSpecification] | None = ...

The tags to apply to the transit gateway.

Output

CreateTransitGatewayOutput dataclass

Bases: _SerdeShape

Dataclass for CreateTransitGatewayOutput structure.

Attributes

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.

transit_gateway class-attribute instance-attribute
transit_gateway: TransitGateway | None = ...

Information about the transit gateway.