salt.modules.boto_route53

Connection module for Amazon Route53

New in version 2014.7.0.

configuration:

This module accepts explicit route53 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 a pillar or in the minion's config file:

route53.keyid: GKTADJGHEIQSXMKKRBJ08H
route53.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

A region may also be specified in the configuration:

route53.region: us-east-1

If a region is not specified, the default is 'universal', which is what the boto_route53 library expects, rather than None.

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
depends:

boto

salt.modules.boto_route53.add_record(name, value, zone, record_type, identifier=None, ttl=None, region=None, key=None, keyid=None, profile=None, wait_for_sync=True, split_dns=False, private_zone=False, retry_on_rate_limit=True, rate_limit_retries=5)

Add a record to a zone.

CLI example:

salt myminion boto_route53.add_record test.example.org 1.1.1.1 example.org A
salt.modules.boto_route53.create_hosted_zone(domain_name, caller_ref=None, comment='', private_zone=False, vpc_id=None, vpc_name=None, vpc_region=None, region=None, key=None, keyid=None, profile=None)

Create a new Route53 Hosted Zone. Returns a Python data structure with information about the newly created Hosted Zone.

domain_name
The name of the domain. This should be a fully-specified domain, and should terminate with a period. This is the name you have registered with your DNS registrar. It is also the name you will delegate from your registrar to the Amazon Route 53 delegation servers returned in response to this request.
caller_ref
A unique string that identifies the request and that allows create_hosted_zone() calls to be retried without the risk of executing the operation twice. You want to provide this where possible, since additional calls while the first is in PENDING status will be accepted and can lead to multiple copies of the zone being created in Route53.
comment
Any comments you want to include about the hosted zone.
private_zone
Set True if creating a private hosted zone.
vpc_id
When creating a private hosted zone, either the VPC ID or VPC Name to associate with is required. Exclusive with vpe_name. Ignored if passed for a non-private zone.
vpc_name
When creating a private hosted zone, either the VPC ID or VPC Name to associate with is required. Exclusive with vpe_id. Ignored if passed for a non-private zone.
vpc_region
When creating a private hosted zone, the region of the associated VPC is required. If not provided, an effort will be made to determine it from vpc_id or vpc_name, if possible. If this fails, you'll need to provide an explicit value for this option. Ignored if passed for a non-private zone.
region
Region endpoint to connect to
key
AWS key to bind with
keyid
AWS keyid to bind with
profile
Dict, or pillar key pointing to a dict, containing AWS region/key/keyid

CLI Example:

salt myminion boto_route53.create_hosted_zone example.org
salt.modules.boto_route53.create_zone(zone, private=False, vpc_id=None, vpc_region=None, region=None, key=None, keyid=None, profile=None)

Create a Route53 hosted zone.

New in version 2015.8.0.

zone
DNS zone to create
private
True/False if the zone will be a private zone
vpc_id
VPC ID to associate the zone to (required if private is True)
vpc_region
VPC Region (required if private is True)
region
region endpoint to connect to
key
AWS key
keyid
AWS keyid
profile
AWS pillar profile

CLI Example:

salt myminion boto_route53.create_zone example.org
salt.modules.boto_route53.delete_record(name, zone, record_type, identifier=None, all_records=False, region=None, key=None, keyid=None, profile=None, wait_for_sync=True, split_dns=False, private_zone=False, retry_on_rate_limit=True, rate_limit_retries=5)

Modify a record in a zone.

CLI example:

salt myminion boto_route53.delete_record test.example.org example.org A
salt.modules.boto_route53.delete_zone(zone, region=None, key=None, keyid=None, profile=None)

Delete a Route53 hosted zone.

New in version 2015.8.0.

CLI Example:

salt myminion boto_route53.delete_zone example.org
salt.modules.boto_route53.describe_hosted_zones(zone_id=None, domain_name=None, region=None, key=None, keyid=None, profile=None)

Return detailed info about one, or all, zones in the bound account. If neither zone_id nor domain_name is provided, return all zones. Note that the return format is slightly different between the 'all' and 'single' description types.

zone_id
The unique identifier for the Hosted Zone
domain_name
The FQDN of the Hosted Zone (including final period)
region
Region to connect to.
key
Secret key to be used.
keyid
Access key to be used.
profile
A dict with region, key and keyid, or a pillar key (string) that contains a dict with region, key and keyid.

CLI Example:

salt myminion boto_route53.describe_hosted_zones domain_name=foo.bar.com.                 profile='{"region": "us-east-1", "keyid": "A12345678AB", "key": "xblahblahblah"}'
salt.modules.boto_route53.get_record(name, zone, record_type, fetch_all=False, region=None, key=None, keyid=None, profile=None, split_dns=False, private_zone=False, identifier=None, retry_on_rate_limit=True, rate_limit_retries=5)

Get a record from a zone.

CLI example:

salt myminion boto_route53.get_record test.example.org example.org A
salt.modules.boto_route53.list_all_zones_by_id(region=None, key=None, keyid=None, profile=None)

List, by their IDs, all hosted zones in the bound account.

region
Region to connect to.
key
Secret key to be used.
keyid
Access key to be used.
profile
A dict with region, key and keyid, or a pillar key (string) that contains a dict with region, key and keyid.

CLI Example:

salt myminion boto_route53.list_all_zones_by_id
salt.modules.boto_route53.list_all_zones_by_name(region=None, key=None, keyid=None, profile=None)

List, by their FQDNs, all hosted zones in the bound account.

region
Region to connect to.
key
Secret key to be used.
keyid
Access key to be used.
profile
A dict with region, key and keyid, or a pillar key (string) that contains a dict with region, key and keyid.

CLI Example:

salt myminion boto_route53.list_all_zones_by_name
salt.modules.boto_route53.update_record(name, value, zone, record_type, identifier=None, ttl=None, region=None, key=None, keyid=None, profile=None, wait_for_sync=True, split_dns=False, private_zone=False, retry_on_rate_limit=True, rate_limit_retries=5)

Modify a record in a zone.

CLI example:

salt myminion boto_route53.modify_record test.example.org 1.1.1.1 example.org A
salt.modules.boto_route53.zone_exists(zone, region=None, key=None, keyid=None, profile=None, retry_on_rate_limit=True, rate_limit_retries=5)

Check for the existence of a Route53 hosted zone.

New in version 2015.8.0.

CLI Example:

salt myminion boto_route53.zone_exists example.org