EC2.Client.
replace_transit_gateway_route
(**kwargs)¶Replaces the specified route in the specified transit gateway route table.
See also: AWS API Documentation
Request Syntax
response = client.replace_transit_gateway_route(
DestinationCidrBlock='string',
TransitGatewayRouteTableId='string',
TransitGatewayAttachmentId='string',
Blackhole=True|False,
DryRun=True|False
)
[REQUIRED]
The CIDR range used for the destination match. Routing decisions are based on the most specific match.
[REQUIRED]
The ID of the route table.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.dict
Response Syntax
{
'Route': {
'DestinationCidrBlock': 'string',
'PrefixListId': 'string',
'TransitGatewayRouteTableAnnouncementId': 'string',
'TransitGatewayAttachments': [
{
'ResourceId': 'string',
'TransitGatewayAttachmentId': 'string',
'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering'
},
],
'Type': 'static'|'propagated',
'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted'
}
}
Response Structure
(dict) --
Route (dict) --
Information about the modified route.
DestinationCidrBlock (string) --
The CIDR block used for destination matches.
PrefixListId (string) --
The ID of the prefix list used for destination matches.
TransitGatewayRouteTableAnnouncementId (string) --
The ID of the transit gateway route table announcement.
TransitGatewayAttachments (list) --
The attachments.
(dict) --
Describes a route attachment.
ResourceId (string) --
The ID of the resource.
TransitGatewayAttachmentId (string) --
The ID of the attachment.
ResourceType (string) --
The resource type. Note that the tgw-peering
resource type has been deprecated.
Type (string) --
The route type.
State (string) --
The state of the route.