{
  "typeName" : "AWS::Config::StoredQuery",
  "description" : "Resource Type definition for AWS::Config::StoredQuery",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-config.git",
  "additionalProperties" : false,
  "properties" : {
    "QueryArn" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 500
    },
    "QueryId" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 36,
      "pattern" : "^\\S+$"
    },
    "QueryName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 64,
      "pattern" : "^[a-zA-Z0-9-_]+$"
    },
    "QueryDescription" : {
      "type" : "string",
      "minLength" : 0,
      "maxLength" : 256,
      "pattern" : "[\\s\\S]*"
    },
    "QueryExpression" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 4096,
      "pattern" : "[\\s\\S]*"
    },
    "Tags" : {
      "description" : "The tags for the stored query.",
      "type" : "array",
      "maxItems" : 50,
      "uniqueItems" : true,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "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 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" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 0 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" : 0,
          "maxLength" : 256
        }
      },
      "additionalProperties" : false,
      "required" : [ "Value", "Key" ]
    }
  },
  "required" : [ "QueryName", "QueryExpression" ],
  "readOnlyProperties" : [ "/properties/QueryId", "/properties/QueryArn" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "config:TagResource", "config:UntagResource", "config:ListTagsForResource" ]
  },
  "createOnlyProperties" : [ "/properties/QueryName" ],
  "primaryIdentifier" : [ "/properties/QueryName" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "config:PutStoredQuery", "config:GetStoredQuery", "config:TagResource" ]
    },
    "read" : {
      "permissions" : [ "config:GetStoredQuery", "config:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "config:PutStoredQuery", "config:GetStoredQuery", "config:TagResource", "config:UntagResource", "config:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "config:DeleteStoredQuery", "config:UntagResource" ]
    },
    "list" : {
      "permissions" : [ "config:ListStoredQueries" ]
    }
  }
}