@googleapis/servicenetworking 12.1.0 → 12.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1beta.ts CHANGED
@@ -582,6 +582,10 @@ export namespace servicenetworking_v1beta {
582
582
  * The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com
583
583
  */
584
584
  environment?: string | null;
585
+ /**
586
+ * Defines policies applying to the API methods of the service.
587
+ */
588
+ methodPolicies?: Schema$MethodPolicy[];
585
589
  }
586
590
  /**
587
591
  * Settings for C++ client libraries.
@@ -868,6 +872,23 @@ export namespace servicenetworking_v1beta {
868
872
  */
869
873
  typeUrl?: string | null;
870
874
  }
875
+ /**
876
+ * Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.
877
+ */
878
+ export interface Schema$FieldPolicy {
879
+ /**
880
+ * Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, "resourcemanager.projects.get".
881
+ */
882
+ resourcePermission?: string | null;
883
+ /**
884
+ * Specifies the resource type for the resource referred to by the field.
885
+ */
886
+ resourceType?: string | null;
887
+ /**
888
+ * Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as "foo.bar" or "foo.bar,foo.baz".
889
+ */
890
+ selector?: string | null;
891
+ }
871
892
  /**
872
893
  * Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.
873
894
  */
@@ -1159,6 +1180,19 @@ export namespace servicenetworking_v1beta {
1159
1180
  */
1160
1181
  syntax?: string | null;
1161
1182
  }
1183
+ /**
1184
+ * Defines policies applying to an RPC method.
1185
+ */
1186
+ export interface Schema$MethodPolicy {
1187
+ /**
1188
+ * Policies that are applicable to the request message.
1189
+ */
1190
+ requestPolicies?: Schema$FieldPolicy[];
1191
+ /**
1192
+ * Selects a method to which these policies should be enforced, for example, "google.pubsub.v1.Subscriber.CreateSubscription". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .
1193
+ */
1194
+ selector?: string | null;
1195
+ }
1162
1196
  /**
1163
1197
  * Describes the generator configuration for a method.
1164
1198
  */
@@ -1358,7 +1392,7 @@ export namespace servicenetworking_v1beta {
1358
1392
  */
1359
1393
  name?: string | null;
1360
1394
  /**
1361
- * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
1395
+ * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
1362
1396
  */
1363
1397
  response?: {[key: string]: any} | null;
1364
1398
  }
@@ -1929,55 +1963,6 @@ export namespace servicenetworking_v1beta {
1929
1963
 
1930
1964
  /**
1931
1965
  * 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.
1932
- * @example
1933
- * ```js
1934
- * // Before running the sample:
1935
- * // - Enable the API at:
1936
- * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
1937
- * // - Login into gcloud by running:
1938
- * // `$ gcloud auth application-default login`
1939
- * // - Install the npm module by running:
1940
- * // `$ npm install googleapis`
1941
- *
1942
- * const {google} = require('googleapis');
1943
- * const servicenetworking = google.servicenetworking('v1beta');
1944
- *
1945
- * async function main() {
1946
- * const auth = new google.auth.GoogleAuth({
1947
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1948
- * scopes: [
1949
- * 'https://www.googleapis.com/auth/cloud-platform',
1950
- * 'https://www.googleapis.com/auth/service.management',
1951
- * ],
1952
- * });
1953
- *
1954
- * // Acquire an auth client, and bind it to all future calls
1955
- * const authClient = await auth.getClient();
1956
- * google.options({auth: authClient});
1957
- *
1958
- * // Do the magic
1959
- * const res = await servicenetworking.operations.get({
1960
- * // The name of the operation resource.
1961
- * name: 'operations/my-operation',
1962
- * });
1963
- * console.log(res.data);
1964
- *
1965
- * // Example response
1966
- * // {
1967
- * // "done": false,
1968
- * // "error": {},
1969
- * // "metadata": {},
1970
- * // "name": "my_name",
1971
- * // "response": {}
1972
- * // }
1973
- * }
1974
- *
1975
- * main().catch(e => {
1976
- * console.error(e);
1977
- * throw e;
1978
- * });
1979
- *
1980
- * ```
1981
1966
  *
1982
1967
  * @param params - Parameters for request
1983
1968
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2078,70 +2063,6 @@ export namespace servicenetworking_v1beta {
2078
2063
 
2079
2064
  /**
2080
2065
  * 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. The response from the `get` operation will be of type `Subnetwork` if the operation successfully completes.
2081
- * @example
2082
- * ```js
2083
- * // Before running the sample:
2084
- * // - Enable the API at:
2085
- * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2086
- * // - Login into gcloud by running:
2087
- * // `$ gcloud auth application-default login`
2088
- * // - Install the npm module by running:
2089
- * // `$ npm install googleapis`
2090
- *
2091
- * const {google} = require('googleapis');
2092
- * const servicenetworking = google.servicenetworking('v1beta');
2093
- *
2094
- * async function main() {
2095
- * const auth = new google.auth.GoogleAuth({
2096
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2097
- * scopes: [
2098
- * 'https://www.googleapis.com/auth/cloud-platform',
2099
- * 'https://www.googleapis.com/auth/service.management',
2100
- * ],
2101
- * });
2102
- *
2103
- * // Acquire an auth client, and bind it to all future calls
2104
- * const authClient = await auth.getClient();
2105
- * google.options({auth: authClient});
2106
- *
2107
- * // Do the magic
2108
- * const res = await servicenetworking.services.addSubnetwork({
2109
- * // 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.
2110
- * parent: 'services/my-service/[^/]+/[^/]+',
2111
- *
2112
- * // Request body metadata
2113
- * requestBody: {
2114
- * // request body parameters
2115
- * // {
2116
- * // "consumer": "my_consumer",
2117
- * // "consumerNetwork": "my_consumerNetwork",
2118
- * // "description": "my_description",
2119
- * // "ipPrefixLength": 0,
2120
- * // "region": "my_region",
2121
- * // "requestedAddress": "my_requestedAddress",
2122
- * // "subnetwork": "my_subnetwork",
2123
- * // "subnetworkUsers": []
2124
- * // }
2125
- * },
2126
- * });
2127
- * console.log(res.data);
2128
- *
2129
- * // Example response
2130
- * // {
2131
- * // "done": false,
2132
- * // "error": {},
2133
- * // "metadata": {},
2134
- * // "name": "my_name",
2135
- * // "response": {}
2136
- * // }
2137
- * }
2138
- *
2139
- * main().catch(e => {
2140
- * console.error(e);
2141
- * throw e;
2142
- * });
2143
- *
2144
- * ```
2145
2066
  *
2146
2067
  * @param params - Parameters for request
2147
2068
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2230,64 +2151,6 @@ export namespace servicenetworking_v1beta {
2230
2151
 
2231
2152
  /**
2232
2153
  * 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). Operation
2233
- * @example
2234
- * ```js
2235
- * // Before running the sample:
2236
- * // - Enable the API at:
2237
- * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2238
- * // - Login into gcloud by running:
2239
- * // `$ gcloud auth application-default login`
2240
- * // - Install the npm module by running:
2241
- * // `$ npm install googleapis`
2242
- *
2243
- * const {google} = require('googleapis');
2244
- * const servicenetworking = google.servicenetworking('v1beta');
2245
- *
2246
- * async function main() {
2247
- * const auth = new google.auth.GoogleAuth({
2248
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2249
- * scopes: [
2250
- * 'https://www.googleapis.com/auth/cloud-platform',
2251
- * 'https://www.googleapis.com/auth/service.management',
2252
- * ],
2253
- * });
2254
- *
2255
- * // Acquire an auth client, and bind it to all future calls
2256
- * const authClient = await auth.getClient();
2257
- * google.options({auth: authClient});
2258
- *
2259
- * // Do the magic
2260
- * const res = await servicenetworking.services.searchRange({
2261
- * // Required. This is in a form services/{service\}. {service\} the name of the private access management service, for example 'service-peering.example.com'.
2262
- * parent: 'services/my-service',
2263
- *
2264
- * // Request body metadata
2265
- * requestBody: {
2266
- * // request body parameters
2267
- * // {
2268
- * // "ipPrefixLength": 0,
2269
- * // "network": "my_network"
2270
- * // }
2271
- * },
2272
- * });
2273
- * console.log(res.data);
2274
- *
2275
- * // Example response
2276
- * // {
2277
- * // "done": false,
2278
- * // "error": {},
2279
- * // "metadata": {},
2280
- * // "name": "my_name",
2281
- * // "response": {}
2282
- * // }
2283
- * }
2284
- *
2285
- * main().catch(e => {
2286
- * console.error(e);
2287
- * throw e;
2288
- * });
2289
- *
2290
- * ```
2291
2154
  *
2292
2155
  * @param params - Parameters for request
2293
2156
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2376,70 +2239,6 @@ export namespace servicenetworking_v1beta {
2376
2239
 
2377
2240
  /**
2378
2241
  * Updates the allocated ranges that are assigned to a connection. The response from the `get` operation will be of type `Connection` if the operation successfully completes.
2379
- * @example
2380
- * ```js
2381
- * // Before running the sample:
2382
- * // - Enable the API at:
2383
- * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2384
- * // - Login into gcloud by running:
2385
- * // `$ gcloud auth application-default login`
2386
- * // - Install the npm module by running:
2387
- * // `$ npm install googleapis`
2388
- *
2389
- * const {google} = require('googleapis');
2390
- * const servicenetworking = google.servicenetworking('v1beta');
2391
- *
2392
- * async function main() {
2393
- * const auth = new google.auth.GoogleAuth({
2394
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2395
- * scopes: [
2396
- * 'https://www.googleapis.com/auth/cloud-platform',
2397
- * 'https://www.googleapis.com/auth/service.management',
2398
- * ],
2399
- * });
2400
- *
2401
- * // Acquire an auth client, and bind it to all future calls
2402
- * const authClient = await auth.getClient();
2403
- * google.options({auth: authClient});
2404
- *
2405
- * // Do the magic
2406
- * const res = await servicenetworking.services.updateConnections({
2407
- * // If a previously defined allocated range is removed, force flag must be set to true.
2408
- * force: 'placeholder-value',
2409
- * // The service producer peering service that is managing peering connectivity for a service producer organization. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com`.
2410
- * name: 'services/my-service',
2411
- * // The update mask. If this is omitted, it defaults to "*". You can only update the listed peering ranges.
2412
- * updateMask: 'placeholder-value',
2413
- *
2414
- * // Request body metadata
2415
- * requestBody: {
2416
- * // request body parameters
2417
- * // {
2418
- * // "network": "my_network",
2419
- * // "peering": "my_peering",
2420
- * // "reservedPeeringRanges": [],
2421
- * // "service": "my_service"
2422
- * // }
2423
- * },
2424
- * });
2425
- * console.log(res.data);
2426
- *
2427
- * // Example response
2428
- * // {
2429
- * // "done": false,
2430
- * // "error": {},
2431
- * // "metadata": {},
2432
- * // "name": "my_name",
2433
- * // "response": {}
2434
- * // }
2435
- * }
2436
- *
2437
- * main().catch(e => {
2438
- * console.error(e);
2439
- * throw e;
2440
- * });
2441
- *
2442
- * ```
2443
2242
  *
2444
2243
  * @param params - Parameters for request
2445
2244
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2580,66 +2379,6 @@ export namespace servicenetworking_v1beta {
2580
2379
 
2581
2380
  /**
2582
2381
  * 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. The response from the `get` operation will be of type `Connection` if the operation successfully completes.
2583
- * @example
2584
- * ```js
2585
- * // Before running the sample:
2586
- * // - Enable the API at:
2587
- * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2588
- * // - Login into gcloud by running:
2589
- * // `$ gcloud auth application-default login`
2590
- * // - Install the npm module by running:
2591
- * // `$ npm install googleapis`
2592
- *
2593
- * const {google} = require('googleapis');
2594
- * const servicenetworking = google.servicenetworking('v1beta');
2595
- *
2596
- * async function main() {
2597
- * const auth = new google.auth.GoogleAuth({
2598
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2599
- * scopes: [
2600
- * 'https://www.googleapis.com/auth/cloud-platform',
2601
- * 'https://www.googleapis.com/auth/service.management',
2602
- * ],
2603
- * });
2604
- *
2605
- * // Acquire an auth client, and bind it to all future calls
2606
- * const authClient = await auth.getClient();
2607
- * google.options({auth: authClient});
2608
- *
2609
- * // Do the magic
2610
- * const res = await servicenetworking.services.connections.create({
2611
- * // 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`.
2612
- * parent: 'services/my-service',
2613
- *
2614
- * // Request body metadata
2615
- * requestBody: {
2616
- * // request body parameters
2617
- * // {
2618
- * // "network": "my_network",
2619
- * // "peering": "my_peering",
2620
- * // "reservedPeeringRanges": [],
2621
- * // "service": "my_service"
2622
- * // }
2623
- * },
2624
- * });
2625
- * console.log(res.data);
2626
- *
2627
- * // Example response
2628
- * // {
2629
- * // "done": false,
2630
- * // "error": {},
2631
- * // "metadata": {},
2632
- * // "name": "my_name",
2633
- * // "response": {}
2634
- * // }
2635
- * }
2636
- *
2637
- * main().catch(e => {
2638
- * console.error(e);
2639
- * throw e;
2640
- * });
2641
- *
2642
- * ```
2643
2382
  *
2644
2383
  * @param params - Parameters for request
2645
2384
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2728,53 +2467,6 @@ export namespace servicenetworking_v1beta {
2728
2467
 
2729
2468
  /**
2730
2469
  * List the private connections that are configured in a service consumer's VPC network.
2731
- * @example
2732
- * ```js
2733
- * // Before running the sample:
2734
- * // - Enable the API at:
2735
- * // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
2736
- * // - Login into gcloud by running:
2737
- * // `$ gcloud auth application-default login`
2738
- * // - Install the npm module by running:
2739
- * // `$ npm install googleapis`
2740
- *
2741
- * const {google} = require('googleapis');
2742
- * const servicenetworking = google.servicenetworking('v1beta');
2743
- *
2744
- * async function main() {
2745
- * const auth = new google.auth.GoogleAuth({
2746
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2747
- * scopes: [
2748
- * 'https://www.googleapis.com/auth/cloud-platform',
2749
- * 'https://www.googleapis.com/auth/service.management',
2750
- * ],
2751
- * });
2752
- *
2753
- * // Acquire an auth client, and bind it to all future calls
2754
- * const authClient = await auth.getClient();
2755
- * google.options({auth: authClient});
2756
- *
2757
- * // Do the magic
2758
- * const res = await servicenetworking.services.connections.list({
2759
- * // 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.
2760
- * network: 'placeholder-value',
2761
- * // 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 `-` as the parameter value, all configured public peering services are listed.
2762
- * parent: 'services/my-service',
2763
- * });
2764
- * console.log(res.data);
2765
- *
2766
- * // Example response
2767
- * // {
2768
- * // "connections": []
2769
- * // }
2770
- * }
2771
- *
2772
- * main().catch(e => {
2773
- * console.error(e);
2774
- * throw e;
2775
- * });
2776
- *
2777
- * ```
2778
2470
  *
2779
2471
  * @param params - Parameters for request
2780
2472
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.