From d52d094a0f49bea00cccbba2fff25ef9fde333e6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:42:23 +0000 Subject: [PATCH] docs(samples): add example tags to generated samples (#94) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 --- .../linkinator.config.json | 2 +- ...managed_identities_service.attach_trust.js | 60 ++ ...ties_service.create_microsoft_ad_domain.js | 77 +++ ...anaged_identities_service.delete_domain.js | 55 ++ ...managed_identities_service.detach_trust.js | 60 ++ .../managed_identities_service.get_domain.js | 54 ++ ...managed_identities_service.list_domains.js | 82 +++ ...ed_identities_service.reconfigure_trust.js | 67 +++ ...identities_service.reset_admin_password.js | 54 ++ ...anaged_identities_service.update_domain.js | 65 ++ ...naged_identities_service.validate_trust.js | 60 ++ ...managed_identities_service.attach_trust.js | 57 ++ ...ties_service.create_microsoft_ad_domain.js | 72 +++ ...anaged_identities_service.delete_domain.js | 53 ++ ...managed_identities_service.detach_trust.js | 57 ++ .../managed_identities_service.get_domain.js | 52 ++ ...managed_identities_service.list_domains.js | 80 +++ ...ed_identities_service.reconfigure_trust.js | 63 ++ ...identities_service.reset_admin_password.js | 52 ++ ...anaged_identities_service.update_domain.js | 62 ++ ...naged_identities_service.validate_trust.js | 57 ++ .../v1/managed_identities_service_client.ts | 554 +++++++++--------- .../managed_identities_service_client.ts | 550 ++++++++--------- 23 files changed, 1762 insertions(+), 583 deletions(-) create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.attach_trust.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.create_microsoft_ad_domain.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.delete_domain.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.detach_trust.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.get_domain.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.list_domains.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.reconfigure_trust.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.reset_admin_password.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.update_domain.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.validate_trust.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.attach_trust.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.create_microsoft_ad_domain.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.delete_domain.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.detach_trust.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.get_domain.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.list_domains.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.reconfigure_trust.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.reset_admin_password.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.update_domain.js create mode 100644 packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.validate_trust.js diff --git a/packages/google-cloud-managedidentities/linkinator.config.json b/packages/google-cloud-managedidentities/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-managedidentities/linkinator.config.json +++ b/packages/google-cloud-managedidentities/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.attach_trust.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.attach_trust.js new file mode 100644 index 00000000000..580f7eaca54 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.attach_trust.js @@ -0,0 +1,60 @@ +// 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, trust) { + // [START managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + /** + * Required. The domain trust resource. + */ + // const trust = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callAttachTrust() { + // Construct request + const request = { + name, + trust, + }; + + // Run request + const [operation] = await managedidentitiesClient.attachTrust(request); + const [response] = await operation.promise(); + console.log(response); + } + + callAttachTrust(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.create_microsoft_ad_domain.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.create_microsoft_ad_domain.js new file mode 100644 index 00000000000..7690be02e18 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.create_microsoft_ad_domain.js @@ -0,0 +1,77 @@ +// 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(parent, domainName, domain) { + // [START managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource project name and location using the form: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Required. The fully qualified domain name. + * e.g. mydomain.myorganization.com, with the following restrictions: + * * Must contain only lowercase letters, numbers, periods and hyphens. + * * Must start with a letter. + * * Must contain between 2-64 characters. + * * Must end with a number or a letter. + * * Must not start with period. + * * First segement length (mydomain form example above) shouldn't exceed + * 15 chars. + * * The last segment cannot be fully numeric. + * * Must be unique within the customer project. + */ + // const domainName = 'abc123' + /** + * Required. A Managed Identity domain resource. + */ + // const domain = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callCreateMicrosoftAdDomain() { + // Construct request + const request = { + parent, + domainName, + domain, + }; + + // Run request + const [operation] = await managedidentitiesClient.createMicrosoftAdDomain( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateMicrosoftAdDomain(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.delete_domain.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.delete_domain.js new file mode 100644 index 00000000000..d8ba8a3be14 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.delete_domain.js @@ -0,0 +1,55 @@ +// 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 managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callDeleteDomain() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await managedidentitiesClient.deleteDomain(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDomain(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.detach_trust.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.detach_trust.js new file mode 100644 index 00000000000..28d27450793 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.detach_trust.js @@ -0,0 +1,60 @@ +// 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, trust) { + // [START managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + /** + * Required. The domain trust resource to removed. + */ + // const trust = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callDetachTrust() { + // Construct request + const request = { + name, + trust, + }; + + // Run request + const [operation] = await managedidentitiesClient.detachTrust(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDetachTrust(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.get_domain.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.get_domain.js new file mode 100644 index 00000000000..b5deb9c8852 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.get_domain.js @@ -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 managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callGetDomain() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await managedidentitiesClient.getDomain(request); + console.log(response); + } + + callGetDomain(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.list_domains.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.list_domains.js new file mode 100644 index 00000000000..f95bf544068 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.list_domains.js @@ -0,0 +1,82 @@ +// 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(parent) { + // [START managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the domain location using the form: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used. + * Regardless of the page_size value, the response may include a partial list. + * Callers should rely on a response's + * next_page_token google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token + * to determine if there are additional results to list. + */ + // const pageSize = 1234 + /** + * Optional. The `next_page_token` value returned from a previous ListDomainsRequest + * request, if any. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter specifying constraints of a list operation. + * For example, `Domain.fqdn="mydomain.myorginization"`. + */ + // const filter = 'abc123' + /** + * Optional. Specifies the ordering of results. See + * Sorting + * order (https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + */ + // const orderBy = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callListDomains() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await managedidentitiesClient.listDomainsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDomains(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.reconfigure_trust.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.reconfigure_trust.js new file mode 100644 index 00000000000..b25a8e261d4 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.reconfigure_trust.js @@ -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(name, targetDomainName, targetDnsIpAddresses) { + // [START managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + /** + * Required. The fully-qualified target domain name which will be in trust with current + * domain. + */ + // const targetDomainName = 'abc123' + /** + * Required. The target DNS server IP addresses to resolve the remote domain involved + * in the trust. + */ + // const targetDnsIpAddresses = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callReconfigureTrust() { + // Construct request + const request = { + name, + targetDomainName, + targetDnsIpAddresses, + }; + + // Run request + const [operation] = await managedidentitiesClient.reconfigureTrust(request); + const [response] = await operation.promise(); + console.log(response); + } + + callReconfigureTrust(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.reset_admin_password.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.reset_admin_password.js new file mode 100644 index 00000000000..735e30e29b5 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.reset_admin_password.js @@ -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 managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callResetAdminPassword() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await managedidentitiesClient.resetAdminPassword(request); + console.log(response); + } + + callResetAdminPassword(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.update_domain.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.update_domain.js new file mode 100644 index 00000000000..e28ef94ea48 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.update_domain.js @@ -0,0 +1,65 @@ +// 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(updateMask, domain) { + // [START managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include + * fields from Domain google.cloud.managedidentities.v1.Domain: + * * `labels` + * * `locations` + * * `authorized_networks` + */ + // const updateMask = {} + /** + * Required. Domain message with updated fields. Only supported fields specified in + * update_mask are updated. + */ + // const domain = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callUpdateDomain() { + // Construct request + const request = { + updateMask, + domain, + }; + + // Run request + const [operation] = await managedidentitiesClient.updateDomain(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDomain(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.validate_trust.js b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.validate_trust.js new file mode 100644 index 00000000000..9c32234ed19 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1/managed_identities_service.validate_trust.js @@ -0,0 +1,60 @@ +// 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, trust) { + // [START managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + /** + * Required. The domain trust to validate trust state for. + */ + // const trust = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callValidateTrust() { + // Construct request + const request = { + name, + trust, + }; + + // Run request + const [operation] = await managedidentitiesClient.validateTrust(request); + const [response] = await operation.promise(); + console.log(response); + } + + callValidateTrust(); + // [END managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.attach_trust.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.attach_trust.js new file mode 100644 index 00000000000..a6d233e032e --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.attach_trust.js @@ -0,0 +1,57 @@ +// 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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_AttachTrust_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + /** + * The domain trust resource. + */ + // const trust = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callAttachTrust() { + // Construct request + const request = {}; + + // Run request + const [operation] = await managedidentitiesClient.attachTrust(request); + const [response] = await operation.promise(); + console.log(response); + } + + callAttachTrust(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_AttachTrust_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.create_microsoft_ad_domain.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.create_microsoft_ad_domain.js new file mode 100644 index 00000000000..4a413e16d6c --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.create_microsoft_ad_domain.js @@ -0,0 +1,72 @@ +// 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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The resource project name and location using the form: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * A domain name, e.g. mydomain.myorg.com, with the following restrictions: + * * Must contain only lowercase letters, numbers, periods and hyphens. + * * Must start with a letter. + * * Must contain between 2-64 characters. + * * Must end with a number or a letter. + * * Must not start with period. + * * First segement length (mydomain form example above) shouldn't exceed + * 15 chars. + * * The last segment cannot be fully numeric. + * * Must be unique within the customer project. + */ + // const domainName = 'abc123' + /** + * A Managed Identity domain resource. + */ + // const domain = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callCreateMicrosoftAdDomain() { + // Construct request + const request = {}; + + // Run request + const [operation] = await managedidentitiesClient.createMicrosoftAdDomain( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateMicrosoftAdDomain(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.delete_domain.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.delete_domain.js new file mode 100644 index 00000000000..097c6b62f0e --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.delete_domain.js @@ -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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_DeleteDomain_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callDeleteDomain() { + // Construct request + const request = {}; + + // Run request + const [operation] = await managedidentitiesClient.deleteDomain(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDomain(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_DeleteDomain_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.detach_trust.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.detach_trust.js new file mode 100644 index 00000000000..2e9d1e08f20 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.detach_trust.js @@ -0,0 +1,57 @@ +// 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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_DetachTrust_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + /** + * The domain trust resource to removed. + */ + // const trust = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callDetachTrust() { + // Construct request + const request = {}; + + // Run request + const [operation] = await managedidentitiesClient.detachTrust(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDetachTrust(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_DetachTrust_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.get_domain.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.get_domain.js new file mode 100644 index 00000000000..d530668e38c --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.get_domain.js @@ -0,0 +1,52 @@ +// 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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_GetDomain_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callGetDomain() { + // Construct request + const request = {}; + + // Run request + const response = await managedidentitiesClient.getDomain(request); + console.log(response); + } + + callGetDomain(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_GetDomain_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.list_domains.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.list_domains.js new file mode 100644 index 00000000000..5f69ef97514 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.list_domains.js @@ -0,0 +1,80 @@ +// 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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_ListDomains_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the domain location using the form: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used. + * Regardless of the page_size value, the response may include a partial list. + * Callers should rely on a response's + * next_page_token google.cloud.managedidentities.v1beta1.ListDomainsResponse.next_page_token + * to determine if there are additional results to list. + */ + // const pageSize = 1234 + /** + * The `next_page_token` value returned from a previous ListDomainsRequest + * request, if any. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter specifying constraints of a list operation. + * For example, `Domain.fqdn="mydomain.myorginization"`. + */ + // const filter = 'abc123' + /** + * Optional. Specifies the ordering of results. See + * Sorting + * order (https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + */ + // const orderBy = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callListDomains() { + // Construct request + const request = {}; + + // Run request + const iterable = await managedidentitiesClient.listDomainsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDomains(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_ListDomains_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.reconfigure_trust.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.reconfigure_trust.js new file mode 100644 index 00000000000..6fae1518a44 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.reconfigure_trust.js @@ -0,0 +1,63 @@ +// 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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_ReconfigureTrust_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + /** + * The fully-qualified target domain name which will be in trust with current + * domain. + */ + // const targetDomainName = 'abc123' + /** + * The target DNS server IP addresses to resolve the remote domain involved + * in the trust. + */ + // const targetDnsIpAddresses = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callReconfigureTrust() { + // Construct request + const request = {}; + + // Run request + const [operation] = await managedidentitiesClient.reconfigureTrust(request); + const [response] = await operation.promise(); + console.log(response); + } + + callReconfigureTrust(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_ReconfigureTrust_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.reset_admin_password.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.reset_admin_password.js new file mode 100644 index 00000000000..7981b3e36ff --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.reset_admin_password.js @@ -0,0 +1,52 @@ +// 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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_ResetAdminPassword_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callResetAdminPassword() { + // Construct request + const request = {}; + + // Run request + const response = await managedidentitiesClient.resetAdminPassword(request); + console.log(response); + } + + callResetAdminPassword(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_ResetAdminPassword_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.update_domain.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.update_domain.js new file mode 100644 index 00000000000..5176d1ca32a --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.update_domain.js @@ -0,0 +1,62 @@ +// 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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_UpdateDomain_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include + * fields from Domain google.cloud.managedidentities.v1beta1.Domain: + * * `labels` + * * `locations` + * * `authorized_networks` + */ + // const updateMask = {} + /** + * Domain message with updated fields. Only supported fields specified in + * update_mask are updated. + */ + // const domain = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callUpdateDomain() { + // Construct request + const request = {}; + + // Run request + const [operation] = await managedidentitiesClient.updateDomain(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDomain(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_UpdateDomain_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.validate_trust.js b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.validate_trust.js new file mode 100644 index 00000000000..b287e2a53d1 --- /dev/null +++ b/packages/google-cloud-managedidentities/samples/generated/v1beta1/managed_identities_service.validate_trust.js @@ -0,0 +1,57 @@ +// 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() { + // [START managedidentities_v1beta1_generated_ManagedIdentitiesService_ValidateTrust_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + */ + // const name = 'abc123' + /** + * The domain trust to validate trust state for. + */ + // const trust = {} + + // Imports the Managedidentities library + const {ManagedIdentitiesServiceClient} = + require('@google-cloud/managed-identities').v1beta1; + + // Instantiates a client + const managedidentitiesClient = new ManagedIdentitiesServiceClient(); + + async function callValidateTrust() { + // Construct request + const request = {}; + + // Run request + const [operation] = await managedidentitiesClient.validateTrust(request); + const [response] = await operation.promise(); + console.log(response); + } + + callValidateTrust(); + // [END managedidentities_v1beta1_generated_ManagedIdentitiesService_ValidateTrust_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedidentities/src/v1/managed_identities_service_client.ts b/packages/google-cloud-managedidentities/src/v1/managed_identities_service_client.ts index 7caf76c91a8..f82aa32ca08 100644 --- a/packages/google-cloud-managedidentities/src/v1/managed_identities_service_client.ts +++ b/packages/google-cloud-managedidentities/src/v1/managed_identities_service_client.ts @@ -463,6 +463,24 @@ export class ManagedIdentitiesServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Resets a domain's administrator password. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ResetAdminPasswordResponse]{@link google.cloud.managedidentities.v1.ResetAdminPasswordResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/managed_identities_service.reset_admin_password.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_async + */ resetAdminPassword( request?: protos.google.cloud.managedidentities.v1.IResetAdminPasswordRequest, options?: CallOptions @@ -497,24 +515,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Resets a domain's administrator password. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ResetAdminPasswordResponse]{@link google.cloud.managedidentities.v1.ResetAdminPasswordResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.resetAdminPassword(request); - */ resetAdminPassword( request?: protos.google.cloud.managedidentities.v1.IResetAdminPasswordRequest, optionsOrCallback?: @@ -561,6 +561,24 @@ export class ManagedIdentitiesServiceClient { this.initialize(); return this.innerApiCalls.resetAdminPassword(request, options, callback); } + /** + * Gets information about a domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Domain]{@link google.cloud.managedidentities.v1.Domain}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/managed_identities_service.get_domain.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_async + */ getDomain( request?: protos.google.cloud.managedidentities.v1.IGetDomainRequest, options?: CallOptions @@ -592,24 +610,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Gets information about a domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Domain]{@link google.cloud.managedidentities.v1.Domain}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getDomain(request); - */ getDomain( request?: protos.google.cloud.managedidentities.v1.IGetDomainRequest, optionsOrCallback?: @@ -654,6 +654,41 @@ export class ManagedIdentitiesServiceClient { return this.innerApiCalls.getDomain(request, options, callback); } + /** + * Creates a Microsoft AD domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource project name and location using the form: + * `projects/{project_id}/locations/global` + * @param {string} request.domainName + * Required. The fully qualified domain name. + * e.g. mydomain.myorganization.com, with the following restrictions: + * + * * Must contain only lowercase letters, numbers, periods and hyphens. + * * Must start with a letter. + * * Must contain between 2-64 characters. + * * Must end with a number or a letter. + * * Must not start with period. + * * First segement length (mydomain form example above) shouldn't exceed + * 15 chars. + * * The last segment cannot be fully numeric. + * * Must be unique within the customer project. + * @param {google.cloud.managedidentities.v1.Domain} request.domain + * Required. A Managed Identity domain resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/managed_identities_service.create_microsoft_ad_domain.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async + */ createMicrosoftAdDomain( request?: protos.google.cloud.managedidentities.v1.ICreateMicrosoftAdDomainRequest, options?: CallOptions @@ -690,42 +725,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Creates a Microsoft AD domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource project name and location using the form: - * `projects/{project_id}/locations/global` - * @param {string} request.domainName - * Required. The fully qualified domain name. - * e.g. mydomain.myorganization.com, with the following restrictions: - * - * * Must contain only lowercase letters, numbers, periods and hyphens. - * * Must start with a letter. - * * Must contain between 2-64 characters. - * * Must end with a number or a letter. - * * Must not start with period. - * * First segement length (mydomain form example above) shouldn't exceed - * 15 chars. - * * The last segment cannot be fully numeric. - * * Must be unique within the customer project. - * @param {google.cloud.managedidentities.v1.Domain} request.domain - * Required. A Managed Identity domain resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.createMicrosoftAdDomain(request); - * const [response] = await operation.promise(); - */ createMicrosoftAdDomain( request?: protos.google.cloud.managedidentities.v1.ICreateMicrosoftAdDomainRequest, optionsOrCallback?: @@ -787,11 +786,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateMicrosoftAdDomainProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/managed_identities_service.create_microsoft_ad_domain.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async */ async checkCreateMicrosoftAdDomainProgress( name: string @@ -815,6 +811,33 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1.OpMetadata >; } + /** + * Updates the metadata and configuration of a domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include + * fields from {@link google.cloud.managedidentities.v1.Domain|Domain}: + * * `labels` + * * `locations` + * * `authorized_networks` + * @param {google.cloud.managedidentities.v1.Domain} request.domain + * Required. Domain message with updated fields. Only supported fields specified in + * update_mask are updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/managed_identities_service.update_domain.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_async + */ updateDomain( request?: protos.google.cloud.managedidentities.v1.IUpdateDomainRequest, options?: CallOptions @@ -851,34 +874,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Updates the metadata and configuration of a domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include - * fields from {@link google.cloud.managedidentities.v1.Domain|Domain}: - * * `labels` - * * `locations` - * * `authorized_networks` - * @param {google.cloud.managedidentities.v1.Domain} request.domain - * Required. Domain message with updated fields. Only supported fields specified in - * update_mask are updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.updateDomain(request); - * const [response] = await operation.promise(); - */ updateDomain( request?: protos.google.cloud.managedidentities.v1.IUpdateDomainRequest, optionsOrCallback?: @@ -936,11 +931,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateDomainProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/managed_identities_service.update_domain.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_async */ async checkUpdateDomainProgress( name: string @@ -964,6 +956,26 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1.OpMetadata >; } + /** + * Deletes a domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/managed_identities_service.delete_domain.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_async + */ deleteDomain( request?: protos.google.cloud.managedidentities.v1.IDeleteDomainRequest, options?: CallOptions @@ -1000,27 +1012,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Deletes a domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteDomain(request); - * const [response] = await operation.promise(); - */ deleteDomain( request?: protos.google.cloud.managedidentities.v1.IDeleteDomainRequest, optionsOrCallback?: @@ -1078,11 +1069,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteDomainProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/managed_identities_service.delete_domain.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_async */ async checkDeleteDomainProgress( name: string @@ -1106,6 +1094,28 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1.OpMetadata >; } + /** + * Adds an AD trust to a domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {google.cloud.managedidentities.v1.Trust} request.trust + * Required. The domain trust resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/managed_identities_service.attach_trust.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_async + */ attachTrust( request?: protos.google.cloud.managedidentities.v1.IAttachTrustRequest, options?: CallOptions @@ -1142,29 +1152,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Adds an AD trust to a domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {google.cloud.managedidentities.v1.Trust} request.trust - * Required. The domain trust resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.attachTrust(request); - * const [response] = await operation.promise(); - */ attachTrust( request?: protos.google.cloud.managedidentities.v1.IAttachTrustRequest, optionsOrCallback?: @@ -1222,11 +1209,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkAttachTrustProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/managed_identities_service.attach_trust.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_async */ async checkAttachTrustProgress( name: string @@ -1250,6 +1234,32 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1.OpMetadata >; } + /** + * Updates the DNS conditional forwarder. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {string} request.targetDomainName + * Required. The fully-qualified target domain name which will be in trust with current + * domain. + * @param {string[]} request.targetDnsIpAddresses + * Required. The target DNS server IP addresses to resolve the remote domain involved + * in the trust. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/managed_identities_service.reconfigure_trust.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_async + */ reconfigureTrust( request?: protos.google.cloud.managedidentities.v1.IReconfigureTrustRequest, options?: CallOptions @@ -1286,33 +1296,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Updates the DNS conditional forwarder. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {string} request.targetDomainName - * Required. The fully-qualified target domain name which will be in trust with current - * domain. - * @param {string[]} request.targetDnsIpAddresses - * Required. The target DNS server IP addresses to resolve the remote domain involved - * in the trust. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.reconfigureTrust(request); - * const [response] = await operation.promise(); - */ reconfigureTrust( request?: protos.google.cloud.managedidentities.v1.IReconfigureTrustRequest, optionsOrCallback?: @@ -1370,11 +1353,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkReconfigureTrustProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/managed_identities_service.reconfigure_trust.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_async */ async checkReconfigureTrustProgress( name: string @@ -1398,6 +1378,28 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1.OpMetadata >; } + /** + * Removes an AD trust. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {google.cloud.managedidentities.v1.Trust} request.trust + * Required. The domain trust resource to removed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/managed_identities_service.detach_trust.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_async + */ detachTrust( request?: protos.google.cloud.managedidentities.v1.IDetachTrustRequest, options?: CallOptions @@ -1434,29 +1436,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Removes an AD trust. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {google.cloud.managedidentities.v1.Trust} request.trust - * Required. The domain trust resource to removed. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.detachTrust(request); - * const [response] = await operation.promise(); - */ detachTrust( request?: protos.google.cloud.managedidentities.v1.IDetachTrustRequest, optionsOrCallback?: @@ -1514,11 +1493,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDetachTrustProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/managed_identities_service.detach_trust.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_async */ async checkDetachTrustProgress( name: string @@ -1542,6 +1518,29 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1.OpMetadata >; } + /** + * Validates a trust state, that the target domain is reachable, and that the + * target domain is able to accept incoming trust requests. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {google.cloud.managedidentities.v1.Trust} request.trust + * Required. The domain trust to validate trust state for. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/managed_identities_service.validate_trust.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_async + */ validateTrust( request?: protos.google.cloud.managedidentities.v1.IValidateTrustRequest, options?: CallOptions @@ -1578,30 +1577,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Validates a trust state, that the target domain is reachable, and that the - * target domain is able to accept incoming trust requests. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {google.cloud.managedidentities.v1.Trust} request.trust - * Required. The domain trust to validate trust state for. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.validateTrust(request); - * const [response] = await operation.promise(); - */ validateTrust( request?: protos.google.cloud.managedidentities.v1.IValidateTrustRequest, optionsOrCallback?: @@ -1659,11 +1634,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkValidateTrustProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/managed_identities_service.validate_trust.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_async */ async checkValidateTrustProgress( name: string @@ -1687,37 +1659,6 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1.OpMetadata >; } - listDomains( - request?: protos.google.cloud.managedidentities.v1.IListDomainsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.managedidentities.v1.IDomain[], - protos.google.cloud.managedidentities.v1.IListDomainsRequest | null, - protos.google.cloud.managedidentities.v1.IListDomainsResponse - ] - >; - listDomains( - request: protos.google.cloud.managedidentities.v1.IListDomainsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.managedidentities.v1.IListDomainsRequest, - | protos.google.cloud.managedidentities.v1.IListDomainsResponse - | null - | undefined, - protos.google.cloud.managedidentities.v1.IDomain - > - ): void; - listDomains( - request: protos.google.cloud.managedidentities.v1.IListDomainsRequest, - callback: PaginationCallback< - protos.google.cloud.managedidentities.v1.IListDomainsRequest, - | protos.google.cloud.managedidentities.v1.IListDomainsResponse - | null - | undefined, - protos.google.cloud.managedidentities.v1.IDomain - > - ): void; /** * Lists domains in a project. * @@ -1757,6 +1698,37 @@ export class ManagedIdentitiesServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listDomains( + request?: protos.google.cloud.managedidentities.v1.IListDomainsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedidentities.v1.IDomain[], + protos.google.cloud.managedidentities.v1.IListDomainsRequest | null, + protos.google.cloud.managedidentities.v1.IListDomainsResponse + ] + >; + listDomains( + request: protos.google.cloud.managedidentities.v1.IListDomainsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.managedidentities.v1.IListDomainsRequest, + | protos.google.cloud.managedidentities.v1.IListDomainsResponse + | null + | undefined, + protos.google.cloud.managedidentities.v1.IDomain + > + ): void; + listDomains( + request: protos.google.cloud.managedidentities.v1.IListDomainsRequest, + callback: PaginationCallback< + protos.google.cloud.managedidentities.v1.IListDomainsRequest, + | protos.google.cloud.managedidentities.v1.IListDomainsResponse + | null + | undefined, + protos.google.cloud.managedidentities.v1.IDomain + > + ): void; listDomains( request?: protos.google.cloud.managedidentities.v1.IListDomainsRequest, optionsOrCallback?: @@ -1850,7 +1822,8 @@ export class ManagedIdentitiesServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDomains']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDomains.createStream( this.innerApiCalls.listDomains as gax.GaxCall, @@ -1896,11 +1869,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listDomainsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/managed_identities_service.list_domains.js + * region_tag:managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_async */ listDomainsAsync( request?: protos.google.cloud.managedidentities.v1.IListDomainsRequest, @@ -1914,8 +1884,8 @@ export class ManagedIdentitiesServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDomains']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDomains.asyncIterate( this.innerApiCalls['listDomains'] as GaxCall, diff --git a/packages/google-cloud-managedidentities/src/v1beta1/managed_identities_service_client.ts b/packages/google-cloud-managedidentities/src/v1beta1/managed_identities_service_client.ts index acf16e24d0e..4970b64bea8 100644 --- a/packages/google-cloud-managedidentities/src/v1beta1/managed_identities_service_client.ts +++ b/packages/google-cloud-managedidentities/src/v1beta1/managed_identities_service_client.ts @@ -415,6 +415,24 @@ export class ManagedIdentitiesServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Resets a domain's administrator password. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ResetAdminPasswordResponse]{@link google.cloud.managedidentities.v1beta1.ResetAdminPasswordResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/managed_identities_service.reset_admin_password.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_ResetAdminPassword_async + */ resetAdminPassword( request?: protos.google.cloud.managedidentities.v1beta1.IResetAdminPasswordRequest, options?: CallOptions @@ -449,24 +467,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Resets a domain's administrator password. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ResetAdminPasswordResponse]{@link google.cloud.managedidentities.v1beta1.ResetAdminPasswordResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.resetAdminPassword(request); - */ resetAdminPassword( request?: protos.google.cloud.managedidentities.v1beta1.IResetAdminPasswordRequest, optionsOrCallback?: @@ -513,6 +513,24 @@ export class ManagedIdentitiesServiceClient { this.initialize(); return this.innerApiCalls.resetAdminPassword(request, options, callback); } + /** + * Gets information about a domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Domain]{@link google.cloud.managedidentities.v1beta1.Domain}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/managed_identities_service.get_domain.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_GetDomain_async + */ getDomain( request?: protos.google.cloud.managedidentities.v1beta1.IGetDomainRequest, options?: CallOptions @@ -547,24 +565,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Gets information about a domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Domain]{@link google.cloud.managedidentities.v1beta1.Domain}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getDomain(request); - */ getDomain( request?: protos.google.cloud.managedidentities.v1beta1.IGetDomainRequest, optionsOrCallback?: @@ -612,6 +612,39 @@ export class ManagedIdentitiesServiceClient { return this.innerApiCalls.getDomain(request, options, callback); } + /** + * Creates a Microsoft AD domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The resource project name and location using the form: + * `projects/{project_id}/locations/global` + * @param {string} request.domainName + * A domain name, e.g. mydomain.myorg.com, with the following restrictions: + * * Must contain only lowercase letters, numbers, periods and hyphens. + * * Must start with a letter. + * * Must contain between 2-64 characters. + * * Must end with a number or a letter. + * * Must not start with period. + * * First segement length (mydomain form example above) shouldn't exceed + * 15 chars. + * * The last segment cannot be fully numeric. + * * Must be unique within the customer project. + * @param {google.cloud.managedidentities.v1beta1.Domain} request.domain + * A Managed Identity domain resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/managed_identities_service.create_microsoft_ad_domain.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async + */ createMicrosoftAdDomain( request?: protos.google.cloud.managedidentities.v1beta1.ICreateMicrosoftAdDomainRequest, options?: CallOptions @@ -648,40 +681,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Creates a Microsoft AD domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The resource project name and location using the form: - * `projects/{project_id}/locations/global` - * @param {string} request.domainName - * A domain name, e.g. mydomain.myorg.com, with the following restrictions: - * * Must contain only lowercase letters, numbers, periods and hyphens. - * * Must start with a letter. - * * Must contain between 2-64 characters. - * * Must end with a number or a letter. - * * Must not start with period. - * * First segement length (mydomain form example above) shouldn't exceed - * 15 chars. - * * The last segment cannot be fully numeric. - * * Must be unique within the customer project. - * @param {google.cloud.managedidentities.v1beta1.Domain} request.domain - * A Managed Identity domain resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.createMicrosoftAdDomain(request); - * const [response] = await operation.promise(); - */ createMicrosoftAdDomain( request?: protos.google.cloud.managedidentities.v1beta1.ICreateMicrosoftAdDomainRequest, optionsOrCallback?: @@ -743,11 +742,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateMicrosoftAdDomainProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/managed_identities_service.create_microsoft_ad_domain.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async */ async checkCreateMicrosoftAdDomainProgress( name: string @@ -771,6 +767,33 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1beta1.OpMetadata >; } + /** + * Updates the metadata and configuration of a domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include + * fields from {@link google.cloud.managedidentities.v1beta1.Domain|Domain}: + * * `labels` + * * `locations` + * * `authorized_networks` + * @param {google.cloud.managedidentities.v1beta1.Domain} request.domain + * Domain message with updated fields. Only supported fields specified in + * update_mask are updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/managed_identities_service.update_domain.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_UpdateDomain_async + */ updateDomain( request?: protos.google.cloud.managedidentities.v1beta1.IUpdateDomainRequest, options?: CallOptions @@ -807,34 +830,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Updates the metadata and configuration of a domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include - * fields from {@link google.cloud.managedidentities.v1beta1.Domain|Domain}: - * * `labels` - * * `locations` - * * `authorized_networks` - * @param {google.cloud.managedidentities.v1beta1.Domain} request.domain - * Domain message with updated fields. Only supported fields specified in - * update_mask are updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.updateDomain(request); - * const [response] = await operation.promise(); - */ updateDomain( request?: protos.google.cloud.managedidentities.v1beta1.IUpdateDomainRequest, optionsOrCallback?: @@ -892,11 +887,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateDomainProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/managed_identities_service.update_domain.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_UpdateDomain_async */ async checkUpdateDomainProgress( name: string @@ -920,6 +912,26 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1beta1.OpMetadata >; } + /** + * Deletes a domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/managed_identities_service.delete_domain.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_DeleteDomain_async + */ deleteDomain( request?: protos.google.cloud.managedidentities.v1beta1.IDeleteDomainRequest, options?: CallOptions @@ -956,27 +968,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Deletes a domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteDomain(request); - * const [response] = await operation.promise(); - */ deleteDomain( request?: protos.google.cloud.managedidentities.v1beta1.IDeleteDomainRequest, optionsOrCallback?: @@ -1034,11 +1025,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteDomainProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/managed_identities_service.delete_domain.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_DeleteDomain_async */ async checkDeleteDomainProgress( name: string @@ -1062,6 +1050,28 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1beta1.OpMetadata >; } + /** + * Adds an AD trust to a domain. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {google.cloud.managedidentities.v1beta1.Trust} request.trust + * The domain trust resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/managed_identities_service.attach_trust.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_AttachTrust_async + */ attachTrust( request?: protos.google.cloud.managedidentities.v1beta1.IAttachTrustRequest, options?: CallOptions @@ -1098,29 +1108,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Adds an AD trust to a domain. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {google.cloud.managedidentities.v1beta1.Trust} request.trust - * The domain trust resource. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.attachTrust(request); - * const [response] = await operation.promise(); - */ attachTrust( request?: protos.google.cloud.managedidentities.v1beta1.IAttachTrustRequest, optionsOrCallback?: @@ -1178,11 +1165,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkAttachTrustProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/managed_identities_service.attach_trust.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_AttachTrust_async */ async checkAttachTrustProgress( name: string @@ -1206,6 +1190,32 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1beta1.OpMetadata >; } + /** + * Updates the DNS conditional forwarder. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {string} request.targetDomainName + * The fully-qualified target domain name which will be in trust with current + * domain. + * @param {string[]} request.targetDnsIpAddresses + * The target DNS server IP addresses to resolve the remote domain involved + * in the trust. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/managed_identities_service.reconfigure_trust.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_ReconfigureTrust_async + */ reconfigureTrust( request?: protos.google.cloud.managedidentities.v1beta1.IReconfigureTrustRequest, options?: CallOptions @@ -1242,33 +1252,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Updates the DNS conditional forwarder. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {string} request.targetDomainName - * The fully-qualified target domain name which will be in trust with current - * domain. - * @param {string[]} request.targetDnsIpAddresses - * The target DNS server IP addresses to resolve the remote domain involved - * in the trust. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.reconfigureTrust(request); - * const [response] = await operation.promise(); - */ reconfigureTrust( request?: protos.google.cloud.managedidentities.v1beta1.IReconfigureTrustRequest, optionsOrCallback?: @@ -1326,11 +1309,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkReconfigureTrustProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/managed_identities_service.reconfigure_trust.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_ReconfigureTrust_async */ async checkReconfigureTrustProgress( name: string @@ -1354,6 +1334,28 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1beta1.OpMetadata >; } + /** + * Removes an AD trust. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {google.cloud.managedidentities.v1beta1.Trust} request.trust + * The domain trust resource to removed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/managed_identities_service.detach_trust.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_DetachTrust_async + */ detachTrust( request?: protos.google.cloud.managedidentities.v1beta1.IDetachTrustRequest, options?: CallOptions @@ -1390,29 +1392,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Removes an AD trust. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {google.cloud.managedidentities.v1beta1.Trust} request.trust - * The domain trust resource to removed. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.detachTrust(request); - * const [response] = await operation.promise(); - */ detachTrust( request?: protos.google.cloud.managedidentities.v1beta1.IDetachTrustRequest, optionsOrCallback?: @@ -1470,11 +1449,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDetachTrustProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/managed_identities_service.detach_trust.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_DetachTrust_async */ async checkDetachTrustProgress( name: string @@ -1498,6 +1474,29 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1beta1.OpMetadata >; } + /** + * Validates a trust state, that the target domain is reachable, and that the + * target domain is able to accept incoming trust requests. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {google.cloud.managedidentities.v1beta1.Trust} request.trust + * The domain trust to validate trust state for. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/managed_identities_service.validate_trust.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_ValidateTrust_async + */ validateTrust( request?: protos.google.cloud.managedidentities.v1beta1.IValidateTrustRequest, options?: CallOptions @@ -1534,30 +1533,6 @@ export class ManagedIdentitiesServiceClient { {} | null | undefined > ): void; - /** - * Validates a trust state, that the target domain is reachable, and that the - * target domain is able to accept incoming trust requests. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @param {google.cloud.managedidentities.v1beta1.Trust} request.trust - * The domain trust to validate trust state for. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.validateTrust(request); - * const [response] = await operation.promise(); - */ validateTrust( request?: protos.google.cloud.managedidentities.v1beta1.IValidateTrustRequest, optionsOrCallback?: @@ -1615,11 +1590,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkValidateTrustProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/managed_identities_service.validate_trust.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_ValidateTrust_async */ async checkValidateTrustProgress( name: string @@ -1643,37 +1615,6 @@ export class ManagedIdentitiesServiceClient { protos.google.cloud.managedidentities.v1beta1.OpMetadata >; } - listDomains( - request?: protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.managedidentities.v1beta1.IDomain[], - protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest | null, - protos.google.cloud.managedidentities.v1beta1.IListDomainsResponse - ] - >; - listDomains( - request: protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, - | protos.google.cloud.managedidentities.v1beta1.IListDomainsResponse - | null - | undefined, - protos.google.cloud.managedidentities.v1beta1.IDomain - > - ): void; - listDomains( - request: protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, - callback: PaginationCallback< - protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, - | protos.google.cloud.managedidentities.v1beta1.IListDomainsResponse - | null - | undefined, - protos.google.cloud.managedidentities.v1beta1.IDomain - > - ): void; /** * Lists domains in a project. * @@ -1713,6 +1654,37 @@ export class ManagedIdentitiesServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listDomains( + request?: protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.managedidentities.v1beta1.IDomain[], + protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest | null, + protos.google.cloud.managedidentities.v1beta1.IListDomainsResponse + ] + >; + listDomains( + request: protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, + | protos.google.cloud.managedidentities.v1beta1.IListDomainsResponse + | null + | undefined, + protos.google.cloud.managedidentities.v1beta1.IDomain + > + ): void; + listDomains( + request: protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, + callback: PaginationCallback< + protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, + | protos.google.cloud.managedidentities.v1beta1.IListDomainsResponse + | null + | undefined, + protos.google.cloud.managedidentities.v1beta1.IDomain + > + ): void; listDomains( request?: protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, optionsOrCallback?: @@ -1806,7 +1778,8 @@ export class ManagedIdentitiesServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDomains']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDomains.createStream( this.innerApiCalls.listDomains as gax.GaxCall, @@ -1852,11 +1825,8 @@ export class ManagedIdentitiesServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listDomainsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/managed_identities_service.list_domains.js + * region_tag:managedidentities_v1beta1_generated_ManagedIdentitiesService_ListDomains_async */ listDomainsAsync( request?: protos.google.cloud.managedidentities.v1beta1.IListDomainsRequest, @@ -1870,8 +1840,8 @@ export class ManagedIdentitiesServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listDomains']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listDomains.asyncIterate( this.innerApiCalls['listDomains'] as GaxCall,