Skip to main content

policies

Creates, updates, deletes, gets or lists a policies resource.

Overview

Namepolicies
TypeResource
Idgoogle.prod_tt_sasportal.policies

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
assignmentsarrayList of assignments
etagstring (byte)The etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to GetPolicy, and systems are expected to put that etag in the request to SetPolicy to ensure that their change will be applied to the same version of the policy. If no etag is provided in the call to GetPolicy, then the existing policy is overwritten blindly.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
policies_getselectGets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
policies_setexecSets the access control policy on the specified resource. Replaces any existing policy.
policies_testexecReturns permissions that a caller has on the specified resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription

SELECT examples

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

SELECT
assignments,
etag
FROM google.prod_tt_sasportal.policies;

Lifecycle Methods

Sets the access control policy on the specified resource. Replaces any existing policy.

EXEC google.prod_tt_sasportal.policies.policies_set 
@@json=
'{
"resource": "{{ resource }}",
"policy": "{{ policy }}",
"disableNotification": {{ disableNotification }}
}';