Class: Google::Apis::DnsV1::DnsService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/dns_v1/service.rb

Overview

Google Cloud DNS API

Configures and serves authoritative DNS records.

Examples:

require 'google/apis/dns_v1'

Dns = Google::Apis::DnsV1 # Alias the module
service = Dns::DnsService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Constructor Details

#initializeDnsService

Returns a new instance of DnsService.



51
52
53
# File 'generated/google/apis/dns_v1/service.rb', line 51

def initialize
  super('https://www.googleapis.com/', 'dns/v1/projects/')
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/dns_v1/service.rb', line 38

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.



44
45
46
# File 'generated/google/apis/dns_v1/service.rb', line 44

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.



49
50
51
# File 'generated/google/apis/dns_v1/service.rb', line 49

def user_ip
  @user_ip
end

Instance Method Details

#create_change(project, managed_zone, change_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DnsV1::Change

Atomically update the ResourceRecordSet collection.

Parameters:

  • project (String)

    Identifies the project addressed by this request.

  • managed_zone (String)

    Identifies the managed zone addressed by this request. Can be the managed zone name or id.

  • change_object (Google::Apis::DnsV1::Change) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'generated/google/apis/dns_v1/service.rb', line 83

def create_change(project, managed_zone, change_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '{project}/managedZones/{managedZone}/changes', options)
  command.request_representation = Google::Apis::DnsV1::Change::Representation
  command.request_object = change_object
  command.response_representation = Google::Apis::DnsV1::Change::Representation
  command.response_class = Google::Apis::DnsV1::Change
  command.params['project'] = project unless project.nil?
  command.params['managedZone'] = managed_zone unless managed_zone.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#create_managed_zone(project, managed_zone_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DnsV1::ManagedZone

Create a new ManagedZone.

Parameters:

  • project (String)

    Identifies the project addressed by this request.

  • managed_zone_object (Google::Apis::DnsV1::ManagedZone) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



218
219
220
221
222
223
224
225
226
227
228
229
# File 'generated/google/apis/dns_v1/service.rb', line 218

def create_managed_zone(project, managed_zone_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '{project}/managedZones', options)
  command.request_representation = Google::Apis::DnsV1::ManagedZone::Representation
  command.request_object = managed_zone_object
  command.response_representation = Google::Apis::DnsV1::ManagedZone::Representation
  command.response_class = Google::Apis::DnsV1::ManagedZone
  command.params['project'] = project unless project.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_managed_zone(project, managed_zone, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete a previously created ManagedZone.

Parameters:

  • project (String)

    Identifies the project addressed by this request.

  • managed_zone (String)

    Identifies the managed zone addressed by this request. Can be the managed zone name or id.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



258
259
260
261
262
263
264
265
266
# File 'generated/google/apis/dns_v1/service.rb', line 258

def delete_managed_zone(project, managed_zone, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, '{project}/managedZones/{managedZone}', options)
  command.params['project'] = project unless project.nil?
  command.params['managedZone'] = managed_zone unless managed_zone.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_change(project, managed_zone, change_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DnsV1::Change

Fetch the representation of an existing Change.

Parameters:

  • project (String)

    Identifies the project addressed by this request.

  • managed_zone (String)

    Identifies the managed zone addressed by this request. Can be the managed zone name or id.

  • change_id (String)

    The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



127
128
129
130
131
132
133
134
135
136
137
138
# File 'generated/google/apis/dns_v1/service.rb', line 127

def get_change(project, managed_zone, change_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '{project}/managedZones/{managedZone}/changes/{changeId}', options)
  command.response_representation = Google::Apis::DnsV1::Change::Representation
  command.response_class = Google::Apis::DnsV1::Change
  command.params['project'] = project unless project.nil?
  command.params['managedZone'] = managed_zone unless managed_zone.nil?
  command.params['changeId'] = change_id unless change_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_managed_zone(project, managed_zone, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DnsV1::ManagedZone

Fetch the representation of an existing ManagedZone.

Parameters:

  • project (String)

    Identifies the project addressed by this request.

  • managed_zone (String)

    Identifies the managed zone addressed by this request. Can be the managed zone name or id.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



295
296
297
298
299
300
301
302
303
304
305
# File 'generated/google/apis/dns_v1/service.rb', line 295

def get_managed_zone(project, managed_zone, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '{project}/managedZones/{managedZone}', options)
  command.response_representation = Google::Apis::DnsV1::ManagedZone::Representation
  command.response_class = Google::Apis::DnsV1::ManagedZone
  command.params['project'] = project unless project.nil?
  command.params['managedZone'] = managed_zone unless managed_zone.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_project(project, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DnsV1::Project

Fetch the representation of an existing Project.

Parameters:

  • project (String)

    Identifies the project addressed by this request.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



377
378
379
380
381
382
383
384
385
386
# File 'generated/google/apis/dns_v1/service.rb', line 377

def get_project(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '{project}', options)
  command.response_representation = Google::Apis::DnsV1::Project::Representation
  command.response_class = Google::Apis::DnsV1::Project
  command.params['project'] = project unless project.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_changes(project, managed_zone, max_results: nil, page_token: nil, sort_by: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DnsV1::ListChangesResponse

Enumerate Changes to a ResourceRecordSet collection.

Parameters:

  • project (String)

    Identifies the project addressed by this request.

  • managed_zone (String)

    Identifies the managed zone addressed by this request. Can be the managed zone name or id.

  • max_results (Fixnum) (defaults to: nil)

    Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.

  • page_token (String) (defaults to: nil)

    Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.

  • sort_by (String) (defaults to: nil)

    Sorting criterion. The only supported value is change sequence.

  • sort_order (String) (defaults to: nil)

    Sorting order direction: 'ascending' or 'descending'.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'generated/google/apis/dns_v1/service.rb', line 177

def list_changes(project, managed_zone, max_results: nil, page_token: nil, sort_by: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '{project}/managedZones/{managedZone}/changes', options)
  command.response_representation = Google::Apis::DnsV1::ListChangesResponse::Representation
  command.response_class = Google::Apis::DnsV1::ListChangesResponse
  command.params['project'] = project unless project.nil?
  command.params['managedZone'] = managed_zone unless managed_zone.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['sortBy'] = sort_by unless sort_by.nil?
  command.query['sortOrder'] = sort_order unless sort_order.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_managed_zones(project, dns_name: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DnsV1::ListManagedZonesResponse

Enumerate ManagedZones that have been created but not yet deleted.

Parameters:

  • project (String)

    Identifies the project addressed by this request.

  • dns_name (String) (defaults to: nil)

    Restricts the list to return only zones with this domain name.

  • max_results (Fixnum) (defaults to: nil)

    Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.

  • page_token (String) (defaults to: nil)

    Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'generated/google/apis/dns_v1/service.rb', line 339

def list_managed_zones(project, dns_name: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '{project}/managedZones', options)
  command.response_representation = Google::Apis::DnsV1::ListManagedZonesResponse::Representation
  command.response_class = Google::Apis::DnsV1::ListManagedZonesResponse
  command.params['project'] = project unless project.nil?
  command.query['dnsName'] = dns_name unless dns_name.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_resource_record_sets(project, managed_zone, max_results: nil, name: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DnsV1::ListResourceRecordSetsResponse

Enumerate ResourceRecordSets that have been created but not yet deleted.

Parameters:

  • project (String)

    Identifies the project addressed by this request.

  • managed_zone (String)

    Identifies the managed zone addressed by this request. Can be the managed zone name or id.

  • max_results (Fixnum) (defaults to: nil)

    Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.

  • name (String) (defaults to: nil)

    Restricts the list to return only records with this fully qualified domain name.

  • page_token (String) (defaults to: nil)

    Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.

  • type (String) (defaults to: nil)

    Restricts the list to return only records of this type. If present, the "name" parameter must also be present.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
# File 'generated/google/apis/dns_v1/service.rb', line 427

def list_resource_record_sets(project, managed_zone, max_results: nil, name: nil, page_token: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '{project}/managedZones/{managedZone}/rrsets', options)
  command.response_representation = Google::Apis::DnsV1::ListResourceRecordSetsResponse::Representation
  command.response_class = Google::Apis::DnsV1::ListResourceRecordSetsResponse
  command.params['project'] = project unless project.nil?
  command.params['managedZone'] = managed_zone unless managed_zone.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['name'] = name unless name.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['type'] = type unless type.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end