@googleapis/servicedirectory 3.1.0 → 5.0.1
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/CHANGELOG.md +44 -0
- package/build/index.d.ts +1 -1
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +1404 -49
- package/build/v1.js.map +1 -1
- package/build/v1beta1.d.ts +1618 -55
- package/build/v1beta1.js.map +1 -1
- package/index.ts +0 -1
- package/package.json +2 -2
- package/v1.ts +1486 -80
- package/v1beta1.ts +1710 -90
package/v1.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -413,6 +413,56 @@ export namespace servicedirectory_v1 {
|
|
|
413
413
|
|
|
414
414
|
/**
|
|
415
415
|
* Gets information about a location.
|
|
416
|
+
* @example
|
|
417
|
+
* ```js
|
|
418
|
+
* // Before running the sample:
|
|
419
|
+
* // - Enable the API at:
|
|
420
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
421
|
+
* // - Login into gcloud by running:
|
|
422
|
+
* // ```sh
|
|
423
|
+
* // $ gcloud auth application-default login
|
|
424
|
+
* // ```
|
|
425
|
+
* // - Install the npm module by running:
|
|
426
|
+
* // ```sh
|
|
427
|
+
* // $ npm install googleapis
|
|
428
|
+
* // ```
|
|
429
|
+
*
|
|
430
|
+
* const {google} = require('googleapis');
|
|
431
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
432
|
+
*
|
|
433
|
+
* async function main() {
|
|
434
|
+
* const auth = new google.auth.GoogleAuth({
|
|
435
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
436
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
437
|
+
* });
|
|
438
|
+
*
|
|
439
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
440
|
+
* const authClient = await auth.getClient();
|
|
441
|
+
* google.options({auth: authClient});
|
|
442
|
+
*
|
|
443
|
+
* // Do the magic
|
|
444
|
+
* const res = await servicedirectory.projects.locations.get({
|
|
445
|
+
* // Resource name for the location.
|
|
446
|
+
* name: 'projects/my-project/locations/my-location',
|
|
447
|
+
* });
|
|
448
|
+
* console.log(res.data);
|
|
449
|
+
*
|
|
450
|
+
* // Example response
|
|
451
|
+
* // {
|
|
452
|
+
* // "displayName": "my_displayName",
|
|
453
|
+
* // "labels": {},
|
|
454
|
+
* // "locationId": "my_locationId",
|
|
455
|
+
* // "metadata": {},
|
|
456
|
+
* // "name": "my_name"
|
|
457
|
+
* // }
|
|
458
|
+
* }
|
|
459
|
+
*
|
|
460
|
+
* main().catch(e => {
|
|
461
|
+
* console.error(e);
|
|
462
|
+
* throw e;
|
|
463
|
+
* });
|
|
464
|
+
*
|
|
465
|
+
* ```
|
|
416
466
|
*
|
|
417
467
|
* @param params - Parameters for request
|
|
418
468
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -422,11 +472,11 @@ export namespace servicedirectory_v1 {
|
|
|
422
472
|
get(
|
|
423
473
|
params: Params$Resource$Projects$Locations$Get,
|
|
424
474
|
options: StreamMethodOptions
|
|
425
|
-
):
|
|
475
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
426
476
|
get(
|
|
427
477
|
params?: Params$Resource$Projects$Locations$Get,
|
|
428
478
|
options?: MethodOptions
|
|
429
|
-
):
|
|
479
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Location>>;
|
|
430
480
|
get(
|
|
431
481
|
params: Params$Resource$Projects$Locations$Get,
|
|
432
482
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -455,7 +505,10 @@ export namespace servicedirectory_v1 {
|
|
|
455
505
|
callback?:
|
|
456
506
|
| BodyResponseCallback<Schema$Location>
|
|
457
507
|
| BodyResponseCallback<Readable>
|
|
458
|
-
):
|
|
508
|
+
):
|
|
509
|
+
| void
|
|
510
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Location>>
|
|
511
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
459
512
|
let params = (paramsOrCallback ||
|
|
460
513
|
{}) as Params$Resource$Projects$Locations$Get;
|
|
461
514
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -499,6 +552,61 @@ export namespace servicedirectory_v1 {
|
|
|
499
552
|
|
|
500
553
|
/**
|
|
501
554
|
* Lists information about the supported locations for this service.
|
|
555
|
+
* @example
|
|
556
|
+
* ```js
|
|
557
|
+
* // Before running the sample:
|
|
558
|
+
* // - Enable the API at:
|
|
559
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
560
|
+
* // - Login into gcloud by running:
|
|
561
|
+
* // ```sh
|
|
562
|
+
* // $ gcloud auth application-default login
|
|
563
|
+
* // ```
|
|
564
|
+
* // - Install the npm module by running:
|
|
565
|
+
* // ```sh
|
|
566
|
+
* // $ npm install googleapis
|
|
567
|
+
* // ```
|
|
568
|
+
*
|
|
569
|
+
* const {google} = require('googleapis');
|
|
570
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
571
|
+
*
|
|
572
|
+
* async function main() {
|
|
573
|
+
* const auth = new google.auth.GoogleAuth({
|
|
574
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
575
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
576
|
+
* });
|
|
577
|
+
*
|
|
578
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
579
|
+
* const authClient = await auth.getClient();
|
|
580
|
+
* google.options({auth: authClient});
|
|
581
|
+
*
|
|
582
|
+
* // Do the magic
|
|
583
|
+
* const res = await servicedirectory.projects.locations.list({
|
|
584
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
585
|
+
* extraLocationTypes: 'placeholder-value',
|
|
586
|
+
* // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
|
587
|
+
* filter: 'placeholder-value',
|
|
588
|
+
* // The resource that owns the locations collection, if applicable.
|
|
589
|
+
* name: 'projects/my-project',
|
|
590
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
591
|
+
* pageSize: 'placeholder-value',
|
|
592
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
593
|
+
* pageToken: 'placeholder-value',
|
|
594
|
+
* });
|
|
595
|
+
* console.log(res.data);
|
|
596
|
+
*
|
|
597
|
+
* // Example response
|
|
598
|
+
* // {
|
|
599
|
+
* // "locations": [],
|
|
600
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
601
|
+
* // }
|
|
602
|
+
* }
|
|
603
|
+
*
|
|
604
|
+
* main().catch(e => {
|
|
605
|
+
* console.error(e);
|
|
606
|
+
* throw e;
|
|
607
|
+
* });
|
|
608
|
+
*
|
|
609
|
+
* ```
|
|
502
610
|
*
|
|
503
611
|
* @param params - Parameters for request
|
|
504
612
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -508,11 +616,11 @@ export namespace servicedirectory_v1 {
|
|
|
508
616
|
list(
|
|
509
617
|
params: Params$Resource$Projects$Locations$List,
|
|
510
618
|
options: StreamMethodOptions
|
|
511
|
-
):
|
|
619
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
512
620
|
list(
|
|
513
621
|
params?: Params$Resource$Projects$Locations$List,
|
|
514
622
|
options?: MethodOptions
|
|
515
|
-
):
|
|
623
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>;
|
|
516
624
|
list(
|
|
517
625
|
params: Params$Resource$Projects$Locations$List,
|
|
518
626
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -545,8 +653,8 @@ export namespace servicedirectory_v1 {
|
|
|
545
653
|
| BodyResponseCallback<Readable>
|
|
546
654
|
):
|
|
547
655
|
| void
|
|
548
|
-
|
|
|
549
|
-
|
|
|
656
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>
|
|
657
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
550
658
|
let params = (paramsOrCallback ||
|
|
551
659
|
{}) as Params$Resource$Projects$Locations$List;
|
|
552
660
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -635,6 +743,66 @@ export namespace servicedirectory_v1 {
|
|
|
635
743
|
|
|
636
744
|
/**
|
|
637
745
|
* Creates a namespace, and returns the new namespace.
|
|
746
|
+
* @example
|
|
747
|
+
* ```js
|
|
748
|
+
* // Before running the sample:
|
|
749
|
+
* // - Enable the API at:
|
|
750
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
751
|
+
* // - Login into gcloud by running:
|
|
752
|
+
* // ```sh
|
|
753
|
+
* // $ gcloud auth application-default login
|
|
754
|
+
* // ```
|
|
755
|
+
* // - Install the npm module by running:
|
|
756
|
+
* // ```sh
|
|
757
|
+
* // $ npm install googleapis
|
|
758
|
+
* // ```
|
|
759
|
+
*
|
|
760
|
+
* const {google} = require('googleapis');
|
|
761
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
762
|
+
*
|
|
763
|
+
* async function main() {
|
|
764
|
+
* const auth = new google.auth.GoogleAuth({
|
|
765
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
766
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
767
|
+
* });
|
|
768
|
+
*
|
|
769
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
770
|
+
* const authClient = await auth.getClient();
|
|
771
|
+
* google.options({auth: authClient});
|
|
772
|
+
*
|
|
773
|
+
* // Do the magic
|
|
774
|
+
* const res = await servicedirectory.projects.locations.namespaces.create({
|
|
775
|
+
* // Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
|
|
776
|
+
* namespaceId: 'placeholder-value',
|
|
777
|
+
* // Required. The resource name of the project and location the namespace will be created in.
|
|
778
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
779
|
+
*
|
|
780
|
+
* // Request body metadata
|
|
781
|
+
* requestBody: {
|
|
782
|
+
* // request body parameters
|
|
783
|
+
* // {
|
|
784
|
+
* // "labels": {},
|
|
785
|
+
* // "name": "my_name",
|
|
786
|
+
* // "uid": "my_uid"
|
|
787
|
+
* // }
|
|
788
|
+
* },
|
|
789
|
+
* });
|
|
790
|
+
* console.log(res.data);
|
|
791
|
+
*
|
|
792
|
+
* // Example response
|
|
793
|
+
* // {
|
|
794
|
+
* // "labels": {},
|
|
795
|
+
* // "name": "my_name",
|
|
796
|
+
* // "uid": "my_uid"
|
|
797
|
+
* // }
|
|
798
|
+
* }
|
|
799
|
+
*
|
|
800
|
+
* main().catch(e => {
|
|
801
|
+
* console.error(e);
|
|
802
|
+
* throw e;
|
|
803
|
+
* });
|
|
804
|
+
*
|
|
805
|
+
* ```
|
|
638
806
|
*
|
|
639
807
|
* @param params - Parameters for request
|
|
640
808
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -644,11 +812,11 @@ export namespace servicedirectory_v1 {
|
|
|
644
812
|
create(
|
|
645
813
|
params: Params$Resource$Projects$Locations$Namespaces$Create,
|
|
646
814
|
options: StreamMethodOptions
|
|
647
|
-
):
|
|
815
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
648
816
|
create(
|
|
649
817
|
params?: Params$Resource$Projects$Locations$Namespaces$Create,
|
|
650
818
|
options?: MethodOptions
|
|
651
|
-
):
|
|
819
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Namespace>>;
|
|
652
820
|
create(
|
|
653
821
|
params: Params$Resource$Projects$Locations$Namespaces$Create,
|
|
654
822
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -677,7 +845,10 @@ export namespace servicedirectory_v1 {
|
|
|
677
845
|
callback?:
|
|
678
846
|
| BodyResponseCallback<Schema$Namespace>
|
|
679
847
|
| BodyResponseCallback<Readable>
|
|
680
|
-
):
|
|
848
|
+
):
|
|
849
|
+
| void
|
|
850
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Namespace>>
|
|
851
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
681
852
|
let params = (paramsOrCallback ||
|
|
682
853
|
{}) as Params$Resource$Projects$Locations$Namespaces$Create;
|
|
683
854
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -724,6 +895,50 @@ export namespace servicedirectory_v1 {
|
|
|
724
895
|
|
|
725
896
|
/**
|
|
726
897
|
* Deletes a namespace. This also deletes all services and endpoints in the namespace.
|
|
898
|
+
* @example
|
|
899
|
+
* ```js
|
|
900
|
+
* // Before running the sample:
|
|
901
|
+
* // - Enable the API at:
|
|
902
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
903
|
+
* // - Login into gcloud by running:
|
|
904
|
+
* // ```sh
|
|
905
|
+
* // $ gcloud auth application-default login
|
|
906
|
+
* // ```
|
|
907
|
+
* // - Install the npm module by running:
|
|
908
|
+
* // ```sh
|
|
909
|
+
* // $ npm install googleapis
|
|
910
|
+
* // ```
|
|
911
|
+
*
|
|
912
|
+
* const {google} = require('googleapis');
|
|
913
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
914
|
+
*
|
|
915
|
+
* async function main() {
|
|
916
|
+
* const auth = new google.auth.GoogleAuth({
|
|
917
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
918
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
919
|
+
* });
|
|
920
|
+
*
|
|
921
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
922
|
+
* const authClient = await auth.getClient();
|
|
923
|
+
* google.options({auth: authClient});
|
|
924
|
+
*
|
|
925
|
+
* // Do the magic
|
|
926
|
+
* const res = await servicedirectory.projects.locations.namespaces.delete({
|
|
927
|
+
* // Required. The name of the namespace to delete.
|
|
928
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
929
|
+
* });
|
|
930
|
+
* console.log(res.data);
|
|
931
|
+
*
|
|
932
|
+
* // Example response
|
|
933
|
+
* // {}
|
|
934
|
+
* }
|
|
935
|
+
*
|
|
936
|
+
* main().catch(e => {
|
|
937
|
+
* console.error(e);
|
|
938
|
+
* throw e;
|
|
939
|
+
* });
|
|
940
|
+
*
|
|
941
|
+
* ```
|
|
727
942
|
*
|
|
728
943
|
* @param params - Parameters for request
|
|
729
944
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -733,11 +948,11 @@ export namespace servicedirectory_v1 {
|
|
|
733
948
|
delete(
|
|
734
949
|
params: Params$Resource$Projects$Locations$Namespaces$Delete,
|
|
735
950
|
options: StreamMethodOptions
|
|
736
|
-
):
|
|
951
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
737
952
|
delete(
|
|
738
953
|
params?: Params$Resource$Projects$Locations$Namespaces$Delete,
|
|
739
954
|
options?: MethodOptions
|
|
740
|
-
):
|
|
955
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
741
956
|
delete(
|
|
742
957
|
params: Params$Resource$Projects$Locations$Namespaces$Delete,
|
|
743
958
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -766,7 +981,10 @@ export namespace servicedirectory_v1 {
|
|
|
766
981
|
callback?:
|
|
767
982
|
| BodyResponseCallback<Schema$Empty>
|
|
768
983
|
| BodyResponseCallback<Readable>
|
|
769
|
-
):
|
|
984
|
+
):
|
|
985
|
+
| void
|
|
986
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
987
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
770
988
|
let params = (paramsOrCallback ||
|
|
771
989
|
{}) as Params$Resource$Projects$Locations$Namespaces$Delete;
|
|
772
990
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -810,6 +1028,54 @@ export namespace servicedirectory_v1 {
|
|
|
810
1028
|
|
|
811
1029
|
/**
|
|
812
1030
|
* Gets a namespace.
|
|
1031
|
+
* @example
|
|
1032
|
+
* ```js
|
|
1033
|
+
* // Before running the sample:
|
|
1034
|
+
* // - Enable the API at:
|
|
1035
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1036
|
+
* // - Login into gcloud by running:
|
|
1037
|
+
* // ```sh
|
|
1038
|
+
* // $ gcloud auth application-default login
|
|
1039
|
+
* // ```
|
|
1040
|
+
* // - Install the npm module by running:
|
|
1041
|
+
* // ```sh
|
|
1042
|
+
* // $ npm install googleapis
|
|
1043
|
+
* // ```
|
|
1044
|
+
*
|
|
1045
|
+
* const {google} = require('googleapis');
|
|
1046
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1047
|
+
*
|
|
1048
|
+
* async function main() {
|
|
1049
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1050
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1051
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1052
|
+
* });
|
|
1053
|
+
*
|
|
1054
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1055
|
+
* const authClient = await auth.getClient();
|
|
1056
|
+
* google.options({auth: authClient});
|
|
1057
|
+
*
|
|
1058
|
+
* // Do the magic
|
|
1059
|
+
* const res = await servicedirectory.projects.locations.namespaces.get({
|
|
1060
|
+
* // Required. The name of the namespace to retrieve.
|
|
1061
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
1062
|
+
* });
|
|
1063
|
+
* console.log(res.data);
|
|
1064
|
+
*
|
|
1065
|
+
* // Example response
|
|
1066
|
+
* // {
|
|
1067
|
+
* // "labels": {},
|
|
1068
|
+
* // "name": "my_name",
|
|
1069
|
+
* // "uid": "my_uid"
|
|
1070
|
+
* // }
|
|
1071
|
+
* }
|
|
1072
|
+
*
|
|
1073
|
+
* main().catch(e => {
|
|
1074
|
+
* console.error(e);
|
|
1075
|
+
* throw e;
|
|
1076
|
+
* });
|
|
1077
|
+
*
|
|
1078
|
+
* ```
|
|
813
1079
|
*
|
|
814
1080
|
* @param params - Parameters for request
|
|
815
1081
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -819,11 +1085,11 @@ export namespace servicedirectory_v1 {
|
|
|
819
1085
|
get(
|
|
820
1086
|
params: Params$Resource$Projects$Locations$Namespaces$Get,
|
|
821
1087
|
options: StreamMethodOptions
|
|
822
|
-
):
|
|
1088
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
823
1089
|
get(
|
|
824
1090
|
params?: Params$Resource$Projects$Locations$Namespaces$Get,
|
|
825
1091
|
options?: MethodOptions
|
|
826
|
-
):
|
|
1092
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Namespace>>;
|
|
827
1093
|
get(
|
|
828
1094
|
params: Params$Resource$Projects$Locations$Namespaces$Get,
|
|
829
1095
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -852,7 +1118,10 @@ export namespace servicedirectory_v1 {
|
|
|
852
1118
|
callback?:
|
|
853
1119
|
| BodyResponseCallback<Schema$Namespace>
|
|
854
1120
|
| BodyResponseCallback<Readable>
|
|
855
|
-
):
|
|
1121
|
+
):
|
|
1122
|
+
| void
|
|
1123
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Namespace>>
|
|
1124
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
856
1125
|
let params = (paramsOrCallback ||
|
|
857
1126
|
{}) as Params$Resource$Projects$Locations$Namespaces$Get;
|
|
858
1127
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -896,6 +1165,65 @@ export namespace servicedirectory_v1 {
|
|
|
896
1165
|
|
|
897
1166
|
/**
|
|
898
1167
|
* Gets the IAM Policy for a resource (namespace or service only).
|
|
1168
|
+
* @example
|
|
1169
|
+
* ```js
|
|
1170
|
+
* // Before running the sample:
|
|
1171
|
+
* // - Enable the API at:
|
|
1172
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1173
|
+
* // - Login into gcloud by running:
|
|
1174
|
+
* // ```sh
|
|
1175
|
+
* // $ gcloud auth application-default login
|
|
1176
|
+
* // ```
|
|
1177
|
+
* // - Install the npm module by running:
|
|
1178
|
+
* // ```sh
|
|
1179
|
+
* // $ npm install googleapis
|
|
1180
|
+
* // ```
|
|
1181
|
+
*
|
|
1182
|
+
* const {google} = require('googleapis');
|
|
1183
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1184
|
+
*
|
|
1185
|
+
* async function main() {
|
|
1186
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1187
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1188
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1189
|
+
* });
|
|
1190
|
+
*
|
|
1191
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1192
|
+
* const authClient = await auth.getClient();
|
|
1193
|
+
* google.options({auth: authClient});
|
|
1194
|
+
*
|
|
1195
|
+
* // Do the magic
|
|
1196
|
+
* const res = await servicedirectory.projects.locations.namespaces.getIamPolicy(
|
|
1197
|
+
* {
|
|
1198
|
+
* // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
1199
|
+
* resource:
|
|
1200
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
1201
|
+
*
|
|
1202
|
+
* // Request body metadata
|
|
1203
|
+
* requestBody: {
|
|
1204
|
+
* // request body parameters
|
|
1205
|
+
* // {
|
|
1206
|
+
* // "options": {}
|
|
1207
|
+
* // }
|
|
1208
|
+
* },
|
|
1209
|
+
* },
|
|
1210
|
+
* );
|
|
1211
|
+
* console.log(res.data);
|
|
1212
|
+
*
|
|
1213
|
+
* // Example response
|
|
1214
|
+
* // {
|
|
1215
|
+
* // "bindings": [],
|
|
1216
|
+
* // "etag": "my_etag",
|
|
1217
|
+
* // "version": 0
|
|
1218
|
+
* // }
|
|
1219
|
+
* }
|
|
1220
|
+
*
|
|
1221
|
+
* main().catch(e => {
|
|
1222
|
+
* console.error(e);
|
|
1223
|
+
* throw e;
|
|
1224
|
+
* });
|
|
1225
|
+
*
|
|
1226
|
+
* ```
|
|
899
1227
|
*
|
|
900
1228
|
* @param params - Parameters for request
|
|
901
1229
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -905,11 +1233,11 @@ export namespace servicedirectory_v1 {
|
|
|
905
1233
|
getIamPolicy(
|
|
906
1234
|
params: Params$Resource$Projects$Locations$Namespaces$Getiampolicy,
|
|
907
1235
|
options: StreamMethodOptions
|
|
908
|
-
):
|
|
1236
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
909
1237
|
getIamPolicy(
|
|
910
1238
|
params?: Params$Resource$Projects$Locations$Namespaces$Getiampolicy,
|
|
911
1239
|
options?: MethodOptions
|
|
912
|
-
):
|
|
1240
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
|
|
913
1241
|
getIamPolicy(
|
|
914
1242
|
params: Params$Resource$Projects$Locations$Namespaces$Getiampolicy,
|
|
915
1243
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -938,7 +1266,10 @@ export namespace servicedirectory_v1 {
|
|
|
938
1266
|
callback?:
|
|
939
1267
|
| BodyResponseCallback<Schema$Policy>
|
|
940
1268
|
| BodyResponseCallback<Readable>
|
|
941
|
-
):
|
|
1269
|
+
):
|
|
1270
|
+
| void
|
|
1271
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
|
|
1272
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
942
1273
|
let params = (paramsOrCallback ||
|
|
943
1274
|
{}) as Params$Resource$Projects$Locations$Namespaces$Getiampolicy;
|
|
944
1275
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -986,6 +1317,61 @@ export namespace servicedirectory_v1 {
|
|
|
986
1317
|
|
|
987
1318
|
/**
|
|
988
1319
|
* Lists all namespaces.
|
|
1320
|
+
* @example
|
|
1321
|
+
* ```js
|
|
1322
|
+
* // Before running the sample:
|
|
1323
|
+
* // - Enable the API at:
|
|
1324
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1325
|
+
* // - Login into gcloud by running:
|
|
1326
|
+
* // ```sh
|
|
1327
|
+
* // $ gcloud auth application-default login
|
|
1328
|
+
* // ```
|
|
1329
|
+
* // - Install the npm module by running:
|
|
1330
|
+
* // ```sh
|
|
1331
|
+
* // $ npm install googleapis
|
|
1332
|
+
* // ```
|
|
1333
|
+
*
|
|
1334
|
+
* const {google} = require('googleapis');
|
|
1335
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1336
|
+
*
|
|
1337
|
+
* async function main() {
|
|
1338
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1339
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1340
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1341
|
+
* });
|
|
1342
|
+
*
|
|
1343
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1344
|
+
* const authClient = await auth.getClient();
|
|
1345
|
+
* google.options({auth: authClient});
|
|
1346
|
+
*
|
|
1347
|
+
* // Do the magic
|
|
1348
|
+
* const res = await servicedirectory.projects.locations.namespaces.list({
|
|
1349
|
+
* // Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name` or `labels.` for map field * `` can be `<`, `\>`, `<=`, `\>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `labels.owner` returns namespaces that have a label with the key `owner`, this is the same as `labels:owner` * `labels.owner=sd` returns namespaces that have key/value `owner=sd` * `name\>projects/my-project/locations/us-east1/namespaces/namespace-c` returns namespaces that have name that is alphabetically later than the string, so "namespace-e" is returned but "namespace-a" is not * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have `owner` in label key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that namespace doesn't have a field called "doesnotexist". Since the filter does not match any namespaces, it returns no results For more information about filtering, see [API Filtering](https://aip.dev/160).
|
|
1350
|
+
* filter: 'placeholder-value',
|
|
1351
|
+
* // Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows value: `name` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.
|
|
1352
|
+
* orderBy: 'placeholder-value',
|
|
1353
|
+
* // Optional. The maximum number of items to return.
|
|
1354
|
+
* pageSize: 'placeholder-value',
|
|
1355
|
+
* // Optional. The next_page_token value returned from a previous List request, if any.
|
|
1356
|
+
* pageToken: 'placeholder-value',
|
|
1357
|
+
* // Required. The resource name of the project and location whose namespaces you'd like to list.
|
|
1358
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
1359
|
+
* });
|
|
1360
|
+
* console.log(res.data);
|
|
1361
|
+
*
|
|
1362
|
+
* // Example response
|
|
1363
|
+
* // {
|
|
1364
|
+
* // "namespaces": [],
|
|
1365
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
1366
|
+
* // }
|
|
1367
|
+
* }
|
|
1368
|
+
*
|
|
1369
|
+
* main().catch(e => {
|
|
1370
|
+
* console.error(e);
|
|
1371
|
+
* throw e;
|
|
1372
|
+
* });
|
|
1373
|
+
*
|
|
1374
|
+
* ```
|
|
989
1375
|
*
|
|
990
1376
|
* @param params - Parameters for request
|
|
991
1377
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -995,11 +1381,11 @@ export namespace servicedirectory_v1 {
|
|
|
995
1381
|
list(
|
|
996
1382
|
params: Params$Resource$Projects$Locations$Namespaces$List,
|
|
997
1383
|
options: StreamMethodOptions
|
|
998
|
-
):
|
|
1384
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
999
1385
|
list(
|
|
1000
1386
|
params?: Params$Resource$Projects$Locations$Namespaces$List,
|
|
1001
1387
|
options?: MethodOptions
|
|
1002
|
-
):
|
|
1388
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListNamespacesResponse>>;
|
|
1003
1389
|
list(
|
|
1004
1390
|
params: Params$Resource$Projects$Locations$Namespaces$List,
|
|
1005
1391
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1032,8 +1418,8 @@ export namespace servicedirectory_v1 {
|
|
|
1032
1418
|
| BodyResponseCallback<Readable>
|
|
1033
1419
|
):
|
|
1034
1420
|
| void
|
|
1035
|
-
|
|
|
1036
|
-
|
|
|
1421
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListNamespacesResponse>>
|
|
1422
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1037
1423
|
let params = (paramsOrCallback ||
|
|
1038
1424
|
{}) as Params$Resource$Projects$Locations$Namespaces$List;
|
|
1039
1425
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1080,6 +1466,66 @@ export namespace servicedirectory_v1 {
|
|
|
1080
1466
|
|
|
1081
1467
|
/**
|
|
1082
1468
|
* Updates a namespace.
|
|
1469
|
+
* @example
|
|
1470
|
+
* ```js
|
|
1471
|
+
* // Before running the sample:
|
|
1472
|
+
* // - Enable the API at:
|
|
1473
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1474
|
+
* // - Login into gcloud by running:
|
|
1475
|
+
* // ```sh
|
|
1476
|
+
* // $ gcloud auth application-default login
|
|
1477
|
+
* // ```
|
|
1478
|
+
* // - Install the npm module by running:
|
|
1479
|
+
* // ```sh
|
|
1480
|
+
* // $ npm install googleapis
|
|
1481
|
+
* // ```
|
|
1482
|
+
*
|
|
1483
|
+
* const {google} = require('googleapis');
|
|
1484
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1485
|
+
*
|
|
1486
|
+
* async function main() {
|
|
1487
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1488
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1489
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1490
|
+
* });
|
|
1491
|
+
*
|
|
1492
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1493
|
+
* const authClient = await auth.getClient();
|
|
1494
|
+
* google.options({auth: authClient});
|
|
1495
|
+
*
|
|
1496
|
+
* // Do the magic
|
|
1497
|
+
* const res = await servicedirectory.projects.locations.namespaces.patch({
|
|
1498
|
+
* // Immutable. The resource name for the namespace in the format `projects/x/locations/x/namespaces/x`.
|
|
1499
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
1500
|
+
* // Required. List of fields to be updated in this request.
|
|
1501
|
+
* updateMask: 'placeholder-value',
|
|
1502
|
+
*
|
|
1503
|
+
* // Request body metadata
|
|
1504
|
+
* requestBody: {
|
|
1505
|
+
* // request body parameters
|
|
1506
|
+
* // {
|
|
1507
|
+
* // "labels": {},
|
|
1508
|
+
* // "name": "my_name",
|
|
1509
|
+
* // "uid": "my_uid"
|
|
1510
|
+
* // }
|
|
1511
|
+
* },
|
|
1512
|
+
* });
|
|
1513
|
+
* console.log(res.data);
|
|
1514
|
+
*
|
|
1515
|
+
* // Example response
|
|
1516
|
+
* // {
|
|
1517
|
+
* // "labels": {},
|
|
1518
|
+
* // "name": "my_name",
|
|
1519
|
+
* // "uid": "my_uid"
|
|
1520
|
+
* // }
|
|
1521
|
+
* }
|
|
1522
|
+
*
|
|
1523
|
+
* main().catch(e => {
|
|
1524
|
+
* console.error(e);
|
|
1525
|
+
* throw e;
|
|
1526
|
+
* });
|
|
1527
|
+
*
|
|
1528
|
+
* ```
|
|
1083
1529
|
*
|
|
1084
1530
|
* @param params - Parameters for request
|
|
1085
1531
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1089,11 +1535,11 @@ export namespace servicedirectory_v1 {
|
|
|
1089
1535
|
patch(
|
|
1090
1536
|
params: Params$Resource$Projects$Locations$Namespaces$Patch,
|
|
1091
1537
|
options: StreamMethodOptions
|
|
1092
|
-
):
|
|
1538
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1093
1539
|
patch(
|
|
1094
1540
|
params?: Params$Resource$Projects$Locations$Namespaces$Patch,
|
|
1095
1541
|
options?: MethodOptions
|
|
1096
|
-
):
|
|
1542
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Namespace>>;
|
|
1097
1543
|
patch(
|
|
1098
1544
|
params: Params$Resource$Projects$Locations$Namespaces$Patch,
|
|
1099
1545
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1122,7 +1568,10 @@ export namespace servicedirectory_v1 {
|
|
|
1122
1568
|
callback?:
|
|
1123
1569
|
| BodyResponseCallback<Schema$Namespace>
|
|
1124
1570
|
| BodyResponseCallback<Readable>
|
|
1125
|
-
):
|
|
1571
|
+
):
|
|
1572
|
+
| void
|
|
1573
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Namespace>>
|
|
1574
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1126
1575
|
let params = (paramsOrCallback ||
|
|
1127
1576
|
{}) as Params$Resource$Projects$Locations$Namespaces$Patch;
|
|
1128
1577
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1166,6 +1615,65 @@ export namespace servicedirectory_v1 {
|
|
|
1166
1615
|
|
|
1167
1616
|
/**
|
|
1168
1617
|
* Sets the IAM Policy for a resource (namespace or service only).
|
|
1618
|
+
* @example
|
|
1619
|
+
* ```js
|
|
1620
|
+
* // Before running the sample:
|
|
1621
|
+
* // - Enable the API at:
|
|
1622
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1623
|
+
* // - Login into gcloud by running:
|
|
1624
|
+
* // ```sh
|
|
1625
|
+
* // $ gcloud auth application-default login
|
|
1626
|
+
* // ```
|
|
1627
|
+
* // - Install the npm module by running:
|
|
1628
|
+
* // ```sh
|
|
1629
|
+
* // $ npm install googleapis
|
|
1630
|
+
* // ```
|
|
1631
|
+
*
|
|
1632
|
+
* const {google} = require('googleapis');
|
|
1633
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1634
|
+
*
|
|
1635
|
+
* async function main() {
|
|
1636
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1637
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1638
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1639
|
+
* });
|
|
1640
|
+
*
|
|
1641
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1642
|
+
* const authClient = await auth.getClient();
|
|
1643
|
+
* google.options({auth: authClient});
|
|
1644
|
+
*
|
|
1645
|
+
* // Do the magic
|
|
1646
|
+
* const res = await servicedirectory.projects.locations.namespaces.setIamPolicy(
|
|
1647
|
+
* {
|
|
1648
|
+
* // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
1649
|
+
* resource:
|
|
1650
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
1651
|
+
*
|
|
1652
|
+
* // Request body metadata
|
|
1653
|
+
* requestBody: {
|
|
1654
|
+
* // request body parameters
|
|
1655
|
+
* // {
|
|
1656
|
+
* // "policy": {}
|
|
1657
|
+
* // }
|
|
1658
|
+
* },
|
|
1659
|
+
* },
|
|
1660
|
+
* );
|
|
1661
|
+
* console.log(res.data);
|
|
1662
|
+
*
|
|
1663
|
+
* // Example response
|
|
1664
|
+
* // {
|
|
1665
|
+
* // "bindings": [],
|
|
1666
|
+
* // "etag": "my_etag",
|
|
1667
|
+
* // "version": 0
|
|
1668
|
+
* // }
|
|
1669
|
+
* }
|
|
1670
|
+
*
|
|
1671
|
+
* main().catch(e => {
|
|
1672
|
+
* console.error(e);
|
|
1673
|
+
* throw e;
|
|
1674
|
+
* });
|
|
1675
|
+
*
|
|
1676
|
+
* ```
|
|
1169
1677
|
*
|
|
1170
1678
|
* @param params - Parameters for request
|
|
1171
1679
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1175,11 +1683,11 @@ export namespace servicedirectory_v1 {
|
|
|
1175
1683
|
setIamPolicy(
|
|
1176
1684
|
params: Params$Resource$Projects$Locations$Namespaces$Setiampolicy,
|
|
1177
1685
|
options: StreamMethodOptions
|
|
1178
|
-
):
|
|
1686
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1179
1687
|
setIamPolicy(
|
|
1180
1688
|
params?: Params$Resource$Projects$Locations$Namespaces$Setiampolicy,
|
|
1181
1689
|
options?: MethodOptions
|
|
1182
|
-
):
|
|
1690
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
|
|
1183
1691
|
setIamPolicy(
|
|
1184
1692
|
params: Params$Resource$Projects$Locations$Namespaces$Setiampolicy,
|
|
1185
1693
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1208,7 +1716,10 @@ export namespace servicedirectory_v1 {
|
|
|
1208
1716
|
callback?:
|
|
1209
1717
|
| BodyResponseCallback<Schema$Policy>
|
|
1210
1718
|
| BodyResponseCallback<Readable>
|
|
1211
|
-
):
|
|
1719
|
+
):
|
|
1720
|
+
| void
|
|
1721
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
|
|
1722
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1212
1723
|
let params = (paramsOrCallback ||
|
|
1213
1724
|
{}) as Params$Resource$Projects$Locations$Namespaces$Setiampolicy;
|
|
1214
1725
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1256,6 +1767,62 @@ export namespace servicedirectory_v1 {
|
|
|
1256
1767
|
|
|
1257
1768
|
/**
|
|
1258
1769
|
* Tests IAM permissions for a resource (namespace or service only).
|
|
1770
|
+
* @example
|
|
1771
|
+
* ```js
|
|
1772
|
+
* // Before running the sample:
|
|
1773
|
+
* // - Enable the API at:
|
|
1774
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1775
|
+
* // - Login into gcloud by running:
|
|
1776
|
+
* // ```sh
|
|
1777
|
+
* // $ gcloud auth application-default login
|
|
1778
|
+
* // ```
|
|
1779
|
+
* // - Install the npm module by running:
|
|
1780
|
+
* // ```sh
|
|
1781
|
+
* // $ npm install googleapis
|
|
1782
|
+
* // ```
|
|
1783
|
+
*
|
|
1784
|
+
* const {google} = require('googleapis');
|
|
1785
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1786
|
+
*
|
|
1787
|
+
* async function main() {
|
|
1788
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1789
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1790
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1791
|
+
* });
|
|
1792
|
+
*
|
|
1793
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1794
|
+
* const authClient = await auth.getClient();
|
|
1795
|
+
* google.options({auth: authClient});
|
|
1796
|
+
*
|
|
1797
|
+
* // Do the magic
|
|
1798
|
+
* const res =
|
|
1799
|
+
* await servicedirectory.projects.locations.namespaces.testIamPermissions({
|
|
1800
|
+
* // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
1801
|
+
* resource:
|
|
1802
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
1803
|
+
*
|
|
1804
|
+
* // Request body metadata
|
|
1805
|
+
* requestBody: {
|
|
1806
|
+
* // request body parameters
|
|
1807
|
+
* // {
|
|
1808
|
+
* // "permissions": []
|
|
1809
|
+
* // }
|
|
1810
|
+
* },
|
|
1811
|
+
* });
|
|
1812
|
+
* console.log(res.data);
|
|
1813
|
+
*
|
|
1814
|
+
* // Example response
|
|
1815
|
+
* // {
|
|
1816
|
+
* // "permissions": []
|
|
1817
|
+
* // }
|
|
1818
|
+
* }
|
|
1819
|
+
*
|
|
1820
|
+
* main().catch(e => {
|
|
1821
|
+
* console.error(e);
|
|
1822
|
+
* throw e;
|
|
1823
|
+
* });
|
|
1824
|
+
*
|
|
1825
|
+
* ```
|
|
1259
1826
|
*
|
|
1260
1827
|
* @param params - Parameters for request
|
|
1261
1828
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1265,11 +1832,11 @@ export namespace servicedirectory_v1 {
|
|
|
1265
1832
|
testIamPermissions(
|
|
1266
1833
|
params: Params$Resource$Projects$Locations$Namespaces$Testiampermissions,
|
|
1267
1834
|
options: StreamMethodOptions
|
|
1268
|
-
):
|
|
1835
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1269
1836
|
testIamPermissions(
|
|
1270
1837
|
params?: Params$Resource$Projects$Locations$Namespaces$Testiampermissions,
|
|
1271
1838
|
options?: MethodOptions
|
|
1272
|
-
):
|
|
1839
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>;
|
|
1273
1840
|
testIamPermissions(
|
|
1274
1841
|
params: Params$Resource$Projects$Locations$Namespaces$Testiampermissions,
|
|
1275
1842
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1304,8 +1871,8 @@ export namespace servicedirectory_v1 {
|
|
|
1304
1871
|
| BodyResponseCallback<Readable>
|
|
1305
1872
|
):
|
|
1306
1873
|
| void
|
|
1307
|
-
|
|
|
1308
|
-
|
|
|
1874
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>
|
|
1875
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1309
1876
|
let params = (paramsOrCallback ||
|
|
1310
1877
|
{}) as Params$Resource$Projects$Locations$Namespaces$Testiampermissions;
|
|
1311
1878
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1471,6 +2038,70 @@ export namespace servicedirectory_v1 {
|
|
|
1471
2038
|
|
|
1472
2039
|
/**
|
|
1473
2040
|
* Creates a service, and returns the new service.
|
|
2041
|
+
* @example
|
|
2042
|
+
* ```js
|
|
2043
|
+
* // Before running the sample:
|
|
2044
|
+
* // - Enable the API at:
|
|
2045
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2046
|
+
* // - Login into gcloud by running:
|
|
2047
|
+
* // ```sh
|
|
2048
|
+
* // $ gcloud auth application-default login
|
|
2049
|
+
* // ```
|
|
2050
|
+
* // - Install the npm module by running:
|
|
2051
|
+
* // ```sh
|
|
2052
|
+
* // $ npm install googleapis
|
|
2053
|
+
* // ```
|
|
2054
|
+
*
|
|
2055
|
+
* const {google} = require('googleapis');
|
|
2056
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2057
|
+
*
|
|
2058
|
+
* async function main() {
|
|
2059
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2060
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2061
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2062
|
+
* });
|
|
2063
|
+
*
|
|
2064
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2065
|
+
* const authClient = await auth.getClient();
|
|
2066
|
+
* google.options({auth: authClient});
|
|
2067
|
+
*
|
|
2068
|
+
* // Do the magic
|
|
2069
|
+
* const res =
|
|
2070
|
+
* await servicedirectory.projects.locations.namespaces.services.create({
|
|
2071
|
+
* // Required. The resource name of the namespace this service will belong to.
|
|
2072
|
+
* parent:
|
|
2073
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
2074
|
+
* // Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
|
|
2075
|
+
* serviceId: 'placeholder-value',
|
|
2076
|
+
*
|
|
2077
|
+
* // Request body metadata
|
|
2078
|
+
* requestBody: {
|
|
2079
|
+
* // request body parameters
|
|
2080
|
+
* // {
|
|
2081
|
+
* // "annotations": {},
|
|
2082
|
+
* // "endpoints": [],
|
|
2083
|
+
* // "name": "my_name",
|
|
2084
|
+
* // "uid": "my_uid"
|
|
2085
|
+
* // }
|
|
2086
|
+
* },
|
|
2087
|
+
* });
|
|
2088
|
+
* console.log(res.data);
|
|
2089
|
+
*
|
|
2090
|
+
* // Example response
|
|
2091
|
+
* // {
|
|
2092
|
+
* // "annotations": {},
|
|
2093
|
+
* // "endpoints": [],
|
|
2094
|
+
* // "name": "my_name",
|
|
2095
|
+
* // "uid": "my_uid"
|
|
2096
|
+
* // }
|
|
2097
|
+
* }
|
|
2098
|
+
*
|
|
2099
|
+
* main().catch(e => {
|
|
2100
|
+
* console.error(e);
|
|
2101
|
+
* throw e;
|
|
2102
|
+
* });
|
|
2103
|
+
*
|
|
2104
|
+
* ```
|
|
1474
2105
|
*
|
|
1475
2106
|
* @param params - Parameters for request
|
|
1476
2107
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1480,11 +2111,11 @@ export namespace servicedirectory_v1 {
|
|
|
1480
2111
|
create(
|
|
1481
2112
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Create,
|
|
1482
2113
|
options: StreamMethodOptions
|
|
1483
|
-
):
|
|
2114
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1484
2115
|
create(
|
|
1485
2116
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Create,
|
|
1486
2117
|
options?: MethodOptions
|
|
1487
|
-
):
|
|
2118
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Service>>;
|
|
1488
2119
|
create(
|
|
1489
2120
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Create,
|
|
1490
2121
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1513,7 +2144,10 @@ export namespace servicedirectory_v1 {
|
|
|
1513
2144
|
callback?:
|
|
1514
2145
|
| BodyResponseCallback<Schema$Service>
|
|
1515
2146
|
| BodyResponseCallback<Readable>
|
|
1516
|
-
):
|
|
2147
|
+
):
|
|
2148
|
+
| void
|
|
2149
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Service>>
|
|
2150
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1517
2151
|
let params = (paramsOrCallback ||
|
|
1518
2152
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Create;
|
|
1519
2153
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1561,6 +2195,51 @@ export namespace servicedirectory_v1 {
|
|
|
1561
2195
|
|
|
1562
2196
|
/**
|
|
1563
2197
|
* Deletes a service. This also deletes all endpoints associated with the service.
|
|
2198
|
+
* @example
|
|
2199
|
+
* ```js
|
|
2200
|
+
* // Before running the sample:
|
|
2201
|
+
* // - Enable the API at:
|
|
2202
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2203
|
+
* // - Login into gcloud by running:
|
|
2204
|
+
* // ```sh
|
|
2205
|
+
* // $ gcloud auth application-default login
|
|
2206
|
+
* // ```
|
|
2207
|
+
* // - Install the npm module by running:
|
|
2208
|
+
* // ```sh
|
|
2209
|
+
* // $ npm install googleapis
|
|
2210
|
+
* // ```
|
|
2211
|
+
*
|
|
2212
|
+
* const {google} = require('googleapis');
|
|
2213
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2214
|
+
*
|
|
2215
|
+
* async function main() {
|
|
2216
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2217
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2218
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2219
|
+
* });
|
|
2220
|
+
*
|
|
2221
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2222
|
+
* const authClient = await auth.getClient();
|
|
2223
|
+
* google.options({auth: authClient});
|
|
2224
|
+
*
|
|
2225
|
+
* // Do the magic
|
|
2226
|
+
* const res =
|
|
2227
|
+
* await servicedirectory.projects.locations.namespaces.services.delete({
|
|
2228
|
+
* // Required. The name of the service to delete.
|
|
2229
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
2230
|
+
* });
|
|
2231
|
+
* console.log(res.data);
|
|
2232
|
+
*
|
|
2233
|
+
* // Example response
|
|
2234
|
+
* // {}
|
|
2235
|
+
* }
|
|
2236
|
+
*
|
|
2237
|
+
* main().catch(e => {
|
|
2238
|
+
* console.error(e);
|
|
2239
|
+
* throw e;
|
|
2240
|
+
* });
|
|
2241
|
+
*
|
|
2242
|
+
* ```
|
|
1564
2243
|
*
|
|
1565
2244
|
* @param params - Parameters for request
|
|
1566
2245
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1570,11 +2249,11 @@ export namespace servicedirectory_v1 {
|
|
|
1570
2249
|
delete(
|
|
1571
2250
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Delete,
|
|
1572
2251
|
options: StreamMethodOptions
|
|
1573
|
-
):
|
|
2252
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1574
2253
|
delete(
|
|
1575
2254
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Delete,
|
|
1576
2255
|
options?: MethodOptions
|
|
1577
|
-
):
|
|
2256
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
1578
2257
|
delete(
|
|
1579
2258
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Delete,
|
|
1580
2259
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1603,7 +2282,10 @@ export namespace servicedirectory_v1 {
|
|
|
1603
2282
|
callback?:
|
|
1604
2283
|
| BodyResponseCallback<Schema$Empty>
|
|
1605
2284
|
| BodyResponseCallback<Readable>
|
|
1606
|
-
):
|
|
2285
|
+
):
|
|
2286
|
+
| void
|
|
2287
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
2288
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1607
2289
|
let params = (paramsOrCallback ||
|
|
1608
2290
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Delete;
|
|
1609
2291
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1648,6 +2330,57 @@ export namespace servicedirectory_v1 {
|
|
|
1648
2330
|
|
|
1649
2331
|
/**
|
|
1650
2332
|
* Gets a service.
|
|
2333
|
+
* @example
|
|
2334
|
+
* ```js
|
|
2335
|
+
* // Before running the sample:
|
|
2336
|
+
* // - Enable the API at:
|
|
2337
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2338
|
+
* // - Login into gcloud by running:
|
|
2339
|
+
* // ```sh
|
|
2340
|
+
* // $ gcloud auth application-default login
|
|
2341
|
+
* // ```
|
|
2342
|
+
* // - Install the npm module by running:
|
|
2343
|
+
* // ```sh
|
|
2344
|
+
* // $ npm install googleapis
|
|
2345
|
+
* // ```
|
|
2346
|
+
*
|
|
2347
|
+
* const {google} = require('googleapis');
|
|
2348
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2349
|
+
*
|
|
2350
|
+
* async function main() {
|
|
2351
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2352
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2353
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2354
|
+
* });
|
|
2355
|
+
*
|
|
2356
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2357
|
+
* const authClient = await auth.getClient();
|
|
2358
|
+
* google.options({auth: authClient});
|
|
2359
|
+
*
|
|
2360
|
+
* // Do the magic
|
|
2361
|
+
* const res = await servicedirectory.projects.locations.namespaces.services.get(
|
|
2362
|
+
* {
|
|
2363
|
+
* // Required. The name of the service to get.
|
|
2364
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
2365
|
+
* },
|
|
2366
|
+
* );
|
|
2367
|
+
* console.log(res.data);
|
|
2368
|
+
*
|
|
2369
|
+
* // Example response
|
|
2370
|
+
* // {
|
|
2371
|
+
* // "annotations": {},
|
|
2372
|
+
* // "endpoints": [],
|
|
2373
|
+
* // "name": "my_name",
|
|
2374
|
+
* // "uid": "my_uid"
|
|
2375
|
+
* // }
|
|
2376
|
+
* }
|
|
2377
|
+
*
|
|
2378
|
+
* main().catch(e => {
|
|
2379
|
+
* console.error(e);
|
|
2380
|
+
* throw e;
|
|
2381
|
+
* });
|
|
2382
|
+
*
|
|
2383
|
+
* ```
|
|
1651
2384
|
*
|
|
1652
2385
|
* @param params - Parameters for request
|
|
1653
2386
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1657,11 +2390,11 @@ export namespace servicedirectory_v1 {
|
|
|
1657
2390
|
get(
|
|
1658
2391
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Get,
|
|
1659
2392
|
options: StreamMethodOptions
|
|
1660
|
-
):
|
|
2393
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1661
2394
|
get(
|
|
1662
2395
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Get,
|
|
1663
2396
|
options?: MethodOptions
|
|
1664
|
-
):
|
|
2397
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Service>>;
|
|
1665
2398
|
get(
|
|
1666
2399
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Get,
|
|
1667
2400
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1690,7 +2423,10 @@ export namespace servicedirectory_v1 {
|
|
|
1690
2423
|
callback?:
|
|
1691
2424
|
| BodyResponseCallback<Schema$Service>
|
|
1692
2425
|
| BodyResponseCallback<Readable>
|
|
1693
|
-
):
|
|
2426
|
+
):
|
|
2427
|
+
| void
|
|
2428
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Service>>
|
|
2429
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1694
2430
|
let params = (paramsOrCallback ||
|
|
1695
2431
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Get;
|
|
1696
2432
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1735,6 +2471,64 @@ export namespace servicedirectory_v1 {
|
|
|
1735
2471
|
|
|
1736
2472
|
/**
|
|
1737
2473
|
* Gets the IAM Policy for a resource (namespace or service only).
|
|
2474
|
+
* @example
|
|
2475
|
+
* ```js
|
|
2476
|
+
* // Before running the sample:
|
|
2477
|
+
* // - Enable the API at:
|
|
2478
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2479
|
+
* // - Login into gcloud by running:
|
|
2480
|
+
* // ```sh
|
|
2481
|
+
* // $ gcloud auth application-default login
|
|
2482
|
+
* // ```
|
|
2483
|
+
* // - Install the npm module by running:
|
|
2484
|
+
* // ```sh
|
|
2485
|
+
* // $ npm install googleapis
|
|
2486
|
+
* // ```
|
|
2487
|
+
*
|
|
2488
|
+
* const {google} = require('googleapis');
|
|
2489
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2490
|
+
*
|
|
2491
|
+
* async function main() {
|
|
2492
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2493
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2494
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2495
|
+
* });
|
|
2496
|
+
*
|
|
2497
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2498
|
+
* const authClient = await auth.getClient();
|
|
2499
|
+
* google.options({auth: authClient});
|
|
2500
|
+
*
|
|
2501
|
+
* // Do the magic
|
|
2502
|
+
* const res =
|
|
2503
|
+
* await servicedirectory.projects.locations.namespaces.services.getIamPolicy({
|
|
2504
|
+
* // REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
2505
|
+
* resource:
|
|
2506
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
2507
|
+
*
|
|
2508
|
+
* // Request body metadata
|
|
2509
|
+
* requestBody: {
|
|
2510
|
+
* // request body parameters
|
|
2511
|
+
* // {
|
|
2512
|
+
* // "options": {}
|
|
2513
|
+
* // }
|
|
2514
|
+
* },
|
|
2515
|
+
* });
|
|
2516
|
+
* console.log(res.data);
|
|
2517
|
+
*
|
|
2518
|
+
* // Example response
|
|
2519
|
+
* // {
|
|
2520
|
+
* // "bindings": [],
|
|
2521
|
+
* // "etag": "my_etag",
|
|
2522
|
+
* // "version": 0
|
|
2523
|
+
* // }
|
|
2524
|
+
* }
|
|
2525
|
+
*
|
|
2526
|
+
* main().catch(e => {
|
|
2527
|
+
* console.error(e);
|
|
2528
|
+
* throw e;
|
|
2529
|
+
* });
|
|
2530
|
+
*
|
|
2531
|
+
* ```
|
|
1738
2532
|
*
|
|
1739
2533
|
* @param params - Parameters for request
|
|
1740
2534
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1744,11 +2538,11 @@ export namespace servicedirectory_v1 {
|
|
|
1744
2538
|
getIamPolicy(
|
|
1745
2539
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy,
|
|
1746
2540
|
options: StreamMethodOptions
|
|
1747
|
-
):
|
|
2541
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1748
2542
|
getIamPolicy(
|
|
1749
2543
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy,
|
|
1750
2544
|
options?: MethodOptions
|
|
1751
|
-
):
|
|
2545
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
|
|
1752
2546
|
getIamPolicy(
|
|
1753
2547
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy,
|
|
1754
2548
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1777,7 +2571,10 @@ export namespace servicedirectory_v1 {
|
|
|
1777
2571
|
callback?:
|
|
1778
2572
|
| BodyResponseCallback<Schema$Policy>
|
|
1779
2573
|
| BodyResponseCallback<Readable>
|
|
1780
|
-
):
|
|
2574
|
+
):
|
|
2575
|
+
| void
|
|
2576
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
|
|
2577
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1781
2578
|
let params = (paramsOrCallback ||
|
|
1782
2579
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Getiampolicy;
|
|
1783
2580
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1825,6 +2622,63 @@ export namespace servicedirectory_v1 {
|
|
|
1825
2622
|
|
|
1826
2623
|
/**
|
|
1827
2624
|
* Lists all services belonging to a namespace.
|
|
2625
|
+
* @example
|
|
2626
|
+
* ```js
|
|
2627
|
+
* // Before running the sample:
|
|
2628
|
+
* // - Enable the API at:
|
|
2629
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2630
|
+
* // - Login into gcloud by running:
|
|
2631
|
+
* // ```sh
|
|
2632
|
+
* // $ gcloud auth application-default login
|
|
2633
|
+
* // ```
|
|
2634
|
+
* // - Install the npm module by running:
|
|
2635
|
+
* // ```sh
|
|
2636
|
+
* // $ npm install googleapis
|
|
2637
|
+
* // ```
|
|
2638
|
+
*
|
|
2639
|
+
* const {google} = require('googleapis');
|
|
2640
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2641
|
+
*
|
|
2642
|
+
* async function main() {
|
|
2643
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2644
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2645
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2646
|
+
* });
|
|
2647
|
+
*
|
|
2648
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2649
|
+
* const authClient = await auth.getClient();
|
|
2650
|
+
* google.options({auth: authClient});
|
|
2651
|
+
*
|
|
2652
|
+
* // Do the magic
|
|
2653
|
+
* const res =
|
|
2654
|
+
* await servicedirectory.projects.locations.namespaces.services.list({
|
|
2655
|
+
* // Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name` or `annotations.` for map field * `` can be `<`, `\>`, `<=`, `\>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `annotations.owner` returns services that have a annotation with the key `owner`, this is the same as `annotations:owner` * `annotations.protocol=gRPC` returns services that have key/value `protocol=gRPC` * `name\>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` returns services that have name that is alphabetically later than the string, so "service-e" is returned but "service-a" is not * `annotations.owner!=sd AND annotations.foo=bar` returns services that have `owner` in annotation key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that service doesn't have a field called "doesnotexist". Since the filter does not match any services, it returns no results For more information about filtering, see [API Filtering](https://aip.dev/160).
|
|
2656
|
+
* filter: 'placeholder-value',
|
|
2657
|
+
* // Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows value: `name` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.
|
|
2658
|
+
* orderBy: 'placeholder-value',
|
|
2659
|
+
* // Optional. The maximum number of items to return.
|
|
2660
|
+
* pageSize: 'placeholder-value',
|
|
2661
|
+
* // Optional. The next_page_token value returned from a previous List request, if any.
|
|
2662
|
+
* pageToken: 'placeholder-value',
|
|
2663
|
+
* // Required. The resource name of the namespace whose services you'd like to list.
|
|
2664
|
+
* parent:
|
|
2665
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
2666
|
+
* });
|
|
2667
|
+
* console.log(res.data);
|
|
2668
|
+
*
|
|
2669
|
+
* // Example response
|
|
2670
|
+
* // {
|
|
2671
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2672
|
+
* // "services": []
|
|
2673
|
+
* // }
|
|
2674
|
+
* }
|
|
2675
|
+
*
|
|
2676
|
+
* main().catch(e => {
|
|
2677
|
+
* console.error(e);
|
|
2678
|
+
* throw e;
|
|
2679
|
+
* });
|
|
2680
|
+
*
|
|
2681
|
+
* ```
|
|
1828
2682
|
*
|
|
1829
2683
|
* @param params - Parameters for request
|
|
1830
2684
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1834,11 +2688,11 @@ export namespace servicedirectory_v1 {
|
|
|
1834
2688
|
list(
|
|
1835
2689
|
params: Params$Resource$Projects$Locations$Namespaces$Services$List,
|
|
1836
2690
|
options: StreamMethodOptions
|
|
1837
|
-
):
|
|
2691
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1838
2692
|
list(
|
|
1839
2693
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$List,
|
|
1840
2694
|
options?: MethodOptions
|
|
1841
|
-
):
|
|
2695
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListServicesResponse>>;
|
|
1842
2696
|
list(
|
|
1843
2697
|
params: Params$Resource$Projects$Locations$Namespaces$Services$List,
|
|
1844
2698
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1871,8 +2725,8 @@ export namespace servicedirectory_v1 {
|
|
|
1871
2725
|
| BodyResponseCallback<Readable>
|
|
1872
2726
|
):
|
|
1873
2727
|
| void
|
|
1874
|
-
|
|
|
1875
|
-
|
|
|
2728
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListServicesResponse>>
|
|
2729
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1876
2730
|
let params = (paramsOrCallback ||
|
|
1877
2731
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$List;
|
|
1878
2732
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1920,6 +2774,69 @@ export namespace servicedirectory_v1 {
|
|
|
1920
2774
|
|
|
1921
2775
|
/**
|
|
1922
2776
|
* Updates a service.
|
|
2777
|
+
* @example
|
|
2778
|
+
* ```js
|
|
2779
|
+
* // Before running the sample:
|
|
2780
|
+
* // - Enable the API at:
|
|
2781
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2782
|
+
* // - Login into gcloud by running:
|
|
2783
|
+
* // ```sh
|
|
2784
|
+
* // $ gcloud auth application-default login
|
|
2785
|
+
* // ```
|
|
2786
|
+
* // - Install the npm module by running:
|
|
2787
|
+
* // ```sh
|
|
2788
|
+
* // $ npm install googleapis
|
|
2789
|
+
* // ```
|
|
2790
|
+
*
|
|
2791
|
+
* const {google} = require('googleapis');
|
|
2792
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2793
|
+
*
|
|
2794
|
+
* async function main() {
|
|
2795
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2796
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2797
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2798
|
+
* });
|
|
2799
|
+
*
|
|
2800
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2801
|
+
* const authClient = await auth.getClient();
|
|
2802
|
+
* google.options({auth: authClient});
|
|
2803
|
+
*
|
|
2804
|
+
* // Do the magic
|
|
2805
|
+
* const res =
|
|
2806
|
+
* await servicedirectory.projects.locations.namespaces.services.patch({
|
|
2807
|
+
* // Immutable. The resource name for the service in the format `projects/x/locations/x/namespaces/x/services/x`.
|
|
2808
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
2809
|
+
* // Required. List of fields to be updated in this request.
|
|
2810
|
+
* updateMask: 'placeholder-value',
|
|
2811
|
+
*
|
|
2812
|
+
* // Request body metadata
|
|
2813
|
+
* requestBody: {
|
|
2814
|
+
* // request body parameters
|
|
2815
|
+
* // {
|
|
2816
|
+
* // "annotations": {},
|
|
2817
|
+
* // "endpoints": [],
|
|
2818
|
+
* // "name": "my_name",
|
|
2819
|
+
* // "uid": "my_uid"
|
|
2820
|
+
* // }
|
|
2821
|
+
* },
|
|
2822
|
+
* });
|
|
2823
|
+
* console.log(res.data);
|
|
2824
|
+
*
|
|
2825
|
+
* // Example response
|
|
2826
|
+
* // {
|
|
2827
|
+
* // "annotations": {},
|
|
2828
|
+
* // "endpoints": [],
|
|
2829
|
+
* // "name": "my_name",
|
|
2830
|
+
* // "uid": "my_uid"
|
|
2831
|
+
* // }
|
|
2832
|
+
* }
|
|
2833
|
+
*
|
|
2834
|
+
* main().catch(e => {
|
|
2835
|
+
* console.error(e);
|
|
2836
|
+
* throw e;
|
|
2837
|
+
* });
|
|
2838
|
+
*
|
|
2839
|
+
* ```
|
|
1923
2840
|
*
|
|
1924
2841
|
* @param params - Parameters for request
|
|
1925
2842
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1929,11 +2846,11 @@ export namespace servicedirectory_v1 {
|
|
|
1929
2846
|
patch(
|
|
1930
2847
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Patch,
|
|
1931
2848
|
options: StreamMethodOptions
|
|
1932
|
-
):
|
|
2849
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1933
2850
|
patch(
|
|
1934
2851
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Patch,
|
|
1935
2852
|
options?: MethodOptions
|
|
1936
|
-
):
|
|
2853
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Service>>;
|
|
1937
2854
|
patch(
|
|
1938
2855
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Patch,
|
|
1939
2856
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1962,7 +2879,10 @@ export namespace servicedirectory_v1 {
|
|
|
1962
2879
|
callback?:
|
|
1963
2880
|
| BodyResponseCallback<Schema$Service>
|
|
1964
2881
|
| BodyResponseCallback<Readable>
|
|
1965
|
-
):
|
|
2882
|
+
):
|
|
2883
|
+
| void
|
|
2884
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Service>>
|
|
2885
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1966
2886
|
let params = (paramsOrCallback ||
|
|
1967
2887
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Patch;
|
|
1968
2888
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2007,6 +2927,62 @@ export namespace servicedirectory_v1 {
|
|
|
2007
2927
|
|
|
2008
2928
|
/**
|
|
2009
2929
|
* Returns a service and its associated endpoints. Resolving a service is not considered an active developer method.
|
|
2930
|
+
* @example
|
|
2931
|
+
* ```js
|
|
2932
|
+
* // Before running the sample:
|
|
2933
|
+
* // - Enable the API at:
|
|
2934
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2935
|
+
* // - Login into gcloud by running:
|
|
2936
|
+
* // ```sh
|
|
2937
|
+
* // $ gcloud auth application-default login
|
|
2938
|
+
* // ```
|
|
2939
|
+
* // - Install the npm module by running:
|
|
2940
|
+
* // ```sh
|
|
2941
|
+
* // $ npm install googleapis
|
|
2942
|
+
* // ```
|
|
2943
|
+
*
|
|
2944
|
+
* const {google} = require('googleapis');
|
|
2945
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2946
|
+
*
|
|
2947
|
+
* async function main() {
|
|
2948
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2949
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2950
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2951
|
+
* });
|
|
2952
|
+
*
|
|
2953
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2954
|
+
* const authClient = await auth.getClient();
|
|
2955
|
+
* google.options({auth: authClient});
|
|
2956
|
+
*
|
|
2957
|
+
* // Do the magic
|
|
2958
|
+
* const res =
|
|
2959
|
+
* await servicedirectory.projects.locations.namespaces.services.resolve({
|
|
2960
|
+
* // Required. The name of the service to resolve.
|
|
2961
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
2962
|
+
*
|
|
2963
|
+
* // Request body metadata
|
|
2964
|
+
* requestBody: {
|
|
2965
|
+
* // request body parameters
|
|
2966
|
+
* // {
|
|
2967
|
+
* // "endpointFilter": "my_endpointFilter",
|
|
2968
|
+
* // "maxEndpoints": 0
|
|
2969
|
+
* // }
|
|
2970
|
+
* },
|
|
2971
|
+
* });
|
|
2972
|
+
* console.log(res.data);
|
|
2973
|
+
*
|
|
2974
|
+
* // Example response
|
|
2975
|
+
* // {
|
|
2976
|
+
* // "service": {}
|
|
2977
|
+
* // }
|
|
2978
|
+
* }
|
|
2979
|
+
*
|
|
2980
|
+
* main().catch(e => {
|
|
2981
|
+
* console.error(e);
|
|
2982
|
+
* throw e;
|
|
2983
|
+
* });
|
|
2984
|
+
*
|
|
2985
|
+
* ```
|
|
2010
2986
|
*
|
|
2011
2987
|
* @param params - Parameters for request
|
|
2012
2988
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2016,11 +2992,11 @@ export namespace servicedirectory_v1 {
|
|
|
2016
2992
|
resolve(
|
|
2017
2993
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Resolve,
|
|
2018
2994
|
options: StreamMethodOptions
|
|
2019
|
-
):
|
|
2995
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2020
2996
|
resolve(
|
|
2021
2997
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Resolve,
|
|
2022
2998
|
options?: MethodOptions
|
|
2023
|
-
):
|
|
2999
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ResolveServiceResponse>>;
|
|
2024
3000
|
resolve(
|
|
2025
3001
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Resolve,
|
|
2026
3002
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2055,8 +3031,8 @@ export namespace servicedirectory_v1 {
|
|
|
2055
3031
|
| BodyResponseCallback<Readable>
|
|
2056
3032
|
):
|
|
2057
3033
|
| void
|
|
2058
|
-
|
|
|
2059
|
-
|
|
|
3034
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ResolveServiceResponse>>
|
|
3035
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2060
3036
|
let params = (paramsOrCallback ||
|
|
2061
3037
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Resolve;
|
|
2062
3038
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2104,6 +3080,64 @@ export namespace servicedirectory_v1 {
|
|
|
2104
3080
|
|
|
2105
3081
|
/**
|
|
2106
3082
|
* Sets the IAM Policy for a resource (namespace or service only).
|
|
3083
|
+
* @example
|
|
3084
|
+
* ```js
|
|
3085
|
+
* // Before running the sample:
|
|
3086
|
+
* // - Enable the API at:
|
|
3087
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
3088
|
+
* // - Login into gcloud by running:
|
|
3089
|
+
* // ```sh
|
|
3090
|
+
* // $ gcloud auth application-default login
|
|
3091
|
+
* // ```
|
|
3092
|
+
* // - Install the npm module by running:
|
|
3093
|
+
* // ```sh
|
|
3094
|
+
* // $ npm install googleapis
|
|
3095
|
+
* // ```
|
|
3096
|
+
*
|
|
3097
|
+
* const {google} = require('googleapis');
|
|
3098
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
3099
|
+
*
|
|
3100
|
+
* async function main() {
|
|
3101
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3102
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3103
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3104
|
+
* });
|
|
3105
|
+
*
|
|
3106
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3107
|
+
* const authClient = await auth.getClient();
|
|
3108
|
+
* google.options({auth: authClient});
|
|
3109
|
+
*
|
|
3110
|
+
* // Do the magic
|
|
3111
|
+
* const res =
|
|
3112
|
+
* await servicedirectory.projects.locations.namespaces.services.setIamPolicy({
|
|
3113
|
+
* // REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
3114
|
+
* resource:
|
|
3115
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
3116
|
+
*
|
|
3117
|
+
* // Request body metadata
|
|
3118
|
+
* requestBody: {
|
|
3119
|
+
* // request body parameters
|
|
3120
|
+
* // {
|
|
3121
|
+
* // "policy": {}
|
|
3122
|
+
* // }
|
|
3123
|
+
* },
|
|
3124
|
+
* });
|
|
3125
|
+
* console.log(res.data);
|
|
3126
|
+
*
|
|
3127
|
+
* // Example response
|
|
3128
|
+
* // {
|
|
3129
|
+
* // "bindings": [],
|
|
3130
|
+
* // "etag": "my_etag",
|
|
3131
|
+
* // "version": 0
|
|
3132
|
+
* // }
|
|
3133
|
+
* }
|
|
3134
|
+
*
|
|
3135
|
+
* main().catch(e => {
|
|
3136
|
+
* console.error(e);
|
|
3137
|
+
* throw e;
|
|
3138
|
+
* });
|
|
3139
|
+
*
|
|
3140
|
+
* ```
|
|
2107
3141
|
*
|
|
2108
3142
|
* @param params - Parameters for request
|
|
2109
3143
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2113,11 +3147,11 @@ export namespace servicedirectory_v1 {
|
|
|
2113
3147
|
setIamPolicy(
|
|
2114
3148
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy,
|
|
2115
3149
|
options: StreamMethodOptions
|
|
2116
|
-
):
|
|
3150
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2117
3151
|
setIamPolicy(
|
|
2118
3152
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy,
|
|
2119
3153
|
options?: MethodOptions
|
|
2120
|
-
):
|
|
3154
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Policy>>;
|
|
2121
3155
|
setIamPolicy(
|
|
2122
3156
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy,
|
|
2123
3157
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2146,7 +3180,10 @@ export namespace servicedirectory_v1 {
|
|
|
2146
3180
|
callback?:
|
|
2147
3181
|
| BodyResponseCallback<Schema$Policy>
|
|
2148
3182
|
| BodyResponseCallback<Readable>
|
|
2149
|
-
):
|
|
3183
|
+
):
|
|
3184
|
+
| void
|
|
3185
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Policy>>
|
|
3186
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2150
3187
|
let params = (paramsOrCallback ||
|
|
2151
3188
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Setiampolicy;
|
|
2152
3189
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2194,6 +3231,64 @@ export namespace servicedirectory_v1 {
|
|
|
2194
3231
|
|
|
2195
3232
|
/**
|
|
2196
3233
|
* Tests IAM permissions for a resource (namespace or service only).
|
|
3234
|
+
* @example
|
|
3235
|
+
* ```js
|
|
3236
|
+
* // Before running the sample:
|
|
3237
|
+
* // - Enable the API at:
|
|
3238
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
3239
|
+
* // - Login into gcloud by running:
|
|
3240
|
+
* // ```sh
|
|
3241
|
+
* // $ gcloud auth application-default login
|
|
3242
|
+
* // ```
|
|
3243
|
+
* // - Install the npm module by running:
|
|
3244
|
+
* // ```sh
|
|
3245
|
+
* // $ npm install googleapis
|
|
3246
|
+
* // ```
|
|
3247
|
+
*
|
|
3248
|
+
* const {google} = require('googleapis');
|
|
3249
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
3250
|
+
*
|
|
3251
|
+
* async function main() {
|
|
3252
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3253
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3254
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3255
|
+
* });
|
|
3256
|
+
*
|
|
3257
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3258
|
+
* const authClient = await auth.getClient();
|
|
3259
|
+
* google.options({auth: authClient});
|
|
3260
|
+
*
|
|
3261
|
+
* // Do the magic
|
|
3262
|
+
* const res =
|
|
3263
|
+
* await servicedirectory.projects.locations.namespaces.services.testIamPermissions(
|
|
3264
|
+
* {
|
|
3265
|
+
* // REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
|
|
3266
|
+
* resource:
|
|
3267
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
3268
|
+
*
|
|
3269
|
+
* // Request body metadata
|
|
3270
|
+
* requestBody: {
|
|
3271
|
+
* // request body parameters
|
|
3272
|
+
* // {
|
|
3273
|
+
* // "permissions": []
|
|
3274
|
+
* // }
|
|
3275
|
+
* },
|
|
3276
|
+
* },
|
|
3277
|
+
* );
|
|
3278
|
+
* console.log(res.data);
|
|
3279
|
+
*
|
|
3280
|
+
* // Example response
|
|
3281
|
+
* // {
|
|
3282
|
+
* // "permissions": []
|
|
3283
|
+
* // }
|
|
3284
|
+
* }
|
|
3285
|
+
*
|
|
3286
|
+
* main().catch(e => {
|
|
3287
|
+
* console.error(e);
|
|
3288
|
+
* throw e;
|
|
3289
|
+
* });
|
|
3290
|
+
*
|
|
3291
|
+
* ```
|
|
2197
3292
|
*
|
|
2198
3293
|
* @param params - Parameters for request
|
|
2199
3294
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2203,11 +3298,11 @@ export namespace servicedirectory_v1 {
|
|
|
2203
3298
|
testIamPermissions(
|
|
2204
3299
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions,
|
|
2205
3300
|
options: StreamMethodOptions
|
|
2206
|
-
):
|
|
3301
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2207
3302
|
testIamPermissions(
|
|
2208
3303
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions,
|
|
2209
3304
|
options?: MethodOptions
|
|
2210
|
-
):
|
|
3305
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>;
|
|
2211
3306
|
testIamPermissions(
|
|
2212
3307
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions,
|
|
2213
3308
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2242,8 +3337,8 @@ export namespace servicedirectory_v1 {
|
|
|
2242
3337
|
| BodyResponseCallback<Readable>
|
|
2243
3338
|
):
|
|
2244
3339
|
| void
|
|
2245
|
-
|
|
|
2246
|
-
|
|
|
3340
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$TestIamPermissionsResponse>>
|
|
3341
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2247
3342
|
let params = (paramsOrCallback ||
|
|
2248
3343
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Testiampermissions;
|
|
2249
3344
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2416,6 +3511,76 @@ export namespace servicedirectory_v1 {
|
|
|
2416
3511
|
|
|
2417
3512
|
/**
|
|
2418
3513
|
* Creates an endpoint, and returns the new endpoint.
|
|
3514
|
+
* @example
|
|
3515
|
+
* ```js
|
|
3516
|
+
* // Before running the sample:
|
|
3517
|
+
* // - Enable the API at:
|
|
3518
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
3519
|
+
* // - Login into gcloud by running:
|
|
3520
|
+
* // ```sh
|
|
3521
|
+
* // $ gcloud auth application-default login
|
|
3522
|
+
* // ```
|
|
3523
|
+
* // - Install the npm module by running:
|
|
3524
|
+
* // ```sh
|
|
3525
|
+
* // $ npm install googleapis
|
|
3526
|
+
* // ```
|
|
3527
|
+
*
|
|
3528
|
+
* const {google} = require('googleapis');
|
|
3529
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
3530
|
+
*
|
|
3531
|
+
* async function main() {
|
|
3532
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3533
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3534
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3535
|
+
* });
|
|
3536
|
+
*
|
|
3537
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3538
|
+
* const authClient = await auth.getClient();
|
|
3539
|
+
* google.options({auth: authClient});
|
|
3540
|
+
*
|
|
3541
|
+
* // Do the magic
|
|
3542
|
+
* const res =
|
|
3543
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.create(
|
|
3544
|
+
* {
|
|
3545
|
+
* // Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
|
|
3546
|
+
* endpointId: 'placeholder-value',
|
|
3547
|
+
* // Required. The resource name of the service that this endpoint provides.
|
|
3548
|
+
* parent:
|
|
3549
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
3550
|
+
*
|
|
3551
|
+
* // Request body metadata
|
|
3552
|
+
* requestBody: {
|
|
3553
|
+
* // request body parameters
|
|
3554
|
+
* // {
|
|
3555
|
+
* // "address": "my_address",
|
|
3556
|
+
* // "annotations": {},
|
|
3557
|
+
* // "name": "my_name",
|
|
3558
|
+
* // "network": "my_network",
|
|
3559
|
+
* // "port": 0,
|
|
3560
|
+
* // "uid": "my_uid"
|
|
3561
|
+
* // }
|
|
3562
|
+
* },
|
|
3563
|
+
* },
|
|
3564
|
+
* );
|
|
3565
|
+
* console.log(res.data);
|
|
3566
|
+
*
|
|
3567
|
+
* // Example response
|
|
3568
|
+
* // {
|
|
3569
|
+
* // "address": "my_address",
|
|
3570
|
+
* // "annotations": {},
|
|
3571
|
+
* // "name": "my_name",
|
|
3572
|
+
* // "network": "my_network",
|
|
3573
|
+
* // "port": 0,
|
|
3574
|
+
* // "uid": "my_uid"
|
|
3575
|
+
* // }
|
|
3576
|
+
* }
|
|
3577
|
+
*
|
|
3578
|
+
* main().catch(e => {
|
|
3579
|
+
* console.error(e);
|
|
3580
|
+
* throw e;
|
|
3581
|
+
* });
|
|
3582
|
+
*
|
|
3583
|
+
* ```
|
|
2419
3584
|
*
|
|
2420
3585
|
* @param params - Parameters for request
|
|
2421
3586
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2425,11 +3590,11 @@ export namespace servicedirectory_v1 {
|
|
|
2425
3590
|
create(
|
|
2426
3591
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create,
|
|
2427
3592
|
options: StreamMethodOptions
|
|
2428
|
-
):
|
|
3593
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2429
3594
|
create(
|
|
2430
3595
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create,
|
|
2431
3596
|
options?: MethodOptions
|
|
2432
|
-
):
|
|
3597
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>;
|
|
2433
3598
|
create(
|
|
2434
3599
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create,
|
|
2435
3600
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2458,7 +3623,10 @@ export namespace servicedirectory_v1 {
|
|
|
2458
3623
|
callback?:
|
|
2459
3624
|
| BodyResponseCallback<Schema$Endpoint>
|
|
2460
3625
|
| BodyResponseCallback<Readable>
|
|
2461
|
-
):
|
|
3626
|
+
):
|
|
3627
|
+
| void
|
|
3628
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>
|
|
3629
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2462
3630
|
let params = (paramsOrCallback ||
|
|
2463
3631
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Create;
|
|
2464
3632
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2506,6 +3674,53 @@ export namespace servicedirectory_v1 {
|
|
|
2506
3674
|
|
|
2507
3675
|
/**
|
|
2508
3676
|
* Deletes an endpoint.
|
|
3677
|
+
* @example
|
|
3678
|
+
* ```js
|
|
3679
|
+
* // Before running the sample:
|
|
3680
|
+
* // - Enable the API at:
|
|
3681
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
3682
|
+
* // - Login into gcloud by running:
|
|
3683
|
+
* // ```sh
|
|
3684
|
+
* // $ gcloud auth application-default login
|
|
3685
|
+
* // ```
|
|
3686
|
+
* // - Install the npm module by running:
|
|
3687
|
+
* // ```sh
|
|
3688
|
+
* // $ npm install googleapis
|
|
3689
|
+
* // ```
|
|
3690
|
+
*
|
|
3691
|
+
* const {google} = require('googleapis');
|
|
3692
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
3693
|
+
*
|
|
3694
|
+
* async function main() {
|
|
3695
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3696
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3697
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3698
|
+
* });
|
|
3699
|
+
*
|
|
3700
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3701
|
+
* const authClient = await auth.getClient();
|
|
3702
|
+
* google.options({auth: authClient});
|
|
3703
|
+
*
|
|
3704
|
+
* // Do the magic
|
|
3705
|
+
* const res =
|
|
3706
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.delete(
|
|
3707
|
+
* {
|
|
3708
|
+
* // Required. The name of the endpoint to delete.
|
|
3709
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service/endpoints/my-endpoint',
|
|
3710
|
+
* },
|
|
3711
|
+
* );
|
|
3712
|
+
* console.log(res.data);
|
|
3713
|
+
*
|
|
3714
|
+
* // Example response
|
|
3715
|
+
* // {}
|
|
3716
|
+
* }
|
|
3717
|
+
*
|
|
3718
|
+
* main().catch(e => {
|
|
3719
|
+
* console.error(e);
|
|
3720
|
+
* throw e;
|
|
3721
|
+
* });
|
|
3722
|
+
*
|
|
3723
|
+
* ```
|
|
2509
3724
|
*
|
|
2510
3725
|
* @param params - Parameters for request
|
|
2511
3726
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2515,11 +3730,11 @@ export namespace servicedirectory_v1 {
|
|
|
2515
3730
|
delete(
|
|
2516
3731
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete,
|
|
2517
3732
|
options: StreamMethodOptions
|
|
2518
|
-
):
|
|
3733
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2519
3734
|
delete(
|
|
2520
3735
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete,
|
|
2521
3736
|
options?: MethodOptions
|
|
2522
|
-
):
|
|
3737
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
2523
3738
|
delete(
|
|
2524
3739
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete,
|
|
2525
3740
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2548,7 +3763,10 @@ export namespace servicedirectory_v1 {
|
|
|
2548
3763
|
callback?:
|
|
2549
3764
|
| BodyResponseCallback<Schema$Empty>
|
|
2550
3765
|
| BodyResponseCallback<Readable>
|
|
2551
|
-
):
|
|
3766
|
+
):
|
|
3767
|
+
| void
|
|
3768
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
|
|
3769
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2552
3770
|
let params = (paramsOrCallback ||
|
|
2553
3771
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Delete;
|
|
2554
3772
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2593,6 +3811,60 @@ export namespace servicedirectory_v1 {
|
|
|
2593
3811
|
|
|
2594
3812
|
/**
|
|
2595
3813
|
* Gets an endpoint.
|
|
3814
|
+
* @example
|
|
3815
|
+
* ```js
|
|
3816
|
+
* // Before running the sample:
|
|
3817
|
+
* // - Enable the API at:
|
|
3818
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
3819
|
+
* // - Login into gcloud by running:
|
|
3820
|
+
* // ```sh
|
|
3821
|
+
* // $ gcloud auth application-default login
|
|
3822
|
+
* // ```
|
|
3823
|
+
* // - Install the npm module by running:
|
|
3824
|
+
* // ```sh
|
|
3825
|
+
* // $ npm install googleapis
|
|
3826
|
+
* // ```
|
|
3827
|
+
*
|
|
3828
|
+
* const {google} = require('googleapis');
|
|
3829
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
3830
|
+
*
|
|
3831
|
+
* async function main() {
|
|
3832
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3833
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3834
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3835
|
+
* });
|
|
3836
|
+
*
|
|
3837
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3838
|
+
* const authClient = await auth.getClient();
|
|
3839
|
+
* google.options({auth: authClient});
|
|
3840
|
+
*
|
|
3841
|
+
* // Do the magic
|
|
3842
|
+
* const res =
|
|
3843
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.get(
|
|
3844
|
+
* {
|
|
3845
|
+
* // Required. The name of the endpoint to get.
|
|
3846
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service/endpoints/my-endpoint',
|
|
3847
|
+
* },
|
|
3848
|
+
* );
|
|
3849
|
+
* console.log(res.data);
|
|
3850
|
+
*
|
|
3851
|
+
* // Example response
|
|
3852
|
+
* // {
|
|
3853
|
+
* // "address": "my_address",
|
|
3854
|
+
* // "annotations": {},
|
|
3855
|
+
* // "name": "my_name",
|
|
3856
|
+
* // "network": "my_network",
|
|
3857
|
+
* // "port": 0,
|
|
3858
|
+
* // "uid": "my_uid"
|
|
3859
|
+
* // }
|
|
3860
|
+
* }
|
|
3861
|
+
*
|
|
3862
|
+
* main().catch(e => {
|
|
3863
|
+
* console.error(e);
|
|
3864
|
+
* throw e;
|
|
3865
|
+
* });
|
|
3866
|
+
*
|
|
3867
|
+
* ```
|
|
2596
3868
|
*
|
|
2597
3869
|
* @param params - Parameters for request
|
|
2598
3870
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2602,11 +3874,11 @@ export namespace servicedirectory_v1 {
|
|
|
2602
3874
|
get(
|
|
2603
3875
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get,
|
|
2604
3876
|
options: StreamMethodOptions
|
|
2605
|
-
):
|
|
3877
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2606
3878
|
get(
|
|
2607
3879
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get,
|
|
2608
3880
|
options?: MethodOptions
|
|
2609
|
-
):
|
|
3881
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>;
|
|
2610
3882
|
get(
|
|
2611
3883
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get,
|
|
2612
3884
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2635,7 +3907,10 @@ export namespace servicedirectory_v1 {
|
|
|
2635
3907
|
callback?:
|
|
2636
3908
|
| BodyResponseCallback<Schema$Endpoint>
|
|
2637
3909
|
| BodyResponseCallback<Readable>
|
|
2638
|
-
):
|
|
3910
|
+
):
|
|
3911
|
+
| void
|
|
3912
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>
|
|
3913
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2639
3914
|
let params = (paramsOrCallback ||
|
|
2640
3915
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Get;
|
|
2641
3916
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2680,6 +3955,65 @@ export namespace servicedirectory_v1 {
|
|
|
2680
3955
|
|
|
2681
3956
|
/**
|
|
2682
3957
|
* Lists all endpoints.
|
|
3958
|
+
* @example
|
|
3959
|
+
* ```js
|
|
3960
|
+
* // Before running the sample:
|
|
3961
|
+
* // - Enable the API at:
|
|
3962
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
3963
|
+
* // - Login into gcloud by running:
|
|
3964
|
+
* // ```sh
|
|
3965
|
+
* // $ gcloud auth application-default login
|
|
3966
|
+
* // ```
|
|
3967
|
+
* // - Install the npm module by running:
|
|
3968
|
+
* // ```sh
|
|
3969
|
+
* // $ npm install googleapis
|
|
3970
|
+
* // ```
|
|
3971
|
+
*
|
|
3972
|
+
* const {google} = require('googleapis');
|
|
3973
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
3974
|
+
*
|
|
3975
|
+
* async function main() {
|
|
3976
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3977
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3978
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3979
|
+
* });
|
|
3980
|
+
*
|
|
3981
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3982
|
+
* const authClient = await auth.getClient();
|
|
3983
|
+
* google.options({auth: authClient});
|
|
3984
|
+
*
|
|
3985
|
+
* // Do the magic
|
|
3986
|
+
* const res =
|
|
3987
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.list(
|
|
3988
|
+
* {
|
|
3989
|
+
* // Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name`, `address`, `port`, or `annotations.` for map field * `` can be `<`, `\>`, `<=`, `\>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `annotations.owner` returns endpoints that have a annotation with the key `owner`, this is the same as `annotations:owner` * `annotations.protocol=gRPC` returns endpoints that have key/value `protocol=gRPC` * `address=192.108.1.105` returns endpoints that have this address * `port\>8080` returns endpoints that have port number larger than 8080 * `name\>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` returns endpoints that have name that is alphabetically later than the string, so "endpoint-e" is returned but "endpoint-a" is not * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that have `owner` in annotation key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that endpoint doesn't have a field called "doesnotexist". Since the filter does not match any endpoints, it returns no results For more information about filtering, see [API Filtering](https://aip.dev/160).
|
|
3990
|
+
* filter: 'placeholder-value',
|
|
3991
|
+
* // Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows values: `name`, `address`, `port` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.
|
|
3992
|
+
* orderBy: 'placeholder-value',
|
|
3993
|
+
* // Optional. The maximum number of items to return.
|
|
3994
|
+
* pageSize: 'placeholder-value',
|
|
3995
|
+
* // Optional. The next_page_token value returned from a previous List request, if any.
|
|
3996
|
+
* pageToken: 'placeholder-value',
|
|
3997
|
+
* // Required. The resource name of the service whose endpoints you'd like to list.
|
|
3998
|
+
* parent:
|
|
3999
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
4000
|
+
* },
|
|
4001
|
+
* );
|
|
4002
|
+
* console.log(res.data);
|
|
4003
|
+
*
|
|
4004
|
+
* // Example response
|
|
4005
|
+
* // {
|
|
4006
|
+
* // "endpoints": [],
|
|
4007
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
4008
|
+
* // }
|
|
4009
|
+
* }
|
|
4010
|
+
*
|
|
4011
|
+
* main().catch(e => {
|
|
4012
|
+
* console.error(e);
|
|
4013
|
+
* throw e;
|
|
4014
|
+
* });
|
|
4015
|
+
*
|
|
4016
|
+
* ```
|
|
2683
4017
|
*
|
|
2684
4018
|
* @param params - Parameters for request
|
|
2685
4019
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2689,11 +4023,11 @@ export namespace servicedirectory_v1 {
|
|
|
2689
4023
|
list(
|
|
2690
4024
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List,
|
|
2691
4025
|
options: StreamMethodOptions
|
|
2692
|
-
):
|
|
4026
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2693
4027
|
list(
|
|
2694
4028
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List,
|
|
2695
4029
|
options?: MethodOptions
|
|
2696
|
-
):
|
|
4030
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$ListEndpointsResponse>>;
|
|
2697
4031
|
list(
|
|
2698
4032
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List,
|
|
2699
4033
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2726,8 +4060,8 @@ export namespace servicedirectory_v1 {
|
|
|
2726
4060
|
| BodyResponseCallback<Readable>
|
|
2727
4061
|
):
|
|
2728
4062
|
| void
|
|
2729
|
-
|
|
|
2730
|
-
|
|
|
4063
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$ListEndpointsResponse>>
|
|
4064
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2731
4065
|
let params = (paramsOrCallback ||
|
|
2732
4066
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$List;
|
|
2733
4067
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -2775,6 +4109,75 @@ export namespace servicedirectory_v1 {
|
|
|
2775
4109
|
|
|
2776
4110
|
/**
|
|
2777
4111
|
* Updates an endpoint.
|
|
4112
|
+
* @example
|
|
4113
|
+
* ```js
|
|
4114
|
+
* // Before running the sample:
|
|
4115
|
+
* // - Enable the API at:
|
|
4116
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
4117
|
+
* // - Login into gcloud by running:
|
|
4118
|
+
* // ```sh
|
|
4119
|
+
* // $ gcloud auth application-default login
|
|
4120
|
+
* // ```
|
|
4121
|
+
* // - Install the npm module by running:
|
|
4122
|
+
* // ```sh
|
|
4123
|
+
* // $ npm install googleapis
|
|
4124
|
+
* // ```
|
|
4125
|
+
*
|
|
4126
|
+
* const {google} = require('googleapis');
|
|
4127
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
4128
|
+
*
|
|
4129
|
+
* async function main() {
|
|
4130
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4131
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4132
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4133
|
+
* });
|
|
4134
|
+
*
|
|
4135
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4136
|
+
* const authClient = await auth.getClient();
|
|
4137
|
+
* google.options({auth: authClient});
|
|
4138
|
+
*
|
|
4139
|
+
* // Do the magic
|
|
4140
|
+
* const res =
|
|
4141
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.patch(
|
|
4142
|
+
* {
|
|
4143
|
+
* // Immutable. The resource name for the endpoint in the format `projects/x/locations/x/namespaces/x/services/x/endpoints/x`.
|
|
4144
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service/endpoints/my-endpoint',
|
|
4145
|
+
* // Required. List of fields to be updated in this request.
|
|
4146
|
+
* updateMask: 'placeholder-value',
|
|
4147
|
+
*
|
|
4148
|
+
* // Request body metadata
|
|
4149
|
+
* requestBody: {
|
|
4150
|
+
* // request body parameters
|
|
4151
|
+
* // {
|
|
4152
|
+
* // "address": "my_address",
|
|
4153
|
+
* // "annotations": {},
|
|
4154
|
+
* // "name": "my_name",
|
|
4155
|
+
* // "network": "my_network",
|
|
4156
|
+
* // "port": 0,
|
|
4157
|
+
* // "uid": "my_uid"
|
|
4158
|
+
* // }
|
|
4159
|
+
* },
|
|
4160
|
+
* },
|
|
4161
|
+
* );
|
|
4162
|
+
* console.log(res.data);
|
|
4163
|
+
*
|
|
4164
|
+
* // Example response
|
|
4165
|
+
* // {
|
|
4166
|
+
* // "address": "my_address",
|
|
4167
|
+
* // "annotations": {},
|
|
4168
|
+
* // "name": "my_name",
|
|
4169
|
+
* // "network": "my_network",
|
|
4170
|
+
* // "port": 0,
|
|
4171
|
+
* // "uid": "my_uid"
|
|
4172
|
+
* // }
|
|
4173
|
+
* }
|
|
4174
|
+
*
|
|
4175
|
+
* main().catch(e => {
|
|
4176
|
+
* console.error(e);
|
|
4177
|
+
* throw e;
|
|
4178
|
+
* });
|
|
4179
|
+
*
|
|
4180
|
+
* ```
|
|
2778
4181
|
*
|
|
2779
4182
|
* @param params - Parameters for request
|
|
2780
4183
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2784,11 +4187,11 @@ export namespace servicedirectory_v1 {
|
|
|
2784
4187
|
patch(
|
|
2785
4188
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch,
|
|
2786
4189
|
options: StreamMethodOptions
|
|
2787
|
-
):
|
|
4190
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2788
4191
|
patch(
|
|
2789
4192
|
params?: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch,
|
|
2790
4193
|
options?: MethodOptions
|
|
2791
|
-
):
|
|
4194
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>;
|
|
2792
4195
|
patch(
|
|
2793
4196
|
params: Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch,
|
|
2794
4197
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -2817,7 +4220,10 @@ export namespace servicedirectory_v1 {
|
|
|
2817
4220
|
callback?:
|
|
2818
4221
|
| BodyResponseCallback<Schema$Endpoint>
|
|
2819
4222
|
| BodyResponseCallback<Readable>
|
|
2820
|
-
):
|
|
4223
|
+
):
|
|
4224
|
+
| void
|
|
4225
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>
|
|
4226
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
2821
4227
|
let params = (paramsOrCallback ||
|
|
2822
4228
|
{}) as Params$Resource$Projects$Locations$Namespaces$Services$Endpoints$Patch;
|
|
2823
4229
|
let options = (optionsOrCallback || {}) as MethodOptions;
|