Class: Google::Apis::AcmednsV1::ACMEDNSService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/acmedns_v1/service.rb

Overview

ACME DNS API

Google Domains ACME DNS API that allows users to complete ACME DNS-01 challenges for a domain.

Examples:

require 'google/apis/acmedns_v1'

Acmedns = Google::Apis::AcmednsV1 # Alias the module
service = Acmedns::ACMEDNSService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://acmedns.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeACMEDNSService

Returns a new instance of ACMEDNSService.



48
49
50
51
52
53
# File 'lib/google/apis/acmedns_v1/service.rb', line 48

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-acmedns_v1',
        client_version: Google::Apis::AcmednsV1::GEM_VERSION)
  @batch_path = 'batch'
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.



41
42
43
# File 'lib/google/apis/acmedns_v1/service.rb', line 41

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.

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.



46
47
48
# File 'lib/google/apis/acmedns_v1/service.rb', line 46

def quota_user
  @quota_user
end

Instance Method Details

#get_acme_challenge_set(root_domain, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AcmednsV1::AcmeChallengeSet

Gets the ACME challenge set for a given domain name. Domain names must be provided in Punycode.

Parameters:

  • root_domain (String)

    Required. SLD + TLD domain name to list challenges. For example, this would be "google.com" for any FQDN under "google.com". That includes challenges for " subdomain.google.com". This MAY be Unicode or Punycode.

  • 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.

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



78
79
80
81
82
83
84
85
86
# File 'lib/google/apis/acmedns_v1/service.rb', line 78

def get_acme_challenge_set(root_domain, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/acmeChallengeSets/{rootDomain}', options)
  command.response_representation = Google::Apis::AcmednsV1::AcmeChallengeSet::Representation
  command.response_class = Google::Apis::AcmednsV1::AcmeChallengeSet
  command.params['rootDomain'] = root_domain unless root_domain.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#rotate_acme_challenge_set_challenges(root_domain, rotate_challenges_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AcmednsV1::AcmeChallengeSet

Rotate the ACME challenges for a given domain name. By default, removes any challenges that are older than 30 days. Domain names must be provided in Punycode.

Parameters:

  • root_domain (String)

    Required. SLD + TLD domain name to update records for. For example, this would be "google.com" for any FQDN under "google.com". That includes challenges for " subdomain.google.com". This MAY be Unicode or Punycode.

  • rotate_challenges_request_object (Google::Apis::AcmednsV1::RotateChallengesRequest) (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.

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



113
114
115
116
117
118
119
120
121
122
123
# File 'lib/google/apis/acmedns_v1/service.rb', line 113

def rotate_acme_challenge_set_challenges(root_domain, rotate_challenges_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/acmeChallengeSets/{rootDomain}:rotateChallenges', options)
  command.request_representation = Google::Apis::AcmednsV1::RotateChallengesRequest::Representation
  command.request_object = rotate_challenges_request_object
  command.response_representation = Google::Apis::AcmednsV1::AcmeChallengeSet::Representation
  command.response_class = Google::Apis::AcmednsV1::AcmeChallengeSet
  command.params['rootDomain'] = root_domain unless root_domain.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end