Class v1.DomainsClient (4.1.0)

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

Package

@google-cloud/domains

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of DomainsClient.

Parameters
NameDescription
optsClientOptions
gaxInstancetypeofgax | typeoffallback

: loaded instance ofgoogle-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: true}, gax); ```

Properties

apiEndpoint

getapiEndpoint():string;

The DNS address for this API service.

apiEndpoint

staticgetapiEndpoint():string;

The DNS address for this API service - same as servicePath.

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

staticgetport():number;

The port for this API service.

scopes

staticgetscopes():string[];

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

servicePath

staticgetservicePath():string;

The DNS address for this API service.

universeDomain

getuniverseDomain():string;

warn

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

Methods

checkConfigureContactSettingsProgress(name)

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

Check the status of the long running operation returned byconfigureContactSettings().

Parameter
NameDescription
namestring

The operation name that will be passed.

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

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see thedocumentation 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 = [1,2,3,4]/**   *  Validate the request without actually updating the contact settings.   */// const validateOnly = true// Imports the Domains libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallConfigureContactSettings(){// Construct requestconstrequest={registration,updateMask,};// Run requestconst[operation]=awaitdomainsClient.configureContactSettings(request);const[response]=awaitoperation.promise();console.log(response);}callConfigureContactSettings();

checkConfigureDnsSettingsProgress(name)

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

Check the status of the long running operation returned byconfigureDnsSettings().

Parameter
NameDescription
namestring

The operation name that will be passed.

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

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallConfigureDnsSettings(){// Construct requestconstrequest={registration,updateMask,};// Run requestconst[operation]=awaitdomainsClient.configureDnsSettings(request);const[response]=awaitoperation.promise();console.log(response);}callConfigureDnsSettings();

checkConfigureManagementSettingsProgress(name)

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

Check the status of the long running operation returned byconfigureManagementSettings().

Parameter
NameDescription
namestring

The operation name that will be passed.

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

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallConfigureManagementSettings(){// Construct requestconstrequest={registration,updateMask,};// Run requestconst[operation]=awaitdomainsClient.configureManagementSettings(request);const[response]=awaitoperation.promise();console.log(response);}callConfigureManagementSettings();

checkDeleteRegistrationProgress(name)

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

Check the status of the long running operation returned bydeleteRegistration().

Parameter
NameDescription
namestring

The operation name that will be passed.

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

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallDeleteRegistration(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitdomainsClient.deleteRegistration(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteRegistration();

checkExportRegistrationProgress(name)

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

Check the status of the long running operation returned byexportRegistration().

Parameter
NameDescription
namestring

The operation name that will be passed.

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

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallExportRegistration(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitdomainsClient.exportRegistration(request);const[response]=awaitoperation.promise();console.log(response);}callExportRegistration();

checkRegisterDomainProgress(name)

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

Check the status of the long running operation returned byregisterDomain().

Parameter
NameDescription
namestring

The operation name that will be passed.

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

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see thedocumentation 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 = [1,2,3,4]/**   *  The list of contact notices that the caller acknowledges. The notices   *  needed here depend on the values specified in   *  `registration.contact_settings`.   */// const contactNotices = [1,2,3,4]/**   *  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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallRegisterDomain(){// Construct requestconstrequest={parent,registration,yearlyPrice,};// Run requestconst[operation]=awaitdomainsClient.registerDomain(request);const[response]=awaitoperation.promise();console.log(response);}callRegisterDomain();

checkTransferDomainProgress(name)

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

Check the status of the long running operation returned bytransferDomain().

Parameter
NameDescription
namestring

The operation name that will be passed.

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

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see thedocumentation 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 = [1,2,3,4]/**   *  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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallTransferDomain(){// Construct requestconstrequest={parent,registration,yearlyPrice,};// Run requestconst[operation]=awaitdomainsClient.transferDomain(request);const[response]=awaitoperation.promise();console.log(response);}callTransferDomain();

checkUpdateRegistrationProgress(name)

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

Check the status of the long running operation returned byupdateRegistration().

Parameter
NameDescription
namestring

The operation name that will be passed.

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

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallUpdateRegistration(){// Construct requestconstrequest={updateMask,};// Run requestconst[operation]=awaitdomainsClient.updateRegistration(request);const[response]=awaitoperation.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.v1.IConfigureContactSettingsRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.IOperationMetadata>,protos.google.longrunning.IOperation|undefined,{}|undefined]>;

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

Parameters
NameDescription
requestIConfigureContactSettingsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 = [1,2,3,4]/**   *  Validate the request without actually updating the contact settings.   */// const validateOnly = true// Imports the Domains libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallConfigureContactSettings(){// Construct requestconstrequest={registration,updateMask,};// Run requestconst[operation]=awaitdomainsClient.configureContactSettings(request);const[response]=awaitoperation.promise();console.log(response);}callConfigureContactSettings();

configureContactSettings(request, options, callback)

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

configureContactSettings(request, callback)

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

configureDnsSettings(request, options)

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

Updates aRegistration's DNS settings.

Parameters
NameDescription
requestIConfigureDnsSettingsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallConfigureDnsSettings(){// Construct requestconstrequest={registration,updateMask,};// Run requestconst[operation]=awaitdomainsClient.configureDnsSettings(request);const[response]=awaitoperation.promise();console.log(response);}callConfigureDnsSettings();

configureDnsSettings(request, options, callback)

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

configureDnsSettings(request, callback)

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

configureManagementSettings(request, options)

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

Updates aRegistration's management settings.

Parameters
NameDescription
requestIConfigureManagementSettingsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallConfigureManagementSettings(){// Construct requestconstrequest={registration,updateMask,};// Run requestconst[operation]=awaitdomainsClient.configureManagementSettings(request);const[response]=awaitoperation.promise();console.log(response);}callConfigureManagementSettings();

configureManagementSettings(request, options, callback)

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

configureManagementSettings(request, callback)

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

deleteRegistration(request, options)

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

Deletes aRegistration resource.

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

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

*state isEXPORTED withexpire_time in the past *state isREGISTRATION_FAILED *state isTRANSFER_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
requestIDeleteRegistrationRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.protobuf.IEmpty,protos.google.cloud.domains.v1.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallDeleteRegistration(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitdomainsClient.deleteRegistration(request);const[response]=awaitoperation.promise();console.log(response);}callDeleteRegistration();

deleteRegistration(request, options, callback)

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

deleteRegistration(request, callback)

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

exportRegistration(request, options)

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

Exports aRegistration 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
requestIExportRegistrationRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallExportRegistration(){// Construct requestconstrequest={name,};// Run requestconst[operation]=awaitdomainsClient.exportRegistration(request);const[response]=awaitoperation.promise();console.log(response);}callExportRegistration();

exportRegistration(request, options, callback)

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

exportRegistration(request, callback)

exportRegistration(request:protos.google.cloud.domains.v1.IExportRegistrationRequest,callback:Callback<LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIExportRegistrationRequest
callbackCallback<LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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
callbackCallback<string, undefined, undefined>
Returns
TypeDescription
void

getRegistration(request, options)

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

Gets the details of aRegistration resource.

Parameters
NameDescription
requestIGetRegistrationRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallGetRegistration(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitdomainsClient.getRegistration(request);console.log(response);}callGetRegistration();

getRegistration(request, options, callback)

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

getRegistration(request, callback)

getRegistration(request:protos.google.cloud.domains.v1.IGetRegistrationRequest,callback:Callback<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.IGetRegistrationRequest|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIGetRegistrationRequest
callbackCallback<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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.v1.IListRegistrationsRequest,options?:CallOptions):Promise<[protos.google.cloud.domains.v1.IRegistration[],protos.google.cloud.domains.v1.IListRegistrationsRequest|null,protos.google.cloud.domains.v1.IListRegistrationsResponse]>;

Lists theRegistration resources in a project.

Parameters
NameDescription
requestIListRegistrationsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 usinglistRegistrationsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

listRegistrations(request, options, callback)

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

listRegistrations(request, callback)

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

listRegistrationsAsync(request, options)

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

Equivalent tolistRegistrations, but returns an iterable object.

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

Parameters
NameDescription
requestIListRegistrationsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Object} An iterable Object that allowsasync iteration. When you iterate the returned iterable, each element will be an object representing . 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 thedocumentation 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').v1;"instantiates=""a=""client=""const=""domainsclient="new"domainsclient();=""async=""function=""calllistregistrations()=""{=""construct=""request=""const=""request="{"parent,=""};=""run=""request=""const=""iterable="domainsClient.listRegistrationsAsync(request);"for=""await=""(const=""response=""of=""iterable)=""{=""console.log(response);=""}=""}=""calllistregistrations();="">

listRegistrationsStream(request, options)

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

Equivalent tolistRegistrations, but returns a NodeJS Stream object.

Parameters
NameDescription
requestIListRegistrationsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 usinglistRegistrationsAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples.

locationPath(project, location)

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

Return a fully-qualified location resource name string.

Parameters
NameDescription
projectstring
locationstring
Returns
TypeDescription
string

{string} Resource name string.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName:string):string|number;

Parse the location from Location resource.

Parameter
NameDescription
locationNamestring

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
registrationNamestring

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
locationNamestring

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
registrationNamestring

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
registrationNamestring

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.v1.IRegisterDomainRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.IOperationMetadata>,protos.google.longrunning.IOperation|undefined,{}|undefined]>;

Registers a new domain name and creates a correspondingRegistration resource.

CallRetrieveRegisterParameters 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 aRegistration resource in stateREGISTRATION_PENDING, which resolves toACTIVE within 1-2 minutes, indicating that the domain was successfully registered. If the resource ends up in stateREGISTRATION_FAILED, it indicates that the domain was not registered successfully, and you can safely delete the resource and retry registration.

Parameters
NameDescription
requestIRegisterDomainRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 = [1,2,3,4]/**   *  The list of contact notices that the caller acknowledges. The notices   *  needed here depend on the values specified in   *  `registration.contact_settings`.   */// const contactNotices = [1,2,3,4]/**   *  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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallRegisterDomain(){// Construct requestconstrequest={parent,registration,yearlyPrice,};// Run requestconst[operation]=awaitdomainsClient.registerDomain(request);const[response]=awaitoperation.promise();console.log(response);}callRegisterDomain();

registerDomain(request, options, callback)

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

registerDomain(request, callback)

registerDomain(request:protos.google.cloud.domains.v1.IRegisterDomainRequest,callback:Callback<LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.IOperationMetadata>,protos.google.longrunning.IOperation|null|undefined,{}|null|undefined>):void;
Parameters
NameDescription
requestIRegisterDomainRequest
callbackCallback<LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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
projectstring
locationstring
registrationstring
Returns
TypeDescription
string

{string} Resource name string.

resetAuthorizationCode(request, options)

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

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

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

Parameters
NameDescription
requestIResetAuthorizationCodeRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is an object representingAuthorizationCode. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallResetAuthorizationCode(){// Construct requestconstrequest={registration,};// Run requestconstresponse=awaitdomainsClient.resetAuthorizationCode(request);console.log(response);}callResetAuthorizationCode();

resetAuthorizationCode(request, options, callback)

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

resetAuthorizationCode(request, callback)

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

retrieveAuthorizationCode(request, options)

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

Gets the authorization code of theRegistration 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
requestIRetrieveAuthorizationCodeRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is an object representingAuthorizationCode. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallRetrieveAuthorizationCode(){// Construct requestconstrequest={registration,};// Run requestconstresponse=awaitdomainsClient.retrieveAuthorizationCode(request);console.log(response);}callRetrieveAuthorizationCode();

retrieveAuthorizationCode(request, options, callback)

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

retrieveAuthorizationCode(request, callback)

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

retrieveRegisterParameters(request, options)

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

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

Parameters
NameDescription
requestIRetrieveRegisterParametersRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is an object representingRetrieveRegisterParametersResponse. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallRetrieveRegisterParameters(){// Construct requestconstrequest={domainName,location,};// Run requestconstresponse=awaitdomainsClient.retrieveRegisterParameters(request);console.log(response);}callRetrieveRegisterParameters();

retrieveRegisterParameters(request, options, callback)

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

retrieveRegisterParameters(request, callback)

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

retrieveTransferParameters(request, options)

retrieveTransferParameters(request?:protos.google.cloud.domains.v1.IRetrieveTransferParametersRequest,options?:CallOptions):Promise<[protos.google.cloud.domains.v1.IRetrieveTransferParametersResponse,protos.google.cloud.domains.v1.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 callTransferDomain.

Parameters
NameDescription
requestIRetrieveTransferParametersRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is an object representingRetrieveTransferParametersResponse. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallRetrieveTransferParameters(){// Construct requestconstrequest={domainName,location,};// Run requestconstresponse=awaitdomainsClient.retrieveTransferParameters(request);console.log(response);}callRetrieveTransferParameters();

retrieveTransferParameters(request, options, callback)

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

retrieveTransferParameters(request, callback)

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

searchDomains(request, options)

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

Searches for available domain names similar to the provided query.

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

Parameters
NameDescription
requestISearchDomainsRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

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

{Promise} - The promise which resolves to an array. The first element of the array is an object representingSearchDomainsResponse. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallSearchDomains(){// Construct requestconstrequest={query,location,};// Run requestconstresponse=awaitdomainsClient.searchDomains(request);console.log(response);}callSearchDomains();

searchDomains(request, options, callback)

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

searchDomains(request, callback)

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

transferDomain(request, options)

transferDomain(request?:protos.google.cloud.domains.v1.ITransferDomainRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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 callRetrieveTransferParameters to confirm that the domain is unlocked and to get values needed to build a call to this method.

A successful call creates aRegistration resource in stateTRANSFER_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 stateACTIVE, indicating that the transfer was successful. If the transfer is rejected or the request expires without being approved, the resource can end up in stateTRANSFER_FAILED. If transfer fails, you can safely delete the resource and retry the transfer.

Parameters
NameDescription
requestITransferDomainRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 = [1,2,3,4]/**   *  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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallTransferDomain(){// Construct requestconstrequest={parent,registration,yearlyPrice,};// Run requestconst[operation]=awaitdomainsClient.transferDomain(request);const[response]=awaitoperation.promise();console.log(response);}callTransferDomain();

transferDomain(request, options, callback)

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

transferDomain(request, callback)

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

updateRegistration(request, options)

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

Updates select fields of aRegistration resource, notablylabels. To update other fields, use the appropriate custom update method:

* To update management settings, seeConfigureManagementSettings * To update DNS configuration, seeConfigureDnsSettings * To update contact information, seeConfigureContactSettings

Parameters
NameDescription
requestIUpdateRegistrationRequest

The request object that will be sent.

optionsCallOptions

Call options. SeeCallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.domains.v1.IRegistration,protos.google.cloud.domains.v1.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. Itspromise() method returns a promise you canawait for. Please see thedocumentation 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 libraryconst{DomainsClient}=require('@google-cloud/domains').v1;// Instantiates a clientconstdomainsClient=newDomainsClient();asyncfunctioncallUpdateRegistration(){// Construct requestconstrequest={updateMask,};// Run requestconst[operation]=awaitdomainsClient.updateRegistration(request);const[response]=awaitoperation.promise();console.log(response);}callUpdateRegistration();

updateRegistration(request, options, callback)

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

updateRegistration(request, callback)

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

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.