route_table_association#
Autogenerated using pop-create-idem
hub.exec.boto3.client.ec2.associate_route_table hub.exec.boto3.client.ec2.disassociate_route_table hub.tool.boto3.resource.exec(resource, associate_with_subnet, *args, **kwargs)
- async idem_aws.states.aws.ec2.route_table_association.present(hub, ctx, name: str, route_table_id: str, resource_id: str = None, subnet_id: str = None, gateway_id: str = None) Dict[str, Any] [source]#
Associates a subnet in your VPC or an internet gateway or virtual private gateway attached to your VPC with a route table in your VPC.
This association causes traffic from the subnet or gateway to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table later. A route table can be associated with multiple subnets.
- Parameters:
name (str) – An Idem name to identify the route table resource.
resource_id (str, Optional) – AWS Route Table ID.
route_table_id (str) – The ID of the route table.
subnet_id (str, Optional) – The ID of the subnet. A subnet ID is not returned for an implicit association.
gateway_id (str, Optional) – The ID of the internet gateway or virtual private gateway.
- Request Syntax:
[route_table-resource-name]: aws.ec2.route_table_association.present: - route_table_id: 'string' - resource_id: 'string' - subnet_id: 'string' - gateway_id: 'string'
- Returns:
Dict[str, Any]
Examples
test_route-table_association: aws.ec2.route_table_association.present: - route_table_id: vpc-02850adfa9f6fc916 - resource_id: route_table-3485hydfe5f6tb998 - gateway_id: vgw-0334141b528f99316 - subnet_id: subnet-0610f7c1a12a1af6a
- async idem_aws.states.aws.ec2.route_table_association.absent(hub, ctx, name: str, route_table_id: str = None, resource_id: str = None) Dict[str, Any] [source]#
Disassociates a subnet or gateway from a route table.
After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC’s main route table.
- Parameters:
- Request Syntax:
[ami-resource-id]: aws.ec2.ami.absent: - name: "string" - resource_id: "string"
- Returns:
Dict[str, Any]
Examples
resource_is_absent: aws.ec2.route_table_association.absent: - name: value - route_table: value
- async idem_aws.states.aws.ec2.route_table_association.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.
Describes one or more of your route table associations. Each subnet in your VPC must be associated with a route table. If a subnet is not explicitly associated with any route table, it is implicitly associated with the main route table. This command does not return the subnet ID for implicit associations. For more information, see Route tables in the Amazon Virtual Private Cloud User Guide.
- Returns:
Dict[str, Any]
Examples
$ idem describe aws.ec2.route_table_association