-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(samples): add example tags to generated samples (#94)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 408439482 Source-Link: googleapis/googleapis@b9f6184 Source-Link: googleapis/googleapis-gen@eb888bc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9
- Loading branch information
1 parent
8ff61a4
commit d52d094
Showing
23 changed files
with
1,762 additions
and
583 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,5 @@ | |
"img.shields.io" | ||
], | ||
"silent": true, | ||
"concurrency": 10 | ||
"concurrency": 5 | ||
} |
60 changes: 60 additions & 0 deletions
60
...e-cloud-managedidentities/samples/generated/v1/managed_identities_service.attach_trust.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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)); |
77 changes: 77 additions & 0 deletions
77
...didentities/samples/generated/v1/managed_identities_service.create_microsoft_ad_domain.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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)); |
55 changes: 55 additions & 0 deletions
55
...-cloud-managedidentities/samples/generated/v1/managed_identities_service.delete_domain.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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)); |
60 changes: 60 additions & 0 deletions
60
...e-cloud-managedidentities/samples/generated/v1/managed_identities_service.detach_trust.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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)); |
54 changes: 54 additions & 0 deletions
54
...gle-cloud-managedidentities/samples/generated/v1/managed_identities_service.get_domain.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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)); |
Oops, something went wrong.