{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-eks/json-schema/amazon-eks-associate-access-policy-request-schema.json",
  "title": "AssociateAccessPolicyRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-eks-access-policies-api-openapi.yml#/components/schemas/AssociateAccessPolicyRequest",
  "type": "object",
  "properties": {
    "clusterName": {
      "type": "string",
      "description": "The name of your cluster."
    },
    "principalArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM user or role for the AccessEntry that you're associating the access policy to."
    },
    "policyArn": {
      "type": "string",
      "description": "The ARN of the AccessPolicy that you're associating. For a list of ARNs, use ListAccessPolicies."
    },
    "accessScope": {
      "$ref": "#/$defs/AccessScope"
    }
  },
  "required": [
    "clusterName",
    "principalArn",
    "policyArn",
    "accessScope"
  ],
  "$defs": {
    "AccessScope": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "cluster",
            "namespace"
          ],
          "description": "The scope type of an access policy."
        },
        "namespaces": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A Kubernetes namespace that an access policy is scoped to. A value is required if you specified namespace for Type."
        }
      }
    }
  }
}