Method: getEffectivePolicy

Get effective consumer policy for a resource, which contains enable rule information of consumer policies from the resource hierarchy.

HTTP request

GET https://serviceusage.googleapis.com/v2beta/{name=*/*/effectivePolicy}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the effective policy to retrieve. Format: projects/100/effectivePolicy , folders/101/effectivePolicy , organizations/102/effectivePolicy .

Query parameters

Parameters
view

enum ( EffectivePolicyView )

The view of the effective policy to use.

Request body

The request body must be empty.

Response body

Effective Policy is a singleton read-only resource modeling the collapsed policies and metadata effective at a particular point in the hierarchy.

If successful, the response body contains data with the following structure:

JSON representation
 { 
 "name" 
 : 
 string 
 , 
 "updateTime" 
 : 
 string 
 , 
 "enableRules" 
 : 
 [ 
 { 
 object (  EnableRule 
 
) 
 } 
 ] 
 , 
 "enableRuleMetadata" 
 : 
 [ 
 { 
 object (  RuleSource 
 
) 
 } 
 ] 
 } 
Fields
name

string

Output only. The name of the effective policy. Format: projects/100/effectivePolicy , folders/101/effectivePolicy , organizations/102/effectivePolicy .

updateTime

string ( Timestamp format)

Output only. The time the policy was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .

enableRules[]

object ( EnableRule )

Output only. Aggregated EnableRule objects grouped by any associated conditions.

Conditions are not supported in beta and there will be exactly one rule present.

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 .

EffectivePolicyView

The view of the effective policy.

Enums
EFFECTIVE_POLICY_VIEW_UNSPECIFIED The default / unset value. The API will default to the BASIC view.
EFFECTIVE_POLICY_VIEW_BASIC Include basic metadata about the effective policy, but not the source of policy rules. This is the default value.
EFFECTIVE_POLICY_VIEW_FULL Include everything.

RuleSource

RuleSource contains source information for where a rule was found.

JSON representation
 { 
 "serviceSources" 
 : 
 { 
 string 
 : 
 { 
 object (  PolicyList 
 
) 
 } 
 , 
 ... 
 } 
 } 
Fields
serviceSources

map (key: string, value: object ( PolicyList ))

Map of enabled services as keys and the policy that enabled it as values. For example, the key can be services/serviceusage.googleapis.com and value can be {"projects/123/consumerPolicies/default", "folders/456/consumerPolicies/default"} where the service is enabled and the order of the resource list is nearest first in the hierarchy.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } .

PolicyList

PolicyList contains policy resources in the hierarchy ordered from leaf to root.

JSON representation
 { 
 "policies" 
 : 
 [ 
 string 
 ] 
 } 
Fields
policies[]

string

List of policy resources ordered from leaf to root.

Create a Mobile Website
View Site in Mobile | Classic
Share by: