{
  "typeName" : "AWS::Lightsail::DatabaseSnapshot",
  "description" : "Resource Type definition for AWS::Lightsail::DatabaseSnapshot",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-lightsail.git",
  "definitions" : {
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "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 -.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "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 -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "RelationalDatabaseName" : {
      "type" : "string",
      "description" : "The name of the database on which to base your new snapshot.",
      "pattern" : "^\\w[\\w\\-]*\\w$"
    },
    "RelationalDatabaseSnapshotName" : {
      "type" : "string",
      "description" : "The name for your new database snapshot.",
      "pattern" : "^\\w[\\w\\-]*\\w$",
      "minLength" : 2,
      "maxLength" : 255
    },
    "Tags" : {
      "type" : "array",
      "description" : "An array of key-value pairs to apply to this resource.",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "maxItems" : 50
    },
    "Arn" : {
      "type" : "string",
      "description" : "The Amazon Resource Name (ARN) of the database snapshot.",
      "pattern" : ".*\\S.*"
    },
    "CreatedAt" : {
      "type" : "string",
      "description" : "The timestamp when the database snapshot was created.",
      "format" : "date-time"
    },
    "Engine" : {
      "type" : "string",
      "description" : "The software of the database snapshot (for example, MySQL).",
      "pattern" : ".*\\S.*"
    },
    "EngineVersion" : {
      "type" : "string",
      "description" : "The database engine version for the database snapshot (for example, 5.7.23).",
      "pattern" : ".*\\S.*"
    },
    "FromRelationalDatabaseArn" : {
      "type" : "string",
      "description" : "The Amazon Resource Name (ARN) of the database from which the database snapshot was created.",
      "pattern" : ".*\\S.*"
    },
    "FromRelationalDatabaseBlueprintId" : {
      "type" : "string",
      "description" : "The blueprint ID of the database from which the database snapshot was created. A blueprint describes the major engine version of a database."
    },
    "FromRelationalDatabaseBundleId" : {
      "type" : "string",
      "description" : "The bundle ID of the database from which the database snapshot was created."
    },
    "FromRelationalDatabaseName" : {
      "type" : "string",
      "description" : "The name of the source database from which the database snapshot was created.",
      "pattern" : ".*\\S.*"
    },
    "Location" : {
      "type" : "object",
      "description" : "The Region name and Availability Zone where the database snapshot is located.",
      "properties" : {
        "AvailabilityZone" : {
          "type" : "string",
          "description" : "The Availability Zone where the database snapshot was created."
        },
        "RegionName" : {
          "type" : "string",
          "description" : "The AWS Region where the database snapshot was created."
        }
      },
      "additionalProperties" : false
    },
    "Name" : {
      "type" : "string",
      "description" : "The name of the database snapshot.",
      "pattern" : "^\\w[\\w\\-]*\\w$"
    },
    "ResourceType" : {
      "type" : "string",
      "description" : "The Lightsail resource type.",
      "enum" : [ "RelationalDatabaseSnapshot" ]
    },
    "SizeInGb" : {
      "type" : "integer",
      "description" : "The size of the disk in GB (for example, 32) for the database snapshot."
    },
    "State" : {
      "type" : "string",
      "description" : "The state of the database snapshot.",
      "pattern" : ".*\\S.*"
    },
    "SupportCode" : {
      "type" : "string",
      "description" : "The support code for the database snapshot. Include this code in your email to support when you have questions about a database snapshot in Lightsail. This code enables our support team to look up your Lightsail information more easily."
    }
  },
  "additionalProperties" : false,
  "required" : [ "RelationalDatabaseSnapshotName", "RelationalDatabaseName" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/CreatedAt", "/properties/Engine", "/properties/EngineVersion", "/properties/FromRelationalDatabaseArn", "/properties/FromRelationalDatabaseBlueprintId", "/properties/FromRelationalDatabaseBundleId", "/properties/FromRelationalDatabaseName", "/properties/Location", "/properties/Name", "/properties/ResourceType", "/properties/SizeInGb", "/properties/State", "/properties/SupportCode" ],
  "createOnlyProperties" : [ "/properties/RelationalDatabaseSnapshotName", "/properties/RelationalDatabaseName" ],
  "primaryIdentifier" : [ "/properties/RelationalDatabaseSnapshotName" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "lightsail:CreateRelationalDatabaseSnapshot", "lightsail:GetRelationalDatabaseSnapshot", "lightsail:TagResource" ]
    },
    "read" : {
      "permissions" : [ "lightsail:GetRelationalDatabaseSnapshot" ]
    },
    "update" : {
      "permissions" : [ "lightsail:GetRelationalDatabaseSnapshot", "lightsail:TagResource", "lightsail:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "lightsail:DeleteRelationalDatabaseSnapshot", "lightsail:GetRelationalDatabaseSnapshot" ]
    },
    "list" : {
      "permissions" : [ "lightsail:GetRelationalDatabaseSnapshots" ]
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "lightsail:TagResource", "lightsail:UntagResource" ]
  }
}