{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/KeyName"
 ],
 "definitions": {
  "AndroidApp": {
   "additionalProperties": false,
   "properties": {
    "CertificateFingerprint": {
     "maxLength": 59,
     "minLength": 59,
     "pattern": "^([A-Fa-f0-9]{2}:){19}[A-Fa-f0-9]{2}$",
     "type": "string"
    },
    "Package": {
     "maxLength": 255,
     "minLength": 1,
     "pattern": "^([A-Za-z][A-Za-z\\d_]*\\.)+[A-Za-z][A-Za-z\\d_]*$",
     "type": "string"
    }
   },
   "required": [
    "CertificateFingerprint",
    "Package"
   ],
   "type": "object"
  },
  "ApiKeyRestrictions": {
   "additionalProperties": false,
   "properties": {
    "AllowActions": {
     "insertionOrder": false,
     "items": {
      "maxLength": 200,
      "minLength": 5,
      "pattern": "^(geo|geo-routes|geo-places|geo-maps):\\w*\\*?$",
      "type": "string"
     },
     "maxItems": 24,
     "minItems": 1,
     "type": "array"
    },
    "AllowAndroidApps": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/AndroidApp"
     },
     "maxItems": 5,
     "minItems": 0,
     "type": "array"
    },
    "AllowAppleApps": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/AppleApp"
     },
     "maxItems": 5,
     "minItems": 0,
     "type": "array"
    },
    "AllowReferers": {
     "insertionOrder": false,
     "items": {
      "maxLength": 253,
      "pattern": "^([\\w!$&()*+,./:;=?@\\x60-]|%([\\dA-Fa-f]{2}|[\\dA-Fa-f]?\\*))+$",
      "type": "string"
     },
     "maxItems": 5,
     "minItems": 0,
     "type": "array"
    },
    "AllowResources": {
     "insertionOrder": false,
     "items": {
      "maxLength": 1600,
      "pattern": "(^arn(:[a-z0-9]+([.-][a-z0-9]+)*):geo(:([a-z0-9]+([.-][a-z0-9]+)*))(:[0-9]+):((\\*)|([-a-z]+[/][*-._\\w]+))$)|(^arn(:[a-z0-9]+([.-][a-z0-9]+)*):(geo-routes|geo-places|geo-maps)(:((\\*)|([a-z0-9]+([.-][a-z0-9]+)*)))::((provider[\\/][*-._\\w]+))$)",
      "type": "string"
     },
     "maxItems": 8,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "AllowActions",
    "AllowResources"
   ],
   "type": "object"
  },
  "AppleApp": {
   "additionalProperties": false,
   "properties": {
    "BundleId": {
     "maxLength": 155,
     "minLength": 1,
     "pattern": "^[A-Za-z0-9\\-]+(\\.[A-Za-z0-9\\-]+)+$",
     "type": "string"
    }
   },
   "required": [
    "BundleId"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^[a-zA-Z+-=._:/]+$",
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": "^[A-Za-z0-9 _=@:.+-/]*$",
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "TagMap": {
   "additionalProperties": false,
   "maxProperties": 50,
   "patternProperties": {
    "^([\\p{L}\\p{Z}\\p{N}_.,:/=+\\-@]*)$": {
     "maxLength": 256,
     "minLength": 0,
     "pattern": "^([\\p{L}\\p{Z}\\p{N}_.,:/=+\\-@]*)$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "Unit": {
   "additionalProperties": false,
   "type": "object"
  },
  "iso8601UTC": {
   "pattern": "^([0-2]\\d{3})-(0[0-9]|1[0-2])-([0-2]\\d|3[01])T([01]\\d|2[0-4]):([0-5]\\d):([0-6]\\d)((\\.\\d{3})?)Z$",
   "type": "string"
  }
 },
 "primaryIdentifier": [
  "/properties/KeyName"
 ],
 "properties": {
  "Arn": {
   "maxLength": 1600,
   "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$",
   "type": "string"
  },
  "CreateTime": {
   "$ref": "#/definitions/iso8601UTC"
  },
  "Description": {
   "maxLength": 1000,
   "minLength": 0,
   "type": "string"
  },
  "ExpireTime": {
   "$ref": "#/definitions/iso8601UTC"
  },
  "ForceDelete": {
   "type": "boolean"
  },
  "ForceUpdate": {
   "type": "boolean"
  },
  "KeyArn": {
   "maxLength": 1600,
   "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$",
   "type": "string"
  },
  "KeyName": {
   "maxLength": 100,
   "minLength": 1,
   "pattern": "^[-._\\w]+$",
   "type": "string"
  },
  "NoExpiry": {
   "type": "boolean"
  },
  "Restrictions": {
   "$ref": "#/definitions/ApiKeyRestrictions"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 200,
   "minItems": 0,
   "type": "array",
   "uniqueItems": true
  },
  "UpdateTime": {
   "$ref": "#/definitions/iso8601UTC"
  }
 },
 "readOnlyProperties": [
  "/properties/CreateTime",
  "/properties/Arn",
  "/properties/KeyArn",
  "/properties/UpdateTime"
 ],
 "required": [
  "KeyName",
  "Restrictions"
 ],
 "tagging": {
  "cloudFormationSystemTags": false,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::Location::APIKey",
 "writeOnlyProperties": [
  "/properties/ForceUpdate",
  "/properties/ForceDelete",
  "/properties/NoExpiry"
 ]
}
