{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-memorystore/json-schema/google-cloud-memorystore-acl-policy-schema.json",
  "title": "AclPolicy",
  "description": "The ACL policy resource.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-memorystore-redis-projects-api-openapi.yml#/components/schemas/AclPolicy",
  "properties": {
    "updateTime": {
      "format": "google-datetime",
      "readOnly": true,
      "description": "Output only. The timestamp that the ACL policy was last updated.",
      "type": "string"
    },
    "state": {
      "readOnly": true,
      "description": "Output only. The state of the ACL policy.",
      "type": "string",
      "enum": [
        "STATE_UNSPECIFIED",
        "ACTIVE",
        "UPDATING",
        "DELETING"
      ]
    },
    "name": {
      "type": "string",
      "description": "Identifier. Full resource path of the ACL policy."
    },
    "rules": {
      "type": "array",
      "description": "Required. The ACL rules within the ACL policy.",
      "items": {
        "$ref": "#/$defs/AclRule"
      }
    },
    "etag": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. Etag for the ACL policy."
    },
    "createTime": {
      "description": "Output only. The timestamp that the ACL policy was created.",
      "format": "google-datetime",
      "readOnly": true,
      "type": "string"
    },
    "clusterAclPolicyAttachments": {
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/ClusterAclPolicyAttachment"
      },
      "description": "Output only. The ACL policy attachment status for each attached cluster.",
      "type": "array"
    },
    "version": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. Deprecated: Used in drift resolution.",
      "format": "int64",
      "deprecated": true
    }
  },
  "type": "object",
  "$defs": {
    "AclPolicyRevisionStatus": {
      "properties": {
        "state": {
          "readOnly": true,
          "enum": [
            "STATE_UNSPECIFIED",
            "APPLYING",
            "APPLIED",
            "FAILED"
          ],
          "description": "Output only. AclPolicyRevision state.",
          "type": "string"
        },
        "aclPolicyRevisionNumber": {
          "readOnly": true,
          "description": "Output only. The revision number of the ACL policy revision this status refers to.",
          "format": "int64",
          "type": "string"
        },
        "aclPolicyRevision": {
          "description": "Output only. The resource name of the ACL policy revision this status refers to. Format: \"projects/{project}/locations/{location}/aclPolicies/{acl_policy}/revisions/{revision}\"",
          "type": "string",
          "readOnly": true
        },
        "errorMessage": {
          "readOnly": true,
          "description": "Output only. Human-readable error message providing more details for FAILED states.",
          "type": "string"
        }
      },
      "description": "AclPolicyRevisionStatus stores the per-revision status for an attached cluster.",
      "type": "object"
    },
    "AclRule": {
      "type": "object",
      "description": "A single ACL rule which defines the policy for a user.",
      "properties": {
        "rule": {
          "type": "string",
          "description": "Required. The rule to be applied to the username. Ex: \"on >password123 ~* +@all\" The format of the rule is defined by Redis OSS: https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/"
        },
        "username": {
          "description": "Required. Specifies the IAM user or service account to be added to the ACL policy. This username will be directly set on the Redis OSS.",
          "type": "string"
        }
      }
    },
    "ClusterAclPolicyAttachment": {
      "description": "ClusterAclPolicyAttachment stores the ACL policy status for an attached cluster for the revisions successfully applied, under application or failed.",
      "properties": {
        "aclPolicyRevisionStatuses": {
          "description": "Output only. A list of status for various revisions of this ACL policy on the cluster.",
          "type": "array",
          "readOnly": true,
          "items": {
            "$ref": "#/$defs/AclPolicyRevisionStatus"
          }
        },
        "cluster": {
          "type": "string",
          "description": "Output only. The resource name of the attached Cluster. Format: \"projects/{project}/locations/{location}/clusters/{cluster}\"",
          "readOnly": true
        }
      },
      "type": "object"
    }
  }
}