Change Sets#
Define API ResourceRecordSets.
-
class
gcloud.dns.changes.Changes(zone)[source]# Bases:
objectChanges are bundled additions / deletions of DNS resource records.
Changes are owned by a
gcloud.dns.zone.ManagedZoneinstance.See: https://cloud.google.com/dns/api/v1/changes
Parameters: zone ( gcloud.dns.zone.ManagedZone) – A zone which holds one or more record sets.-
add_record_set(record_set)[source]# Append a record set to the ‘additions’ for the change set.
Parameters: record_set ( gcloud.dns.resource_record_set.ResourceRecordSet) – the record set to appendRaises: ValueErrorifrecord_setis not of the required type.
-
additions# Resource record sets to be added to the zone.
Return type: sequence of gcloud.dns.resource_record_set.ResourceRecordSet.Returns: record sets appended via add_record_set()
-
create(client=None)[source]# API call: create the change set via a POST request
See: https://cloud.google.com/dns/api/v1/changes/create
Parameters: client ( gcloud.dns.client.ClientorNoneType) – the client to use. If not passed, falls back to theclientstored on the current zone.
-
delete_record_set(record_set)[source]# Append a record set to the ‘deletions’ for the change set.
Parameters: record_set ( gcloud.dns.resource_record_set.ResourceRecordSet) – the record set to appendRaises: ValueErrorifrecord_setis not of the required type.
-
deletions# Resource record sets to be deleted from the zone.
Return type: sequence of gcloud.dns.resource_record_set.ResourceRecordSet.Returns: record sets appended via delete_record_set()
-
exists(client=None)[source]# API call: test for the existence of the change set via a GET request
See https://cloud.google.com/dns/api/v1/changes/get
Parameters: client ( gcloud.dns.client.ClientorNoneType) – the client to use. If not passed, falls back to theclientstored on the current zone.
-
classmethod
from_api_repr(resource, zone)[source]# Factory: construct a change set given its API representation
Parameters: - resource (dict) – change set representation returned from the API
- zone (
gcloud.dns.zone.ManagedZone) – A zone which holds zero or more change sets.
Return type: Returns: RRS parsed from
resource.
-
name# Name of the change set.
Return type: string or NoneTypeReturns: Name, as set by the back-end, or None.
-
path# URL path for change set APIs.
Return type: string Returns: the path based on project, zone, and change set names.
-
reload(client=None)[source]# API call: refresh zone properties via a GET request
See https://cloud.google.com/dns/api/v1/changes/get
Parameters: client ( gcloud.dns.client.ClientorNoneType) – the client to use. If not passed, falls back to theclientstored on the current zone.
-
started# Time when the change set was started.
Return type: datetime.datetimeorNoneTypeReturns: Time, as set by the back-end, or None.
-
status# Status of the change set.
Return type: string or NoneTypeReturns: Status, as set by the back-end, or None.
-