{
 "additionalIdentifiers": [
  [
   "/properties/ServiceIdentifier",
   "/properties/Name",
   "/properties/Port"
  ]
 ],
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/ServiceIdentifier",
  "/properties/Name",
  "/properties/Port",
  "/properties/Protocol"
 ],
 "definitions": {
  "DefaultAction": {
   "additionalProperties": false,
   "properties": {
    "FixedResponse": {
     "$ref": "#/definitions/FixedResponse"
    },
    "Forward": {
     "$ref": "#/definitions/Forward"
    }
   },
   "required": [],
   "type": "object"
  },
  "FixedResponse": {
   "additionalProperties": false,
   "properties": {
    "StatusCode": {
     "maximum": 599,
     "minimum": 100,
     "type": "integer"
    }
   },
   "required": [
    "StatusCode"
   ],
   "type": "object"
  },
  "Forward": {
   "additionalProperties": false,
   "properties": {
    "TargetGroups": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/WeightedTargetGroup"
     },
     "maxItems": 10,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "TargetGroups"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "WeightedTargetGroup": {
   "additionalProperties": false,
   "properties": {
    "TargetGroupIdentifier": {
     "maxLength": 2048,
     "minLength": 20,
     "pattern": "^((tg-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:targetgroup/tg-[0-9a-z]{17}))$",
     "type": "string"
    },
    "Weight": {
     "maximum": 999,
     "minimum": 0,
     "type": "integer"
    }
   },
   "required": [
    "TargetGroupIdentifier"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Arn"
 ],
 "properties": {
  "Arn": {
   "maxLength": 2048,
   "minLength": 20,
   "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}$",
   "type": "string"
  },
  "DefaultAction": {
   "$ref": "#/definitions/DefaultAction"
  },
  "Id": {
   "maxLength": 26,
   "minLength": 26,
   "pattern": "^listener-[0-9a-z]{17}$",
   "type": "string"
  },
  "Name": {
   "maxLength": 63,
   "minLength": 3,
   "pattern": "^(?!listener-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$",
   "type": "string"
  },
  "Port": {
   "maximum": 65535,
   "minimum": 1,
   "type": "integer"
  },
  "Protocol": {
   "enum": [
    "HTTP",
    "HTTPS",
    "TLS_PASSTHROUGH"
   ],
   "type": "string"
  },
  "ServiceArn": {
   "maxLength": 2048,
   "minLength": 21,
   "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}$",
   "type": "string"
  },
  "ServiceId": {
   "maxLength": 21,
   "minLength": 21,
   "pattern": "^svc-[0-9a-z]{17}$",
   "type": "string"
  },
  "ServiceIdentifier": {
   "maxLength": 2048,
   "minLength": 21,
   "pattern": "^((svc-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}))$",
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "minItems": 0,
   "type": "array",
   "uniqueItems": true
  }
 },
 "propertyTransform": {
  "/properties/DefaultAction/Forward/TargetGroups/*/TargetGroupIdentifier": "$split(TargetGroupIdentifier, \"/\")[-1]"
 },
 "readOnlyProperties": [
  "/properties/Arn",
  "/properties/Id",
  "/properties/ServiceArn",
  "/properties/ServiceId"
 ],
 "required": [
  "DefaultAction",
  "Protocol"
 ],
 "tagging": {
  "cloudFormationSystemTags": false,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::VpcLattice::Listener",
 "writeOnlyProperties": [
  "/properties/ServiceIdentifier"
 ]
}
