{
  "typeName" : "AWS::ApiGateway::Stage",
  "description" : "The ``AWS::ApiGateway::Stage`` resource creates a stage for a deployment.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-apigateway",
  "additionalProperties" : false,
  "properties" : {
    "AccessLogSetting" : {
      "description" : "",
      "$ref" : "#/definitions/AccessLogSetting"
    },
    "CacheClusterEnabled" : {
      "description" : "",
      "type" : "boolean"
    },
    "CacheClusterSize" : {
      "description" : "",
      "type" : "string"
    },
    "CanarySetting" : {
      "description" : "",
      "$ref" : "#/definitions/CanarySetting"
    },
    "ClientCertificateId" : {
      "description" : "",
      "type" : "string"
    },
    "DeploymentId" : {
      "description" : "",
      "type" : "string"
    },
    "Description" : {
      "description" : "",
      "type" : "string"
    },
    "DocumentationVersion" : {
      "description" : "",
      "type" : "string"
    },
    "MethodSettings" : {
      "description" : "",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/MethodSetting"
      }
    },
    "RestApiId" : {
      "description" : "",
      "type" : "string"
    },
    "StageName" : {
      "description" : "",
      "type" : "string"
    },
    "Tags" : {
      "description" : "",
      "type" : "array",
      "uniqueItems" : false,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "TracingEnabled" : {
      "description" : "",
      "type" : "boolean"
    },
    "Variables" : {
      "description" : "A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value. Variable names are limited to alphanumeric characters. Values must match the following regular expression: ``[A-Za-z0-9-._~:/?#&=,]+``.",
      "type" : "object",
      "additionalProperties" : false,
      "patternProperties" : {
        "[a-zA-Z0-9]+" : {
          "type" : "string"
        }
      }
    }
  },
  "definitions" : {
    "CanarySetting" : {
      "description" : "",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "DeploymentId" : {
          "description" : "",
          "type" : "string"
        },
        "PercentTraffic" : {
          "description" : "",
          "type" : "number",
          "minimum" : 0,
          "maximum" : 100
        },
        "StageVariableOverrides" : {
          "description" : "",
          "type" : "object",
          "additionalProperties" : false,
          "patternProperties" : {
            "[a-zA-Z0-9]+" : {
              "type" : "string"
            }
          }
        },
        "UseStageCache" : {
          "description" : "",
          "type" : "boolean"
        }
      }
    },
    "AccessLogSetting" : {
      "description" : "The ``AccessLogSetting`` property type specifies settings for logging access in this stage.\n ``AccessLogSetting`` is a property of the [AWS::ApiGateway::Stage](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html) resource.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "DestinationArn" : {
          "description" : "The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with ``amazon-apigateway-``. This parameter is required to enable access logging.",
          "type" : "string"
        },
        "Format" : {
          "description" : "A single line format of the access logs of data, as specified by selected [$context variables](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference). The format must include at least ``$context.requestId``. This parameter is required to enable access logging.",
          "type" : "string"
        }
      }
    },
    "MethodSetting" : {
      "description" : "The ``MethodSetting`` property type configures settings for all methods in a stage.\n The ``MethodSettings`` property of the ``AWS::ApiGateway::Stage`` resource contains a list of ``MethodSetting`` property types.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "CacheDataEncrypted" : {
          "description" : "",
          "type" : "boolean"
        },
        "CacheTtlInSeconds" : {
          "description" : "",
          "type" : "integer"
        },
        "CachingEnabled" : {
          "description" : "",
          "type" : "boolean"
        },
        "DataTraceEnabled" : {
          "description" : "",
          "type" : "boolean"
        },
        "HttpMethod" : {
          "description" : "The HTTP method. To apply settings to multiple resources and methods, specify an asterisk (``*``) for the ``HttpMethod`` and ``/*`` for the ``ResourcePath``. This parameter is required when you specify a ``MethodSetting``.",
          "type" : "string"
        },
        "LoggingLevel" : {
          "description" : "",
          "type" : "string"
        },
        "MetricsEnabled" : {
          "description" : "",
          "type" : "boolean"
        },
        "ResourcePath" : {
          "description" : "The resource path for this method. Forward slashes (``/``) are encoded as ``~1`` and the initial slash must include a forward slash. For example, the path value ``/resource/subresource`` must be encoded as ``/~1resource~1subresource``. To specify the root path, use only a slash (``/``). To apply settings to multiple resources and methods, specify an asterisk (``*``) for the ``HttpMethod`` and ``/*`` for the ``ResourcePath``. This parameter is required when you specify a ``MethodSetting``.",
          "type" : "string"
        },
        "ThrottlingBurstLimit" : {
          "description" : "",
          "type" : "integer",
          "minimum" : 0
        },
        "ThrottlingRateLimit" : {
          "description" : "",
          "type" : "number",
          "minimum" : 0
        }
      }
    },
    "Tag" : {
      "description" : "An array of key-value pairs to apply to this resource.\n For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "description" : "A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "description" : "The value for the specified tag key.",
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ]
    }
  },
  "required" : [ "RestApiId" ],
  "createOnlyProperties" : [ "/properties/RestApiId", "/properties/StageName" ],
  "primaryIdentifier" : [ "/properties/RestApiId", "/properties/StageName" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "apigateway:PUT", "apigateway:DELETE", "apigateway:GET" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "apigateway:POST", "apigateway:PATCH", "apigateway:GET", "apigateway:PUT" ]
    },
    "read" : {
      "permissions" : [ "apigateway:GET" ]
    },
    "update" : {
      "permissions" : [ "apigateway:GET", "apigateway:PATCH", "apigateway:PUT", "apigateway:DELETE" ]
    },
    "delete" : {
      "permissions" : [ "apigateway:DELETE" ]
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "RestApiId" : {
            "$ref" : "resource-schema.json#/properties/RestApiId"
          }
        },
        "required" : [ "RestApiId" ]
      },
      "permissions" : [ "apigateway:GET" ]
    }
  }
}