Skip to content

Commit e59e47c

Browse files
fix(publicca): update the API
1 parent 79290f9 commit e59e47c

File tree

3 files changed

+174
-0
lines changed

3 files changed

+174
-0
lines changed

src/apis/publicca/v1.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,64 @@ export namespace publicca_v1 {
169169

170170
/**
171171
* Creates a new ExternalAccountKey bound to the project.
172+
* @example
173+
* ```js
174+
* // Before running the sample:
175+
* // - Enable the API at:
176+
* // https://console.developers.google.com/apis/api/publicca.googleapis.com
177+
* // - Login into gcloud by running:
178+
* // ```sh
179+
* // $ gcloud auth application-default login
180+
* // ```
181+
* // - Install the npm module by running:
182+
* // ```sh
183+
* // $ npm install googleapis
184+
* // ```
185+
*
186+
* const {google} = require('googleapis');
187+
* const publicca = google.publicca('v1');
188+
*
189+
* async function main() {
190+
* const auth = new google.auth.GoogleAuth({
191+
* // Scopes can be specified either as an array or as a single, space-delimited string.
192+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
193+
* });
194+
*
195+
* // Acquire an auth client, and bind it to all future calls
196+
* const authClient = await auth.getClient();
197+
* google.options({auth: authClient});
198+
*
199+
* // Do the magic
200+
* const res = await publicca.projects.locations.externalAccountKeys.create({
201+
* // Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported.
202+
* parent: 'projects/my-project/locations/my-location',
203+
*
204+
* // Request body metadata
205+
* requestBody: {
206+
* // request body parameters
207+
* // {
208+
* // "b64MacKey": "my_b64MacKey",
209+
* // "keyId": "my_keyId",
210+
* // "name": "my_name"
211+
* // }
212+
* },
213+
* });
214+
* console.log(res.data);
215+
*
216+
* // Example response
217+
* // {
218+
* // "b64MacKey": "my_b64MacKey",
219+
* // "keyId": "my_keyId",
220+
* // "name": "my_name"
221+
* // }
222+
* }
223+
*
224+
* main().catch(e => {
225+
* console.error(e);
226+
* throw e;
227+
* });
228+
*
229+
* ```
172230
*
173231
* @param params - Parameters for request
174232
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

src/apis/publicca/v1alpha1.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,64 @@ export namespace publicca_v1alpha1 {
169169

170170
/**
171171
* Creates a new ExternalAccountKey bound to the project.
172+
* @example
173+
* ```js
174+
* // Before running the sample:
175+
* // - Enable the API at:
176+
* // https://console.developers.google.com/apis/api/publicca.googleapis.com
177+
* // - Login into gcloud by running:
178+
* // ```sh
179+
* // $ gcloud auth application-default login
180+
* // ```
181+
* // - Install the npm module by running:
182+
* // ```sh
183+
* // $ npm install googleapis
184+
* // ```
185+
*
186+
* const {google} = require('googleapis');
187+
* const publicca = google.publicca('v1alpha1');
188+
*
189+
* async function main() {
190+
* const auth = new google.auth.GoogleAuth({
191+
* // Scopes can be specified either as an array or as a single, space-delimited string.
192+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
193+
* });
194+
*
195+
* // Acquire an auth client, and bind it to all future calls
196+
* const authClient = await auth.getClient();
197+
* google.options({auth: authClient});
198+
*
199+
* // Do the magic
200+
* const res = await publicca.projects.locations.externalAccountKeys.create({
201+
* // Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported.
202+
* parent: 'projects/my-project/locations/my-location',
203+
*
204+
* // Request body metadata
205+
* requestBody: {
206+
* // request body parameters
207+
* // {
208+
* // "b64MacKey": "my_b64MacKey",
209+
* // "keyId": "my_keyId",
210+
* // "name": "my_name"
211+
* // }
212+
* },
213+
* });
214+
* console.log(res.data);
215+
*
216+
* // Example response
217+
* // {
218+
* // "b64MacKey": "my_b64MacKey",
219+
* // "keyId": "my_keyId",
220+
* // "name": "my_name"
221+
* // }
222+
* }
223+
*
224+
* main().catch(e => {
225+
* console.error(e);
226+
* throw e;
227+
* });
228+
*
229+
* ```
172230
*
173231
* @param params - Parameters for request
174232
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

src/apis/publicca/v1beta1.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,64 @@ export namespace publicca_v1beta1 {
169169

170170
/**
171171
* Creates a new ExternalAccountKey bound to the project.
172+
* @example
173+
* ```js
174+
* // Before running the sample:
175+
* // - Enable the API at:
176+
* // https://console.developers.google.com/apis/api/publicca.googleapis.com
177+
* // - Login into gcloud by running:
178+
* // ```sh
179+
* // $ gcloud auth application-default login
180+
* // ```
181+
* // - Install the npm module by running:
182+
* // ```sh
183+
* // $ npm install googleapis
184+
* // ```
185+
*
186+
* const {google} = require('googleapis');
187+
* const publicca = google.publicca('v1beta1');
188+
*
189+
* async function main() {
190+
* const auth = new google.auth.GoogleAuth({
191+
* // Scopes can be specified either as an array or as a single, space-delimited string.
192+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
193+
* });
194+
*
195+
* // Acquire an auth client, and bind it to all future calls
196+
* const authClient = await auth.getClient();
197+
* google.options({auth: authClient});
198+
*
199+
* // Do the magic
200+
* const res = await publicca.projects.locations.externalAccountKeys.create({
201+
* // Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the "global" location is supported.
202+
* parent: 'projects/my-project/locations/my-location',
203+
*
204+
* // Request body metadata
205+
* requestBody: {
206+
* // request body parameters
207+
* // {
208+
* // "b64MacKey": "my_b64MacKey",
209+
* // "keyId": "my_keyId",
210+
* // "name": "my_name"
211+
* // }
212+
* },
213+
* });
214+
* console.log(res.data);
215+
*
216+
* // Example response
217+
* // {
218+
* // "b64MacKey": "my_b64MacKey",
219+
* // "keyId": "my_keyId",
220+
* // "name": "my_name"
221+
* // }
222+
* }
223+
*
224+
* main().catch(e => {
225+
* console.error(e);
226+
* throw e;
227+
* });
228+
*
229+
* ```
172230
*
173231
* @param params - Parameters for request
174232
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

0 commit comments

Comments
 (0)