[Service Usage API](https://cloud.google.com/service-usage/docs/overview) v1beta1
Package
@google-cloud/service-usageConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of ServiceUsageClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
operationsClient
operationsClient: gax.OperationsClient;
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
serviceUsageStub
serviceUsageStub?: Promise<{
[name: string]: Function;
}>;
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
batchEnableServices(request, options)
batchEnableServices(request?: protos.google.api.serviceusage.v1beta1.IBatchEnableServicesRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
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
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IBatchEnableServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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.
*/
// const parent = 'abc123'
/**
* The identifiers of the services to enable on the project.
* A valid identifier would be:
* serviceusage.googleapis.com
* Enabling services requires that each service is public or is shared with
* the user enabling the service.
* Two or more services must be specified. To enable a single service,
* use the `EnableService` method instead.
* A single request can enable a maximum of 20 services at a time. If more
* than 20 services are specified, the request will fail, and no state changes
* will occur.
*/
// const serviceIds = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callBatchEnableServices() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.batchEnableServices(request);
const [response] = await operation.promise();
console.log(response);
}
callBatchEnableServices();
batchEnableServices(request, options, callback)
batchEnableServices(request: protos.google.api.serviceusage.v1beta1.IBatchEnableServicesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IBatchEnableServicesRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
batchEnableServices(request, callback)
batchEnableServices(request: protos.google.api.serviceusage.v1beta1.IBatchEnableServicesRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IBatchEnableServicesRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
checkBatchEnableServicesProgress(name)
checkBatchEnableServicesProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by batchEnableServices()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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.
*/
// const parent = 'abc123'
/**
* The identifiers of the services to enable on the project.
* A valid identifier would be:
* serviceusage.googleapis.com
* Enabling services requires that each service is public or is shared with
* the user enabling the service.
* Two or more services must be specified. To enable a single service,
* use the `EnableService` method instead.
* A single request can enable a maximum of 20 services at a time. If more
* than 20 services are specified, the request will fail, and no state changes
* will occur.
*/
// const serviceIds = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callBatchEnableServices() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.batchEnableServices(request);
const [response] = await operation.promise();
console.log(response);
}
callBatchEnableServices();
checkCreateAdminOverrideProgress(name)
checkCreateAdminOverrideProgress(name: string): Promise<LROperation<protos.google.api.serviceusage.v1beta1.QuotaOverride, protos.google.api.serviceusage.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by createAdminOverride()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.api.serviceusage.v1beta1.QuotaOverride, protos.google.api.serviceusage.v1beta1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const parent = 'abc123'
/**
* The admin override to create.
*/
// const override = {}
/**
* 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.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callCreateAdminOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.createAdminOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateAdminOverride();
checkCreateConsumerOverrideProgress(name)
checkCreateConsumerOverrideProgress(name: string): Promise<LROperation<protos.google.api.serviceusage.v1beta1.QuotaOverride, protos.google.api.serviceusage.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by createConsumerOverride()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.api.serviceusage.v1beta1.QuotaOverride, protos.google.api.serviceusage.v1beta1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const parent = 'abc123'
/**
* The override to create.
*/
// const override = {}
/**
* 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.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callCreateConsumerOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.createConsumerOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateConsumerOverride();
checkDeleteAdminOverrideProgress(name)
checkDeleteAdminOverrideProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by deleteAdminOverride()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const name = 'abc123'
/**
* 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.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callDeleteAdminOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.deleteAdminOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteAdminOverride();
checkDeleteConsumerOverrideProgress(name)
checkDeleteConsumerOverrideProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by deleteConsumerOverride()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const name = 'abc123'
/**
* 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.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callDeleteConsumerOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.deleteConsumerOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteConsumerOverride();
checkDisableServiceProgress(name)
checkDisableServiceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by disableService()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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).
*/
// const name = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callDisableService() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.disableService(request);
const [response] = await operation.promise();
console.log(response);
}
callDisableService();
checkEnableServiceProgress(name)
checkEnableServiceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by enableService()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.api.serviceusage.v1beta1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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).
*/
// const name = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callEnableService() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.enableService(request);
const [response] = await operation.promise();
console.log(response);
}
callEnableService();
checkGenerateServiceIdentityProgress(name)
checkGenerateServiceIdentityProgress(name: string): Promise<LROperation<protos.google.api.serviceusage.v1beta1.ServiceIdentity, protos.google.protobuf.Empty>>;
Check the status of the long running operation returned by generateServiceIdentity()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.api.serviceusage.v1beta1.ServiceIdentity, protos.google.protobuf.Empty>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Name of the consumer and service to generate an identity for.
* The `GenerateServiceIdentity` methods currently only support projects.
* An example name would be:
* `projects/123/services/example.googleapis.com` where `123` is the
* project number.
*/
// const parent = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callGenerateServiceIdentity() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.generateServiceIdentity(request);
const [response] = await operation.promise();
console.log(response);
}
callGenerateServiceIdentity();
checkImportAdminOverridesProgress(name)
checkImportAdminOverridesProgress(name: string): Promise<LROperation<protos.google.api.serviceusage.v1beta1.ImportAdminOverridesResponse, protos.google.api.serviceusage.v1beta1.ImportAdminOverridesMetadata>>;
Check the status of the long running operation returned by importAdminOverrides()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.api.serviceusage.v1beta1.ImportAdminOverridesResponse, protos.google.api.serviceusage.v1beta1.ImportAdminOverridesMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The resource name of the consumer.
* An example name would be:
* `projects/123/services/compute.googleapis.com`
*/
// const parent = 'abc123'
/**
* The import data is specified in the request message itself
*/
// const inlineSource = {}
/**
* Whether to force the creation of the quota overrides.
* Setting the force parameter to 'true' ignores all quota safety checks that
* would fail the request. QuotaSafetyCheck lists all such validations.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callImportAdminOverrides() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.importAdminOverrides(request);
const [response] = await operation.promise();
console.log(response);
}
callImportAdminOverrides();
checkImportConsumerOverridesProgress(name)
checkImportConsumerOverridesProgress(name: string): Promise<LROperation<protos.google.api.serviceusage.v1beta1.ImportConsumerOverridesResponse, protos.google.api.serviceusage.v1beta1.ImportConsumerOverridesMetadata>>;
Check the status of the long running operation returned by importConsumerOverrides()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.api.serviceusage.v1beta1.ImportConsumerOverridesResponse, protos.google.api.serviceusage.v1beta1.ImportConsumerOverridesMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The resource name of the consumer.
* An example name would be:
* `projects/123/services/compute.googleapis.com`
*/
// const parent = 'abc123'
/**
* The import data is specified in the request message itself
*/
// const inlineSource = {}
/**
* Whether to force the creation of the quota overrides.
* Setting the force parameter to 'true' ignores all quota safety checks that
* would fail the request. QuotaSafetyCheck lists all such validations.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callImportConsumerOverrides() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.importConsumerOverrides(request);
const [response] = await operation.promise();
console.log(response);
}
callImportConsumerOverrides();
checkUpdateAdminOverrideProgress(name)
checkUpdateAdminOverrideProgress(name: string): Promise<LROperation<protos.google.api.serviceusage.v1beta1.QuotaOverride, protos.google.api.serviceusage.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by updateAdminOverride()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.api.serviceusage.v1beta1.QuotaOverride, protos.google.api.serviceusage.v1beta1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const name = 'abc123'
/**
* The new override.
* Only the override_value is updated; all other fields are ignored.
*/
// const override = {}
/**
* 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.
*/
// const force = true
/**
* Update only the specified fields of the override.
* If unset, all fields will be updated.
*/
// const updateMask = {}
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callUpdateAdminOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.updateAdminOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateAdminOverride();
checkUpdateConsumerOverrideProgress(name)
checkUpdateConsumerOverrideProgress(name: string): Promise<LROperation<protos.google.api.serviceusage.v1beta1.QuotaOverride, protos.google.api.serviceusage.v1beta1.OperationMetadata>>;
Check the status of the long running operation returned by updateConsumerOverride()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.api.serviceusage.v1beta1.QuotaOverride, protos.google.api.serviceusage.v1beta1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const name = 'abc123'
/**
* The new override.
* Only the override_value is updated; all other fields are ignored.
*/
// const override = {}
/**
* 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.
*/
// const force = true
/**
* Update only the specified fields of the override.
* If unset, all fields will be updated.
*/
// const updateMask = {}
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callUpdateConsumerOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.updateConsumerOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateConsumerOverride();
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns | |
---|---|
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
createAdminOverride(request, options)
createAdminOverride(request?: protos.google.api.serviceusage.v1beta1.ICreateAdminOverrideRequest, options?: CallOptions): Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
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.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.ICreateAdminOverrideRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const parent = 'abc123'
/**
* The admin override to create.
*/
// const override = {}
/**
* 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.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callCreateAdminOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.createAdminOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateAdminOverride();
createAdminOverride(request, options, callback)
createAdminOverride(request: protos.google.api.serviceusage.v1beta1.ICreateAdminOverrideRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.ICreateAdminOverrideRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createAdminOverride(request, callback)
createAdminOverride(request: protos.google.api.serviceusage.v1beta1.ICreateAdminOverrideRequest, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.ICreateAdminOverrideRequest
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createConsumerOverride(request, options)
createConsumerOverride(request?: protos.google.api.serviceusage.v1beta1.ICreateConsumerOverrideRequest, options?: CallOptions): Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
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.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.ICreateConsumerOverrideRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const parent = 'abc123'
/**
* The override to create.
*/
// const override = {}
/**
* 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.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callCreateConsumerOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.createConsumerOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateConsumerOverride();
createConsumerOverride(request, options, callback)
createConsumerOverride(request: protos.google.api.serviceusage.v1beta1.ICreateConsumerOverrideRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.ICreateConsumerOverrideRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createConsumerOverride(request, callback)
createConsumerOverride(request: protos.google.api.serviceusage.v1beta1.ICreateConsumerOverrideRequest, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.ICreateConsumerOverrideRequest
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteAdminOverride(request, options)
deleteAdminOverride(request?: protos.google.api.serviceusage.v1beta1.IDeleteAdminOverrideRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes an admin override.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IDeleteAdminOverrideRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const name = 'abc123'
/**
* 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.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callDeleteAdminOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.deleteAdminOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteAdminOverride();
deleteAdminOverride(request, options, callback)
deleteAdminOverride(request: protos.google.api.serviceusage.v1beta1.IDeleteAdminOverrideRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IDeleteAdminOverrideRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteAdminOverride(request, callback)
deleteAdminOverride(request: protos.google.api.serviceusage.v1beta1.IDeleteAdminOverrideRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IDeleteAdminOverrideRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteConsumerOverride(request, options)
deleteConsumerOverride(request?: protos.google.api.serviceusage.v1beta1.IDeleteConsumerOverrideRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a consumer override.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IDeleteConsumerOverrideRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const name = 'abc123'
/**
* 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.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callDeleteConsumerOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.deleteConsumerOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteConsumerOverride();
deleteConsumerOverride(request, options, callback)
deleteConsumerOverride(request: protos.google.api.serviceusage.v1beta1.IDeleteConsumerOverrideRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IDeleteConsumerOverrideRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteConsumerOverride(request, callback)
deleteConsumerOverride(request: protos.google.api.serviceusage.v1beta1.IDeleteConsumerOverrideRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IDeleteConsumerOverrideRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
disableService(request, options)
disableService(request?: protos.google.api.serviceusage.v1beta1.IDisableServiceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
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
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IDisableServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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).
*/
// const name = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callDisableService() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.disableService(request);
const [response] = await operation.promise();
console.log(response);
}
callDisableService();
disableService(request, options, callback)
disableService(request: protos.google.api.serviceusage.v1beta1.IDisableServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IDisableServiceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
disableService(request, callback)
disableService(request: protos.google.api.serviceusage.v1beta1.IDisableServiceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IDisableServiceRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
enableService(request, options)
enableService(request?: protos.google.api.serviceusage.v1beta1.IEnableServiceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Enables a service so that it can be used with a project.
Operation response type: google.protobuf.Empty
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IEnableServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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).
*/
// const name = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callEnableService() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.enableService(request);
const [response] = await operation.promise();
console.log(response);
}
callEnableService();
enableService(request, options, callback)
enableService(request: protos.google.api.serviceusage.v1beta1.IEnableServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IEnableServiceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
enableService(request, callback)
enableService(request: protos.google.api.serviceusage.v1beta1.IEnableServiceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IEnableServiceRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
generateServiceIdentity(request, options)
generateServiceIdentity(request?: protos.google.api.serviceusage.v1beta1.IGenerateServiceIdentityRequest, options?: CallOptions): Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IServiceIdentity, protos.google.protobuf.IEmpty>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Generates service identity for service.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGenerateServiceIdentityRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IServiceIdentity, protos.google.protobuf.IEmpty>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Name of the consumer and service to generate an identity for.
* The `GenerateServiceIdentity` methods currently only support projects.
* An example name would be:
* `projects/123/services/example.googleapis.com` where `123` is the
* project number.
*/
// const parent = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callGenerateServiceIdentity() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.generateServiceIdentity(request);
const [response] = await operation.promise();
console.log(response);
}
callGenerateServiceIdentity();
generateServiceIdentity(request, options, callback)
generateServiceIdentity(request: protos.google.api.serviceusage.v1beta1.IGenerateServiceIdentityRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IServiceIdentity, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGenerateServiceIdentityRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IServiceIdentity, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
generateServiceIdentity(request, callback)
generateServiceIdentity(request: protos.google.api.serviceusage.v1beta1.IGenerateServiceIdentityRequest, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IServiceIdentity, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGenerateServiceIdentityRequest
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IServiceIdentity, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getConsumerQuotaLimit(request, options)
getConsumerQuotaLimit(request?: protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest, options?: CallOptions): Promise<[
protos.google.api.serviceusage.v1beta1.IConsumerQuotaLimit,
(protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest | undefined),
{} | undefined
]>;
Retrieves a summary of quota information for a specific quota limit.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.api.serviceusage.v1beta1.IConsumerQuotaLimit,
(protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The resource name of the quota limit.
* Use the quota limit resource name returned by previous
* ListConsumerQuotaMetrics and GetConsumerQuotaMetric API calls.
*/
// const name = 'abc123'
/**
* Specifies the level of detail for quota information in the response.
*/
// const view = {}
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callGetConsumerQuotaLimit() {
// Construct request
const request = {
};
// Run request
const response = await serviceusageClient.getConsumerQuotaLimit(request);
console.log(response);
}
callGetConsumerQuotaLimit();
getConsumerQuotaLimit(request, options, callback)
getConsumerQuotaLimit(request: protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest, options: CallOptions, callback: Callback<protos.google.api.serviceusage.v1beta1.IConsumerQuotaLimit, protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.api.serviceusage.v1beta1.IConsumerQuotaLimit, protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getConsumerQuotaLimit(request, callback)
getConsumerQuotaLimit(request: protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest, callback: Callback<protos.google.api.serviceusage.v1beta1.IConsumerQuotaLimit, protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest
|
callback |
Callback<protos.google.api.serviceusage.v1beta1.IConsumerQuotaLimit, protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaLimitRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getConsumerQuotaMetric(request, options)
getConsumerQuotaMetric(request?: protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest, options?: CallOptions): Promise<[
protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric,
(protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest | undefined),
{} | undefined
]>;
Retrieves a summary of quota information for a specific quota metric
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric,
(protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The resource name of the quota limit.
* An example name would be:
* `projects/123/services/serviceusage.googleapis.com/quotas/metrics/serviceusage.googleapis.com%2Fmutate_requests`
*/
// const name = 'abc123'
/**
* Specifies the level of detail for quota information in the response.
*/
// const view = {}
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callGetConsumerQuotaMetric() {
// Construct request
const request = {
};
// Run request
const response = await serviceusageClient.getConsumerQuotaMetric(request);
console.log(response);
}
callGetConsumerQuotaMetric();
getConsumerQuotaMetric(request, options, callback)
getConsumerQuotaMetric(request: protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest, options: CallOptions, callback: Callback<protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric, protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric, protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getConsumerQuotaMetric(request, callback)
getConsumerQuotaMetric(request: protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest, callback: Callback<protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric, protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest
|
callback |
Callback<protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric, protos.google.api.serviceusage.v1beta1.IGetConsumerQuotaMetricRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
Type | Description |
void |
getService(request, options)
getService(request?: protos.google.api.serviceusage.v1beta1.IGetServiceRequest, options?: CallOptions): Promise<[
protos.google.api.serviceusage.v1beta1.IService,
protos.google.api.serviceusage.v1beta1.IGetServiceRequest | undefined,
{} | undefined
]>;
Returns the service configuration and enabled state for a given service.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGetServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.api.serviceusage.v1beta1.IService,
protos.google.api.serviceusage.v1beta1.IGetServiceRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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).
*/
// const name = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callGetService() {
// Construct request
const request = {
};
// Run request
const response = await serviceusageClient.getService(request);
console.log(response);
}
callGetService();
getService(request, options, callback)
getService(request: protos.google.api.serviceusage.v1beta1.IGetServiceRequest, options: CallOptions, callback: Callback<protos.google.api.serviceusage.v1beta1.IService, protos.google.api.serviceusage.v1beta1.IGetServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGetServiceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.api.serviceusage.v1beta1.IService, protos.google.api.serviceusage.v1beta1.IGetServiceRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getService(request, callback)
getService(request: protos.google.api.serviceusage.v1beta1.IGetServiceRequest, callback: Callback<protos.google.api.serviceusage.v1beta1.IService, protos.google.api.serviceusage.v1beta1.IGetServiceRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IGetServiceRequest
|
callback |
Callback<protos.google.api.serviceusage.v1beta1.IService, protos.google.api.serviceusage.v1beta1.IGetServiceRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
importAdminOverrides(request, options)
importAdminOverrides(request?: protos.google.api.serviceusage.v1beta1.IImportAdminOverridesRequest, options?: CallOptions): Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IImportAdminOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportAdminOverridesMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
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.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IImportAdminOverridesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IImportAdminOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportAdminOverridesMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The resource name of the consumer.
* An example name would be:
* `projects/123/services/compute.googleapis.com`
*/
// const parent = 'abc123'
/**
* The import data is specified in the request message itself
*/
// const inlineSource = {}
/**
* Whether to force the creation of the quota overrides.
* Setting the force parameter to 'true' ignores all quota safety checks that
* would fail the request. QuotaSafetyCheck lists all such validations.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callImportAdminOverrides() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.importAdminOverrides(request);
const [response] = await operation.promise();
console.log(response);
}
callImportAdminOverrides();
importAdminOverrides(request, options, callback)
importAdminOverrides(request: protos.google.api.serviceusage.v1beta1.IImportAdminOverridesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IImportAdminOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportAdminOverridesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IImportAdminOverridesRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IImportAdminOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportAdminOverridesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
importAdminOverrides(request, callback)
importAdminOverrides(request: protos.google.api.serviceusage.v1beta1.IImportAdminOverridesRequest, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IImportAdminOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportAdminOverridesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IImportAdminOverridesRequest
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IImportAdminOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportAdminOverridesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
importConsumerOverrides(request, options)
importConsumerOverrides(request?: protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesRequest, options?: CallOptions): Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
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.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The resource name of the consumer.
* An example name would be:
* `projects/123/services/compute.googleapis.com`
*/
// const parent = 'abc123'
/**
* The import data is specified in the request message itself
*/
// const inlineSource = {}
/**
* Whether to force the creation of the quota overrides.
* Setting the force parameter to 'true' ignores all quota safety checks that
* would fail the request. QuotaSafetyCheck lists all such validations.
*/
// const force = true
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callImportConsumerOverrides() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.importConsumerOverrides(request);
const [response] = await operation.promise();
console.log(response);
}
callImportConsumerOverrides();
importConsumerOverrides(request, options, callback)
importConsumerOverrides(request: protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
importConsumerOverrides(request, callback)
importConsumerOverrides(request: protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesRequest, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesRequest
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesResponse, protos.google.api.serviceusage.v1beta1.IImportConsumerOverridesMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns | |
---|---|
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub. |
listAdminOverrides(request, options)
listAdminOverrides(request?: protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, options?: CallOptions): Promise<[
protos.google.api.serviceusage.v1beta1.IQuotaOverride[],
protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest | null,
protos.google.api.serviceusage.v1beta1.IListAdminOverridesResponse
]>;
Lists all admin overrides on this limit.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.api.serviceusage.v1beta1.IQuotaOverride[],
protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest | null,
protos.google.api.serviceusage.v1beta1.IListAdminOverridesResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listAdminOverrides(request, options, callback)
listAdminOverrides(request: protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, options: CallOptions, callback: PaginationCallback<protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, protos.google.api.serviceusage.v1beta1.IListAdminOverridesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IQuotaOverride>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, protos.google.api.serviceusage.v1beta1.IListAdminOverridesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IQuotaOverride>
|
Returns | |
---|---|
Type | Description |
void |
listAdminOverrides(request, callback)
listAdminOverrides(request: protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, callback: PaginationCallback<protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, protos.google.api.serviceusage.v1beta1.IListAdminOverridesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IQuotaOverride>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest
|
callback |
PaginationCallback<protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, protos.google.api.serviceusage.v1beta1.IListAdminOverridesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IQuotaOverride>
|
Returns | |
---|---|
Type | Description |
void |
listAdminOverridesAsync(request, options)
listAdminOverridesAsync(request?: protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, options?: CallOptions): AsyncIterable<protos.google.api.serviceusage.v1beta1.IQuotaOverride>;
Equivalent to listAdminOverrides
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.api.serviceusage.v1beta1.IQuotaOverride> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const parent = 'abc123'
/**
* Requested size of the next page of data.
*/
// const pageSize = 1234
/**
* Token identifying which result to start with; returned by a previous list
* call.
*/
// const pageToken = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callListAdminOverrides() {
// Construct request
const request = {
};
// Run request
const iterable = await serviceusageClient.listAdminOverridesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListAdminOverrides();
listAdminOverridesStream(request, options)
listAdminOverridesStream(request?: protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListAdminOverridesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listConsumerOverrides(request, options)
listConsumerOverrides(request?: protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, options?: CallOptions): Promise<[
protos.google.api.serviceusage.v1beta1.IQuotaOverride[],
protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest | null,
protos.google.api.serviceusage.v1beta1.IListConsumerOverridesResponse
]>;
Lists all consumer overrides on this limit.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.api.serviceusage.v1beta1.IQuotaOverride[],
protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest | null,
protos.google.api.serviceusage.v1beta1.IListConsumerOverridesResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listConsumerOverrides(request, options, callback)
listConsumerOverrides(request: protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, options: CallOptions, callback: PaginationCallback<protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, protos.google.api.serviceusage.v1beta1.IListConsumerOverridesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IQuotaOverride>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, protos.google.api.serviceusage.v1beta1.IListConsumerOverridesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IQuotaOverride>
|
Returns | |
---|---|
Type | Description |
void |
listConsumerOverrides(request, callback)
listConsumerOverrides(request: protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, callback: PaginationCallback<protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, protos.google.api.serviceusage.v1beta1.IListConsumerOverridesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IQuotaOverride>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest
|
callback |
PaginationCallback<protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, protos.google.api.serviceusage.v1beta1.IListConsumerOverridesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IQuotaOverride>
|
Returns | |
---|---|
Type | Description |
void |
listConsumerOverridesAsync(request, options)
listConsumerOverridesAsync(request?: protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, options?: CallOptions): AsyncIterable<protos.google.api.serviceusage.v1beta1.IQuotaOverride>;
Equivalent to listConsumerOverrides
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.api.serviceusage.v1beta1.IQuotaOverride> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const parent = 'abc123'
/**
* Requested size of the next page of data.
*/
// const pageSize = 1234
/**
* Token identifying which result to start with; returned by a previous list
* call.
*/
// const pageToken = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callListConsumerOverrides() {
// Construct request
const request = {
};
// Run request
const iterable = await serviceusageClient.listConsumerOverridesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListConsumerOverrides();
listConsumerOverridesStream(request, options)
listConsumerOverridesStream(request?: protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerOverridesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listConsumerQuotaMetrics(request, options)
listConsumerQuotaMetrics(request?: protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, options?: CallOptions): Promise<[
protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric[],
protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest | null,
protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsResponse
]>;
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.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric[],
protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest | null,
protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listConsumerQuotaMetrics(request, options, callback)
listConsumerQuotaMetrics(request: protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, options: CallOptions, callback: PaginationCallback<protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric>
|
Returns | |
---|---|
Type | Description |
void |
listConsumerQuotaMetrics(request, callback)
listConsumerQuotaMetrics(request: protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, callback: PaginationCallback<protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest
|
callback |
PaginationCallback<protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric>
|
Returns | |
---|---|
Type | Description |
void |
listConsumerQuotaMetricsAsync(request, options)
listConsumerQuotaMetricsAsync(request?: protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, options?: CallOptions): AsyncIterable<protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric>;
Equivalent to listConsumerQuotaMetrics
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.api.serviceusage.v1beta1.IConsumerQuotaMetric> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const parent = 'abc123'
/**
* Requested size of the next page of data.
*/
// const pageSize = 1234
/**
* Token identifying which result to start with; returned by a previous list
* call.
*/
// const pageToken = 'abc123'
/**
* Specifies the level of detail for quota information in the response.
*/
// const view = {}
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callListConsumerQuotaMetrics() {
// Construct request
const request = {
};
// Run request
const iterable = await serviceusageClient.listConsumerQuotaMetricsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListConsumerQuotaMetrics();
listConsumerQuotaMetricsStream(request, options)
listConsumerQuotaMetricsStream(request?: protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListConsumerQuotaMetricsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listServices(request, options)
listServices(request?: protos.google.api.serviceusage.v1beta1.IListServicesRequest, options?: CallOptions): Promise<[
protos.google.api.serviceusage.v1beta1.IService[],
protos.google.api.serviceusage.v1beta1.IListServicesRequest | null,
protos.google.api.serviceusage.v1beta1.IListServicesResponse
]>;
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.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.api.serviceusage.v1beta1.IService[],
protos.google.api.serviceusage.v1beta1.IListServicesRequest | null,
protos.google.api.serviceusage.v1beta1.IListServicesResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listServices(request, options, callback)
listServices(request: protos.google.api.serviceusage.v1beta1.IListServicesRequest, options: CallOptions, callback: PaginationCallback<protos.google.api.serviceusage.v1beta1.IListServicesRequest, protos.google.api.serviceusage.v1beta1.IListServicesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IService>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListServicesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.api.serviceusage.v1beta1.IListServicesRequest, protos.google.api.serviceusage.v1beta1.IListServicesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IService>
|
Returns | |
---|---|
Type | Description |
void |
listServices(request, callback)
listServices(request: protos.google.api.serviceusage.v1beta1.IListServicesRequest, callback: PaginationCallback<protos.google.api.serviceusage.v1beta1.IListServicesRequest, protos.google.api.serviceusage.v1beta1.IListServicesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IService>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListServicesRequest
|
callback |
PaginationCallback<protos.google.api.serviceusage.v1beta1.IListServicesRequest, protos.google.api.serviceusage.v1beta1.IListServicesResponse | null | undefined, protos.google.api.serviceusage.v1beta1.IService>
|
Returns | |
---|---|
Type | Description |
void |
listServicesAsync(request, options)
listServicesAsync(request?: protos.google.api.serviceusage.v1beta1.IListServicesRequest, options?: CallOptions): AsyncIterable<protos.google.api.serviceusage.v1beta1.IService>;
Equivalent to listServices
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.api.serviceusage.v1beta1.IService> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Parent to search for services on.
* An example name would be:
* `projects/123`
* where `123` is the project number (not project ID).
*/
// const parent = 'abc123'
/**
* Requested size of the next page of data.
* Requested page size cannot exceed 200.
* If not set, the default page size is 50.
*/
// const pageSize = 1234
/**
* Token identifying which result to start with, which is returned by a
* previous list call.
*/
// const pageToken = 'abc123'
/**
* Only list services that conform to the given filter.
* The allowed filter strings are `state:ENABLED` and `state:DISABLED`.
*/
// const filter = 'abc123'
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callListServices() {
// Construct request
const request = {
};
// Run request
const iterable = await serviceusageClient.listServicesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListServices();
listServicesStream(request, options)
listServicesStream(request?: protos.google.api.serviceusage.v1beta1.IListServicesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IListServicesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
updateAdminOverride(request, options)
updateAdminOverride(request?: protos.google.api.serviceusage.v1beta1.IUpdateAdminOverrideRequest, options?: CallOptions): Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Updates an admin override.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IUpdateAdminOverrideRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const name = 'abc123'
/**
* The new override.
* Only the override_value is updated; all other fields are ignored.
*/
// const override = {}
/**
* 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.
*/
// const force = true
/**
* Update only the specified fields of the override.
* If unset, all fields will be updated.
*/
// const updateMask = {}
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callUpdateAdminOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.updateAdminOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateAdminOverride();
updateAdminOverride(request, options, callback)
updateAdminOverride(request: protos.google.api.serviceusage.v1beta1.IUpdateAdminOverrideRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IUpdateAdminOverrideRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateAdminOverride(request, callback)
updateAdminOverride(request: protos.google.api.serviceusage.v1beta1.IUpdateAdminOverrideRequest, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IUpdateAdminOverrideRequest
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateConsumerOverride(request, options)
updateConsumerOverride(request?: protos.google.api.serviceusage.v1beta1.IUpdateConsumerOverrideRequest, options?: CallOptions): Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Updates a consumer override.
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IUpdateConsumerOverrideRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* 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`
*/
// const name = 'abc123'
/**
* The new override.
* Only the override_value is updated; all other fields are ignored.
*/
// const override = {}
/**
* 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.
*/
// const force = true
/**
* Update only the specified fields of the override.
* If unset, all fields will be updated.
*/
// const updateMask = {}
/**
* 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.
*/
// const forceOnly = 1234
// Imports the Serviceusage library
const {ServiceUsageClient} = require('@google-cloud/service-usage').v1beta1;
// Instantiates a client
const serviceusageClient = new ServiceUsageClient();
async function callUpdateConsumerOverride() {
// Construct request
const request = {
};
// Run request
const [operation] = await serviceusageClient.updateConsumerOverride(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateConsumerOverride();
updateConsumerOverride(request, options, callback)
updateConsumerOverride(request: protos.google.api.serviceusage.v1beta1.IUpdateConsumerOverrideRequest, options: CallOptions, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IUpdateConsumerOverrideRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateConsumerOverride(request, callback)
updateConsumerOverride(request: protos.google.api.serviceusage.v1beta1.IUpdateConsumerOverrideRequest, callback: Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.api.serviceusage.v1beta1.IUpdateConsumerOverrideRequest
|
callback |
Callback<LROperation<protos.google.api.serviceusage.v1beta1.IQuotaOverride, protos.google.api.serviceusage.v1beta1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |