Skip to main content

acl_policies

Creates, updates, deletes, gets or lists an acl_policies resource.

Overview

Nameacl_policies
TypeResource
Idgoogle.redis.acl_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Full resource path of the ACL policy.
clusterAclPolicyAttachmentsarrayOutput only. The ACL policy attachment status for each attached cluster.
createTimestring (google-datetime)Output only. The timestamp that the ACL policy was created.
etagstringOutput only. Etag for the ACL policy.
rulesarrayRequired. The ACL rules within the ACL policy.
statestringOutput only. The state of the ACL policy. (STATE_UNSPECIFIED, ACTIVE, UPDATING, DELETING)
updateTimestring (google-datetime)Output only. The timestamp that the ACL policy was last updated.
versionstring (int64)Output only. Deprecated: Used in drift resolution.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, aclPoliciesIdGets the details of a specific Redis Cluster ACL policy.
listselectprojectsId, locationsIdpageSize, pageTokenLists 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.
createinsertprojectsId, locationsIdrequestId, aclPolicyIdCreates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.
patchupdateprojectsId, locationsId, aclPoliciesIdrequestId, updateMaskUpdates 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.
deletedeleteprojectsId, locationsId, aclPoliciesIdrequestId, etagDeletes 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.

NameDatatypeDescription
aclPoliciesIdstring
locationsIdstring
projectsIdstring
aclPolicyIdstring
etagstring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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 }}'
;