policies
Creates, updates, deletes, gets or lists a policies
resource.
Overview
Name | policies |
Type | Resource |
Id | google.prod_tt_sasportal.policies |
Fields
The following fields are returned by SELECT
queries:
- policies_get
Successful response
Name | Datatype | Description |
---|---|---|
assignments | array | List of assignments |
etag | string (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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
policies_get | select | Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. | ||
policies_set | exec | Sets the access control policy on the specified resource. Replaces any existing policy. | ||
policies_test | exec | Returns 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.
Name | Datatype | Description |
---|
SELECT
examples
- policies_get
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
- policies_set
- policies_test
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 }}
}';
Returns permissions that a caller has on the specified resource.
EXEC google.prod_tt_sasportal.policies.policies_test
@@json=
'{
"resource": "{{ resource }}",
"permissions": "{{ permissions }}"
}';