IcsR53 Common Library

IcsR53: Library for Route53

This is the IcsR53 common library.
class opslib.icsr53.IcsR53(dns_name=None, **kwargs)[source]

ICS Library for R53

__dict__ = dict_proxy({'add_a': <function add_a at 0x4ae1230>, '__module__': 'opslib.icsr53', 'find_records': <function find_records at 0x57d0ed8>, 'update_record': <function update_record at 0x4ae10c8>, 'get_zone_id': <function get_zone_id at 0x57d0c08>, 'set_zone': <function set_zone at 0x57d0cf8>, 'update_alias': <function update_alias at 0x4ae1500>, 'parse_dns_name': <staticmethod object at 0x56d19f0>, 'update_a': <function update_a at 0x4ae1488>, '__dict__': <attribute '__dict__' of 'IcsR53' objects>, 'add_alias': <function add_alias at 0x4ae12a8>, '__weakref__': <attribute '__weakref__' of 'IcsR53' objects>, 'wait_to_complete': <function wait_to_complete at 0x57d0f50>, '__init__': <function __init__ at 0x57d0b18>, 'delete_cname': <function delete_cname at 0x4ae1578>, 'get_cname': <function get_cname at 0x4ae1320>, 'get_zone_dict': <function get_zone_dict at 0x57d0d70>, 'find_all_records': <function find_all_records at 0x57d0e60>, 'get_a': <function get_a at 0x4ae1398>, 'get_records': <function get_records at 0x57d0de8>, 'add_record': <function add_record at 0x4ae1050>, 'delete_a': <function delete_a at 0x4ae15f0>, 'get_zone': <function get_zone at 0x57d0c80>, 'add_cname': <function add_cname at 0x4ae11b8>, 'update_cname': <function update_cname at 0x4ae1410>, '__doc__': '\n ICS Library for R53\n ', 'delete_record': <function delete_record at 0x4ae1140>})
__init__(dns_name=None, **kwargs)[source]
__module__ = 'opslib.icsr53'
__weakref__

list of weak references to the object (if defined)

add_a(name, value, ttl=None, identifier=None)[source]

Add a new A record to this Zone. See _new_record for parameter documentation. Returns a Status object.

add_alias(name, type, alias_hosted_zone_id, alias_dns_name, identifier=None)[source]

Add a new alias record to this Zone. See _new_alias_record for parameter documentation. Returns a Status object.

add_cname(name, value, ttl=None, identifier=None)[source]

Add a new CNAME record to this Zone. See _new_record for parameter documentation. Returns a Status object.

add_record(resource_type, name, value, ttl=60, identifier=None)[source]

Add a new record to this Zone. See _new_record for parameter documentation. Returns a Status object.

delete_a(name, identifier=None, all=False)[source]

Delete an A record matching name and identifier from this Zone. Returns a Status object.

If there is more than one match delete all matching records if all is True, otherwise throws TooManyRecordsException.

delete_cname(name, identifier=None, all=False)[source]

Delete a CNAME record matching name and identifier from this Zone. Returns a Status object.

If there is more than one match delete all matching records if all is True, otherwise throws TooManyRecordsException.

delete_record(record)[source]

Delete one or more records from this Zone. Returns a Status object.

Parameters:record – A ResourceRecord (e.g. returned by find_records) or list, tuple, or set of ResourceRecords.
find_all_records()[source]

Search all records in this zone.

find_records(name, type, desired=1, all=False, identifier=None)[source]

Search this Zone for records that match given parameters. Returns None if no results, a ResourceRecord if one result, or a ResourceRecordSets if more than one result.

Parameters:
  • name (str) – The name of the records should match this parameter
  • type (str) – The type of the records should match this parameter
  • desired (int) – The number of desired results. If the number of matching records in the Zone exceeds the value of this parameter, throw TooManyRecordsException
  • all (Boolean) – If true return all records that match name, type, and identifier parameters
  • identifier (Tuple) –

    A tuple specifying WRR or LBR attributes. Valid forms are:

    • (str, str): WRR record [e.g. (‘foo’,‘10’)]
    • (str, str): LBR record [e.g. (‘foo’,’us-east-1’)
get_a(name, identifier=None, all=False)[source]

Search this Zone for A records that match name.

Returns a ResourceRecord.

If there is more than one match return all as a ResourceRecordSets if all is True, otherwise throws TooManyRecordsException.

get_cname(name, identifier=None, all=False)[source]

Search this Zone for CNAME records that match name.

Returns a ResourceRecord.

If there is more than one match return all as a ResourceRecordSets if all is True, otherwise throws TooManyRecordsException.

get_records()[source]

Return a ResourceRecordsSets for all of the records in this zone.

get_zone(name)[source]

Get the hosted zone for the specified domain name

Parameters:name (string) – the specified domain name
Return type:class
Returns:a class containing the specified hosted zone
get_zone_dict(name)[source]

Get the hosted zone info for the specified domain name

Parameters:name (string) – the specified domain name
Return type:dict
Returns:a dict containing the specified hosted zone info
get_zone_id()[source]

Get the hosted zone ID for the specified domain name

Return type:string
Returns:a string containing the ID of the specified hosted zone
static parse_dns_name(name)[source]

Parse the value of Tag “DnsName”

Parameters:name (string) – the value of Instance Tag “DnsName” for example, “test.example.com:A:Public:1”
Return type:tuple
Returns:a tuple containing (DnsName, DnsType, Public/Private, Weight) for example, (“test.example.com”, “A”, True, “10”)
set_zone(name)[source]

Set the hosted zone for the specified domain name

Parameters:name (string) – the specified domain name
update_a(name, value, ttl=None, identifier=None)[source]

Update the given A record in this Zone to a new value, ttl, and identifier. Returns a Status object.

Will throw TooManyRecordsException is name, value does not match a single record.

update_alias(name, type, identifier=None, alias_dns_name=None)[source]

Update the given alias record in this Zone to a new routing policy Returns a Status object.

Will throw TooManyRecordsException is name, value does not match a single record.

update_cname(name, value, ttl=None, identifier=None)[source]

Update the given CNAME record in this Zone to a new value, ttl, and identifier. Returns a Status object.

Will throw TooManyRecordsException is name, value does not match a single record.

update_record(old_record, new_value, new_ttl=None, new_identifier=None)[source]

Update an existing record in this Zone. Returns a Status object.

Parameters:old_record (ResourceRecord) – A ResourceRecord (e.g. returned by find_records)

See _new_record for additional parameter documentation.

wait_to_complete(status=None, timeout=60)[source]

Wait for the Route53 commit change to complete

Parameters:status (class) – the instance initializing boto.route53.status.Status

Indices and tables

Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.