{
  "tagging" : {
    "permissions" : [ "appconfig:TagResource", "appconfig:UntagResource", "appconfig:ListTagsForResource" ],
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "tagProperty" : "/properties/Tags",
    "cloudFormationSystemTags" : true
  },
  "typeName" : "AWS::AppConfig::Environment",
  "readOnlyProperties" : [ "/properties/EnvironmentId" ],
  "description" : "Resource Type definition for AWS::AppConfig::Environment",
  "createOnlyProperties" : [ "/properties/ApplicationId" ],
  "primaryIdentifier" : [ "/properties/ApplicationId", "/properties/EnvironmentId" ],
  "required" : [ "Name", "ApplicationId" ],
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-appconfig.git",
  "handlers" : {
    "read" : {
      "permissions" : [ "appconfig:GetEnvironment", "appconfig:ListTagsForResource" ]
    },
    "create" : {
      "permissions" : [ "appconfig:CreateEnvironment", "appconfig:GetEnvironment", "appconfig:ListTagsForResource", "appconfig:TagResource", "iam:PassRole" ]
    },
    "update" : {
      "permissions" : [ "appconfig:UpdateEnvironment", "appconfig:TagResource", "appconfig:UntagResource", "iam:PassRole" ]
    },
    "list" : {
      "permissions" : [ "appconfig:ListEnvironments" ],
      "handlerSchema" : {
        "properties" : {
          "ApplicationId" : {
            "$ref" : "resource-schema.json#/properties/ApplicationId"
          }
        },
        "required" : [ "ApplicationId" ]
      }
    },
    "delete" : {
      "permissions" : [ "appconfig:GetEnvironment", "appconfig:DeleteEnvironment" ]
    }
  },
  "writeOnlyProperties" : [ "/properties/DeletionProtectionCheck" ],
  "additionalProperties" : false,
  "definitions" : {
    "Monitor" : {
      "description" : "Amazon CloudWatch alarm to monitor during the deployment process.",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "AlarmArn" : {
          "minLength" : 1,
          "description" : "Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.",
          "type" : "string",
          "maxLength" : 2048
        },
        "AlarmRoleArn" : {
          "minLength" : 20,
          "description" : "ARN of an AWS Identity and Access Management (IAM) role for AWS AppConfig to monitor AlarmArn.",
          "type" : "string",
          "maxLength" : 2048
        }
      },
      "required" : [ "AlarmArn" ]
    },
    "Tag" : {
      "description" : "Metadata to assign to the environment. Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key and an optional value, both of which you define.",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Value" : {
          "minLength" : 0,
          "description" : "The tag value can be up to 256 characters.",
          "type" : "string",
          "maxLength" : 256
        },
        "Key" : {
          "minLength" : 1,
          "description" : "The key-value string map. The valid character set is [a-zA-Z1-9+-=._:/]. The tag key can be up to 128 characters and must not start with aws:.",
          "type" : "string",
          "maxLength" : 128
        }
      },
      "required" : [ "Key", "Value" ]
    }
  },
  "properties" : {
    "EnvironmentId" : {
      "pattern" : "[a-z0-9]{4,7}",
      "description" : "The environment ID.",
      "type" : "string"
    },
    "Description" : {
      "minLength" : 0,
      "description" : "A description of the environment.",
      "type" : "string",
      "maxLength" : 1024
    },
    "Monitors" : {
      "minItems" : 0,
      "maxItems" : 5,
      "description" : "Amazon CloudWatch alarms to monitor during the deployment process.",
      "insertionOrder" : false,
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Monitor"
      }
    },
    "DeletionProtectionCheck" : {
      "description" : "On resource deletion this controls whether the Deletion Protection check should be applied, bypassed, or (the default) whether the behavior should be controlled by the account-level Deletion Protection setting. See https://docs.aws.amazon.com/appconfig/latest/userguide/deletion-protection.html",
      "type" : "string",
      "enum" : [ "ACCOUNT_DEFAULT", "APPLY", "BYPASS" ]
    },
    "ApplicationId" : {
      "pattern" : "[a-z0-9]{4,7}",
      "description" : "The application ID.",
      "type" : "string"
    },
    "Tags" : {
      "uniqueItems" : true,
      "description" : "Metadata to assign to the environment. Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key and an optional value, both of which you define.",
      "insertionOrder" : false,
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "Name" : {
      "minLength" : 1,
      "description" : "A name for the environment.",
      "type" : "string",
      "maxLength" : 64
    }
  }
}