@googleapis/serviceusage 5.0.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/build/index.js +5 -4
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +413 -519
- package/build/v1.js +21 -20
- package/build/v1.js.map +1 -1
- package/build/v1beta1.d.ts +449 -1206
- package/build/v1beta1.js +43 -42
- package/build/v1beta1.js.map +1 -1
- package/index.ts +1 -1
- package/package.json +6 -6
- package/v1.ts +400 -519
- package/v1beta1.ts +434 -1206
package/v1.ts
CHANGED
|
@@ -126,6 +126,23 @@ export namespace serviceusage_v1 {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Metadata for the `AddEnableRules` method.
|
|
131
|
+
*/
|
|
132
|
+
export interface Schema$AddEnableRulesMetadata {}
|
|
133
|
+
/**
|
|
134
|
+
* The response message of "AddEnableRules" method.
|
|
135
|
+
*/
|
|
136
|
+
export interface Schema$AddEnableRulesResponse {
|
|
137
|
+
/**
|
|
138
|
+
* The values added to the parent consumer policy.
|
|
139
|
+
*/
|
|
140
|
+
addedValues?: string[] | null;
|
|
141
|
+
/**
|
|
142
|
+
* The parent consumer policy. It can be `projects/12345/consumerPolicies/default`, or `folders/12345/consumerPolicies/default`, or `organizations/12345/consumerPolicies/default`.
|
|
143
|
+
*/
|
|
144
|
+
parent?: string | null;
|
|
145
|
+
}
|
|
129
146
|
/**
|
|
130
147
|
* Quota policy created by quota administrator.
|
|
131
148
|
*/
|
|
@@ -135,7 +152,7 @@ export namespace serviceusage_v1 {
|
|
|
135
152
|
*/
|
|
136
153
|
container?: string | null;
|
|
137
154
|
/**
|
|
138
|
-
* If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example,
|
|
155
|
+
* If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project\}/{region\}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * Keys other than `region` or `zone` are not valid.
|
|
139
156
|
*/
|
|
140
157
|
dimensions?: {[key: string]: string} | null;
|
|
141
158
|
/**
|
|
@@ -293,10 +310,18 @@ export namespace serviceusage_v1 {
|
|
|
293
310
|
* The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP "authorization" header, and sent to the backend.
|
|
294
311
|
*/
|
|
295
312
|
jwtAudience?: string | null;
|
|
313
|
+
/**
|
|
314
|
+
* Deprecated, do not use.
|
|
315
|
+
*/
|
|
316
|
+
minDeadline?: number | null;
|
|
296
317
|
/**
|
|
297
318
|
* The number of seconds to wait for the completion of a long running operation. The default is no deadline.
|
|
298
319
|
*/
|
|
299
320
|
operationDeadline?: number | null;
|
|
321
|
+
/**
|
|
322
|
+
* The map between request protocol and the backend address.
|
|
323
|
+
*/
|
|
324
|
+
overridesByRequestProtocol?: {[key: string]: Schema$BackendRule} | null;
|
|
300
325
|
pathTranslation?: string | null;
|
|
301
326
|
/**
|
|
302
327
|
* The protocol used for sending a request to the backend. The supported values are "http/1.1" and "h2". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to "h2" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.
|
|
@@ -382,6 +407,93 @@ export namespace serviceusage_v1 {
|
|
|
382
407
|
* The request message for Operations.CancelOperation.
|
|
383
408
|
*/
|
|
384
409
|
export interface Schema$CancelOperationRequest {}
|
|
410
|
+
/**
|
|
411
|
+
* Details about how and where to publish client libraries.
|
|
412
|
+
*/
|
|
413
|
+
export interface Schema$ClientLibrarySettings {
|
|
414
|
+
/**
|
|
415
|
+
* Settings for C++ client libraries.
|
|
416
|
+
*/
|
|
417
|
+
cppSettings?: Schema$CppSettings;
|
|
418
|
+
/**
|
|
419
|
+
* Settings for .NET client libraries.
|
|
420
|
+
*/
|
|
421
|
+
dotnetSettings?: Schema$DotnetSettings;
|
|
422
|
+
/**
|
|
423
|
+
* Settings for Go client libraries.
|
|
424
|
+
*/
|
|
425
|
+
goSettings?: Schema$GoSettings;
|
|
426
|
+
/**
|
|
427
|
+
* Settings for legacy Java features, supported in the Service YAML.
|
|
428
|
+
*/
|
|
429
|
+
javaSettings?: Schema$JavaSettings;
|
|
430
|
+
/**
|
|
431
|
+
* Launch stage of this version of the API.
|
|
432
|
+
*/
|
|
433
|
+
launchStage?: string | null;
|
|
434
|
+
/**
|
|
435
|
+
* Settings for Node client libraries.
|
|
436
|
+
*/
|
|
437
|
+
nodeSettings?: Schema$NodeSettings;
|
|
438
|
+
/**
|
|
439
|
+
* Settings for PHP client libraries.
|
|
440
|
+
*/
|
|
441
|
+
phpSettings?: Schema$PhpSettings;
|
|
442
|
+
/**
|
|
443
|
+
* Settings for Python client libraries.
|
|
444
|
+
*/
|
|
445
|
+
pythonSettings?: Schema$PythonSettings;
|
|
446
|
+
/**
|
|
447
|
+
* When using transport=rest, the client request will encode enums as numbers rather than strings.
|
|
448
|
+
*/
|
|
449
|
+
restNumericEnums?: boolean | null;
|
|
450
|
+
/**
|
|
451
|
+
* Settings for Ruby client libraries.
|
|
452
|
+
*/
|
|
453
|
+
rubySettings?: Schema$RubySettings;
|
|
454
|
+
/**
|
|
455
|
+
* Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
|
|
456
|
+
*/
|
|
457
|
+
version?: string | null;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Required information for every language.
|
|
461
|
+
*/
|
|
462
|
+
export interface Schema$CommonLanguageSettings {
|
|
463
|
+
/**
|
|
464
|
+
* The destination where API teams want this client library to be published.
|
|
465
|
+
*/
|
|
466
|
+
destinations?: string[] | null;
|
|
467
|
+
/**
|
|
468
|
+
* Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest
|
|
469
|
+
*/
|
|
470
|
+
referenceDocsUri?: string | null;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Consumer Policy is a set of rules that define what services or service groups can be used for a cloud resource hierarchy.
|
|
474
|
+
*/
|
|
475
|
+
export interface Schema$ConsumerPolicy {
|
|
476
|
+
/**
|
|
477
|
+
* Optional. Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. [AIP-128](https://google.aip.dev/128#annotations)
|
|
478
|
+
*/
|
|
479
|
+
annotations?: {[key: string]: string} | null;
|
|
480
|
+
/**
|
|
481
|
+
* Enable rules define usable services and service groups.
|
|
482
|
+
*/
|
|
483
|
+
enableRules?: Schema$EnableRule[];
|
|
484
|
+
/**
|
|
485
|
+
* An opaque tag indicating the current version of the policy, used for concurrency control.
|
|
486
|
+
*/
|
|
487
|
+
etag?: string | null;
|
|
488
|
+
/**
|
|
489
|
+
* Output only. The resource name of the policy. For example, We only allow consumer policy name as "default" for now: `projects/12345/consumerPolicies/default`, `folders/12345/consumerPolicies/default`, `organizations/12345/consumerPolicies/default`. Legacy format: `projects/12345/consumerPoly`
|
|
490
|
+
*/
|
|
491
|
+
name?: string | null;
|
|
492
|
+
/**
|
|
493
|
+
* The last-modified time.
|
|
494
|
+
*/
|
|
495
|
+
updateTime?: string | null;
|
|
496
|
+
}
|
|
385
497
|
/**
|
|
386
498
|
* `Context` defines which contexts an API requests. Example: context: rules: - selector: "*" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using “x-goog-ext--bin” and “x-goog-ext--jspb” format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: "google.example.library.v1.LibraryService.CreateBook" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.
|
|
387
499
|
*/
|
|
@@ -417,13 +529,26 @@ export namespace serviceusage_v1 {
|
|
|
417
529
|
selector?: string | null;
|
|
418
530
|
}
|
|
419
531
|
/**
|
|
420
|
-
* Selects and configures the service controller used by the service.
|
|
532
|
+
* Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com
|
|
421
533
|
*/
|
|
422
534
|
export interface Schema$Control {
|
|
423
535
|
/**
|
|
424
536
|
* 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
|
|
425
537
|
*/
|
|
426
538
|
environment?: string | null;
|
|
539
|
+
/**
|
|
540
|
+
* Defines policies applying to the API methods of the service.
|
|
541
|
+
*/
|
|
542
|
+
methodPolicies?: Schema$MethodPolicy[];
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Settings for C++ client libraries.
|
|
546
|
+
*/
|
|
547
|
+
export interface Schema$CppSettings {
|
|
548
|
+
/**
|
|
549
|
+
* Some settings.
|
|
550
|
+
*/
|
|
551
|
+
common?: Schema$CommonLanguageSettings;
|
|
427
552
|
}
|
|
428
553
|
/**
|
|
429
554
|
* Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by CreateAdminQuotaPolicy.
|
|
@@ -495,7 +620,7 @@ export namespace serviceusage_v1 {
|
|
|
495
620
|
service?: Schema$GoogleApiServiceusageV1Service;
|
|
496
621
|
}
|
|
497
622
|
/**
|
|
498
|
-
* `Documentation` provides the information for describing a service. Example: documentation: summary: \> The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages
|
|
623
|
+
* `Documentation` provides the information for describing a service. Example: documentation: summary: \> The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \> ... - selector: google.calendar.Calendar.Put description: \> ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.
|
|
499
624
|
*/
|
|
500
625
|
export interface Schema$Documentation {
|
|
501
626
|
/**
|
|
@@ -514,6 +639,10 @@ export namespace serviceusage_v1 {
|
|
|
514
639
|
* A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow "last one wins" order.
|
|
515
640
|
*/
|
|
516
641
|
rules?: Schema$DocumentationRule[];
|
|
642
|
+
/**
|
|
643
|
+
* Specifies section and content to override boilerplate content provided by go/api-docgen. Currently overrides following sections: 1. rest.service.client_libraries
|
|
644
|
+
*/
|
|
645
|
+
sectionOverrides?: Schema$Page[];
|
|
517
646
|
/**
|
|
518
647
|
* Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.
|
|
519
648
|
*/
|
|
@@ -535,11 +664,44 @@ export namespace serviceusage_v1 {
|
|
|
535
664
|
* Description of the selected proto element (e.g. a message, a method, a 'service' definition, or a field). Defaults to leading & trailing comments taken from the proto source definition of the proto element.
|
|
536
665
|
*/
|
|
537
666
|
description?: string | null;
|
|
667
|
+
/**
|
|
668
|
+
* String of comma or space separated case-sensitive words for which method/field name replacement will be disabled by go/api-docgen.
|
|
669
|
+
*/
|
|
670
|
+
disableReplacementWords?: string | null;
|
|
538
671
|
/**
|
|
539
672
|
* The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in "*", indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern "*" is used.
|
|
540
673
|
*/
|
|
541
674
|
selector?: string | null;
|
|
542
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* Settings for Dotnet client libraries.
|
|
678
|
+
*/
|
|
679
|
+
export interface Schema$DotnetSettings {
|
|
680
|
+
/**
|
|
681
|
+
* Some settings.
|
|
682
|
+
*/
|
|
683
|
+
common?: Schema$CommonLanguageSettings;
|
|
684
|
+
/**
|
|
685
|
+
* Namespaces which must be aliased in snippets due to a known (but non-generator-predictable) naming collision
|
|
686
|
+
*/
|
|
687
|
+
forcedNamespaceAliases?: string[] | null;
|
|
688
|
+
/**
|
|
689
|
+
* Method signatures (in the form "service.method(signature)") which are provided separately, so shouldn't be generated. Snippets *calling* these methods are still generated, however.
|
|
690
|
+
*/
|
|
691
|
+
handwrittenSignatures?: string[] | null;
|
|
692
|
+
/**
|
|
693
|
+
* List of full resource types to ignore during generation. This is typically used for API-specific Location resources, which should be handled by the generator as if they were actually the common Location resources. Example entry: "documentai.googleapis.com/Location"
|
|
694
|
+
*/
|
|
695
|
+
ignoredResources?: string[] | null;
|
|
696
|
+
/**
|
|
697
|
+
* Map from full resource types to the effective short name for the resource. This is used when otherwise resource named from different services would cause naming collisions. Example entry: "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
|
|
698
|
+
*/
|
|
699
|
+
renamedResources?: {[key: string]: string} | null;
|
|
700
|
+
/**
|
|
701
|
+
* Map from original service names to renamed versions. This is used when the default generated types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to SubscriberServiceApi.
|
|
702
|
+
*/
|
|
703
|
+
renamedServices?: {[key: string]: string} | null;
|
|
704
|
+
}
|
|
543
705
|
/**
|
|
544
706
|
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
|
|
545
707
|
*/
|
|
@@ -557,6 +719,27 @@ export namespace serviceusage_v1 {
|
|
|
557
719
|
*/
|
|
558
720
|
serviceId?: string | null;
|
|
559
721
|
}
|
|
722
|
+
/**
|
|
723
|
+
* The consumer policy rule that defines usable services and service groups.
|
|
724
|
+
*/
|
|
725
|
+
export interface Schema$EnableRule {
|
|
726
|
+
/**
|
|
727
|
+
* Client and resource project enable type.
|
|
728
|
+
*/
|
|
729
|
+
enableType?: string | null;
|
|
730
|
+
/**
|
|
731
|
+
* DEPRECATED: Please use field `values`. Service group should have prefix `groups/`. The names of the service groups that are enabled (Not Implemented). go/predefined-service-groups. Example: `groups/googleServices`.
|
|
732
|
+
*/
|
|
733
|
+
groups?: string[] | null;
|
|
734
|
+
/**
|
|
735
|
+
* DEPRECATED: Please use field `values`. Service should have prefix `services/`. The names of the services that are enabled. Example: `storage.googleapis.com`.
|
|
736
|
+
*/
|
|
737
|
+
services?: string[] | null;
|
|
738
|
+
/**
|
|
739
|
+
* The names of the services or service groups that are enabled. Example: `services/storage.googleapis.com`, groups/googleServices`, groups/allServices`.
|
|
740
|
+
*/
|
|
741
|
+
values?: string[] | null;
|
|
742
|
+
}
|
|
560
743
|
/**
|
|
561
744
|
* Request message for the `EnableService` method.
|
|
562
745
|
*/
|
|
@@ -574,6 +757,10 @@ export namespace serviceusage_v1 {
|
|
|
574
757
|
* `Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true
|
|
575
758
|
*/
|
|
576
759
|
export interface Schema$Endpoint {
|
|
760
|
+
/**
|
|
761
|
+
* Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.
|
|
762
|
+
*/
|
|
763
|
+
aliases?: string[] | null;
|
|
577
764
|
/**
|
|
578
765
|
* Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.
|
|
579
766
|
*/
|
|
@@ -591,6 +778,10 @@ export namespace serviceusage_v1 {
|
|
|
591
778
|
* Enum type definition.
|
|
592
779
|
*/
|
|
593
780
|
export interface Schema$Enum {
|
|
781
|
+
/**
|
|
782
|
+
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
|
783
|
+
*/
|
|
784
|
+
edition?: string | null;
|
|
594
785
|
/**
|
|
595
786
|
* Enum value definitions.
|
|
596
787
|
*/
|
|
@@ -674,6 +865,23 @@ export namespace serviceusage_v1 {
|
|
|
674
865
|
*/
|
|
675
866
|
typeUrl?: string | null;
|
|
676
867
|
}
|
|
868
|
+
/**
|
|
869
|
+
* 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.
|
|
870
|
+
*/
|
|
871
|
+
export interface Schema$FieldPolicy {
|
|
872
|
+
/**
|
|
873
|
+
* 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".
|
|
874
|
+
*/
|
|
875
|
+
resourcePermission?: string | null;
|
|
876
|
+
/**
|
|
877
|
+
* Specifies the resource type for the resource referred to by the field.
|
|
878
|
+
*/
|
|
879
|
+
resourceType?: string | null;
|
|
880
|
+
/**
|
|
881
|
+
* 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".
|
|
882
|
+
*/
|
|
883
|
+
selector?: string | null;
|
|
884
|
+
}
|
|
677
885
|
/**
|
|
678
886
|
* Metadata for the `GetServiceIdentity` method.
|
|
679
887
|
*/
|
|
@@ -775,6 +983,10 @@ export namespace serviceusage_v1 {
|
|
|
775
983
|
* The Google project that owns this service.
|
|
776
984
|
*/
|
|
777
985
|
producerProjectId?: string | null;
|
|
986
|
+
/**
|
|
987
|
+
* Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers.
|
|
988
|
+
*/
|
|
989
|
+
publishing?: Schema$Publishing;
|
|
778
990
|
/**
|
|
779
991
|
* Quota configuration.
|
|
780
992
|
*/
|
|
@@ -905,6 +1117,15 @@ export namespace serviceusage_v1 {
|
|
|
905
1117
|
*/
|
|
906
1118
|
usage?: Schema$Usage;
|
|
907
1119
|
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Settings for Go client libraries.
|
|
1122
|
+
*/
|
|
1123
|
+
export interface Schema$GoSettings {
|
|
1124
|
+
/**
|
|
1125
|
+
* Some settings.
|
|
1126
|
+
*/
|
|
1127
|
+
common?: Schema$CommonLanguageSettings;
|
|
1128
|
+
}
|
|
908
1129
|
/**
|
|
909
1130
|
* Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.
|
|
910
1131
|
*/
|
|
@@ -1002,6 +1223,23 @@ export namespace serviceusage_v1 {
|
|
|
1002
1223
|
*/
|
|
1003
1224
|
overrides?: Schema$QuotaOverride[];
|
|
1004
1225
|
}
|
|
1226
|
+
/**
|
|
1227
|
+
* Settings for Java client libraries.
|
|
1228
|
+
*/
|
|
1229
|
+
export interface Schema$JavaSettings {
|
|
1230
|
+
/**
|
|
1231
|
+
* Some settings.
|
|
1232
|
+
*/
|
|
1233
|
+
common?: Schema$CommonLanguageSettings;
|
|
1234
|
+
/**
|
|
1235
|
+
* The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1
|
|
1236
|
+
*/
|
|
1237
|
+
libraryPackage?: string | null;
|
|
1238
|
+
/**
|
|
1239
|
+
* Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin
|
|
1240
|
+
*/
|
|
1241
|
+
serviceClassNames?: {[key: string]: string} | null;
|
|
1242
|
+
}
|
|
1005
1243
|
/**
|
|
1006
1244
|
* Specifies a location to extract JWT from an API request.
|
|
1007
1245
|
*/
|
|
@@ -1113,6 +1351,27 @@ export namespace serviceusage_v1 {
|
|
|
1113
1351
|
*/
|
|
1114
1352
|
monitoredResource?: string | null;
|
|
1115
1353
|
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
|
|
1356
|
+
*/
|
|
1357
|
+
export interface Schema$LongRunning {
|
|
1358
|
+
/**
|
|
1359
|
+
* Initial delay after which the first poll request will be made. Default value: 5 seconds.
|
|
1360
|
+
*/
|
|
1361
|
+
initialPollDelay?: string | null;
|
|
1362
|
+
/**
|
|
1363
|
+
* Maximum time between two subsequent poll requests. Default value: 45 seconds.
|
|
1364
|
+
*/
|
|
1365
|
+
maxPollDelay?: string | null;
|
|
1366
|
+
/**
|
|
1367
|
+
* Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.
|
|
1368
|
+
*/
|
|
1369
|
+
pollDelayMultiplier?: number | null;
|
|
1370
|
+
/**
|
|
1371
|
+
* Total polling timeout. Default value: 5 minutes.
|
|
1372
|
+
*/
|
|
1373
|
+
totalPollTimeout?: string | null;
|
|
1374
|
+
}
|
|
1116
1375
|
/**
|
|
1117
1376
|
* Method represents a method of an API interface.
|
|
1118
1377
|
*/
|
|
@@ -1146,6 +1405,32 @@ export namespace serviceusage_v1 {
|
|
|
1146
1405
|
*/
|
|
1147
1406
|
syntax?: string | null;
|
|
1148
1407
|
}
|
|
1408
|
+
/**
|
|
1409
|
+
* Defines policies applying to an RPC method.
|
|
1410
|
+
*/
|
|
1411
|
+
export interface Schema$MethodPolicy {
|
|
1412
|
+
/**
|
|
1413
|
+
* Policies that are applicable to the request message.
|
|
1414
|
+
*/
|
|
1415
|
+
requestPolicies?: Schema$FieldPolicy[];
|
|
1416
|
+
/**
|
|
1417
|
+
* 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 .
|
|
1418
|
+
*/
|
|
1419
|
+
selector?: string | null;
|
|
1420
|
+
}
|
|
1421
|
+
/**
|
|
1422
|
+
* Describes the generator configuration for a method.
|
|
1423
|
+
*/
|
|
1424
|
+
export interface Schema$MethodSettings {
|
|
1425
|
+
/**
|
|
1426
|
+
* 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: seconds: 60 # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: seconds: 360 # 6 minutes total_poll_timeout: seconds: 54000 # 90 minutes
|
|
1427
|
+
*/
|
|
1428
|
+
longRunning?: Schema$LongRunning;
|
|
1429
|
+
/**
|
|
1430
|
+
* The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options.
|
|
1431
|
+
*/
|
|
1432
|
+
selector?: string | null;
|
|
1433
|
+
}
|
|
1149
1434
|
/**
|
|
1150
1435
|
* Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.
|
|
1151
1436
|
*/
|
|
@@ -1226,7 +1511,7 @@ export namespace serviceusage_v1 {
|
|
|
1226
1511
|
selector?: string | null;
|
|
1227
1512
|
}
|
|
1228
1513
|
/**
|
|
1229
|
-
* Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = "/v1/{resource=**\}:getAcl"; \} \} package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = "/v2/{resource=**\}"; \} \} Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after
|
|
1514
|
+
* Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = "/v1/{resource=**\}:getAcl"; \} \} package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = "/v2/{resource=**\}"; \} \} Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inherting documentation and annotations as follows: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = "/v2/{resource=**\}:getAcl"; \} ... \} Note how the version in the path pattern changed from `v1` to `v2`. If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls This implies the following inherited HTTP annotation: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = "/v2/acls/{resource=**\}:getAcl"; \} ... \}
|
|
1230
1515
|
*/
|
|
1231
1516
|
export interface Schema$Mixin {
|
|
1232
1517
|
/**
|
|
@@ -1293,6 +1578,15 @@ export namespace serviceusage_v1 {
|
|
|
1293
1578
|
*/
|
|
1294
1579
|
monitoredResource?: string | null;
|
|
1295
1580
|
}
|
|
1581
|
+
/**
|
|
1582
|
+
* Settings for Node client libraries.
|
|
1583
|
+
*/
|
|
1584
|
+
export interface Schema$NodeSettings {
|
|
1585
|
+
/**
|
|
1586
|
+
* Some settings.
|
|
1587
|
+
*/
|
|
1588
|
+
common?: Schema$CommonLanguageSettings;
|
|
1589
|
+
}
|
|
1296
1590
|
/**
|
|
1297
1591
|
* OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for "Read-only access to Google Calendar" and "Access to Cloud Platform". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.
|
|
1298
1592
|
*/
|
|
@@ -1323,7 +1617,7 @@ export namespace serviceusage_v1 {
|
|
|
1323
1617
|
*/
|
|
1324
1618
|
name?: string | null;
|
|
1325
1619
|
/**
|
|
1326
|
-
* The normal response of the operation
|
|
1620
|
+
* 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`.
|
|
1327
1621
|
*/
|
|
1328
1622
|
response?: {[key: string]: any} | null;
|
|
1329
1623
|
}
|
|
@@ -1367,15 +1661,78 @@ export namespace serviceusage_v1 {
|
|
|
1367
1661
|
subpages?: Schema$Page[];
|
|
1368
1662
|
}
|
|
1369
1663
|
/**
|
|
1370
|
-
*
|
|
1664
|
+
* Settings for Php client libraries.
|
|
1665
|
+
*/
|
|
1666
|
+
export interface Schema$PhpSettings {
|
|
1667
|
+
/**
|
|
1668
|
+
* Some settings.
|
|
1669
|
+
*/
|
|
1670
|
+
common?: Schema$CommonLanguageSettings;
|
|
1671
|
+
}
|
|
1672
|
+
/**
|
|
1673
|
+
* This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.
|
|
1674
|
+
*/
|
|
1675
|
+
export interface Schema$Publishing {
|
|
1676
|
+
/**
|
|
1677
|
+
* Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: "speech".
|
|
1678
|
+
*/
|
|
1679
|
+
apiShortName?: string | null;
|
|
1680
|
+
/**
|
|
1681
|
+
* GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.
|
|
1682
|
+
*/
|
|
1683
|
+
codeownerGithubTeams?: string[] | null;
|
|
1684
|
+
/**
|
|
1685
|
+
* A prefix used in sample code when demarking regions to be included in documentation.
|
|
1686
|
+
*/
|
|
1687
|
+
docTagPrefix?: string | null;
|
|
1688
|
+
/**
|
|
1689
|
+
* Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview
|
|
1690
|
+
*/
|
|
1691
|
+
documentationUri?: string | null;
|
|
1692
|
+
/**
|
|
1693
|
+
* GitHub label to apply to issues and pull requests opened for this API.
|
|
1694
|
+
*/
|
|
1695
|
+
githubLabel?: string | null;
|
|
1696
|
+
/**
|
|
1697
|
+
* Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.
|
|
1698
|
+
*/
|
|
1699
|
+
librarySettings?: Schema$ClientLibrarySettings[];
|
|
1700
|
+
/**
|
|
1701
|
+
* A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.
|
|
1702
|
+
*/
|
|
1703
|
+
methodSettings?: Schema$MethodSettings[];
|
|
1704
|
+
/**
|
|
1705
|
+
* Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103
|
|
1706
|
+
*/
|
|
1707
|
+
newIssueUri?: string | null;
|
|
1708
|
+
/**
|
|
1709
|
+
* For whom the client library is being published.
|
|
1710
|
+
*/
|
|
1711
|
+
organization?: string | null;
|
|
1712
|
+
/**
|
|
1713
|
+
* Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc
|
|
1714
|
+
*/
|
|
1715
|
+
protoReferenceDocumentationUri?: string | null;
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Settings for Python client libraries.
|
|
1719
|
+
*/
|
|
1720
|
+
export interface Schema$PythonSettings {
|
|
1721
|
+
/**
|
|
1722
|
+
* Some settings.
|
|
1723
|
+
*/
|
|
1724
|
+
common?: Schema$CommonLanguageSettings;
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: "1/min/{project\}" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: "*" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64
|
|
1371
1728
|
*/
|
|
1372
1729
|
export interface Schema$Quota {
|
|
1373
1730
|
/**
|
|
1374
|
-
* List of
|
|
1731
|
+
* List of QuotaLimit definitions for the service.
|
|
1375
1732
|
*/
|
|
1376
1733
|
limits?: Schema$QuotaLimit[];
|
|
1377
1734
|
/**
|
|
1378
|
-
* List of
|
|
1735
|
+
* List of MetricRule definitions, each one mapping a selected method to one or more metrics.
|
|
1379
1736
|
*/
|
|
1380
1737
|
metricRules?: Schema$MetricRule[];
|
|
1381
1738
|
}
|
|
@@ -1453,6 +1810,32 @@ export namespace serviceusage_v1 {
|
|
|
1453
1810
|
*/
|
|
1454
1811
|
unit?: string | null;
|
|
1455
1812
|
}
|
|
1813
|
+
/**
|
|
1814
|
+
* Metadata for the `RemoveEnableRules` method.
|
|
1815
|
+
*/
|
|
1816
|
+
export interface Schema$RemoveEnableRulesMetadata {}
|
|
1817
|
+
/**
|
|
1818
|
+
* The response message of "RemoveEnableRules" method.
|
|
1819
|
+
*/
|
|
1820
|
+
export interface Schema$RemoveEnableRulesResponse {
|
|
1821
|
+
/**
|
|
1822
|
+
* The parent consumer policy. It can be `projects/12345/consumerPolicies/default`, or `folders/12345/consumerPolicies/default`, or `organizations/12345/consumerPolicies/default`.
|
|
1823
|
+
*/
|
|
1824
|
+
parent?: string | null;
|
|
1825
|
+
/**
|
|
1826
|
+
* The values removed from the parent consumer policy.
|
|
1827
|
+
*/
|
|
1828
|
+
removedValues?: string[] | null;
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Settings for Ruby client libraries.
|
|
1832
|
+
*/
|
|
1833
|
+
export interface Schema$RubySettings {
|
|
1834
|
+
/**
|
|
1835
|
+
* Some settings.
|
|
1836
|
+
*/
|
|
1837
|
+
common?: Schema$CommonLanguageSettings;
|
|
1838
|
+
}
|
|
1456
1839
|
/**
|
|
1457
1840
|
* Service identity for a service. This is the identity that service producer should use to access consumer resources.
|
|
1458
1841
|
*/
|
|
@@ -1544,6 +1927,10 @@ export namespace serviceusage_v1 {
|
|
|
1544
1927
|
* A protocol buffer message type.
|
|
1545
1928
|
*/
|
|
1546
1929
|
export interface Schema$Type {
|
|
1930
|
+
/**
|
|
1931
|
+
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
|
1932
|
+
*/
|
|
1933
|
+
edition?: string | null;
|
|
1547
1934
|
/**
|
|
1548
1935
|
* The list of fields.
|
|
1549
1936
|
*/
|
|
@@ -1573,6 +1960,10 @@ export namespace serviceusage_v1 {
|
|
|
1573
1960
|
* Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by UpdateAdminQuotaPolicy.
|
|
1574
1961
|
*/
|
|
1575
1962
|
export interface Schema$UpdateAdminQuotaPolicyMetadata {}
|
|
1963
|
+
/**
|
|
1964
|
+
* Metadata for the `UpdateConsumerPolicy` method.
|
|
1965
|
+
*/
|
|
1966
|
+
export interface Schema$UpdateConsumerPolicyMetadata {}
|
|
1576
1967
|
/**
|
|
1577
1968
|
* Configuration controlling usage of a service.
|
|
1578
1969
|
*/
|
|
@@ -1616,55 +2007,6 @@ export namespace serviceusage_v1 {
|
|
|
1616
2007
|
|
|
1617
2008
|
/**
|
|
1618
2009
|
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
|
|
1619
|
-
* @example
|
|
1620
|
-
* ```js
|
|
1621
|
-
* // Before running the sample:
|
|
1622
|
-
* // - Enable the API at:
|
|
1623
|
-
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
1624
|
-
* // - Login into gcloud by running:
|
|
1625
|
-
* // `$ gcloud auth application-default login`
|
|
1626
|
-
* // - Install the npm module by running:
|
|
1627
|
-
* // `$ npm install googleapis`
|
|
1628
|
-
*
|
|
1629
|
-
* const {google} = require('googleapis');
|
|
1630
|
-
* const serviceusage = google.serviceusage('v1');
|
|
1631
|
-
*
|
|
1632
|
-
* async function main() {
|
|
1633
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1634
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1635
|
-
* scopes: [
|
|
1636
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1637
|
-
* 'https://www.googleapis.com/auth/service.management',
|
|
1638
|
-
* ],
|
|
1639
|
-
* });
|
|
1640
|
-
*
|
|
1641
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1642
|
-
* const authClient = await auth.getClient();
|
|
1643
|
-
* google.options({auth: authClient});
|
|
1644
|
-
*
|
|
1645
|
-
* // Do the magic
|
|
1646
|
-
* const res = await serviceusage.operations.cancel({
|
|
1647
|
-
* // The name of the operation resource to be cancelled.
|
|
1648
|
-
* name: 'operations/.*',
|
|
1649
|
-
*
|
|
1650
|
-
* // Request body metadata
|
|
1651
|
-
* requestBody: {
|
|
1652
|
-
* // request body parameters
|
|
1653
|
-
* // {}
|
|
1654
|
-
* },
|
|
1655
|
-
* });
|
|
1656
|
-
* console.log(res.data);
|
|
1657
|
-
*
|
|
1658
|
-
* // Example response
|
|
1659
|
-
* // {}
|
|
1660
|
-
* }
|
|
1661
|
-
*
|
|
1662
|
-
* main().catch(e => {
|
|
1663
|
-
* console.error(e);
|
|
1664
|
-
* throw e;
|
|
1665
|
-
* });
|
|
1666
|
-
*
|
|
1667
|
-
* ```
|
|
1668
2010
|
*
|
|
1669
2011
|
* @param params - Parameters for request
|
|
1670
2012
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1749,49 +2091,6 @@ export namespace serviceusage_v1 {
|
|
|
1749
2091
|
|
|
1750
2092
|
/**
|
|
1751
2093
|
* Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
1752
|
-
* @example
|
|
1753
|
-
* ```js
|
|
1754
|
-
* // Before running the sample:
|
|
1755
|
-
* // - Enable the API at:
|
|
1756
|
-
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
1757
|
-
* // - Login into gcloud by running:
|
|
1758
|
-
* // `$ gcloud auth application-default login`
|
|
1759
|
-
* // - Install the npm module by running:
|
|
1760
|
-
* // `$ npm install googleapis`
|
|
1761
|
-
*
|
|
1762
|
-
* const {google} = require('googleapis');
|
|
1763
|
-
* const serviceusage = google.serviceusage('v1');
|
|
1764
|
-
*
|
|
1765
|
-
* async function main() {
|
|
1766
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1767
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1768
|
-
* scopes: [
|
|
1769
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1770
|
-
* 'https://www.googleapis.com/auth/service.management',
|
|
1771
|
-
* ],
|
|
1772
|
-
* });
|
|
1773
|
-
*
|
|
1774
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1775
|
-
* const authClient = await auth.getClient();
|
|
1776
|
-
* google.options({auth: authClient});
|
|
1777
|
-
*
|
|
1778
|
-
* // Do the magic
|
|
1779
|
-
* const res = await serviceusage.operations.delete({
|
|
1780
|
-
* // The name of the operation resource to be deleted.
|
|
1781
|
-
* name: 'operations/.*',
|
|
1782
|
-
* });
|
|
1783
|
-
* console.log(res.data);
|
|
1784
|
-
*
|
|
1785
|
-
* // Example response
|
|
1786
|
-
* // {}
|
|
1787
|
-
* }
|
|
1788
|
-
*
|
|
1789
|
-
* main().catch(e => {
|
|
1790
|
-
* console.error(e);
|
|
1791
|
-
* throw e;
|
|
1792
|
-
* });
|
|
1793
|
-
*
|
|
1794
|
-
* ```
|
|
1795
2094
|
*
|
|
1796
2095
|
* @param params - Parameters for request
|
|
1797
2096
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1876,55 +2175,6 @@ export namespace serviceusage_v1 {
|
|
|
1876
2175
|
|
|
1877
2176
|
/**
|
|
1878
2177
|
* 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.
|
|
1879
|
-
* @example
|
|
1880
|
-
* ```js
|
|
1881
|
-
* // Before running the sample:
|
|
1882
|
-
* // - Enable the API at:
|
|
1883
|
-
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
1884
|
-
* // - Login into gcloud by running:
|
|
1885
|
-
* // `$ gcloud auth application-default login`
|
|
1886
|
-
* // - Install the npm module by running:
|
|
1887
|
-
* // `$ npm install googleapis`
|
|
1888
|
-
*
|
|
1889
|
-
* const {google} = require('googleapis');
|
|
1890
|
-
* const serviceusage = google.serviceusage('v1');
|
|
1891
|
-
*
|
|
1892
|
-
* async function main() {
|
|
1893
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1894
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1895
|
-
* scopes: [
|
|
1896
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1897
|
-
* 'https://www.googleapis.com/auth/service.management',
|
|
1898
|
-
* ],
|
|
1899
|
-
* });
|
|
1900
|
-
*
|
|
1901
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1902
|
-
* const authClient = await auth.getClient();
|
|
1903
|
-
* google.options({auth: authClient});
|
|
1904
|
-
*
|
|
1905
|
-
* // Do the magic
|
|
1906
|
-
* const res = await serviceusage.operations.get({
|
|
1907
|
-
* // The name of the operation resource.
|
|
1908
|
-
* name: 'operations/my-operation',
|
|
1909
|
-
* });
|
|
1910
|
-
* console.log(res.data);
|
|
1911
|
-
*
|
|
1912
|
-
* // Example response
|
|
1913
|
-
* // {
|
|
1914
|
-
* // "done": false,
|
|
1915
|
-
* // "error": {},
|
|
1916
|
-
* // "metadata": {},
|
|
1917
|
-
* // "name": "my_name",
|
|
1918
|
-
* // "response": {}
|
|
1919
|
-
* // }
|
|
1920
|
-
* }
|
|
1921
|
-
*
|
|
1922
|
-
* main().catch(e => {
|
|
1923
|
-
* console.error(e);
|
|
1924
|
-
* throw e;
|
|
1925
|
-
* });
|
|
1926
|
-
*
|
|
1927
|
-
* ```
|
|
1928
2178
|
*
|
|
1929
2179
|
* @param params - Parameters for request
|
|
1930
2180
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2007,59 +2257,7 @@ export namespace serviceusage_v1 {
|
|
|
2007
2257
|
}
|
|
2008
2258
|
|
|
2009
2259
|
/**
|
|
2010
|
-
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2011
|
-
* @example
|
|
2012
|
-
* ```js
|
|
2013
|
-
* // Before running the sample:
|
|
2014
|
-
* // - Enable the API at:
|
|
2015
|
-
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
2016
|
-
* // - Login into gcloud by running:
|
|
2017
|
-
* // `$ gcloud auth application-default login`
|
|
2018
|
-
* // - Install the npm module by running:
|
|
2019
|
-
* // `$ npm install googleapis`
|
|
2020
|
-
*
|
|
2021
|
-
* const {google} = require('googleapis');
|
|
2022
|
-
* const serviceusage = google.serviceusage('v1');
|
|
2023
|
-
*
|
|
2024
|
-
* async function main() {
|
|
2025
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2026
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2027
|
-
* scopes: [
|
|
2028
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2029
|
-
* 'https://www.googleapis.com/auth/service.management',
|
|
2030
|
-
* ],
|
|
2031
|
-
* });
|
|
2032
|
-
*
|
|
2033
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2034
|
-
* const authClient = await auth.getClient();
|
|
2035
|
-
* google.options({auth: authClient});
|
|
2036
|
-
*
|
|
2037
|
-
* // Do the magic
|
|
2038
|
-
* const res = await serviceusage.operations.list({
|
|
2039
|
-
* // The standard list filter.
|
|
2040
|
-
* filter: 'placeholder-value',
|
|
2041
|
-
* // The name of the operation's parent resource.
|
|
2042
|
-
* name: 'placeholder-value',
|
|
2043
|
-
* // The standard list page size.
|
|
2044
|
-
* pageSize: 'placeholder-value',
|
|
2045
|
-
* // The standard list page token.
|
|
2046
|
-
* pageToken: 'placeholder-value',
|
|
2047
|
-
* });
|
|
2048
|
-
* console.log(res.data);
|
|
2049
|
-
*
|
|
2050
|
-
* // Example response
|
|
2051
|
-
* // {
|
|
2052
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
2053
|
-
* // "operations": []
|
|
2054
|
-
* // }
|
|
2055
|
-
* }
|
|
2056
|
-
*
|
|
2057
|
-
* main().catch(e => {
|
|
2058
|
-
* console.error(e);
|
|
2059
|
-
* throw e;
|
|
2060
|
-
* });
|
|
2061
|
-
*
|
|
2062
|
-
* ```
|
|
2260
|
+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
2063
2261
|
*
|
|
2064
2262
|
* @param params - Parameters for request
|
|
2065
2263
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2199,63 +2397,6 @@ export namespace serviceusage_v1 {
|
|
|
2199
2397
|
|
|
2200
2398
|
/**
|
|
2201
2399
|
* Enable multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. To enable a single service, use the `EnableService` method instead.
|
|
2202
|
-
* @example
|
|
2203
|
-
* ```js
|
|
2204
|
-
* // Before running the sample:
|
|
2205
|
-
* // - Enable the API at:
|
|
2206
|
-
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
2207
|
-
* // - Login into gcloud by running:
|
|
2208
|
-
* // `$ gcloud auth application-default login`
|
|
2209
|
-
* // - Install the npm module by running:
|
|
2210
|
-
* // `$ npm install googleapis`
|
|
2211
|
-
*
|
|
2212
|
-
* const {google} = require('googleapis');
|
|
2213
|
-
* const serviceusage = google.serviceusage('v1');
|
|
2214
|
-
*
|
|
2215
|
-
* async function main() {
|
|
2216
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2217
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2218
|
-
* scopes: [
|
|
2219
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2220
|
-
* 'https://www.googleapis.com/auth/service.management',
|
|
2221
|
-
* ],
|
|
2222
|
-
* });
|
|
2223
|
-
*
|
|
2224
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2225
|
-
* const authClient = await auth.getClient();
|
|
2226
|
-
* google.options({auth: authClient});
|
|
2227
|
-
*
|
|
2228
|
-
* // Do the magic
|
|
2229
|
-
* const res = await serviceusage.services.batchEnable({
|
|
2230
|
-
* // Parent to enable services on. An example name would be: `projects/123` where `123` is the project number. The `BatchEnableServices` method currently only supports projects.
|
|
2231
|
-
* parent: '[^/]+/[^/]+',
|
|
2232
|
-
*
|
|
2233
|
-
* // Request body metadata
|
|
2234
|
-
* requestBody: {
|
|
2235
|
-
* // request body parameters
|
|
2236
|
-
* // {
|
|
2237
|
-
* // "serviceIds": []
|
|
2238
|
-
* // }
|
|
2239
|
-
* },
|
|
2240
|
-
* });
|
|
2241
|
-
* console.log(res.data);
|
|
2242
|
-
*
|
|
2243
|
-
* // Example response
|
|
2244
|
-
* // {
|
|
2245
|
-
* // "done": false,
|
|
2246
|
-
* // "error": {},
|
|
2247
|
-
* // "metadata": {},
|
|
2248
|
-
* // "name": "my_name",
|
|
2249
|
-
* // "response": {}
|
|
2250
|
-
* // }
|
|
2251
|
-
* }
|
|
2252
|
-
*
|
|
2253
|
-
* main().catch(e => {
|
|
2254
|
-
* console.error(e);
|
|
2255
|
-
* throw e;
|
|
2256
|
-
* });
|
|
2257
|
-
*
|
|
2258
|
-
* ```
|
|
2259
2400
|
*
|
|
2260
2401
|
* @param params - Parameters for request
|
|
2261
2402
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2343,53 +2484,6 @@ export namespace serviceusage_v1 {
|
|
|
2343
2484
|
|
|
2344
2485
|
/**
|
|
2345
2486
|
* Returns the service configurations and enabled states for a given list of services.
|
|
2346
|
-
* @example
|
|
2347
|
-
* ```js
|
|
2348
|
-
* // Before running the sample:
|
|
2349
|
-
* // - Enable the API at:
|
|
2350
|
-
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
2351
|
-
* // - Login into gcloud by running:
|
|
2352
|
-
* // `$ gcloud auth application-default login`
|
|
2353
|
-
* // - Install the npm module by running:
|
|
2354
|
-
* // `$ npm install googleapis`
|
|
2355
|
-
*
|
|
2356
|
-
* const {google} = require('googleapis');
|
|
2357
|
-
* const serviceusage = google.serviceusage('v1');
|
|
2358
|
-
*
|
|
2359
|
-
* async function main() {
|
|
2360
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2361
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2362
|
-
* scopes: [
|
|
2363
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2364
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
2365
|
-
* ],
|
|
2366
|
-
* });
|
|
2367
|
-
*
|
|
2368
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2369
|
-
* const authClient = await auth.getClient();
|
|
2370
|
-
* google.options({auth: authClient});
|
|
2371
|
-
*
|
|
2372
|
-
* // Do the magic
|
|
2373
|
-
* const res = await serviceusage.services.batchGet({
|
|
2374
|
-
* // Names of the services to retrieve. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number. A single request can get a maximum of 30 services at a time.
|
|
2375
|
-
* names: 'placeholder-value',
|
|
2376
|
-
* // Parent to retrieve services from. If this is set, the parent of all of the services specified in `names` must match this field. An example name would be: `projects/123` where `123` is the project number. The `BatchGetServices` method currently only supports projects.
|
|
2377
|
-
* parent: '[^/]+/[^/]+',
|
|
2378
|
-
* });
|
|
2379
|
-
* console.log(res.data);
|
|
2380
|
-
*
|
|
2381
|
-
* // Example response
|
|
2382
|
-
* // {
|
|
2383
|
-
* // "services": []
|
|
2384
|
-
* // }
|
|
2385
|
-
* }
|
|
2386
|
-
*
|
|
2387
|
-
* main().catch(e => {
|
|
2388
|
-
* console.error(e);
|
|
2389
|
-
* throw e;
|
|
2390
|
-
* });
|
|
2391
|
-
*
|
|
2392
|
-
* ```
|
|
2393
2487
|
*
|
|
2394
2488
|
* @param params - Parameters for request
|
|
2395
2489
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2484,64 +2578,6 @@ export namespace serviceusage_v1 {
|
|
|
2484
2578
|
|
|
2485
2579
|
/**
|
|
2486
2580
|
* Disable 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.
|
|
2487
|
-
* @example
|
|
2488
|
-
* ```js
|
|
2489
|
-
* // Before running the sample:
|
|
2490
|
-
* // - Enable the API at:
|
|
2491
|
-
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
2492
|
-
* // - Login into gcloud by running:
|
|
2493
|
-
* // `$ gcloud auth application-default login`
|
|
2494
|
-
* // - Install the npm module by running:
|
|
2495
|
-
* // `$ npm install googleapis`
|
|
2496
|
-
*
|
|
2497
|
-
* const {google} = require('googleapis');
|
|
2498
|
-
* const serviceusage = google.serviceusage('v1');
|
|
2499
|
-
*
|
|
2500
|
-
* async function main() {
|
|
2501
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2502
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2503
|
-
* scopes: [
|
|
2504
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2505
|
-
* 'https://www.googleapis.com/auth/service.management',
|
|
2506
|
-
* ],
|
|
2507
|
-
* });
|
|
2508
|
-
*
|
|
2509
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2510
|
-
* const authClient = await auth.getClient();
|
|
2511
|
-
* google.options({auth: authClient});
|
|
2512
|
-
*
|
|
2513
|
-
* // Do the magic
|
|
2514
|
-
* const res = await serviceusage.services.disable({
|
|
2515
|
-
* // 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.
|
|
2516
|
-
* name: '[^/]+/[^/]+/services/my-service',
|
|
2517
|
-
*
|
|
2518
|
-
* // Request body metadata
|
|
2519
|
-
* requestBody: {
|
|
2520
|
-
* // request body parameters
|
|
2521
|
-
* // {
|
|
2522
|
-
* // "checkIfServiceHasUsage": "my_checkIfServiceHasUsage",
|
|
2523
|
-
* // "disableDependentServices": false
|
|
2524
|
-
* // }
|
|
2525
|
-
* },
|
|
2526
|
-
* });
|
|
2527
|
-
* console.log(res.data);
|
|
2528
|
-
*
|
|
2529
|
-
* // Example response
|
|
2530
|
-
* // {
|
|
2531
|
-
* // "done": false,
|
|
2532
|
-
* // "error": {},
|
|
2533
|
-
* // "metadata": {},
|
|
2534
|
-
* // "name": "my_name",
|
|
2535
|
-
* // "response": {}
|
|
2536
|
-
* // }
|
|
2537
|
-
* }
|
|
2538
|
-
*
|
|
2539
|
-
* main().catch(e => {
|
|
2540
|
-
* console.error(e);
|
|
2541
|
-
* throw e;
|
|
2542
|
-
* });
|
|
2543
|
-
*
|
|
2544
|
-
* ```
|
|
2545
2581
|
*
|
|
2546
2582
|
* @param params - Parameters for request
|
|
2547
2583
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2628,61 +2664,6 @@ export namespace serviceusage_v1 {
|
|
|
2628
2664
|
|
|
2629
2665
|
/**
|
|
2630
2666
|
* Enable a service so that it can be used with a project.
|
|
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
|
-
* // `$ gcloud auth application-default login`
|
|
2638
|
-
* // - Install the npm module by running:
|
|
2639
|
-
* // `$ npm install googleapis`
|
|
2640
|
-
*
|
|
2641
|
-
* const {google} = require('googleapis');
|
|
2642
|
-
* const serviceusage = google.serviceusage('v1');
|
|
2643
|
-
*
|
|
2644
|
-
* async function main() {
|
|
2645
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2646
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2647
|
-
* scopes: [
|
|
2648
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2649
|
-
* 'https://www.googleapis.com/auth/service.management',
|
|
2650
|
-
* ],
|
|
2651
|
-
* });
|
|
2652
|
-
*
|
|
2653
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2654
|
-
* const authClient = await auth.getClient();
|
|
2655
|
-
* google.options({auth: authClient});
|
|
2656
|
-
*
|
|
2657
|
-
* // Do the magic
|
|
2658
|
-
* const res = await serviceusage.services.enable({
|
|
2659
|
-
* // 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.
|
|
2660
|
-
* name: '[^/]+/[^/]+/services/my-service',
|
|
2661
|
-
*
|
|
2662
|
-
* // Request body metadata
|
|
2663
|
-
* requestBody: {
|
|
2664
|
-
* // request body parameters
|
|
2665
|
-
* // {}
|
|
2666
|
-
* },
|
|
2667
|
-
* });
|
|
2668
|
-
* console.log(res.data);
|
|
2669
|
-
*
|
|
2670
|
-
* // Example response
|
|
2671
|
-
* // {
|
|
2672
|
-
* // "done": false,
|
|
2673
|
-
* // "error": {},
|
|
2674
|
-
* // "metadata": {},
|
|
2675
|
-
* // "name": "my_name",
|
|
2676
|
-
* // "response": {}
|
|
2677
|
-
* // }
|
|
2678
|
-
* }
|
|
2679
|
-
*
|
|
2680
|
-
* main().catch(e => {
|
|
2681
|
-
* console.error(e);
|
|
2682
|
-
* throw e;
|
|
2683
|
-
* });
|
|
2684
|
-
*
|
|
2685
|
-
* ```
|
|
2686
2667
|
*
|
|
2687
2668
|
* @param params - Parameters for request
|
|
2688
2669
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2766,54 +2747,6 @@ export namespace serviceusage_v1 {
|
|
|
2766
2747
|
|
|
2767
2748
|
/**
|
|
2768
2749
|
* Returns the service configuration and enabled state for a given service.
|
|
2769
|
-
* @example
|
|
2770
|
-
* ```js
|
|
2771
|
-
* // Before running the sample:
|
|
2772
|
-
* // - Enable the API at:
|
|
2773
|
-
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
2774
|
-
* // - Login into gcloud by running:
|
|
2775
|
-
* // `$ gcloud auth application-default login`
|
|
2776
|
-
* // - Install the npm module by running:
|
|
2777
|
-
* // `$ npm install googleapis`
|
|
2778
|
-
*
|
|
2779
|
-
* const {google} = require('googleapis');
|
|
2780
|
-
* const serviceusage = google.serviceusage('v1');
|
|
2781
|
-
*
|
|
2782
|
-
* async function main() {
|
|
2783
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2784
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2785
|
-
* scopes: [
|
|
2786
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2787
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
2788
|
-
* ],
|
|
2789
|
-
* });
|
|
2790
|
-
*
|
|
2791
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2792
|
-
* const authClient = await auth.getClient();
|
|
2793
|
-
* google.options({auth: authClient});
|
|
2794
|
-
*
|
|
2795
|
-
* // Do the magic
|
|
2796
|
-
* const res = await serviceusage.services.get({
|
|
2797
|
-
* // 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.
|
|
2798
|
-
* name: '[^/]+/[^/]+/services/my-service',
|
|
2799
|
-
* });
|
|
2800
|
-
* console.log(res.data);
|
|
2801
|
-
*
|
|
2802
|
-
* // Example response
|
|
2803
|
-
* // {
|
|
2804
|
-
* // "config": {},
|
|
2805
|
-
* // "name": "my_name",
|
|
2806
|
-
* // "parent": "my_parent",
|
|
2807
|
-
* // "state": "my_state"
|
|
2808
|
-
* // }
|
|
2809
|
-
* }
|
|
2810
|
-
*
|
|
2811
|
-
* main().catch(e => {
|
|
2812
|
-
* console.error(e);
|
|
2813
|
-
* throw e;
|
|
2814
|
-
* });
|
|
2815
|
-
*
|
|
2816
|
-
* ```
|
|
2817
2750
|
*
|
|
2818
2751
|
* @param params - Parameters for request
|
|
2819
2752
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2906,58 +2839,6 @@ export namespace serviceusage_v1 {
|
|
|
2906
2839
|
|
|
2907
2840
|
/**
|
|
2908
2841
|
* List 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. WARNING: If you need to query enabled services frequently or across an organization, you should use [Cloud Asset Inventory API](https://cloud.google.com/asset-inventory/docs/apis), which provides higher throughput and richer filtering capability.
|
|
2909
|
-
* @example
|
|
2910
|
-
* ```js
|
|
2911
|
-
* // Before running the sample:
|
|
2912
|
-
* // - Enable the API at:
|
|
2913
|
-
* // https://console.developers.google.com/apis/api/serviceusage.googleapis.com
|
|
2914
|
-
* // - Login into gcloud by running:
|
|
2915
|
-
* // `$ gcloud auth application-default login`
|
|
2916
|
-
* // - Install the npm module by running:
|
|
2917
|
-
* // `$ npm install googleapis`
|
|
2918
|
-
*
|
|
2919
|
-
* const {google} = require('googleapis');
|
|
2920
|
-
* const serviceusage = google.serviceusage('v1');
|
|
2921
|
-
*
|
|
2922
|
-
* async function main() {
|
|
2923
|
-
* const auth = new google.auth.GoogleAuth({
|
|
2924
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2925
|
-
* scopes: [
|
|
2926
|
-
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
2927
|
-
* 'https://www.googleapis.com/auth/cloud-platform.read-only',
|
|
2928
|
-
* ],
|
|
2929
|
-
* });
|
|
2930
|
-
*
|
|
2931
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
2932
|
-
* const authClient = await auth.getClient();
|
|
2933
|
-
* google.options({auth: authClient});
|
|
2934
|
-
*
|
|
2935
|
-
* // Do the magic
|
|
2936
|
-
* const res = await serviceusage.services.list({
|
|
2937
|
-
* // Only list services that conform to the given filter. The allowed filter strings are `state:ENABLED` and `state:DISABLED`.
|
|
2938
|
-
* filter: 'placeholder-value',
|
|
2939
|
-
* // Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50.
|
|
2940
|
-
* pageSize: 'placeholder-value',
|
|
2941
|
-
* // Token identifying which result to start with, which is returned by a previous list call.
|
|
2942
|
-
* pageToken: 'placeholder-value',
|
|
2943
|
-
* // Parent to search for services on. An example name would be: `projects/123` where `123` is the project number.
|
|
2944
|
-
* parent: '[^/]+/[^/]+',
|
|
2945
|
-
* });
|
|
2946
|
-
* console.log(res.data);
|
|
2947
|
-
*
|
|
2948
|
-
* // Example response
|
|
2949
|
-
* // {
|
|
2950
|
-
* // "nextPageToken": "my_nextPageToken",
|
|
2951
|
-
* // "services": []
|
|
2952
|
-
* // }
|
|
2953
|
-
* }
|
|
2954
|
-
*
|
|
2955
|
-
* main().catch(e => {
|
|
2956
|
-
* console.error(e);
|
|
2957
|
-
* throw e;
|
|
2958
|
-
* });
|
|
2959
|
-
*
|
|
2960
|
-
* ```
|
|
2961
2842
|
*
|
|
2962
2843
|
* @param params - Parameters for request
|
|
2963
2844
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|