create_transit_gateway_vpc_attachment
¶
create_transit_gateway_vpc_attachment(
*,
config_overrides: Optional[EC2ClientConfig] = None,
transit_gateway_id: Optional[TransitGatewayId] = None,
vpc_id: Optional[VpcId] = None,
subnet_ids: Optional[TransitGatewaySubnetIdList] = None,
options: Optional[CreateTransitGatewayVpcAttachmentRequestOptions] = None,
tag_specifications: Optional[TagSpecificationList] = None,
dry_run: Optional[Boolean] = None,
) -> CreateTransitGatewayVpcAttachmentResult
Attaches the specified VPC to the specified transit gateway.
If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is already attached, the new VPC CIDR range is not propagated to the default propagation route table.
To send VPC traffic to an attached transit gateway, add a route to the VPC route table using CreateRoute.
Parameters:
-
transit_gateway_id(Optional[TransitGatewayId], default:None) –The ID of the transit gateway.
-
vpc_id(Optional[VpcId], default:None) –The ID of the VPC.
-
subnet_ids(Optional[TransitGatewaySubnetIdList], default:None) –The IDs of one or more subnets. You can specify only one subnet per Availability Zone. You must specify at least one subnet, but we recommend that you specify two subnets for better availability. The transit gateway uses one IP address from each specified subnet.
-
options(Optional[CreateTransitGatewayVpcAttachmentRequestOptions], default:None) –The VPC attachment options.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the VPC attachment.
-
dry_run(Optional[Boolean], default: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 isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 | |