{
  "typeName" : "AWS::EKS::FargateProfile",
  "description" : "Resource Schema for AWS::EKS::FargateProfile",
  "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",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 127 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" : 127
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 1 to 255 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" : 255
        }
      },
      "required" : [ "Key", "Value" ]
    },
    "Selector" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Namespace" : {
          "type" : "string",
          "minLength" : 1
        },
        "Labels" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Label"
          }
        }
      },
      "required" : [ "Namespace" ]
    },
    "Label" : {
      "description" : "A key-value pair to associate with a pod.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the label.",
          "minLength" : 1,
          "maxLength" : 127
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the label. ",
          "minLength" : 1,
          "maxLength" : 255
        }
      },
      "required" : [ "Key", "Value" ]
    }
  },
  "properties" : {
    "ClusterName" : {
      "description" : "Name of the Cluster",
      "type" : "string",
      "minLength" : 1
    },
    "FargateProfileName" : {
      "description" : "Name of FargateProfile",
      "type" : "string",
      "minLength" : 1
    },
    "PodExecutionRoleArn" : {
      "description" : "The IAM policy arn for pods",
      "type" : "string",
      "minLength" : 1
    },
    "Arn" : {
      "type" : "string"
    },
    "Subnets" : {
      "type" : "array",
      "items" : {
        "type" : "string"
      }
    },
    "Selectors" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Selector"
      },
      "minItems" : 1
    },
    "Tags" : {
      "type" : "array",
      "uniqueItems" : true,
      "description" : "An array of key-value pairs to apply to this resource.",
      "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", "PodExecutionRoleArn", "Selectors" ],
  "createOnlyProperties" : [ "/properties/ClusterName", "/properties/FargateProfileName", "/properties/PodExecutionRoleArn", "/properties/Subnets", "/properties/Selectors" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "primaryIdentifier" : [ "/properties/ClusterName", "/properties/FargateProfileName" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "eks:CreateFargateProfile", "eks:DescribeFargateProfile", "iam:GetRole", "iam:PassRole", "iam:CreateServiceLinkedRole", "eks:TagResource" ]
    },
    "read" : {
      "permissions" : [ "eks:DescribeFargateProfile" ]
    },
    "delete" : {
      "permissions" : [ "eks:DeleteFargateProfile", "eks:DescribeFargateProfile" ]
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "ClusterName" : {
            "$ref" : "resource-schema.json#/properties/ClusterName"
          }
        },
        "required" : [ "ClusterName" ]
      },
      "permissions" : [ "eks:ListFargateProfiles" ]
    },
    "update" : {
      "permissions" : [ "eks:DescribeFargateProfile", "eks:TagResource", "eks:UntagResource" ]
    }
  }
}