@googleapis/sts 15.1.1 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1.ts CHANGED
@@ -112,6 +112,8 @@ export namespace sts_v1 {
112
112
  */
113
113
  export class Sts {
114
114
  context: APIRequestContext;
115
+ organizations: Resource$Organizations;
116
+ projects: Resource$Projects;
115
117
  v1: Resource$V1;
116
118
 
117
119
  constructor(options: GlobalOptions, google?: GoogleConfigurable) {
@@ -120,6 +122,8 @@ export namespace sts_v1 {
120
122
  google,
121
123
  };
122
124
 
125
+ this.organizations = new Resource$Organizations(this.context);
126
+ this.projects = new Resource$Projects(this.context);
123
127
  this.v1 = new Resource$V1(this.context);
124
128
  }
125
129
  }
@@ -264,6 +268,77 @@ export namespace sts_v1 {
264
268
  */
265
269
  token_type?: string | null;
266
270
  }
271
+ /**
272
+ * A JSON web key set (JWK) See also https://datatracker.ietf.org/doc/html/rfc7517 and https://github.com/spiffe/spiffe/blob/main/standards/JWT-SVID.md#6-representation-in-the-spiffe-bundle
273
+ */
274
+ export interface Schema$GoogleIdentityStsV1Jwk {
275
+ /**
276
+ * Algorithm intended for use with the key. Currently "RS256".
277
+ */
278
+ alg?: string | null;
279
+ /**
280
+ * Exponent value for kty="RSA".
281
+ */
282
+ e?: string | null;
283
+ /**
284
+ * Key ID.
285
+ */
286
+ kid?: string | null;
287
+ /**
288
+ * Key type. Currently "RSA".
289
+ */
290
+ kty?: string | null;
291
+ /**
292
+ * Modulus value for kty="RSA".
293
+ */
294
+ n?: string | null;
295
+ /**
296
+ * Public key use. Currently "sig".
297
+ */
298
+ use?: string | null;
299
+ }
300
+ /**
301
+ * Response message for GetJwks.
302
+ */
303
+ export interface Schema$GoogleIdentityStsV1Jwks {
304
+ /**
305
+ * The JWKS for this OP.
306
+ */
307
+ keys?: Schema$GoogleIdentityStsV1Jwk[];
308
+ }
309
+ /**
310
+ * Response message for GetOpenIdProviderConfig. Message fields are defined in https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse
311
+ */
312
+ export interface Schema$GoogleIdentityStsV1OpenIdProviderConfig {
313
+ /**
314
+ * URL pointing to an authorization endpoint under this issuer. Note: Currently this endpoint returns a 404.
315
+ */
316
+ authorization_endpoint?: string | null;
317
+ /**
318
+ * JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID token to encode the claims in a JWT [JWT]. Note: Currently always "["RS256"]".
319
+ */
320
+ id_token_signing_alg_values_supported?: string[] | null;
321
+ /**
322
+ * URL using the https scheme with no query or fragment components that the OP asserts as its issuer identifier.
323
+ */
324
+ issuer?: string | null;
325
+ /**
326
+ * URL of the OP's JWK Set [JWK] document, which MUST use the https scheme.
327
+ */
328
+ jwks_uri?: string | null;
329
+ /**
330
+ * JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Note: Currently always "["id_token"]".
331
+ */
332
+ response_types_supported?: string[] | null;
333
+ /**
334
+ * JSON array containing a list of the subject identifier types that this OP supports. Note: Currently always "["public"]".
335
+ */
336
+ subject_types_supported?: string[] | null;
337
+ /**
338
+ * URL pointing to a token endpoint under this issuer. Note: Currently this endpoint returns a 404.
339
+ */
340
+ token_endpoint?: string | null;
341
+ }
267
342
  /**
268
343
  * An `Options` object configures features that the Security Token Service supports, but that are not supported by standard OAuth 2.0 token exchange endpoints, as defined in https://tools.ietf.org/html/rfc8693.
269
344
  */
@@ -303,6 +378,733 @@ export namespace sts_v1 {
303
378
  title?: string | null;
304
379
  }
305
380
 
381
+ export class Resource$Organizations {
382
+ context: APIRequestContext;
383
+ locations: Resource$Organizations$Locations;
384
+ constructor(context: APIRequestContext) {
385
+ this.context = context;
386
+ this.locations = new Resource$Organizations$Locations(this.context);
387
+ }
388
+ }
389
+
390
+ export class Resource$Organizations$Locations {
391
+ context: APIRequestContext;
392
+ workloadIdentityPools: Resource$Organizations$Locations$Workloadidentitypools;
393
+ constructor(context: APIRequestContext) {
394
+ this.context = context;
395
+ this.workloadIdentityPools =
396
+ new Resource$Organizations$Locations$Workloadidentitypools(
397
+ this.context
398
+ );
399
+ }
400
+ }
401
+
402
+ export class Resource$Organizations$Locations$Workloadidentitypools {
403
+ context: APIRequestContext;
404
+ openid: Resource$Organizations$Locations$Workloadidentitypools$Openid;
405
+ wellKnown: Resource$Organizations$Locations$Workloadidentitypools$WellKnown;
406
+ constructor(context: APIRequestContext) {
407
+ this.context = context;
408
+ this.openid =
409
+ new Resource$Organizations$Locations$Workloadidentitypools$Openid(
410
+ this.context
411
+ );
412
+ this.wellKnown =
413
+ new Resource$Organizations$Locations$Workloadidentitypools$WellKnown(
414
+ this.context
415
+ );
416
+ }
417
+ }
418
+
419
+ export class Resource$Organizations$Locations$Workloadidentitypools$Openid {
420
+ context: APIRequestContext;
421
+ constructor(context: APIRequestContext) {
422
+ this.context = context;
423
+ }
424
+
425
+ /**
426
+ * Fetches the signing keys for an agentic or managed workload identity pool and returns them in JWKs format, defined in [RFC 7517](https://tools.ietf.org/html/rfc7517). For now, only agentic system pools are supported. **Preview** This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the [Service Specific Terms](https://cloud.google.com/terms/service-terms#1). Pre-GA features are available "as is" and might have limited support. For more information, see the [launch stage descriptions](https://cloud.google.com/products#product-launch-stages).
427
+ * @example
428
+ * ```js
429
+ * // Before running the sample:
430
+ * // - Enable the API at:
431
+ * // https://console.developers.google.com/apis/api/sts.googleapis.com
432
+ * // - Login into gcloud by running:
433
+ * // ```sh
434
+ * // $ gcloud auth application-default login
435
+ * // ```
436
+ * // - Install the npm module by running:
437
+ * // ```sh
438
+ * // $ npm install googleapis
439
+ * // ```
440
+ *
441
+ * const {google} = require('googleapis');
442
+ * const sts = google.sts('v1');
443
+ *
444
+ * async function main() {
445
+ * const auth = new google.auth.GoogleAuth({
446
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
447
+ * scopes: [],
448
+ * });
449
+ *
450
+ * // Acquire an auth client, and bind it to all future calls
451
+ * const authClient = await auth.getClient();
452
+ * google.options({auth: authClient});
453
+ *
454
+ * // Do the magic
455
+ * const res =
456
+ * await sts.organizations.locations.workloadIdentityPools.openid.getJwks({
457
+ * // Required. The name of the pool whose JWKS needs to be retrieved. Format: 'organizations/{ORGANIZATION_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' 'projects/{PROJECT_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' Example(s): 'organizations/1234/locations/global/workloadIdentityPools/agents.global.org-1234.system.id.goog' 'projects/12345678/locations/global/workloadIdentityPools/agents.global.proj-12345678.system.id.goog'
458
+ * name: 'organizations/my-organization/locations/my-location/workloadIdentityPools/my-workloadIdentityPool',
459
+ * });
460
+ * console.log(res.data);
461
+ *
462
+ * // Example response
463
+ * // {
464
+ * // "keys": []
465
+ * // }
466
+ * }
467
+ *
468
+ * main().catch(e => {
469
+ * console.error(e);
470
+ * throw e;
471
+ * });
472
+ *
473
+ * ```
474
+ *
475
+ * @param params - Parameters for request
476
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
477
+ * @param callback - Optional callback that handles the response.
478
+ * @returns A promise if used with async/await, or void if used with a callback.
479
+ */
480
+ getJwks(
481
+ params: Params$Resource$Organizations$Locations$Workloadidentitypools$Openid$Getjwks,
482
+ options: StreamMethodOptions
483
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
484
+ getJwks(
485
+ params?: Params$Resource$Organizations$Locations$Workloadidentitypools$Openid$Getjwks,
486
+ options?: MethodOptions
487
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIdentityStsV1Jwks>>;
488
+ getJwks(
489
+ params: Params$Resource$Organizations$Locations$Workloadidentitypools$Openid$Getjwks,
490
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
491
+ callback: BodyResponseCallback<Readable>
492
+ ): void;
493
+ getJwks(
494
+ params: Params$Resource$Organizations$Locations$Workloadidentitypools$Openid$Getjwks,
495
+ options:
496
+ MethodOptions | BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>,
497
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
498
+ ): void;
499
+ getJwks(
500
+ params: Params$Resource$Organizations$Locations$Workloadidentitypools$Openid$Getjwks,
501
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
502
+ ): void;
503
+ getJwks(
504
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
505
+ ): void;
506
+ getJwks(
507
+ paramsOrCallback?:
508
+ | Params$Resource$Organizations$Locations$Workloadidentitypools$Openid$Getjwks
509
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
510
+ | BodyResponseCallback<Readable>,
511
+ optionsOrCallback?:
512
+ | MethodOptions
513
+ | StreamMethodOptions
514
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
515
+ | BodyResponseCallback<Readable>,
516
+ callback?:
517
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
518
+ | BodyResponseCallback<Readable>
519
+ ):
520
+ | void
521
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleIdentityStsV1Jwks>>
522
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
523
+ let params = (paramsOrCallback ||
524
+ {}) as Params$Resource$Organizations$Locations$Workloadidentitypools$Openid$Getjwks;
525
+ let options = (optionsOrCallback || {}) as MethodOptions;
526
+
527
+ if (typeof paramsOrCallback === 'function') {
528
+ callback = paramsOrCallback;
529
+ params =
530
+ {} as Params$Resource$Organizations$Locations$Workloadidentitypools$Openid$Getjwks;
531
+ options = {};
532
+ }
533
+
534
+ if (typeof optionsOrCallback === 'function') {
535
+ callback = optionsOrCallback;
536
+ options = {};
537
+ }
538
+
539
+ const rootUrl = options.rootUrl || 'https://sts.googleapis.com/';
540
+ const parameters = {
541
+ options: Object.assign(
542
+ {
543
+ url: (rootUrl + '/v1/{+name}/openid/jwks').replace(
544
+ /([^:]\/)\/+/g,
545
+ '$1'
546
+ ),
547
+ method: 'GET',
548
+ apiVersion: '',
549
+ },
550
+ options
551
+ ),
552
+ params,
553
+ requiredParams: ['name'],
554
+ pathParams: ['name'],
555
+ context: this.context,
556
+ };
557
+ if (callback) {
558
+ createAPIRequest<Schema$GoogleIdentityStsV1Jwks>(
559
+ parameters,
560
+ callback as BodyResponseCallback<unknown>
561
+ );
562
+ } else {
563
+ return createAPIRequest<Schema$GoogleIdentityStsV1Jwks>(parameters);
564
+ }
565
+ }
566
+ }
567
+
568
+ export interface Params$Resource$Organizations$Locations$Workloadidentitypools$Openid$Getjwks extends StandardParameters {
569
+ /**
570
+ * Required. The name of the pool whose JWKS needs to be retrieved. Format: 'organizations/{ORGANIZATION_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' 'projects/{PROJECT_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' Example(s): 'organizations/1234/locations/global/workloadIdentityPools/agents.global.org-1234.system.id.goog' 'projects/12345678/locations/global/workloadIdentityPools/agents.global.proj-12345678.system.id.goog'
571
+ */
572
+ name?: string;
573
+ }
574
+
575
+ export class Resource$Organizations$Locations$Workloadidentitypools$WellKnown {
576
+ context: APIRequestContext;
577
+ constructor(context: APIRequestContext) {
578
+ this.context = context;
579
+ }
580
+
581
+ /**
582
+ * Gets the OIDC provider configuration for an agentic or managed workload identity pool following [the OIDC 1.0 discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse). For now, only agentic system pools are supported. **Preview** This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the [Service Specific Terms](https://cloud.google.com/terms/service-terms#1). Pre-GA features are available "as is" and might have limited support. For more information, see the [launch stage descriptions](https://cloud.google.com/products#product-launch-stages).
583
+ * @example
584
+ * ```js
585
+ * // Before running the sample:
586
+ * // - Enable the API at:
587
+ * // https://console.developers.google.com/apis/api/sts.googleapis.com
588
+ * // - Login into gcloud by running:
589
+ * // ```sh
590
+ * // $ gcloud auth application-default login
591
+ * // ```
592
+ * // - Install the npm module by running:
593
+ * // ```sh
594
+ * // $ npm install googleapis
595
+ * // ```
596
+ *
597
+ * const {google} = require('googleapis');
598
+ * const sts = google.sts('v1');
599
+ *
600
+ * async function main() {
601
+ * const auth = new google.auth.GoogleAuth({
602
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
603
+ * scopes: [],
604
+ * });
605
+ *
606
+ * // Acquire an auth client, and bind it to all future calls
607
+ * const authClient = await auth.getClient();
608
+ * google.options({auth: authClient});
609
+ *
610
+ * // Do the magic
611
+ * const res =
612
+ * (await sts.organizations.locations.workloadIdentityPools.well) -
613
+ * known.getOpenid -
614
+ * configuration({
615
+ * // Required. The name of the pool whose OpenID provider configuration to retrieve. Format: 'organizations/{ORGANIZATION_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' 'projects/{PROJECT_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' Example: 'organizations/1234/locations/global/workloadIdentityPools/agents.global.org-1234.system.id.goog' 'projects/12345678/locations/global/workloadIdentityPools/agents.global.proj-12345678.system.id.goog'
616
+ * name: 'organizations/my-organization/locations/my-location/workloadIdentityPools/my-workloadIdentityPool',
617
+ * });
618
+ * console.log(res.data);
619
+ *
620
+ * // Example response
621
+ * // {
622
+ * // "authorization_endpoint": "my_authorization_endpoint",
623
+ * // "id_token_signing_alg_values_supported": [],
624
+ * // "issuer": "my_issuer",
625
+ * // "jwks_uri": "my_jwks_uri",
626
+ * // "response_types_supported": [],
627
+ * // "subject_types_supported": [],
628
+ * // "token_endpoint": "my_token_endpoint"
629
+ * // }
630
+ * }
631
+ *
632
+ * main().catch(e => {
633
+ * console.error(e);
634
+ * throw e;
635
+ * });
636
+ *
637
+ * ```
638
+ *
639
+ * @param params - Parameters for request
640
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
641
+ * @param callback - Optional callback that handles the response.
642
+ * @returns A promise if used with async/await, or void if used with a callback.
643
+ */
644
+ getOpenidConfiguration(
645
+ params: Params$Resource$Organizations$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
646
+ options: StreamMethodOptions
647
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
648
+ getOpenidConfiguration(
649
+ params?: Params$Resource$Organizations$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
650
+ options?: MethodOptions
651
+ ): Promise<
652
+ GaxiosResponseWithHTTP2<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
653
+ >;
654
+ getOpenidConfiguration(
655
+ params: Params$Resource$Organizations$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
656
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
657
+ callback: BodyResponseCallback<Readable>
658
+ ): void;
659
+ getOpenidConfiguration(
660
+ params: Params$Resource$Organizations$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
661
+ options:
662
+ | MethodOptions
663
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>,
664
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
665
+ ): void;
666
+ getOpenidConfiguration(
667
+ params: Params$Resource$Organizations$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
668
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
669
+ ): void;
670
+ getOpenidConfiguration(
671
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
672
+ ): void;
673
+ getOpenidConfiguration(
674
+ paramsOrCallback?:
675
+ | Params$Resource$Organizations$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration
676
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
677
+ | BodyResponseCallback<Readable>,
678
+ optionsOrCallback?:
679
+ | MethodOptions
680
+ | StreamMethodOptions
681
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
682
+ | BodyResponseCallback<Readable>,
683
+ callback?:
684
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
685
+ | BodyResponseCallback<Readable>
686
+ ):
687
+ | void
688
+ | Promise<
689
+ GaxiosResponseWithHTTP2<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
690
+ >
691
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
692
+ let params = (paramsOrCallback ||
693
+ {}) as Params$Resource$Organizations$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration;
694
+ let options = (optionsOrCallback || {}) as MethodOptions;
695
+
696
+ if (typeof paramsOrCallback === 'function') {
697
+ callback = paramsOrCallback;
698
+ params =
699
+ {} as Params$Resource$Organizations$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration;
700
+ options = {};
701
+ }
702
+
703
+ if (typeof optionsOrCallback === 'function') {
704
+ callback = optionsOrCallback;
705
+ options = {};
706
+ }
707
+
708
+ const rootUrl = options.rootUrl || 'https://sts.googleapis.com/';
709
+ const parameters = {
710
+ options: Object.assign(
711
+ {
712
+ url: (
713
+ rootUrl + '/v1/{+name}/.well-known/openid-configuration'
714
+ ).replace(/([^:]\/)\/+/g, '$1'),
715
+ method: 'GET',
716
+ apiVersion: '',
717
+ },
718
+ options
719
+ ),
720
+ params,
721
+ requiredParams: ['name'],
722
+ pathParams: ['name'],
723
+ context: this.context,
724
+ };
725
+ if (callback) {
726
+ createAPIRequest<Schema$GoogleIdentityStsV1OpenIdProviderConfig>(
727
+ parameters,
728
+ callback as BodyResponseCallback<unknown>
729
+ );
730
+ } else {
731
+ return createAPIRequest<Schema$GoogleIdentityStsV1OpenIdProviderConfig>(
732
+ parameters
733
+ );
734
+ }
735
+ }
736
+ }
737
+
738
+ export interface Params$Resource$Organizations$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration extends StandardParameters {
739
+ /**
740
+ * Required. The name of the pool whose OpenID provider configuration to retrieve. Format: 'organizations/{ORGANIZATION_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' 'projects/{PROJECT_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' Example: 'organizations/1234/locations/global/workloadIdentityPools/agents.global.org-1234.system.id.goog' 'projects/12345678/locations/global/workloadIdentityPools/agents.global.proj-12345678.system.id.goog'
741
+ */
742
+ name?: string;
743
+ }
744
+
745
+ export class Resource$Projects {
746
+ context: APIRequestContext;
747
+ locations: Resource$Projects$Locations;
748
+ constructor(context: APIRequestContext) {
749
+ this.context = context;
750
+ this.locations = new Resource$Projects$Locations(this.context);
751
+ }
752
+ }
753
+
754
+ export class Resource$Projects$Locations {
755
+ context: APIRequestContext;
756
+ workloadIdentityPools: Resource$Projects$Locations$Workloadidentitypools;
757
+ constructor(context: APIRequestContext) {
758
+ this.context = context;
759
+ this.workloadIdentityPools =
760
+ new Resource$Projects$Locations$Workloadidentitypools(this.context);
761
+ }
762
+ }
763
+
764
+ export class Resource$Projects$Locations$Workloadidentitypools {
765
+ context: APIRequestContext;
766
+ openid: Resource$Projects$Locations$Workloadidentitypools$Openid;
767
+ wellKnown: Resource$Projects$Locations$Workloadidentitypools$WellKnown;
768
+ constructor(context: APIRequestContext) {
769
+ this.context = context;
770
+ this.openid =
771
+ new Resource$Projects$Locations$Workloadidentitypools$Openid(
772
+ this.context
773
+ );
774
+ this.wellKnown =
775
+ new Resource$Projects$Locations$Workloadidentitypools$WellKnown(
776
+ this.context
777
+ );
778
+ }
779
+ }
780
+
781
+ export class Resource$Projects$Locations$Workloadidentitypools$Openid {
782
+ context: APIRequestContext;
783
+ constructor(context: APIRequestContext) {
784
+ this.context = context;
785
+ }
786
+
787
+ /**
788
+ * Fetches the signing keys for an agentic or managed workload identity pool and returns them in JWKs format, defined in [RFC 7517](https://tools.ietf.org/html/rfc7517). For now, only agentic system pools are supported. **Preview** This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the [Service Specific Terms](https://cloud.google.com/terms/service-terms#1). Pre-GA features are available "as is" and might have limited support. For more information, see the [launch stage descriptions](https://cloud.google.com/products#product-launch-stages).
789
+ * @example
790
+ * ```js
791
+ * // Before running the sample:
792
+ * // - Enable the API at:
793
+ * // https://console.developers.google.com/apis/api/sts.googleapis.com
794
+ * // - Login into gcloud by running:
795
+ * // ```sh
796
+ * // $ gcloud auth application-default login
797
+ * // ```
798
+ * // - Install the npm module by running:
799
+ * // ```sh
800
+ * // $ npm install googleapis
801
+ * // ```
802
+ *
803
+ * const {google} = require('googleapis');
804
+ * const sts = google.sts('v1');
805
+ *
806
+ * async function main() {
807
+ * const auth = new google.auth.GoogleAuth({
808
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
809
+ * scopes: [],
810
+ * });
811
+ *
812
+ * // Acquire an auth client, and bind it to all future calls
813
+ * const authClient = await auth.getClient();
814
+ * google.options({auth: authClient});
815
+ *
816
+ * // Do the magic
817
+ * const res = await sts.projects.locations.workloadIdentityPools.openid.getJwks(
818
+ * {
819
+ * // Required. The name of the pool whose JWKS needs to be retrieved. Format: 'organizations/{ORGANIZATION_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' 'projects/{PROJECT_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' Example(s): 'organizations/1234/locations/global/workloadIdentityPools/agents.global.org-1234.system.id.goog' 'projects/12345678/locations/global/workloadIdentityPools/agents.global.proj-12345678.system.id.goog'
820
+ * name: 'projects/my-project/locations/my-location/workloadIdentityPools/my-workloadIdentityPool',
821
+ * },
822
+ * );
823
+ * console.log(res.data);
824
+ *
825
+ * // Example response
826
+ * // {
827
+ * // "keys": []
828
+ * // }
829
+ * }
830
+ *
831
+ * main().catch(e => {
832
+ * console.error(e);
833
+ * throw e;
834
+ * });
835
+ *
836
+ * ```
837
+ *
838
+ * @param params - Parameters for request
839
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
840
+ * @param callback - Optional callback that handles the response.
841
+ * @returns A promise if used with async/await, or void if used with a callback.
842
+ */
843
+ getJwks(
844
+ params: Params$Resource$Projects$Locations$Workloadidentitypools$Openid$Getjwks,
845
+ options: StreamMethodOptions
846
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
847
+ getJwks(
848
+ params?: Params$Resource$Projects$Locations$Workloadidentitypools$Openid$Getjwks,
849
+ options?: MethodOptions
850
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleIdentityStsV1Jwks>>;
851
+ getJwks(
852
+ params: Params$Resource$Projects$Locations$Workloadidentitypools$Openid$Getjwks,
853
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
854
+ callback: BodyResponseCallback<Readable>
855
+ ): void;
856
+ getJwks(
857
+ params: Params$Resource$Projects$Locations$Workloadidentitypools$Openid$Getjwks,
858
+ options:
859
+ MethodOptions | BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>,
860
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
861
+ ): void;
862
+ getJwks(
863
+ params: Params$Resource$Projects$Locations$Workloadidentitypools$Openid$Getjwks,
864
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
865
+ ): void;
866
+ getJwks(
867
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
868
+ ): void;
869
+ getJwks(
870
+ paramsOrCallback?:
871
+ | Params$Resource$Projects$Locations$Workloadidentitypools$Openid$Getjwks
872
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
873
+ | BodyResponseCallback<Readable>,
874
+ optionsOrCallback?:
875
+ | MethodOptions
876
+ | StreamMethodOptions
877
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
878
+ | BodyResponseCallback<Readable>,
879
+ callback?:
880
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1Jwks>
881
+ | BodyResponseCallback<Readable>
882
+ ):
883
+ | void
884
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleIdentityStsV1Jwks>>
885
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
886
+ let params = (paramsOrCallback ||
887
+ {}) as Params$Resource$Projects$Locations$Workloadidentitypools$Openid$Getjwks;
888
+ let options = (optionsOrCallback || {}) as MethodOptions;
889
+
890
+ if (typeof paramsOrCallback === 'function') {
891
+ callback = paramsOrCallback;
892
+ params =
893
+ {} as Params$Resource$Projects$Locations$Workloadidentitypools$Openid$Getjwks;
894
+ options = {};
895
+ }
896
+
897
+ if (typeof optionsOrCallback === 'function') {
898
+ callback = optionsOrCallback;
899
+ options = {};
900
+ }
901
+
902
+ const rootUrl = options.rootUrl || 'https://sts.googleapis.com/';
903
+ const parameters = {
904
+ options: Object.assign(
905
+ {
906
+ url: (rootUrl + '/v1/{+name}/openid/jwks').replace(
907
+ /([^:]\/)\/+/g,
908
+ '$1'
909
+ ),
910
+ method: 'GET',
911
+ apiVersion: '',
912
+ },
913
+ options
914
+ ),
915
+ params,
916
+ requiredParams: ['name'],
917
+ pathParams: ['name'],
918
+ context: this.context,
919
+ };
920
+ if (callback) {
921
+ createAPIRequest<Schema$GoogleIdentityStsV1Jwks>(
922
+ parameters,
923
+ callback as BodyResponseCallback<unknown>
924
+ );
925
+ } else {
926
+ return createAPIRequest<Schema$GoogleIdentityStsV1Jwks>(parameters);
927
+ }
928
+ }
929
+ }
930
+
931
+ export interface Params$Resource$Projects$Locations$Workloadidentitypools$Openid$Getjwks extends StandardParameters {
932
+ /**
933
+ * Required. The name of the pool whose JWKS needs to be retrieved. Format: 'organizations/{ORGANIZATION_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' 'projects/{PROJECT_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' Example(s): 'organizations/1234/locations/global/workloadIdentityPools/agents.global.org-1234.system.id.goog' 'projects/12345678/locations/global/workloadIdentityPools/agents.global.proj-12345678.system.id.goog'
934
+ */
935
+ name?: string;
936
+ }
937
+
938
+ export class Resource$Projects$Locations$Workloadidentitypools$WellKnown {
939
+ context: APIRequestContext;
940
+ constructor(context: APIRequestContext) {
941
+ this.context = context;
942
+ }
943
+
944
+ /**
945
+ * Gets the OIDC provider configuration for an agentic or managed workload identity pool following [the OIDC 1.0 discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse). For now, only agentic system pools are supported. **Preview** This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the [Service Specific Terms](https://cloud.google.com/terms/service-terms#1). Pre-GA features are available "as is" and might have limited support. For more information, see the [launch stage descriptions](https://cloud.google.com/products#product-launch-stages).
946
+ * @example
947
+ * ```js
948
+ * // Before running the sample:
949
+ * // - Enable the API at:
950
+ * // https://console.developers.google.com/apis/api/sts.googleapis.com
951
+ * // - Login into gcloud by running:
952
+ * // ```sh
953
+ * // $ gcloud auth application-default login
954
+ * // ```
955
+ * // - Install the npm module by running:
956
+ * // ```sh
957
+ * // $ npm install googleapis
958
+ * // ```
959
+ *
960
+ * const {google} = require('googleapis');
961
+ * const sts = google.sts('v1');
962
+ *
963
+ * async function main() {
964
+ * const auth = new google.auth.GoogleAuth({
965
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
966
+ * scopes: [],
967
+ * });
968
+ *
969
+ * // Acquire an auth client, and bind it to all future calls
970
+ * const authClient = await auth.getClient();
971
+ * google.options({auth: authClient});
972
+ *
973
+ * // Do the magic
974
+ * const res =
975
+ * (await sts.projects.locations.workloadIdentityPools.well) -
976
+ * known.getOpenid -
977
+ * configuration({
978
+ * // Required. The name of the pool whose OpenID provider configuration to retrieve. Format: 'organizations/{ORGANIZATION_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' 'projects/{PROJECT_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' Example: 'organizations/1234/locations/global/workloadIdentityPools/agents.global.org-1234.system.id.goog' 'projects/12345678/locations/global/workloadIdentityPools/agents.global.proj-12345678.system.id.goog'
979
+ * name: 'projects/my-project/locations/my-location/workloadIdentityPools/my-workloadIdentityPool',
980
+ * });
981
+ * console.log(res.data);
982
+ *
983
+ * // Example response
984
+ * // {
985
+ * // "authorization_endpoint": "my_authorization_endpoint",
986
+ * // "id_token_signing_alg_values_supported": [],
987
+ * // "issuer": "my_issuer",
988
+ * // "jwks_uri": "my_jwks_uri",
989
+ * // "response_types_supported": [],
990
+ * // "subject_types_supported": [],
991
+ * // "token_endpoint": "my_token_endpoint"
992
+ * // }
993
+ * }
994
+ *
995
+ * main().catch(e => {
996
+ * console.error(e);
997
+ * throw e;
998
+ * });
999
+ *
1000
+ * ```
1001
+ *
1002
+ * @param params - Parameters for request
1003
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1004
+ * @param callback - Optional callback that handles the response.
1005
+ * @returns A promise if used with async/await, or void if used with a callback.
1006
+ */
1007
+ getOpenidConfiguration(
1008
+ params: Params$Resource$Projects$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
1009
+ options: StreamMethodOptions
1010
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1011
+ getOpenidConfiguration(
1012
+ params?: Params$Resource$Projects$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
1013
+ options?: MethodOptions
1014
+ ): Promise<
1015
+ GaxiosResponseWithHTTP2<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
1016
+ >;
1017
+ getOpenidConfiguration(
1018
+ params: Params$Resource$Projects$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
1019
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1020
+ callback: BodyResponseCallback<Readable>
1021
+ ): void;
1022
+ getOpenidConfiguration(
1023
+ params: Params$Resource$Projects$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
1024
+ options:
1025
+ | MethodOptions
1026
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>,
1027
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
1028
+ ): void;
1029
+ getOpenidConfiguration(
1030
+ params: Params$Resource$Projects$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration,
1031
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
1032
+ ): void;
1033
+ getOpenidConfiguration(
1034
+ callback: BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
1035
+ ): void;
1036
+ getOpenidConfiguration(
1037
+ paramsOrCallback?:
1038
+ | Params$Resource$Projects$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration
1039
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
1040
+ | BodyResponseCallback<Readable>,
1041
+ optionsOrCallback?:
1042
+ | MethodOptions
1043
+ | StreamMethodOptions
1044
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
1045
+ | BodyResponseCallback<Readable>,
1046
+ callback?:
1047
+ | BodyResponseCallback<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
1048
+ | BodyResponseCallback<Readable>
1049
+ ):
1050
+ | void
1051
+ | Promise<
1052
+ GaxiosResponseWithHTTP2<Schema$GoogleIdentityStsV1OpenIdProviderConfig>
1053
+ >
1054
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1055
+ let params = (paramsOrCallback ||
1056
+ {}) as Params$Resource$Projects$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration;
1057
+ let options = (optionsOrCallback || {}) as MethodOptions;
1058
+
1059
+ if (typeof paramsOrCallback === 'function') {
1060
+ callback = paramsOrCallback;
1061
+ params =
1062
+ {} as Params$Resource$Projects$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration;
1063
+ options = {};
1064
+ }
1065
+
1066
+ if (typeof optionsOrCallback === 'function') {
1067
+ callback = optionsOrCallback;
1068
+ options = {};
1069
+ }
1070
+
1071
+ const rootUrl = options.rootUrl || 'https://sts.googleapis.com/';
1072
+ const parameters = {
1073
+ options: Object.assign(
1074
+ {
1075
+ url: (
1076
+ rootUrl + '/v1/{+name}/.well-known/openid-configuration'
1077
+ ).replace(/([^:]\/)\/+/g, '$1'),
1078
+ method: 'GET',
1079
+ apiVersion: '',
1080
+ },
1081
+ options
1082
+ ),
1083
+ params,
1084
+ requiredParams: ['name'],
1085
+ pathParams: ['name'],
1086
+ context: this.context,
1087
+ };
1088
+ if (callback) {
1089
+ createAPIRequest<Schema$GoogleIdentityStsV1OpenIdProviderConfig>(
1090
+ parameters,
1091
+ callback as BodyResponseCallback<unknown>
1092
+ );
1093
+ } else {
1094
+ return createAPIRequest<Schema$GoogleIdentityStsV1OpenIdProviderConfig>(
1095
+ parameters
1096
+ );
1097
+ }
1098
+ }
1099
+ }
1100
+
1101
+ export interface Params$Resource$Projects$Locations$Workloadidentitypools$WellKnown$Getopenidconfiguration extends StandardParameters {
1102
+ /**
1103
+ * Required. The name of the pool whose OpenID provider configuration to retrieve. Format: 'organizations/{ORGANIZATION_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' 'projects/{PROJECT_NUMBER\}/locations/global/workloadIdentityPools/{POOL_ID\}' Example: 'organizations/1234/locations/global/workloadIdentityPools/agents.global.org-1234.system.id.goog' 'projects/12345678/locations/global/workloadIdentityPools/agents.global.proj-12345678.system.id.goog'
1104
+ */
1105
+ name?: string;
1106
+ }
1107
+
306
1108
  export class Resource$V1 {
307
1109
  context: APIRequestContext;
308
1110
  constructor(context: APIRequestContext) {