Method: testEnabled

Tests a value against the result of merging consumer policies in the resource hierarchy. This operation is designed to be used for building policy-aware UIs and command-line tools, not for access checking.

HTTP request

POST https://serviceusage.googleapis.com/v2beta/{name=*/*}:testEnabled

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. Resource name to check the value against hierarchically. Format: projects/100, folders/101 or organizations/102.

Request body

The request body contains data with the following structure:

JSON representation
{

  // Union field value can be only one of the following:
  "serviceName": string
  // End of list of possible types for union field value.
}
Fields
Union field value. Asks "Is this value enabled according to the merged consumer policies from the resource hierarchy?". For example, the value can be a service name to check if the targeted resource can use this service. Currently supports services with format: services/{service}. value can be only one of the following:
serviceName

string

The name of a service to test for enablement.

Response body

If successful, the response body contains an instance of State.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform.read-only
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.