@googleapis/servicedirectory 4.0.1 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/v1.d.ts +1355 -1
- package/build/v1.js +12 -1
- package/build/v1.js.map +1 -1
- package/build/v1beta1.d.ts +1563 -1
- package/build/v1beta1.js +14 -1
- package/build/v1beta1.js.map +1 -1
- package/package.json +4 -4
- package/v1.ts +1355 -0
- package/v1beta1.ts +1563 -0
package/build/v1.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
|
|
3
2
|
import { Readable } from 'stream';
|
|
4
3
|
export declare namespace servicedirectory_v1 {
|
|
@@ -360,6 +359,56 @@ export declare namespace servicedirectory_v1 {
|
|
|
360
359
|
constructor(context: APIRequestContext);
|
|
361
360
|
/**
|
|
362
361
|
* Gets information about a location.
|
|
362
|
+
* @example
|
|
363
|
+
* ```js
|
|
364
|
+
* // Before running the sample:
|
|
365
|
+
* // - Enable the API at:
|
|
366
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
367
|
+
* // - Login into gcloud by running:
|
|
368
|
+
* // ```sh
|
|
369
|
+
* // $ gcloud auth application-default login
|
|
370
|
+
* // ```
|
|
371
|
+
* // - Install the npm module by running:
|
|
372
|
+
* // ```sh
|
|
373
|
+
* // $ npm install googleapis
|
|
374
|
+
* // ```
|
|
375
|
+
*
|
|
376
|
+
* const {google} = require('googleapis');
|
|
377
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
378
|
+
*
|
|
379
|
+
* async function main() {
|
|
380
|
+
* const auth = new google.auth.GoogleAuth({
|
|
381
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
382
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
383
|
+
* });
|
|
384
|
+
*
|
|
385
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
386
|
+
* const authClient = await auth.getClient();
|
|
387
|
+
* google.options({auth: authClient});
|
|
388
|
+
*
|
|
389
|
+
* // Do the magic
|
|
390
|
+
* const res = await servicedirectory.projects.locations.get({
|
|
391
|
+
* // Resource name for the location.
|
|
392
|
+
* name: 'projects/my-project/locations/my-location',
|
|
393
|
+
* });
|
|
394
|
+
* console.log(res.data);
|
|
395
|
+
*
|
|
396
|
+
* // Example response
|
|
397
|
+
* // {
|
|
398
|
+
* // "displayName": "my_displayName",
|
|
399
|
+
* // "labels": {},
|
|
400
|
+
* // "locationId": "my_locationId",
|
|
401
|
+
* // "metadata": {},
|
|
402
|
+
* // "name": "my_name"
|
|
403
|
+
* // }
|
|
404
|
+
* }
|
|
405
|
+
*
|
|
406
|
+
* main().catch(e => {
|
|
407
|
+
* console.error(e);
|
|
408
|
+
* throw e;
|
|
409
|
+
* });
|
|
410
|
+
*
|
|
411
|
+
* ```
|
|
363
412
|
*
|
|
364
413
|
* @param params - Parameters for request
|
|
365
414
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -374,6 +423,61 @@ export declare namespace servicedirectory_v1 {
|
|
|
374
423
|
get(callback: BodyResponseCallback<Schema$Location>): void;
|
|
375
424
|
/**
|
|
376
425
|
* Lists information about the supported locations for this service.
|
|
426
|
+
* @example
|
|
427
|
+
* ```js
|
|
428
|
+
* // Before running the sample:
|
|
429
|
+
* // - Enable the API at:
|
|
430
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
431
|
+
* // - Login into gcloud by running:
|
|
432
|
+
* // ```sh
|
|
433
|
+
* // $ gcloud auth application-default login
|
|
434
|
+
* // ```
|
|
435
|
+
* // - Install the npm module by running:
|
|
436
|
+
* // ```sh
|
|
437
|
+
* // $ npm install googleapis
|
|
438
|
+
* // ```
|
|
439
|
+
*
|
|
440
|
+
* const {google} = require('googleapis');
|
|
441
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
442
|
+
*
|
|
443
|
+
* async function main() {
|
|
444
|
+
* const auth = new google.auth.GoogleAuth({
|
|
445
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
446
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
447
|
+
* });
|
|
448
|
+
*
|
|
449
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
450
|
+
* const authClient = await auth.getClient();
|
|
451
|
+
* google.options({auth: authClient});
|
|
452
|
+
*
|
|
453
|
+
* // Do the magic
|
|
454
|
+
* const res = await servicedirectory.projects.locations.list({
|
|
455
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
456
|
+
* extraLocationTypes: 'placeholder-value',
|
|
457
|
+
* // 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).
|
|
458
|
+
* filter: 'placeholder-value',
|
|
459
|
+
* // The resource that owns the locations collection, if applicable.
|
|
460
|
+
* name: 'projects/my-project',
|
|
461
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
462
|
+
* pageSize: 'placeholder-value',
|
|
463
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
464
|
+
* pageToken: 'placeholder-value',
|
|
465
|
+
* });
|
|
466
|
+
* console.log(res.data);
|
|
467
|
+
*
|
|
468
|
+
* // Example response
|
|
469
|
+
* // {
|
|
470
|
+
* // "locations": [],
|
|
471
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
472
|
+
* // }
|
|
473
|
+
* }
|
|
474
|
+
*
|
|
475
|
+
* main().catch(e => {
|
|
476
|
+
* console.error(e);
|
|
477
|
+
* throw e;
|
|
478
|
+
* });
|
|
479
|
+
*
|
|
480
|
+
* ```
|
|
377
481
|
*
|
|
378
482
|
* @param params - Parameters for request
|
|
379
483
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -421,6 +525,66 @@ export declare namespace servicedirectory_v1 {
|
|
|
421
525
|
constructor(context: APIRequestContext);
|
|
422
526
|
/**
|
|
423
527
|
* Creates a namespace, and returns the new namespace.
|
|
528
|
+
* @example
|
|
529
|
+
* ```js
|
|
530
|
+
* // Before running the sample:
|
|
531
|
+
* // - Enable the API at:
|
|
532
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
533
|
+
* // - Login into gcloud by running:
|
|
534
|
+
* // ```sh
|
|
535
|
+
* // $ gcloud auth application-default login
|
|
536
|
+
* // ```
|
|
537
|
+
* // - Install the npm module by running:
|
|
538
|
+
* // ```sh
|
|
539
|
+
* // $ npm install googleapis
|
|
540
|
+
* // ```
|
|
541
|
+
*
|
|
542
|
+
* const {google} = require('googleapis');
|
|
543
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
544
|
+
*
|
|
545
|
+
* async function main() {
|
|
546
|
+
* const auth = new google.auth.GoogleAuth({
|
|
547
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
548
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
549
|
+
* });
|
|
550
|
+
*
|
|
551
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
552
|
+
* const authClient = await auth.getClient();
|
|
553
|
+
* google.options({auth: authClient});
|
|
554
|
+
*
|
|
555
|
+
* // Do the magic
|
|
556
|
+
* const res = await servicedirectory.projects.locations.namespaces.create({
|
|
557
|
+
* // 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.
|
|
558
|
+
* namespaceId: 'placeholder-value',
|
|
559
|
+
* // Required. The resource name of the project and location the namespace will be created in.
|
|
560
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
561
|
+
*
|
|
562
|
+
* // Request body metadata
|
|
563
|
+
* requestBody: {
|
|
564
|
+
* // request body parameters
|
|
565
|
+
* // {
|
|
566
|
+
* // "labels": {},
|
|
567
|
+
* // "name": "my_name",
|
|
568
|
+
* // "uid": "my_uid"
|
|
569
|
+
* // }
|
|
570
|
+
* },
|
|
571
|
+
* });
|
|
572
|
+
* console.log(res.data);
|
|
573
|
+
*
|
|
574
|
+
* // Example response
|
|
575
|
+
* // {
|
|
576
|
+
* // "labels": {},
|
|
577
|
+
* // "name": "my_name",
|
|
578
|
+
* // "uid": "my_uid"
|
|
579
|
+
* // }
|
|
580
|
+
* }
|
|
581
|
+
*
|
|
582
|
+
* main().catch(e => {
|
|
583
|
+
* console.error(e);
|
|
584
|
+
* throw e;
|
|
585
|
+
* });
|
|
586
|
+
*
|
|
587
|
+
* ```
|
|
424
588
|
*
|
|
425
589
|
* @param params - Parameters for request
|
|
426
590
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -435,6 +599,50 @@ export declare namespace servicedirectory_v1 {
|
|
|
435
599
|
create(callback: BodyResponseCallback<Schema$Namespace>): void;
|
|
436
600
|
/**
|
|
437
601
|
* Deletes a namespace. This also deletes all services and endpoints in the namespace.
|
|
602
|
+
* @example
|
|
603
|
+
* ```js
|
|
604
|
+
* // Before running the sample:
|
|
605
|
+
* // - Enable the API at:
|
|
606
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
607
|
+
* // - Login into gcloud by running:
|
|
608
|
+
* // ```sh
|
|
609
|
+
* // $ gcloud auth application-default login
|
|
610
|
+
* // ```
|
|
611
|
+
* // - Install the npm module by running:
|
|
612
|
+
* // ```sh
|
|
613
|
+
* // $ npm install googleapis
|
|
614
|
+
* // ```
|
|
615
|
+
*
|
|
616
|
+
* const {google} = require('googleapis');
|
|
617
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
618
|
+
*
|
|
619
|
+
* async function main() {
|
|
620
|
+
* const auth = new google.auth.GoogleAuth({
|
|
621
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
622
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
623
|
+
* });
|
|
624
|
+
*
|
|
625
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
626
|
+
* const authClient = await auth.getClient();
|
|
627
|
+
* google.options({auth: authClient});
|
|
628
|
+
*
|
|
629
|
+
* // Do the magic
|
|
630
|
+
* const res = await servicedirectory.projects.locations.namespaces.delete({
|
|
631
|
+
* // Required. The name of the namespace to delete.
|
|
632
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
633
|
+
* });
|
|
634
|
+
* console.log(res.data);
|
|
635
|
+
*
|
|
636
|
+
* // Example response
|
|
637
|
+
* // {}
|
|
638
|
+
* }
|
|
639
|
+
*
|
|
640
|
+
* main().catch(e => {
|
|
641
|
+
* console.error(e);
|
|
642
|
+
* throw e;
|
|
643
|
+
* });
|
|
644
|
+
*
|
|
645
|
+
* ```
|
|
438
646
|
*
|
|
439
647
|
* @param params - Parameters for request
|
|
440
648
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -449,6 +657,54 @@ export declare namespace servicedirectory_v1 {
|
|
|
449
657
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
450
658
|
/**
|
|
451
659
|
* Gets a namespace.
|
|
660
|
+
* @example
|
|
661
|
+
* ```js
|
|
662
|
+
* // Before running the sample:
|
|
663
|
+
* // - Enable the API at:
|
|
664
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
665
|
+
* // - Login into gcloud by running:
|
|
666
|
+
* // ```sh
|
|
667
|
+
* // $ gcloud auth application-default login
|
|
668
|
+
* // ```
|
|
669
|
+
* // - Install the npm module by running:
|
|
670
|
+
* // ```sh
|
|
671
|
+
* // $ npm install googleapis
|
|
672
|
+
* // ```
|
|
673
|
+
*
|
|
674
|
+
* const {google} = require('googleapis');
|
|
675
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
676
|
+
*
|
|
677
|
+
* async function main() {
|
|
678
|
+
* const auth = new google.auth.GoogleAuth({
|
|
679
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
680
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
681
|
+
* });
|
|
682
|
+
*
|
|
683
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
684
|
+
* const authClient = await auth.getClient();
|
|
685
|
+
* google.options({auth: authClient});
|
|
686
|
+
*
|
|
687
|
+
* // Do the magic
|
|
688
|
+
* const res = await servicedirectory.projects.locations.namespaces.get({
|
|
689
|
+
* // Required. The name of the namespace to retrieve.
|
|
690
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
691
|
+
* });
|
|
692
|
+
* console.log(res.data);
|
|
693
|
+
*
|
|
694
|
+
* // Example response
|
|
695
|
+
* // {
|
|
696
|
+
* // "labels": {},
|
|
697
|
+
* // "name": "my_name",
|
|
698
|
+
* // "uid": "my_uid"
|
|
699
|
+
* // }
|
|
700
|
+
* }
|
|
701
|
+
*
|
|
702
|
+
* main().catch(e => {
|
|
703
|
+
* console.error(e);
|
|
704
|
+
* throw e;
|
|
705
|
+
* });
|
|
706
|
+
*
|
|
707
|
+
* ```
|
|
452
708
|
*
|
|
453
709
|
* @param params - Parameters for request
|
|
454
710
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -463,6 +719,65 @@ export declare namespace servicedirectory_v1 {
|
|
|
463
719
|
get(callback: BodyResponseCallback<Schema$Namespace>): void;
|
|
464
720
|
/**
|
|
465
721
|
* Gets the IAM Policy for a resource (namespace or service only).
|
|
722
|
+
* @example
|
|
723
|
+
* ```js
|
|
724
|
+
* // Before running the sample:
|
|
725
|
+
* // - Enable the API at:
|
|
726
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
727
|
+
* // - Login into gcloud by running:
|
|
728
|
+
* // ```sh
|
|
729
|
+
* // $ gcloud auth application-default login
|
|
730
|
+
* // ```
|
|
731
|
+
* // - Install the npm module by running:
|
|
732
|
+
* // ```sh
|
|
733
|
+
* // $ npm install googleapis
|
|
734
|
+
* // ```
|
|
735
|
+
*
|
|
736
|
+
* const {google} = require('googleapis');
|
|
737
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
738
|
+
*
|
|
739
|
+
* async function main() {
|
|
740
|
+
* const auth = new google.auth.GoogleAuth({
|
|
741
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
742
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
743
|
+
* });
|
|
744
|
+
*
|
|
745
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
746
|
+
* const authClient = await auth.getClient();
|
|
747
|
+
* google.options({auth: authClient});
|
|
748
|
+
*
|
|
749
|
+
* // Do the magic
|
|
750
|
+
* const res = await servicedirectory.projects.locations.namespaces.getIamPolicy(
|
|
751
|
+
* {
|
|
752
|
+
* // 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.
|
|
753
|
+
* resource:
|
|
754
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
755
|
+
*
|
|
756
|
+
* // Request body metadata
|
|
757
|
+
* requestBody: {
|
|
758
|
+
* // request body parameters
|
|
759
|
+
* // {
|
|
760
|
+
* // "options": {}
|
|
761
|
+
* // }
|
|
762
|
+
* },
|
|
763
|
+
* },
|
|
764
|
+
* );
|
|
765
|
+
* console.log(res.data);
|
|
766
|
+
*
|
|
767
|
+
* // Example response
|
|
768
|
+
* // {
|
|
769
|
+
* // "bindings": [],
|
|
770
|
+
* // "etag": "my_etag",
|
|
771
|
+
* // "version": 0
|
|
772
|
+
* // }
|
|
773
|
+
* }
|
|
774
|
+
*
|
|
775
|
+
* main().catch(e => {
|
|
776
|
+
* console.error(e);
|
|
777
|
+
* throw e;
|
|
778
|
+
* });
|
|
779
|
+
*
|
|
780
|
+
* ```
|
|
466
781
|
*
|
|
467
782
|
* @param params - Parameters for request
|
|
468
783
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -477,6 +792,61 @@ export declare namespace servicedirectory_v1 {
|
|
|
477
792
|
getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
|
|
478
793
|
/**
|
|
479
794
|
* Lists all namespaces.
|
|
795
|
+
* @example
|
|
796
|
+
* ```js
|
|
797
|
+
* // Before running the sample:
|
|
798
|
+
* // - Enable the API at:
|
|
799
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
800
|
+
* // - Login into gcloud by running:
|
|
801
|
+
* // ```sh
|
|
802
|
+
* // $ gcloud auth application-default login
|
|
803
|
+
* // ```
|
|
804
|
+
* // - Install the npm module by running:
|
|
805
|
+
* // ```sh
|
|
806
|
+
* // $ npm install googleapis
|
|
807
|
+
* // ```
|
|
808
|
+
*
|
|
809
|
+
* const {google} = require('googleapis');
|
|
810
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
811
|
+
*
|
|
812
|
+
* async function main() {
|
|
813
|
+
* const auth = new google.auth.GoogleAuth({
|
|
814
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
815
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
816
|
+
* });
|
|
817
|
+
*
|
|
818
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
819
|
+
* const authClient = await auth.getClient();
|
|
820
|
+
* google.options({auth: authClient});
|
|
821
|
+
*
|
|
822
|
+
* // Do the magic
|
|
823
|
+
* const res = await servicedirectory.projects.locations.namespaces.list({
|
|
824
|
+
* // 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).
|
|
825
|
+
* filter: 'placeholder-value',
|
|
826
|
+
* // 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.
|
|
827
|
+
* orderBy: 'placeholder-value',
|
|
828
|
+
* // Optional. The maximum number of items to return.
|
|
829
|
+
* pageSize: 'placeholder-value',
|
|
830
|
+
* // Optional. The next_page_token value returned from a previous List request, if any.
|
|
831
|
+
* pageToken: 'placeholder-value',
|
|
832
|
+
* // Required. The resource name of the project and location whose namespaces you'd like to list.
|
|
833
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
834
|
+
* });
|
|
835
|
+
* console.log(res.data);
|
|
836
|
+
*
|
|
837
|
+
* // Example response
|
|
838
|
+
* // {
|
|
839
|
+
* // "namespaces": [],
|
|
840
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
841
|
+
* // }
|
|
842
|
+
* }
|
|
843
|
+
*
|
|
844
|
+
* main().catch(e => {
|
|
845
|
+
* console.error(e);
|
|
846
|
+
* throw e;
|
|
847
|
+
* });
|
|
848
|
+
*
|
|
849
|
+
* ```
|
|
480
850
|
*
|
|
481
851
|
* @param params - Parameters for request
|
|
482
852
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -491,6 +861,66 @@ export declare namespace servicedirectory_v1 {
|
|
|
491
861
|
list(callback: BodyResponseCallback<Schema$ListNamespacesResponse>): void;
|
|
492
862
|
/**
|
|
493
863
|
* Updates a namespace.
|
|
864
|
+
* @example
|
|
865
|
+
* ```js
|
|
866
|
+
* // Before running the sample:
|
|
867
|
+
* // - Enable the API at:
|
|
868
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
869
|
+
* // - Login into gcloud by running:
|
|
870
|
+
* // ```sh
|
|
871
|
+
* // $ gcloud auth application-default login
|
|
872
|
+
* // ```
|
|
873
|
+
* // - Install the npm module by running:
|
|
874
|
+
* // ```sh
|
|
875
|
+
* // $ npm install googleapis
|
|
876
|
+
* // ```
|
|
877
|
+
*
|
|
878
|
+
* const {google} = require('googleapis');
|
|
879
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
880
|
+
*
|
|
881
|
+
* async function main() {
|
|
882
|
+
* const auth = new google.auth.GoogleAuth({
|
|
883
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
884
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
885
|
+
* });
|
|
886
|
+
*
|
|
887
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
888
|
+
* const authClient = await auth.getClient();
|
|
889
|
+
* google.options({auth: authClient});
|
|
890
|
+
*
|
|
891
|
+
* // Do the magic
|
|
892
|
+
* const res = await servicedirectory.projects.locations.namespaces.patch({
|
|
893
|
+
* // Immutable. The resource name for the namespace in the format `projects/x/locations/x/namespaces/x`.
|
|
894
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
895
|
+
* // Required. List of fields to be updated in this request.
|
|
896
|
+
* updateMask: 'placeholder-value',
|
|
897
|
+
*
|
|
898
|
+
* // Request body metadata
|
|
899
|
+
* requestBody: {
|
|
900
|
+
* // request body parameters
|
|
901
|
+
* // {
|
|
902
|
+
* // "labels": {},
|
|
903
|
+
* // "name": "my_name",
|
|
904
|
+
* // "uid": "my_uid"
|
|
905
|
+
* // }
|
|
906
|
+
* },
|
|
907
|
+
* });
|
|
908
|
+
* console.log(res.data);
|
|
909
|
+
*
|
|
910
|
+
* // Example response
|
|
911
|
+
* // {
|
|
912
|
+
* // "labels": {},
|
|
913
|
+
* // "name": "my_name",
|
|
914
|
+
* // "uid": "my_uid"
|
|
915
|
+
* // }
|
|
916
|
+
* }
|
|
917
|
+
*
|
|
918
|
+
* main().catch(e => {
|
|
919
|
+
* console.error(e);
|
|
920
|
+
* throw e;
|
|
921
|
+
* });
|
|
922
|
+
*
|
|
923
|
+
* ```
|
|
494
924
|
*
|
|
495
925
|
* @param params - Parameters for request
|
|
496
926
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -505,6 +935,65 @@ export declare namespace servicedirectory_v1 {
|
|
|
505
935
|
patch(callback: BodyResponseCallback<Schema$Namespace>): void;
|
|
506
936
|
/**
|
|
507
937
|
* Sets the IAM Policy for a resource (namespace or service only).
|
|
938
|
+
* @example
|
|
939
|
+
* ```js
|
|
940
|
+
* // Before running the sample:
|
|
941
|
+
* // - Enable the API at:
|
|
942
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
943
|
+
* // - Login into gcloud by running:
|
|
944
|
+
* // ```sh
|
|
945
|
+
* // $ gcloud auth application-default login
|
|
946
|
+
* // ```
|
|
947
|
+
* // - Install the npm module by running:
|
|
948
|
+
* // ```sh
|
|
949
|
+
* // $ npm install googleapis
|
|
950
|
+
* // ```
|
|
951
|
+
*
|
|
952
|
+
* const {google} = require('googleapis');
|
|
953
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
954
|
+
*
|
|
955
|
+
* async function main() {
|
|
956
|
+
* const auth = new google.auth.GoogleAuth({
|
|
957
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
958
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
959
|
+
* });
|
|
960
|
+
*
|
|
961
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
962
|
+
* const authClient = await auth.getClient();
|
|
963
|
+
* google.options({auth: authClient});
|
|
964
|
+
*
|
|
965
|
+
* // Do the magic
|
|
966
|
+
* const res = await servicedirectory.projects.locations.namespaces.setIamPolicy(
|
|
967
|
+
* {
|
|
968
|
+
* // 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.
|
|
969
|
+
* resource:
|
|
970
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
971
|
+
*
|
|
972
|
+
* // Request body metadata
|
|
973
|
+
* requestBody: {
|
|
974
|
+
* // request body parameters
|
|
975
|
+
* // {
|
|
976
|
+
* // "policy": {}
|
|
977
|
+
* // }
|
|
978
|
+
* },
|
|
979
|
+
* },
|
|
980
|
+
* );
|
|
981
|
+
* console.log(res.data);
|
|
982
|
+
*
|
|
983
|
+
* // Example response
|
|
984
|
+
* // {
|
|
985
|
+
* // "bindings": [],
|
|
986
|
+
* // "etag": "my_etag",
|
|
987
|
+
* // "version": 0
|
|
988
|
+
* // }
|
|
989
|
+
* }
|
|
990
|
+
*
|
|
991
|
+
* main().catch(e => {
|
|
992
|
+
* console.error(e);
|
|
993
|
+
* throw e;
|
|
994
|
+
* });
|
|
995
|
+
*
|
|
996
|
+
* ```
|
|
508
997
|
*
|
|
509
998
|
* @param params - Parameters for request
|
|
510
999
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -519,6 +1008,62 @@ export declare namespace servicedirectory_v1 {
|
|
|
519
1008
|
setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
|
|
520
1009
|
/**
|
|
521
1010
|
* Tests IAM permissions for a resource (namespace or service only).
|
|
1011
|
+
* @example
|
|
1012
|
+
* ```js
|
|
1013
|
+
* // Before running the sample:
|
|
1014
|
+
* // - Enable the API at:
|
|
1015
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1016
|
+
* // - Login into gcloud by running:
|
|
1017
|
+
* // ```sh
|
|
1018
|
+
* // $ gcloud auth application-default login
|
|
1019
|
+
* // ```
|
|
1020
|
+
* // - Install the npm module by running:
|
|
1021
|
+
* // ```sh
|
|
1022
|
+
* // $ npm install googleapis
|
|
1023
|
+
* // ```
|
|
1024
|
+
*
|
|
1025
|
+
* const {google} = require('googleapis');
|
|
1026
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1027
|
+
*
|
|
1028
|
+
* async function main() {
|
|
1029
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1030
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1031
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1032
|
+
* });
|
|
1033
|
+
*
|
|
1034
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1035
|
+
* const authClient = await auth.getClient();
|
|
1036
|
+
* google.options({auth: authClient});
|
|
1037
|
+
*
|
|
1038
|
+
* // Do the magic
|
|
1039
|
+
* const res =
|
|
1040
|
+
* await servicedirectory.projects.locations.namespaces.testIamPermissions({
|
|
1041
|
+
* // 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.
|
|
1042
|
+
* resource:
|
|
1043
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
1044
|
+
*
|
|
1045
|
+
* // Request body metadata
|
|
1046
|
+
* requestBody: {
|
|
1047
|
+
* // request body parameters
|
|
1048
|
+
* // {
|
|
1049
|
+
* // "permissions": []
|
|
1050
|
+
* // }
|
|
1051
|
+
* },
|
|
1052
|
+
* });
|
|
1053
|
+
* console.log(res.data);
|
|
1054
|
+
*
|
|
1055
|
+
* // Example response
|
|
1056
|
+
* // {
|
|
1057
|
+
* // "permissions": []
|
|
1058
|
+
* // }
|
|
1059
|
+
* }
|
|
1060
|
+
*
|
|
1061
|
+
* main().catch(e => {
|
|
1062
|
+
* console.error(e);
|
|
1063
|
+
* throw e;
|
|
1064
|
+
* });
|
|
1065
|
+
*
|
|
1066
|
+
* ```
|
|
522
1067
|
*
|
|
523
1068
|
* @param params - Parameters for request
|
|
524
1069
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -630,6 +1175,70 @@ export declare namespace servicedirectory_v1 {
|
|
|
630
1175
|
constructor(context: APIRequestContext);
|
|
631
1176
|
/**
|
|
632
1177
|
* Creates a service, and returns the new service.
|
|
1178
|
+
* @example
|
|
1179
|
+
* ```js
|
|
1180
|
+
* // Before running the sample:
|
|
1181
|
+
* // - Enable the API at:
|
|
1182
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1183
|
+
* // - Login into gcloud by running:
|
|
1184
|
+
* // ```sh
|
|
1185
|
+
* // $ gcloud auth application-default login
|
|
1186
|
+
* // ```
|
|
1187
|
+
* // - Install the npm module by running:
|
|
1188
|
+
* // ```sh
|
|
1189
|
+
* // $ npm install googleapis
|
|
1190
|
+
* // ```
|
|
1191
|
+
*
|
|
1192
|
+
* const {google} = require('googleapis');
|
|
1193
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1194
|
+
*
|
|
1195
|
+
* async function main() {
|
|
1196
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1197
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1198
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1199
|
+
* });
|
|
1200
|
+
*
|
|
1201
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1202
|
+
* const authClient = await auth.getClient();
|
|
1203
|
+
* google.options({auth: authClient});
|
|
1204
|
+
*
|
|
1205
|
+
* // Do the magic
|
|
1206
|
+
* const res =
|
|
1207
|
+
* await servicedirectory.projects.locations.namespaces.services.create({
|
|
1208
|
+
* // Required. The resource name of the namespace this service will belong to.
|
|
1209
|
+
* parent:
|
|
1210
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
1211
|
+
* // 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.
|
|
1212
|
+
* serviceId: 'placeholder-value',
|
|
1213
|
+
*
|
|
1214
|
+
* // Request body metadata
|
|
1215
|
+
* requestBody: {
|
|
1216
|
+
* // request body parameters
|
|
1217
|
+
* // {
|
|
1218
|
+
* // "annotations": {},
|
|
1219
|
+
* // "endpoints": [],
|
|
1220
|
+
* // "name": "my_name",
|
|
1221
|
+
* // "uid": "my_uid"
|
|
1222
|
+
* // }
|
|
1223
|
+
* },
|
|
1224
|
+
* });
|
|
1225
|
+
* console.log(res.data);
|
|
1226
|
+
*
|
|
1227
|
+
* // Example response
|
|
1228
|
+
* // {
|
|
1229
|
+
* // "annotations": {},
|
|
1230
|
+
* // "endpoints": [],
|
|
1231
|
+
* // "name": "my_name",
|
|
1232
|
+
* // "uid": "my_uid"
|
|
1233
|
+
* // }
|
|
1234
|
+
* }
|
|
1235
|
+
*
|
|
1236
|
+
* main().catch(e => {
|
|
1237
|
+
* console.error(e);
|
|
1238
|
+
* throw e;
|
|
1239
|
+
* });
|
|
1240
|
+
*
|
|
1241
|
+
* ```
|
|
633
1242
|
*
|
|
634
1243
|
* @param params - Parameters for request
|
|
635
1244
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -644,6 +1253,51 @@ export declare namespace servicedirectory_v1 {
|
|
|
644
1253
|
create(callback: BodyResponseCallback<Schema$Service>): void;
|
|
645
1254
|
/**
|
|
646
1255
|
* Deletes a service. This also deletes all endpoints associated with the service.
|
|
1256
|
+
* @example
|
|
1257
|
+
* ```js
|
|
1258
|
+
* // Before running the sample:
|
|
1259
|
+
* // - Enable the API at:
|
|
1260
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1261
|
+
* // - Login into gcloud by running:
|
|
1262
|
+
* // ```sh
|
|
1263
|
+
* // $ gcloud auth application-default login
|
|
1264
|
+
* // ```
|
|
1265
|
+
* // - Install the npm module by running:
|
|
1266
|
+
* // ```sh
|
|
1267
|
+
* // $ npm install googleapis
|
|
1268
|
+
* // ```
|
|
1269
|
+
*
|
|
1270
|
+
* const {google} = require('googleapis');
|
|
1271
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1272
|
+
*
|
|
1273
|
+
* async function main() {
|
|
1274
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1275
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1276
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1277
|
+
* });
|
|
1278
|
+
*
|
|
1279
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1280
|
+
* const authClient = await auth.getClient();
|
|
1281
|
+
* google.options({auth: authClient});
|
|
1282
|
+
*
|
|
1283
|
+
* // Do the magic
|
|
1284
|
+
* const res =
|
|
1285
|
+
* await servicedirectory.projects.locations.namespaces.services.delete({
|
|
1286
|
+
* // Required. The name of the service to delete.
|
|
1287
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
1288
|
+
* });
|
|
1289
|
+
* console.log(res.data);
|
|
1290
|
+
*
|
|
1291
|
+
* // Example response
|
|
1292
|
+
* // {}
|
|
1293
|
+
* }
|
|
1294
|
+
*
|
|
1295
|
+
* main().catch(e => {
|
|
1296
|
+
* console.error(e);
|
|
1297
|
+
* throw e;
|
|
1298
|
+
* });
|
|
1299
|
+
*
|
|
1300
|
+
* ```
|
|
647
1301
|
*
|
|
648
1302
|
* @param params - Parameters for request
|
|
649
1303
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -658,6 +1312,57 @@ export declare namespace servicedirectory_v1 {
|
|
|
658
1312
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
659
1313
|
/**
|
|
660
1314
|
* Gets a service.
|
|
1315
|
+
* @example
|
|
1316
|
+
* ```js
|
|
1317
|
+
* // Before running the sample:
|
|
1318
|
+
* // - Enable the API at:
|
|
1319
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1320
|
+
* // - Login into gcloud by running:
|
|
1321
|
+
* // ```sh
|
|
1322
|
+
* // $ gcloud auth application-default login
|
|
1323
|
+
* // ```
|
|
1324
|
+
* // - Install the npm module by running:
|
|
1325
|
+
* // ```sh
|
|
1326
|
+
* // $ npm install googleapis
|
|
1327
|
+
* // ```
|
|
1328
|
+
*
|
|
1329
|
+
* const {google} = require('googleapis');
|
|
1330
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1331
|
+
*
|
|
1332
|
+
* async function main() {
|
|
1333
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1334
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1335
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1336
|
+
* });
|
|
1337
|
+
*
|
|
1338
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1339
|
+
* const authClient = await auth.getClient();
|
|
1340
|
+
* google.options({auth: authClient});
|
|
1341
|
+
*
|
|
1342
|
+
* // Do the magic
|
|
1343
|
+
* const res = await servicedirectory.projects.locations.namespaces.services.get(
|
|
1344
|
+
* {
|
|
1345
|
+
* // Required. The name of the service to get.
|
|
1346
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
1347
|
+
* },
|
|
1348
|
+
* );
|
|
1349
|
+
* console.log(res.data);
|
|
1350
|
+
*
|
|
1351
|
+
* // Example response
|
|
1352
|
+
* // {
|
|
1353
|
+
* // "annotations": {},
|
|
1354
|
+
* // "endpoints": [],
|
|
1355
|
+
* // "name": "my_name",
|
|
1356
|
+
* // "uid": "my_uid"
|
|
1357
|
+
* // }
|
|
1358
|
+
* }
|
|
1359
|
+
*
|
|
1360
|
+
* main().catch(e => {
|
|
1361
|
+
* console.error(e);
|
|
1362
|
+
* throw e;
|
|
1363
|
+
* });
|
|
1364
|
+
*
|
|
1365
|
+
* ```
|
|
661
1366
|
*
|
|
662
1367
|
* @param params - Parameters for request
|
|
663
1368
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -672,6 +1377,64 @@ export declare namespace servicedirectory_v1 {
|
|
|
672
1377
|
get(callback: BodyResponseCallback<Schema$Service>): void;
|
|
673
1378
|
/**
|
|
674
1379
|
* Gets the IAM Policy for a resource (namespace or service only).
|
|
1380
|
+
* @example
|
|
1381
|
+
* ```js
|
|
1382
|
+
* // Before running the sample:
|
|
1383
|
+
* // - Enable the API at:
|
|
1384
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1385
|
+
* // - Login into gcloud by running:
|
|
1386
|
+
* // ```sh
|
|
1387
|
+
* // $ gcloud auth application-default login
|
|
1388
|
+
* // ```
|
|
1389
|
+
* // - Install the npm module by running:
|
|
1390
|
+
* // ```sh
|
|
1391
|
+
* // $ npm install googleapis
|
|
1392
|
+
* // ```
|
|
1393
|
+
*
|
|
1394
|
+
* const {google} = require('googleapis');
|
|
1395
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1396
|
+
*
|
|
1397
|
+
* async function main() {
|
|
1398
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1399
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1400
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1401
|
+
* });
|
|
1402
|
+
*
|
|
1403
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1404
|
+
* const authClient = await auth.getClient();
|
|
1405
|
+
* google.options({auth: authClient});
|
|
1406
|
+
*
|
|
1407
|
+
* // Do the magic
|
|
1408
|
+
* const res =
|
|
1409
|
+
* await servicedirectory.projects.locations.namespaces.services.getIamPolicy({
|
|
1410
|
+
* // 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.
|
|
1411
|
+
* resource:
|
|
1412
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
1413
|
+
*
|
|
1414
|
+
* // Request body metadata
|
|
1415
|
+
* requestBody: {
|
|
1416
|
+
* // request body parameters
|
|
1417
|
+
* // {
|
|
1418
|
+
* // "options": {}
|
|
1419
|
+
* // }
|
|
1420
|
+
* },
|
|
1421
|
+
* });
|
|
1422
|
+
* console.log(res.data);
|
|
1423
|
+
*
|
|
1424
|
+
* // Example response
|
|
1425
|
+
* // {
|
|
1426
|
+
* // "bindings": [],
|
|
1427
|
+
* // "etag": "my_etag",
|
|
1428
|
+
* // "version": 0
|
|
1429
|
+
* // }
|
|
1430
|
+
* }
|
|
1431
|
+
*
|
|
1432
|
+
* main().catch(e => {
|
|
1433
|
+
* console.error(e);
|
|
1434
|
+
* throw e;
|
|
1435
|
+
* });
|
|
1436
|
+
*
|
|
1437
|
+
* ```
|
|
675
1438
|
*
|
|
676
1439
|
* @param params - Parameters for request
|
|
677
1440
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -686,6 +1449,63 @@ export declare namespace servicedirectory_v1 {
|
|
|
686
1449
|
getIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
|
|
687
1450
|
/**
|
|
688
1451
|
* Lists all services belonging to a namespace.
|
|
1452
|
+
* @example
|
|
1453
|
+
* ```js
|
|
1454
|
+
* // Before running the sample:
|
|
1455
|
+
* // - Enable the API at:
|
|
1456
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1457
|
+
* // - Login into gcloud by running:
|
|
1458
|
+
* // ```sh
|
|
1459
|
+
* // $ gcloud auth application-default login
|
|
1460
|
+
* // ```
|
|
1461
|
+
* // - Install the npm module by running:
|
|
1462
|
+
* // ```sh
|
|
1463
|
+
* // $ npm install googleapis
|
|
1464
|
+
* // ```
|
|
1465
|
+
*
|
|
1466
|
+
* const {google} = require('googleapis');
|
|
1467
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1468
|
+
*
|
|
1469
|
+
* async function main() {
|
|
1470
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1471
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1472
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1473
|
+
* });
|
|
1474
|
+
*
|
|
1475
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1476
|
+
* const authClient = await auth.getClient();
|
|
1477
|
+
* google.options({auth: authClient});
|
|
1478
|
+
*
|
|
1479
|
+
* // Do the magic
|
|
1480
|
+
* const res =
|
|
1481
|
+
* await servicedirectory.projects.locations.namespaces.services.list({
|
|
1482
|
+
* // 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).
|
|
1483
|
+
* filter: 'placeholder-value',
|
|
1484
|
+
* // 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.
|
|
1485
|
+
* orderBy: 'placeholder-value',
|
|
1486
|
+
* // Optional. The maximum number of items to return.
|
|
1487
|
+
* pageSize: 'placeholder-value',
|
|
1488
|
+
* // Optional. The next_page_token value returned from a previous List request, if any.
|
|
1489
|
+
* pageToken: 'placeholder-value',
|
|
1490
|
+
* // Required. The resource name of the namespace whose services you'd like to list.
|
|
1491
|
+
* parent:
|
|
1492
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace',
|
|
1493
|
+
* });
|
|
1494
|
+
* console.log(res.data);
|
|
1495
|
+
*
|
|
1496
|
+
* // Example response
|
|
1497
|
+
* // {
|
|
1498
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
1499
|
+
* // "services": []
|
|
1500
|
+
* // }
|
|
1501
|
+
* }
|
|
1502
|
+
*
|
|
1503
|
+
* main().catch(e => {
|
|
1504
|
+
* console.error(e);
|
|
1505
|
+
* throw e;
|
|
1506
|
+
* });
|
|
1507
|
+
*
|
|
1508
|
+
* ```
|
|
689
1509
|
*
|
|
690
1510
|
* @param params - Parameters for request
|
|
691
1511
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -700,6 +1520,69 @@ export declare namespace servicedirectory_v1 {
|
|
|
700
1520
|
list(callback: BodyResponseCallback<Schema$ListServicesResponse>): void;
|
|
701
1521
|
/**
|
|
702
1522
|
* Updates a service.
|
|
1523
|
+
* @example
|
|
1524
|
+
* ```js
|
|
1525
|
+
* // Before running the sample:
|
|
1526
|
+
* // - Enable the API at:
|
|
1527
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1528
|
+
* // - Login into gcloud by running:
|
|
1529
|
+
* // ```sh
|
|
1530
|
+
* // $ gcloud auth application-default login
|
|
1531
|
+
* // ```
|
|
1532
|
+
* // - Install the npm module by running:
|
|
1533
|
+
* // ```sh
|
|
1534
|
+
* // $ npm install googleapis
|
|
1535
|
+
* // ```
|
|
1536
|
+
*
|
|
1537
|
+
* const {google} = require('googleapis');
|
|
1538
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1539
|
+
*
|
|
1540
|
+
* async function main() {
|
|
1541
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1542
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1543
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1544
|
+
* });
|
|
1545
|
+
*
|
|
1546
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1547
|
+
* const authClient = await auth.getClient();
|
|
1548
|
+
* google.options({auth: authClient});
|
|
1549
|
+
*
|
|
1550
|
+
* // Do the magic
|
|
1551
|
+
* const res =
|
|
1552
|
+
* await servicedirectory.projects.locations.namespaces.services.patch({
|
|
1553
|
+
* // Immutable. The resource name for the service in the format `projects/x/locations/x/namespaces/x/services/x`.
|
|
1554
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
1555
|
+
* // Required. List of fields to be updated in this request.
|
|
1556
|
+
* updateMask: 'placeholder-value',
|
|
1557
|
+
*
|
|
1558
|
+
* // Request body metadata
|
|
1559
|
+
* requestBody: {
|
|
1560
|
+
* // request body parameters
|
|
1561
|
+
* // {
|
|
1562
|
+
* // "annotations": {},
|
|
1563
|
+
* // "endpoints": [],
|
|
1564
|
+
* // "name": "my_name",
|
|
1565
|
+
* // "uid": "my_uid"
|
|
1566
|
+
* // }
|
|
1567
|
+
* },
|
|
1568
|
+
* });
|
|
1569
|
+
* console.log(res.data);
|
|
1570
|
+
*
|
|
1571
|
+
* // Example response
|
|
1572
|
+
* // {
|
|
1573
|
+
* // "annotations": {},
|
|
1574
|
+
* // "endpoints": [],
|
|
1575
|
+
* // "name": "my_name",
|
|
1576
|
+
* // "uid": "my_uid"
|
|
1577
|
+
* // }
|
|
1578
|
+
* }
|
|
1579
|
+
*
|
|
1580
|
+
* main().catch(e => {
|
|
1581
|
+
* console.error(e);
|
|
1582
|
+
* throw e;
|
|
1583
|
+
* });
|
|
1584
|
+
*
|
|
1585
|
+
* ```
|
|
703
1586
|
*
|
|
704
1587
|
* @param params - Parameters for request
|
|
705
1588
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -714,6 +1597,62 @@ export declare namespace servicedirectory_v1 {
|
|
|
714
1597
|
patch(callback: BodyResponseCallback<Schema$Service>): void;
|
|
715
1598
|
/**
|
|
716
1599
|
* Returns a service and its associated endpoints. Resolving a service is not considered an active developer method.
|
|
1600
|
+
* @example
|
|
1601
|
+
* ```js
|
|
1602
|
+
* // Before running the sample:
|
|
1603
|
+
* // - Enable the API at:
|
|
1604
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1605
|
+
* // - Login into gcloud by running:
|
|
1606
|
+
* // ```sh
|
|
1607
|
+
* // $ gcloud auth application-default login
|
|
1608
|
+
* // ```
|
|
1609
|
+
* // - Install the npm module by running:
|
|
1610
|
+
* // ```sh
|
|
1611
|
+
* // $ npm install googleapis
|
|
1612
|
+
* // ```
|
|
1613
|
+
*
|
|
1614
|
+
* const {google} = require('googleapis');
|
|
1615
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1616
|
+
*
|
|
1617
|
+
* async function main() {
|
|
1618
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1619
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1620
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1621
|
+
* });
|
|
1622
|
+
*
|
|
1623
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1624
|
+
* const authClient = await auth.getClient();
|
|
1625
|
+
* google.options({auth: authClient});
|
|
1626
|
+
*
|
|
1627
|
+
* // Do the magic
|
|
1628
|
+
* const res =
|
|
1629
|
+
* await servicedirectory.projects.locations.namespaces.services.resolve({
|
|
1630
|
+
* // Required. The name of the service to resolve.
|
|
1631
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
1632
|
+
*
|
|
1633
|
+
* // Request body metadata
|
|
1634
|
+
* requestBody: {
|
|
1635
|
+
* // request body parameters
|
|
1636
|
+
* // {
|
|
1637
|
+
* // "endpointFilter": "my_endpointFilter",
|
|
1638
|
+
* // "maxEndpoints": 0
|
|
1639
|
+
* // }
|
|
1640
|
+
* },
|
|
1641
|
+
* });
|
|
1642
|
+
* console.log(res.data);
|
|
1643
|
+
*
|
|
1644
|
+
* // Example response
|
|
1645
|
+
* // {
|
|
1646
|
+
* // "service": {}
|
|
1647
|
+
* // }
|
|
1648
|
+
* }
|
|
1649
|
+
*
|
|
1650
|
+
* main().catch(e => {
|
|
1651
|
+
* console.error(e);
|
|
1652
|
+
* throw e;
|
|
1653
|
+
* });
|
|
1654
|
+
*
|
|
1655
|
+
* ```
|
|
717
1656
|
*
|
|
718
1657
|
* @param params - Parameters for request
|
|
719
1658
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -728,6 +1667,64 @@ export declare namespace servicedirectory_v1 {
|
|
|
728
1667
|
resolve(callback: BodyResponseCallback<Schema$ResolveServiceResponse>): void;
|
|
729
1668
|
/**
|
|
730
1669
|
* Sets the IAM Policy for a resource (namespace or service only).
|
|
1670
|
+
* @example
|
|
1671
|
+
* ```js
|
|
1672
|
+
* // Before running the sample:
|
|
1673
|
+
* // - Enable the API at:
|
|
1674
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1675
|
+
* // - Login into gcloud by running:
|
|
1676
|
+
* // ```sh
|
|
1677
|
+
* // $ gcloud auth application-default login
|
|
1678
|
+
* // ```
|
|
1679
|
+
* // - Install the npm module by running:
|
|
1680
|
+
* // ```sh
|
|
1681
|
+
* // $ npm install googleapis
|
|
1682
|
+
* // ```
|
|
1683
|
+
*
|
|
1684
|
+
* const {google} = require('googleapis');
|
|
1685
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1686
|
+
*
|
|
1687
|
+
* async function main() {
|
|
1688
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1689
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1690
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1691
|
+
* });
|
|
1692
|
+
*
|
|
1693
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1694
|
+
* const authClient = await auth.getClient();
|
|
1695
|
+
* google.options({auth: authClient});
|
|
1696
|
+
*
|
|
1697
|
+
* // Do the magic
|
|
1698
|
+
* const res =
|
|
1699
|
+
* await servicedirectory.projects.locations.namespaces.services.setIamPolicy({
|
|
1700
|
+
* // 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.
|
|
1701
|
+
* resource:
|
|
1702
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
1703
|
+
*
|
|
1704
|
+
* // Request body metadata
|
|
1705
|
+
* requestBody: {
|
|
1706
|
+
* // request body parameters
|
|
1707
|
+
* // {
|
|
1708
|
+
* // "policy": {}
|
|
1709
|
+
* // }
|
|
1710
|
+
* },
|
|
1711
|
+
* });
|
|
1712
|
+
* console.log(res.data);
|
|
1713
|
+
*
|
|
1714
|
+
* // Example response
|
|
1715
|
+
* // {
|
|
1716
|
+
* // "bindings": [],
|
|
1717
|
+
* // "etag": "my_etag",
|
|
1718
|
+
* // "version": 0
|
|
1719
|
+
* // }
|
|
1720
|
+
* }
|
|
1721
|
+
*
|
|
1722
|
+
* main().catch(e => {
|
|
1723
|
+
* console.error(e);
|
|
1724
|
+
* throw e;
|
|
1725
|
+
* });
|
|
1726
|
+
*
|
|
1727
|
+
* ```
|
|
731
1728
|
*
|
|
732
1729
|
* @param params - Parameters for request
|
|
733
1730
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -742,6 +1739,64 @@ export declare namespace servicedirectory_v1 {
|
|
|
742
1739
|
setIamPolicy(callback: BodyResponseCallback<Schema$Policy>): void;
|
|
743
1740
|
/**
|
|
744
1741
|
* Tests IAM permissions for a resource (namespace or service only).
|
|
1742
|
+
* @example
|
|
1743
|
+
* ```js
|
|
1744
|
+
* // Before running the sample:
|
|
1745
|
+
* // - Enable the API at:
|
|
1746
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1747
|
+
* // - Login into gcloud by running:
|
|
1748
|
+
* // ```sh
|
|
1749
|
+
* // $ gcloud auth application-default login
|
|
1750
|
+
* // ```
|
|
1751
|
+
* // - Install the npm module by running:
|
|
1752
|
+
* // ```sh
|
|
1753
|
+
* // $ npm install googleapis
|
|
1754
|
+
* // ```
|
|
1755
|
+
*
|
|
1756
|
+
* const {google} = require('googleapis');
|
|
1757
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1758
|
+
*
|
|
1759
|
+
* async function main() {
|
|
1760
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1761
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1762
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1763
|
+
* });
|
|
1764
|
+
*
|
|
1765
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1766
|
+
* const authClient = await auth.getClient();
|
|
1767
|
+
* google.options({auth: authClient});
|
|
1768
|
+
*
|
|
1769
|
+
* // Do the magic
|
|
1770
|
+
* const res =
|
|
1771
|
+
* await servicedirectory.projects.locations.namespaces.services.testIamPermissions(
|
|
1772
|
+
* {
|
|
1773
|
+
* // 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.
|
|
1774
|
+
* resource:
|
|
1775
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
1776
|
+
*
|
|
1777
|
+
* // Request body metadata
|
|
1778
|
+
* requestBody: {
|
|
1779
|
+
* // request body parameters
|
|
1780
|
+
* // {
|
|
1781
|
+
* // "permissions": []
|
|
1782
|
+
* // }
|
|
1783
|
+
* },
|
|
1784
|
+
* },
|
|
1785
|
+
* );
|
|
1786
|
+
* console.log(res.data);
|
|
1787
|
+
*
|
|
1788
|
+
* // Example response
|
|
1789
|
+
* // {
|
|
1790
|
+
* // "permissions": []
|
|
1791
|
+
* // }
|
|
1792
|
+
* }
|
|
1793
|
+
*
|
|
1794
|
+
* main().catch(e => {
|
|
1795
|
+
* console.error(e);
|
|
1796
|
+
* throw e;
|
|
1797
|
+
* });
|
|
1798
|
+
*
|
|
1799
|
+
* ```
|
|
745
1800
|
*
|
|
746
1801
|
* @param params - Parameters for request
|
|
747
1802
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -862,6 +1917,76 @@ export declare namespace servicedirectory_v1 {
|
|
|
862
1917
|
constructor(context: APIRequestContext);
|
|
863
1918
|
/**
|
|
864
1919
|
* Creates an endpoint, and returns the new endpoint.
|
|
1920
|
+
* @example
|
|
1921
|
+
* ```js
|
|
1922
|
+
* // Before running the sample:
|
|
1923
|
+
* // - Enable the API at:
|
|
1924
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
1925
|
+
* // - Login into gcloud by running:
|
|
1926
|
+
* // ```sh
|
|
1927
|
+
* // $ gcloud auth application-default login
|
|
1928
|
+
* // ```
|
|
1929
|
+
* // - Install the npm module by running:
|
|
1930
|
+
* // ```sh
|
|
1931
|
+
* // $ npm install googleapis
|
|
1932
|
+
* // ```
|
|
1933
|
+
*
|
|
1934
|
+
* const {google} = require('googleapis');
|
|
1935
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
1936
|
+
*
|
|
1937
|
+
* async function main() {
|
|
1938
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1939
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1940
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
1941
|
+
* });
|
|
1942
|
+
*
|
|
1943
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1944
|
+
* const authClient = await auth.getClient();
|
|
1945
|
+
* google.options({auth: authClient});
|
|
1946
|
+
*
|
|
1947
|
+
* // Do the magic
|
|
1948
|
+
* const res =
|
|
1949
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.create(
|
|
1950
|
+
* {
|
|
1951
|
+
* // 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.
|
|
1952
|
+
* endpointId: 'placeholder-value',
|
|
1953
|
+
* // Required. The resource name of the service that this endpoint provides.
|
|
1954
|
+
* parent:
|
|
1955
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
1956
|
+
*
|
|
1957
|
+
* // Request body metadata
|
|
1958
|
+
* requestBody: {
|
|
1959
|
+
* // request body parameters
|
|
1960
|
+
* // {
|
|
1961
|
+
* // "address": "my_address",
|
|
1962
|
+
* // "annotations": {},
|
|
1963
|
+
* // "name": "my_name",
|
|
1964
|
+
* // "network": "my_network",
|
|
1965
|
+
* // "port": 0,
|
|
1966
|
+
* // "uid": "my_uid"
|
|
1967
|
+
* // }
|
|
1968
|
+
* },
|
|
1969
|
+
* },
|
|
1970
|
+
* );
|
|
1971
|
+
* console.log(res.data);
|
|
1972
|
+
*
|
|
1973
|
+
* // Example response
|
|
1974
|
+
* // {
|
|
1975
|
+
* // "address": "my_address",
|
|
1976
|
+
* // "annotations": {},
|
|
1977
|
+
* // "name": "my_name",
|
|
1978
|
+
* // "network": "my_network",
|
|
1979
|
+
* // "port": 0,
|
|
1980
|
+
* // "uid": "my_uid"
|
|
1981
|
+
* // }
|
|
1982
|
+
* }
|
|
1983
|
+
*
|
|
1984
|
+
* main().catch(e => {
|
|
1985
|
+
* console.error(e);
|
|
1986
|
+
* throw e;
|
|
1987
|
+
* });
|
|
1988
|
+
*
|
|
1989
|
+
* ```
|
|
865
1990
|
*
|
|
866
1991
|
* @param params - Parameters for request
|
|
867
1992
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -876,6 +2001,53 @@ export declare namespace servicedirectory_v1 {
|
|
|
876
2001
|
create(callback: BodyResponseCallback<Schema$Endpoint>): void;
|
|
877
2002
|
/**
|
|
878
2003
|
* Deletes an endpoint.
|
|
2004
|
+
* @example
|
|
2005
|
+
* ```js
|
|
2006
|
+
* // Before running the sample:
|
|
2007
|
+
* // - Enable the API at:
|
|
2008
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2009
|
+
* // - Login into gcloud by running:
|
|
2010
|
+
* // ```sh
|
|
2011
|
+
* // $ gcloud auth application-default login
|
|
2012
|
+
* // ```
|
|
2013
|
+
* // - Install the npm module by running:
|
|
2014
|
+
* // ```sh
|
|
2015
|
+
* // $ npm install googleapis
|
|
2016
|
+
* // ```
|
|
2017
|
+
*
|
|
2018
|
+
* const {google} = require('googleapis');
|
|
2019
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2020
|
+
*
|
|
2021
|
+
* async function main() {
|
|
2022
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2023
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2024
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2025
|
+
* });
|
|
2026
|
+
*
|
|
2027
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2028
|
+
* const authClient = await auth.getClient();
|
|
2029
|
+
* google.options({auth: authClient});
|
|
2030
|
+
*
|
|
2031
|
+
* // Do the magic
|
|
2032
|
+
* const res =
|
|
2033
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.delete(
|
|
2034
|
+
* {
|
|
2035
|
+
* // Required. The name of the endpoint to delete.
|
|
2036
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service/endpoints/my-endpoint',
|
|
2037
|
+
* },
|
|
2038
|
+
* );
|
|
2039
|
+
* console.log(res.data);
|
|
2040
|
+
*
|
|
2041
|
+
* // Example response
|
|
2042
|
+
* // {}
|
|
2043
|
+
* }
|
|
2044
|
+
*
|
|
2045
|
+
* main().catch(e => {
|
|
2046
|
+
* console.error(e);
|
|
2047
|
+
* throw e;
|
|
2048
|
+
* });
|
|
2049
|
+
*
|
|
2050
|
+
* ```
|
|
879
2051
|
*
|
|
880
2052
|
* @param params - Parameters for request
|
|
881
2053
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -890,6 +2062,60 @@ export declare namespace servicedirectory_v1 {
|
|
|
890
2062
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
891
2063
|
/**
|
|
892
2064
|
* Gets an endpoint.
|
|
2065
|
+
* @example
|
|
2066
|
+
* ```js
|
|
2067
|
+
* // Before running the sample:
|
|
2068
|
+
* // - Enable the API at:
|
|
2069
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2070
|
+
* // - Login into gcloud by running:
|
|
2071
|
+
* // ```sh
|
|
2072
|
+
* // $ gcloud auth application-default login
|
|
2073
|
+
* // ```
|
|
2074
|
+
* // - Install the npm module by running:
|
|
2075
|
+
* // ```sh
|
|
2076
|
+
* // $ npm install googleapis
|
|
2077
|
+
* // ```
|
|
2078
|
+
*
|
|
2079
|
+
* const {google} = require('googleapis');
|
|
2080
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2081
|
+
*
|
|
2082
|
+
* async function main() {
|
|
2083
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2084
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2085
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2086
|
+
* });
|
|
2087
|
+
*
|
|
2088
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2089
|
+
* const authClient = await auth.getClient();
|
|
2090
|
+
* google.options({auth: authClient});
|
|
2091
|
+
*
|
|
2092
|
+
* // Do the magic
|
|
2093
|
+
* const res =
|
|
2094
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.get(
|
|
2095
|
+
* {
|
|
2096
|
+
* // Required. The name of the endpoint to get.
|
|
2097
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service/endpoints/my-endpoint',
|
|
2098
|
+
* },
|
|
2099
|
+
* );
|
|
2100
|
+
* console.log(res.data);
|
|
2101
|
+
*
|
|
2102
|
+
* // Example response
|
|
2103
|
+
* // {
|
|
2104
|
+
* // "address": "my_address",
|
|
2105
|
+
* // "annotations": {},
|
|
2106
|
+
* // "name": "my_name",
|
|
2107
|
+
* // "network": "my_network",
|
|
2108
|
+
* // "port": 0,
|
|
2109
|
+
* // "uid": "my_uid"
|
|
2110
|
+
* // }
|
|
2111
|
+
* }
|
|
2112
|
+
*
|
|
2113
|
+
* main().catch(e => {
|
|
2114
|
+
* console.error(e);
|
|
2115
|
+
* throw e;
|
|
2116
|
+
* });
|
|
2117
|
+
*
|
|
2118
|
+
* ```
|
|
893
2119
|
*
|
|
894
2120
|
* @param params - Parameters for request
|
|
895
2121
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -904,6 +2130,65 @@ export declare namespace servicedirectory_v1 {
|
|
|
904
2130
|
get(callback: BodyResponseCallback<Schema$Endpoint>): void;
|
|
905
2131
|
/**
|
|
906
2132
|
* Lists all endpoints.
|
|
2133
|
+
* @example
|
|
2134
|
+
* ```js
|
|
2135
|
+
* // Before running the sample:
|
|
2136
|
+
* // - Enable the API at:
|
|
2137
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2138
|
+
* // - Login into gcloud by running:
|
|
2139
|
+
* // ```sh
|
|
2140
|
+
* // $ gcloud auth application-default login
|
|
2141
|
+
* // ```
|
|
2142
|
+
* // - Install the npm module by running:
|
|
2143
|
+
* // ```sh
|
|
2144
|
+
* // $ npm install googleapis
|
|
2145
|
+
* // ```
|
|
2146
|
+
*
|
|
2147
|
+
* const {google} = require('googleapis');
|
|
2148
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2149
|
+
*
|
|
2150
|
+
* async function main() {
|
|
2151
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2152
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2153
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2154
|
+
* });
|
|
2155
|
+
*
|
|
2156
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2157
|
+
* const authClient = await auth.getClient();
|
|
2158
|
+
* google.options({auth: authClient});
|
|
2159
|
+
*
|
|
2160
|
+
* // Do the magic
|
|
2161
|
+
* const res =
|
|
2162
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.list(
|
|
2163
|
+
* {
|
|
2164
|
+
* // 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).
|
|
2165
|
+
* filter: 'placeholder-value',
|
|
2166
|
+
* // 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.
|
|
2167
|
+
* orderBy: 'placeholder-value',
|
|
2168
|
+
* // Optional. The maximum number of items to return.
|
|
2169
|
+
* pageSize: 'placeholder-value',
|
|
2170
|
+
* // Optional. The next_page_token value returned from a previous List request, if any.
|
|
2171
|
+
* pageToken: 'placeholder-value',
|
|
2172
|
+
* // Required. The resource name of the service whose endpoints you'd like to list.
|
|
2173
|
+
* parent:
|
|
2174
|
+
* 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service',
|
|
2175
|
+
* },
|
|
2176
|
+
* );
|
|
2177
|
+
* console.log(res.data);
|
|
2178
|
+
*
|
|
2179
|
+
* // Example response
|
|
2180
|
+
* // {
|
|
2181
|
+
* // "endpoints": [],
|
|
2182
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
2183
|
+
* // }
|
|
2184
|
+
* }
|
|
2185
|
+
*
|
|
2186
|
+
* main().catch(e => {
|
|
2187
|
+
* console.error(e);
|
|
2188
|
+
* throw e;
|
|
2189
|
+
* });
|
|
2190
|
+
*
|
|
2191
|
+
* ```
|
|
907
2192
|
*
|
|
908
2193
|
* @param params - Parameters for request
|
|
909
2194
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -918,6 +2203,75 @@ export declare namespace servicedirectory_v1 {
|
|
|
918
2203
|
list(callback: BodyResponseCallback<Schema$ListEndpointsResponse>): void;
|
|
919
2204
|
/**
|
|
920
2205
|
* Updates an endpoint.
|
|
2206
|
+
* @example
|
|
2207
|
+
* ```js
|
|
2208
|
+
* // Before running the sample:
|
|
2209
|
+
* // - Enable the API at:
|
|
2210
|
+
* // https://console.developers.google.com/apis/api/servicedirectory.googleapis.com
|
|
2211
|
+
* // - Login into gcloud by running:
|
|
2212
|
+
* // ```sh
|
|
2213
|
+
* // $ gcloud auth application-default login
|
|
2214
|
+
* // ```
|
|
2215
|
+
* // - Install the npm module by running:
|
|
2216
|
+
* // ```sh
|
|
2217
|
+
* // $ npm install googleapis
|
|
2218
|
+
* // ```
|
|
2219
|
+
*
|
|
2220
|
+
* const {google} = require('googleapis');
|
|
2221
|
+
* const servicedirectory = google.servicedirectory('v1');
|
|
2222
|
+
*
|
|
2223
|
+
* async function main() {
|
|
2224
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2225
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2226
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2227
|
+
* });
|
|
2228
|
+
*
|
|
2229
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2230
|
+
* const authClient = await auth.getClient();
|
|
2231
|
+
* google.options({auth: authClient});
|
|
2232
|
+
*
|
|
2233
|
+
* // Do the magic
|
|
2234
|
+
* const res =
|
|
2235
|
+
* await servicedirectory.projects.locations.namespaces.services.endpoints.patch(
|
|
2236
|
+
* {
|
|
2237
|
+
* // Immutable. The resource name for the endpoint in the format `projects/x/locations/x/namespaces/x/services/x/endpoints/x`.
|
|
2238
|
+
* name: 'projects/my-project/locations/my-location/namespaces/my-namespace/services/my-service/endpoints/my-endpoint',
|
|
2239
|
+
* // Required. List of fields to be updated in this request.
|
|
2240
|
+
* updateMask: 'placeholder-value',
|
|
2241
|
+
*
|
|
2242
|
+
* // Request body metadata
|
|
2243
|
+
* requestBody: {
|
|
2244
|
+
* // request body parameters
|
|
2245
|
+
* // {
|
|
2246
|
+
* // "address": "my_address",
|
|
2247
|
+
* // "annotations": {},
|
|
2248
|
+
* // "name": "my_name",
|
|
2249
|
+
* // "network": "my_network",
|
|
2250
|
+
* // "port": 0,
|
|
2251
|
+
* // "uid": "my_uid"
|
|
2252
|
+
* // }
|
|
2253
|
+
* },
|
|
2254
|
+
* },
|
|
2255
|
+
* );
|
|
2256
|
+
* console.log(res.data);
|
|
2257
|
+
*
|
|
2258
|
+
* // Example response
|
|
2259
|
+
* // {
|
|
2260
|
+
* // "address": "my_address",
|
|
2261
|
+
* // "annotations": {},
|
|
2262
|
+
* // "name": "my_name",
|
|
2263
|
+
* // "network": "my_network",
|
|
2264
|
+
* // "port": 0,
|
|
2265
|
+
* // "uid": "my_uid"
|
|
2266
|
+
* // }
|
|
2267
|
+
* }
|
|
2268
|
+
*
|
|
2269
|
+
* main().catch(e => {
|
|
2270
|
+
* console.error(e);
|
|
2271
|
+
* throw e;
|
|
2272
|
+
* });
|
|
2273
|
+
*
|
|
2274
|
+
* ```
|
|
921
2275
|
*
|
|
922
2276
|
* @param params - Parameters for request
|
|
923
2277
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|