Class v1alpha2.DomainsClient (2.1.2)

The Cloud Domains API enables management and configuration of domain names. v1alpha2

Package

@google-cloud/domains

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of DomainsClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new DomainsClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

domainsStub

domainsStub?: Promise<{
        [name: string]: Function;
    }>;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

checkConfigureContactSettingsProgress(name)

checkConfigureContactSettingsProgress(name: string): Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>;

Check the status of the long running operation returned by configureContactSettings().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` whose contact settings are being updated,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const registration = 'abc123'
  /**
   *  Fields of the `ContactSettings` to update.
   */
  // const contactSettings = {}
  /**
   *  Required. The field mask describing which fields to update as a comma-separated list.
   *  For example, if only the registrant contact is being updated, the
   *  `update_mask` is `"registrant_contact"`.
   */
  // const updateMask = {}
  /**
   *  The list of contact notices that the caller acknowledges. The notices
   *  needed here depend on the values specified in `contact_settings`.
   */
  // const contactNotices = 1234
  /**
   *  Validate the request without actually updating the contact settings.
   */
  // const validateOnly = true

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callConfigureContactSettings() {
    // Construct request
    const request = {
      registration,
      updateMask,
    };

    // Run request
    const [operation] = await domainsClient.configureContactSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callConfigureContactSettings();

checkConfigureDnsSettingsProgress(name)

checkConfigureDnsSettingsProgress(name: string): Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>;

Check the status of the long running operation returned by configureDnsSettings().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` whose DNS settings are being updated,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const registration = 'abc123'
  /**
   *  Fields of the `DnsSettings` to update.
   */
  // const dnsSettings = {}
  /**
   *  Required. The field mask describing which fields to update as a comma-separated list.
   *  For example, if only the name servers are being updated for an existing
   *  Custom DNS configuration, the `update_mask` is
   *  `"custom_dns.name_servers"`.
   *  When changing the DNS provider from one type to another, pass the new
   *  provider's field name as part of the field mask. For example, when changing
   *  from a Google Domains DNS configuration to a Custom DNS configuration, the
   *  `update_mask` is `"custom_dns"`. //
   */
  // const updateMask = {}
  /**
   *  Validate the request without actually updating the DNS settings.
   */
  // const validateOnly = true

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callConfigureDnsSettings() {
    // Construct request
    const request = {
      registration,
      updateMask,
    };

    // Run request
    const [operation] = await domainsClient.configureDnsSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callConfigureDnsSettings();

checkConfigureManagementSettingsProgress(name)

checkConfigureManagementSettingsProgress(name: string): Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>;

Check the status of the long running operation returned by configureManagementSettings().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` whose management settings are being updated,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const registration = 'abc123'
  /**
   *  Fields of the `ManagementSettings` to update.
   */
  // const managementSettings = {}
  /**
   *  Required. The field mask describing which fields to update as a comma-separated list.
   *  For example, if only the transfer lock is being updated, the `update_mask`
   *  is `"transfer_lock_state"`.
   */
  // const updateMask = {}

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callConfigureManagementSettings() {
    // Construct request
    const request = {
      registration,
      updateMask,
    };

    // Run request
    const [operation] = await domainsClient.configureManagementSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callConfigureManagementSettings();

checkDeleteRegistrationProgress(name)

checkDeleteRegistrationProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.domains.v1alpha2.OperationMetadata>>;

Check the status of the long running operation returned by deleteRegistration().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.domains.v1alpha2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` to delete,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const name = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callDeleteRegistration() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await domainsClient.deleteRegistration(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteRegistration();

checkExportRegistrationProgress(name)

checkExportRegistrationProgress(name: string): Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>;

Check the status of the long running operation returned by exportRegistration().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` to export,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const name = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callExportRegistration() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await domainsClient.exportRegistration(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callExportRegistration();

checkRegisterDomainProgress(name)

checkRegisterDomainProgress(name: string): Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>;

Check the status of the long running operation returned by registerDomain().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the `Registration`. Must be in the
   *  format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The complete `Registration` resource to be created.
   */
  // const registration = {}
  /**
   *  The list of domain notices that you acknowledge. Call
   *  `RetrieveRegisterParameters` to see the notices that need acknowledgement.
   */
  // const domainNotices = 1234
  /**
   *  The list of contact notices that the caller acknowledges. The notices
   *  needed here depend on the values specified in
   *  `registration.contact_settings`.
   */
  // const contactNotices = 1234
  /**
   *  Required. Yearly price to register or renew the domain.
   *  The value that should be put here can be obtained from
   *  RetrieveRegisterParameters or SearchDomains calls.
   */
  // const yearlyPrice = {}
  /**
   *  When true, only validation is performed, without actually registering
   *  the domain. Follows:
   *  https://cloud.google.com/apis/design/design_patterns#request_validation
   */
  // const validateOnly = true

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callRegisterDomain() {
    // Construct request
    const request = {
      parent,
      registration,
      yearlyPrice,
    };

    // Run request
    const [operation] = await domainsClient.registerDomain(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRegisterDomain();

checkTransferDomainProgress(name)

checkTransferDomainProgress(name: string): Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>;

Check the status of the long running operation returned by transferDomain().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the `Registration`. Must be in the
   *  format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The complete `Registration` resource to be created.
   *  You can leave `registration.dns_settings` unset to import the
   *  domain's current DNS configuration from its current registrar. Use this
   *  option only if you are sure that the domain's current DNS service
   *  does not cease upon transfer, as is often the case for DNS services
   *  provided for free by the registrar.
   */
  // const registration = {}
  /**
   *  The list of contact notices that you acknowledge. The notices
   *  needed here depend on the values specified in
   *  `registration.contact_settings`.
   */
  // const contactNotices = 1234
  /**
   *  Required. Acknowledgement of the price to transfer or renew the domain for one year.
   *  Call `RetrieveTransferParameters` to obtain the price, which you must
   *  acknowledge.
   */
  // const yearlyPrice = {}
  /**
   *  The domain's transfer authorization code. You can obtain this from the
   *  domain's current registrar.
   */
  // const authorizationCode = {}
  /**
   *  Validate the request without actually transferring the domain.
   */
  // const validateOnly = true

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callTransferDomain() {
    // Construct request
    const request = {
      parent,
      registration,
      yearlyPrice,
    };

    // Run request
    const [operation] = await domainsClient.transferDomain(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callTransferDomain();

checkUpdateRegistrationProgress(name)

checkUpdateRegistrationProgress(name: string): Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>;

Check the status of the long running operation returned by updateRegistration().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.domains.v1alpha2.Registration, protos.google.cloud.domains.v1alpha2.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Fields of the `Registration` to update.
   */
  // const registration = {}
  /**
   *  Required. The field mask describing which fields to update as a comma-separated list.
   *  For example, if only the labels are being updated, the `update_mask` is
   *  `"labels"`.
   */
  // const updateMask = {}

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callUpdateRegistration() {
    // Construct request
    const request = {
      updateMask,
    };

    // Run request
    const [operation] = await domainsClient.updateRegistration(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateRegistration();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

configureContactSettings(request, options)

configureContactSettings(request?: protos.google.cloud.domains.v1alpha2.IConfigureContactSettingsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a Registration's contact settings. Some changes require confirmation by the domain's registrant contact .

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IConfigureContactSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` whose contact settings are being updated,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const registration = 'abc123'
  /**
   *  Fields of the `ContactSettings` to update.
   */
  // const contactSettings = {}
  /**
   *  Required. The field mask describing which fields to update as a comma-separated list.
   *  For example, if only the registrant contact is being updated, the
   *  `update_mask` is `"registrant_contact"`.
   */
  // const updateMask = {}
  /**
   *  The list of contact notices that the caller acknowledges. The notices
   *  needed here depend on the values specified in `contact_settings`.
   */
  // const contactNotices = 1234
  /**
   *  Validate the request without actually updating the contact settings.
   */
  // const validateOnly = true

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callConfigureContactSettings() {
    // Construct request
    const request = {
      registration,
      updateMask,
    };

    // Run request
    const [operation] = await domainsClient.configureContactSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callConfigureContactSettings();

configureContactSettings(request, options, callback)

configureContactSettings(request: protos.google.cloud.domains.v1alpha2.IConfigureContactSettingsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IConfigureContactSettingsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

configureContactSettings(request, callback)

configureContactSettings(request: protos.google.cloud.domains.v1alpha2.IConfigureContactSettingsRequest, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IConfigureContactSettingsRequest
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

configureDnsSettings(request, options)

configureDnsSettings(request?: protos.google.cloud.domains.v1alpha2.IConfigureDnsSettingsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a Registration's DNS settings.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IConfigureDnsSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` whose DNS settings are being updated,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const registration = 'abc123'
  /**
   *  Fields of the `DnsSettings` to update.
   */
  // const dnsSettings = {}
  /**
   *  Required. The field mask describing which fields to update as a comma-separated list.
   *  For example, if only the name servers are being updated for an existing
   *  Custom DNS configuration, the `update_mask` is
   *  `"custom_dns.name_servers"`.
   *  When changing the DNS provider from one type to another, pass the new
   *  provider's field name as part of the field mask. For example, when changing
   *  from a Google Domains DNS configuration to a Custom DNS configuration, the
   *  `update_mask` is `"custom_dns"`. //
   */
  // const updateMask = {}
  /**
   *  Validate the request without actually updating the DNS settings.
   */
  // const validateOnly = true

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callConfigureDnsSettings() {
    // Construct request
    const request = {
      registration,
      updateMask,
    };

    // Run request
    const [operation] = await domainsClient.configureDnsSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callConfigureDnsSettings();

configureDnsSettings(request, options, callback)

configureDnsSettings(request: protos.google.cloud.domains.v1alpha2.IConfigureDnsSettingsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IConfigureDnsSettingsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

configureDnsSettings(request, callback)

configureDnsSettings(request: protos.google.cloud.domains.v1alpha2.IConfigureDnsSettingsRequest, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IConfigureDnsSettingsRequest
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

configureManagementSettings(request, options)

configureManagementSettings(request?: protos.google.cloud.domains.v1alpha2.IConfigureManagementSettingsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates a Registration's management settings.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IConfigureManagementSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` whose management settings are being updated,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const registration = 'abc123'
  /**
   *  Fields of the `ManagementSettings` to update.
   */
  // const managementSettings = {}
  /**
   *  Required. The field mask describing which fields to update as a comma-separated list.
   *  For example, if only the transfer lock is being updated, the `update_mask`
   *  is `"transfer_lock_state"`.
   */
  // const updateMask = {}

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callConfigureManagementSettings() {
    // Construct request
    const request = {
      registration,
      updateMask,
    };

    // Run request
    const [operation] = await domainsClient.configureManagementSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callConfigureManagementSettings();

configureManagementSettings(request, options, callback)

configureManagementSettings(request: protos.google.cloud.domains.v1alpha2.IConfigureManagementSettingsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IConfigureManagementSettingsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

configureManagementSettings(request, callback)

configureManagementSettings(request: protos.google.cloud.domains.v1alpha2.IConfigureManagementSettingsRequest, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IConfigureManagementSettingsRequest
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteRegistration(request, options)

deleteRegistration(request?: protos.google.cloud.domains.v1alpha2.IDeleteRegistrationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.domains.v1alpha2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a Registration resource.

This method works on any Registration resource using [Subscription or Commitment billing](/domains/pricing#billing-models), provided that the resource was created at least 1 day in the past.

For Registration resources using [Monthly billing](/domains/pricing#billing-models), this method works if:

* state is EXPORTED with expire_time in the past * state is REGISTRATION_FAILED * state is TRANSFER_FAILED

When an active registration is successfully deleted, you can continue to use the domain in [Google Domains](https://domains.google/) until it expires. The calling user becomes the domain's sole owner in Google Domains, and permissions for the domain are subsequently managed there. The domain does not renew automatically unless the new owner sets up billing in Google Domains.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IDeleteRegistrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` to delete,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const name = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callDeleteRegistration() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await domainsClient.deleteRegistration(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteRegistration();

deleteRegistration(request, options, callback)

deleteRegistration(request: protos.google.cloud.domains.v1alpha2.IDeleteRegistrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IDeleteRegistrationRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteRegistration(request, callback)

deleteRegistration(request: protos.google.cloud.domains.v1alpha2.IDeleteRegistrationRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IDeleteRegistrationRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportRegistration(request, options)

exportRegistration(request?: protos.google.cloud.domains.v1alpha2.IExportRegistrationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Exports a Registration resource, such that it is no longer managed by Cloud Domains.

When an active domain is successfully exported, you can continue to use the domain in [Google Domains](https://domains.google/) until it expires. The calling user becomes the domain's sole owner in Google Domains, and permissions for the domain are subsequently managed there. The domain does not renew automatically unless the new owner sets up billing in Google Domains.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IExportRegistrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` to export,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const name = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callExportRegistration() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await domainsClient.exportRegistration(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callExportRegistration();

exportRegistration(request, options, callback)

exportRegistration(request: protos.google.cloud.domains.v1alpha2.IExportRegistrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IExportRegistrationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

exportRegistration(request, callback)

exportRegistration(request: protos.google.cloud.domains.v1alpha2.IExportRegistrationRequest, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IExportRegistrationRequest
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getRegistration(request, options)

getRegistration(request?: protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest, options?: CallOptions): Promise<[
        protos.google.cloud.domains.v1alpha2.IRegistration,
        protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest | undefined,
        {} | undefined
    ]>;

Gets the details of a Registration resource.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Registration]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` to get, in the format
   *  `projects/* /locations/* /registrations/*`.
   */
  // const name = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callGetRegistration() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await domainsClient.getRegistration(request);
    console.log(response);
  }

  callGetRegistration();

getRegistration(request, options, callback)

getRegistration(request: protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest, options: CallOptions, callback: Callback<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest
options CallOptions
callback Callback<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getRegistration(request, callback)

getRegistration(request: protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest, callback: Callback<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest
callback Callback<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IGetRegistrationRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listRegistrations(request, options)

listRegistrations(request?: protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.domains.v1alpha2.IRegistration[],
        protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest | null,
        protos.google.cloud.domains.v1alpha2.IListRegistrationsResponse
    ]>;

Lists the Registration resources in a project.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.domains.v1alpha2.IRegistration[], protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest | null, protos.google.cloud.domains.v1alpha2.IListRegistrationsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Registration]. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listRegistrationsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listRegistrations(request, options, callback)

listRegistrations(request: protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, protos.google.cloud.domains.v1alpha2.IListRegistrationsResponse | null | undefined, protos.google.cloud.domains.v1alpha2.IRegistration>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, protos.google.cloud.domains.v1alpha2.IListRegistrationsResponse | null | undefined, protos.google.cloud.domains.v1alpha2.IRegistration>
Returns
TypeDescription
void

listRegistrations(request, callback)

listRegistrations(request: protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, callback: PaginationCallback<protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, protos.google.cloud.domains.v1alpha2.IListRegistrationsResponse | null | undefined, protos.google.cloud.domains.v1alpha2.IRegistration>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest
callback PaginationCallback<protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, protos.google.cloud.domains.v1alpha2.IListRegistrationsResponse | null | undefined, protos.google.cloud.domains.v1alpha2.IRegistration>
Returns
TypeDescription
void

listRegistrationsAsync(request, options)

listRegistrationsAsync(request?: protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.domains.v1alpha2.IRegistration>;

Equivalent to listRegistrations, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.domains.v1alpha2.IRegistration>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Registration]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The project and location from which to list `Registration`s, specified in
   *  the format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Maximum number of results to return.
   */
  // const pageSize = 1234
  /**
   *  When set to the `next_page_token` from a prior response, provides the next
   *  page of results.
   */
  // const pageToken = 'abc123'
  /**
   *  Filter expression to restrict the `Registration`s returned.
   *  The expression must specify the field name, a comparison operator, and the
   *  value that you want to use for filtering. The value must be a string, a
   *  number, a boolean, or an enum value. The comparison operator should be one
   *  of =, !=, >, <,>=, <=, or="" :="" for="" prefix="" or="" wildcard="" matches.="" *="" for="" example,="" to="" filter="" to="" a="" specific="" domain="" name,="" use="" an="" expression="" like="" *="" `domainname="example.com" `.="" you="" can="" also="" check="" for="" the="" existence="" of="" a="" *="" field;="" for="" example,="" to="" find="" domains="" using="" custom="" dns="" settings,="" use="" an="" *="" expression="" like="" `dnssettings.customdns:*`.="" *="" you="" can="" also="" create="" compound="" filters="" by="" combining="" expressions="" with="" the="" *="" `and`="" and="" `or`="" operators.="" for="" example,="" to="" find="" domains="" that="" are="" suspended="" *="" or="" have="" specific="" issues="" flagged,="" use="" an="" expression="" like="" *="" `(state="SUSPENDED)" or="" (issue:*)`.="" */="" const="" filter='abc123' imports="" the="" domains="" library="" const="" {domainsclient}="require('@google-cloud/domains').v1alpha2;" instantiates="" a="" client="" const="" domainsclient="new" domainsclient();="" async="" function="" calllistregistrations()="" {="" construct="" request="" const="" request="{" parent,="" };="" run="" request="" const="" iterable="await" domainsclient.listregistrationsasync(request);="" for="" await="" (const="" response="" of="" iterable)="" {="" console.log(response);="" }="" }="" calllistregistrations();="">

listRegistrationsStream(request, options)

listRegistrationsStream(request?: protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IListRegistrationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Registration] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listRegistrationsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromRegistrationName(registrationName)

matchLocationFromRegistrationName(registrationName: string): string | number;

Parse the location from Registration resource.

Parameter
NameDescription
registrationName string

A fully-qualified path representing Registration resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromRegistrationName(registrationName)

matchProjectFromRegistrationName(registrationName: string): string | number;

Parse the project from Registration resource.

Parameter
NameDescription
registrationName string

A fully-qualified path representing Registration resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchRegistrationFromRegistrationName(registrationName)

matchRegistrationFromRegistrationName(registrationName: string): string | number;

Parse the registration from Registration resource.

Parameter
NameDescription
registrationName string

A fully-qualified path representing Registration resource.

Returns
TypeDescription
string | number

{string} A string representing the registration.

registerDomain(request, options)

registerDomain(request?: protos.google.cloud.domains.v1alpha2.IRegisterDomainRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Registers a new domain name and creates a corresponding Registration resource.

Call RetrieveRegisterParameters first to check availability of the domain name and determine parameters like price that are needed to build a call to this method.

A successful call creates a Registration resource in state REGISTRATION_PENDING, which resolves to ACTIVE within 1-2 minutes, indicating that the domain was successfully registered. If the resource ends up in state REGISTRATION_FAILED, it indicates that the domain was not registered successfully, and you can safely delete the resource and retry registration.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRegisterDomainRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the `Registration`. Must be in the
   *  format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The complete `Registration` resource to be created.
   */
  // const registration = {}
  /**
   *  The list of domain notices that you acknowledge. Call
   *  `RetrieveRegisterParameters` to see the notices that need acknowledgement.
   */
  // const domainNotices = 1234
  /**
   *  The list of contact notices that the caller acknowledges. The notices
   *  needed here depend on the values specified in
   *  `registration.contact_settings`.
   */
  // const contactNotices = 1234
  /**
   *  Required. Yearly price to register or renew the domain.
   *  The value that should be put here can be obtained from
   *  RetrieveRegisterParameters or SearchDomains calls.
   */
  // const yearlyPrice = {}
  /**
   *  When true, only validation is performed, without actually registering
   *  the domain. Follows:
   *  https://cloud.google.com/apis/design/design_patterns#request_validation
   */
  // const validateOnly = true

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callRegisterDomain() {
    // Construct request
    const request = {
      parent,
      registration,
      yearlyPrice,
    };

    // Run request
    const [operation] = await domainsClient.registerDomain(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRegisterDomain();

registerDomain(request, options, callback)

registerDomain(request: protos.google.cloud.domains.v1alpha2.IRegisterDomainRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRegisterDomainRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

registerDomain(request, callback)

registerDomain(request: protos.google.cloud.domains.v1alpha2.IRegisterDomainRequest, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRegisterDomainRequest
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

registrationPath(project, location, registration)

registrationPath(project: string, location: string, registration: string): string;

Return a fully-qualified registration resource name string.

Parameters
NameDescription
project string
location string
registration string
Returns
TypeDescription
string

{string} Resource name string.

resetAuthorizationCode(request, options)

resetAuthorizationCode(request?: protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest, options?: CallOptions): Promise<[
        protos.google.cloud.domains.v1alpha2.IAuthorizationCode,
        (protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest | undefined),
        {} | undefined
    ]>;

Resets the authorization code of the Registration to a new random string.

You can call this method only after 60 days have elapsed since the initial domain registration.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.domains.v1alpha2.IAuthorizationCode, (protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [AuthorizationCode]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` whose authorization code is being reset,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const registration = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callResetAuthorizationCode() {
    // Construct request
    const request = {
      registration,
    };

    // Run request
    const response = await domainsClient.resetAuthorizationCode(request);
    console.log(response);
  }

  callResetAuthorizationCode();

resetAuthorizationCode(request, options, callback)

resetAuthorizationCode(request: protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest, options: CallOptions, callback: Callback<protos.google.cloud.domains.v1alpha2.IAuthorizationCode, protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest
options CallOptions
callback Callback<protos.google.cloud.domains.v1alpha2.IAuthorizationCode, protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resetAuthorizationCode(request, callback)

resetAuthorizationCode(request: protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest, callback: Callback<protos.google.cloud.domains.v1alpha2.IAuthorizationCode, protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest
callback Callback<protos.google.cloud.domains.v1alpha2.IAuthorizationCode, protos.google.cloud.domains.v1alpha2.IResetAuthorizationCodeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

retrieveAuthorizationCode(request, options)

retrieveAuthorizationCode(request?: protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest, options?: CallOptions): Promise<[
        protos.google.cloud.domains.v1alpha2.IAuthorizationCode,
        (protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest | undefined),
        {} | undefined
    ]>;

Gets the authorization code of the Registration for the purpose of transferring the domain to another registrar.

You can call this method only after 60 days have elapsed since the initial domain registration.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.domains.v1alpha2.IAuthorizationCode, (protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [AuthorizationCode]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the `Registration` whose authorization code is being retrieved,
   *  in the format `projects/* /locations/* /registrations/*`.
   */
  // const registration = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callRetrieveAuthorizationCode() {
    // Construct request
    const request = {
      registration,
    };

    // Run request
    const response = await domainsClient.retrieveAuthorizationCode(request);
    console.log(response);
  }

  callRetrieveAuthorizationCode();

retrieveAuthorizationCode(request, options, callback)

retrieveAuthorizationCode(request: protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest, options: CallOptions, callback: Callback<protos.google.cloud.domains.v1alpha2.IAuthorizationCode, protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest
options CallOptions
callback Callback<protos.google.cloud.domains.v1alpha2.IAuthorizationCode, protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

retrieveAuthorizationCode(request, callback)

retrieveAuthorizationCode(request: protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest, callback: Callback<protos.google.cloud.domains.v1alpha2.IAuthorizationCode, protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest
callback Callback<protos.google.cloud.domains.v1alpha2.IAuthorizationCode, protos.google.cloud.domains.v1alpha2.IRetrieveAuthorizationCodeRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

retrieveRegisterParameters(request, options)

retrieveRegisterParameters(request?: protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersResponse,
        (protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest | undefined),
        {} | undefined
    ]>;

Gets parameters needed to register a new domain name, including price and up-to-date availability. Use the returned values to call RegisterDomain.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersResponse, (protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [RetrieveRegisterParametersResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The domain name. Unicode domain names must be expressed in Punycode format.
   */
  // const domainName = 'abc123'
  /**
   *  Required. The location. Must be in the format `projects/* /locations/*`.
   */
  // const location = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callRetrieveRegisterParameters() {
    // Construct request
    const request = {
      domainName,
      location,
    };

    // Run request
    const response = await domainsClient.retrieveRegisterParameters(request);
    console.log(response);
  }

  callRetrieveRegisterParameters();

retrieveRegisterParameters(request, options, callback)

retrieveRegisterParameters(request: protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest, options: CallOptions, callback: Callback<protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersResponse, protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest
options CallOptions
callback Callback<protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersResponse, protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

retrieveRegisterParameters(request, callback)

retrieveRegisterParameters(request: protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest, callback: Callback<protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersResponse, protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest
callback Callback<protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersResponse, protos.google.cloud.domains.v1alpha2.IRetrieveRegisterParametersRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

retrieveTransferParameters(request, options)

retrieveTransferParameters(request?: protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersResponse,
        (protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest | undefined),
        {} | undefined
    ]>;

Gets parameters needed to transfer a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported.

Use the returned values to call TransferDomain.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersResponse, (protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [RetrieveTransferParametersResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The domain name. Unicode domain names must be expressed in Punycode format.
   */
  // const domainName = 'abc123'
  /**
   *  Required. The location. Must be in the format `projects/* /locations/*`.
   */
  // const location = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callRetrieveTransferParameters() {
    // Construct request
    const request = {
      domainName,
      location,
    };

    // Run request
    const response = await domainsClient.retrieveTransferParameters(request);
    console.log(response);
  }

  callRetrieveTransferParameters();

retrieveTransferParameters(request, options, callback)

retrieveTransferParameters(request: protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest, options: CallOptions, callback: Callback<protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersResponse, protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest
options CallOptions
callback Callback<protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersResponse, protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

retrieveTransferParameters(request, callback)

retrieveTransferParameters(request: protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest, callback: Callback<protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersResponse, protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest
callback Callback<protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersResponse, protos.google.cloud.domains.v1alpha2.IRetrieveTransferParametersRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

searchDomains(request, options)

searchDomains(request?: protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.domains.v1alpha2.ISearchDomainsResponse,
        protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest | undefined,
        {} | undefined
    ]>;

Searches for available domain names similar to the provided query.

Availability results from this method are approximate; call RetrieveRegisterParameters on a domain before registering to confirm availability.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.domains.v1alpha2.ISearchDomainsResponse, protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [SearchDomainsResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. String used to search for available domain names.
   */
  // const query = 'abc123'
  /**
   *  Required. The location. Must be in the format `projects/* /locations/*`.
   */
  // const location = 'abc123'

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callSearchDomains() {
    // Construct request
    const request = {
      query,
      location,
    };

    // Run request
    const response = await domainsClient.searchDomains(request);
    console.log(response);
  }

  callSearchDomains();

searchDomains(request, options, callback)

searchDomains(request: protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest, options: CallOptions, callback: Callback<protos.google.cloud.domains.v1alpha2.ISearchDomainsResponse, protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest
options CallOptions
callback Callback<protos.google.cloud.domains.v1alpha2.ISearchDomainsResponse, protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

searchDomains(request, callback)

searchDomains(request: protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest, callback: Callback<protos.google.cloud.domains.v1alpha2.ISearchDomainsResponse, protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest
callback Callback<protos.google.cloud.domains.v1alpha2.ISearchDomainsResponse, protos.google.cloud.domains.v1alpha2.ISearchDomainsRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

transferDomain(request, options)

transferDomain(request?: protos.google.cloud.domains.v1alpha2.ITransferDomainRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Transfers a domain name from another registrar to Cloud Domains. For domains managed by Google Domains, transferring to Cloud Domains is not supported.

Before calling this method, go to the domain's current registrar to unlock the domain for transfer and retrieve the domain's transfer authorization code. Then call RetrieveTransferParameters to confirm that the domain is unlocked and to get values needed to build a call to this method.

A successful call creates a Registration resource in state TRANSFER_PENDING. It can take several days to complete the transfer process. The registrant can often speed up this process by approving the transfer through the current registrar, either by clicking a link in an email from the registrar or by visiting the registrar's website.

A few minutes after transfer approval, the resource transitions to state ACTIVE, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in state TRANSFER_FAILED. If transfer fails, you can safely delete the resource and retry the transfer.

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.ITransferDomainRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent resource of the `Registration`. Must be in the
   *  format `projects/* /locations/*`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The complete `Registration` resource to be created.
   *  You can leave `registration.dns_settings` unset to import the
   *  domain's current DNS configuration from its current registrar. Use this
   *  option only if you are sure that the domain's current DNS service
   *  does not cease upon transfer, as is often the case for DNS services
   *  provided for free by the registrar.
   */
  // const registration = {}
  /**
   *  The list of contact notices that you acknowledge. The notices
   *  needed here depend on the values specified in
   *  `registration.contact_settings`.
   */
  // const contactNotices = 1234
  /**
   *  Required. Acknowledgement of the price to transfer or renew the domain for one year.
   *  Call `RetrieveTransferParameters` to obtain the price, which you must
   *  acknowledge.
   */
  // const yearlyPrice = {}
  /**
   *  The domain's transfer authorization code. You can obtain this from the
   *  domain's current registrar.
   */
  // const authorizationCode = {}
  /**
   *  Validate the request without actually transferring the domain.
   */
  // const validateOnly = true

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callTransferDomain() {
    // Construct request
    const request = {
      parent,
      registration,
      yearlyPrice,
    };

    // Run request
    const [operation] = await domainsClient.transferDomain(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callTransferDomain();

transferDomain(request, options, callback)

transferDomain(request: protos.google.cloud.domains.v1alpha2.ITransferDomainRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.ITransferDomainRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

transferDomain(request, callback)

transferDomain(request: protos.google.cloud.domains.v1alpha2.ITransferDomainRequest, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.ITransferDomainRequest
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateRegistration(request, options)

updateRegistration(request?: protos.google.cloud.domains.v1alpha2.IUpdateRegistrationRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates select fields of a Registration resource, notably labels. To update other fields, use the appropriate custom update method:

* To update management settings, see ConfigureManagementSettings * To update DNS configuration, see ConfigureDnsSettings * To update contact information, see ConfigureContactSettings

Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IUpdateRegistrationRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Fields of the `Registration` to update.
   */
  // const registration = {}
  /**
   *  Required. The field mask describing which fields to update as a comma-separated list.
   *  For example, if only the labels are being updated, the `update_mask` is
   *  `"labels"`.
   */
  // const updateMask = {}

  // Imports the Domains library
  const {DomainsClient} = require('@google-cloud/domains').v1alpha2;

  // Instantiates a client
  const domainsClient = new DomainsClient();

  async function callUpdateRegistration() {
    // Construct request
    const request = {
      updateMask,
    };

    // Run request
    const [operation] = await domainsClient.updateRegistration(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateRegistration();

updateRegistration(request, options, callback)

updateRegistration(request: protos.google.cloud.domains.v1alpha2.IUpdateRegistrationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IUpdateRegistrationRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateRegistration(request, callback)

updateRegistration(request: protos.google.cloud.domains.v1alpha2.IUpdateRegistrationRequest, callback: Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.domains.v1alpha2.IUpdateRegistrationRequest
callback Callback<LROperation<protos.google.cloud.domains.v1alpha2.IRegistration, protos.google.cloud.domains.v1alpha2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void