{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-apigateway-stage.json",
  "title": "AWSApiGatewayStageProperties",
  "description": "Resource Type definition for AWS::ApiGateway::Stage. 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-stage.json",
    "sourceSha256": "fc093b83de3e96bbb7220708bd3ab498948c59f075f47b1c31a7a9fbfe0b0f72"
  },
  "type": "object",
  "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 stage's cache cluster size."
    },
    "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 ID of the client certificate that API Gateway uses to call your integration endpoints in the stage. "
    },
    "DeploymentId": {
      "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 deployment that the stage is associated with. This parameter is required to create a stage. "
    },
    "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 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 ID of the API documentation snapshot."
    },
    "MethodSettings": {
      "description": "Settings for all methods in the stage.",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/MethodSetting"
      }
    },
    "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 that you're deploying with this stage."
    },
    "StageName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI)."
    },
    "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"
      }
    },
    "TracingEnabled": {
      "description": "Specifies whether active X-Ray tracing is enabled for this stage.",
      "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.",
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "[a-zA-Z0-9]+": {
          "type": "string"
        }
      }
    }
  },
  "typeName": "AWS::ApiGateway::Stage",
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-apigateway",
  "$defs": {
    "CanarySetting": {
      "description": "Specifies settings for the canary deployment in this stage.",
      "type": "object",
      "title": "AWSApiGatewayStageCanarySettingDefinition",
      "properties": {
        "DeploymentId": {
          "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 deployment that the stage points to."
        },
        "PercentTraffic": {
          "description": "The percentage (0-100) of traffic diverted to a canary deployment.",
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "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
    },
    "AccessLogSetting": {
      "description": "Specifies settings for logging access in this stage.",
      "type": "object",
      "title": "AWSApiGatewayStageAccessLogSettingDefinition",
      "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-. This parameter is required to enable access logging."
        },
        "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 (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."
        }
      },
      "additionalProperties": false
    },
    "MethodSetting": {
      "description": "Configures settings for all methods in a stage.",
      "type": "object",
      "title": "AWSApiGatewayStageMethodSettingDefinition",
      "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. You can use an asterisk (*) as a wildcard to apply method settings to multiple methods."
        },
        "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 (https://docs.aws.amazon.com/apigateway/api-reference/resource/stage/#loggingLevel) 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. For example, the path value /resource/subresource must be encoded as /~1resource~1subresource. To specify the root path, use only a slash (/). You can use an asterisk (*) as a wildcard to apply method settings to multiple methods."
        },
        "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",
          "minimum": 0
        },
        "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",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "Tag": {
      "description": "Identify and categorize resources.",
      "type": "object",
      "title": "AWSApiGatewayStageTagDefinition",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$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. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:."
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    }
  },
  "primaryIdentifier": [
    "/properties/RestApiId",
    "/properties/StageName"
  ],
  "additionalProperties": false,
  "required": [
    "RestApiId"
  ],
  "createOnlyProperties": [
    "/properties/RestApiId",
    "/properties/StageName"
  ]
}
