boto3_vpc¶
Connection module for Amazon VPC using boto3.¶
Renamed from
boto_vpctoboto3_vpcand rewritten to use the boto3 EC2 client API directly viasaltext.boto3.utils.boto3mod. The legacy boto2 code path has been removed.
- depends:
boto3 >= 1.28.0
botocore >= 1.31.0
- configuration:
This module accepts explicit VPC credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More information available at:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
If IAM roles are not used you need to specify them either in the minion’s config file or as a profile. For example, to specify them in the minion’s config file:
vpc.keyid: GKTADJGHEIQSXMKKRBJ08H
vpc.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
A region may also be specified in the configuration:
vpc.region: us-east-1
It’s also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:
myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
region: us-east-1
Added in version 1.0.0.
- saltext.boto3.modules.boto3_vpc.__virtual__()[source]¶
Only load if boto3 is available. Minimum version is enforced via the project’s
pyproject.tomldependency declaration.
- saltext.boto3.modules.boto3_vpc.get_id(name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return the id of the VPC matching the supplied filters.
- name (str):
The name of the VPC to look up.
- cidr (str, optional):
The primary CIDR block for the VPC. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the VPCs. Defaults to None.
- region (str, optional):
The AWS region to look up the VPC in. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.get_id myvpc
- saltext.boto3.modules.boto3_vpc.exists(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
{"exists": True}if a VPC matching the supplied filters exists.- vpc_id (str, optional):
The ID of the VPC to check for existence. Defaults to None.
- name (str, optional):
The name of the VPC to check for existence. Defaults to None.
- cidr (str, optional):
The primary CIDR block for the VPC. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the VPCs. Defaults to None.
- region (str, optional):
The AWS region to look up the VPC in. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.exists myvpc
- saltext.boto3.modules.boto3_vpc.check_vpc(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return the VPC id if a VPC with the supplied id or name exists, else
None.- vpc_id (str, optional):
The ID of the VPC to check for existence. Defaults to None.
- vpc_name (str, optional):
The name of the VPC to check for existence. Defaults to None.
- region (str, optional):
The AWS region to look up the VPC in. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.check_vpc vpc_name=myvpc
- saltext.boto3.modules.boto3_vpc.create(cidr_block, instance_tenancy=None, vpc_name=None, enable_dns_support=None, enable_dns_hostnames=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create a VPC with the primary CIDR block.
Changed in version 1.1.0: Validate that
cidr_blockis a CIDR string before creating the VPC.- cidr_block (str):
The primary CIDR block for the VPC.
- instance_tenancy (str, optional):
The instance tenancy option for the VPC. Defaults to None.
- vpc_name (str, optional):
The name of the VPC. Defaults to None.
- enable_dns_support (bool, optional):
Whether to enable DNS support for the VPC. Defaults to None.
- enable_dns_hostnames (bool, optional):
Whether to enable DNS hostnames for the VPC. Defaults to None.
- tags (dict, optional):
A dictionary of tags to apply to the VPC. Defaults to None.
- region (str, optional):
The AWS region to create the VPC in. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.create '10.0.0.0/24'
- saltext.boto3.modules.boto3_vpc.associate_vpc_cidr_blocks(cidr_blocks, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Associate one or more secondary CIDR blocks to an existing VPC.
Added in version 1.1.0.
- cidr_blocks (str or list):
The CIDR block or list of CIDR blocks to associate with the VPC.
- vpc_id (str, optional):
The ID of the VPC. Defaults to None.
- vpc_name (str, optional):
The name of the VPC. Defaults to None.
- region (str, optional):
The AWS region where the VPC exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.associate_vpc_cidr_blocks '10.0.1.0/24' vpc_name='myvpc'
- saltext.boto3.modules.boto3_vpc.delete(vpc_id=None, name=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Delete a VPC by id or name.
- vpc_id (str, optional):
The ID of the VPC to delete. Defaults to None.
- name (str, optional):
Deprecated. Use vpc_name instead.
- vpc_name (str, optional):
The name of the VPC to delete. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the VPCs. Defaults to None.
- region (str, optional):
The AWS region where the VPC exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.delete vpc_id='vpc-6b1fe402' salt myminion boto3_vpc.delete vpc_name='myvpc'
- saltext.boto3.modules.boto3_vpc.describe(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Describe a VPC’s properties. If neither id nor name is provided the default VPC (if any) is described.
- vpc_id (str, optional):
The ID of the VPC to describe. Defaults to None.
- vpc_name (str, optional):
The name of the VPC to describe. Defaults to None.
- region (str, optional):
The AWS region where the VPC exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.describe vpc_id=vpc-123456
- saltext.boto3.modules.boto3_vpc.describe_vpcs(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Describe all VPCs matching the supplied filters.
- vpc_id (str, optional):
The ID of the VPC to describe. Defaults to None.
- name (str, optional):
The name of the VPC to describe. Defaults to None.
- cidr (str, optional):
The CIDR block of the VPC to describe. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the VPCs. Defaults to None.
- region (str, optional):
The AWS region where the VPC exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.describe_vpcs
- saltext.boto3.modules.boto3_vpc.get_resource_id(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
{"id": "..."}for a VPC resource looked up by name or id.- resource_id (str, optional):
The ID of the resource to look up. Defaults to None.
- name (str, optional):
The name of the resource to look up. Defaults to None.
- region (str, optional):
The AWS region where the resource exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
Currently supported
resourcevalues:vpc,subnet,dhcp_options.CLI Example:
salt myminion boto3_vpc.get_resource_id subnet mysubnet
- saltext.boto3.modules.boto3_vpc.resource_exists(resource, name=None, resource_id=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
{"exists": True}if a resource ofresourcematching the supplied filters exists.- resource_id (str, optional):
The ID of the resource to check for existence. Defaults to None.
- name (str, optional):
The name of the resource to check for existence. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the resources. Defaults to None.
- region (str, optional):
The AWS region where the resource exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.resource_exists subnet name=mysubnet
- saltext.boto3.modules.boto3_vpc.create_subnet(vpc_id=None, cidr_block=None, vpc_name=None, availability_zone=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None, auto_assign_public_ipv4=False)[source]¶
Create a subnet inside an existing VPC.
- vpc_id (str, optional):
The ID of the VPC in which to create the subnet. Defaults to None.
- cidr_block (str, optional):
The CIDR block for the subnet. Defaults to None.
- vpc_name (str, optional):
The name of the VPC in which to create the subnet. Defaults to None.
- availability_zone (str, optional):
The availability zone for the subnet. Defaults to None.
- subnet_name (str, optional):
The name of the subnet to create. Defaults to None.
- tags (dict, optional):
A dictionary of tags to assign to the subnet. Defaults to None.
- region (str, optional):
The AWS region where the subnet will be created. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
- auto_assign_public_ipv4 (bool, optional):
Whether to automatically assign a public IPv4 address to the subnet. Defaults to False.
CLI Example:
salt myminion boto3_vpc.create_subnet vpc_name=myvpc \ subnet_name=mysubnet cidr_block=10.0.0.0/25
- saltext.boto3.modules.boto3_vpc.delete_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Delete a subnet by id or name.
- subnet_id (str, optional):
The ID of the subnet to delete. Defaults to None.
- subnet_name (str, optional):
The name of the subnet to delete. Defaults to None.
- region (str, optional):
The AWS region where the subnet exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.delete_subnet 'subnet-6a1fe403'
- saltext.boto3.modules.boto3_vpc.subnet_exists(subnet_id=None, name=None, subnet_name=None, cidr=None, tags=None, zones=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
{"exists": True}when a subnet matching the filters exists.- subnet_id (str, optional):
The ID of the subnet to check for existence. Defaults to None.
- subnet_name (str, optional):
The name of the subnet to check for existence. Defaults to None.
- cidr (str, optional):
The CIDR block of the subnet to check for existence. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the subnets. Defaults to None.
- zones (list or str, optional):
The availability zones to filter the subnets. Defaults to None.
- region (str, optional):
The AWS region where the subnet exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.subnet_exists subnet_id='subnet-6a1fe403'
- saltext.boto3.modules.boto3_vpc.get_subnet_association(subnets, region=None, key=None, keyid=None, profile=None)[source]¶
Return the VPC id (or list of VPC ids) associated with the given subnet id or list of subnet ids.
- subnets (str or list):
The ID or list of IDs of the subnets to check for association.
- region (str, optional):
The AWS region where the subnets exist. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.get_subnet_association subnet-61b47516
- saltext.boto3.modules.boto3_vpc.describe_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Describe a single subnet by id or name.
- subnet_id (str, optional):
The ID of the subnet to describe. Defaults to None.
- subnet_name (str, optional):
The name of the subnet to describe. Defaults to None.
- region (str, optional):
The AWS region where the subnet exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.describe_subnet subnet_id=subnet-123456
- saltext.boto3.modules.boto3_vpc.describe_subnets(subnet_ids=None, subnet_names=None, vpc_id=None, cidr=None, region=None, key=None, keyid=None, profile=None)[source]¶
Describe subnets matching the supplied filters.
- subnet_ids (str or list, optional):
The ID or list of IDs of the subnets to describe. Defaults to None.
- subnet_names (str or list, optional):
The name or list of names of the subnets to describe. Defaults to None.
- vpc_id (str, optional):
The ID of the VPC to which the subnets belong. Defaults to None.
- cidr (str, optional):
The CIDR block of the subnets to describe. Defaults to None.
- region (str, optional):
The AWS region where the subnets exist. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.describe_subnets vpc_id=vpc-123456
- saltext.boto3.modules.boto3_vpc.create_dhcp_options(domain_name=None, domain_name_servers=None, ntp_servers=None, netbios_name_servers=None, netbios_node_type=None, dhcp_options_name=None, tags=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create a DHCP options set, optionally associating it with an existing VPC.
- domain_name (str, optional):
The domain name for the DHCP options set. Defaults to None.
- domain_name_servers (str or list, optional):
The domain name servers for the DHCP options set. Defaults to None.
- ntp_servers (str or list, optional):
The NTP servers for the DHCP options set. Defaults to None.
- netbios_name_servers (str or list, optional):
The NetBIOS name servers for the DHCP options set. Defaults to None.
- netbios_node_type (str, optional):
The NetBIOS node type for the DHCP options set. Defaults to None.
- dhcp_options_name (str, optional):
The name to assign to the DHCP options set. Defaults to None.
- tags (dict, optional):
A dictionary of tags to assign to the DHCP options set. Defaults to None.
- vpc_id (str, optional):
The ID of the VPC to associate with the DHCP options set. Defaults to None.
- vpc_name (str, optional):
The name of the VPC to associate with the DHCP options set. Defaults to None.
- region (str, optional):
The AWS region where the DHCP options set should be created. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.create_dhcp_options domain_name='example.com' \ domain_name_servers='[1.2.3.4]' vpc_name='myvpc'
- saltext.boto3.modules.boto3_vpc.get_dhcp_options(dhcp_options_name=None, dhcp_options_id=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return the configured options for the named DHCP options set.
- dhcp_options_name (str, optional):
The name of the DHCP options set to retrieve. Defaults to None.
- dhcp_options_id (str, optional):
The ID of the DHCP options set to retrieve. Defaults to None.
- region (str, optional):
The AWS region where the DHCP options set exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.get_dhcp_options 'myfunnydhcpoptionsname'
- saltext.boto3.modules.boto3_vpc.delete_dhcp_options(dhcp_options_id=None, dhcp_options_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Delete a DHCP options set by id or name.
- dhcp_options_id (str, optional):
The ID of the DHCP options set to delete. Defaults to None.
- dhcp_options_name (str, optional):
The name of the DHCP options set to delete. Defaults to None.
- region (str, optional):
The AWS region where the DHCP options set exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.delete_dhcp_options 'dopt-b6a247df'
- saltext.boto3.modules.boto3_vpc.associate_dhcp_options_to_vpc(dhcp_options_id, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Associate a DHCP options set with a VPC.
- dhcp_options_id (str):
The ID of the DHCP options set to associate with the VPC. Required.
- vpc_id (str, optional):
The ID of the VPC to associate with the DHCP options set. Defaults to None.
- vpc_name (str, optional):
The name of the VPC to associate with the DHCP options set. Defaults to None.
- region (str, optional):
The AWS region where the VPC and DHCP options set exist. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.associate_dhcp_options_to_vpc 'dopt-a0bl34pp' 'vpc-6b1fe402'
- saltext.boto3.modules.boto3_vpc.dhcp_options_exists(dhcp_options_id=None, name=None, dhcp_options_name=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
{"exists": True}if a DHCP options set matching the filters exists.- dhcp_options_id (str, optional):
The ID of the DHCP options set to check for existence. Defaults to None.
- dhcp_options_name (str, optional):
The name of the DHCP options set to check for existence. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the DHCP options set. Defaults to None.
- region (str, optional):
The AWS region where the DHCP options set exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.dhcp_options_exists dhcp_options_id='dopt-a0bl34pp'
- saltext.boto3.modules.boto3_vpc.create_internet_gateway(internet_gateway_name=None, vpc_id=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create an internet gateway, optionally attaching it to an existing VPC.
- internet_gateway_name (str, optional):
The name of the internet gateway to create. Defaults to None.
- vpc_id (str, optional):
The ID of the VPC to attach the internet gateway to. Defaults to None.
- vpc_name (str, optional):
The name of the VPC to attach the internet gateway to. Defaults to None.
- tags (dict, optional):
A dictionary of tags to apply to the internet gateway. Defaults to None.
- region (str, optional):
The AWS region where the internet gateway will be created. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.create_internet_gateway \ internet_gateway_name=myigw vpc_name=myvpc
- saltext.boto3.modules.boto3_vpc.delete_internet_gateway(internet_gateway_id=None, internet_gateway_name=None, detach=False, region=None, key=None, keyid=None, profile=None)[source]¶
Delete an internet gateway by id or name. If
detachisTrue, any VPC attachment is detached first.- internet_gateway_id (str, optional):
The ID of the internet gateway to delete. Defaults to None.
- internet_gateway_name (str, optional):
The name of the internet gateway to delete. Defaults to None.
- detach (bool, optional):
Whether to detach the internet gateway from any VPC attachments before deletion. Defaults to False.
- region (str, optional):
The AWS region where the internet gateway exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.delete_internet_gateway internet_gateway_id=igw-1a2b3c
- saltext.boto3.modules.boto3_vpc.nat_gateway_exists(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None)[source]¶
Return
Trueif a NAT gateway matching the filter criteria exists.- nat_gateway_id (str, optional):
The ID of the NAT gateway to check for existence. Defaults to None.
- subnet_id (str, optional):
The ID of the subnet associated with the NAT gateway. Defaults to None.
- subnet_name (str, optional):
The name of the subnet associated with the NAT gateway. Defaults to None.
- vpc_id (str, optional):
The ID of the VPC associated with the NAT gateway. Defaults to None.
- vpc_name (str, optional):
The name of the VPC associated with the NAT gateway. Defaults to None.
- states (tuple, optional):
A tuple of NAT gateway states to filter by. Defaults to (“pending”, “available”).
- region (str, optional):
The AWS region where the NAT gateway exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.nat_gateway_exists nat_gateway_id='nat-03b02643b43216fe7'
- saltext.boto3.modules.boto3_vpc.describe_nat_gateways(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None)[source]¶
Return a list of NAT gateway descriptions matching the selection criteria.
- nat_gateway_id (str, optional):
The ID of the NAT gateway to describe. Defaults to None.
- subnet_id (str, optional):
The ID of the subnet associated with the NAT gateway. Defaults to None.
- subnet_name (str, optional):
The name of the subnet associated with the NAT gateway. Defaults to None.
- vpc_id (str, optional):
The ID of the VPC associated with the NAT gateway. Defaults to None.
- vpc_name (str, optional):
The name of the VPC associated with the NAT gateway. Defaults to None.
- states (tuple, optional):
A tuple of NAT gateway states to filter by. Defaults to (“pending”, “available”).
- region (str, optional):
The AWS region where the NAT gateway exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.describe_nat_gateways subnet_id='subnet-5b05942d'
- saltext.boto3.modules.boto3_vpc.create_nat_gateway(subnet_id=None, subnet_name=None, allocation_id=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create a NAT gateway inside an existing subnet. If
allocation_idis not supplied a new Elastic IP is allocated and used.- subnet_id (str, optional):
The ID of the subnet where the NAT gateway will be created. Defaults to None.
- subnet_name (str, optional):
The name of the subnet where the NAT gateway will be created. Defaults to None.
- allocation_id (str, optional):
The allocation ID of an existing Elastic IP to associate with the NAT gateway. If not provided, a new Elastic IP will be allocated. Defaults to None.
- region (str, optional):
The AWS region where the NAT gateway will be created. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.create_nat_gateway subnet_name=mysubnet
- saltext.boto3.modules.boto3_vpc.delete_nat_gateway(nat_gateway_id, release_eips=False, region=None, key=None, keyid=None, profile=None, wait_for_delete=False, wait_for_delete_retries=5)[source]¶
Delete a NAT gateway by id, optionally releasing any associated EIPs.
- nat_gateway_id (str, optional):
The ID of the NAT gateway to delete. Defaults to None.
- release_eips (bool, optional):
Whether to release any Elastic IPs associated with the NAT gateway. Defaults to False.
- region (str, optional):
The AWS region where the NAT gateway exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
- wait_for_delete (bool, optional):
Whether to wait for the NAT gateway to be fully deleted. Defaults to False.
- wait_for_delete_retries (int, optional):
The number of times to retry checking the deletion status. Defaults to 5.
CLI Example:
salt myminion boto3_vpc.delete_nat_gateway nat_gateway_id=nat-1a2b3c
- saltext.boto3.modules.boto3_vpc.create_customer_gateway(vpn_connection_type, ip_address, bgp_asn, customer_gateway_name=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create a customer gateway.
- vpn_connection_type (str):
The type of VPN connection. Typically ‘ipsec.1’.
- ip_address (str):
The public IP address of the customer gateway.
- bgp_asn (int):
The BGP ASN of the customer gateway.
- customer_gateway_name (str, optional):
The name to assign to the customer gateway. Defaults to None.
- tags (dict, optional):
A dictionary of tags to assign to the customer gateway. Defaults to None.
- region (str, optional):
The AWS region where the customer gateway will be created. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.create_customer_gateway 'ipsec.1' '12.1.2.3' 65534
- saltext.boto3.modules.boto3_vpc.delete_customer_gateway(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Delete a customer gateway by id or name.
- customer_gateway_id (str, optional):
The ID of the customer gateway to delete. Defaults to None.
- customer_gateway_name (str, optional):
The name of the customer gateway to delete. Defaults to None.
- region (str, optional):
The AWS region where the customer gateway exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.delete_customer_gateway 'cgw-b6a247df'
- saltext.boto3.modules.boto3_vpc.customer_gateway_exists(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
{"exists": True}if the given customer gateway exists.- customer_gateway_id (str, optional):
The ID of the customer gateway to check. Defaults to None.
- customer_gateway_name (str, optional):
The name of the customer gateway to check. Defaults to None.
- region (str, optional):
The AWS region where the customer gateway exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.customer_gateway_exists cgw-b6a247df
- saltext.boto3.modules.boto3_vpc.create_network_acl(vpc_id=None, vpc_name=None, network_acl_name=None, subnet_id=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create a network ACL within a VPC, optionally associating it with a subnet.
- vpc_id (str, optional):
The ID of the VPC where the network ACL will be created. Defaults to None.
- vpc_name (str, optional):
The name of the VPC where the network ACL will be created. Defaults to None.
- network_acl_name (str, optional):
The name to assign to the network ACL. Defaults to None.
- subnet_id (str, optional):
The ID of the subnet to associate with the network ACL. Defaults to None.
- subnet_name (str, optional):
The name of the subnet to associate with the network ACL. Defaults to None.
- tags (dict, optional):
A dictionary of tags to assign to the network ACL. Defaults to None.
- region (str, optional):
The AWS region where the network ACL will be created. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.create_network_acl 'vpc-6b1fe402'
- saltext.boto3.modules.boto3_vpc.delete_network_acl(network_acl_id=None, network_acl_name=None, disassociate=False, region=None, key=None, keyid=None, profile=None)[source]¶
Delete a network ACL by id or name. When
disassociateisTrueany existing subnet association is replaced with the VPC’s default ACL before deletion.- network_acl_id (str, optional):
The ID of the network ACL to delete. Defaults to None.
- network_acl_name (str, optional):
The name of the network ACL to delete. Defaults to None.
- disassociate (bool, optional):
Whether to disassociate the network ACL from any subnets before deletion. Defaults to False.
- region (str, optional):
The AWS region where the network ACL exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.delete_network_acl network_acl_id='acl-5fb85d36'
- saltext.boto3.modules.boto3_vpc.network_acl_exists(network_acl_id=None, name=None, network_acl_name=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
{"exists": True}if the network ACL exists.- network_acl_id (str, optional):
The ID of the network ACL to check. Defaults to None.
- network_acl_name (str, optional):
The name of the network ACL to check. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the network ACLs. Defaults to None.
- region (str, optional):
The AWS region where the network ACL exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.network_acl_exists network_acl_id='acl-5fb85d36'
- saltext.boto3.modules.boto3_vpc.associate_network_acl_to_subnet(network_acl_id=None, subnet_id=None, network_acl_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Associate a network ACL with a subnet by replacing the subnet’s current network ACL association.
- network_acl_id (str, optional):
The ID of the network ACL to associate with the subnet. Defaults to None.
- subnet_id (str, optional):
The ID of the subnet to associate with the network ACL. Defaults to None.
- network_acl_name (str, optional):
The name of the network ACL to associate with the subnet. Defaults to None.
- subnet_name (str, optional):
The name of the subnet to associate with the network ACL. Defaults to None.
- region (str, optional):
The AWS region where the network ACL and subnet exist. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.associate_network_acl_to_subnet \ network_acl_id='acl-5fb85d36' subnet_id='subnet-6a1fe403'
- saltext.boto3.modules.boto3_vpc.disassociate_network_acl(subnet_id=None, vpc_id=None, subnet_name=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Disassociate the network ACL from a subnet by replacing its association with the VPC’s default network ACL.
- subnet_id (str, optional):
The ID of the subnet to disassociate from its network ACL. Defaults to None.
- vpc_id (str, optional):
The ID of the VPC containing the subnet. Defaults to None.
- subnet_name (str, optional):
The name of the subnet to disassociate from its network ACL. Defaults to None.
- vpc_name (str, optional):
The name of the VPC containing the subnet. Defaults to None.
- region (str, optional):
The AWS region where the subnet and VPC exist. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.disassociate_network_acl 'subnet-6a1fe403'
- saltext.boto3.modules.boto3_vpc.create_network_acl_entry(network_acl_id=None, rule_number=None, protocol=None, rule_action=None, cidr_block=None, egress=None, network_acl_name=None, icmp_code=None, icmp_type=None, port_range_from=None, port_range_to=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create a network ACL entry.
- network_acl_id (str, optional):
The ID of the network ACL to create the entry in. Defaults to None.
- rule_number (int, optional):
The rule number for the network ACL entry. Defaults to None.
- protocol (str, optional):
The protocol for the network ACL entry (e.g., ‘all’, ‘tcp’, ‘udp’, ‘icmp’). Defaults to None.
- rule_action (str, optional):
The action for the network ACL entry (‘allow’ or ‘deny’). Defaults to None.
- cidr_block (str, optional):
The CIDR block for the network ACL entry. Defaults to None.
- egress (bool, optional):
Whether the rule is an egress rule. Defaults to None.
- network_acl_name (str, optional):
The name of the network ACL to create the entry in. Defaults to None.
- icmp_code (int, optional):
The ICMP code for the network ACL entry. Defaults to None.
- icmp_type (int, optional):
The ICMP type for the network ACL entry. Defaults to None.
- port_range_from (int, optional):
The starting port for the network ACL entry. Defaults to None.
- port_range_to (int, optional):
The ending port for the network ACL entry. Defaults to None.
- region (str, optional):
The AWS region where the network ACL exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.create_network_acl_entry 'acl-5fb85d36' 32767 \ 'all' 'deny' '0.0.0.0/0' egress=True
- saltext.boto3.modules.boto3_vpc.replace_network_acl_entry(network_acl_id=None, rule_number=None, protocol=None, rule_action=None, cidr_block=None, egress=None, network_acl_name=None, icmp_code=None, icmp_type=None, port_range_from=None, port_range_to=None, region=None, key=None, keyid=None, profile=None)[source]¶
Replace a network ACL entry.
- network_acl_id (str, optional):
The ID of the network ACL to replace the entry in. Defaults to None.
- rule_number (int, optional):
The rule number for the network ACL entry. Defaults to None.
- protocol (str, optional):
The protocol for the network ACL entry (e.g., ‘all’, ‘tcp’, ‘udp’, ‘icmp’). Defaults to None.
- rule_action (str, optional):
The action for the network ACL entry (‘allow’ or ‘deny’). Defaults to None.
- cidr_block (str, optional):
The CIDR block for the network ACL entry. Defaults to None.
- egress (bool, optional):
Whether the rule is an egress rule. Defaults to None.
- network_acl_name (str, optional):
The name of the network ACL to replace the entry in. Defaults to None.
- icmp_code (int, optional):
The ICMP code for the network ACL entry. Defaults to None.
- icmp_type (int, optional):
The ICMP type for the network ACL entry. Defaults to None.
- port_range_from (int, optional):
The starting port for the network ACL entry. Defaults to None.
- port_range_to (int, optional):
The ending port for the network ACL entry. Defaults to None.
- region (str, optional):
The AWS region where the network ACL exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.replace_network_acl_entry 'acl-5fb85d36' 32767 \ 'all' 'deny' '0.0.0.0/0' egress=True
- saltext.boto3.modules.boto3_vpc.delete_network_acl_entry(network_acl_id=None, rule_number=None, egress=None, network_acl_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Delete a network ACL entry.
- network_acl_id (str, optional):
The ID of the network ACL to delete the entry from. Defaults to None.
- rule_number (int, optional):
The rule number for the network ACL entry to delete. Defaults to None.
- egress (bool, optional):
Whether the rule is an egress rule. Defaults to None.
- network_acl_name (str, optional):
The name of the network ACL to delete the entry from. Defaults to None.
- region (str, optional):
The AWS region where the network ACL exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.delete_network_acl_entry 'acl-5fb85d36' 32767
- saltext.boto3.modules.boto3_vpc.create_route_table(vpc_id=None, vpc_name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create a route table in the specified VPC.
- vpc_id (str, optional):
The ID of the VPC where the route table will be created. Defaults to None.
- vpc_name (str, optional):
The name of the VPC where the route table will be created. Defaults to None.
- route_table_name (str, optional):
The name of the route table to create. Defaults to None.
- tags (dict, optional):
A dictionary of tags to associate with the route table. Defaults to None.
- region (str, optional):
The AWS region where the route table will be created. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.create_route_table vpc_name='myvpc' \ route_table_name='myroutetable'
- saltext.boto3.modules.boto3_vpc.delete_route_table(route_table_id=None, route_table_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Delete a route table by id or name.
- route_table_id (str, optional):
The ID of the route table to delete. Defaults to None.
- route_table_name (str, optional):
The name of the route table to delete. Defaults to None.
- region (str, optional):
The AWS region where the route table exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.delete_route_table route_table_id='rtb-1f382e7d'
- saltext.boto3.modules.boto3_vpc.route_table_exists(route_table_id=None, name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
{"exists": True}if the route table exists.- route_table_id (str, optional):
The ID of the route table to check. Defaults to None.
- route_table_name (str, optional):
The name of the route table to check. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the route tables. Defaults to None.
- region (str, optional):
The AWS region where the route table exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.route_table_exists route_table_id='rtb-1f382e7d'
- saltext.boto3.modules.boto3_vpc.describe_route_tables(route_table_id=None, route_table_name=None, vpc_id=None, tags=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return a list of route tables matching the filter criteria.
- route_table_id (str, optional):
The ID of the route table to describe. Defaults to None.
- route_table_name (str, optional):
The name of the route table to describe. Defaults to None.
- vpc_id (str, optional):
The ID of the VPC to which the route table belongs. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the route tables. Defaults to None.
- region (str, optional):
The AWS region where the route table exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.describe_route_tables vpc_id='vpc-a6a9efc3'
- saltext.boto3.modules.boto3_vpc.route_exists(destination_cidr_block, route_table_name=None, route_table_id=None, gateway_id=None, instance_id=None, interface_id=None, tags=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None, nat_gateway_id=None)[source]¶
Return
{"exists": True}if a matching route is present in the specified route table.- destination_cidr_block (str):
The destination CIDR block of the route to check.
- route_table_name (str, optional):
The name of the route table to check. Defaults to None.
- route_table_id (str, optional):
The ID of the route table to check. Defaults to None.
- gateway_id (str, optional):
The ID of the gateway for the route. Defaults to None.
- instance_id (str, optional):
The ID of the instance for the route. Defaults to None.
- interface_id (str, optional):
The ID of the network interface for the route. Defaults to None.
- tags (dict, optional):
A dictionary of tags to filter the route tables. Defaults to None.
- region (str, optional):
The AWS region where the route table exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
- vpc_peering_connection_id (str, optional):
The ID of the VPC peering connection for the route. Defaults to None.
- nat_gateway_id (str, optional):
The ID of the NAT gateway for the route. Defaults to None.
CLI Example:
salt myminion boto3_vpc.route_exists destination_cidr_block='10.0.0.0/20' \ gateway_id='local' route_table_name='test'
- saltext.boto3.modules.boto3_vpc.associate_route_table(route_table_id=None, subnet_id=None, route_table_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Associate a route table with a subnet.
- route_table_id (str, optional):
The ID of the route table to associate. Defaults to None.
- subnet_id (str, optional):
The ID of the subnet to associate with the route table. Defaults to None.
- route_table_name (str, optional):
The name of the route table to associate. Defaults to None.
- subnet_name (str, optional):
The name of the subnet to associate with the route table. Defaults to None.
- region (str, optional):
The AWS region where the route table and subnet exist. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.associate_route_table 'rtb-1f382e7d' 'subnet-6a1fe403'
- saltext.boto3.modules.boto3_vpc.disassociate_route_table(association_id, region=None, key=None, keyid=None, profile=None)[source]¶
Disassociate a route table.
- association_id (str):
The ID of the route table association to disassociate.
- region (str, optional):
The AWS region where the route table association exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.disassociate_route_table 'rtbassoc-d8ccddba'
- saltext.boto3.modules.boto3_vpc.replace_route_table_association(association_id, route_table_id, region=None, key=None, keyid=None, profile=None)[source]¶
Replace a route table association with a new route table.
- association_id (str):
The ID of the route table association to replace.
- route_table_id (str):
The ID of the new route table to associate.
- region (str, optional):
The AWS region where the route table association exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.replace_route_table_association 'rtbassoc-d8ccddba' 'rtb-1f382e7d'
- saltext.boto3.modules.boto3_vpc.create_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, gateway_id=None, internet_gateway_name=None, instance_id=None, interface_id=None, vpc_peering_connection_id=None, vpc_peering_connection_name=None, region=None, key=None, keyid=None, profile=None, nat_gateway_id=None, nat_gateway_subnet_name=None, nat_gateway_subnet_id=None)[source]¶
Create a route in a route table.
- route_table_id (str, optional):
The ID of the route table where the route will be created. Defaults to None.
- destination_cidr_block (str):
The destination CIDR block for the route.
- route_table_name (str, optional):
The name of the route table where the route will be created. Defaults to None.
- gateway_id (str, optional):
The ID of the gateway for the route. Defaults to None.
- internet_gateway_name (str, optional):
The name of the internet gateway for the route. Defaults to None.
- instance_id (str, optional):
The ID of the instance for the route. Defaults to None.
- interface_id (str, optional):
The ID of the network interface for the route. Defaults to None.
- vpc_peering_connection_id (str, optional):
The ID of the VPC peering connection for the route. Defaults to None.
- vpc_peering_connection_name (str, optional):
The name of the VPC peering connection for the route. Defaults to None.
- nat_gateway_id (str, optional):
The ID of the NAT gateway for the route. Defaults to None.
- nat_gateway_subnet_name (str, optional):
The name of the subnet for the NAT gateway. Defaults to None.
- nat_gateway_subnet_id (str, optional):
The ID of the subnet for the NAT gateway. Defaults to None.
- region (str, optional):
The AWS region where the route table exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.create_route 'rtb-1f382e7d' '10.0.0.0/16' gateway_id='vgw-a1b2c3'
- saltext.boto3.modules.boto3_vpc.delete_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Delete a route from a route table.
- route_table_id (str, optional):
The ID of the route table where the route will be deleted. Defaults to None.
- destination_cidr_block (str):
The destination CIDR block for the route to be deleted.
- route_table_name (str, optional):
The name of the route table where the route will be deleted. Defaults to None.
- region (str, optional):
The AWS region where the route table exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.delete_route 'rtb-1f382e7d' '10.0.0.0/16'
- saltext.boto3.modules.boto3_vpc.replace_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, gateway_id=None, instance_id=None, interface_id=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None, nat_gateway_id=None)[source]¶
Replace an existing route in a route table.
- route_table_id (str, optional):
The ID of the route table where the route will be replaced. Defaults to None.
- destination_cidr_block (str):
The destination CIDR block for the route to be replaced.
- route_table_name (str, optional):
The name of the route table where the route will be replaced. Defaults to None.
- gateway_id (str, optional):
The ID of the gateway for the route. Defaults to None.
- instance_id (str, optional):
The ID of the instance for the route. Defaults to None.
- interface_id (str, optional):
The ID of the network interface for the route. Defaults to None.
- vpc_peering_connection_id (str, optional):
The ID of the VPC peering connection for the route. Defaults to None.
- nat_gateway_id (str, optional):
The ID of the NAT gateway for the route. Defaults to None.
- region (str, optional):
The AWS region where the route table exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.replace_route 'rtb-1f382e7d' '10.0.0.0/16' gateway_id='vgw-a1b2c3'
- saltext.boto3.modules.boto3_vpc.request_vpc_peering_connection(requester_vpc_id=None, requester_vpc_name=None, peer_vpc_id=None, peer_vpc_name=None, name=None, peer_owner_id=None, peer_region=None, region=None, key=None, keyid=None, profile=None, dry_run=False)[source]¶
Request a VPC peering connection between two VPCs.
- requester_vpc_id (str, optional):
The ID of the requester VPC. Defaults to None.
- requester_vpc_name (str, optional):
The name of the requester VPC. Defaults to None.
- peer_vpc_id (str, optional):
The ID of the peer VPC. Defaults to None.
- peer_vpc_name (str, optional):
The name of the peer VPC. Defaults to None.
- name (str, optional):
The name to assign to the VPC peering connection. Defaults to None.
- peer_owner_id (str, optional):
The AWS account ID of the owner of the peer VPC. Defaults to None.
- peer_region (str, optional):
The AWS region of the peer VPC. Defaults to None.
- region (str, optional):
The AWS region where the requester VPC exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
- dry_run (bool, optional):
Whether to perform a dry run of the request. Defaults to False.
CLI Example:
salt myminion boto3_vpc.request_vpc_peering_connection vpc-4a3e622e vpc-be82e9da \ name=my_vpc_connection
- saltext.boto3.modules.boto3_vpc.describe_vpc_peering_connection(name, region=None, key=None, keyid=None, profile=None)[source]¶
Return any VPC peering connection ids for the given VPC peering connection name that are
active,pending-acceptanceorprovisioning.- name (str):
The name of the VPC peering connection to describe.
- region (str, optional):
The AWS region where the VPC peering connection exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.describe_vpc_peering_connection salt-vpc
- saltext.boto3.modules.boto3_vpc.accept_vpc_peering_connection(conn_id='', name='', region=None, key=None, keyid=None, profile=None, dry_run=False)[source]¶
Accept a pending VPC peering connection request.
CLI Example:
salt myminion boto3_vpc.accept_vpc_peering_connection name=salt-vpc
- saltext.boto3.modules.boto3_vpc.delete_vpc_peering_connection(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None, dry_run=False)[source]¶
Delete a VPC peering connection by id or name.
- conn_id (str, optional):
The ID of the VPC peering connection to delete. Defaults to None.
- conn_name (str, optional):
The name of the VPC peering connection to delete. Defaults to None.
- region (str, optional):
The AWS region where the VPC peering connection exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
- dry_run (bool, optional):
Whether to perform a dry run of the request. Defaults to False.
CLI Example:
salt myminion boto3_vpc.delete_vpc_peering_connection conn_name=salt-vpc
- saltext.boto3.modules.boto3_vpc.is_peering_connection_pending(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
Trueif the VPC peering connection is in thepending-acceptancestate.- conn_id (str, optional):
The ID of the VPC peering connection to check. Defaults to None.
- conn_name (str, optional):
The name of the VPC peering connection to check. Defaults to None.
- region (str, optional):
The AWS region where the VPC peering connection exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.is_peering_connection_pending conn_name=salt-vpc
- saltext.boto3.modules.boto3_vpc.peering_connection_pending_from_vpc(conn_id=None, conn_name=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)[source]¶
Return
Trueif a VPC peering connection is pending from the given requester VPC.- conn_id (str, optional):
The ID of the VPC peering connection to check. Defaults to None.
- conn_name (str, optional):
The name of the VPC peering connection to check. Defaults to None.
- vpc_id (str, optional):
The ID of the requester VPC. Defaults to None.
- vpc_name (str, optional):
The name of the requester VPC. Defaults to None.
- region (str, optional):
The AWS region where the VPC peering connection exists. Defaults to None.
- key (str, optional):
The AWS access key. Defaults to None.
- keyid (str, optional):
The AWS secret key. Defaults to None.
- profile (str, optional):
The AWS profile to use. Defaults to None.
CLI Example:
salt myminion boto3_vpc.peering_connection_pending_from_vpc conn_name=salt-vpc \ vpc_name=myvpc