{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-apigateway-deployment.json",
  "title": "AWSApiGatewayDeploymentProperties",
  "description": "Resource Type definition for AWS::ApiGateway::Deployment. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-apigateway>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-apigateway-deployment.json",
    "sourceSha256": "0e7c0cbac8a9bc80592a98fb9217b8e10a1c2b83076dd211585e0918f82a165b"
  },
  "type": "object",
  "properties": {
    "DeploymentCanarySettings": {
      "$ref": "#/$defs/DeploymentCanarySettings",
      "description": "Specifies settings for the canary deployment."
    },
    "Description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A description of the purpose of the API Gateway deployment."
    },
    "RestApiId": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ID of the RestApi resource to deploy. "
    },
    "StageDescription": {
      "$ref": "#/$defs/StageDescription",
      "description": "Configures the stage that API Gateway creates with this deployment."
    },
    "StageName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A name for the stage that API Gateway creates with this deployment. Use only alphanumeric characters."
    }
  },
  "typeName": "AWS::ApiGateway::Deployment",
  "writeOnlyProperties": [
    "/properties/StageName",
    "/properties/StageDescription",
    "/properties/DeploymentCanarySettings"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-apigateway",
  "$defs": {
    "StageDescription": {
      "type": "object",
      "title": "AWSApiGatewayDeploymentStageDescriptionDefinition",
      "properties": {
        "AccessLogSetting": {
          "description": "Specifies settings for logging access in this stage.",
          "$ref": "#/$defs/AccessLogSetting"
        },
        "CacheClusterEnabled": {
          "description": "Indicates whether cache clustering is enabled for the stage.",
          "type": "boolean"
        },
        "CacheClusterSize": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The size of the stage's cache cluster."
        },
        "CacheDataEncrypted": {
          "description": "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses. ",
          "type": "boolean"
        },
        "CacheTtlInSeconds": {
          "description": "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses. ",
          "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.",
          "type": "boolean"
        },
        "CanarySetting": {
          "description": "Specifies settings for the canary deployment in this stage.",
          "$ref": "#/$defs/CanarySetting"
        },
        "ClientCertificateId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage. "
        },
        "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"
        },
        "Description": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A description of the purpose of the stage."
        },
        "DocumentationVersion": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The version identifier of the API documentation snapshot."
        },
        "LoggingLevel": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The logging level for this method. For valid values, see the loggingLevel property of the Stage resource in the Amazon API Gateway API Reference. "
        },
        "MethodSettings": {
          "description": "Configures settings for all of the stage's methods.",
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/MethodSetting"
          }
        },
        "MetricsEnabled": {
          "description": "Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.",
          "type": "boolean"
        },
        "Tags": {
          "description": "An array of arbitrary tags (key-value pairs) to associate with the stage.",
          "type": "array",
          "uniqueItems": false,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/Tag"
          }
        },
        "ThrottlingBurstLimit": {
          "description": "The number of burst requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.",
          "type": "integer"
        },
        "ThrottlingRateLimit": {
          "description": "The number of steady-state requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.",
          "type": "number"
        },
        "TracingEnabled": {
          "description": "Specifies whether active tracing with X-ray is enabled for this stage.",
          "type": "boolean"
        },
        "Variables": {
          "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-._~:/?#&=,]+. ",
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            "[a-zA-Z0-9]+": {
              "type": "string"
            }
          }
        }
      },
      "additionalProperties": false
    },
    "DeploymentCanarySettings": {
      "type": "object",
      "title": "AWSApiGatewayDeploymentDeploymentCanarySettingsDefinition",
      "properties": {
        "PercentTraffic": {
          "description": "The percentage (0-100) of traffic diverted to a canary deployment.",
          "type": "number"
        },
        "StageVariableOverrides": {
          "description": "Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values. Duplicates are not allowed.",
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            "[a-zA-Z0-9]+": {
              "type": "string"
            }
          }
        },
        "UseStageCache": {
          "description": "Whether the canary deployment uses the stage cache.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "AccessLogSetting": {
      "type": "object",
      "title": "AWSApiGatewayDeploymentAccessLogSettingDefinition",
      "properties": {
        "DestinationArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "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-. "
        },
        "Format": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId. "
        }
      },
      "additionalProperties": false
    },
    "CanarySetting": {
      "type": "object",
      "title": "AWSApiGatewayDeploymentCanarySettingDefinition",
      "properties": {
        "PercentTraffic": {
          "description": "The percent (0-100) of traffic diverted to a canary deployment.",
          "type": "number"
        },
        "StageVariableOverrides": {
          "description": "Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values. ",
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            "[a-zA-Z0-9]+": {
              "type": "string"
            }
          }
        },
        "UseStageCache": {
          "description": "Whether the canary deployment uses the stage cache or not.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "Tag": {
      "type": "object",
      "title": "AWSApiGatewayDeploymentTagDefinition",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The key name of the tag"
        },
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for the tag"
        }
      },
      "required": [
        "Value",
        "Key"
      ],
      "additionalProperties": false
    },
    "MethodSetting": {
      "type": "object",
      "title": "AWSApiGatewayDeploymentMethodSettingDefinition",
      "properties": {
        "CacheDataEncrypted": {
          "description": "Indicates whether the cached responses are encrypted",
          "type": "boolean"
        },
        "CacheTtlInSeconds": {
          "description": "The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses. ",
          "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.",
          "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"
        },
        "HttpMethod": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The HTTP method."
        },
        "LoggingLevel": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The logging level for this method. For valid values, see the loggingLevel property of the Stage resource in the Amazon API Gateway API Reference. "
        },
        "MetricsEnabled": {
          "description": "Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.",
          "type": "boolean"
        },
        "ResourcePath": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The resource path for this method. Forward slashes (/) are encoded as ~1 and the initial slash must include a forward slash. "
        },
        "ThrottlingBurstLimit": {
          "description": "The number of burst requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.",
          "type": "integer"
        },
        "ThrottlingRateLimit": {
          "description": "The number of steady-state requests per second that API Gateway permits across all APIs, stages, and methods in your AWS account.",
          "type": "number"
        }
      },
      "additionalProperties": false
    }
  },
  "readOnlyProperties": [
    "/properties/DeploymentId"
  ],
  "additionalProperties": false,
  "taggable": true,
  "required": [
    "RestApiId"
  ],
  "createOnlyProperties": [
    "/properties/DeploymentCanarySettings",
    "/properties/RestApiId"
  ],
  "primaryIdentifier": [
    "/properties/DeploymentId",
    "/properties/RestApiId"
  ]
}
