@googleapis/serviceusage 16.0.1 → 17.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 +30 -0
- package/build/v1.d.ts +622 -1
- package/build/v1.js.map +1 -1
- package/build/v1beta1.d.ts +1352 -1
- package/build/v1beta1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +622 -1
- package/v1beta1.ts +1352 -1
package/v1beta1.ts
CHANGED
|
@@ -261,7 +261,7 @@ export namespace serviceusage_v1beta1 {
|
|
|
261
261
|
*/
|
|
262
262
|
kind?: string | null;
|
|
263
263
|
/**
|
|
264
|
-
* Content of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `
|
|
264
|
+
* Content of the configuration. The underlying schema should be defined by Aspect owners as protobuf message under `google/api/configaspects/proto`.
|
|
265
265
|
*/
|
|
266
266
|
spec?: {[key: string]: any} | null;
|
|
267
267
|
}
|
|
@@ -436,6 +436,73 @@ export namespace serviceusage_v1beta1 {
|
|
|
436
436
|
*/
|
|
437
437
|
services?: Schema$GoogleApiServiceusageV1Service[];
|
|
438
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* `BatchingConfigProto` defines the batching configuration for an API method.
|
|
441
|
+
*/
|
|
442
|
+
export interface Schema$BatchingConfigProto {
|
|
443
|
+
/**
|
|
444
|
+
* The request and response fields used in batching.
|
|
445
|
+
*/
|
|
446
|
+
batchDescriptor?: Schema$BatchingDescriptorProto;
|
|
447
|
+
/**
|
|
448
|
+
* The thresholds which trigger a batched request to be sent.
|
|
449
|
+
*/
|
|
450
|
+
thresholds?: Schema$BatchingSettingsProto;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* `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.
|
|
454
|
+
*/
|
|
455
|
+
export interface Schema$BatchingDescriptorProto {
|
|
456
|
+
/**
|
|
457
|
+
* The repeated field in the request message to be aggregated by batching.
|
|
458
|
+
*/
|
|
459
|
+
batchedField?: string | null;
|
|
460
|
+
/**
|
|
461
|
+
* 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.
|
|
462
|
+
*/
|
|
463
|
+
discriminatorFields?: string[] | null;
|
|
464
|
+
/**
|
|
465
|
+
* 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.
|
|
466
|
+
*/
|
|
467
|
+
subresponseField?: string | null;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* `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.
|
|
471
|
+
*/
|
|
472
|
+
export interface Schema$BatchingSettingsProto {
|
|
473
|
+
/**
|
|
474
|
+
* The duration after which a batch should be sent, starting from the addition of the first message to that batch.
|
|
475
|
+
*/
|
|
476
|
+
delayThreshold?: string | null;
|
|
477
|
+
/**
|
|
478
|
+
* The maximum number of elements collected in a batch that could be accepted by server.
|
|
479
|
+
*/
|
|
480
|
+
elementCountLimit?: number | null;
|
|
481
|
+
/**
|
|
482
|
+
* The number of elements of a field collected into a batch which, if exceeded, causes the batch to be sent.
|
|
483
|
+
*/
|
|
484
|
+
elementCountThreshold?: number | null;
|
|
485
|
+
/**
|
|
486
|
+
* The maximum size of data allowed by flow control.
|
|
487
|
+
*/
|
|
488
|
+
flowControlByteLimit?: number | null;
|
|
489
|
+
/**
|
|
490
|
+
* The maximum number of elements allowed by flow control.
|
|
491
|
+
*/
|
|
492
|
+
flowControlElementLimit?: number | null;
|
|
493
|
+
/**
|
|
494
|
+
* The behavior to take when the flow control limit is exceeded.
|
|
495
|
+
*/
|
|
496
|
+
flowControlLimitExceededBehavior?: string | null;
|
|
497
|
+
/**
|
|
498
|
+
* The maximum size of the request that could be accepted by server.
|
|
499
|
+
*/
|
|
500
|
+
requestByteLimit?: number | null;
|
|
501
|
+
/**
|
|
502
|
+
* 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.
|
|
503
|
+
*/
|
|
504
|
+
requestByteThreshold?: string | null;
|
|
505
|
+
}
|
|
439
506
|
/**
|
|
440
507
|
* 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
|
|
441
508
|
*/
|
|
@@ -1797,6 +1864,10 @@ export namespace serviceusage_v1beta1 {
|
|
|
1797
1864
|
* 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
|
|
1798
1865
|
*/
|
|
1799
1866
|
autoPopulatedFields?: string[] | null;
|
|
1867
|
+
/**
|
|
1868
|
+
* 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
|
|
1869
|
+
*/
|
|
1870
|
+
batching?: Schema$BatchingConfigProto;
|
|
1800
1871
|
/**
|
|
1801
1872
|
* 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
|
|
1802
1873
|
*/
|
|
@@ -2557,6 +2628,59 @@ export namespace serviceusage_v1beta1 {
|
|
|
2557
2628
|
|
|
2558
2629
|
/**
|
|
2559
2630
|
* 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.
|
|
2631
|
+
* @example
|
|
2632
|
+
* ```js
|
|
2633
|
+
* // Before running the sample:
|
|
2634
|
+
* // - Enable the API at:
|
|
2635
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
2636
|
+
* // - Login into gcloud by running:
|
|
2637
|
+
* // ```sh
|
|
2638
|
+
* // $ gcloud auth application-default login
|
|
2639
|
+
* // ```
|
|
2640
|
+
* // - Install the npm module by running:
|
|
2641
|
+
* // ```sh
|
|
2642
|
+
* // $ npm install googleapis
|
|
2643
|
+
* // ```
|
|
2644
|
+
*
|
|
2645
|
+
* const {google} = require('googleapis');
|
|
2646
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
2647
|
+
*
|
|
2648
|
+
* async function main() {
|
|
2649
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2650
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2651
|
+
* scopes: [
|
|
2652
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2653
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
2654
|
+
* ],
|
|
2655
|
+
* });
|
|
2656
|
+
*
|
|
2657
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2658
|
+
* const authClient = await auth.getClient();
|
|
2659
|
+
* google.options({auth: authClient});
|
|
2660
|
+
*
|
|
2661
|
+
* // Do the magic
|
|
2662
|
+
* const res = await serviceusage.operations.get({
|
|
2663
|
+
* // The name of the operation resource.
|
|
2664
|
+
* name: 'operations/my-operation',
|
|
2665
|
+
* });
|
|
2666
|
+
* console.log(res.data);
|
|
2667
|
+
*
|
|
2668
|
+
* // Example response
|
|
2669
|
+
* // {
|
|
2670
|
+
* // "done": false,
|
|
2671
|
+
* // "error": {},
|
|
2672
|
+
* // "metadata": {},
|
|
2673
|
+
* // "name": "my_name",
|
|
2674
|
+
* // "response": {}
|
|
2675
|
+
* // }
|
|
2676
|
+
* }
|
|
2677
|
+
*
|
|
2678
|
+
* main().catch(e => {
|
|
2679
|
+
* console.error(e);
|
|
2680
|
+
* throw e;
|
|
2681
|
+
* });
|
|
2682
|
+
*
|
|
2683
|
+
* ```
|
|
2560
2684
|
*
|
|
2561
2685
|
* @param params - Parameters for request
|
|
2562
2686
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2644,6 +2768,62 @@ export namespace serviceusage_v1beta1 {
|
|
|
2644
2768
|
|
|
2645
2769
|
/**
|
|
2646
2770
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2771
|
+
* @example
|
|
2772
|
+
* ```js
|
|
2773
|
+
* // Before running the sample:
|
|
2774
|
+
* // - Enable the API at:
|
|
2775
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
2776
|
+
* // - Login into gcloud by running:
|
|
2777
|
+
* // ```sh
|
|
2778
|
+
* // $ gcloud auth application-default login
|
|
2779
|
+
* // ```
|
|
2780
|
+
* // - Install the npm module by running:
|
|
2781
|
+
* // ```sh
|
|
2782
|
+
* // $ npm install googleapis
|
|
2783
|
+
* // ```
|
|
2784
|
+
*
|
|
2785
|
+
* const {google} = require('googleapis');
|
|
2786
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
2787
|
+
*
|
|
2788
|
+
* async function main() {
|
|
2789
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2790
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2791
|
+
* scopes: [
|
|
2792
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2793
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
2794
|
+
* ],
|
|
2795
|
+
* });
|
|
2796
|
+
*
|
|
2797
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2798
|
+
* const authClient = await auth.getClient();
|
|
2799
|
+
* google.options({auth: authClient});
|
|
2800
|
+
*
|
|
2801
|
+
* // Do the magic
|
|
2802
|
+
* const res = await serviceusage.operations.list({
|
|
2803
|
+
* // The standard list filter.
|
|
2804
|
+
* filter: 'placeholder-value',
|
|
2805
|
+
* // The name of the operation's parent resource.
|
|
2806
|
+
* name: 'placeholder-value',
|
|
2807
|
+
* // The standard list page size.
|
|
2808
|
+
* pageSize: 'placeholder-value',
|
|
2809
|
+
* // The standard list page token.
|
|
2810
|
+
* pageToken: 'placeholder-value',
|
|
2811
|
+
* });
|
|
2812
|
+
* console.log(res.data);
|
|
2813
|
+
*
|
|
2814
|
+
* // Example response
|
|
2815
|
+
* // {
|
|
2816
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2817
|
+
* // "operations": []
|
|
2818
|
+
* // }
|
|
2819
|
+
* }
|
|
2820
|
+
*
|
|
2821
|
+
* main().catch(e => {
|
|
2822
|
+
* console.error(e);
|
|
2823
|
+
* throw e;
|
|
2824
|
+
* });
|
|
2825
|
+
*
|
|
2826
|
+
* ```
|
|
2647
2827
|
*
|
|
2648
2828
|
* @param params - Parameters for request
|
|
2649
2829
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2772,6 +2952,67 @@ export namespace serviceusage_v1beta1 {
|
|
|
2772
2952
|
|
|
2773
2953
|
/**
|
|
2774
2954
|
* Enables multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. Operation response type: `google.protobuf.Empty`
|
|
2955
|
+
* @example
|
|
2956
|
+
* ```js
|
|
2957
|
+
* // Before running the sample:
|
|
2958
|
+
* // - Enable the API at:
|
|
2959
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
2960
|
+
* // - Login into gcloud by running:
|
|
2961
|
+
* // ```sh
|
|
2962
|
+
* // $ gcloud auth application-default login
|
|
2963
|
+
* // ```
|
|
2964
|
+
* // - Install the npm module by running:
|
|
2965
|
+
* // ```sh
|
|
2966
|
+
* // $ npm install googleapis
|
|
2967
|
+
* // ```
|
|
2968
|
+
*
|
|
2969
|
+
* const {google} = require('googleapis');
|
|
2970
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
2971
|
+
*
|
|
2972
|
+
* async function main() {
|
|
2973
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2974
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2975
|
+
* scopes: [
|
|
2976
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2977
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
2978
|
+
* ],
|
|
2979
|
+
* });
|
|
2980
|
+
*
|
|
2981
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2982
|
+
* const authClient = await auth.getClient();
|
|
2983
|
+
* google.options({auth: authClient});
|
|
2984
|
+
*
|
|
2985
|
+
* // Do the magic
|
|
2986
|
+
* const res = await serviceusage.services.batchEnable({
|
|
2987
|
+
* // Parent to enable services on. An example name would be: `projects/123` where `123` is the project number (not project ID). The `BatchEnableServices` method currently only supports projects.
|
|
2988
|
+
* parent: '[^/]+/[^/]+',
|
|
2989
|
+
*
|
|
2990
|
+
* // Request body metadata
|
|
2991
|
+
* requestBody: {
|
|
2992
|
+
* // request body parameters
|
|
2993
|
+
* // {
|
|
2994
|
+
* // "serviceIds": []
|
|
2995
|
+
* // }
|
|
2996
|
+
* },
|
|
2997
|
+
* });
|
|
2998
|
+
* console.log(res.data);
|
|
2999
|
+
*
|
|
3000
|
+
* // Example response
|
|
3001
|
+
* // {
|
|
3002
|
+
* // "done": false,
|
|
3003
|
+
* // "error": {},
|
|
3004
|
+
* // "metadata": {},
|
|
3005
|
+
* // "name": "my_name",
|
|
3006
|
+
* // "response": {}
|
|
3007
|
+
* // }
|
|
3008
|
+
* }
|
|
3009
|
+
*
|
|
3010
|
+
* main().catch(e => {
|
|
3011
|
+
* console.error(e);
|
|
3012
|
+
* throw e;
|
|
3013
|
+
* });
|
|
3014
|
+
*
|
|
3015
|
+
* ```
|
|
2775
3016
|
*
|
|
2776
3017
|
* @param params - Parameters for request
|
|
2777
3018
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2863,6 +3104,65 @@ export namespace serviceusage_v1beta1 {
|
|
|
2863
3104
|
|
|
2864
3105
|
/**
|
|
2865
3106
|
* Disables a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks. It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a `FAILED_PRECONDITION` status if the target service is not currently enabled. Operation response type: `google.protobuf.Empty`
|
|
3107
|
+
* @example
|
|
3108
|
+
* ```js
|
|
3109
|
+
* // Before running the sample:
|
|
3110
|
+
* // - Enable the API at:
|
|
3111
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
3112
|
+
* // - Login into gcloud by running:
|
|
3113
|
+
* // ```sh
|
|
3114
|
+
* // $ gcloud auth application-default login
|
|
3115
|
+
* // ```
|
|
3116
|
+
* // - Install the npm module by running:
|
|
3117
|
+
* // ```sh
|
|
3118
|
+
* // $ npm install googleapis
|
|
3119
|
+
* // ```
|
|
3120
|
+
*
|
|
3121
|
+
* const {google} = require('googleapis');
|
|
3122
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
3123
|
+
*
|
|
3124
|
+
* async function main() {
|
|
3125
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3126
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3127
|
+
* scopes: [
|
|
3128
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3129
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
3130
|
+
* ],
|
|
3131
|
+
* });
|
|
3132
|
+
*
|
|
3133
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3134
|
+
* const authClient = await auth.getClient();
|
|
3135
|
+
* google.options({auth: authClient});
|
|
3136
|
+
*
|
|
3137
|
+
* // Do the magic
|
|
3138
|
+
* const res = await serviceusage.services.disable({
|
|
3139
|
+
* // Name of the consumer and service to disable the service on. The enable and disable methods currently only support projects. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number (not project ID).
|
|
3140
|
+
* name: '[^/]+/[^/]+/services/my-service',
|
|
3141
|
+
*
|
|
3142
|
+
* // Request body metadata
|
|
3143
|
+
* requestBody: {
|
|
3144
|
+
* // request body parameters
|
|
3145
|
+
* // {}
|
|
3146
|
+
* },
|
|
3147
|
+
* });
|
|
3148
|
+
* console.log(res.data);
|
|
3149
|
+
*
|
|
3150
|
+
* // Example response
|
|
3151
|
+
* // {
|
|
3152
|
+
* // "done": false,
|
|
3153
|
+
* // "error": {},
|
|
3154
|
+
* // "metadata": {},
|
|
3155
|
+
* // "name": "my_name",
|
|
3156
|
+
* // "response": {}
|
|
3157
|
+
* // }
|
|
3158
|
+
* }
|
|
3159
|
+
*
|
|
3160
|
+
* main().catch(e => {
|
|
3161
|
+
* console.error(e);
|
|
3162
|
+
* throw e;
|
|
3163
|
+
* });
|
|
3164
|
+
*
|
|
3165
|
+
* ```
|
|
2866
3166
|
*
|
|
2867
3167
|
* @param params - Parameters for request
|
|
2868
3168
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2953,6 +3253,65 @@ export namespace serviceusage_v1beta1 {
|
|
|
2953
3253
|
|
|
2954
3254
|
/**
|
|
2955
3255
|
* Enables a service so that it can be used with a project. Operation response type: `google.protobuf.Empty`
|
|
3256
|
+
* @example
|
|
3257
|
+
* ```js
|
|
3258
|
+
* // Before running the sample:
|
|
3259
|
+
* // - Enable the API at:
|
|
3260
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
3261
|
+
* // - Login into gcloud by running:
|
|
3262
|
+
* // ```sh
|
|
3263
|
+
* // $ gcloud auth application-default login
|
|
3264
|
+
* // ```
|
|
3265
|
+
* // - Install the npm module by running:
|
|
3266
|
+
* // ```sh
|
|
3267
|
+
* // $ npm install googleapis
|
|
3268
|
+
* // ```
|
|
3269
|
+
*
|
|
3270
|
+
* const {google} = require('googleapis');
|
|
3271
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
3272
|
+
*
|
|
3273
|
+
* async function main() {
|
|
3274
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3275
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3276
|
+
* scopes: [
|
|
3277
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3278
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
3279
|
+
* ],
|
|
3280
|
+
* });
|
|
3281
|
+
*
|
|
3282
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3283
|
+
* const authClient = await auth.getClient();
|
|
3284
|
+
* google.options({auth: authClient});
|
|
3285
|
+
*
|
|
3286
|
+
* // Do the magic
|
|
3287
|
+
* const res = await serviceusage.services.enable({
|
|
3288
|
+
* // Name of the consumer and service to enable the service on. The `EnableService` and `DisableService` methods currently only support projects. Enabling a service requires that the service is public or is shared with the user enabling the service. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number (not project ID).
|
|
3289
|
+
* name: '[^/]+/[^/]+/services/my-service',
|
|
3290
|
+
*
|
|
3291
|
+
* // Request body metadata
|
|
3292
|
+
* requestBody: {
|
|
3293
|
+
* // request body parameters
|
|
3294
|
+
* // {}
|
|
3295
|
+
* },
|
|
3296
|
+
* });
|
|
3297
|
+
* console.log(res.data);
|
|
3298
|
+
*
|
|
3299
|
+
* // Example response
|
|
3300
|
+
* // {
|
|
3301
|
+
* // "done": false,
|
|
3302
|
+
* // "error": {},
|
|
3303
|
+
* // "metadata": {},
|
|
3304
|
+
* // "name": "my_name",
|
|
3305
|
+
* // "response": {}
|
|
3306
|
+
* // }
|
|
3307
|
+
* }
|
|
3308
|
+
*
|
|
3309
|
+
* main().catch(e => {
|
|
3310
|
+
* console.error(e);
|
|
3311
|
+
* throw e;
|
|
3312
|
+
* });
|
|
3313
|
+
*
|
|
3314
|
+
* ```
|
|
2956
3315
|
*
|
|
2957
3316
|
* @param params - Parameters for request
|
|
2958
3317
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3043,6 +3402,59 @@ export namespace serviceusage_v1beta1 {
|
|
|
3043
3402
|
|
|
3044
3403
|
/**
|
|
3045
3404
|
* Generates service identity for service.
|
|
3405
|
+
* @example
|
|
3406
|
+
* ```js
|
|
3407
|
+
* // Before running the sample:
|
|
3408
|
+
* // - Enable the API at:
|
|
3409
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
3410
|
+
* // - Login into gcloud by running:
|
|
3411
|
+
* // ```sh
|
|
3412
|
+
* // $ gcloud auth application-default login
|
|
3413
|
+
* // ```
|
|
3414
|
+
* // - Install the npm module by running:
|
|
3415
|
+
* // ```sh
|
|
3416
|
+
* // $ npm install googleapis
|
|
3417
|
+
* // ```
|
|
3418
|
+
*
|
|
3419
|
+
* const {google} = require('googleapis');
|
|
3420
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
3421
|
+
*
|
|
3422
|
+
* async function main() {
|
|
3423
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3424
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3425
|
+
* scopes: [
|
|
3426
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3427
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
3428
|
+
* ],
|
|
3429
|
+
* });
|
|
3430
|
+
*
|
|
3431
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3432
|
+
* const authClient = await auth.getClient();
|
|
3433
|
+
* google.options({auth: authClient});
|
|
3434
|
+
*
|
|
3435
|
+
* // Do the magic
|
|
3436
|
+
* const res = await serviceusage.services.generateServiceIdentity({
|
|
3437
|
+
* // Name of the consumer and service to generate an identity for. The `GenerateServiceIdentity` methods currently support projects, folders, organizations. Example parents would be: `projects/123/services/example.googleapis.com` `folders/123/services/example.googleapis.com` `organizations/123/services/example.googleapis.com`
|
|
3438
|
+
* parent: '[^/]+/[^/]+/services/my-service',
|
|
3439
|
+
* });
|
|
3440
|
+
* console.log(res.data);
|
|
3441
|
+
*
|
|
3442
|
+
* // Example response
|
|
3443
|
+
* // {
|
|
3444
|
+
* // "done": false,
|
|
3445
|
+
* // "error": {},
|
|
3446
|
+
* // "metadata": {},
|
|
3447
|
+
* // "name": "my_name",
|
|
3448
|
+
* // "response": {}
|
|
3449
|
+
* // }
|
|
3450
|
+
* }
|
|
3451
|
+
*
|
|
3452
|
+
* main().catch(e => {
|
|
3453
|
+
* console.error(e);
|
|
3454
|
+
* throw e;
|
|
3455
|
+
* });
|
|
3456
|
+
*
|
|
3457
|
+
* ```
|
|
3046
3458
|
*
|
|
3047
3459
|
* @param params - Parameters for request
|
|
3048
3460
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3135,6 +3547,58 @@ export namespace serviceusage_v1beta1 {
|
|
|
3135
3547
|
|
|
3136
3548
|
/**
|
|
3137
3549
|
* Returns the service configuration and enabled state for a given service.
|
|
3550
|
+
* @example
|
|
3551
|
+
* ```js
|
|
3552
|
+
* // Before running the sample:
|
|
3553
|
+
* // - Enable the API at:
|
|
3554
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
3555
|
+
* // - Login into gcloud by running:
|
|
3556
|
+
* // ```sh
|
|
3557
|
+
* // $ gcloud auth application-default login
|
|
3558
|
+
* // ```
|
|
3559
|
+
* // - Install the npm module by running:
|
|
3560
|
+
* // ```sh
|
|
3561
|
+
* // $ npm install googleapis
|
|
3562
|
+
* // ```
|
|
3563
|
+
*
|
|
3564
|
+
* const {google} = require('googleapis');
|
|
3565
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
3566
|
+
*
|
|
3567
|
+
* async function main() {
|
|
3568
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3569
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3570
|
+
* scopes: [
|
|
3571
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3572
|
+
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
3573
|
+
* ],
|
|
3574
|
+
* });
|
|
3575
|
+
*
|
|
3576
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3577
|
+
* const authClient = await auth.getClient();
|
|
3578
|
+
* google.options({auth: authClient});
|
|
3579
|
+
*
|
|
3580
|
+
* // Do the magic
|
|
3581
|
+
* const res = await serviceusage.services.get({
|
|
3582
|
+
* // Name of the consumer and service to get the `ConsumerState` for. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number (not project ID).
|
|
3583
|
+
* name: '[^/]+/[^/]+/services/my-service',
|
|
3584
|
+
* });
|
|
3585
|
+
* console.log(res.data);
|
|
3586
|
+
*
|
|
3587
|
+
* // Example response
|
|
3588
|
+
* // {
|
|
3589
|
+
* // "config": {},
|
|
3590
|
+
* // "name": "my_name",
|
|
3591
|
+
* // "parent": "my_parent",
|
|
3592
|
+
* // "state": "my_state"
|
|
3593
|
+
* // }
|
|
3594
|
+
* }
|
|
3595
|
+
*
|
|
3596
|
+
* main().catch(e => {
|
|
3597
|
+
* console.error(e);
|
|
3598
|
+
* throw e;
|
|
3599
|
+
* });
|
|
3600
|
+
*
|
|
3601
|
+
* ```
|
|
3138
3602
|
*
|
|
3139
3603
|
* @param params - Parameters for request
|
|
3140
3604
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3222,6 +3686,62 @@ export namespace serviceusage_v1beta1 {
|
|
|
3222
3686
|
|
|
3223
3687
|
/**
|
|
3224
3688
|
* Lists all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the `servicemanagement.services.bind` permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project.
|
|
3689
|
+
* @example
|
|
3690
|
+
* ```js
|
|
3691
|
+
* // Before running the sample:
|
|
3692
|
+
* // - Enable the API at:
|
|
3693
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
3694
|
+
* // - Login into gcloud by running:
|
|
3695
|
+
* // ```sh
|
|
3696
|
+
* // $ gcloud auth application-default login
|
|
3697
|
+
* // ```
|
|
3698
|
+
* // - Install the npm module by running:
|
|
3699
|
+
* // ```sh
|
|
3700
|
+
* // $ npm install googleapis
|
|
3701
|
+
* // ```
|
|
3702
|
+
*
|
|
3703
|
+
* const {google} = require('googleapis');
|
|
3704
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
3705
|
+
*
|
|
3706
|
+
* async function main() {
|
|
3707
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3708
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3709
|
+
* scopes: [
|
|
3710
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3711
|
+
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
3712
|
+
* ],
|
|
3713
|
+
* });
|
|
3714
|
+
*
|
|
3715
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3716
|
+
* const authClient = await auth.getClient();
|
|
3717
|
+
* google.options({auth: authClient});
|
|
3718
|
+
*
|
|
3719
|
+
* // Do the magic
|
|
3720
|
+
* const res = await serviceusage.services.list({
|
|
3721
|
+
* // Only list services that conform to the given filter. The allowed filter strings are `state:ENABLED` and `state:DISABLED`.
|
|
3722
|
+
* filter: 'placeholder-value',
|
|
3723
|
+
* // Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50.
|
|
3724
|
+
* pageSize: 'placeholder-value',
|
|
3725
|
+
* // Token identifying which result to start with, which is returned by a previous list call.
|
|
3726
|
+
* pageToken: 'placeholder-value',
|
|
3727
|
+
* // Parent to search for services on. An example name would be: `projects/123` where `123` is the project number (not project ID).
|
|
3728
|
+
* parent: '[^/]+/[^/]+',
|
|
3729
|
+
* });
|
|
3730
|
+
* console.log(res.data);
|
|
3731
|
+
*
|
|
3732
|
+
* // Example response
|
|
3733
|
+
* // {
|
|
3734
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3735
|
+
* // "services": []
|
|
3736
|
+
* // }
|
|
3737
|
+
* }
|
|
3738
|
+
*
|
|
3739
|
+
* main().catch(e => {
|
|
3740
|
+
* console.error(e);
|
|
3741
|
+
* throw e;
|
|
3742
|
+
* });
|
|
3743
|
+
*
|
|
3744
|
+
* ```
|
|
3225
3745
|
*
|
|
3226
3746
|
* @param params - Parameters for request
|
|
3227
3747
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3391,6 +3911,62 @@ export namespace serviceusage_v1beta1 {
|
|
|
3391
3911
|
|
|
3392
3912
|
/**
|
|
3393
3913
|
* Retrieves a summary of quota information for a specific quota metric
|
|
3914
|
+
* @example
|
|
3915
|
+
* ```js
|
|
3916
|
+
* // Before running the sample:
|
|
3917
|
+
* // - Enable the API at:
|
|
3918
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
3919
|
+
* // - Login into gcloud by running:
|
|
3920
|
+
* // ```sh
|
|
3921
|
+
* // $ gcloud auth application-default login
|
|
3922
|
+
* // ```
|
|
3923
|
+
* // - Install the npm module by running:
|
|
3924
|
+
* // ```sh
|
|
3925
|
+
* // $ npm install googleapis
|
|
3926
|
+
* // ```
|
|
3927
|
+
*
|
|
3928
|
+
* const {google} = require('googleapis');
|
|
3929
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
3930
|
+
*
|
|
3931
|
+
* async function main() {
|
|
3932
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3933
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3934
|
+
* scopes: [
|
|
3935
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
3936
|
+
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
3937
|
+
* ],
|
|
3938
|
+
* });
|
|
3939
|
+
*
|
|
3940
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3941
|
+
* const authClient = await auth.getClient();
|
|
3942
|
+
* google.options({auth: authClient});
|
|
3943
|
+
*
|
|
3944
|
+
* // Do the magic
|
|
3945
|
+
* const res = await serviceusage.services.consumerQuotaMetrics.get({
|
|
3946
|
+
* // The resource name of the quota. An example name would be: `projects/123/services/serviceusage.googleapis.com/consumerQuotaMetrics/serviceusage.googleapis.com%2Fmutate_requests`
|
|
3947
|
+
* name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric',
|
|
3948
|
+
* // Specifies the level of detail for quota information in the response.
|
|
3949
|
+
* view: 'placeholder-value',
|
|
3950
|
+
* });
|
|
3951
|
+
* console.log(res.data);
|
|
3952
|
+
*
|
|
3953
|
+
* // Example response
|
|
3954
|
+
* // {
|
|
3955
|
+
* // "consumerQuotaLimits": [],
|
|
3956
|
+
* // "descendantConsumerQuotaLimits": [],
|
|
3957
|
+
* // "displayName": "my_displayName",
|
|
3958
|
+
* // "metric": "my_metric",
|
|
3959
|
+
* // "name": "my_name",
|
|
3960
|
+
* // "unit": "my_unit"
|
|
3961
|
+
* // }
|
|
3962
|
+
* }
|
|
3963
|
+
*
|
|
3964
|
+
* main().catch(e => {
|
|
3965
|
+
* console.error(e);
|
|
3966
|
+
* throw e;
|
|
3967
|
+
* });
|
|
3968
|
+
*
|
|
3969
|
+
* ```
|
|
3394
3970
|
*
|
|
3395
3971
|
* @param params - Parameters for request
|
|
3396
3972
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3479,6 +4055,70 @@ export namespace serviceusage_v1beta1 {
|
|
|
3479
4055
|
|
|
3480
4056
|
/**
|
|
3481
4057
|
* Creates or updates multiple admin overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.
|
|
4058
|
+
* @example
|
|
4059
|
+
* ```js
|
|
4060
|
+
* // Before running the sample:
|
|
4061
|
+
* // - Enable the API at:
|
|
4062
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
4063
|
+
* // - Login into gcloud by running:
|
|
4064
|
+
* // ```sh
|
|
4065
|
+
* // $ gcloud auth application-default login
|
|
4066
|
+
* // ```
|
|
4067
|
+
* // - Install the npm module by running:
|
|
4068
|
+
* // ```sh
|
|
4069
|
+
* // $ npm install googleapis
|
|
4070
|
+
* // ```
|
|
4071
|
+
*
|
|
4072
|
+
* const {google} = require('googleapis');
|
|
4073
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
4074
|
+
*
|
|
4075
|
+
* async function main() {
|
|
4076
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4077
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4078
|
+
* scopes: [
|
|
4079
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4080
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4081
|
+
* ],
|
|
4082
|
+
* });
|
|
4083
|
+
*
|
|
4084
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4085
|
+
* const authClient = await auth.getClient();
|
|
4086
|
+
* google.options({auth: authClient});
|
|
4087
|
+
*
|
|
4088
|
+
* // Do the magic
|
|
4089
|
+
* const res =
|
|
4090
|
+
* await serviceusage.services.consumerQuotaMetrics.importAdminOverrides({
|
|
4091
|
+
* // The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`
|
|
4092
|
+
* parent: '[^/]+/[^/]+/services/my-service',
|
|
4093
|
+
*
|
|
4094
|
+
* // Request body metadata
|
|
4095
|
+
* requestBody: {
|
|
4096
|
+
* // request body parameters
|
|
4097
|
+
* // {
|
|
4098
|
+
* // "force": false,
|
|
4099
|
+
* // "forceOnly": [],
|
|
4100
|
+
* // "inlineSource": {}
|
|
4101
|
+
* // }
|
|
4102
|
+
* },
|
|
4103
|
+
* });
|
|
4104
|
+
* console.log(res.data);
|
|
4105
|
+
*
|
|
4106
|
+
* // Example response
|
|
4107
|
+
* // {
|
|
4108
|
+
* // "done": false,
|
|
4109
|
+
* // "error": {},
|
|
4110
|
+
* // "metadata": {},
|
|
4111
|
+
* // "name": "my_name",
|
|
4112
|
+
* // "response": {}
|
|
4113
|
+
* // }
|
|
4114
|
+
* }
|
|
4115
|
+
*
|
|
4116
|
+
* main().catch(e => {
|
|
4117
|
+
* console.error(e);
|
|
4118
|
+
* throw e;
|
|
4119
|
+
* });
|
|
4120
|
+
*
|
|
4121
|
+
* ```
|
|
3482
4122
|
*
|
|
3483
4123
|
* @param params - Parameters for request
|
|
3484
4124
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3573,6 +4213,70 @@ export namespace serviceusage_v1beta1 {
|
|
|
3573
4213
|
|
|
3574
4214
|
/**
|
|
3575
4215
|
* Creates or updates multiple consumer overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.
|
|
4216
|
+
* @example
|
|
4217
|
+
* ```js
|
|
4218
|
+
* // Before running the sample:
|
|
4219
|
+
* // - Enable the API at:
|
|
4220
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
4221
|
+
* // - Login into gcloud by running:
|
|
4222
|
+
* // ```sh
|
|
4223
|
+
* // $ gcloud auth application-default login
|
|
4224
|
+
* // ```
|
|
4225
|
+
* // - Install the npm module by running:
|
|
4226
|
+
* // ```sh
|
|
4227
|
+
* // $ npm install googleapis
|
|
4228
|
+
* // ```
|
|
4229
|
+
*
|
|
4230
|
+
* const {google} = require('googleapis');
|
|
4231
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
4232
|
+
*
|
|
4233
|
+
* async function main() {
|
|
4234
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4235
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4236
|
+
* scopes: [
|
|
4237
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4238
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4239
|
+
* ],
|
|
4240
|
+
* });
|
|
4241
|
+
*
|
|
4242
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4243
|
+
* const authClient = await auth.getClient();
|
|
4244
|
+
* google.options({auth: authClient});
|
|
4245
|
+
*
|
|
4246
|
+
* // Do the magic
|
|
4247
|
+
* const res =
|
|
4248
|
+
* await serviceusage.services.consumerQuotaMetrics.importConsumerOverrides({
|
|
4249
|
+
* // The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`
|
|
4250
|
+
* parent: '[^/]+/[^/]+/services/my-service',
|
|
4251
|
+
*
|
|
4252
|
+
* // Request body metadata
|
|
4253
|
+
* requestBody: {
|
|
4254
|
+
* // request body parameters
|
|
4255
|
+
* // {
|
|
4256
|
+
* // "force": false,
|
|
4257
|
+
* // "forceOnly": [],
|
|
4258
|
+
* // "inlineSource": {}
|
|
4259
|
+
* // }
|
|
4260
|
+
* },
|
|
4261
|
+
* });
|
|
4262
|
+
* console.log(res.data);
|
|
4263
|
+
*
|
|
4264
|
+
* // Example response
|
|
4265
|
+
* // {
|
|
4266
|
+
* // "done": false,
|
|
4267
|
+
* // "error": {},
|
|
4268
|
+
* // "metadata": {},
|
|
4269
|
+
* // "name": "my_name",
|
|
4270
|
+
* // "response": {}
|
|
4271
|
+
* // }
|
|
4272
|
+
* }
|
|
4273
|
+
*
|
|
4274
|
+
* main().catch(e => {
|
|
4275
|
+
* console.error(e);
|
|
4276
|
+
* throw e;
|
|
4277
|
+
* });
|
|
4278
|
+
*
|
|
4279
|
+
* ```
|
|
3576
4280
|
*
|
|
3577
4281
|
* @param params - Parameters for request
|
|
3578
4282
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3667,6 +4371,62 @@ export namespace serviceusage_v1beta1 {
|
|
|
3667
4371
|
|
|
3668
4372
|
/**
|
|
3669
4373
|
* Retrieves a summary of all quota information visible to the service consumer, organized by service metric. Each metric includes information about all of its defined limits. Each limit includes the limit configuration (quota unit, preciseness, default value), the current effective limit value, and all of the overrides applied to the limit.
|
|
4374
|
+
* @example
|
|
4375
|
+
* ```js
|
|
4376
|
+
* // Before running the sample:
|
|
4377
|
+
* // - Enable the API at:
|
|
4378
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
4379
|
+
* // - Login into gcloud by running:
|
|
4380
|
+
* // ```sh
|
|
4381
|
+
* // $ gcloud auth application-default login
|
|
4382
|
+
* // ```
|
|
4383
|
+
* // - Install the npm module by running:
|
|
4384
|
+
* // ```sh
|
|
4385
|
+
* // $ npm install googleapis
|
|
4386
|
+
* // ```
|
|
4387
|
+
*
|
|
4388
|
+
* const {google} = require('googleapis');
|
|
4389
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
4390
|
+
*
|
|
4391
|
+
* async function main() {
|
|
4392
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4393
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4394
|
+
* scopes: [
|
|
4395
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4396
|
+
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
4397
|
+
* ],
|
|
4398
|
+
* });
|
|
4399
|
+
*
|
|
4400
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4401
|
+
* const authClient = await auth.getClient();
|
|
4402
|
+
* google.options({auth: authClient});
|
|
4403
|
+
*
|
|
4404
|
+
* // Do the magic
|
|
4405
|
+
* const res = await serviceusage.services.consumerQuotaMetrics.list({
|
|
4406
|
+
* // Requested size of the next page of data.
|
|
4407
|
+
* pageSize: 'placeholder-value',
|
|
4408
|
+
* // Token identifying which result to start with; returned by a previous list call.
|
|
4409
|
+
* pageToken: 'placeholder-value',
|
|
4410
|
+
* // Parent of the quotas resource. Some example names would be: `projects/123/services/serviceconsumermanagement.googleapis.com` `folders/345/services/serviceconsumermanagement.googleapis.com` `organizations/456/services/serviceconsumermanagement.googleapis.com`
|
|
4411
|
+
* parent: '[^/]+/[^/]+/services/my-service',
|
|
4412
|
+
* // Specifies the level of detail for quota information in the response.
|
|
4413
|
+
* view: 'placeholder-value',
|
|
4414
|
+
* });
|
|
4415
|
+
* console.log(res.data);
|
|
4416
|
+
*
|
|
4417
|
+
* // Example response
|
|
4418
|
+
* // {
|
|
4419
|
+
* // "metrics": [],
|
|
4420
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
4421
|
+
* // }
|
|
4422
|
+
* }
|
|
4423
|
+
*
|
|
4424
|
+
* main().catch(e => {
|
|
4425
|
+
* console.error(e);
|
|
4426
|
+
* throw e;
|
|
4427
|
+
* });
|
|
4428
|
+
*
|
|
4429
|
+
* ```
|
|
3670
4430
|
*
|
|
3671
4431
|
* @param params - Parameters for request
|
|
3672
4432
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3840,6 +4600,63 @@ export namespace serviceusage_v1beta1 {
|
|
|
3840
4600
|
|
|
3841
4601
|
/**
|
|
3842
4602
|
* Retrieves a summary of quota information for a specific quota limit.
|
|
4603
|
+
* @example
|
|
4604
|
+
* ```js
|
|
4605
|
+
* // Before running the sample:
|
|
4606
|
+
* // - Enable the API at:
|
|
4607
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
4608
|
+
* // - Login into gcloud by running:
|
|
4609
|
+
* // ```sh
|
|
4610
|
+
* // $ gcloud auth application-default login
|
|
4611
|
+
* // ```
|
|
4612
|
+
* // - Install the npm module by running:
|
|
4613
|
+
* // ```sh
|
|
4614
|
+
* // $ npm install googleapis
|
|
4615
|
+
* // ```
|
|
4616
|
+
*
|
|
4617
|
+
* const {google} = require('googleapis');
|
|
4618
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
4619
|
+
*
|
|
4620
|
+
* async function main() {
|
|
4621
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4622
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4623
|
+
* scopes: [
|
|
4624
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4625
|
+
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
4626
|
+
* ],
|
|
4627
|
+
* });
|
|
4628
|
+
*
|
|
4629
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4630
|
+
* const authClient = await auth.getClient();
|
|
4631
|
+
* google.options({auth: authClient});
|
|
4632
|
+
*
|
|
4633
|
+
* // Do the magic
|
|
4634
|
+
* const res = await serviceusage.services.consumerQuotaMetrics.limits.get({
|
|
4635
|
+
* // The resource name of the quota limit. Use the quota limit resource name returned by previous ListConsumerQuotaMetrics and GetConsumerQuotaMetric API calls.
|
|
4636
|
+
* name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
|
|
4637
|
+
* // Specifies the level of detail for quota information in the response.
|
|
4638
|
+
* view: 'placeholder-value',
|
|
4639
|
+
* });
|
|
4640
|
+
* console.log(res.data);
|
|
4641
|
+
*
|
|
4642
|
+
* // Example response
|
|
4643
|
+
* // {
|
|
4644
|
+
* // "allowsAdminOverrides": false,
|
|
4645
|
+
* // "isPrecise": false,
|
|
4646
|
+
* // "metric": "my_metric",
|
|
4647
|
+
* // "name": "my_name",
|
|
4648
|
+
* // "quotaBuckets": [],
|
|
4649
|
+
* // "supportedLocations": [],
|
|
4650
|
+
* // "unit": "my_unit"
|
|
4651
|
+
* // }
|
|
4652
|
+
* }
|
|
4653
|
+
*
|
|
4654
|
+
* main().catch(e => {
|
|
4655
|
+
* console.error(e);
|
|
4656
|
+
* throw e;
|
|
4657
|
+
* });
|
|
4658
|
+
*
|
|
4659
|
+
* ```
|
|
3843
4660
|
*
|
|
3844
4661
|
* @param params - Parameters for request
|
|
3845
4662
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3947,6 +4764,80 @@ export namespace serviceusage_v1beta1 {
|
|
|
3947
4764
|
|
|
3948
4765
|
/**
|
|
3949
4766
|
* Creates an admin override. An admin override is applied by an administrator of a parent folder or parent organization of the consumer receiving the override. An admin override is intended to limit the amount of quota the consumer can use out of the total quota pool allocated to all children of the folder or organization.
|
|
4767
|
+
* @example
|
|
4768
|
+
* ```js
|
|
4769
|
+
* // Before running the sample:
|
|
4770
|
+
* // - Enable the API at:
|
|
4771
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
4772
|
+
* // - Login into gcloud by running:
|
|
4773
|
+
* // ```sh
|
|
4774
|
+
* // $ gcloud auth application-default login
|
|
4775
|
+
* // ```
|
|
4776
|
+
* // - Install the npm module by running:
|
|
4777
|
+
* // ```sh
|
|
4778
|
+
* // $ npm install googleapis
|
|
4779
|
+
* // ```
|
|
4780
|
+
*
|
|
4781
|
+
* const {google} = require('googleapis');
|
|
4782
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
4783
|
+
*
|
|
4784
|
+
* async function main() {
|
|
4785
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4786
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4787
|
+
* scopes: [
|
|
4788
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4789
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4790
|
+
* ],
|
|
4791
|
+
* });
|
|
4792
|
+
*
|
|
4793
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4794
|
+
* const authClient = await auth.getClient();
|
|
4795
|
+
* google.options({auth: authClient});
|
|
4796
|
+
*
|
|
4797
|
+
* // Do the magic
|
|
4798
|
+
* const res =
|
|
4799
|
+
* await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.create(
|
|
4800
|
+
* {
|
|
4801
|
+
* // Whether to force the creation of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
4802
|
+
* force: 'placeholder-value',
|
|
4803
|
+
* // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
4804
|
+
* forceOnly: 'placeholder-value',
|
|
4805
|
+
* // The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
|
|
4806
|
+
* parent:
|
|
4807
|
+
* '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
|
|
4808
|
+
*
|
|
4809
|
+
* // Request body metadata
|
|
4810
|
+
* requestBody: {
|
|
4811
|
+
* // request body parameters
|
|
4812
|
+
* // {
|
|
4813
|
+
* // "adminOverrideAncestor": "my_adminOverrideAncestor",
|
|
4814
|
+
* // "dimensions": {},
|
|
4815
|
+
* // "metric": "my_metric",
|
|
4816
|
+
* // "name": "my_name",
|
|
4817
|
+
* // "overrideValue": "my_overrideValue",
|
|
4818
|
+
* // "unit": "my_unit"
|
|
4819
|
+
* // }
|
|
4820
|
+
* },
|
|
4821
|
+
* },
|
|
4822
|
+
* );
|
|
4823
|
+
* console.log(res.data);
|
|
4824
|
+
*
|
|
4825
|
+
* // Example response
|
|
4826
|
+
* // {
|
|
4827
|
+
* // "done": false,
|
|
4828
|
+
* // "error": {},
|
|
4829
|
+
* // "metadata": {},
|
|
4830
|
+
* // "name": "my_name",
|
|
4831
|
+
* // "response": {}
|
|
4832
|
+
* // }
|
|
4833
|
+
* }
|
|
4834
|
+
*
|
|
4835
|
+
* main().catch(e => {
|
|
4836
|
+
* console.error(e);
|
|
4837
|
+
* throw e;
|
|
4838
|
+
* });
|
|
4839
|
+
*
|
|
4840
|
+
* ```
|
|
3950
4841
|
*
|
|
3951
4842
|
* @param params - Parameters for request
|
|
3952
4843
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4039,6 +4930,66 @@ export namespace serviceusage_v1beta1 {
|
|
|
4039
4930
|
|
|
4040
4931
|
/**
|
|
4041
4932
|
* Deletes an admin override.
|
|
4933
|
+
* @example
|
|
4934
|
+
* ```js
|
|
4935
|
+
* // Before running the sample:
|
|
4936
|
+
* // - Enable the API at:
|
|
4937
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
4938
|
+
* // - Login into gcloud by running:
|
|
4939
|
+
* // ```sh
|
|
4940
|
+
* // $ gcloud auth application-default login
|
|
4941
|
+
* // ```
|
|
4942
|
+
* // - Install the npm module by running:
|
|
4943
|
+
* // ```sh
|
|
4944
|
+
* // $ npm install googleapis
|
|
4945
|
+
* // ```
|
|
4946
|
+
*
|
|
4947
|
+
* const {google} = require('googleapis');
|
|
4948
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
4949
|
+
*
|
|
4950
|
+
* async function main() {
|
|
4951
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4952
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4953
|
+
* scopes: [
|
|
4954
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
4955
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
4956
|
+
* ],
|
|
4957
|
+
* });
|
|
4958
|
+
*
|
|
4959
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4960
|
+
* const authClient = await auth.getClient();
|
|
4961
|
+
* google.options({auth: authClient});
|
|
4962
|
+
*
|
|
4963
|
+
* // Do the magic
|
|
4964
|
+
* const res =
|
|
4965
|
+
* await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.delete(
|
|
4966
|
+
* {
|
|
4967
|
+
* // Whether to force the deletion of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
4968
|
+
* force: 'placeholder-value',
|
|
4969
|
+
* // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
4970
|
+
* forceOnly: 'placeholder-value',
|
|
4971
|
+
* // The resource name of the override to delete. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`
|
|
4972
|
+
* name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/adminOverrides/my-adminOverride',
|
|
4973
|
+
* },
|
|
4974
|
+
* );
|
|
4975
|
+
* console.log(res.data);
|
|
4976
|
+
*
|
|
4977
|
+
* // Example response
|
|
4978
|
+
* // {
|
|
4979
|
+
* // "done": false,
|
|
4980
|
+
* // "error": {},
|
|
4981
|
+
* // "metadata": {},
|
|
4982
|
+
* // "name": "my_name",
|
|
4983
|
+
* // "response": {}
|
|
4984
|
+
* // }
|
|
4985
|
+
* }
|
|
4986
|
+
*
|
|
4987
|
+
* main().catch(e => {
|
|
4988
|
+
* console.error(e);
|
|
4989
|
+
* throw e;
|
|
4990
|
+
* });
|
|
4991
|
+
*
|
|
4992
|
+
* ```
|
|
4042
4993
|
*
|
|
4043
4994
|
* @param params - Parameters for request
|
|
4044
4995
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4128,6 +5079,64 @@ export namespace serviceusage_v1beta1 {
|
|
|
4128
5079
|
|
|
4129
5080
|
/**
|
|
4130
5081
|
* Lists all admin overrides on this limit.
|
|
5082
|
+
* @example
|
|
5083
|
+
* ```js
|
|
5084
|
+
* // Before running the sample:
|
|
5085
|
+
* // - Enable the API at:
|
|
5086
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
5087
|
+
* // - Login into gcloud by running:
|
|
5088
|
+
* // ```sh
|
|
5089
|
+
* // $ gcloud auth application-default login
|
|
5090
|
+
* // ```
|
|
5091
|
+
* // - Install the npm module by running:
|
|
5092
|
+
* // ```sh
|
|
5093
|
+
* // $ npm install googleapis
|
|
5094
|
+
* // ```
|
|
5095
|
+
*
|
|
5096
|
+
* const {google} = require('googleapis');
|
|
5097
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
5098
|
+
*
|
|
5099
|
+
* async function main() {
|
|
5100
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5101
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5102
|
+
* scopes: [
|
|
5103
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5104
|
+
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
5105
|
+
* ],
|
|
5106
|
+
* });
|
|
5107
|
+
*
|
|
5108
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5109
|
+
* const authClient = await auth.getClient();
|
|
5110
|
+
* google.options({auth: authClient});
|
|
5111
|
+
*
|
|
5112
|
+
* // Do the magic
|
|
5113
|
+
* const res =
|
|
5114
|
+
* await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.list(
|
|
5115
|
+
* {
|
|
5116
|
+
* // Requested size of the next page of data.
|
|
5117
|
+
* pageSize: 'placeholder-value',
|
|
5118
|
+
* // Token identifying which result to start with; returned by a previous list call.
|
|
5119
|
+
* pageToken: 'placeholder-value',
|
|
5120
|
+
* // The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
|
|
5121
|
+
* parent:
|
|
5122
|
+
* '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
|
|
5123
|
+
* },
|
|
5124
|
+
* );
|
|
5125
|
+
* console.log(res.data);
|
|
5126
|
+
*
|
|
5127
|
+
* // Example response
|
|
5128
|
+
* // {
|
|
5129
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
5130
|
+
* // "overrides": []
|
|
5131
|
+
* // }
|
|
5132
|
+
* }
|
|
5133
|
+
*
|
|
5134
|
+
* main().catch(e => {
|
|
5135
|
+
* console.error(e);
|
|
5136
|
+
* throw e;
|
|
5137
|
+
* });
|
|
5138
|
+
*
|
|
5139
|
+
* ```
|
|
4131
5140
|
*
|
|
4132
5141
|
* @param params - Parameters for request
|
|
4133
5142
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4224,6 +5233,81 @@ export namespace serviceusage_v1beta1 {
|
|
|
4224
5233
|
|
|
4225
5234
|
/**
|
|
4226
5235
|
* Updates an admin override.
|
|
5236
|
+
* @example
|
|
5237
|
+
* ```js
|
|
5238
|
+
* // Before running the sample:
|
|
5239
|
+
* // - Enable the API at:
|
|
5240
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
5241
|
+
* // - Login into gcloud by running:
|
|
5242
|
+
* // ```sh
|
|
5243
|
+
* // $ gcloud auth application-default login
|
|
5244
|
+
* // ```
|
|
5245
|
+
* // - Install the npm module by running:
|
|
5246
|
+
* // ```sh
|
|
5247
|
+
* // $ npm install googleapis
|
|
5248
|
+
* // ```
|
|
5249
|
+
*
|
|
5250
|
+
* const {google} = require('googleapis');
|
|
5251
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
5252
|
+
*
|
|
5253
|
+
* async function main() {
|
|
5254
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5255
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5256
|
+
* scopes: [
|
|
5257
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5258
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
5259
|
+
* ],
|
|
5260
|
+
* });
|
|
5261
|
+
*
|
|
5262
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5263
|
+
* const authClient = await auth.getClient();
|
|
5264
|
+
* google.options({auth: authClient});
|
|
5265
|
+
*
|
|
5266
|
+
* // Do the magic
|
|
5267
|
+
* const res =
|
|
5268
|
+
* await serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.patch(
|
|
5269
|
+
* {
|
|
5270
|
+
* // Whether to force the update of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
5271
|
+
* force: 'placeholder-value',
|
|
5272
|
+
* // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
5273
|
+
* forceOnly: 'placeholder-value',
|
|
5274
|
+
* // The resource name of the override to update. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`
|
|
5275
|
+
* name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/adminOverrides/my-adminOverride',
|
|
5276
|
+
* // Update only the specified fields of the override. If unset, all fields will be updated.
|
|
5277
|
+
* updateMask: 'placeholder-value',
|
|
5278
|
+
*
|
|
5279
|
+
* // Request body metadata
|
|
5280
|
+
* requestBody: {
|
|
5281
|
+
* // request body parameters
|
|
5282
|
+
* // {
|
|
5283
|
+
* // "adminOverrideAncestor": "my_adminOverrideAncestor",
|
|
5284
|
+
* // "dimensions": {},
|
|
5285
|
+
* // "metric": "my_metric",
|
|
5286
|
+
* // "name": "my_name",
|
|
5287
|
+
* // "overrideValue": "my_overrideValue",
|
|
5288
|
+
* // "unit": "my_unit"
|
|
5289
|
+
* // }
|
|
5290
|
+
* },
|
|
5291
|
+
* },
|
|
5292
|
+
* );
|
|
5293
|
+
* console.log(res.data);
|
|
5294
|
+
*
|
|
5295
|
+
* // Example response
|
|
5296
|
+
* // {
|
|
5297
|
+
* // "done": false,
|
|
5298
|
+
* // "error": {},
|
|
5299
|
+
* // "metadata": {},
|
|
5300
|
+
* // "name": "my_name",
|
|
5301
|
+
* // "response": {}
|
|
5302
|
+
* // }
|
|
5303
|
+
* }
|
|
5304
|
+
*
|
|
5305
|
+
* main().catch(e => {
|
|
5306
|
+
* console.error(e);
|
|
5307
|
+
* throw e;
|
|
5308
|
+
* });
|
|
5309
|
+
*
|
|
5310
|
+
* ```
|
|
4227
5311
|
*
|
|
4228
5312
|
* @param params - Parameters for request
|
|
4229
5313
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4395,6 +5479,80 @@ export namespace serviceusage_v1beta1 {
|
|
|
4395
5479
|
|
|
4396
5480
|
/**
|
|
4397
5481
|
* Creates a consumer override. A consumer override is applied to the consumer on its own authority to limit its own quota usage. Consumer overrides cannot be used to grant more quota than would be allowed by admin overrides, producer overrides, or the default limit of the service.
|
|
5482
|
+
* @example
|
|
5483
|
+
* ```js
|
|
5484
|
+
* // Before running the sample:
|
|
5485
|
+
* // - Enable the API at:
|
|
5486
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
5487
|
+
* // - Login into gcloud by running:
|
|
5488
|
+
* // ```sh
|
|
5489
|
+
* // $ gcloud auth application-default login
|
|
5490
|
+
* // ```
|
|
5491
|
+
* // - Install the npm module by running:
|
|
5492
|
+
* // ```sh
|
|
5493
|
+
* // $ npm install googleapis
|
|
5494
|
+
* // ```
|
|
5495
|
+
*
|
|
5496
|
+
* const {google} = require('googleapis');
|
|
5497
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
5498
|
+
*
|
|
5499
|
+
* async function main() {
|
|
5500
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5501
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5502
|
+
* scopes: [
|
|
5503
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5504
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
5505
|
+
* ],
|
|
5506
|
+
* });
|
|
5507
|
+
*
|
|
5508
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5509
|
+
* const authClient = await auth.getClient();
|
|
5510
|
+
* google.options({auth: authClient});
|
|
5511
|
+
*
|
|
5512
|
+
* // Do the magic
|
|
5513
|
+
* const res =
|
|
5514
|
+
* await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.create(
|
|
5515
|
+
* {
|
|
5516
|
+
* // Whether to force the creation of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
5517
|
+
* force: 'placeholder-value',
|
|
5518
|
+
* // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
5519
|
+
* forceOnly: 'placeholder-value',
|
|
5520
|
+
* // The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
|
|
5521
|
+
* parent:
|
|
5522
|
+
* '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
|
|
5523
|
+
*
|
|
5524
|
+
* // Request body metadata
|
|
5525
|
+
* requestBody: {
|
|
5526
|
+
* // request body parameters
|
|
5527
|
+
* // {
|
|
5528
|
+
* // "adminOverrideAncestor": "my_adminOverrideAncestor",
|
|
5529
|
+
* // "dimensions": {},
|
|
5530
|
+
* // "metric": "my_metric",
|
|
5531
|
+
* // "name": "my_name",
|
|
5532
|
+
* // "overrideValue": "my_overrideValue",
|
|
5533
|
+
* // "unit": "my_unit"
|
|
5534
|
+
* // }
|
|
5535
|
+
* },
|
|
5536
|
+
* },
|
|
5537
|
+
* );
|
|
5538
|
+
* console.log(res.data);
|
|
5539
|
+
*
|
|
5540
|
+
* // Example response
|
|
5541
|
+
* // {
|
|
5542
|
+
* // "done": false,
|
|
5543
|
+
* // "error": {},
|
|
5544
|
+
* // "metadata": {},
|
|
5545
|
+
* // "name": "my_name",
|
|
5546
|
+
* // "response": {}
|
|
5547
|
+
* // }
|
|
5548
|
+
* }
|
|
5549
|
+
*
|
|
5550
|
+
* main().catch(e => {
|
|
5551
|
+
* console.error(e);
|
|
5552
|
+
* throw e;
|
|
5553
|
+
* });
|
|
5554
|
+
*
|
|
5555
|
+
* ```
|
|
4398
5556
|
*
|
|
4399
5557
|
* @param params - Parameters for request
|
|
4400
5558
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4487,6 +5645,66 @@ export namespace serviceusage_v1beta1 {
|
|
|
4487
5645
|
|
|
4488
5646
|
/**
|
|
4489
5647
|
* Deletes a consumer override.
|
|
5648
|
+
* @example
|
|
5649
|
+
* ```js
|
|
5650
|
+
* // Before running the sample:
|
|
5651
|
+
* // - Enable the API at:
|
|
5652
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
5653
|
+
* // - Login into gcloud by running:
|
|
5654
|
+
* // ```sh
|
|
5655
|
+
* // $ gcloud auth application-default login
|
|
5656
|
+
* // ```
|
|
5657
|
+
* // - Install the npm module by running:
|
|
5658
|
+
* // ```sh
|
|
5659
|
+
* // $ npm install googleapis
|
|
5660
|
+
* // ```
|
|
5661
|
+
*
|
|
5662
|
+
* const {google} = require('googleapis');
|
|
5663
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
5664
|
+
*
|
|
5665
|
+
* async function main() {
|
|
5666
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5667
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5668
|
+
* scopes: [
|
|
5669
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5670
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
5671
|
+
* ],
|
|
5672
|
+
* });
|
|
5673
|
+
*
|
|
5674
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5675
|
+
* const authClient = await auth.getClient();
|
|
5676
|
+
* google.options({auth: authClient});
|
|
5677
|
+
*
|
|
5678
|
+
* // Do the magic
|
|
5679
|
+
* const res =
|
|
5680
|
+
* await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.delete(
|
|
5681
|
+
* {
|
|
5682
|
+
* // Whether to force the deletion of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
5683
|
+
* force: 'placeholder-value',
|
|
5684
|
+
* // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
5685
|
+
* forceOnly: 'placeholder-value',
|
|
5686
|
+
* // The resource name of the override to delete. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d`
|
|
5687
|
+
* name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/consumerOverrides/my-consumerOverride',
|
|
5688
|
+
* },
|
|
5689
|
+
* );
|
|
5690
|
+
* console.log(res.data);
|
|
5691
|
+
*
|
|
5692
|
+
* // Example response
|
|
5693
|
+
* // {
|
|
5694
|
+
* // "done": false,
|
|
5695
|
+
* // "error": {},
|
|
5696
|
+
* // "metadata": {},
|
|
5697
|
+
* // "name": "my_name",
|
|
5698
|
+
* // "response": {}
|
|
5699
|
+
* // }
|
|
5700
|
+
* }
|
|
5701
|
+
*
|
|
5702
|
+
* main().catch(e => {
|
|
5703
|
+
* console.error(e);
|
|
5704
|
+
* throw e;
|
|
5705
|
+
* });
|
|
5706
|
+
*
|
|
5707
|
+
* ```
|
|
4490
5708
|
*
|
|
4491
5709
|
* @param params - Parameters for request
|
|
4492
5710
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4576,6 +5794,64 @@ export namespace serviceusage_v1beta1 {
|
|
|
4576
5794
|
|
|
4577
5795
|
/**
|
|
4578
5796
|
* Lists all consumer overrides on this limit.
|
|
5797
|
+
* @example
|
|
5798
|
+
* ```js
|
|
5799
|
+
* // Before running the sample:
|
|
5800
|
+
* // - Enable the API at:
|
|
5801
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
5802
|
+
* // - Login into gcloud by running:
|
|
5803
|
+
* // ```sh
|
|
5804
|
+
* // $ gcloud auth application-default login
|
|
5805
|
+
* // ```
|
|
5806
|
+
* // - Install the npm module by running:
|
|
5807
|
+
* // ```sh
|
|
5808
|
+
* // $ npm install googleapis
|
|
5809
|
+
* // ```
|
|
5810
|
+
*
|
|
5811
|
+
* const {google} = require('googleapis');
|
|
5812
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
5813
|
+
*
|
|
5814
|
+
* async function main() {
|
|
5815
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5816
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5817
|
+
* scopes: [
|
|
5818
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5819
|
+
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
5820
|
+
* ],
|
|
5821
|
+
* });
|
|
5822
|
+
*
|
|
5823
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5824
|
+
* const authClient = await auth.getClient();
|
|
5825
|
+
* google.options({auth: authClient});
|
|
5826
|
+
*
|
|
5827
|
+
* // Do the magic
|
|
5828
|
+
* const res =
|
|
5829
|
+
* await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.list(
|
|
5830
|
+
* {
|
|
5831
|
+
* // Requested size of the next page of data.
|
|
5832
|
+
* pageSize: 'placeholder-value',
|
|
5833
|
+
* // Token identifying which result to start with; returned by a previous list call.
|
|
5834
|
+
* pageToken: 'placeholder-value',
|
|
5835
|
+
* // The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`
|
|
5836
|
+
* parent:
|
|
5837
|
+
* '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit',
|
|
5838
|
+
* },
|
|
5839
|
+
* );
|
|
5840
|
+
* console.log(res.data);
|
|
5841
|
+
*
|
|
5842
|
+
* // Example response
|
|
5843
|
+
* // {
|
|
5844
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
5845
|
+
* // "overrides": []
|
|
5846
|
+
* // }
|
|
5847
|
+
* }
|
|
5848
|
+
*
|
|
5849
|
+
* main().catch(e => {
|
|
5850
|
+
* console.error(e);
|
|
5851
|
+
* throw e;
|
|
5852
|
+
* });
|
|
5853
|
+
*
|
|
5854
|
+
* ```
|
|
4579
5855
|
*
|
|
4580
5856
|
* @param params - Parameters for request
|
|
4581
5857
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4674,6 +5950,81 @@ export namespace serviceusage_v1beta1 {
|
|
|
4674
5950
|
|
|
4675
5951
|
/**
|
|
4676
5952
|
* Updates a consumer override.
|
|
5953
|
+
* @example
|
|
5954
|
+
* ```js
|
|
5955
|
+
* // Before running the sample:
|
|
5956
|
+
* // - Enable the API at:
|
|
5957
|
+
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
5958
|
+
* // - Login into gcloud by running:
|
|
5959
|
+
* // ```sh
|
|
5960
|
+
* // $ gcloud auth application-default login
|
|
5961
|
+
* // ```
|
|
5962
|
+
* // - Install the npm module by running:
|
|
5963
|
+
* // ```sh
|
|
5964
|
+
* // $ npm install googleapis
|
|
5965
|
+
* // ```
|
|
5966
|
+
*
|
|
5967
|
+
* const {google} = require('googleapis');
|
|
5968
|
+
* const serviceusage = google.serviceusage('v1beta1');
|
|
5969
|
+
*
|
|
5970
|
+
* async function main() {
|
|
5971
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5972
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5973
|
+
* scopes: [
|
|
5974
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
5975
|
+
* 'https://www.googleapis.com/auth/service.management',
|
|
5976
|
+
* ],
|
|
5977
|
+
* });
|
|
5978
|
+
*
|
|
5979
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5980
|
+
* const authClient = await auth.getClient();
|
|
5981
|
+
* google.options({auth: authClient});
|
|
5982
|
+
*
|
|
5983
|
+
* // Do the magic
|
|
5984
|
+
* const res =
|
|
5985
|
+
* await serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.patch(
|
|
5986
|
+
* {
|
|
5987
|
+
* // Whether to force the update of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
5988
|
+
* force: 'placeholder-value',
|
|
5989
|
+
* // The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in "X-Goog-Request-Reason" header when sending the request.
|
|
5990
|
+
* forceOnly: 'placeholder-value',
|
|
5991
|
+
* // The resource name of the override to update. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d`
|
|
5992
|
+
* name: '[^/]+/[^/]+/services/my-service/consumerQuotaMetrics/my-consumerQuotaMetric/limits/my-limit/consumerOverrides/my-consumerOverride',
|
|
5993
|
+
* // Update only the specified fields of the override. If unset, all fields will be updated.
|
|
5994
|
+
* updateMask: 'placeholder-value',
|
|
5995
|
+
*
|
|
5996
|
+
* // Request body metadata
|
|
5997
|
+
* requestBody: {
|
|
5998
|
+
* // request body parameters
|
|
5999
|
+
* // {
|
|
6000
|
+
* // "adminOverrideAncestor": "my_adminOverrideAncestor",
|
|
6001
|
+
* // "dimensions": {},
|
|
6002
|
+
* // "metric": "my_metric",
|
|
6003
|
+
* // "name": "my_name",
|
|
6004
|
+
* // "overrideValue": "my_overrideValue",
|
|
6005
|
+
* // "unit": "my_unit"
|
|
6006
|
+
* // }
|
|
6007
|
+
* },
|
|
6008
|
+
* },
|
|
6009
|
+
* );
|
|
6010
|
+
* console.log(res.data);
|
|
6011
|
+
*
|
|
6012
|
+
* // Example response
|
|
6013
|
+
* // {
|
|
6014
|
+
* // "done": false,
|
|
6015
|
+
* // "error": {},
|
|
6016
|
+
* // "metadata": {},
|
|
6017
|
+
* // "name": "my_name",
|
|
6018
|
+
* // "response": {}
|
|
6019
|
+
* // }
|
|
6020
|
+
* }
|
|
6021
|
+
*
|
|
6022
|
+
* main().catch(e => {
|
|
6023
|
+
* console.error(e);
|
|
6024
|
+
* throw e;
|
|
6025
|
+
* });
|
|
6026
|
+
*
|
|
6027
|
+
* ```
|
|
4677
6028
|
*
|
|
4678
6029
|
* @param params - Parameters for request
|
|
4679
6030
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|