policies
Creates, updates, deletes, gets or lists a policies resource.
Overview
| Name | policies |
| Type | Resource |
| Id | google.cloudidentity.policies |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The resource name of the Policy. Format: policies/{policy}. |
customer | string | Immutable. 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. |
policyQuery | object | Required. The PolicyQuery the Setting applies to. (id: PolicyQuery) |
setting | object | Required. The Setting configured by this Policy. (id: Setting) |
type | string | Output only. The type of the policy. (POLICY_TYPE_UNSPECIFIED, SYSTEM, ADMIN) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The resource name of the Policy. Format: policies/{policy}. |
customer | string | Immutable. 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. |
policyQuery | object | Required. The PolicyQuery the Setting applies to. (id: PolicyQuery) |
setting | object | Required. The Setting configured by this Policy. (id: Setting) |
type | string | Output only. The type of the policy. (POLICY_TYPE_UNSPECIFIED, SYSTEM, ADMIN) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | policiesId | Get a policy. | |
list | select | pageToken, pageSize, filter | List policies. | |
create | insert | Create a policy. | ||
patch | update | policiesId | Update a policy. | |
delete | delete | policiesId | Delete 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.
| Name | Datatype | Description |
|---|---|---|
policiesId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
Get a policy.
SELECT
name,
customer,
policyQuery,
setting,
type
FROM google.cloudidentity.policies
WHERE policiesId = '{{ policiesId }}' -- required
;
List policies.
SELECT
name,
customer,
policyQuery,
setting,
type
FROM google.cloudidentity.policies
WHERE pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Create a policy.
INSERT INTO google.cloudidentity.policies (
data__customer,
data__policyQuery,
data__setting
)
SELECT
'{{ customer }}',
'{{ policyQuery }}',
'{{ setting }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: policies
props:
- name: customer
value: "{{ customer }}"
description: |
Immutable. 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.
- name: policyQuery
description: |
Required. The PolicyQuery the Setting applies to.
value:
orgUnit: "{{ orgUnit }}"
sortOrder: {{ sortOrder }}
query: "{{ query }}"
group: "{{ group }}"
- name: setting
description: |
Required. The Setting configured by this Policy.
value:
type: "{{ type }}"
value: "{{ value }}"
UPDATE examples
- patch
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
Delete a policy.
DELETE FROM google.cloudidentity.policies
WHERE policiesId = '{{ policiesId }}' --required
;