{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-lightsail-instance.json",
  "title": "AWSLightsailInstanceProperties",
  "description": "Resource Type definition for AWS::Lightsail::Instance. 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-instance.json",
    "sourceSha256": "08e78ffd93c56b30a9d59e226ea3532a2ecaa1f3d767caa5890aea416c0a6980"
  },
  "type": "object",
  "properties": {
    "Location": {
      "$ref": "#/$defs/Location"
    },
    "Hardware": {
      "$ref": "#/$defs/Hardware"
    },
    "State": {
      "$ref": "#/$defs/State"
    },
    "Networking": {
      "$ref": "#/$defs/Networking"
    },
    "InstanceName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][\\w\\-.]*[a-zA-Z0-9]$",
          "minLength": 1,
          "maxLength": 254
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The names to use for your new Lightsail instance."
    },
    "BundleId": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The bundle of specification information for your virtual private server (or instance ), including the pricing plan (e.g., micro_1_0 )."
    },
    "BlueprintId": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0 ). Use the get blueprints operation to return a list of available images (or blueprints )."
    },
    "AddOns": {
      "description": "An array of objects representing the add-ons to enable for the new instance.",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/AddOn"
      }
    },
    "UserData": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A launch script you can create that configures a server with additional user data. For example, you might want to run apt-get -y update."
    },
    "KeyPairName": {
      "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 your key pair."
    },
    "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::Instance",
  "createOnlyProperties": [
    "/properties/InstanceName",
    "/properties/BlueprintId",
    "/properties/BundleId",
    "/properties/AvailabilityZone"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-lightsail.git",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/InstanceName"
  ],
  "$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": "AWSLightsailInstanceTagDefinition",
      "additionalProperties": false
    },
    "ipv6Cidrs": {
      "description": "IPv6 Cidrs",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "type": "string"
      },
      "title": "AWSLightsailInstanceipv6CidrsDefinition"
    },
    "cidrs": {
      "description": "cidrs",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "type": "string"
      },
      "title": "AWSLightsailInstancecidrsDefinition"
    },
    "cidrListAliases": {
      "description": "cidr List Aliases",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "type": "string"
      },
      "title": "AWSLightsailInstancecidrListAliasesDefinition"
    },
    "AutoSnapshotAddOn": {
      "description": "An object that represents additional parameters when enabling or modifying the automatic snapshot add-on",
      "type": "object",
      "properties": {
        "SnapshotTimeOfDay": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[0-9]{2}:00$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The daily time when an automatic snapshot will be created."
        }
      },
      "title": "AWSLightsailInstanceAutoSnapshotAddOnDefinition",
      "additionalProperties": false
    },
    "AddOn": {
      "description": "A addon associate with a resource.",
      "type": "object",
      "properties": {
        "AddOnType": {
          "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 add-on type"
        },
        "Status": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "Enabling",
                "Disabling",
                "Enabled",
                "Terminating",
                "Terminated",
                "Disabled",
                "Failed"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Status of the Addon"
        },
        "AutoSnapshotAddOnRequest": {
          "$ref": "#/$defs/AutoSnapshotAddOn"
        }
      },
      "required": [
        "AddOnType"
      ],
      "title": "AWSLightsailInstanceAddOnDefinition",
      "additionalProperties": false
    },
    "Location": {
      "description": "Location of a resource.",
      "type": "object",
      "properties": {
        "AvailabilityZone": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Availability Zone in which to create your instance. Use the following format: us-east-2a (case sensitive). Be sure to add the include Availability Zones parameter to your request."
        },
        "RegionName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Region Name in which to create your instance."
        }
      },
      "title": "AWSLightsailInstanceLocationDefinition",
      "additionalProperties": false
    },
    "Disk": {
      "description": "Disk associated with the Instance.",
      "type": "object",
      "properties": {
        "DiskName": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9][\\w\\-.]*[a-zA-Z0-9]$",
              "minLength": 1,
              "maxLength": 254
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The names to use for your new Lightsail disk."
        },
        "SizeInGb": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Size of the disk attached to the Instance."
        },
        "IsSystemDisk": {
          "type": "boolean",
          "description": "Is the Attached disk is the system disk of the Instance."
        },
        "IOPS": {
          "type": "integer",
          "description": "IOPS of disk."
        },
        "Path": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Path of the disk attached to the instance."
        },
        "AttachedTo": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Instance attached to the disk."
        },
        "AttachmentState": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Attachment state of the disk."
        }
      },
      "required": [
        "DiskName",
        "Path"
      ],
      "title": "AWSLightsailInstanceDiskDefinition",
      "additionalProperties": false
    },
    "Hardware": {
      "description": "Hardware of the Instance.",
      "type": "object",
      "properties": {
        "CpuCount": {
          "type": "integer",
          "description": "CPU count of the Instance."
        },
        "RamSizeInGb": {
          "type": "integer",
          "description": "RAM Size of the Instance."
        },
        "Disks": {
          "description": "Disks attached to the Instance.",
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/Disk"
          }
        }
      },
      "title": "AWSLightsailInstanceHardwareDefinition",
      "additionalProperties": false
    },
    "State": {
      "description": "Current State of the Instance.",
      "type": "object",
      "properties": {
        "Code": {
          "type": "integer",
          "description": "Status code of the Instance."
        },
        "Name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Status code of the Instance."
        }
      },
      "title": "AWSLightsailInstanceStateDefinition",
      "additionalProperties": false
    },
    "Port": {
      "description": "Port of the Instance.",
      "type": "object",
      "properties": {
        "FromPort": {
          "type": "integer",
          "description": "From Port of the Instance."
        },
        "ToPort": {
          "type": "integer",
          "description": "To Port of the Instance."
        },
        "Protocol": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Port Protocol of the Instance."
        },
        "AccessFrom": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Access From Protocol of the Instance."
        },
        "AccessType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Access Type Protocol of the Instance."
        },
        "CommonName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "CommonName for Protocol of the Instance."
        },
        "AccessDirection": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Access Direction for Protocol of the Instance(inbound/outbound)."
        },
        "Ipv6Cidrs": {
          "$ref": "#/$defs/ipv6Cidrs"
        },
        "CidrListAliases": {
          "$ref": "#/$defs/cidrListAliases"
        },
        "Cidrs": {
          "$ref": "#/$defs/cidrs"
        }
      },
      "title": "AWSLightsailInstancePortDefinition",
      "additionalProperties": false
    },
    "MonthlyTransfer": {
      "description": "Monthly Transfer of the Instance.",
      "type": "object",
      "properties": {
        "GbPerMonthAllocated": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "GbPerMonthAllocated of the Instance."
        }
      },
      "title": "AWSLightsailInstanceMonthlyTransferDefinition",
      "additionalProperties": false
    },
    "Networking": {
      "description": "Networking of the Instance.",
      "type": "object",
      "properties": {
        "Ports": {
          "description": "Ports to the Instance.",
          "type": "array",
          "uniqueItems": true,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/Port"
          }
        },
        "MonthlyTransfer": {
          "$ref": "#/$defs/MonthlyTransfer"
        }
      },
      "required": [
        "Ports"
      ],
      "title": "AWSLightsailInstanceNetworkingDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "InstanceName",
    "BlueprintId",
    "BundleId"
  ],
  "readOnlyProperties": [
    "/properties/InstanceArn",
    "/properties/SshKeyName",
    "/properties/SupportCode",
    "/properties/ResourceType",
    "/properties/IsStaticIp",
    "/properties/PrivateIpAddress",
    "/properties/PublicIpAddress",
    "/properties/Location/AvailabilityZone",
    "/properties/Location/RegionName",
    "/properties/Hardware/CpuCount",
    "/properties/Hardware/RamSizeInGb",
    "/properties/State/Code",
    "/properties/State/Name",
    "/properties/UserName",
    "/properties/Networking/MonthlyTransfer/GbPerMonthAllocated"
  ],
  "writeOnlyProperties": [
    "/properties/UserData"
  ],
  "taggable": true
}
