neulab/tldr huggingface dataset:
salt myminion boto_vpc.is_peering_connection_pending name=salt-vpc # Specify a region salt myminion boto_vpc.is_peering_connection_pending name=salt-vpc region=us-west-2 # specify an id salt myminion boto_vpc.is_peering_connection_pending conn_id=pcx-8a8939e3
Accept VPC peering connection
salt myminion boto_vpc.accept_vpc_peering_connection name=salt-vpc # Specify a region salt myminion boto_vpc.accept_vpc_peering_connection name=salt-vpc region=us-west-2 # specify an id salt myminion boto_vpc.accept_vpc_peering_connection conn_id=pcx-8a8939e3
Deleting VPC peering connection via this module
# Delete a named VPC peering connection salt myminion boto_vpc.delete_vpc_peering_connection name=salt-vpc # Specify a region salt myminion boto_vpc.delete_vpc_peering_connection name=salt-vpc region=us-west-2 # specify an id salt myminion boto_vpc.delete_vpc_peering_connection conn_id=pcx-8a8939e3
salt.modules.boto_vpc.accept_vpc_peering_connection(conn_id='', name='', region=None, key=None, keyid=None, profile=None, dry_run=False) Request a VPC peering connection between two VPCs.
• conn_id -- The ID to use. String type.
• name -- The name of this VPC peering connection. String type.
• region -- The AWS region to use. Type string.
• key -- The key to use for this connection. Type string.
• keyid -- The key id to use.
• profile -- The profile to use.
• dry_run -- The dry_run flag to set.
Warning: Please specify either the vpc_peering_connection_id or name but not both. Specifying both will result in an error!
salt.modules.boto_vpc.associate_dhcp_options_to_vpc(dhcp_options_id, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None) Given valid DHCP options id and a valid VPC id, associate the DHCP options record with the VPC.
Returns True if the DHCP options record were associated and returns False if the DHCP options record was not associated.
salt myminion boto_vpc.associate_dhcp_options_to_vpc 'dhcp-a0bl34pp' 'vpc-6b1fe402'
salt.modules.boto_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) Given a network acl and subnet ids or names, associate a network acl to a subnet.
salt myminion boto_vpc.associate_network_acl_to_subnet \ network_acl_id='acl-5fb85d36' subnet_id='subnet-6a1fe403'
salt myminion boto_vpc.associate_network_acl_to_subnet \ network_acl_id='myacl' subnet_id='mysubnet'
salt.modules.boto_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) Given a route table and subnet name or id, associates the route table with the subnet.
salt myminion boto_vpc.associate_route_table 'rtb-1f382e7d' 'subnet-6a1fe403'
salt myminion boto_vpc.associate_route_table route_table_name='myrtb' \ subnet_name='mysubnet'
salt.modules.boto_vpc.check_vpc(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None) Check whether a VPC with the given name or id exists.  Returns the vpc_id or None. Raises SaltInvocationError if both vpc_id and vpc_name are None. Optionally raise a CommandExecutionError if the VPC does not exist.
salt myminion boto_vpc.check_vpc vpc_name=myvpc profile=awsprofile
salt.modules.boto_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) Given a valid CIDR block, create a VPC.
An optional instance_tenancy argument can be provided. If provided, the valid values are 'default' or 'dedicated'
An optional vpc_name argument can be provided.
Returns {created: true} if the VPC was created and returns {created: False} if the VPC was not created.
salt myminion boto_vpc.create '10.0.0.0/24'
salt.modules.boto_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) Given a valid VPN connection type, a static IP address and a customer gateway’s Border Gateway Protocol (BGP) Autonomous System Number, create a customer gateway.
Returns the customer gateway id if the customer gateway was created and returns False if the customer gateway was not created.
salt myminion boto_vpc.create_customer_gateway 'ipsec.1', '12.1.2.3', 65534
salt.modules.boto_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) Given valid DHCP options, create a DHCP options record, optionally associating it with an existing VPC.
Returns True if the DHCP options record was created and returns False if the DHCP options record was not deleted.
Changed in version 2015.8.0: Added vpc_name and vpc_id arguments
salt myminion boto_vpc.create_dhcp_options domain_name='example.com' \ domain_name_servers='[1.2.3.4]' ntp_servers='[5.6.7.8]' \ netbios_name_servers='[10.0.0.1]' netbios_node_type=1 \ vpc_name='myvpc'
salt.modules.boto_vpc.create_internet_gateway(internet_gateway_name=None, vpc_id=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None) Create an Internet Gateway, optionally attaching it to an existing VPC.
Returns the internet gateway id if the internet gateway was created and returns False if the internet gateways was not created.
salt myminion boto_vpc.create_internet_gateway \ internet_gateway_name=myigw vpc_name=myvpc
salt.modules.boto_vpc.create_nat_gateway(subnet_id=None, subnet_name=None, allocation_id=None, region=None, key=None, keyid=None, profile=None) Create a NAT Gateway within an existing subnet. If allocation_id is specified, the elastic IP address it references is associated with the gateway. Otherwise, a new allocation_id is created and used.
This function requires boto3 to be installed.
Returns the nat gateway id if the nat gateway was created and returns False if the nat gateway was not created.
salt myminion boto_vpc.create_nat_gateway subnet_name=mysubnet
salt.modules.boto_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) Given a vpc_id, creates a network acl.
Returns the network acl id if successful, otherwise returns False.
Changed in version 2015.8.0: Added vpc_name, subnet_id, and subnet_name arguments
salt myminion boto_vpc.create_network_acl 'vpc-6b1fe402'
salt.modules.boto_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) Creates a network acl entry.
salt myminion boto_vpc.create_network_acl_entry 'acl-5fb85d36' '32767' \ 'all' 'deny' '0.0.0.0/0' egress=true
salt.modules.boto_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) Creates a route.
If a nat gateway is specified, boto3 must be installed
salt myminion boto_vpc.create_route 'rtb-1f382e7d' '10.0.0.0/16' gateway_id='vgw-a1b2c3'
salt.modules.boto_vpc.create_route_table(vpc_id=None, vpc_name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None) Creates a route table.
Changed in version 2015.8.0: Added vpc_name argument
salt myminion boto_vpc.create_route_table vpc_id='vpc-6b1fe402' \ route_table_name='myroutetable' salt myminion boto_vpc.create_route_table vpc_name='myvpc' \ route_table_name='myroutetable'
salt.modules.boto_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) Given a valid VPC ID or Name and a CIDR block, create a subnet for the VPC.
An optional availability zone argument can be provided.
Returns True if the VPC subnet was created and returns False if the VPC subnet was not created.
salt myminion boto_vpc.create_subnet vpc_id='vpc-6b1fe402' \ subnet_name='mysubnet' cidr_block='10.0.0.0/25' salt myminion boto_vpc.create_subnet vpc_name='myvpc' \ subnet_name='mysubnet', cidr_block='10.0.0.0/25'
salt.modules.boto_vpc.customer_gateway_exists(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None) Given a customer gateway ID, check if the customer gateway ID exists.
Returns True if the customer gateway ID exists; Returns False otherwise.
salt myminion boto_vpc.customer_gateway_exists cgw-b6a247df salt myminion boto_vpc.customer_gateway_exists customer_gatway_name=mycgw
salt.modules.boto_vpc.delete(vpc_id=None, name=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None) Given a VPC ID or VPC name, delete the VPC.
Returns {deleted: true} if the VPC was deleted and returns {deleted: false} if the VPC was not deleted.
salt myminion boto_vpc.delete vpc_id='vpc-6b1fe402' salt myminion boto_vpc.delete name='myvpc'
salt.modules.boto_vpc.delete_customer_gateway(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None) Given a customer gateway ID or name, delete the customer gateway.
Returns True if the customer gateway was deleted and returns False if the customer gateway was not deleted.
Changed in version 2015.8.0: Added customer_gateway_name argument
salt myminion boto_vpc.delete_customer_gateway 'cgw-b6a247df'
salt.modules.boto_vpc.delete_dhcp_options(dhcp_options_id=None, dhcp_options_name=None, region=None, key=None, keyid=None, profile=None) Delete dhcp options by id or name.
salt myminion boto_vpc.delete_dhcp_options 'dopt-b6a247df'
salt.modules.boto_vpc.delete_internet_gateway(internet_gateway_id=None, internet_gateway_name=None, detach=False, region=None, key=None, keyid=None, profile=None) Delete an internet gateway (by name or id).
Returns True if the internet gateway was deleted and otherwise False.
salt myminion boto_vpc.delete_internet_gateway internet_gateway_id=igw-1a2b3c salt myminion boto_vpc.delete_internet_gateway internet_gateway_name=myigw
salt.modules.boto_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) Delete a nat gateway (by id).
nat_gateway_id Id of the NAT Gateway
releaes_eips whether to release the elastic IPs associated with the given NAT Gateway Id
wait_for_delete whether to wait for delete of the NAT gateway to be in failed or deleted state after issuing the delete call.
wait_for_delete_retries NAT gateway may take some time to be go into deleted or failed state.  During the deletion process, subsequent release of elastic IPs may fail; this state will automatically retry this number of times to ensure the NAT gateway is in deleted or failed state before proceeding.
salt myminion boto_vpc.delete_nat_gateway nat_gateway_id=igw-1a2b3c
salt.modules.boto_vpc.delete_network_acl(network_acl_id=None, network_acl_name=None, disassociate=False, region=None, key=None, keyid=None, profile=None) Delete a network acl based on the network_acl_id or network_acl_name provided.
salt myminion boto_vpc.delete_network_acl network_acl_id='acl-5fb85d36' \ disassociate=false
salt myminion boto_vpc.delete_network_acl network_acl_name='myacl' \ disassociate=true
salt.modules.boto_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) Deletes a network acl entry.
salt myminion boto_vpc.delete_network_acl_entry 'acl-5fb85d36' '32767'
salt.modules.boto_vpc.delete_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, region=None, key=None, keyid=None, profile=None) Deletes a route.
salt myminion boto_vpc.delete_route 'rtb-1f382e7d' '10.0.0.0/16'
salt.modules.boto_vpc.delete_route_table(route_table_id=None, route_table_name=None, region=None, key=None, keyid=None, profile=None) Deletes a route table.
salt myminion boto_vpc.delete_route_table route_table_id='rtb-1f382e7d' salt myminion boto_vpc.delete_route_table route_table_name='myroutetable'
salt.modules.boto_vpc.delete_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None) Given a subnet ID or name, delete the subnet.
Returns True if the subnet was deleted and returns False if the subnet was not deleted.
Changed in version 2015.8.0: Added subnet_name argument
salt myminion boto_vpc.delete_subnet 'subnet-6a1fe403'
salt.modules.boto_vpc.delete_vpc_peering_connection(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None, dry_run=False) Delete a VPC peering connection.
conn_id The connection ID to check.  Exclusive with conn_name.
conn_name The connection name to check.  Exclusive with conn_id.
dry_run If True, skip application and simply return projected status.
# Create a named VPC peering connection salt myminion boto_vpc.delete_vpc_peering_connection conn_name=salt-vpc # Specify a region salt myminion boto_vpc.delete_vpc_peering_connection conn_name=salt-vpc region=us-west-2 # specify an id salt myminion boto_vpc.delete_vpc_peering_connection conn_id=pcx-8a8939e3
salt.modules.boto_vpc.describe(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None) Describe a VPC's properties. If no VPC ID/Name is spcified then describe the default VPC.
salt myminion boto_vpc.describe vpc_id=vpc-123456 salt myminion boto_vpc.describe vpc_name=myvpc
salt.modules.boto_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) Return a description of nat gateways matching the selection criteria
salt myminion boto_vpc.describe_nat_gateways nat_gateway_id='nat-03b02643b43216fe7' salt myminion boto_vpc.describe_nat_gateways subnet_id='subnet-5b05942d'
salt.modules.boto_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) Given route table properties, return details of all matching route tables.
salt myminion boto_vpc.describe_route_tables vpc_id='vpc-a6a9efc3'
salt.modules.boto_vpc.describe_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None) Given a subnet id or name, describe its properties.
salt myminion boto_vpc.describe_subnet subnet_id=subnet-123456 salt myminion boto_vpc.describe_subnet subnet_name=mysubnet
salt.modules.boto_vpc.describe_subnets(subnet_ids=None, subnet_names=None, vpc_id=None, cidr=None, region=None, key=None, keyid=None, profile=None) Given a VPC ID or subnet CIDR, returns a list of associated subnets and their details. Return all subnets if VPC ID or CIDR are not provided.  If a subnet id or CIDR is provided, only its associated subnet details will be returned.
salt myminion boto_vpc.describe_subnets
salt myminion boto_vpc.describe_subnets subnet_ids=['subnet-ba1987ab', 'subnet-ba1987cd']
salt myminion boto_vpc.describe_subnets vpc_id=vpc-123456
salt myminion boto_vpc.describe_subnets cidr=10.0.0.0/21
salt.modules.boto_vpc.describe_vpc_peering_connection(name, region=None, key=None, keyid=None, profile=None) Returns any VPC peering connection id(s) for the given VPC peering connection name.
VPC peering connection ids are only returned for connections that are in the active, pending-acceptance or provisioning state.
• name -- The string name for this VPC peering connection
• region -- The aws region to use
• key -- Your aws key
• keyid -- The key id associated with this aws account
• profile -- The profile to use
salt myminion boto_vpc.describe_vpc_peering_connection salt-vpc # Specify a region salt myminion boto_vpc.describe_vpc_peering_connection salt-vpc region=us-west-2
salt.modules.boto_vpc.describe_vpcs(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None) Describe all VPCs, matching the filter criteria if provided.
Returns a list of dictionaries with interesting properties.
salt myminion boto_vpc.describe_vpcs
salt.modules.boto_vpc.dhcp_options_exists(dhcp_options_id=None, name=None, dhcp_options_name=None, tags=None, region=None, key=None, keyid=None, profile=None) Check if a dhcp option exists.
Returns True if the dhcp option exists; Returns False otherwise.
salt myminion boto_vpc.dhcp_options_exists dhcp_options_id='dhcp-a0bl34pp'
salt.modules.boto_vpc.disassociate_network_acl(subnet_id=None, vpc_id=None, subnet_name=None, vpc_name=None, region=None, key=None, keyid=None, profile=None) Given a subnet ID, disassociates a network acl.
salt myminion boto_vpc.disassociate_network_acl 'subnet-6a1fe403'
salt.modules.boto_vpc.disassociate_route_table(association_id, region=None, key=None, keyid=None, profile=None) Disassociates a route table.
association_id The Route Table Association ID to disassociate
salt myminion boto_vpc.disassociate_route_table 'rtbassoc-d8ccddba'
salt.modules.boto_vpc.exists(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None) Given a VPC ID, check to see if the given VPC ID exists.
Returns True if the given VPC ID exists and returns False if the given VPC ID does not exist.
salt myminion boto_vpc.exists myvpc
salt.modules.boto_vpc.get_dhcp_options(dhcp_options_name=None, dhcp_options_id=None, region=None, key=None, keyid=None, profile=None) Return a dict with the current values of the requested DHCP options set
salt myminion boto_vpc.get_dhcp_options 'myfunnydhcpoptionsname'
salt.modules.boto_vpc.get_id(name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None) Given VPC properties, return the VPC id if a match is found.
salt myminion boto_vpc.get_id myvpc
salt.modules.boto_vpc.get_resource_id(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None) Get an AWS id for a VPC resource by type and name.
salt myminion boto_vpc.get_resource_id internet_gateway myigw
salt.modules.boto_vpc.get_subnet_association(subnets, region=None, key=None, keyid=None, profile=None) Given a subnet (aka: a vpc zone identifier) or list of subnets, returns vpc association.
Returns a VPC ID if the given subnets are associated with the same VPC ID.  Returns False on an error or if the given subnets are associated with different VPC IDs.
salt myminion boto_vpc.get_subnet_association subnet-61b47516
salt myminion boto_vpc.get_subnet_association ['subnet-61b47516','subnet-2cb9785b']
salt.modules.boto_vpc.is_peering_connection_pending(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None) Check if a VPC peering connection is in the pending state.
salt myminion boto_vpc.is_peering_connection_pending conn_name=salt-vpc # Specify a region salt myminion boto_vpc.is_peering_connection_pending conn_name=salt-vpc region=us-west-2 # specify an id salt myminion boto_vpc.is_peering_connection_pending conn_id=pcx-8a8939e3
salt.modules.boto_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) Checks if a nat gateway exists.
salt myminion boto_vpc.nat_gateway_exists nat_gateway_id='nat-03b02643b43216fe7' salt myminion boto_vpc.nat_gateway_exists subnet_id='subnet-5b05942d'
salt.modules.boto_vpc.network_acl_exists(network_acl_id=None, name=None, network_acl_name=None, tags=None, region=None, key=None, keyid=None, profile=None) Checks if a network acl exists.
Returns True if the network acl exists or returns False if it doesn't exist.
salt myminion boto_vpc.network_acl_exists network_acl_id='acl-5fb85d36'
salt.modules.boto_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) Check if a VPC peering connection is in the pending state, and requested from the given VPC.
vpc_id Is this the ID of the requesting VPC for this peering connection.  Exclusive with vpc_name.
vpc_name Is this the Name of the requesting VPC for this peering connection.  Exclusive with vpc_id.
salt myminion boto_vpc.is_peering_connection_pending name=salt-vpc
salt.modules.boto_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) Replaces a network acl entry.
salt myminion boto_vpc.replace_network_acl_entry 'acl-5fb85d36' '32767' \ 'all' 'deny' '0.0.0.0/0' egress=true
salt.modules.boto_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) Replaces a route.
salt myminion boto_vpc.replace_route 'rtb-1f382e7d' '10.0.0.0/16' gateway_id='vgw-a1b2c3'
salt.modules.boto_vpc.replace_route_table_association(association_id, route_table_id, region=None, key=None, keyid=None, profile=None) Replaces a route table association.
salt myminion boto_vpc.replace_route_table_association 'rtbassoc-d8ccddba' 'rtb-1f382e7d'
salt.modules.boto_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, region=None, key=None, keyid=None, profile=None, dry_run=False) Request a VPC peering connection between two VPCs.
requester_vpc_id ID of the requesting VPC. Exclusive with requester_vpc_name.
requester_vpc_name Name tag of the requesting VPC.  Exclusive with requester_vpc_id.
peer_vpc_id ID of the VPC to create VPC peering connection with. This can be a VPC in another account. Exclusive with peer_vpc_name.
peer_vpc_name Name tag of the VPC to create VPC peering connection with. This can only be a VPC in the same account, else resolving it into a vpc ID will almost certainly fail. Exclusive with peer_vpc_id.
name   The name to use for this VPC peering connection.
peer_owner_id ID of the owner of the peer VPC. Defaults to your account ID, so a value is required if peering with a VPC in a different account.
dry_run If True, skip application and return status.
salt.modules.boto_vpc.resource_exists(resource, name=None, resource_id=None, tags=None, region=None, key=None, keyid=None, profile=None) Given a resource type and name, return {exists: true} if it exists, {exists: false} if it does not exist, or {error: {message: error text} on error.
salt myminion boto_vpc.resource_exists internet_gateway myigw
salt.modules.boto_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) Checks if a route exists.
salt myminion boto_vpc.route_exists destination_cidr_block='10.0.0.0/20' gateway_id='local' route_table_name='test'
salt.modules.boto_vpc.route_table_exists(route_table_id=None, name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None) Checks if a route table exists.
salt myminion boto_vpc.route_table_exists route_table_id='rtb-1f382e7d'
salt.modules.boto_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) Check if a subnet exists.
Returns True if the subnet exists, otherwise returns False.
Changed in version 2015.8.0: Added subnet_name argument Deprecated name argument
salt myminion boto_vpc.subnet_exists subnet_id='subnet-6a1fe403'
salt.modules.bower Manage and query Bower packages This module manages the installed packages using Bower.  Note that npm, git and bower must be installed for this module to be available.
salt.modules.bower.install(pkg, dir, pkgs=None, runas=None, env=None) Install a Bower package.
If no package is specified, the dependencies (from bower.json) of the package in the given directory will be installed.
pkg    A package name in any format accepted by Bower, including a version identifier
dir    The target directory in which to install the package
pkgs   A list of package names in the same format as the pkg parameter
runas  The user to run Bower with
env    Environment variables to set when invoking Bower. Uses the same env format as the cmd.run execution function.
salt '*' bower.install underscore /path/to/project
salt '*' bower.install jquery#2.0 /path/to/project
salt.modules.bower.list_(dir, runas=None, env=None) List installed Bower packages.
dir    The directory whose packages will be listed
salt '*' bower.list /path/to/project
salt.modules.bower.prune(dir, runas=None, env=None) New in version 2017.7.0.
Remove extraneous local Bower packages, i.e. those not referenced in bower.json
dir    The directory whose packages will be pruned
salt '*' bower.prune /path/to/project
salt.modules.bower.uninstall(pkg, dir, runas=None, env=None) Uninstall a Bower package.
pkg    A package name in any format accepted by Bower
dir    The target directory from which to uninstall the package
salt '*' bower.uninstall underscore /path/to/project
salt.modules.bridge Module for gathering and managing bridging information
salt.modules.bridge.add(br=None) Creates a bridge
salt '*' bridge.add br0
salt.modules.bridge.addif(br=None, iface=None) Adds an interface to a bridge
salt '*' bridge.addif br0 eth0
salt.modules.bridge.delete(br=None) Deletes a bridge
salt '*' bridge.delete br0
salt.modules.bridge.delif(br=None, iface=None) Removes an interface from a bridge
salt '*' bridge.delif br0 eth0
salt.modules.bridge.find_interfaces(*args) Returns the bridge to which the interfaces are bond to
salt '*' bridge.find_interfaces eth0 [eth1...]
salt.modules.bridge.interfaces(br=None) Returns interfaces attached to a bridge
salt '*' bridge.interfaces br0
salt.modules.bridge.list_() Returns the machine's bridges list
salt '*' bridge.list
salt.modules.bridge.show(br=None) Returns bridges interfaces along with enslaved physical interfaces. If no interface is given, all bridges are shown, else only the specified bridge values are returned.
salt '*' bridge.show salt '*' bridge.show br0
salt.modules.bridge.stp(br=None, state='disable', iface=None) Sets Spanning Tree Protocol state for a bridge
salt '*' bridge.stp br0 enable salt '*' bridge.stp br0 disable
For BSD-like operating systems, it is required to add the interface on which to enable the STP.
salt '*' bridge.stp bridge0 enable fxp0 salt '*' bridge.stp bridge0 disable fxp0
salt.modules.bsd_shadow Manage the password database on BSD systems
IMPORTANT: If you feel that Salt should be using this module to manage passwords on a minion, and it is using a different module (or gives an error similar to 'shadow.info' is not available), see here.
salt.modules.bsd_shadow.default_hash() Returns the default hash used for unset passwords
salt '*' shadow.default_hash
salt.modules.bsd_shadow.del_password(name) New in version 2015.8.2.
Delete the password from name user
salt '*' shadow.del_password username
salt.modules.bsd_shadow.gen_password(password, crypt_salt=None, algorithm='sha512') Generate hashed password
NOTE: When called this function is called directly via remote-execution, the password argument may be displayed in the system's process list.  This may be a security risk on certain systems.
password Plaintext password to be hashed.
crypt_salt Crpytographic salt. If not given, a random 8-character salt will be generated.
algorithm The following hash algorithms are supported:
• md5
• blowfish (not in mainline glibc, only available in distros that add it)
• sha256
• sha512 (default)
salt '*' shadow.gen_password 'I_am_password' salt '*' shadow.gen_password 'I_am_password' crypt_salt='I_am_salt' algorithm=sha256
salt.modules.bsd_shadow.info(name) Return information for the specified user
salt '*' shadow.info someuser
salt.modules.bsd_shadow.set_change(name, change) Sets the time at which the password expires (in seconds since the UNIX epoch). See man 8 usermod on NetBSD and OpenBSD or man 8 pw on FreeBSD.
A value of 0 sets the password to never expire.
salt '*' shadow.set_change username 1419980400
salt.modules.bsd_shadow.set_expire(name, expire) Sets the time at which the account expires (in seconds since the UNIX epoch). See man 8 usermod on NetBSD and OpenBSD or man 8 pw on FreeBSD.
A value of 0 sets the account to never expire.
salt '*' shadow.set_expire username 1419980400
salt.modules.bsd_shadow.set_password(name, password) Set the password for a named user. The password must be a properly defined hash. The password hash can be generated with this command:
python -c "import crypt; print crypt.crypt('password', ciphersalt)"
NOTE: When constructing the ciphersalt string, you must escape any dollar signs, to avoid them being interpolated by the shell.
'password' is, of course, the password for which you want to generate a hash.
ciphersalt is a combination of a cipher identifier, an optional number of rounds, and the cryptographic salt. The arrangement and format of these fields depends on the cipher and which flavor of BSD you are using. For more information on this, see the manpage for crpyt(3). On NetBSD, additional information is available in passwd.conf(5).
It is important to make sure that a supported cipher is used.
salt '*' shadow.set_password someuser '$1$UYCIxa628.9qXjpQCjM4a..'
salt.modules.btrfs Module for managing BTRFS file systems.
salt.modules.btrfs.add(mountpoint, *devices, **kwargs) Add a devices to a BTRFS filesystem.
General options:
• nodiscard: Do not perform whole device TRIM
• force: Force overwrite existing filesystem on the disk
salt '*' btrfs.add /mountpoint /dev/sda1 /dev/sda2
salt.modules.btrfs.convert(device, permanent=False, keeplf=False) Convert ext2/3/4 to BTRFS. Device should be mounted.
Filesystem can be converted temporarily so the further processing and rollback is possible, or permanently, where previous extended filesystem image gets deleted. Please note, permanent conversion takes a while as BTRFS filesystem needs to be properly rebalanced afterwards.
• permanent: Specify if the migration should be permanent (false by default)
keeplf: Keep lost+found of the partition (removed by default, but still in the image, if not permanent migration)
salt '*' btrfs.convert /dev/sda1 salt '*' btrfs.convert /dev/sda1 permanent=True
salt.modules.btrfs.defragment(path) Defragment mounted BTRFS filesystem.  In order to defragment a filesystem, device should be properly mounted and writable.
If passed a device name, then defragmented whole filesystem, mounted on in.  If passed a moun tpoint of the filesystem, then only this mount point is defragmented.
salt '*' btrfs.defragment /dev/sda1 salt '*' btrfs.defragment /path/on/filesystem
salt.modules.btrfs.delete(mountpoint, *devices, **kwargs) Remove devices from a BTRFS filesystem.
salt '*' btrfs.delete /mountpoint /dev/sda1 /dev/sda2
salt.modules.btrfs.devices() Get known BTRFS formatted devices on the system.
salt '*' btrfs.devices
salt.modules.btrfs.features() List currently available BTRFS features.
salt '*' btrfs.mkfs_features
salt.modules.btrfs.info(device) Get BTRFS filesystem information.
salt '*' btrfs.info /dev/sda1
salt.modules.btrfs.mkfs(*devices, **kwargs) Create a file system on the specified device. By default wipes out with force.
• allocsize: Specify the BTRFS offset from the start of the device.
• bytecount: Specify the size of the resultant filesystem.
• nodesize: Node size.
• leafsize: Specify the nodesize, the tree block size in which btrfs stores data.
• noforce: Prevent force overwrite when an existing filesystem is detected on the device.
• sectorsize: Specify the sectorsize, the minimum data block allocation unit.
• nodiscard: Do not perform whole device TRIM operation by default.
• uuid: Pass UUID or pass True to generate one.
dto: (raid0|raid1|raid5|raid6|raid10|single|dup) Specify how the data must be spanned across the devices specified.
mto: (raid0|raid1|raid5|raid6|raid10|single|dup) Specify how metadata must be spanned across the devices specified.
• fts: Features (call salt <host> btrfs.features for full list of available features)
See the mkfs.btrfs(8) manpage for a more complete description of corresponding options description.
salt '*' btrfs.mkfs /dev/sda1 salt '*' btrfs.mkfs /dev/sda1 noforce=True
salt.modules.btrfs.properties(obj, type=None, set=None) List properties for given btrfs object. The object can be path of BTRFS device, mount point, or any directories/files inside the BTRFS filesystem.
• type: Possible types are s[ubvol], f[ilesystem], i[node] and d[evice].
• set: <key=value,key1=value1...> Options for a filesystem properties.
salt '*' btrfs.properties /mountpoint salt '*' btrfs.properties /dev/sda1 type=subvol set='ro=false,label="My Storage"'
salt.modules.btrfs.resize(mountpoint, size) Resize filesystem.
• mountpoint: Specify the BTRFS mountpoint to resize.
• size: ([+/-]<newsize>[kKmMgGtTpPeE]|max) Specify the new size of the target.
salt '*' btrfs.resize /mountpoint size=+1g salt '*' btrfs.resize /dev/sda1 size=max
salt.modules.btrfs.subvolume_create(name, dest=None, qgroupids=None) Create subvolume name in dest.
Return True if the subvolume is created, False is the subvolume is already there.
name   Name of the new subvolume
dest   If not given, the subvolume will be created in the current directory, if given will be in /dest/name
qgroupids Add the newly created subcolume to a qgroup. This parameter is a list
salt '*' btrfs.subvolume_create var salt '*' btrfs.subvolume_create var dest=/mnt salt '*' btrfs.subvolume_create var qgroupids='[200]'
salt.modules.btrfs.subvolume_delete(name=None, names=None, commit=None) Delete the subvolume(s) from the filesystem
The user can remove one single subvolume (name) or multiple of then at the same time (names). One of the two parameters needs to specified.
Please, refer to the documentation to understand the implication on the transactions, and when the subvolume is really deleted.
Return True if the subvolume is deleted, False is the subvolume was already missing.
name   Name of the subvolume to remove
names  List of names of subvolumes to remove
• 'after': Wait for transaction commit at the end
• 'each': Wait for transaction commit after each delete
salt '*' btrfs.subvolume_delete /var/volumes/tmp salt '*' btrfs.subvolume_delete /var/volumes/tmp commit=after
salt.modules.btrfs.subvolume_exists(path) Check if a subvolume is present in the filesystem.
path   Mount point for the subvolume (full path)
salt '*' btrfs.subvolume_exists /mnt/var
salt.modules.btrfs.subvolume_find_new(name, last_gen) List the recently modified files in a subvolume
name   Name of the subvolume
last_gen Last transid marker from where to compare
salt '*' btrfs.subvolume_find_new /var/volumes/tmp 1024
salt.modules.btrfs.subvolume_get_default(path) Get the default subvolume of the filesystem path
path   Mount point for the subvolume
salt '*' btrfs.subvolume_get_default /var/volumes/tmp
salt.modules.btrfs.subvolume_list(path, parent_id=False, absolute=False, ogeneration=False, generation=False, subvolumes=False, uuid=False, parent_uuid=False, sent_subvolume_uuid=False, snapshots=False, readonly=False, deleted=False, generation_cmp=None, ogeneration_cmp=None, sort=None) List the subvolumes present in the filesystem.
parent_id Print parent ID
absolute Print all the subvolumes in the filesystem and distinguish between absolute and relative path with respect to the given <path>
ogeneration Print the ogeneration of the subvolume
generation Print the generation of the subvolume
subvolumes Print only subvolumes below specified <path>
uuid   Print the UUID of the subvolume
parent_uuid Print the parent uuid of subvolumes (and snapshots)
sent_subvolume_uuid Print the UUID of the sent subvolume, where the subvolume is the result of a receive operation
snapshots Only snapshot subvolumes in the filesystem will be listed
readonly Only readonly subvolumes in the filesystem will be listed
deleted Only deleted subvolumens that are ye not cleaned
generation_cmp List subvolumes in the filesystem that its generation is >=, <= or = value. '+' means >= value, '-' means <= value, If there is neither '+' nor '-', it means = value
ogeneration_cmp List subvolumes in the filesystem that its ogeneration is >=, <= or = value
sort   List subvolumes in order by specified items. Possible values: * rootid * gen * ogen * path You can add '+' or '-' in front of each items, '+' means ascending, '-' means descending. The default is ascending. You can combite it in a list.
salt '*' btrfs.subvolume_list /var/volumes/tmp salt '*' btrfs.subvolume_list /var/volumes/tmp path=True salt '*' btrfs.subvolume_list /var/volumes/tmp sort='[-rootid]'
salt.modules.btrfs.subvolume_set_default(subvolid, path) Set the subvolume as default
subvolid ID of the new default subvolume
path   Mount point for the filesystem
salt '*' btrfs.subvolume_set_default 257 /var/volumes/tmp
salt.modules.btrfs.subvolume_show(path) Show information of a given subvolume
salt '*' btrfs.subvolume_show /var/volumes/tmp
salt.modules.btrfs.subvolume_snapshot(source, dest=None, name=None, read_only=False) Create a snapshot of a source subvolume
source Source subvolume from where to create the snapshot
dest   If only dest is given, the subvolume will be named as the basename of the source
name   Name of the snapshot
read_only Create a read only snapshot
salt '*' btrfs.subvolume_snapshot /var/volumes/tmp dest=/.snapshots salt '*' btrfs.subvolume_snapshot /var/volumes/tmp name=backup
salt.modules.btrfs.subvolume_sync(path, subvolids=None, sleep=None) Wait until given subvolume are completely removed from the filesystem after deletion.
subvolids List of IDs of subvolumes to wait for
sleep  Sleep N seconds betwenn checks (default: 1)
salt '*' btrfs.subvolume_sync /var/volumes/tmp salt '*' btrfs.subvolume_sync /var/volumes/tmp subvolids='[257]'
salt.modules.btrfs.usage(path) Show in which disk the chunks are allocated.
salt '*' btrfs.usage /your/mountpoint
salt.modules.btrfs.version() Return BTRFS version.
salt '*' btrfs.version
salt.modules.cabal Manage and query Cabal packages New in version 2015.8.0.
salt.modules.cabal.install(pkg=None, pkgs=None, user=None, install_global=False, env=None) Install a cabal package.
pkg    A package name in format accepted by cabal-install. See: https://wiki.haskell.org/Cabal-Install
pkgs   A list of packages names in same format as pkg
user   The user to run cabal install with
install_global Install package globally instead of locally
env    Environment variables to set when invoking cabal. Uses the same env format as the cmd.run execution function
salt '*' cabal.install shellcheck salt '*' cabal.install shellcheck-0.3.5
salt.modules.cabal.list_(pkg=None, user=None, installed=False, env=None) List packages matching a search string.
pkg    Search string for matching package names
user   The user to run cabal list with
installed If True, only return installed packages.
salt '*' cabal.list salt '*' cabal.list ShellCheck
salt.modules.cabal.uninstall(pkg, user=None, env=None) Uninstall a cabal package.
pkg    The package to uninstall
user   The user to run ghc-pkg unregister with
salt '*' cabal.uninstall ShellCheck
salt.modules.cabal.update(user=None, env=None) Updates list of known packages.
user   The user to run cabal update with
env    Environment variables to set when invoking cabal. Uses the same env format as the cmd.run execution function.
salt '*' cabal.update
salt.modules.capirca_acl Capirca ACL Generate ACL (firewall) configuration for network devices.
codeauthor Mircea Ulinic <ping@mirceaulinic.net> & Robert Ankeny <‐ robankeny@google.com>
depends capirca
Dependencies The firewall configuration is generated by Capirca.
To install Capirca, execute: pip install capirca.
salt.modules.capirca_acl.get_filter_config(platform, filter_name, filter_options=None, terms=None, prepend=True, pillar_key='acl', pillarenv=None, saltenv=None, merge_pillar=True, only_lower_merge=False, revision_id=None, revision_no=None, revision_date=True, revision_date_format='%Y/%m/%d') Return the configuration of a policy filter.
platform The name of the Capirca platform.
filter_name The name of the policy filter.
filter_options Additional filter options. These options are platform-specific.  See the complete list of options.
terms  List of terms for this policy filter.  If not specified or empty, will try to load the configuration from the pillar, unless merge_pillar is set as False.
prepend: True When merge_pillar is set as True, the final list of terms generated by merging the terms from terms with those defined in the pillar (if any): new terms are prepended at the beginning, while existing ones will preserve the position. To add the new terms at the end of the list, set this argument to False.
pillar_key: acl The key in the pillar containing the default attributes values. Default: acl.
pillarenv Query the master to generate fresh pillar data on the fly, specifically from the requested pillar environment.
saltenv Included only for compatibility with pillarenv_from_saltenv, and is otherwise ignored.
merge_pillar: True Merge the CLI variables with the pillar. Default: True.
only_lower_merge: False Specify if it should merge only the terms fields. Otherwise it will try to merge also filters fields. Default: False.
revision_id Add a comment in the filter config having the description for the changes applied.
revision_no The revision count.
revision_date: True Boolean flag: display the date when the filter configuration was generated. Default: True.
revision_date_format: %Y/%m/%d The date format to be used when generating the perforce data. Default: %Y/%m/%d (<year>/<month>/<day>).
salt '*' capirca.get_filter_config ciscoxr my-filter pillar_key=netacl
Output Example:
! $Id:$ ! $Date:$ ! $Revision:$ no ipv4 access-list my-filter ipv4 access-list my-filter remark $Id:$ remark my-term deny ipv4 any eq 1234 any deny ipv4 any eq 1235 any remark my-other-term permit tcp any range 5678 5680 any exit
The filter configuration has been loaded from the pillar, having the following structure:
netacl: - my-filter: terms: - my-term: source_port: [1234, 1235] action: reject - my-other-term: source_port: - [5678, 5680] protocol: tcp action: accept
salt.modules.capirca_acl.get_filter_pillar(filter_name, pillar_key='acl', pillarenv=None, saltenv=None) Helper that can be used inside a state SLS, in order to get the filter configuration given its name.
filter_name The name of the filter.
pillar_key The root key of the whole policy config.
salt.modules.capirca_acl.get_policy_config(platform, filters=None, prepend=True, pillar_key='acl', pillarenv=None, saltenv=None, merge_pillar=True, only_lower_merge=False, revision_id=None, revision_no=None, revision_date=True, revision_date_format='%Y/%m/%d') Return the configuration of the whole policy.
filters List of filters for this policy.  If not specified or empty, will try to load the configuration from the pillar, unless merge_pillar is set as False.
prepend: True When merge_pillar is set as True, the final list of filters generated by merging the filters from filters with those defined in the pillar (if any): new filters are prepended at the beginning, while existing ones will preserve the position. To add the new filters at the end of the list, set this argument to False.
only_lower_merge: False Specify if it should merge only the filters and terms fields. Otherwise it will try to merge everything at the policy level. Default: False.
revision_id Add a comment in the policy config having the description for the changes applied.
revision_date: True Boolean flag: display the date when the policy configuration was generated. Default: True.
salt '*' capirca.get_policy_config juniper pillar_key=netacl
firewall { family inet { replace: /* ** $Id:$ ** $Date:$ ** $Revision:$ ** */ filter my-filter { term my-term { from { source-port [ 1234 1235 ]; } then { reject; } } term my-other-term { from { protocol tcp; source-port 5678-5680; } then accept; } } } } firewall { family inet { replace: /* ** $Id:$ ** $Date:$ ** $Revision:$ ** */ filter my-other-filter { interface-specific; term dummy-term { from { protocol [ tcp udp ]; } then { reject; } } } } }
The policy configuration has been loaded from the pillar, having the following structure:
netacl: - my-filter: options: - not-interface-specific terms: - my-term: source_port: [1234, 1235] action: reject - my-other-term: source_port: - [5678, 5680] protocol: tcp action: accept - my-other-filter: terms: - dummy-term: protocol: - tcp - udp action: reject
salt.modules.capirca_acl.get_term_config(platform, filter_name, term_name, filter_options=None, pillar_key='acl', pillarenv=None, saltenv=None, merge_pillar=True, revision_id=None, revision_no=None, revision_date=True, revision_date_format='%Y/%m/%d', source_service=None, destination_service=None, **term_fields) Return the configuration of a single policy term.
term_name The name of the term.
filter_options Additional filter options. These options are platform-specific.  E.g.: inet6, bridge, object-group, See the complete list of options.
pillar_key: acl The key in the pillar containing the default attributes values. Default: acl.  If the pillar contains the following structure:
firewall: - my-filter: terms: - my-term: source_port: 1234 source_address: - 1.2.3.4/32 - 5.6.7.8/32
The pillar_key field would be specified as firewall.
revision_id Add a comment in the term config having the description for the changes applied.
revision_date: True Boolean flag: display the date when the term configuration was generated. Default: True.
source_service A special service to choose from. This is a helper so the user is able to select a source just using the name, instead of specifying a source_port and protocol.
As this module is available on Unix platforms only, it reads the IANA port assignment from /etc/services.
If the user requires additional shortcuts to be referenced, they can add entries under /etc/services, which can be managed using the file state.
destination_service A special service to choose from. This is a helper so the user is able to select a source just using the name, instead of specifying a destination_port and protocol. Allows the same options as source_service.
term_fields Term attributes.  To see what fields are supported, please consult the list of supported keywords.  Some platforms have few other optional keywords.
NOTE: The following fields are accepted:
• address
• address_exclude
• comment
• expiration
• destination_address
• destination_address_exclude
• destination_port
• destination_prefix
• forwarding_class
• forwarding_class_except
• logging
• log_name
• loss_priority
• option
• policer
• port
• precedence
• principals
• protocol
• protocol_except
• qos
• pan_application
• routing_instance
• source_address
• source_address_exclude
• source_port
• source_prefix
• verbatim
• packet_length
• fragment_offset
• hop_limit
• icmp_type
• ether_type
• traffic_class_count
• traffic_type
• translated
• dscp_set
• dscp_match
• dscp_except
• next_ip
• flexible_match_range
• source_prefix_except
• destination_prefix_except
• vpn
• source_tag
• destination_tag
• source_interface
• destination_interface
• flattened
• flattened_addr
• flattened_saddr
• flattened_daddr
• priority
NOTE: The following fields can be also a single value and a list of values:
• source_service
• destination_service
Example: destination_address can be either defined as:
destination_address: 172.17.17.1/24
or as a list of destination IP addresses:
destination_address: - 172.17.17.1/24 - 172.17.19.1/24
or a list of services to be matched:
source_service: - ntp - snmp - ldap - bgpd
NOTE: The port fields source_port and destination_port can be used as above to select either a single value, either a list of values, but also they can select port ranges. Example:
source_port: - [1000, 2000] - [3000, 4000]
With the configuration above, the user is able to select the 1000-2000 and 3000-4000 source port ranges.
salt '*' capirca.get_term_config arista filter-name term-name source_address=1.2.3.4 destination_address=5.6.7.8 action=accept
! $Date: 2017/03/22 $ no ip access-list filter-name ip access-list filter-name remark term-name permit ip host 1.2.3.4 host 5.6.7.8 exit