{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-lightsail-container.json",
  "title": "AWSLightsailContainerProperties",
  "description": "Resource Type definition for AWS::Lightsail::Container. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-lightsail.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-lightsail-container.json",
    "sourceSha256": "02731d1ea863c713f72a35c37aae0f3b91dbdf4dd34b229d766a956a76e5cd9b"
  },
  "type": "object",
  "properties": {
    "ServiceName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-z0-9]{1,2}|[a-z0-9][a-z0-9-]+[a-z0-9]$",
          "minLength": 1,
          "maxLength": 63
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name for the container service."
    },
    "Power": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The power specification for the container service."
    },
    "Scale": {
      "description": "The scale specification for the container service.",
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "PublicDomainNames": {
      "description": "The public domain names to use with the container service, such as example.com and www.example.com.",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/PublicDomainName"
      }
    },
    "ContainerServiceDeployment": {
      "$ref": "#/$defs/ContainerServiceDeployment",
      "description": "Describes a container deployment configuration of an Amazon Lightsail container service."
    },
    "IsDisabled": {
      "description": "A Boolean value to indicate whether the container service is disabled.",
      "type": "boolean"
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this resource.",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::Lightsail::Container",
  "createOnlyProperties": [
    "/properties/ServiceName"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-lightsail.git",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/ServiceName"
  ],
  "$defs": {
    "Tag": {
      "description": "A key-value pair to associate with a resource.",
      "type": "object",
      "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:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        },
        "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:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        }
      },
      "required": [
        "Key"
      ],
      "title": "AWSLightsailContainerTagDefinition",
      "additionalProperties": false
    },
    "HealthCheckConfig": {
      "description": "Describes the health check configuration of an Amazon Lightsail container service.",
      "type": "object",
      "properties": {
        "HealthyThreshold": {
          "type": "integer",
          "description": "The number of consecutive health checks successes required before moving the container to the Healthy state. The default value is 2."
        },
        "IntervalSeconds": {
          "type": "integer",
          "description": "The approximate interval, in seconds, between health checks of an individual container. You can specify between 5 and 300 seconds. The default value is 5."
        },
        "Path": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The path on the container on which to perform the health check. The default value is /."
        },
        "SuccessCodes": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The HTTP codes to use when checking for a successful response from a container. You can specify values between 200 and 499. You can specify multiple values (for example, 200,202) or a range of values (for example, 200-299)."
        },
        "TimeoutSeconds": {
          "type": "integer",
          "description": "The amount of time, in seconds, during which no response means a failed health check. You can specify between 2 and 60 seconds. The default value is 2."
        },
        "UnhealthyThreshold": {
          "type": "integer",
          "description": "The number of consecutive health check failures required before moving the container to the Unhealthy state. The default value is 2."
        }
      },
      "title": "AWSLightsailContainerHealthCheckConfigDefinition",
      "additionalProperties": false
    },
    "PublicEndpoint": {
      "description": "Describes the settings of a public endpoint for an Amazon Lightsail container service.",
      "type": "object",
      "properties": {
        "ContainerName": {
          "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 container for the endpoint."
        },
        "ContainerPort": {
          "type": "integer",
          "description": "The port of the container to which traffic is forwarded to."
        },
        "HealthCheckConfig": {
          "$ref": "#/$defs/HealthCheckConfig",
          "description": "An object that describes the health check configuration of the container."
        }
      },
      "title": "AWSLightsailContainerPublicEndpointDefinition",
      "additionalProperties": false
    },
    "EnvironmentVariable": {
      "type": "object",
      "properties": {
        "Variable": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSLightsailContainerEnvironmentVariableDefinition",
      "additionalProperties": false
    },
    "PortInfo": {
      "type": "object",
      "properties": {
        "Port": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Protocol": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSLightsailContainerPortInfoDefinition",
      "additionalProperties": false
    },
    "Container": {
      "description": "Describes the settings of a container that will be launched, or that is launched, to an Amazon Lightsail container service.",
      "type": "object",
      "properties": {
        "ContainerName": {
          "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 container."
        },
        "Command": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "type": "string"
          },
          "description": "The launch command for the container."
        },
        "Environment": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/EnvironmentVariable"
          },
          "description": "The environment variables of the container."
        },
        "Image": {
          "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 image used for the container."
        },
        "Ports": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/PortInfo"
          },
          "description": "The open firewall ports of the container."
        }
      },
      "title": "AWSLightsailContainerContainerDefinition",
      "additionalProperties": false
    },
    "ContainerServiceDeployment": {
      "description": "Describes a container deployment configuration of an Amazon Lightsail container service.",
      "type": "object",
      "properties": {
        "Containers": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/Container"
          },
          "description": "An object that describes the configuration for the containers of the deployment."
        },
        "PublicEndpoint": {
          "$ref": "#/$defs/PublicEndpoint",
          "description": "An object that describes the endpoint of the deployment."
        }
      },
      "title": "AWSLightsailContainerContainerServiceDeploymentDefinition",
      "additionalProperties": false
    },
    "PublicDomainName": {
      "description": "The public domain name to use with the container service, such as example.com and www.example.com.",
      "type": "object",
      "properties": {
        "CertificateName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "DomainNames": {
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "type": "string"
          },
          "description": "An object that describes the configuration for the containers of the deployment."
        }
      },
      "title": "AWSLightsailContainerPublicDomainNameDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "ServiceName",
    "Power",
    "Scale"
  ],
  "readOnlyProperties": [
    "/properties/ContainerArn",
    "/properties/Url"
  ],
  "taggable": true
}
