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__ = <dictproxy object at 0x4b11a98>
__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

Table Of Contents

Previous topic

IcsSNS Common Library

Next topic

IcsMeta Common Library

This Page