{
  "typeName" : "AWS::EKS::PodIdentityAssociation",
  "description" : "An object representing an Amazon EKS PodIdentityAssociation.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-eks.git",
  "definitions" : {
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "ClusterName" : {
      "description" : "The cluster that the pod identity association is created for.",
      "type" : "string",
      "minLength" : 1
    },
    "RoleArn" : {
      "description" : "The IAM role ARN that the pod identity association is created for.",
      "type" : "string"
    },
    "Namespace" : {
      "description" : "The Kubernetes namespace that the pod identity association is created for.",
      "type" : "string"
    },
    "ServiceAccount" : {
      "description" : "The Kubernetes service account that the pod identity association is created for.",
      "type" : "string"
    },
    "AssociationArn" : {
      "description" : "The ARN of the pod identity association.",
      "type" : "string"
    },
    "AssociationId" : {
      "description" : "The ID of the pod identity association.",
      "type" : "string",
      "minLength" : 1
    },
    "TargetRoleArn" : {
      "description" : "The Target Role Arn of the pod identity association.",
      "type" : "string",
      "minLength" : 1
    },
    "Policy" : {
      "description" : "The policy of the pod identity association.",
      "type" : "string",
      "minLength" : 1
    },
    "ExternalId" : {
      "description" : "The External Id of the pod identity association.",
      "type" : "string",
      "minLength" : 1
    },
    "DisableSessionTags" : {
      "description" : "The Disable Session Tags of the pod identity association.",
      "type" : "boolean",
      "minLength" : 1
    },
    "Tags" : {
      "description" : "An array of key-value pairs to apply to this resource.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "eks:TagResource", "eks:UntagResource" ]
  },
  "additionalProperties" : false,
  "required" : [ "ClusterName", "RoleArn", "Namespace", "ServiceAccount" ],
  "primaryIdentifier" : [ "/properties/AssociationArn" ],
  "createOnlyProperties" : [ "/properties/ClusterName", "/properties/Namespace", "/properties/ServiceAccount" ],
  "readOnlyProperties" : [ "/properties/AssociationArn", "/properties/AssociationId", "/properties/ExternalId" ],
  "replacementStrategy" : "create_then_delete",
  "handlers" : {
    "create" : {
      "permissions" : [ "eks:CreatePodIdentityAssociation", "eks:DescribePodIdentityAssociation", "eks:TagResource", "iam:PassRole", "iam:GetRole" ]
    },
    "read" : {
      "permissions" : [ "eks:DescribePodIdentityAssociation" ]
    },
    "update" : {
      "permissions" : [ "eks:DescribePodIdentityAssociation", "eks:UpdatePodIdentityAssociation", "eks:TagResource", "eks:UntagResource", "iam:PassRole", "iam:GetRole" ]
    },
    "delete" : {
      "permissions" : [ "eks:DeletePodIdentityAssociation", "eks:DescribePodIdentityAssociation" ]
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "ClusterName" : {
            "$ref" : "resource-schema.json#/properties/ClusterName"
          }
        },
        "required" : [ "ClusterName" ]
      },
      "permissions" : [ "eks:ListPodIdentityAssociations" ]
    }
  }
}