acl_policies
Creates, updates, deletes, gets or lists an acl_policies resource.
Overview
| Name | acl_policies |
| Type | Resource |
| Id | google.redis.acl_policies |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Full resource path of the ACL policy. |
clusterAclPolicyAttachments | array | Output only. The ACL policy attachment status for each attached cluster. |
createTime | string (google-datetime) | Output only. The timestamp that the ACL policy was created. |
etag | string | Output only. Etag for the ACL policy. |
rules | array | Required. The ACL rules within the ACL policy. |
state | string | Output only. The state of the ACL policy. (STATE_UNSPECIFIED, ACTIVE, UPDATING, DELETING) |
updateTime | string (google-datetime) | Output only. The timestamp that the ACL policy was last updated. |
version | string (int64) | Output only. Deprecated: Used in drift resolution. |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, aclPoliciesId | Gets the details of a specific Redis Cluster ACL policy. | |
list | select | projectsId, locationsId | pageSize, pageToken | Lists all ACL policies owned by a project in either the specified location (region) or all locations. The location should have the following format: * projects/{project_id}/locations/{location_id} If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated. |
create | insert | projectsId, locationsId | requestId, aclPolicyId | Creates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns. |
patch | update | projectsId, locationsId, aclPoliciesId | requestId, updateMask | Updates the ACL policy. The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters. Completed longrunning.Operation will contain the new ACL policy object in the response field. |
delete | delete | projectsId, locationsId, aclPoliciesId | requestId, etag | Deletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster. |
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 |
|---|---|---|
aclPoliciesId | string | |
locationsId | string | |
projectsId | string | |
aclPolicyId | string | |
etag | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets the details of a specific Redis Cluster ACL policy.
SELECT
name,
clusterAclPolicyAttachments,
createTime,
etag,
rules,
state,
updateTime,
version
FROM google.redis.acl_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND aclPoliciesId = '{{ aclPoliciesId }}' -- required
;
Lists all ACL policies owned by a project in either the specified location (region) or all locations. The location should have the following format: * projects/{project_id}/locations/{location_id} If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.
SELECT
*
FROM google.redis.acl_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.
INSERT INTO google.redis.acl_policies (
data__name,
data__rules,
projectsId,
locationsId,
requestId,
aclPolicyId
)
SELECT
'{{ name }}',
'{{ rules }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ aclPolicyId }}'
RETURNING
name,
clusterAclPolicyAttachments,
createTime,
etag,
rules,
state,
updateTime,
version
;
# Description fields are for documentation purposes
- name: acl_policies
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the acl_policies resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the acl_policies resource.
- name: name
value: "{{ name }}"
description: |
Identifier. Full resource path of the ACL policy.
- name: rules
description: |
Required. The ACL rules within the ACL policy.
value:
- username: "{{ username }}"
rule: "{{ rule }}"
- name: requestId
value: "{{ requestId }}"
- name: aclPolicyId
value: "{{ aclPolicyId }}"
UPDATE examples
- patch
Updates the ACL policy. The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters. Completed longrunning.Operation will contain the new ACL policy object in the response field.
UPDATE google.redis.acl_policies
SET
data__name = '{{ name }}',
data__rules = '{{ rules }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND aclPoliciesId = '{{ aclPoliciesId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.
DELETE FROM google.redis.acl_policies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND aclPoliciesId = '{{ aclPoliciesId }}' --required
AND requestId = '{{ requestId }}'
AND etag = '{{ etag }}'
;