create_transit_gateway_vpc_attachment
async
¶
create_transit_gateway_vpc_attachment(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 | |