Skip to main content

policies

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

Overview

Namepolicies
TypeResource
Idgoogle.cloudidentity.policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. Identifier. The resource name of the Policy. Format: policies/{policy}.
customerstringImmutable. Customer that the Policy belongs to. The value is in the format 'customers/{customerId}'. The customerId must begin with "C" To find your customer ID in Admin Console see https://support.google.com/a/answer/10070793.
policyQueryobjectRequired. The PolicyQuery the Setting applies to. (id: PolicyQuery)
settingobjectRequired. The Setting configured by this Policy. (id: Setting)
typestringOutput only. The type of the policy. (POLICY_TYPE_UNSPECIFIED, SYSTEM, ADMIN)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpoliciesIdGet a policy.
listselectpageToken, pageSize, filterList policies.
createinsertCreate a policy.
patchupdatepoliciesIdUpdate a policy.
deletedeletepoliciesIdDelete a policy.

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
policiesIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Get a policy.

SELECT
name,
customer,
policyQuery,
setting,
type
FROM google.cloudidentity.policies
WHERE policiesId = '{{ policiesId }}' -- required
;

INSERT examples

Create a policy.

INSERT INTO google.cloudidentity.policies (
data__customer,
data__policyQuery,
data__setting
)
SELECT
'{{ customer }}',
'{{ policyQuery }}',
'{{ setting }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update a policy.

UPDATE google.cloudidentity.policies
SET
data__customer = '{{ customer }}',
data__policyQuery = '{{ policyQuery }}',
data__setting = '{{ setting }}'
WHERE
policiesId = '{{ policiesId }}' --required
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Delete a policy.

DELETE FROM google.cloudidentity.policies
WHERE policiesId = '{{ policiesId }}' --required
;