route#

async idem_aws.states.aws.ec2.route.present(hub, ctx, name: str, route_table_id: str, resource_id: str = None, destination_cidr_block: str = None, destination_ipv6_cidr_block: str = None, destination_prefix_list_id: str = None, vpc_endpoint_id: str = None, egress_only_internet_gateway_id: str = None, gateway_id: str = None, instance_id: str = None, nat_gateway_id: str = None, transit_gateway_id: str = None, local_gateway_id: str = None, carrier_gateway_id: str = None, network_interface_id: str = None, vpc_peering_connection_id: str = None, core_network_arn: str = None) Dict[str, Any][source]#

Creates a route in a route table within a VPC. You must specify one of the following targets: internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only internet gateway, or transit gateway. When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address 192.0.2.3, and the route table includes the following two IPv4 routes: 192.0.2.0/24 (goes to some target A) 192.0.2.0/28 (goes to some target B) Both routes apply to the traffic destined for 192.0.2.3. However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic. For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide.

Parameters:
  • name (str) – An Idem name of the resource.

  • route_table_id (str) – The ID of the route table for the route.

  • resource_id (str, Optional) – Unique identifier to identify the route in a route table. format of resource id is <route_table_id>/<destination_cidr_block or destination_ipv6_cidr_block or destination_prefix_list_id>

  • destination_cidr_block (str, Optional) – The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18. Defaults to None.

  • destination_ipv6_cidr_block (str, Optional) – The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match. Defaults to None.

  • destination_prefix_list_id (str, Optional) – The ID of a prefix list used for the destination match. Defaults to None.

  • vpc_endpoint_id (str, Optional) – The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only. Defaults to None.

  • egress_only_internet_gateway_id (str, Optional) – [IPv6 traffic only] The ID of an egress-only internet gateway. Defaults to None.

  • gateway_id (str, Optional) – The ID of an internet gateway or virtual private gateway attached to your VPC. Defaults to None.

  • instance_id (str, Optional) – The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached. Defaults to None.

  • nat_gateway_id (str, Optional) – [IPv4 traffic only] The ID of a NAT gateway. Defaults to None.

  • transit_gateway_id (str, Optional) – The ID of a transit gateway. Defaults to None.

  • local_gateway_id (str, Optional) – The ID of the local gateway. Defaults to None.

  • carrier_gateway_id (str, Optional) – The ID of the carrier gateway. You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone. Defaults to None.

  • network_interface_id (str, Optional) – The ID of a network interface. Defaults to None.

  • vpc_peering_connection_id (str, Optional) – The ID of a VPC peering connection. Defaults to None.

  • core_network_arn (str, Optional) – The Amazon Resource Name (ARN) of the core network. Defaults to None.

Request Syntax:
[route-table-id-destination]:
  aws.ec2.route.present:
    - name: "string"
    - route_table_id: "string"
    - destination_cidr_block: "string"
    - gateway_id: "string"
    - resource_id: "string"
Returns:

Dict[str, Any]

Examples

r-rtb-343452242424:
  aws.ec2.route.present:
    - name: r-rtb-343452242424
    - route_table_id: rtb-3434522
    - resource_id: r-rtb-343452242424
    - destination_cidr_block: 172.12.12.201
    - gateway_id: subnet-4923930130
async idem_aws.states.aws.ec2.route.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any][source]#

Deletes the specified route from the specified route table.

Parameters:
  • name (str) – An Idem name of the resource.

  • resource_id (str, Optional) – Unique identifier to identify the route in a route table. format of resource id is <route_table_id>/<destination_cidr_block or destination_ipv6_cidr_block or destination_prefix_list_id>. Idem automatically considers this resource being absent if this field is not specified.

Returns:

Dict[str, Any]

Examples

resource_is_absent:
  aws.ec2.route.absent:
    - name: value
    - resource_id: value
async idem_aws.states.aws.ec2.route.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Describe the resource in a way that can be recreated/managed with the corresponding “present” function

Returns:

Dict[str, Any]

Examples

$ idem describe aws.ec2.route