@googleapis/servicenetworking 22.0.1 → 23.1.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 +29 -0
- package/build/v1.d.ts +1821 -14
- package/build/v1.js.map +1 -1
- package/build/v1beta.d.ts +451 -5
- package/build/v1beta.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +1820 -14
- package/v1beta.ts +450 -5
package/v1.ts
CHANGED
|
@@ -256,7 +256,7 @@ export namespace servicenetworking_v1 {
|
|
|
256
256
|
*/
|
|
257
257
|
purpose?: string | null;
|
|
258
258
|
/**
|
|
259
|
-
* Required. The name of a [region](/compute/docs/regions-zones) for the subnet, such `europe-west1`.
|
|
259
|
+
* Required. The name of a [region](https://cloud.google.com/compute/docs/regions-zones) for the subnet, such `europe-west1`.
|
|
260
260
|
*/
|
|
261
261
|
region?: string | null;
|
|
262
262
|
/**
|
|
@@ -280,7 +280,7 @@ export namespace servicenetworking_v1 {
|
|
|
280
280
|
*/
|
|
281
281
|
skipRequestedAddressValidation?: boolean | null;
|
|
282
282
|
/**
|
|
283
|
-
* Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.
|
|
283
|
+
* Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.
|
|
284
284
|
*/
|
|
285
285
|
subnetwork?: string | null;
|
|
286
286
|
/**
|
|
@@ -469,6 +469,73 @@ export namespace servicenetworking_v1 {
|
|
|
469
469
|
*/
|
|
470
470
|
selector?: string | null;
|
|
471
471
|
}
|
|
472
|
+
/**
|
|
473
|
+
* `BatchingConfigProto` defines the batching configuration for an API method.
|
|
474
|
+
*/
|
|
475
|
+
export interface Schema$BatchingConfigProto {
|
|
476
|
+
/**
|
|
477
|
+
* The request and response fields used in batching.
|
|
478
|
+
*/
|
|
479
|
+
batchDescriptor?: Schema$BatchingDescriptorProto;
|
|
480
|
+
/**
|
|
481
|
+
* The thresholds which trigger a batched request to be sent.
|
|
482
|
+
*/
|
|
483
|
+
thresholds?: Schema$BatchingSettingsProto;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* `BatchingDescriptorProto` specifies the fields of the request message to be used for batching, and, optionally, the fields of the response message to be used for demultiplexing.
|
|
487
|
+
*/
|
|
488
|
+
export interface Schema$BatchingDescriptorProto {
|
|
489
|
+
/**
|
|
490
|
+
* The repeated field in the request message to be aggregated by batching.
|
|
491
|
+
*/
|
|
492
|
+
batchedField?: string | null;
|
|
493
|
+
/**
|
|
494
|
+
* A list of the fields in the request message. Two requests will be batched together only if the values of every field specified in `request_discriminator_fields` is equal between the two requests.
|
|
495
|
+
*/
|
|
496
|
+
discriminatorFields?: string[] | null;
|
|
497
|
+
/**
|
|
498
|
+
* Optional. When present, indicates the field in the response message to be used to demultiplex the response into multiple response messages, in correspondence with the multiple request messages originally batched together.
|
|
499
|
+
*/
|
|
500
|
+
subresponseField?: string | null;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* `BatchingSettingsProto` specifies a set of batching thresholds, each of which acts as a trigger to send a batch of messages as a request. At least one threshold must be positive nonzero.
|
|
504
|
+
*/
|
|
505
|
+
export interface Schema$BatchingSettingsProto {
|
|
506
|
+
/**
|
|
507
|
+
* The duration after which a batch should be sent, starting from the addition of the first message to that batch.
|
|
508
|
+
*/
|
|
509
|
+
delayThreshold?: string | null;
|
|
510
|
+
/**
|
|
511
|
+
* The maximum number of elements collected in a batch that could be accepted by server.
|
|
512
|
+
*/
|
|
513
|
+
elementCountLimit?: number | null;
|
|
514
|
+
/**
|
|
515
|
+
* The number of elements of a field collected into a batch which, if exceeded, causes the batch to be sent.
|
|
516
|
+
*/
|
|
517
|
+
elementCountThreshold?: number | null;
|
|
518
|
+
/**
|
|
519
|
+
* The maximum size of data allowed by flow control.
|
|
520
|
+
*/
|
|
521
|
+
flowControlByteLimit?: number | null;
|
|
522
|
+
/**
|
|
523
|
+
* The maximum number of elements allowed by flow control.
|
|
524
|
+
*/
|
|
525
|
+
flowControlElementLimit?: number | null;
|
|
526
|
+
/**
|
|
527
|
+
* The behavior to take when the flow control limit is exceeded.
|
|
528
|
+
*/
|
|
529
|
+
flowControlLimitExceededBehavior?: string | null;
|
|
530
|
+
/**
|
|
531
|
+
* The maximum size of the request that could be accepted by server.
|
|
532
|
+
*/
|
|
533
|
+
requestByteLimit?: number | null;
|
|
534
|
+
/**
|
|
535
|
+
* The aggregated size of the batched field which, if exceeded, causes the batch to be sent. This size is computed by aggregating the sizes of the request field to be batched, not of the entire request message.
|
|
536
|
+
*/
|
|
537
|
+
requestByteThreshold?: string | null;
|
|
538
|
+
}
|
|
472
539
|
/**
|
|
473
540
|
* Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: "1" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count
|
|
474
541
|
*/
|
|
@@ -495,6 +562,10 @@ export namespace servicenetworking_v1 {
|
|
|
495
562
|
* The request message for Operations.CancelOperation.
|
|
496
563
|
*/
|
|
497
564
|
export interface Schema$CancelOperationRequest {}
|
|
565
|
+
/**
|
|
566
|
+
* Metadata provided through GetOperation request for the LRO generated by Cleanup Connection API
|
|
567
|
+
*/
|
|
568
|
+
export interface Schema$CleanupConnectionMetadata {}
|
|
498
569
|
/**
|
|
499
570
|
* Details about how and where to publish client libraries.
|
|
500
571
|
*/
|
|
@@ -549,15 +620,15 @@ export namespace servicenetworking_v1 {
|
|
|
549
620
|
*/
|
|
550
621
|
export interface Schema$CloudSQLConfig {
|
|
551
622
|
/**
|
|
552
|
-
* Peering service used for peering with the Cloud SQL project.
|
|
623
|
+
* Required. Peering service used for peering with the Cloud SQL project.
|
|
553
624
|
*/
|
|
554
625
|
service?: string | null;
|
|
555
626
|
/**
|
|
556
|
-
* The name of the umbrella network in the Cloud SQL umbrella project.
|
|
627
|
+
* Required. The name of the umbrella network in the Cloud SQL umbrella project.
|
|
557
628
|
*/
|
|
558
629
|
umbrellaNetwork?: string | null;
|
|
559
630
|
/**
|
|
560
|
-
* The project number of the Cloud SQL umbrella project.
|
|
631
|
+
* Required. The project number of the Cloud SQL umbrella project.
|
|
561
632
|
*/
|
|
562
633
|
umbrellaProject?: string | null;
|
|
563
634
|
}
|
|
@@ -583,7 +654,7 @@ export namespace servicenetworking_v1 {
|
|
|
583
654
|
*/
|
|
584
655
|
export interface Schema$Connection {
|
|
585
656
|
/**
|
|
586
|
-
* The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project\}/global/networks/{network\}`. `{project\}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network\}` is the name of the service consumer's VPC network.
|
|
657
|
+
* Required. The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project\}/global/networks/{network\}`. `{project\}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network\}` is the name of the service consumer's VPC network.
|
|
587
658
|
*/
|
|
588
659
|
network?: string | null;
|
|
589
660
|
/**
|
|
@@ -1452,6 +1523,10 @@ export namespace servicenetworking_v1 {
|
|
|
1452
1523
|
* List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id
|
|
1453
1524
|
*/
|
|
1454
1525
|
autoPopulatedFields?: string[] | null;
|
|
1526
|
+
/**
|
|
1527
|
+
* Batching configuration for an API method in client libraries. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.BatchCreateExample batching: element_count_threshold: 1000 request_byte_threshold: 100000000 delay_threshold_millis: 10
|
|
1528
|
+
*/
|
|
1529
|
+
batching?: Schema$BatchingConfigProto;
|
|
1455
1530
|
/**
|
|
1456
1531
|
* Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes
|
|
1457
1532
|
*/
|
|
@@ -1698,7 +1773,7 @@ export namespace servicenetworking_v1 {
|
|
|
1698
1773
|
*/
|
|
1699
1774
|
dnsSuffix?: string | null;
|
|
1700
1775
|
/**
|
|
1701
|
-
* User assigned name for this resource. Must be unique within the consumer network. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.
|
|
1776
|
+
* Required. User assigned name for this resource. Must be unique within the consumer network. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.
|
|
1702
1777
|
*/
|
|
1703
1778
|
name?: string | null;
|
|
1704
1779
|
}
|
|
@@ -1714,6 +1789,10 @@ export namespace servicenetworking_v1 {
|
|
|
1714
1789
|
* Some settings.
|
|
1715
1790
|
*/
|
|
1716
1791
|
common?: Schema$CommonLanguageSettings;
|
|
1792
|
+
/**
|
|
1793
|
+
* The package name to use in Php. Clobbers the php_namespace option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.php.package_name" field in gapic.yaml. API teams should use the protobuf php_namespace option where possible. Example of a YAML configuration:: publishing: library_settings: php_settings: library_package: Google\Cloud\PubSub\V1
|
|
1794
|
+
*/
|
|
1795
|
+
libraryPackage?: string | null;
|
|
1717
1796
|
}
|
|
1718
1797
|
/**
|
|
1719
1798
|
* Grouping of IAM role and IAM member.
|
|
@@ -1967,7 +2046,7 @@ export namespace servicenetworking_v1 {
|
|
|
1967
2046
|
*/
|
|
1968
2047
|
ipPrefixLength?: number | null;
|
|
1969
2048
|
/**
|
|
1970
|
-
* Network name in the consumer project. This network must have been already peered with a shared VPC network using CreateConnection method. Must be in a form 'projects/{project\}/global/networks/{network\}'. {project\} is a project number, as in '12345' {network\} is network name.
|
|
2049
|
+
* Required. Network name in the consumer project. This network must have been already peered with a shared VPC network using CreateConnection method. Must be in a form 'projects/{project\}/global/networks/{network\}'. {project\} is a project number, as in '12345' {network\} is network name.
|
|
1971
2050
|
*/
|
|
1972
2051
|
network?: string | null;
|
|
1973
2052
|
}
|
|
@@ -2391,6 +2470,59 @@ export namespace servicenetworking_v1 {
|
|
|
2391
2470
|
|
|
2392
2471
|
/**
|
|
2393
2472
|
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
|
|
2473
|
+
* @example
|
|
2474
|
+
* ```js
|
|
2475
|
+
* // Before running the sample:
|
|
2476
|
+
* // - Enable the API at:
|
|
2477
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
2478
|
+
* // - Login into gcloud by running:
|
|
2479
|
+
* // ```sh
|
|
2480
|
+
* // $ gcloud auth application-default login
|
|
2481
|
+
* // ```
|
|
2482
|
+
* // - Install the npm module by running:
|
|
2483
|
+
* // ```sh
|
|
2484
|
+
* // $ npm install googleapis
|
|
2485
|
+
* // ```
|
|
2486
|
+
*
|
|
2487
|
+
* const {google} = require('googleapis');
|
|
2488
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
2489
|
+
*
|
|
2490
|
+
* async function main() {
|
|
2491
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2492
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2493
|
+
* scopes: [
|
|
2494
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2495
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
2496
|
+
* ],
|
|
2497
|
+
* });
|
|
2498
|
+
*
|
|
2499
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2500
|
+
* const authClient = await auth.getClient();
|
|
2501
|
+
* google.options({auth: authClient});
|
|
2502
|
+
*
|
|
2503
|
+
* // Do the magic
|
|
2504
|
+
* const res = await servicenetworking.operations.cancel({
|
|
2505
|
+
* // The name of the operation resource to be cancelled.
|
|
2506
|
+
* name: 'operations/.*',
|
|
2507
|
+
*
|
|
2508
|
+
* // Request body metadata
|
|
2509
|
+
* requestBody: {
|
|
2510
|
+
* // request body parameters
|
|
2511
|
+
* // {}
|
|
2512
|
+
* },
|
|
2513
|
+
* });
|
|
2514
|
+
* console.log(res.data);
|
|
2515
|
+
*
|
|
2516
|
+
* // Example response
|
|
2517
|
+
* // {}
|
|
2518
|
+
* }
|
|
2519
|
+
*
|
|
2520
|
+
* main().catch(e => {
|
|
2521
|
+
* console.error(e);
|
|
2522
|
+
* throw e;
|
|
2523
|
+
* });
|
|
2524
|
+
*
|
|
2525
|
+
* ```
|
|
2394
2526
|
*
|
|
2395
2527
|
* @param params - Parameters for request
|
|
2396
2528
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2480,6 +2612,53 @@ export namespace servicenetworking_v1 {
|
|
|
2480
2612
|
|
|
2481
2613
|
/**
|
|
2482
2614
|
* Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
2615
|
+
* @example
|
|
2616
|
+
* ```js
|
|
2617
|
+
* // Before running the sample:
|
|
2618
|
+
* // - Enable the API at:
|
|
2619
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
2620
|
+
* // - Login into gcloud by running:
|
|
2621
|
+
* // ```sh
|
|
2622
|
+
* // $ gcloud auth application-default login
|
|
2623
|
+
* // ```
|
|
2624
|
+
* // - Install the npm module by running:
|
|
2625
|
+
* // ```sh
|
|
2626
|
+
* // $ npm install googleapis
|
|
2627
|
+
* // ```
|
|
2628
|
+
*
|
|
2629
|
+
* const {google} = require('googleapis');
|
|
2630
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
2631
|
+
*
|
|
2632
|
+
* async function main() {
|
|
2633
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2634
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2635
|
+
* scopes: [
|
|
2636
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2637
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
2638
|
+
* ],
|
|
2639
|
+
* });
|
|
2640
|
+
*
|
|
2641
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2642
|
+
* const authClient = await auth.getClient();
|
|
2643
|
+
* google.options({auth: authClient});
|
|
2644
|
+
*
|
|
2645
|
+
* // Do the magic
|
|
2646
|
+
* const res = await servicenetworking.operations.delete({
|
|
2647
|
+
* // The name of the operation resource to be deleted.
|
|
2648
|
+
* name: 'operations/.*',
|
|
2649
|
+
* });
|
|
2650
|
+
* console.log(res.data);
|
|
2651
|
+
*
|
|
2652
|
+
* // Example response
|
|
2653
|
+
* // {}
|
|
2654
|
+
* }
|
|
2655
|
+
*
|
|
2656
|
+
* main().catch(e => {
|
|
2657
|
+
* console.error(e);
|
|
2658
|
+
* throw e;
|
|
2659
|
+
* });
|
|
2660
|
+
*
|
|
2661
|
+
* ```
|
|
2483
2662
|
*
|
|
2484
2663
|
* @param params - Parameters for request
|
|
2485
2664
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2569,6 +2748,59 @@ export namespace servicenetworking_v1 {
|
|
|
2569
2748
|
|
|
2570
2749
|
/**
|
|
2571
2750
|
* Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
|
|
2751
|
+
* @example
|
|
2752
|
+
* ```js
|
|
2753
|
+
* // Before running the sample:
|
|
2754
|
+
* // - Enable the API at:
|
|
2755
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
2756
|
+
* // - Login into gcloud by running:
|
|
2757
|
+
* // ```sh
|
|
2758
|
+
* // $ gcloud auth application-default login
|
|
2759
|
+
* // ```
|
|
2760
|
+
* // - Install the npm module by running:
|
|
2761
|
+
* // ```sh
|
|
2762
|
+
* // $ npm install googleapis
|
|
2763
|
+
* // ```
|
|
2764
|
+
*
|
|
2765
|
+
* const {google} = require('googleapis');
|
|
2766
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
2767
|
+
*
|
|
2768
|
+
* async function main() {
|
|
2769
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2770
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2771
|
+
* scopes: [
|
|
2772
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2773
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
2774
|
+
* ],
|
|
2775
|
+
* });
|
|
2776
|
+
*
|
|
2777
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2778
|
+
* const authClient = await auth.getClient();
|
|
2779
|
+
* google.options({auth: authClient});
|
|
2780
|
+
*
|
|
2781
|
+
* // Do the magic
|
|
2782
|
+
* const res = await servicenetworking.operations.get({
|
|
2783
|
+
* // The name of the operation resource.
|
|
2784
|
+
* name: 'operations/my-operation',
|
|
2785
|
+
* });
|
|
2786
|
+
* console.log(res.data);
|
|
2787
|
+
*
|
|
2788
|
+
* // Example response
|
|
2789
|
+
* // {
|
|
2790
|
+
* // "done": false,
|
|
2791
|
+
* // "error": {},
|
|
2792
|
+
* // "metadata": {},
|
|
2793
|
+
* // "name": "my_name",
|
|
2794
|
+
* // "response": {}
|
|
2795
|
+
* // }
|
|
2796
|
+
* }
|
|
2797
|
+
*
|
|
2798
|
+
* main().catch(e => {
|
|
2799
|
+
* console.error(e);
|
|
2800
|
+
* throw e;
|
|
2801
|
+
* });
|
|
2802
|
+
*
|
|
2803
|
+
* ```
|
|
2572
2804
|
*
|
|
2573
2805
|
* @param params - Parameters for request
|
|
2574
2806
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2657,6 +2889,62 @@ export namespace servicenetworking_v1 {
|
|
|
2657
2889
|
|
|
2658
2890
|
/**
|
|
2659
2891
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2892
|
+
* @example
|
|
2893
|
+
* ```js
|
|
2894
|
+
* // Before running the sample:
|
|
2895
|
+
* // - Enable the API at:
|
|
2896
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
2897
|
+
* // - Login into gcloud by running:
|
|
2898
|
+
* // ```sh
|
|
2899
|
+
* // $ gcloud auth application-default login
|
|
2900
|
+
* // ```
|
|
2901
|
+
* // - Install the npm module by running:
|
|
2902
|
+
* // ```sh
|
|
2903
|
+
* // $ npm install googleapis
|
|
2904
|
+
* // ```
|
|
2905
|
+
*
|
|
2906
|
+
* const {google} = require('googleapis');
|
|
2907
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
2908
|
+
*
|
|
2909
|
+
* async function main() {
|
|
2910
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2911
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2912
|
+
* scopes: [
|
|
2913
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2914
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
2915
|
+
* ],
|
|
2916
|
+
* });
|
|
2917
|
+
*
|
|
2918
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2919
|
+
* const authClient = await auth.getClient();
|
|
2920
|
+
* google.options({auth: authClient});
|
|
2921
|
+
*
|
|
2922
|
+
* // Do the magic
|
|
2923
|
+
* const res = await servicenetworking.operations.list({
|
|
2924
|
+
* // The standard list filter.
|
|
2925
|
+
* filter: 'placeholder-value',
|
|
2926
|
+
* // The name of the operation's parent resource.
|
|
2927
|
+
* name: 'operations',
|
|
2928
|
+
* // The standard list page size.
|
|
2929
|
+
* pageSize: 'placeholder-value',
|
|
2930
|
+
* // The standard list page token.
|
|
2931
|
+
* pageToken: 'placeholder-value',
|
|
2932
|
+
* });
|
|
2933
|
+
* console.log(res.data);
|
|
2934
|
+
*
|
|
2935
|
+
* // Example response
|
|
2936
|
+
* // {
|
|
2937
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2938
|
+
* // "operations": []
|
|
2939
|
+
* // }
|
|
2940
|
+
* }
|
|
2941
|
+
*
|
|
2942
|
+
* main().catch(e => {
|
|
2943
|
+
* console.error(e);
|
|
2944
|
+
* throw e;
|
|
2945
|
+
* });
|
|
2946
|
+
*
|
|
2947
|
+
* ```
|
|
2660
2948
|
*
|
|
2661
2949
|
* @param params - Parameters for request
|
|
2662
2950
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2808,6 +3096,86 @@ export namespace servicenetworking_v1 {
|
|
|
2808
3096
|
|
|
2809
3097
|
/**
|
|
2810
3098
|
* For service producers, provisions a new subnet in a peered service's shared VPC network in the requested region and with the requested size that's expressed as a CIDR range (number of leading bits of ipV4 network mask). The method checks against the assigned allocated ranges to find a non-conflicting IP address range. The method will reuse a subnet if subsequent calls contain the same subnet name, region, and prefix length. This method will make producer's tenant project to be a shared VPC service project as needed.
|
|
3099
|
+
* @example
|
|
3100
|
+
* ```js
|
|
3101
|
+
* // Before running the sample:
|
|
3102
|
+
* // - Enable the API at:
|
|
3103
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
3104
|
+
* // - Login into gcloud by running:
|
|
3105
|
+
* // ```sh
|
|
3106
|
+
* // $ gcloud auth application-default login
|
|
3107
|
+
* // ```
|
|
3108
|
+
* // - Install the npm module by running:
|
|
3109
|
+
* // ```sh
|
|
3110
|
+
* // $ npm install googleapis
|
|
3111
|
+
* // ```
|
|
3112
|
+
*
|
|
3113
|
+
* const {google} = require('googleapis');
|
|
3114
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
3115
|
+
*
|
|
3116
|
+
* async function main() {
|
|
3117
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3118
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3119
|
+
* scopes: [
|
|
3120
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3121
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
3122
|
+
* ],
|
|
3123
|
+
* });
|
|
3124
|
+
*
|
|
3125
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3126
|
+
* const authClient = await auth.getClient();
|
|
3127
|
+
* google.options({auth: authClient});
|
|
3128
|
+
*
|
|
3129
|
+
* // Do the magic
|
|
3130
|
+
* const res = await servicenetworking.services.addSubnetwork({
|
|
3131
|
+
* // Required. A tenant project in the service producer organization, in the following format: services/{service\}/{collection-id\}/{resource-id\}. {collection-id\} is the cloud resource collection type that represents the tenant project. Only `projects` are supported. {resource-id\} is the tenant project numeric id, such as `123456`. {service\} the name of the peering service, such as `service-peering.example.com`. This service must already be enabled in the service consumer's project.
|
|
3132
|
+
* parent: 'services/my-service/[^/]+/[^/]+',
|
|
3133
|
+
*
|
|
3134
|
+
* // Request body metadata
|
|
3135
|
+
* requestBody: {
|
|
3136
|
+
* // request body parameters
|
|
3137
|
+
* // {
|
|
3138
|
+
* // "allowSubnetCidrRoutesOverlap": false,
|
|
3139
|
+
* // "checkServiceNetworkingUsePermission": false,
|
|
3140
|
+
* // "computeIdempotencyWindow": "my_computeIdempotencyWindow",
|
|
3141
|
+
* // "consumer": "my_consumer",
|
|
3142
|
+
* // "consumerNetwork": "my_consumerNetwork",
|
|
3143
|
+
* // "description": "my_description",
|
|
3144
|
+
* // "internalRange": "my_internalRange",
|
|
3145
|
+
* // "ipPrefixLength": 0,
|
|
3146
|
+
* // "outsideAllocationPublicIpRange": "my_outsideAllocationPublicIpRange",
|
|
3147
|
+
* // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess",
|
|
3148
|
+
* // "purpose": "my_purpose",
|
|
3149
|
+
* // "region": "my_region",
|
|
3150
|
+
* // "requestedAddress": "my_requestedAddress",
|
|
3151
|
+
* // "requestedRanges": [],
|
|
3152
|
+
* // "role": "my_role",
|
|
3153
|
+
* // "secondaryIpRangeSpecs": [],
|
|
3154
|
+
* // "skipRequestedAddressValidation": false,
|
|
3155
|
+
* // "subnetwork": "my_subnetwork",
|
|
3156
|
+
* // "subnetworkUsers": [],
|
|
3157
|
+
* // "useCustomComputeIdempotencyWindow": false
|
|
3158
|
+
* // }
|
|
3159
|
+
* },
|
|
3160
|
+
* });
|
|
3161
|
+
* console.log(res.data);
|
|
3162
|
+
*
|
|
3163
|
+
* // Example response
|
|
3164
|
+
* // {
|
|
3165
|
+
* // "done": false,
|
|
3166
|
+
* // "error": {},
|
|
3167
|
+
* // "metadata": {},
|
|
3168
|
+
* // "name": "my_name",
|
|
3169
|
+
* // "response": {}
|
|
3170
|
+
* // }
|
|
3171
|
+
* }
|
|
3172
|
+
*
|
|
3173
|
+
* main().catch(e => {
|
|
3174
|
+
* console.error(e);
|
|
3175
|
+
* throw e;
|
|
3176
|
+
* });
|
|
3177
|
+
*
|
|
3178
|
+
* ```
|
|
2811
3179
|
*
|
|
2812
3180
|
* @param params - Parameters for request
|
|
2813
3181
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2900,6 +3268,67 @@ export namespace servicenetworking_v1 {
|
|
|
2900
3268
|
|
|
2901
3269
|
/**
|
|
2902
3270
|
* Disables VPC service controls for a connection.
|
|
3271
|
+
* @example
|
|
3272
|
+
* ```js
|
|
3273
|
+
* // Before running the sample:
|
|
3274
|
+
* // - Enable the API at:
|
|
3275
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
3276
|
+
* // - Login into gcloud by running:
|
|
3277
|
+
* // ```sh
|
|
3278
|
+
* // $ gcloud auth application-default login
|
|
3279
|
+
* // ```
|
|
3280
|
+
* // - Install the npm module by running:
|
|
3281
|
+
* // ```sh
|
|
3282
|
+
* // $ npm install googleapis
|
|
3283
|
+
* // ```
|
|
3284
|
+
*
|
|
3285
|
+
* const {google} = require('googleapis');
|
|
3286
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
3287
|
+
*
|
|
3288
|
+
* async function main() {
|
|
3289
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3290
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3291
|
+
* scopes: [
|
|
3292
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3293
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
3294
|
+
* ],
|
|
3295
|
+
* });
|
|
3296
|
+
*
|
|
3297
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3298
|
+
* const authClient = await auth.getClient();
|
|
3299
|
+
* google.options({auth: authClient});
|
|
3300
|
+
*
|
|
3301
|
+
* // Do the magic
|
|
3302
|
+
* const res = await servicenetworking.services.disableVpcServiceControls({
|
|
3303
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
3304
|
+
* parent: 'services/my-service',
|
|
3305
|
+
*
|
|
3306
|
+
* // Request body metadata
|
|
3307
|
+
* requestBody: {
|
|
3308
|
+
* // request body parameters
|
|
3309
|
+
* // {
|
|
3310
|
+
* // "consumerNetwork": "my_consumerNetwork"
|
|
3311
|
+
* // }
|
|
3312
|
+
* },
|
|
3313
|
+
* });
|
|
3314
|
+
* console.log(res.data);
|
|
3315
|
+
*
|
|
3316
|
+
* // Example response
|
|
3317
|
+
* // {
|
|
3318
|
+
* // "done": false,
|
|
3319
|
+
* // "error": {},
|
|
3320
|
+
* // "metadata": {},
|
|
3321
|
+
* // "name": "my_name",
|
|
3322
|
+
* // "response": {}
|
|
3323
|
+
* // }
|
|
3324
|
+
* }
|
|
3325
|
+
*
|
|
3326
|
+
* main().catch(e => {
|
|
3327
|
+
* console.error(e);
|
|
3328
|
+
* throw e;
|
|
3329
|
+
* });
|
|
3330
|
+
*
|
|
3331
|
+
* ```
|
|
2903
3332
|
*
|
|
2904
3333
|
* @param params - Parameters for request
|
|
2905
3334
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2994,6 +3423,67 @@ export namespace servicenetworking_v1 {
|
|
|
2994
3423
|
|
|
2995
3424
|
/**
|
|
2996
3425
|
* Enables VPC service controls for a connection.
|
|
3426
|
+
* @example
|
|
3427
|
+
* ```js
|
|
3428
|
+
* // Before running the sample:
|
|
3429
|
+
* // - Enable the API at:
|
|
3430
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
3431
|
+
* // - Login into gcloud by running:
|
|
3432
|
+
* // ```sh
|
|
3433
|
+
* // $ gcloud auth application-default login
|
|
3434
|
+
* // ```
|
|
3435
|
+
* // - Install the npm module by running:
|
|
3436
|
+
* // ```sh
|
|
3437
|
+
* // $ npm install googleapis
|
|
3438
|
+
* // ```
|
|
3439
|
+
*
|
|
3440
|
+
* const {google} = require('googleapis');
|
|
3441
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
3442
|
+
*
|
|
3443
|
+
* async function main() {
|
|
3444
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3445
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3446
|
+
* scopes: [
|
|
3447
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3448
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
3449
|
+
* ],
|
|
3450
|
+
* });
|
|
3451
|
+
*
|
|
3452
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3453
|
+
* const authClient = await auth.getClient();
|
|
3454
|
+
* google.options({auth: authClient});
|
|
3455
|
+
*
|
|
3456
|
+
* // Do the magic
|
|
3457
|
+
* const res = await servicenetworking.services.enableVpcServiceControls({
|
|
3458
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
3459
|
+
* parent: 'services/my-service',
|
|
3460
|
+
*
|
|
3461
|
+
* // Request body metadata
|
|
3462
|
+
* requestBody: {
|
|
3463
|
+
* // request body parameters
|
|
3464
|
+
* // {
|
|
3465
|
+
* // "consumerNetwork": "my_consumerNetwork"
|
|
3466
|
+
* // }
|
|
3467
|
+
* },
|
|
3468
|
+
* });
|
|
3469
|
+
* console.log(res.data);
|
|
3470
|
+
*
|
|
3471
|
+
* // Example response
|
|
3472
|
+
* // {
|
|
3473
|
+
* // "done": false,
|
|
3474
|
+
* // "error": {},
|
|
3475
|
+
* // "metadata": {},
|
|
3476
|
+
* // "name": "my_name",
|
|
3477
|
+
* // "response": {}
|
|
3478
|
+
* // }
|
|
3479
|
+
* }
|
|
3480
|
+
*
|
|
3481
|
+
* main().catch(e => {
|
|
3482
|
+
* console.error(e);
|
|
3483
|
+
* throw e;
|
|
3484
|
+
* });
|
|
3485
|
+
*
|
|
3486
|
+
* ```
|
|
2997
3487
|
*
|
|
2998
3488
|
* @param params - Parameters for request
|
|
2999
3489
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3088,6 +3578,68 @@ export namespace servicenetworking_v1 {
|
|
|
3088
3578
|
|
|
3089
3579
|
/**
|
|
3090
3580
|
* Service producers can use this method to find a currently unused range within consumer allocated ranges. This returned range is not reserved, and not guaranteed to remain unused. It will validate previously provided allocated ranges, find non-conflicting sub-range of requested size (expressed in number of leading bits of ipv4 network mask, as in CIDR range notation).
|
|
3581
|
+
* @example
|
|
3582
|
+
* ```js
|
|
3583
|
+
* // Before running the sample:
|
|
3584
|
+
* // - Enable the API at:
|
|
3585
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
3586
|
+
* // - Login into gcloud by running:
|
|
3587
|
+
* // ```sh
|
|
3588
|
+
* // $ gcloud auth application-default login
|
|
3589
|
+
* // ```
|
|
3590
|
+
* // - Install the npm module by running:
|
|
3591
|
+
* // ```sh
|
|
3592
|
+
* // $ npm install googleapis
|
|
3593
|
+
* // ```
|
|
3594
|
+
*
|
|
3595
|
+
* const {google} = require('googleapis');
|
|
3596
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
3597
|
+
*
|
|
3598
|
+
* async function main() {
|
|
3599
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3600
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3601
|
+
* scopes: [
|
|
3602
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3603
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
3604
|
+
* ],
|
|
3605
|
+
* });
|
|
3606
|
+
*
|
|
3607
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3608
|
+
* const authClient = await auth.getClient();
|
|
3609
|
+
* google.options({auth: authClient});
|
|
3610
|
+
*
|
|
3611
|
+
* // Do the magic
|
|
3612
|
+
* const res = await servicenetworking.services.searchRange({
|
|
3613
|
+
* // Required. This is in a form services/{service\}. {service\} the name of the private access management service, for example 'service-peering.example.com'.
|
|
3614
|
+
* parent: 'services/my-service',
|
|
3615
|
+
*
|
|
3616
|
+
* // Request body metadata
|
|
3617
|
+
* requestBody: {
|
|
3618
|
+
* // request body parameters
|
|
3619
|
+
* // {
|
|
3620
|
+
* // "ipPrefixLength": 0,
|
|
3621
|
+
* // "network": "my_network"
|
|
3622
|
+
* // }
|
|
3623
|
+
* },
|
|
3624
|
+
* });
|
|
3625
|
+
* console.log(res.data);
|
|
3626
|
+
*
|
|
3627
|
+
* // Example response
|
|
3628
|
+
* // {
|
|
3629
|
+
* // "done": false,
|
|
3630
|
+
* // "error": {},
|
|
3631
|
+
* // "metadata": {},
|
|
3632
|
+
* // "name": "my_name",
|
|
3633
|
+
* // "response": {}
|
|
3634
|
+
* // }
|
|
3635
|
+
* }
|
|
3636
|
+
*
|
|
3637
|
+
* main().catch(e => {
|
|
3638
|
+
* console.error(e);
|
|
3639
|
+
* throw e;
|
|
3640
|
+
* });
|
|
3641
|
+
*
|
|
3642
|
+
* ```
|
|
3091
3643
|
*
|
|
3092
3644
|
* @param params - Parameters for request
|
|
3093
3645
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3180,6 +3732,69 @@ export namespace servicenetworking_v1 {
|
|
|
3180
3732
|
|
|
3181
3733
|
/**
|
|
3182
3734
|
* Service producers use this method to validate if the consumer provided network, project and requested range are valid. This allows them to use a fail-fast mechanism for consumer requests, and not have to wait for AddSubnetwork operation completion to determine if user request is invalid.
|
|
3735
|
+
* @example
|
|
3736
|
+
* ```js
|
|
3737
|
+
* // Before running the sample:
|
|
3738
|
+
* // - Enable the API at:
|
|
3739
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
3740
|
+
* // - Login into gcloud by running:
|
|
3741
|
+
* // ```sh
|
|
3742
|
+
* // $ gcloud auth application-default login
|
|
3743
|
+
* // ```
|
|
3744
|
+
* // - Install the npm module by running:
|
|
3745
|
+
* // ```sh
|
|
3746
|
+
* // $ npm install googleapis
|
|
3747
|
+
* // ```
|
|
3748
|
+
*
|
|
3749
|
+
* const {google} = require('googleapis');
|
|
3750
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
3751
|
+
*
|
|
3752
|
+
* async function main() {
|
|
3753
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3754
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3755
|
+
* scopes: [
|
|
3756
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3757
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
3758
|
+
* ],
|
|
3759
|
+
* });
|
|
3760
|
+
*
|
|
3761
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3762
|
+
* const authClient = await auth.getClient();
|
|
3763
|
+
* google.options({auth: authClient});
|
|
3764
|
+
*
|
|
3765
|
+
* // Do the magic
|
|
3766
|
+
* const res = await servicenetworking.services.validate({
|
|
3767
|
+
* // Required. This is in a form services/{service\} where {service\} is the name of the private access management service. For example 'service-peering.example.com'.
|
|
3768
|
+
* parent: 'services/my-service',
|
|
3769
|
+
*
|
|
3770
|
+
* // Request body metadata
|
|
3771
|
+
* requestBody: {
|
|
3772
|
+
* // request body parameters
|
|
3773
|
+
* // {
|
|
3774
|
+
* // "checkServiceNetworkingUsePermission": false,
|
|
3775
|
+
* // "consumerNetwork": "my_consumerNetwork",
|
|
3776
|
+
* // "consumerProject": {},
|
|
3777
|
+
* // "rangeReservation": {},
|
|
3778
|
+
* // "validateNetwork": false
|
|
3779
|
+
* // }
|
|
3780
|
+
* },
|
|
3781
|
+
* });
|
|
3782
|
+
* console.log(res.data);
|
|
3783
|
+
*
|
|
3784
|
+
* // Example response
|
|
3785
|
+
* // {
|
|
3786
|
+
* // "existingSubnetworkCandidates": [],
|
|
3787
|
+
* // "isValid": false,
|
|
3788
|
+
* // "validationError": "my_validationError"
|
|
3789
|
+
* // }
|
|
3790
|
+
* }
|
|
3791
|
+
*
|
|
3792
|
+
* main().catch(e => {
|
|
3793
|
+
* console.error(e);
|
|
3794
|
+
* throw e;
|
|
3795
|
+
* });
|
|
3796
|
+
*
|
|
3797
|
+
* ```
|
|
3183
3798
|
*
|
|
3184
3799
|
* @param params - Parameters for request
|
|
3185
3800
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3292,7 +3907,7 @@ export namespace servicenetworking_v1 {
|
|
|
3292
3907
|
export interface Params$Resource$Services$Disablevpcservicecontrols
|
|
3293
3908
|
extends StandardParameters {
|
|
3294
3909
|
/**
|
|
3295
|
-
* The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
3910
|
+
* Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
3296
3911
|
*/
|
|
3297
3912
|
parent?: string;
|
|
3298
3913
|
|
|
@@ -3304,7 +3919,7 @@ export namespace servicenetworking_v1 {
|
|
|
3304
3919
|
export interface Params$Resource$Services$Enablevpcservicecontrols
|
|
3305
3920
|
extends StandardParameters {
|
|
3306
3921
|
/**
|
|
3307
|
-
* The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
3922
|
+
* Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
3308
3923
|
*/
|
|
3309
3924
|
parent?: string;
|
|
3310
3925
|
|
|
@@ -3346,6 +3961,70 @@ export namespace servicenetworking_v1 {
|
|
|
3346
3961
|
|
|
3347
3962
|
/**
|
|
3348
3963
|
* Creates a private connection that establishes a VPC Network Peering connection to a VPC network in the service producer's organization. The administrator of the service consumer's VPC network invokes this method. The administrator must assign one or more allocated IP ranges for provisioning subnetworks in the service producer's VPC network. This connection is used for all supported services in the service producer's organization, so it only needs to be invoked once.
|
|
3964
|
+
* @example
|
|
3965
|
+
* ```js
|
|
3966
|
+
* // Before running the sample:
|
|
3967
|
+
* // - Enable the API at:
|
|
3968
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
3969
|
+
* // - Login into gcloud by running:
|
|
3970
|
+
* // ```sh
|
|
3971
|
+
* // $ gcloud auth application-default login
|
|
3972
|
+
* // ```
|
|
3973
|
+
* // - Install the npm module by running:
|
|
3974
|
+
* // ```sh
|
|
3975
|
+
* // $ npm install googleapis
|
|
3976
|
+
* // ```
|
|
3977
|
+
*
|
|
3978
|
+
* const {google} = require('googleapis');
|
|
3979
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
3980
|
+
*
|
|
3981
|
+
* async function main() {
|
|
3982
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3983
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3984
|
+
* scopes: [
|
|
3985
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3986
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
3987
|
+
* ],
|
|
3988
|
+
* });
|
|
3989
|
+
*
|
|
3990
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3991
|
+
* const authClient = await auth.getClient();
|
|
3992
|
+
* google.options({auth: authClient});
|
|
3993
|
+
*
|
|
3994
|
+
* // Do the magic
|
|
3995
|
+
* const res = await servicenetworking.services.connections.create({
|
|
3996
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
3997
|
+
* parent: 'services/my-service',
|
|
3998
|
+
*
|
|
3999
|
+
* // Request body metadata
|
|
4000
|
+
* requestBody: {
|
|
4001
|
+
* // request body parameters
|
|
4002
|
+
* // {
|
|
4003
|
+
* // "network": "my_network",
|
|
4004
|
+
* // "peering": "my_peering",
|
|
4005
|
+
* // "reservedPeeringRanges": [],
|
|
4006
|
+
* // "service": "my_service"
|
|
4007
|
+
* // }
|
|
4008
|
+
* },
|
|
4009
|
+
* });
|
|
4010
|
+
* console.log(res.data);
|
|
4011
|
+
*
|
|
4012
|
+
* // Example response
|
|
4013
|
+
* // {
|
|
4014
|
+
* // "done": false,
|
|
4015
|
+
* // "error": {},
|
|
4016
|
+
* // "metadata": {},
|
|
4017
|
+
* // "name": "my_name",
|
|
4018
|
+
* // "response": {}
|
|
4019
|
+
* // }
|
|
4020
|
+
* }
|
|
4021
|
+
*
|
|
4022
|
+
* main().catch(e => {
|
|
4023
|
+
* console.error(e);
|
|
4024
|
+
* throw e;
|
|
4025
|
+
* });
|
|
4026
|
+
*
|
|
4027
|
+
* ```
|
|
3349
4028
|
*
|
|
3350
4029
|
* @param params - Parameters for request
|
|
3351
4030
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3438,6 +4117,67 @@ export namespace servicenetworking_v1 {
|
|
|
3438
4117
|
|
|
3439
4118
|
/**
|
|
3440
4119
|
* Deletes a private service access connection.
|
|
4120
|
+
* @example
|
|
4121
|
+
* ```js
|
|
4122
|
+
* // Before running the sample:
|
|
4123
|
+
* // - Enable the API at:
|
|
4124
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
4125
|
+
* // - Login into gcloud by running:
|
|
4126
|
+
* // ```sh
|
|
4127
|
+
* // $ gcloud auth application-default login
|
|
4128
|
+
* // ```
|
|
4129
|
+
* // - Install the npm module by running:
|
|
4130
|
+
* // ```sh
|
|
4131
|
+
* // $ npm install googleapis
|
|
4132
|
+
* // ```
|
|
4133
|
+
*
|
|
4134
|
+
* const {google} = require('googleapis');
|
|
4135
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
4136
|
+
*
|
|
4137
|
+
* async function main() {
|
|
4138
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4139
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4140
|
+
* scopes: [
|
|
4141
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4142
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4143
|
+
* ],
|
|
4144
|
+
* });
|
|
4145
|
+
*
|
|
4146
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4147
|
+
* const authClient = await auth.getClient();
|
|
4148
|
+
* google.options({auth: authClient});
|
|
4149
|
+
*
|
|
4150
|
+
* // Do the magic
|
|
4151
|
+
* const res = await servicenetworking.services.connections.deleteConnection({
|
|
4152
|
+
* // Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
|
|
4153
|
+
* name: 'services/my-service/connections/my-connection',
|
|
4154
|
+
*
|
|
4155
|
+
* // Request body metadata
|
|
4156
|
+
* requestBody: {
|
|
4157
|
+
* // request body parameters
|
|
4158
|
+
* // {
|
|
4159
|
+
* // "consumerNetwork": "my_consumerNetwork"
|
|
4160
|
+
* // }
|
|
4161
|
+
* },
|
|
4162
|
+
* });
|
|
4163
|
+
* console.log(res.data);
|
|
4164
|
+
*
|
|
4165
|
+
* // Example response
|
|
4166
|
+
* // {
|
|
4167
|
+
* // "done": false,
|
|
4168
|
+
* // "error": {},
|
|
4169
|
+
* // "metadata": {},
|
|
4170
|
+
* // "name": "my_name",
|
|
4171
|
+
* // "response": {}
|
|
4172
|
+
* // }
|
|
4173
|
+
* }
|
|
4174
|
+
*
|
|
4175
|
+
* main().catch(e => {
|
|
4176
|
+
* console.error(e);
|
|
4177
|
+
* throw e;
|
|
4178
|
+
* });
|
|
4179
|
+
*
|
|
4180
|
+
* ```
|
|
3441
4181
|
*
|
|
3442
4182
|
* @param params - Parameters for request
|
|
3443
4183
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3527,6 +4267,57 @@ export namespace servicenetworking_v1 {
|
|
|
3527
4267
|
|
|
3528
4268
|
/**
|
|
3529
4269
|
* List the private connections that are configured in a service consumer's VPC network.
|
|
4270
|
+
* @example
|
|
4271
|
+
* ```js
|
|
4272
|
+
* // Before running the sample:
|
|
4273
|
+
* // - Enable the API at:
|
|
4274
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
4275
|
+
* // - Login into gcloud by running:
|
|
4276
|
+
* // ```sh
|
|
4277
|
+
* // $ gcloud auth application-default login
|
|
4278
|
+
* // ```
|
|
4279
|
+
* // - Install the npm module by running:
|
|
4280
|
+
* // ```sh
|
|
4281
|
+
* // $ npm install googleapis
|
|
4282
|
+
* // ```
|
|
4283
|
+
*
|
|
4284
|
+
* const {google} = require('googleapis');
|
|
4285
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
4286
|
+
*
|
|
4287
|
+
* async function main() {
|
|
4288
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4289
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4290
|
+
* scopes: [
|
|
4291
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4292
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4293
|
+
* ],
|
|
4294
|
+
* });
|
|
4295
|
+
*
|
|
4296
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4297
|
+
* const authClient = await auth.getClient();
|
|
4298
|
+
* google.options({auth: authClient});
|
|
4299
|
+
*
|
|
4300
|
+
* // Do the magic
|
|
4301
|
+
* const res = await servicenetworking.services.connections.list({
|
|
4302
|
+
* // Required. The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project\}/global/networks/{network\}`. {project\} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
|
|
4303
|
+
* network: 'placeholder-value',
|
|
4304
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `services/-` as the parameter value, all configured peering services are listed.
|
|
4305
|
+
* parent: 'services/my-service',
|
|
4306
|
+
* });
|
|
4307
|
+
* console.log(res.data);
|
|
4308
|
+
*
|
|
4309
|
+
* // Example response
|
|
4310
|
+
* // {
|
|
4311
|
+
* // "connections": []
|
|
4312
|
+
* // }
|
|
4313
|
+
* }
|
|
4314
|
+
*
|
|
4315
|
+
* main().catch(e => {
|
|
4316
|
+
* console.error(e);
|
|
4317
|
+
* throw e;
|
|
4318
|
+
* });
|
|
4319
|
+
*
|
|
4320
|
+
* ```
|
|
3530
4321
|
*
|
|
3531
4322
|
* @param params - Parameters for request
|
|
3532
4323
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3621,6 +4412,74 @@ export namespace servicenetworking_v1 {
|
|
|
3621
4412
|
|
|
3622
4413
|
/**
|
|
3623
4414
|
* Updates the allocated ranges that are assigned to a connection.
|
|
4415
|
+
* @example
|
|
4416
|
+
* ```js
|
|
4417
|
+
* // Before running the sample:
|
|
4418
|
+
* // - Enable the API at:
|
|
4419
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
4420
|
+
* // - Login into gcloud by running:
|
|
4421
|
+
* // ```sh
|
|
4422
|
+
* // $ gcloud auth application-default login
|
|
4423
|
+
* // ```
|
|
4424
|
+
* // - Install the npm module by running:
|
|
4425
|
+
* // ```sh
|
|
4426
|
+
* // $ npm install googleapis
|
|
4427
|
+
* // ```
|
|
4428
|
+
*
|
|
4429
|
+
* const {google} = require('googleapis');
|
|
4430
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
4431
|
+
*
|
|
4432
|
+
* async function main() {
|
|
4433
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4434
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4435
|
+
* scopes: [
|
|
4436
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4437
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4438
|
+
* ],
|
|
4439
|
+
* });
|
|
4440
|
+
*
|
|
4441
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4442
|
+
* const authClient = await auth.getClient();
|
|
4443
|
+
* google.options({auth: authClient});
|
|
4444
|
+
*
|
|
4445
|
+
* // Do the magic
|
|
4446
|
+
* const res = await servicenetworking.services.connections.patch({
|
|
4447
|
+
* // If a previously defined allocated range is removed, force flag must be set to true.
|
|
4448
|
+
* force: 'placeholder-value',
|
|
4449
|
+
* // Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
|
|
4450
|
+
* name: 'services/my-service/connections/my-connection',
|
|
4451
|
+
* // The update mask. If this is omitted, it defaults to "*". You can only update the listed peering ranges.
|
|
4452
|
+
* updateMask: 'placeholder-value',
|
|
4453
|
+
*
|
|
4454
|
+
* // Request body metadata
|
|
4455
|
+
* requestBody: {
|
|
4456
|
+
* // request body parameters
|
|
4457
|
+
* // {
|
|
4458
|
+
* // "network": "my_network",
|
|
4459
|
+
* // "peering": "my_peering",
|
|
4460
|
+
* // "reservedPeeringRanges": [],
|
|
4461
|
+
* // "service": "my_service"
|
|
4462
|
+
* // }
|
|
4463
|
+
* },
|
|
4464
|
+
* });
|
|
4465
|
+
* console.log(res.data);
|
|
4466
|
+
*
|
|
4467
|
+
* // Example response
|
|
4468
|
+
* // {
|
|
4469
|
+
* // "done": false,
|
|
4470
|
+
* // "error": {},
|
|
4471
|
+
* // "metadata": {},
|
|
4472
|
+
* // "name": "my_name",
|
|
4473
|
+
* // "response": {}
|
|
4474
|
+
* // }
|
|
4475
|
+
* }
|
|
4476
|
+
*
|
|
4477
|
+
* main().catch(e => {
|
|
4478
|
+
* console.error(e);
|
|
4479
|
+
* throw e;
|
|
4480
|
+
* });
|
|
4481
|
+
*
|
|
4482
|
+
* ```
|
|
3624
4483
|
*
|
|
3625
4484
|
* @param params - Parameters for request
|
|
3626
4485
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3712,7 +4571,7 @@ export namespace servicenetworking_v1 {
|
|
|
3712
4571
|
export interface Params$Resource$Services$Connections$Create
|
|
3713
4572
|
extends StandardParameters {
|
|
3714
4573
|
/**
|
|
3715
|
-
* The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
4574
|
+
* Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
3716
4575
|
*/
|
|
3717
4576
|
parent?: string;
|
|
3718
4577
|
|
|
@@ -3736,11 +4595,11 @@ export namespace servicenetworking_v1 {
|
|
|
3736
4595
|
export interface Params$Resource$Services$Connections$List
|
|
3737
4596
|
extends StandardParameters {
|
|
3738
4597
|
/**
|
|
3739
|
-
* The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project\}/global/networks/{network\}`. {project\} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
|
|
4598
|
+
* Required. The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project\}/global/networks/{network\}`. {project\} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
|
|
3740
4599
|
*/
|
|
3741
4600
|
network?: string;
|
|
3742
4601
|
/**
|
|
3743
|
-
* The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `services/-` as the parameter value, all configured peering services are listed.
|
|
4602
|
+
* Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `services/-` as the parameter value, all configured peering services are listed.
|
|
3744
4603
|
*/
|
|
3745
4604
|
parent?: string;
|
|
3746
4605
|
}
|
|
@@ -3751,7 +4610,7 @@ export namespace servicenetworking_v1 {
|
|
|
3751
4610
|
*/
|
|
3752
4611
|
force?: boolean;
|
|
3753
4612
|
/**
|
|
3754
|
-
* The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
|
|
4613
|
+
* Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
|
|
3755
4614
|
*/
|
|
3756
4615
|
name?: string;
|
|
3757
4616
|
/**
|
|
@@ -3773,6 +4632,69 @@ export namespace servicenetworking_v1 {
|
|
|
3773
4632
|
|
|
3774
4633
|
/**
|
|
3775
4634
|
* Service producers can use this method to add DNS record sets to private DNS zones in the shared producer host project.
|
|
4635
|
+
* @example
|
|
4636
|
+
* ```js
|
|
4637
|
+
* // Before running the sample:
|
|
4638
|
+
* // - Enable the API at:
|
|
4639
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
4640
|
+
* // - Login into gcloud by running:
|
|
4641
|
+
* // ```sh
|
|
4642
|
+
* // $ gcloud auth application-default login
|
|
4643
|
+
* // ```
|
|
4644
|
+
* // - Install the npm module by running:
|
|
4645
|
+
* // ```sh
|
|
4646
|
+
* // $ npm install googleapis
|
|
4647
|
+
* // ```
|
|
4648
|
+
*
|
|
4649
|
+
* const {google} = require('googleapis');
|
|
4650
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
4651
|
+
*
|
|
4652
|
+
* async function main() {
|
|
4653
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4654
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4655
|
+
* scopes: [
|
|
4656
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4657
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4658
|
+
* ],
|
|
4659
|
+
* });
|
|
4660
|
+
*
|
|
4661
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4662
|
+
* const authClient = await auth.getClient();
|
|
4663
|
+
* google.options({auth: authClient});
|
|
4664
|
+
*
|
|
4665
|
+
* // Do the magic
|
|
4666
|
+
* const res = await servicenetworking.services.dnsRecordSets.add({
|
|
4667
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
4668
|
+
* parent: 'services/my-service',
|
|
4669
|
+
*
|
|
4670
|
+
* // Request body metadata
|
|
4671
|
+
* requestBody: {
|
|
4672
|
+
* // request body parameters
|
|
4673
|
+
* // {
|
|
4674
|
+
* // "consumerNetwork": "my_consumerNetwork",
|
|
4675
|
+
* // "dnsRecordSet": {},
|
|
4676
|
+
* // "zone": "my_zone"
|
|
4677
|
+
* // }
|
|
4678
|
+
* },
|
|
4679
|
+
* });
|
|
4680
|
+
* console.log(res.data);
|
|
4681
|
+
*
|
|
4682
|
+
* // Example response
|
|
4683
|
+
* // {
|
|
4684
|
+
* // "done": false,
|
|
4685
|
+
* // "error": {},
|
|
4686
|
+
* // "metadata": {},
|
|
4687
|
+
* // "name": "my_name",
|
|
4688
|
+
* // "response": {}
|
|
4689
|
+
* // }
|
|
4690
|
+
* }
|
|
4691
|
+
*
|
|
4692
|
+
* main().catch(e => {
|
|
4693
|
+
* console.error(e);
|
|
4694
|
+
* throw e;
|
|
4695
|
+
* });
|
|
4696
|
+
*
|
|
4697
|
+
* ```
|
|
3776
4698
|
*
|
|
3777
4699
|
* @param params - Parameters for request
|
|
3778
4700
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3865,6 +4787,66 @@ export namespace servicenetworking_v1 {
|
|
|
3865
4787
|
|
|
3866
4788
|
/**
|
|
3867
4789
|
* Producers can use this method to retrieve information about the DNS record set added to the private zone inside the shared tenant host project associated with a consumer network.
|
|
4790
|
+
* @example
|
|
4791
|
+
* ```js
|
|
4792
|
+
* // Before running the sample:
|
|
4793
|
+
* // - Enable the API at:
|
|
4794
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
4795
|
+
* // - Login into gcloud by running:
|
|
4796
|
+
* // ```sh
|
|
4797
|
+
* // $ gcloud auth application-default login
|
|
4798
|
+
* // ```
|
|
4799
|
+
* // - Install the npm module by running:
|
|
4800
|
+
* // ```sh
|
|
4801
|
+
* // $ npm install googleapis
|
|
4802
|
+
* // ```
|
|
4803
|
+
*
|
|
4804
|
+
* const {google} = require('googleapis');
|
|
4805
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
4806
|
+
*
|
|
4807
|
+
* async function main() {
|
|
4808
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4809
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4810
|
+
* scopes: [
|
|
4811
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4812
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4813
|
+
* ],
|
|
4814
|
+
* });
|
|
4815
|
+
*
|
|
4816
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4817
|
+
* const authClient = await auth.getClient();
|
|
4818
|
+
* google.options({auth: authClient});
|
|
4819
|
+
*
|
|
4820
|
+
* // Do the magic
|
|
4821
|
+
* const res = await servicenetworking.services.dnsRecordSets.get({
|
|
4822
|
+
* // Required. The consumer network containing the record set. Must be in the form of projects/{project\}/global/networks/{network\}
|
|
4823
|
+
* consumerNetwork: 'placeholder-value',
|
|
4824
|
+
* // Required. The domain name of the zone containing the recordset.
|
|
4825
|
+
* domain: 'placeholder-value',
|
|
4826
|
+
* // Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service\}.
|
|
4827
|
+
* parent: 'services/my-service',
|
|
4828
|
+
* // Required. RecordSet Type eg. type='A'. See the list of [Supported DNS Types](https://cloud.google.com/dns/records/json-record).
|
|
4829
|
+
* type: 'placeholder-value',
|
|
4830
|
+
* // Required. The name of the zone containing the record set.
|
|
4831
|
+
* zone: 'placeholder-value',
|
|
4832
|
+
* });
|
|
4833
|
+
* console.log(res.data);
|
|
4834
|
+
*
|
|
4835
|
+
* // Example response
|
|
4836
|
+
* // {
|
|
4837
|
+
* // "data": [],
|
|
4838
|
+
* // "domain": "my_domain",
|
|
4839
|
+
* // "ttl": "my_ttl",
|
|
4840
|
+
* // "type": "my_type"
|
|
4841
|
+
* // }
|
|
4842
|
+
* }
|
|
4843
|
+
*
|
|
4844
|
+
* main().catch(e => {
|
|
4845
|
+
* console.error(e);
|
|
4846
|
+
* throw e;
|
|
4847
|
+
* });
|
|
4848
|
+
*
|
|
4849
|
+
* ```
|
|
3868
4850
|
*
|
|
3869
4851
|
* @param params - Parameters for request
|
|
3870
4852
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3957,6 +4939,59 @@ export namespace servicenetworking_v1 {
|
|
|
3957
4939
|
|
|
3958
4940
|
/**
|
|
3959
4941
|
* Producers can use this method to retrieve a list of available DNS RecordSets available inside the private zone on the tenant host project accessible from their network.
|
|
4942
|
+
* @example
|
|
4943
|
+
* ```js
|
|
4944
|
+
* // Before running the sample:
|
|
4945
|
+
* // - Enable the API at:
|
|
4946
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
4947
|
+
* // - Login into gcloud by running:
|
|
4948
|
+
* // ```sh
|
|
4949
|
+
* // $ gcloud auth application-default login
|
|
4950
|
+
* // ```
|
|
4951
|
+
* // - Install the npm module by running:
|
|
4952
|
+
* // ```sh
|
|
4953
|
+
* // $ npm install googleapis
|
|
4954
|
+
* // ```
|
|
4955
|
+
*
|
|
4956
|
+
* const {google} = require('googleapis');
|
|
4957
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
4958
|
+
*
|
|
4959
|
+
* async function main() {
|
|
4960
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4961
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4962
|
+
* scopes: [
|
|
4963
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4964
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4965
|
+
* ],
|
|
4966
|
+
* });
|
|
4967
|
+
*
|
|
4968
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4969
|
+
* const authClient = await auth.getClient();
|
|
4970
|
+
* google.options({auth: authClient});
|
|
4971
|
+
*
|
|
4972
|
+
* // Do the magic
|
|
4973
|
+
* const res = await servicenetworking.services.dnsRecordSets.list({
|
|
4974
|
+
* // Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project\}/global/networks/{network\} {project\} is the project number, as in '12345' {network\} is the network name.
|
|
4975
|
+
* consumerNetwork: 'placeholder-value',
|
|
4976
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
4977
|
+
* parent: 'services/my-service',
|
|
4978
|
+
* // Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.
|
|
4979
|
+
* zone: 'placeholder-value',
|
|
4980
|
+
* });
|
|
4981
|
+
* console.log(res.data);
|
|
4982
|
+
*
|
|
4983
|
+
* // Example response
|
|
4984
|
+
* // {
|
|
4985
|
+
* // "dnsRecordSets": []
|
|
4986
|
+
* // }
|
|
4987
|
+
* }
|
|
4988
|
+
*
|
|
4989
|
+
* main().catch(e => {
|
|
4990
|
+
* console.error(e);
|
|
4991
|
+
* throw e;
|
|
4992
|
+
* });
|
|
4993
|
+
*
|
|
4994
|
+
* ```
|
|
3960
4995
|
*
|
|
3961
4996
|
* @param params - Parameters for request
|
|
3962
4997
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4053,6 +5088,69 @@ export namespace servicenetworking_v1 {
|
|
|
4053
5088
|
|
|
4054
5089
|
/**
|
|
4055
5090
|
* Service producers can use this method to remove DNS record sets from private DNS zones in the shared producer host project.
|
|
5091
|
+
* @example
|
|
5092
|
+
* ```js
|
|
5093
|
+
* // Before running the sample:
|
|
5094
|
+
* // - Enable the API at:
|
|
5095
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
5096
|
+
* // - Login into gcloud by running:
|
|
5097
|
+
* // ```sh
|
|
5098
|
+
* // $ gcloud auth application-default login
|
|
5099
|
+
* // ```
|
|
5100
|
+
* // - Install the npm module by running:
|
|
5101
|
+
* // ```sh
|
|
5102
|
+
* // $ npm install googleapis
|
|
5103
|
+
* // ```
|
|
5104
|
+
*
|
|
5105
|
+
* const {google} = require('googleapis');
|
|
5106
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
5107
|
+
*
|
|
5108
|
+
* async function main() {
|
|
5109
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5110
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5111
|
+
* scopes: [
|
|
5112
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5113
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
5114
|
+
* ],
|
|
5115
|
+
* });
|
|
5116
|
+
*
|
|
5117
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5118
|
+
* const authClient = await auth.getClient();
|
|
5119
|
+
* google.options({auth: authClient});
|
|
5120
|
+
*
|
|
5121
|
+
* // Do the magic
|
|
5122
|
+
* const res = await servicenetworking.services.dnsRecordSets.remove({
|
|
5123
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
5124
|
+
* parent: 'services/my-service',
|
|
5125
|
+
*
|
|
5126
|
+
* // Request body metadata
|
|
5127
|
+
* requestBody: {
|
|
5128
|
+
* // request body parameters
|
|
5129
|
+
* // {
|
|
5130
|
+
* // "consumerNetwork": "my_consumerNetwork",
|
|
5131
|
+
* // "dnsRecordSet": {},
|
|
5132
|
+
* // "zone": "my_zone"
|
|
5133
|
+
* // }
|
|
5134
|
+
* },
|
|
5135
|
+
* });
|
|
5136
|
+
* console.log(res.data);
|
|
5137
|
+
*
|
|
5138
|
+
* // Example response
|
|
5139
|
+
* // {
|
|
5140
|
+
* // "done": false,
|
|
5141
|
+
* // "error": {},
|
|
5142
|
+
* // "metadata": {},
|
|
5143
|
+
* // "name": "my_name",
|
|
5144
|
+
* // "response": {}
|
|
5145
|
+
* // }
|
|
5146
|
+
* }
|
|
5147
|
+
*
|
|
5148
|
+
* main().catch(e => {
|
|
5149
|
+
* console.error(e);
|
|
5150
|
+
* throw e;
|
|
5151
|
+
* });
|
|
5152
|
+
*
|
|
5153
|
+
* ```
|
|
4056
5154
|
*
|
|
4057
5155
|
* @param params - Parameters for request
|
|
4058
5156
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4145,6 +5243,70 @@ export namespace servicenetworking_v1 {
|
|
|
4145
5243
|
|
|
4146
5244
|
/**
|
|
4147
5245
|
* Service producers can use this method to update DNS record sets from private DNS zones in the shared producer host project.
|
|
5246
|
+
* @example
|
|
5247
|
+
* ```js
|
|
5248
|
+
* // Before running the sample:
|
|
5249
|
+
* // - Enable the API at:
|
|
5250
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
5251
|
+
* // - Login into gcloud by running:
|
|
5252
|
+
* // ```sh
|
|
5253
|
+
* // $ gcloud auth application-default login
|
|
5254
|
+
* // ```
|
|
5255
|
+
* // - Install the npm module by running:
|
|
5256
|
+
* // ```sh
|
|
5257
|
+
* // $ npm install googleapis
|
|
5258
|
+
* // ```
|
|
5259
|
+
*
|
|
5260
|
+
* const {google} = require('googleapis');
|
|
5261
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
5262
|
+
*
|
|
5263
|
+
* async function main() {
|
|
5264
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5265
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5266
|
+
* scopes: [
|
|
5267
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5268
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
5269
|
+
* ],
|
|
5270
|
+
* });
|
|
5271
|
+
*
|
|
5272
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5273
|
+
* const authClient = await auth.getClient();
|
|
5274
|
+
* google.options({auth: authClient});
|
|
5275
|
+
*
|
|
5276
|
+
* // Do the magic
|
|
5277
|
+
* const res = await servicenetworking.services.dnsRecordSets.update({
|
|
5278
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
5279
|
+
* parent: 'services/my-service',
|
|
5280
|
+
*
|
|
5281
|
+
* // Request body metadata
|
|
5282
|
+
* requestBody: {
|
|
5283
|
+
* // request body parameters
|
|
5284
|
+
* // {
|
|
5285
|
+
* // "consumerNetwork": "my_consumerNetwork",
|
|
5286
|
+
* // "existingDnsRecordSet": {},
|
|
5287
|
+
* // "newDnsRecordSet": {},
|
|
5288
|
+
* // "zone": "my_zone"
|
|
5289
|
+
* // }
|
|
5290
|
+
* },
|
|
5291
|
+
* });
|
|
5292
|
+
* console.log(res.data);
|
|
5293
|
+
*
|
|
5294
|
+
* // Example response
|
|
5295
|
+
* // {
|
|
5296
|
+
* // "done": false,
|
|
5297
|
+
* // "error": {},
|
|
5298
|
+
* // "metadata": {},
|
|
5299
|
+
* // "name": "my_name",
|
|
5300
|
+
* // "response": {}
|
|
5301
|
+
* // }
|
|
5302
|
+
* }
|
|
5303
|
+
*
|
|
5304
|
+
* main().catch(e => {
|
|
5305
|
+
* console.error(e);
|
|
5306
|
+
* throw e;
|
|
5307
|
+
* });
|
|
5308
|
+
*
|
|
5309
|
+
* ```
|
|
4148
5310
|
*
|
|
4149
5311
|
* @param params - Parameters for request
|
|
4150
5312
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4319,6 +5481,69 @@ export namespace servicenetworking_v1 {
|
|
|
4319
5481
|
|
|
4320
5482
|
/**
|
|
4321
5483
|
* Service producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project.
|
|
5484
|
+
* @example
|
|
5485
|
+
* ```js
|
|
5486
|
+
* // Before running the sample:
|
|
5487
|
+
* // - Enable the API at:
|
|
5488
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
5489
|
+
* // - Login into gcloud by running:
|
|
5490
|
+
* // ```sh
|
|
5491
|
+
* // $ gcloud auth application-default login
|
|
5492
|
+
* // ```
|
|
5493
|
+
* // - Install the npm module by running:
|
|
5494
|
+
* // ```sh
|
|
5495
|
+
* // $ npm install googleapis
|
|
5496
|
+
* // ```
|
|
5497
|
+
*
|
|
5498
|
+
* const {google} = require('googleapis');
|
|
5499
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
5500
|
+
*
|
|
5501
|
+
* async function main() {
|
|
5502
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5503
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5504
|
+
* scopes: [
|
|
5505
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5506
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
5507
|
+
* ],
|
|
5508
|
+
* });
|
|
5509
|
+
*
|
|
5510
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5511
|
+
* const authClient = await auth.getClient();
|
|
5512
|
+
* google.options({auth: authClient});
|
|
5513
|
+
*
|
|
5514
|
+
* // Do the magic
|
|
5515
|
+
* const res = await servicenetworking.services.dnsZones.add({
|
|
5516
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
5517
|
+
* parent: 'services/my-service',
|
|
5518
|
+
*
|
|
5519
|
+
* // Request body metadata
|
|
5520
|
+
* requestBody: {
|
|
5521
|
+
* // request body parameters
|
|
5522
|
+
* // {
|
|
5523
|
+
* // "consumerNetwork": "my_consumerNetwork",
|
|
5524
|
+
* // "dnsSuffix": "my_dnsSuffix",
|
|
5525
|
+
* // "name": "my_name"
|
|
5526
|
+
* // }
|
|
5527
|
+
* },
|
|
5528
|
+
* });
|
|
5529
|
+
* console.log(res.data);
|
|
5530
|
+
*
|
|
5531
|
+
* // Example response
|
|
5532
|
+
* // {
|
|
5533
|
+
* // "done": false,
|
|
5534
|
+
* // "error": {},
|
|
5535
|
+
* // "metadata": {},
|
|
5536
|
+
* // "name": "my_name",
|
|
5537
|
+
* // "response": {}
|
|
5538
|
+
* // }
|
|
5539
|
+
* }
|
|
5540
|
+
*
|
|
5541
|
+
* main().catch(e => {
|
|
5542
|
+
* console.error(e);
|
|
5543
|
+
* throw e;
|
|
5544
|
+
* });
|
|
5545
|
+
*
|
|
5546
|
+
* ```
|
|
4322
5547
|
*
|
|
4323
5548
|
* @param params - Parameters for request
|
|
4324
5549
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4411,6 +5636,68 @@ export namespace servicenetworking_v1 {
|
|
|
4411
5636
|
|
|
4412
5637
|
/**
|
|
4413
5638
|
* Service producers can use this method to remove private DNS zones in the shared producer host project and matching peering zones in the consumer project.
|
|
5639
|
+
* @example
|
|
5640
|
+
* ```js
|
|
5641
|
+
* // Before running the sample:
|
|
5642
|
+
* // - Enable the API at:
|
|
5643
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
5644
|
+
* // - Login into gcloud by running:
|
|
5645
|
+
* // ```sh
|
|
5646
|
+
* // $ gcloud auth application-default login
|
|
5647
|
+
* // ```
|
|
5648
|
+
* // - Install the npm module by running:
|
|
5649
|
+
* // ```sh
|
|
5650
|
+
* // $ npm install googleapis
|
|
5651
|
+
* // ```
|
|
5652
|
+
*
|
|
5653
|
+
* const {google} = require('googleapis');
|
|
5654
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
5655
|
+
*
|
|
5656
|
+
* async function main() {
|
|
5657
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5658
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5659
|
+
* scopes: [
|
|
5660
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5661
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
5662
|
+
* ],
|
|
5663
|
+
* });
|
|
5664
|
+
*
|
|
5665
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5666
|
+
* const authClient = await auth.getClient();
|
|
5667
|
+
* google.options({auth: authClient});
|
|
5668
|
+
*
|
|
5669
|
+
* // Do the magic
|
|
5670
|
+
* const res = await servicenetworking.services.dnsZones.remove({
|
|
5671
|
+
* // Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.
|
|
5672
|
+
* parent: 'services/my-service',
|
|
5673
|
+
*
|
|
5674
|
+
* // Request body metadata
|
|
5675
|
+
* requestBody: {
|
|
5676
|
+
* // request body parameters
|
|
5677
|
+
* // {
|
|
5678
|
+
* // "consumerNetwork": "my_consumerNetwork",
|
|
5679
|
+
* // "name": "my_name"
|
|
5680
|
+
* // }
|
|
5681
|
+
* },
|
|
5682
|
+
* });
|
|
5683
|
+
* console.log(res.data);
|
|
5684
|
+
*
|
|
5685
|
+
* // Example response
|
|
5686
|
+
* // {
|
|
5687
|
+
* // "done": false,
|
|
5688
|
+
* // "error": {},
|
|
5689
|
+
* // "metadata": {},
|
|
5690
|
+
* // "name": "my_name",
|
|
5691
|
+
* // "response": {}
|
|
5692
|
+
* // }
|
|
5693
|
+
* }
|
|
5694
|
+
*
|
|
5695
|
+
* main().catch(e => {
|
|
5696
|
+
* console.error(e);
|
|
5697
|
+
* throw e;
|
|
5698
|
+
* });
|
|
5699
|
+
*
|
|
5700
|
+
* ```
|
|
4414
5701
|
*
|
|
4415
5702
|
* @param params - Parameters for request
|
|
4416
5703
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4564,6 +5851,69 @@ export namespace servicenetworking_v1 {
|
|
|
4564
5851
|
|
|
4565
5852
|
/**
|
|
4566
5853
|
* Service producers use this method to get the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.
|
|
5854
|
+
* @example
|
|
5855
|
+
* ```js
|
|
5856
|
+
* // Before running the sample:
|
|
5857
|
+
* // - Enable the API at:
|
|
5858
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
5859
|
+
* // - Login into gcloud by running:
|
|
5860
|
+
* // ```sh
|
|
5861
|
+
* // $ gcloud auth application-default login
|
|
5862
|
+
* // ```
|
|
5863
|
+
* // - Install the npm module by running:
|
|
5864
|
+
* // ```sh
|
|
5865
|
+
* // $ npm install googleapis
|
|
5866
|
+
* // ```
|
|
5867
|
+
*
|
|
5868
|
+
* const {google} = require('googleapis');
|
|
5869
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
5870
|
+
*
|
|
5871
|
+
* async function main() {
|
|
5872
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5873
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5874
|
+
* scopes: [
|
|
5875
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5876
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
5877
|
+
* ],
|
|
5878
|
+
* });
|
|
5879
|
+
*
|
|
5880
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5881
|
+
* const authClient = await auth.getClient();
|
|
5882
|
+
* google.options({auth: authClient});
|
|
5883
|
+
*
|
|
5884
|
+
* // Do the magic
|
|
5885
|
+
* const res = await servicenetworking.services.projects.global.networks.get({
|
|
5886
|
+
* // Optional. When true, include the used IP ranges as part of the GetConsumerConfig output. This includes routes created inside the service networking network, consumer network, peers of the consumer network, and reserved ranges inside the service networking network. By default, this is false
|
|
5887
|
+
* includeUsedIpRanges: 'placeholder-value',
|
|
5888
|
+
* // Required. Name of the consumer config to retrieve in the format: `services/{service\}/projects/{project\}/global/networks/{network\}`. {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is a project number e.g. `12345` that contains the service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
|
|
5889
|
+
* name: 'services/my-service/projects/my-project/global/networks/my-network',
|
|
5890
|
+
* });
|
|
5891
|
+
* console.log(res.data);
|
|
5892
|
+
*
|
|
5893
|
+
* // Example response
|
|
5894
|
+
* // {
|
|
5895
|
+
* // "cloudsqlConfigs": [],
|
|
5896
|
+
* // "consumerExportCustomRoutes": false,
|
|
5897
|
+
* // "consumerExportSubnetRoutesWithPublicIp": false,
|
|
5898
|
+
* // "consumerImportCustomRoutes": false,
|
|
5899
|
+
* // "consumerImportSubnetRoutesWithPublicIp": false,
|
|
5900
|
+
* // "producerExportCustomRoutes": false,
|
|
5901
|
+
* // "producerExportSubnetRoutesWithPublicIp": false,
|
|
5902
|
+
* // "producerImportCustomRoutes": false,
|
|
5903
|
+
* // "producerImportSubnetRoutesWithPublicIp": false,
|
|
5904
|
+
* // "producerNetwork": "my_producerNetwork",
|
|
5905
|
+
* // "reservedRanges": [],
|
|
5906
|
+
* // "usedIpRanges": [],
|
|
5907
|
+
* // "vpcScReferenceArchitectureEnabled": false
|
|
5908
|
+
* // }
|
|
5909
|
+
* }
|
|
5910
|
+
*
|
|
5911
|
+
* main().catch(e => {
|
|
5912
|
+
* console.error(e);
|
|
5913
|
+
* throw e;
|
|
5914
|
+
* });
|
|
5915
|
+
*
|
|
5916
|
+
* ```
|
|
4567
5917
|
*
|
|
4568
5918
|
* @param params - Parameters for request
|
|
4569
5919
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4653,6 +6003,58 @@ export namespace servicenetworking_v1 {
|
|
|
4653
6003
|
|
|
4654
6004
|
/**
|
|
4655
6005
|
* Consumers use this method to find out the state of VPC Service Controls. The controls could be enabled or disabled for a connection.
|
|
6006
|
+
* @example
|
|
6007
|
+
* ```js
|
|
6008
|
+
* // Before running the sample:
|
|
6009
|
+
* // - Enable the API at:
|
|
6010
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
6011
|
+
* // - Login into gcloud by running:
|
|
6012
|
+
* // ```sh
|
|
6013
|
+
* // $ gcloud auth application-default login
|
|
6014
|
+
* // ```
|
|
6015
|
+
* // - Install the npm module by running:
|
|
6016
|
+
* // ```sh
|
|
6017
|
+
* // $ npm install googleapis
|
|
6018
|
+
* // ```
|
|
6019
|
+
*
|
|
6020
|
+
* const {google} = require('googleapis');
|
|
6021
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
6022
|
+
*
|
|
6023
|
+
* async function main() {
|
|
6024
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6025
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6026
|
+
* scopes: [
|
|
6027
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6028
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
6029
|
+
* ],
|
|
6030
|
+
* });
|
|
6031
|
+
*
|
|
6032
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6033
|
+
* const authClient = await auth.getClient();
|
|
6034
|
+
* google.options({auth: authClient});
|
|
6035
|
+
*
|
|
6036
|
+
* // Do the magic
|
|
6037
|
+
* const res =
|
|
6038
|
+
* await servicenetworking.services.projects.global.networks.getVpcServiceControls(
|
|
6039
|
+
* {
|
|
6040
|
+
* // Required. Name of the VPC Service Controls config to retrieve in the format: `services/{service\}/projects/{project\}/global/networks/{network\}`. {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is a project number e.g. `12345` that contains the service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
|
|
6041
|
+
* name: 'services/my-service/projects/my-project/global/networks/my-network',
|
|
6042
|
+
* },
|
|
6043
|
+
* );
|
|
6044
|
+
* console.log(res.data);
|
|
6045
|
+
*
|
|
6046
|
+
* // Example response
|
|
6047
|
+
* // {
|
|
6048
|
+
* // "enabled": false
|
|
6049
|
+
* // }
|
|
6050
|
+
* }
|
|
6051
|
+
*
|
|
6052
|
+
* main().catch(e => {
|
|
6053
|
+
* console.error(e);
|
|
6054
|
+
* throw e;
|
|
6055
|
+
* });
|
|
6056
|
+
*
|
|
6057
|
+
* ```
|
|
4656
6058
|
*
|
|
4657
6059
|
* @param params - Parameters for request
|
|
4658
6060
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4748,6 +6150,71 @@ export namespace servicenetworking_v1 {
|
|
|
4748
6150
|
|
|
4749
6151
|
/**
|
|
4750
6152
|
* Service producers use this method to update the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.
|
|
6153
|
+
* @example
|
|
6154
|
+
* ```js
|
|
6155
|
+
* // Before running the sample:
|
|
6156
|
+
* // - Enable the API at:
|
|
6157
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
6158
|
+
* // - Login into gcloud by running:
|
|
6159
|
+
* // ```sh
|
|
6160
|
+
* // $ gcloud auth application-default login
|
|
6161
|
+
* // ```
|
|
6162
|
+
* // - Install the npm module by running:
|
|
6163
|
+
* // ```sh
|
|
6164
|
+
* // $ npm install googleapis
|
|
6165
|
+
* // ```
|
|
6166
|
+
*
|
|
6167
|
+
* const {google} = require('googleapis');
|
|
6168
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
6169
|
+
*
|
|
6170
|
+
* async function main() {
|
|
6171
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6172
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6173
|
+
* scopes: [
|
|
6174
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6175
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
6176
|
+
* ],
|
|
6177
|
+
* });
|
|
6178
|
+
*
|
|
6179
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6180
|
+
* const authClient = await auth.getClient();
|
|
6181
|
+
* google.options({auth: authClient});
|
|
6182
|
+
*
|
|
6183
|
+
* // Do the magic
|
|
6184
|
+
* const res =
|
|
6185
|
+
* await servicenetworking.services.projects.global.networks.updateConsumerConfig(
|
|
6186
|
+
* {
|
|
6187
|
+
* // Required. Parent resource identifying the connection for which the consumer config is being updated in the format: `services/{service\}/projects/{project\}/global/networks/{network\}` {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network\} is the name of the service consumer's VPC network.
|
|
6188
|
+
* parent:
|
|
6189
|
+
* 'services/my-service/projects/my-project/global/networks/my-network',
|
|
6190
|
+
*
|
|
6191
|
+
* // Request body metadata
|
|
6192
|
+
* requestBody: {
|
|
6193
|
+
* // request body parameters
|
|
6194
|
+
* // {
|
|
6195
|
+
* // "consumerConfig": {}
|
|
6196
|
+
* // }
|
|
6197
|
+
* },
|
|
6198
|
+
* },
|
|
6199
|
+
* );
|
|
6200
|
+
* console.log(res.data);
|
|
6201
|
+
*
|
|
6202
|
+
* // Example response
|
|
6203
|
+
* // {
|
|
6204
|
+
* // "done": false,
|
|
6205
|
+
* // "error": {},
|
|
6206
|
+
* // "metadata": {},
|
|
6207
|
+
* // "name": "my_name",
|
|
6208
|
+
* // "response": {}
|
|
6209
|
+
* // }
|
|
6210
|
+
* }
|
|
6211
|
+
*
|
|
6212
|
+
* main().catch(e => {
|
|
6213
|
+
* console.error(e);
|
|
6214
|
+
* throw e;
|
|
6215
|
+
* });
|
|
6216
|
+
*
|
|
6217
|
+
* ```
|
|
4751
6218
|
*
|
|
4752
6219
|
* @param params - Parameters for request
|
|
4753
6220
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4881,6 +6348,57 @@ export namespace servicenetworking_v1 {
|
|
|
4881
6348
|
|
|
4882
6349
|
/**
|
|
4883
6350
|
* Service producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project
|
|
6351
|
+
* @example
|
|
6352
|
+
* ```js
|
|
6353
|
+
* // Before running the sample:
|
|
6354
|
+
* // - Enable the API at:
|
|
6355
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
6356
|
+
* // - Login into gcloud by running:
|
|
6357
|
+
* // ```sh
|
|
6358
|
+
* // $ gcloud auth application-default login
|
|
6359
|
+
* // ```
|
|
6360
|
+
* // - Install the npm module by running:
|
|
6361
|
+
* // ```sh
|
|
6362
|
+
* // $ npm install googleapis
|
|
6363
|
+
* // ```
|
|
6364
|
+
*
|
|
6365
|
+
* const {google} = require('googleapis');
|
|
6366
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
6367
|
+
*
|
|
6368
|
+
* async function main() {
|
|
6369
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6370
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6371
|
+
* scopes: [
|
|
6372
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6373
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
6374
|
+
* ],
|
|
6375
|
+
* });
|
|
6376
|
+
*
|
|
6377
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6378
|
+
* const authClient = await auth.getClient();
|
|
6379
|
+
* google.options({auth: authClient});
|
|
6380
|
+
*
|
|
6381
|
+
* // Do the magic
|
|
6382
|
+
* const res =
|
|
6383
|
+
* await servicenetworking.services.projects.global.networks.dnsZones.get({
|
|
6384
|
+
* // Required. The network that the consumer is using to connect with services. Must be in the form of services/{service\}/projects/{project\}/global/networks/{network\}/dnsZones/{zoneName\} Where {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this {project\} is the project number, as in '12345' {network\} is the network name. {zoneName\} is the DNS zone name
|
|
6385
|
+
* name: 'services/my-service/projects/my-project/global/networks/my-network/dnsZones/my-dnsZone',
|
|
6386
|
+
* });
|
|
6387
|
+
* console.log(res.data);
|
|
6388
|
+
*
|
|
6389
|
+
* // Example response
|
|
6390
|
+
* // {
|
|
6391
|
+
* // "consumerPeeringZone": {},
|
|
6392
|
+
* // "producerPrivateZone": {}
|
|
6393
|
+
* // }
|
|
6394
|
+
* }
|
|
6395
|
+
*
|
|
6396
|
+
* main().catch(e => {
|
|
6397
|
+
* console.error(e);
|
|
6398
|
+
* throw e;
|
|
6399
|
+
* });
|
|
6400
|
+
*
|
|
6401
|
+
* ```
|
|
4884
6402
|
*
|
|
4885
6403
|
* @param params - Parameters for request
|
|
4886
6404
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4971,6 +6489,57 @@ export namespace servicenetworking_v1 {
|
|
|
4971
6489
|
|
|
4972
6490
|
/**
|
|
4973
6491
|
* * Service producers can use this method to retrieve a list of available DNS zones in the shared producer host project and the matching peering zones in the consumer project. *
|
|
6492
|
+
* @example
|
|
6493
|
+
* ```js
|
|
6494
|
+
* // Before running the sample:
|
|
6495
|
+
* // - Enable the API at:
|
|
6496
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
6497
|
+
* // - Login into gcloud by running:
|
|
6498
|
+
* // ```sh
|
|
6499
|
+
* // $ gcloud auth application-default login
|
|
6500
|
+
* // ```
|
|
6501
|
+
* // - Install the npm module by running:
|
|
6502
|
+
* // ```sh
|
|
6503
|
+
* // $ npm install googleapis
|
|
6504
|
+
* // ```
|
|
6505
|
+
*
|
|
6506
|
+
* const {google} = require('googleapis');
|
|
6507
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
6508
|
+
*
|
|
6509
|
+
* async function main() {
|
|
6510
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6511
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6512
|
+
* scopes: [
|
|
6513
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6514
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
6515
|
+
* ],
|
|
6516
|
+
* });
|
|
6517
|
+
*
|
|
6518
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6519
|
+
* const authClient = await auth.getClient();
|
|
6520
|
+
* google.options({auth: authClient});
|
|
6521
|
+
*
|
|
6522
|
+
* // Do the magic
|
|
6523
|
+
* const res =
|
|
6524
|
+
* await servicenetworking.services.projects.global.networks.dnsZones.list({
|
|
6525
|
+
* // Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service\}/projects/{project\}/global/networks/{network\} Service: The service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. Projects: the consumer project containing the consumer network. Network: The consumer network accessible from the tenant project.
|
|
6526
|
+
* parent:
|
|
6527
|
+
* 'services/my-service/projects/my-project/global/networks/my-network',
|
|
6528
|
+
* });
|
|
6529
|
+
* console.log(res.data);
|
|
6530
|
+
*
|
|
6531
|
+
* // Example response
|
|
6532
|
+
* // {
|
|
6533
|
+
* // "dnsZonePairs": []
|
|
6534
|
+
* // }
|
|
6535
|
+
* }
|
|
6536
|
+
*
|
|
6537
|
+
* main().catch(e => {
|
|
6538
|
+
* console.error(e);
|
|
6539
|
+
* throw e;
|
|
6540
|
+
* });
|
|
6541
|
+
*
|
|
6542
|
+
* ```
|
|
4974
6543
|
*
|
|
4975
6544
|
* @param params - Parameters for request
|
|
4976
6545
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5088,6 +6657,72 @@ export namespace servicenetworking_v1 {
|
|
|
5088
6657
|
|
|
5089
6658
|
/**
|
|
5090
6659
|
* Creates a peered DNS domain which sends requests for records in given namespace originating in the service producer VPC network to the consumer VPC network to be resolved.
|
|
6660
|
+
* @example
|
|
6661
|
+
* ```js
|
|
6662
|
+
* // Before running the sample:
|
|
6663
|
+
* // - Enable the API at:
|
|
6664
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
6665
|
+
* // - Login into gcloud by running:
|
|
6666
|
+
* // ```sh
|
|
6667
|
+
* // $ gcloud auth application-default login
|
|
6668
|
+
* // ```
|
|
6669
|
+
* // - Install the npm module by running:
|
|
6670
|
+
* // ```sh
|
|
6671
|
+
* // $ npm install googleapis
|
|
6672
|
+
* // ```
|
|
6673
|
+
*
|
|
6674
|
+
* const {google} = require('googleapis');
|
|
6675
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
6676
|
+
*
|
|
6677
|
+
* async function main() {
|
|
6678
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6679
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6680
|
+
* scopes: [
|
|
6681
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6682
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
6683
|
+
* ],
|
|
6684
|
+
* });
|
|
6685
|
+
*
|
|
6686
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6687
|
+
* const authClient = await auth.getClient();
|
|
6688
|
+
* google.options({auth: authClient});
|
|
6689
|
+
*
|
|
6690
|
+
* // Do the magic
|
|
6691
|
+
* const res =
|
|
6692
|
+
* await servicenetworking.services.projects.global.networks.peeredDnsDomains.create(
|
|
6693
|
+
* {
|
|
6694
|
+
* // Required. Parent resource identifying the connection for which the peered DNS domain will be created in the format: `services/{service\}/projects/{project\}/global/networks/{network\}` {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network\} is the name of the service consumer's VPC network.
|
|
6695
|
+
* parent:
|
|
6696
|
+
* 'services/my-service/projects/my-project/global/networks/my-network',
|
|
6697
|
+
*
|
|
6698
|
+
* // Request body metadata
|
|
6699
|
+
* requestBody: {
|
|
6700
|
+
* // request body parameters
|
|
6701
|
+
* // {
|
|
6702
|
+
* // "dnsSuffix": "my_dnsSuffix",
|
|
6703
|
+
* // "name": "my_name"
|
|
6704
|
+
* // }
|
|
6705
|
+
* },
|
|
6706
|
+
* },
|
|
6707
|
+
* );
|
|
6708
|
+
* console.log(res.data);
|
|
6709
|
+
*
|
|
6710
|
+
* // Example response
|
|
6711
|
+
* // {
|
|
6712
|
+
* // "done": false,
|
|
6713
|
+
* // "error": {},
|
|
6714
|
+
* // "metadata": {},
|
|
6715
|
+
* // "name": "my_name",
|
|
6716
|
+
* // "response": {}
|
|
6717
|
+
* // }
|
|
6718
|
+
* }
|
|
6719
|
+
*
|
|
6720
|
+
* main().catch(e => {
|
|
6721
|
+
* console.error(e);
|
|
6722
|
+
* throw e;
|
|
6723
|
+
* });
|
|
6724
|
+
*
|
|
6725
|
+
* ```
|
|
5091
6726
|
*
|
|
5092
6727
|
* @param params - Parameters for request
|
|
5093
6728
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5181,6 +6816,62 @@ export namespace servicenetworking_v1 {
|
|
|
5181
6816
|
|
|
5182
6817
|
/**
|
|
5183
6818
|
* Deletes a peered DNS domain.
|
|
6819
|
+
* @example
|
|
6820
|
+
* ```js
|
|
6821
|
+
* // Before running the sample:
|
|
6822
|
+
* // - Enable the API at:
|
|
6823
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
6824
|
+
* // - Login into gcloud by running:
|
|
6825
|
+
* // ```sh
|
|
6826
|
+
* // $ gcloud auth application-default login
|
|
6827
|
+
* // ```
|
|
6828
|
+
* // - Install the npm module by running:
|
|
6829
|
+
* // ```sh
|
|
6830
|
+
* // $ npm install googleapis
|
|
6831
|
+
* // ```
|
|
6832
|
+
*
|
|
6833
|
+
* const {google} = require('googleapis');
|
|
6834
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
6835
|
+
*
|
|
6836
|
+
* async function main() {
|
|
6837
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6838
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6839
|
+
* scopes: [
|
|
6840
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6841
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
6842
|
+
* ],
|
|
6843
|
+
* });
|
|
6844
|
+
*
|
|
6845
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6846
|
+
* const authClient = await auth.getClient();
|
|
6847
|
+
* google.options({auth: authClient});
|
|
6848
|
+
*
|
|
6849
|
+
* // Do the magic
|
|
6850
|
+
* const res =
|
|
6851
|
+
* await servicenetworking.services.projects.global.networks.peeredDnsDomains.delete(
|
|
6852
|
+
* {
|
|
6853
|
+
* // Required. The name of the peered DNS domain to delete in the format: `services/{service\}/projects/{project\}/global/networks/{network\}/peeredDnsDomains/{name\}`. {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network\} is the name of the service consumer's VPC network. {name\} is the name of the peered DNS domain.
|
|
6854
|
+
* name: 'services/my-service/projects/my-project/global/networks/my-network/peeredDnsDomains/my-peeredDnsDomain',
|
|
6855
|
+
* },
|
|
6856
|
+
* );
|
|
6857
|
+
* console.log(res.data);
|
|
6858
|
+
*
|
|
6859
|
+
* // Example response
|
|
6860
|
+
* // {
|
|
6861
|
+
* // "done": false,
|
|
6862
|
+
* // "error": {},
|
|
6863
|
+
* // "metadata": {},
|
|
6864
|
+
* // "name": "my_name",
|
|
6865
|
+
* // "response": {}
|
|
6866
|
+
* // }
|
|
6867
|
+
* }
|
|
6868
|
+
*
|
|
6869
|
+
* main().catch(e => {
|
|
6870
|
+
* console.error(e);
|
|
6871
|
+
* throw e;
|
|
6872
|
+
* });
|
|
6873
|
+
*
|
|
6874
|
+
* ```
|
|
5184
6875
|
*
|
|
5185
6876
|
* @param params - Parameters for request
|
|
5186
6877
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5271,6 +6962,59 @@ export namespace servicenetworking_v1 {
|
|
|
5271
6962
|
|
|
5272
6963
|
/**
|
|
5273
6964
|
* Lists peered DNS domains for a connection.
|
|
6965
|
+
* @example
|
|
6966
|
+
* ```js
|
|
6967
|
+
* // Before running the sample:
|
|
6968
|
+
* // - Enable the API at:
|
|
6969
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
6970
|
+
* // - Login into gcloud by running:
|
|
6971
|
+
* // ```sh
|
|
6972
|
+
* // $ gcloud auth application-default login
|
|
6973
|
+
* // ```
|
|
6974
|
+
* // - Install the npm module by running:
|
|
6975
|
+
* // ```sh
|
|
6976
|
+
* // $ npm install googleapis
|
|
6977
|
+
* // ```
|
|
6978
|
+
*
|
|
6979
|
+
* const {google} = require('googleapis');
|
|
6980
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
6981
|
+
*
|
|
6982
|
+
* async function main() {
|
|
6983
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6984
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6985
|
+
* scopes: [
|
|
6986
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
6987
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
6988
|
+
* ],
|
|
6989
|
+
* });
|
|
6990
|
+
*
|
|
6991
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6992
|
+
* const authClient = await auth.getClient();
|
|
6993
|
+
* google.options({auth: authClient});
|
|
6994
|
+
*
|
|
6995
|
+
* // Do the magic
|
|
6996
|
+
* const res =
|
|
6997
|
+
* await servicenetworking.services.projects.global.networks.peeredDnsDomains.list(
|
|
6998
|
+
* {
|
|
6999
|
+
* // Required. Parent resource identifying the connection which owns this collection of peered DNS domains in the format: `services/{service\}/projects/{project\}/global/networks/{network\}`. {service\} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project\} is a project number e.g. `12345` that contains the service consumer's VPC network. {network\} is the name of the service consumer's VPC network.
|
|
7000
|
+
* parent:
|
|
7001
|
+
* 'services/my-service/projects/my-project/global/networks/my-network',
|
|
7002
|
+
* },
|
|
7003
|
+
* );
|
|
7004
|
+
* console.log(res.data);
|
|
7005
|
+
*
|
|
7006
|
+
* // Example response
|
|
7007
|
+
* // {
|
|
7008
|
+
* // "peeredDnsDomains": []
|
|
7009
|
+
* // }
|
|
7010
|
+
* }
|
|
7011
|
+
*
|
|
7012
|
+
* main().catch(e => {
|
|
7013
|
+
* console.error(e);
|
|
7014
|
+
* throw e;
|
|
7015
|
+
* });
|
|
7016
|
+
*
|
|
7017
|
+
* ```
|
|
5274
7018
|
*
|
|
5275
7019
|
* @param params - Parameters for request
|
|
5276
7020
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5404,6 +7148,68 @@ export namespace servicenetworking_v1 {
|
|
|
5404
7148
|
|
|
5405
7149
|
/**
|
|
5406
7150
|
* Service producers can use this method to add roles in the shared VPC host project. Each role is bound to the provided member. Each role must be selected from within an allowlisted set of roles. Each role is applied at only the granularity specified in the allowlist.
|
|
7151
|
+
* @example
|
|
7152
|
+
* ```js
|
|
7153
|
+
* // Before running the sample:
|
|
7154
|
+
* // - Enable the API at:
|
|
7155
|
+
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
|
|
7156
|
+
* // - Login into gcloud by running:
|
|
7157
|
+
* // ```sh
|
|
7158
|
+
* // $ gcloud auth application-default login
|
|
7159
|
+
* // ```
|
|
7160
|
+
* // - Install the npm module by running:
|
|
7161
|
+
* // ```sh
|
|
7162
|
+
* // $ npm install googleapis
|
|
7163
|
+
* // ```
|
|
7164
|
+
*
|
|
7165
|
+
* const {google} = require('googleapis');
|
|
7166
|
+
* const servicenetworking = google.servicenetworking('v1');
|
|
7167
|
+
*
|
|
7168
|
+
* async function main() {
|
|
7169
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7170
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7171
|
+
* scopes: [
|
|
7172
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
7173
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
7174
|
+
* ],
|
|
7175
|
+
* });
|
|
7176
|
+
*
|
|
7177
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7178
|
+
* const authClient = await auth.getClient();
|
|
7179
|
+
* google.options({auth: authClient});
|
|
7180
|
+
*
|
|
7181
|
+
* // Do the magic
|
|
7182
|
+
* const res = await servicenetworking.services.roles.add({
|
|
7183
|
+
* // Required. This is in a form services/{service\} where {service\} is the name of the private access management service. For example 'service-peering.example.com'.
|
|
7184
|
+
* parent: 'services/my-service',
|
|
7185
|
+
*
|
|
7186
|
+
* // Request body metadata
|
|
7187
|
+
* requestBody: {
|
|
7188
|
+
* // request body parameters
|
|
7189
|
+
* // {
|
|
7190
|
+
* // "consumerNetwork": "my_consumerNetwork",
|
|
7191
|
+
* // "policyBinding": []
|
|
7192
|
+
* // }
|
|
7193
|
+
* },
|
|
7194
|
+
* });
|
|
7195
|
+
* console.log(res.data);
|
|
7196
|
+
*
|
|
7197
|
+
* // Example response
|
|
7198
|
+
* // {
|
|
7199
|
+
* // "done": false,
|
|
7200
|
+
* // "error": {},
|
|
7201
|
+
* // "metadata": {},
|
|
7202
|
+
* // "name": "my_name",
|
|
7203
|
+
* // "response": {}
|
|
7204
|
+
* // }
|
|
7205
|
+
* }
|
|
7206
|
+
*
|
|
7207
|
+
* main().catch(e => {
|
|
7208
|
+
* console.error(e);
|
|
7209
|
+
* throw e;
|
|
7210
|
+
* });
|
|
7211
|
+
*
|
|
7212
|
+
* ```
|
|
5407
7213
|
*
|
|
5408
7214
|
* @param params - Parameters for request
|
|
5409
7215
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|