Skip to content

Commit 4bd7252

Browse files
yoshi-automationsofisl
authored andcommitted
feat(iamcredentials): update the API
#### iamcredentials:v1 The following keys were added: - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.description - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.flatPath - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.httpMethod - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.id - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.parameterOrder - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.parameters.name.description - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.parameters.name.location - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.parameters.name.pattern - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.parameters.name.required - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.parameters.name.type - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.path - resources.projects.resources.serviceAccounts.methods.getAllowedLocations.response.$ref - schemas.ServiceAccountAllowedLocations.description - schemas.ServiceAccountAllowedLocations.id - schemas.ServiceAccountAllowedLocations.properties.encodedLocations.description - schemas.ServiceAccountAllowedLocations.properties.encodedLocations.readOnly - schemas.ServiceAccountAllowedLocations.properties.encodedLocations.type - schemas.ServiceAccountAllowedLocations.properties.locations.description - schemas.ServiceAccountAllowedLocations.properties.locations.items.type - schemas.ServiceAccountAllowedLocations.properties.locations.readOnly - schemas.ServiceAccountAllowedLocations.properties.locations.type - schemas.ServiceAccountAllowedLocations.type
1 parent a50a288 commit 4bd7252

File tree

2 files changed

+162
-1
lines changed

2 files changed

+162
-1
lines changed

‎discovery/iamcredentials-v1.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,28 @@
165165
"https://www.googleapis.com/auth/cloud-platform"
166166
]
167167
},
168+
"getAllowedLocations": {
169+
"description": "Returns the trust boundary info for a given service account.",
170+
"flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/allowedLocations",
171+
"httpMethod": "GET",
172+
"id": "iamcredentials.projects.serviceAccounts.getAllowedLocations",
173+
"parameterOrder": [
174+
"name"
175+
],
176+
"parameters": {
177+
"name": {
178+
"description": "Required. Resource name of service account.",
179+
"location": "path",
180+
"pattern": "^projects/[^/]+/serviceAccounts/[^/]+$",
181+
"required": true,
182+
"type": "string"
183+
}
184+
},
185+
"path": "v1/{+name}/allowedLocations",
186+
"response": {
187+
"$ref": "ServiceAccountAllowedLocations"
188+
}
189+
},
168190
"signBlob": {
169191
"description": "Signs a blob using a service account's system-managed private key.",
170192
"flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob",
@@ -226,7 +248,7 @@
226248
}
227249
}
228250
},
229-
"revision": "20240227",
251+
"revision": "20241024",
230252
"rootUrl": "https://iamcredentials.googleapis.com/",
231253
"schemas": {
232254
"GenerateAccessTokenRequest": {
@@ -300,6 +322,26 @@
300322
},
301323
"type": "object"
302324
},
325+
"ServiceAccountAllowedLocations": {
326+
"description": "Represents a list of allowed locations for given service account.",
327+
"id": "ServiceAccountAllowedLocations",
328+
"properties": {
329+
"encodedLocations": {
330+
"description": "Output only. The hex encoded bitmap of the trust boundary locations",
331+
"readOnly": true,
332+
"type": "string"
333+
},
334+
"locations": {
335+
"description": "Output only. The human readable trust boundary locations. For example, [\"us-central1\", \"europe-west1\"]",
336+
"items": {
337+
"type": "string"
338+
},
339+
"readOnly": true,
340+
"type": "array"
341+
}
342+
},
343+
"type": "object"
344+
},
303345
"SignBlobRequest": {
304346
"id": "SignBlobRequest",
305347
"properties": {

‎src/apis/iamcredentials/v1.ts

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,19 @@ export namespace iamcredentials_v1 {
168168
*/
169169
token?: string | null;
170170
}
171+
/**
172+
* Represents a list of allowed locations for given service account.
173+
*/
174+
export interface Schema$ServiceAccountAllowedLocations {
175+
/**
176+
* Output only. The hex encoded bitmap of the trust boundary locations
177+
*/
178+
encodedLocations?: string | null;
179+
/**
180+
* Output only. The human readable trust boundary locations. For example, ["us-central1", "europe-west1"]
181+
*/
182+
locations?: string[] | null;
183+
}
171184
export interface Schema$SignBlobRequest {
172185
/**
173186
* The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID\}`. The `-` wildcard character is required; replacing it with a project ID is invalid.
@@ -419,6 +432,105 @@ export namespace iamcredentials_v1 {
419432
}
420433
}
421434

435+
/**
436+
* Returns the trust boundary info for a given service account.
437+
*
438+
* @param params - Parameters for request
439+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
440+
* @param callback - Optional callback that handles the response.
441+
* @returns A promise if used with async/await, or void if used with a callback.
442+
*/
443+
getAllowedLocations(
444+
params: Params$Resource$Projects$Serviceaccounts$Getallowedlocations,
445+
options: StreamMethodOptions
446+
): GaxiosPromise<Readable>;
447+
getAllowedLocations(
448+
params?: Params$Resource$Projects$Serviceaccounts$Getallowedlocations,
449+
options?: MethodOptions
450+
): GaxiosPromise<Schema$ServiceAccountAllowedLocations>;
451+
getAllowedLocations(
452+
params: Params$Resource$Projects$Serviceaccounts$Getallowedlocations,
453+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
454+
callback: BodyResponseCallback<Readable>
455+
): void;
456+
getAllowedLocations(
457+
params: Params$Resource$Projects$Serviceaccounts$Getallowedlocations,
458+
options:
459+
| MethodOptions
460+
| BodyResponseCallback<Schema$ServiceAccountAllowedLocations>,
461+
callback: BodyResponseCallback<Schema$ServiceAccountAllowedLocations>
462+
): void;
463+
getAllowedLocations(
464+
params: Params$Resource$Projects$Serviceaccounts$Getallowedlocations,
465+
callback: BodyResponseCallback<Schema$ServiceAccountAllowedLocations>
466+
): void;
467+
getAllowedLocations(
468+
callback: BodyResponseCallback<Schema$ServiceAccountAllowedLocations>
469+
): void;
470+
getAllowedLocations(
471+
paramsOrCallback?:
472+
| Params$Resource$Projects$Serviceaccounts$Getallowedlocations
473+
| BodyResponseCallback<Schema$ServiceAccountAllowedLocations>
474+
| BodyResponseCallback<Readable>,
475+
optionsOrCallback?:
476+
| MethodOptions
477+
| StreamMethodOptions
478+
| BodyResponseCallback<Schema$ServiceAccountAllowedLocations>
479+
| BodyResponseCallback<Readable>,
480+
callback?:
481+
| BodyResponseCallback<Schema$ServiceAccountAllowedLocations>
482+
| BodyResponseCallback<Readable>
483+
):
484+
| void
485+
| GaxiosPromise<Schema$ServiceAccountAllowedLocations>
486+
| GaxiosPromise<Readable> {
487+
let params = (paramsOrCallback ||
488+
{}) as Params$Resource$Projects$Serviceaccounts$Getallowedlocations;
489+
let options = (optionsOrCallback || {}) as MethodOptions;
490+
491+
if (typeof paramsOrCallback === 'function') {
492+
callback = paramsOrCallback;
493+
params =
494+
{} as Params$Resource$Projects$Serviceaccounts$Getallowedlocations;
495+
options = {};
496+
}
497+
498+
if (typeof optionsOrCallback === 'function') {
499+
callback = optionsOrCallback;
500+
options = {};
501+
}
502+
503+
const rootUrl =
504+
options.rootUrl || 'https://iamcredentials.googleapis.com/';
505+
const parameters = {
506+
options: Object.assign(
507+
{
508+
url: (rootUrl + '/v1/{+name}/allowedLocations').replace(
509+
/([^:]\/)\/+/g,
510+
'$1'
511+
),
512+
method: 'GET',
513+
apiVersion: '',
514+
},
515+
options
516+
),
517+
params,
518+
requiredParams: ['name'],
519+
pathParams: ['name'],
520+
context: this.context,
521+
};
522+
if (callback) {
523+
createAPIRequest<Schema$ServiceAccountAllowedLocations>(
524+
parameters,
525+
callback as BodyResponseCallback<unknown>
526+
);
527+
} else {
528+
return createAPIRequest<Schema$ServiceAccountAllowedLocations>(
529+
parameters
530+
);
531+
}
532+
}
533+
422534
/**
423535
* Signs a blob using a service account's system-managed private key.
424536
*
@@ -622,6 +734,13 @@ export namespace iamcredentials_v1 {
622734
*/
623735
requestBody?: Schema$GenerateIdTokenRequest;
624736
}
737+
export interface Params$Resource$Projects$Serviceaccounts$Getallowedlocations
738+
extends StandardParameters {
739+
/**
740+
* Required. Resource name of service account.
741+
*/
742+
name?: string;
743+
}
625744
export interface Params$Resource$Projects$Serviceaccounts$Signblob
626745
extends StandardParameters {
627746
/**

0 commit comments

Comments
 (0)