{
  "typeName" : "AWS::Outposts::Site",
  "description" : "Definition of AWS::Outposts::Site Resource Type",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-outposts",
  "definitions" : {
    "Address" : {
      "type" : "object",
      "properties" : {
        "ContactName" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 255,
          "pattern" : "^\\S[\\S ]*$"
        },
        "ContactPhoneNumber" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 20,
          "pattern" : "^[\\S ]+$"
        },
        "AddressLine1" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 180,
          "pattern" : "^\\S[\\S ]*$"
        },
        "AddressLine2" : {
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 60,
          "pattern" : "^\\S[\\S ]*$"
        },
        "AddressLine3" : {
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 60,
          "pattern" : "^\\S[\\S ]*$"
        },
        "City" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 50,
          "pattern" : "^\\S[\\S ]*$"
        },
        "StateOrRegion" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 50,
          "pattern" : "^\\S[\\S ]*$"
        },
        "DistrictOrCounty" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 60,
          "pattern" : "^\\S[\\S ]*$"
        },
        "PostalCode" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 20,
          "pattern" : "^[a-zA-Z0-9 -]+$"
        },
        "CountryCode" : {
          "type" : "string",
          "minLength" : 2,
          "maxLength" : 2,
          "pattern" : "^[A-Z]{2}$"
        },
        "Municipality" : {
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 180,
          "pattern" : "^\\S[\\S ]*$"
        }
      },
      "required" : [ "ContactName", "ContactPhoneNumber", "AddressLine1", "City", "StateOrRegion", "PostalCode", "CountryCode" ],
      "additionalProperties" : false
    },
    "RackPhysicalProperties" : {
      "type" : "object",
      "properties" : {
        "PowerDrawKva" : {
          "type" : "string",
          "enum" : [ "POWER_5_KVA", "POWER_10_KVA", "POWER_15_KVA", "POWER_30_KVA" ]
        },
        "PowerPhase" : {
          "type" : "string",
          "enum" : [ "SINGLE_PHASE", "THREE_PHASE" ]
        },
        "PowerConnector" : {
          "type" : "string",
          "enum" : [ "L6_30P", "IEC309", "AH530P7W", "AH532P6W", "CS8365C" ]
        },
        "PowerFeedDrop" : {
          "type" : "string",
          "enum" : [ "ABOVE_RACK", "BELOW_RACK" ]
        },
        "UplinkGbps" : {
          "type" : "string",
          "enum" : [ "UPLINK_1G", "UPLINK_10G", "UPLINK_40G", "UPLINK_100G" ]
        },
        "UplinkCount" : {
          "type" : "string",
          "enum" : [ "UPLINK_COUNT_1", "UPLINK_COUNT_2", "UPLINK_COUNT_3", "UPLINK_COUNT_4", "UPLINK_COUNT_5", "UPLINK_COUNT_6", "UPLINK_COUNT_7", "UPLINK_COUNT_8", "UPLINK_COUNT_12", "UPLINK_COUNT_16" ]
        },
        "FiberOpticCableType" : {
          "type" : "string",
          "enum" : [ "SINGLE_MODE", "MULTI_MODE" ]
        },
        "OpticalStandard" : {
          "type" : "string",
          "enum" : [ "OPTIC_10GBASE_SR", "OPTIC_10GBASE_IR", "OPTIC_10GBASE_LR", "OPTIC_40GBASE_SR", "OPTIC_40GBASE_ESR", "OPTIC_40GBASE_IR4_LR4L", "OPTIC_40GBASE_LR4", "OPTIC_100GBASE_SR4", "OPTIC_100GBASE_CWDM4", "OPTIC_100GBASE_LR4", "OPTIC_100G_PSM4_MSA", "OPTIC_1000BASE_LX", "OPTIC_1000BASE_SX" ]
        },
        "MaximumSupportedWeightLbs" : {
          "type" : "string",
          "enum" : [ "NO_LIMIT", "MAX_1400_LBS", "MAX_1600_LBS", "MAX_1800_LBS", "MAX_2000_LBS" ]
        }
      },
      "additionalProperties" : false
    },
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128,
          "pattern" : "^(?!aws:)[a-zA-Z+-=._:/]+$"
        },
        "Value" : {
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 256,
          "pattern" : "^[\\S \\n]+$"
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "SiteId" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255,
      "pattern" : "^(arn:aws([a-z-]+)?:outposts:[a-z\\d-]+:\\d{12}:site/)?(os-[a-f0-9]{17})$"
    },
    "SiteArn" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255,
      "pattern" : "^arn:aws([a-z-]+)?:outposts:[a-z\\d-]+:\\d{12}:site/(os-[a-f0-9]{17})$"
    },
    "Name" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1000,
      "pattern" : "^[\\S ]+$"
    },
    "Description" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1001,
      "pattern" : "^[\\S ]+$"
    },
    "Notes" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2000,
      "pattern" : "^[\\S \\n]+$"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "OperatingAddress" : {
      "$ref" : "#/definitions/Address"
    },
    "ShippingAddress" : {
      "$ref" : "#/definitions/Address"
    },
    "RackPhysicalProperties" : {
      "$ref" : "#/definitions/RackPhysicalProperties"
    }
  },
  "required" : [ "Name" ],
  "readOnlyProperties" : [ "/properties/SiteId", "/properties/SiteArn" ],
  "createOnlyProperties" : [ "/properties/OperatingAddress", "/properties/ShippingAddress" ],
  "primaryIdentifier" : [ "/properties/SiteArn" ],
  "additionalIdentifiers" : [ [ "/properties/SiteId" ] ],
  "additionalProperties" : false,
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "outposts:TagResource", "outposts:UntagResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "outposts:CreateSite", "outposts:GetSite", "outposts:TagResource" ]
    },
    "read" : {
      "permissions" : [ "outposts:GetSite", "outposts:GetSiteAddress" ]
    },
    "update" : {
      "permissions" : [ "outposts:UpdateSite", "outposts:GetSite", "outposts:UpdateSiteRackPhysicalProperties", "outposts:TagResource", "outposts:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "outposts:DeleteSite" ]
    },
    "list" : {
      "permissions" : [ "outposts:ListSites" ]
    }
  }
}