This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added library for Cloud Domains v1 API. Also added methods for …
…the transfer-in flow docs: improved API comments Added Cloud Domains v1 API. Also added support for transferring already registered domains from 3rd party domain registrars to Cloud Domains. PiperOrigin-RevId: 404189502 Source-Link: googleapis/googleapis@6990d97 Source-Link: googleapis/googleapis-gen@36bf228 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzZiZjIyOGFhNzAxNmQ3YjUxMzk5MGU4NGQ2Njc2MmE4ODlmMmYwOSJ9
- Loading branch information
1 parent
dd8cf7c
commit ce97a96
Showing
66 changed files
with
36,104 additions
and
6,484 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
74 changes: 74 additions & 0 deletions
74
samples/generated/v1/domains.configure_contact_settings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(registration, updateMask) { | ||
// [START domains_v1_generated_Domains_ConfigureContactSettings_async] | ||
/** | ||
* 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').v1; | ||
|
||
// Instantiates a client | ||
const domainsClient = new DomainsClient(); | ||
|
||
async function configureContactSettings() { | ||
// Construct request | ||
const request = { | ||
registration, | ||
updateMask, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await domainsClient.configureContactSettings(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
configureContactSettings(); | ||
// [END domains_v1_generated_Domains_ConfigureContactSettings_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(registration, updateMask) { | ||
// [START domains_v1_generated_Domains_ConfigureDnsSettings_async] | ||
/** | ||
* 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').v1; | ||
|
||
// Instantiates a client | ||
const domainsClient = new DomainsClient(); | ||
|
||
async function configureDnsSettings() { | ||
// Construct request | ||
const request = { | ||
registration, | ||
updateMask, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await domainsClient.configureDnsSettings(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
configureDnsSettings(); | ||
// [END domains_v1_generated_Domains_ConfigureDnsSettings_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
67 changes: 67 additions & 0 deletions
67
samples/generated/v1/domains.configure_management_settings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(registration, updateMask) { | ||
// [START domains_v1_generated_Domains_ConfigureManagementSettings_async] | ||
/** | ||
* 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').v1; | ||
|
||
// Instantiates a client | ||
const domainsClient = new DomainsClient(); | ||
|
||
async function configureManagementSettings() { | ||
// Construct request | ||
const request = { | ||
registration, | ||
updateMask, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await domainsClient.configureManagementSettings( | ||
request | ||
); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
configureManagementSettings(); | ||
// [END domains_v1_generated_Domains_ConfigureManagementSettings_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START domains_v1_generated_Domains_DeleteRegistration_async] | ||
/** | ||
* 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').v1; | ||
|
||
// Instantiates a client | ||
const domainsClient = new DomainsClient(); | ||
|
||
async function deleteRegistration() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await domainsClient.deleteRegistration(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
deleteRegistration(); | ||
// [END domains_v1_generated_Domains_DeleteRegistration_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START domains_v1_generated_Domains_ExportRegistration_async] | ||
/** | ||
* 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').v1; | ||
|
||
// Instantiates a client | ||
const domainsClient = new DomainsClient(); | ||
|
||
async function exportRegistration() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const [operation] = await domainsClient.exportRegistration(request); | ||
const [response] = await operation.promise(); | ||
console.log(response); | ||
} | ||
|
||
exportRegistration(); | ||
// [END domains_v1_generated_Domains_ExportRegistration_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
function main(name) { | ||
// [START domains_v1_generated_Domains_GetRegistration_async] | ||
/** | ||
* 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').v1; | ||
|
||
// Instantiates a client | ||
const domainsClient = new DomainsClient(); | ||
|
||
async function getRegistration() { | ||
// Construct request | ||
const request = { | ||
name, | ||
}; | ||
|
||
// Run request | ||
const response = await domainsClient.getRegistration(request); | ||
console.log(response); | ||
} | ||
|
||
getRegistration(); | ||
// [END domains_v1_generated_Domains_GetRegistration_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
Oops, something went wrong.