{
  "tagging" : {
    "taggable" : false
  },
  "typeName" : "AWS::ApiGateway::Deployment",
  "readOnlyProperties" : [ "/properties/DeploymentId" ],
  "description" : "The ``AWS::ApiGateway::Deployment`` resource deploys an API Gateway ``RestApi`` resource to a stage so that clients can call the API over the internet. The stage acts as an environment.",
  "createOnlyProperties" : [ "/properties/DeploymentCanarySettings", "/properties/RestApiId" ],
  "primaryIdentifier" : [ "/properties/DeploymentId", "/properties/RestApiId" ],
  "required" : [ "RestApiId" ],
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-apigateway",
  "handlers" : {
    "read" : {
      "permissions" : [ "apigateway:GET" ]
    },
    "create" : {
      "permissions" : [ "apigateway:POST", "apigateway:PATCH", "apigateway:PUT", "apigateway:GET" ]
    },
    "update" : {
      "permissions" : [ "apigateway:PATCH", "apigateway:GET", "apigateway:PUT", "apigateway:DELETE" ]
    },
    "list" : {
      "permissions" : [ "apigateway:GET" ],
      "handlerSchema" : {
        "properties" : {
          "RestApiId" : {
            "$ref" : "resource-schema.json#/properties/RestApiId"
          }
        },
        "required" : [ "RestApiId" ]
      }
    },
    "delete" : {
      "permissions" : [ "apigateway:GET", "apigateway:DELETE" ]
    }
  },
  "writeOnlyProperties" : [ "/properties/StageName", "/properties/StageDescription", "/properties/DeploymentCanarySettings" ],
  "additionalProperties" : false,
  "definitions" : {
    "MethodSetting" : {
      "description" : "The ``MethodSetting`` property type configures settings for all methods in a stage.\n The ``MethodSettings`` property of the [Amazon API Gateway Deployment StageDescription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html) property type contains a list of ``MethodSetting`` property types.",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "CacheTtlInSeconds" : {
          "description" : "",
          "type" : "integer"
        },
        "LoggingLevel" : {
          "description" : "",
          "type" : "string"
        },
        "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 (``/``).",
          "type" : "string"
        },
        "CacheDataEncrypted" : {
          "description" : "",
          "type" : "boolean"
        },
        "DataTraceEnabled" : {
          "description" : "",
          "type" : "boolean"
        },
        "ThrottlingBurstLimit" : {
          "description" : "",
          "type" : "integer"
        },
        "CachingEnabled" : {
          "description" : "",
          "type" : "boolean"
        },
        "MetricsEnabled" : {
          "description" : "",
          "type" : "boolean"
        },
        "HttpMethod" : {
          "description" : "The HTTP method.",
          "type" : "string"
        },
        "ThrottlingRateLimit" : {
          "description" : "",
          "type" : "number"
        }
      }
    },
    "StageDescription" : {
      "description" : "``StageDescription`` is a property of the [AWS::ApiGateway::Deployment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-deployment.html) resource that configures a deployment stage.",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "CacheTtlInSeconds" : {
          "description" : "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses.",
          "type" : "integer"
        },
        "Description" : {
          "description" : "A description of the purpose of the stage.",
          "type" : "string"
        },
        "LoggingLevel" : {
          "description" : "The logging level for this method. For valid values, see the ``loggingLevel`` property of the [MethodSetting](https://docs.aws.amazon.com/apigateway/latest/api/API_MethodSetting.html) resource in the *Amazon API Gateway API Reference*.",
          "type" : "string"
        },
        "CanarySetting" : {
          "description" : "Specifies settings for the canary deployment in this stage.",
          "$ref" : "#/definitions/CanarySetting"
        },
        "ThrottlingRateLimit" : {
          "description" : "The target request steady-state rate limit. For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide*.",
          "type" : "number"
        },
        "ClientCertificateId" : {
          "description" : "The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.",
          "type" : "string"
        },
        "Variables" : {
          "patternProperties" : {
            "[a-zA-Z0-9]+" : {
              "type" : "string"
            }
          },
          "description" : "A map that defines the stage variables. Variable names must consist of alphanumeric characters, and the values must match the following regular expression: ``[A-Za-z0-9-._~:/?#&=,]+``.",
          "additionalProperties" : false,
          "type" : "object"
        },
        "DocumentationVersion" : {
          "description" : "The version identifier of the API documentation snapshot.",
          "type" : "string"
        },
        "CacheDataEncrypted" : {
          "description" : "Indicates whether the cached responses are encrypted.",
          "type" : "boolean"
        },
        "DataTraceEnabled" : {
          "description" : "Indicates whether data trace logging is enabled for methods in the stage. API Gateway pushes these logs to Amazon CloudWatch Logs.",
          "type" : "boolean"
        },
        "ThrottlingBurstLimit" : {
          "description" : "The target request burst rate limit. This allows more requests through for a period of time than the target rate limit. For more information, see [Manage API Request Throttling](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html) in the *API Gateway Developer Guide*.",
          "type" : "integer"
        },
        "CachingEnabled" : {
          "description" : "Indicates whether responses are cached and returned for requests. You must enable a cache cluster on the stage to cache responses. For more information, see [Enable API Gateway Caching in a Stage to Enhance API Performance](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html) in the *API Gateway Developer Guide*.",
          "type" : "boolean"
        },
        "TracingEnabled" : {
          "description" : "Specifies whether active tracing with X-ray is enabled for this stage.\n For more information, see [Trace API Gateway API Execution with X-Ray](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-xray.html) in the *API Gateway Developer Guide*.",
          "type" : "boolean"
        },
        "MethodSettings" : {
          "uniqueItems" : true,
          "description" : "Configures settings for all of the stage's methods.",
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/MethodSetting"
          }
        },
        "AccessLogSetting" : {
          "description" : "Specifies settings for logging access in this stage.",
          "$ref" : "#/definitions/AccessLogSetting"
        },
        "CacheClusterSize" : {
          "description" : "The size of the stage's cache cluster. For more information, see [cacheClusterSize](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateStage.html#apigw-CreateStage-request-cacheClusterSize) in the *API Gateway API Reference*.",
          "type" : "string"
        },
        "MetricsEnabled" : {
          "description" : "Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.",
          "type" : "boolean"
        },
        "Tags" : {
          "uniqueItems" : false,
          "description" : "An array of arbitrary tags (key-value pairs) to associate with the stage.",
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Tag"
          }
        },
        "CacheClusterEnabled" : {
          "description" : "",
          "type" : "boolean"
        }
      }
    },
    "CanarySetting" : {
      "description" : "The ``CanarySetting`` property type specifies settings for the canary deployment in this stage.\n ``CanarySetting`` is a property of the [StageDescription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html) property type.",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "StageVariableOverrides" : {
          "patternProperties" : {
            "[a-zA-Z0-9]+" : {
              "type" : "string"
            }
          },
          "description" : "",
          "additionalProperties" : false,
          "type" : "object"
        },
        "PercentTraffic" : {
          "description" : "",
          "type" : "number"
        },
        "UseStageCache" : {
          "description" : "",
          "type" : "boolean"
        }
      }
    },
    "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).",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Value" : {
          "description" : "The value for the specified tag key.",
          "type" : "string"
        },
        "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"
        }
      },
      "required" : [ "Value", "Key" ]
    },
    "DeploymentCanarySettings" : {
      "description" : "The ``DeploymentCanarySettings`` property type specifies settings for the canary deployment.",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "StageVariableOverrides" : {
          "patternProperties" : {
            "[a-zA-Z0-9]+" : {
              "type" : "string"
            }
          },
          "description" : "",
          "additionalProperties" : false,
          "type" : "object"
        },
        "PercentTraffic" : {
          "description" : "",
          "type" : "number"
        },
        "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 [StageDescription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html) property type.",
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Format" : {
          "description" : "",
          "type" : "string"
        },
        "DestinationArn" : {
          "description" : "",
          "type" : "string"
        }
      }
    }
  },
  "properties" : {
    "DeploymentId" : {
      "description" : "",
      "type" : "string"
    },
    "Description" : {
      "description" : "",
      "type" : "string"
    },
    "StageDescription" : {
      "description" : "The description of the Stage resource for the Deployment resource to create. To specify a stage description, you must also provide a stage name.",
      "$ref" : "#/definitions/StageDescription"
    },
    "StageName" : {
      "description" : "",
      "type" : "string"
    },
    "RestApiId" : {
      "description" : "",
      "type" : "string"
    },
    "DeploymentCanarySettings" : {
      "description" : "",
      "$ref" : "#/definitions/DeploymentCanarySettings"
    }
  }
}