{
 "additionalIdentifiers": [
  [
   "/properties/GatewayId"
  ]
 ],
 "additionalProperties": false,
 "conditionalCreateOnlyProperties": [
  "/properties/Description",
  "/properties/VpcId",
  "/properties/SubnetIds",
  "/properties/SecurityGroupIds",
  "/properties/Port",
  "/properties/Protocol",
  "/properties/DomainName",
  "/properties/TrustStoreConfiguration",
  "/properties/ManagedEndpointConfiguration",
  "/properties/GatewayType",
  "/properties/AcmCertificateArn"
 ],
 "definitions": {
  "AcmCertificateArn": {
   "pattern": "arn:(aws|aws-cn|aws-us-gov):acm:([a-z0-9-]+):[0-9]{12}:certificate/.{1,2048}",
   "relationshipRef": {
    "propertyPath": "/properties/CertificateArn",
    "typeName": "AWS::CertificateManager::Certificate"
   },
   "type": "string"
  },
  "ActiveLinksCount": {
   "type": "integer"
  },
  "Arn": {
   "maxLength": 2048,
   "minLength": 20,
   "pattern": "^arn:aws:rtbfabric:[a-zA-Z0-9_-]+:[0-9]{12}:gateway/[a-zA-Z0-9-]+$",
   "type": "string"
  },
  "AutoScalingGroupNameList": {
   "insertionOrder": false,
   "items": {
    "type": "string"
   },
   "type": "array",
   "uniqueItems": true
  },
  "AutoScalingGroupsConfiguration": {
   "additionalProperties": false,
   "properties": {
    "AutoScalingGroupNameList": {
     "$ref": "#/definitions/AutoScalingGroupNameList"
    },
    "HealthCheckConfig": {
     "$ref": "#/definitions/HealthCheckConfig"
    },
    "RoleArn": {
     "format": "AWS::IAM::Role.Arn",
     "type": "string"
    }
   },
   "required": [
    "AutoScalingGroupNameList",
    "RoleArn"
   ],
   "type": "object"
  },
  "Base64EncodedCertificateChain": {
   "maxLength": 2097152,
   "minLength": 1,
   "type": "string"
  },
  "CertificateAssociationStatus": {
   "enum": [
    "PENDING_ASSOCIATION",
    "ASSOCIATED",
    "PENDING_DISASSOCIATION",
    "DISASSOCIATED",
    "EXPIRED",
    "FAILED"
   ],
   "type": "string"
  },
  "CertificateAuthorityCertificates": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Base64EncodedCertificateChain"
   },
   "maxItems": 1,
   "minItems": 0,
   "type": "array",
   "uniqueItems": true
  },
  "CreatedTimestamp": {
   "type": "string"
  },
  "Description": {
   "pattern": "^[A-Za-z0-9 ]+$",
   "type": "string"
  },
  "DomainName": {
   "maxLength": 255,
   "minLength": 1,
   "pattern": "^(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)(?:\\.(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?))+$",
   "type": "string"
  },
  "EksEndpointsConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ClusterApiServerCaCertificateChain": {
     "maxLength": 2097152,
     "minLength": 1,
     "type": "string"
    },
    "ClusterApiServerEndpointUri": {
     "maxLength": 255,
     "minLength": 0,
     "pattern": "^(https|http)://(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)(?:\\.(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?))+$",
     "type": "string"
    },
    "ClusterName": {
     "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9]$",
     "type": "string"
    },
    "EndpointsResourceName": {
     "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9]$",
     "type": "string"
    },
    "EndpointsResourceNamespace": {
     "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9]$",
     "type": "string"
    },
    "RoleArn": {
     "format": "AWS::IAM::Role.Arn",
     "type": "string"
    }
   },
   "required": [
    "EndpointsResourceName",
    "EndpointsResourceNamespace",
    "ClusterApiServerEndpointUri",
    "ClusterApiServerCaCertificateChain",
    "ClusterName",
    "RoleArn"
   ],
   "type": "object"
  },
  "ExternalInboundEndpoint": {
   "$ref": "#/definitions/DomainName"
  },
  "GatewayId": {
   "pattern": "^(rtbapp-[a-z0-9-]{1,25}|rtb-gw-[a-z0-9-]{1,25})$",
   "type": "string"
  },
  "GatewayType": {
   "enum": [
    "EXTERNAL",
    "INTERNAL"
   ],
   "type": "string"
  },
  "HealthCheckConfig": {
   "additionalProperties": false,
   "properties": {
    "HealthyThresholdCount": {
     "maximum": 10,
     "minimum": 2,
     "type": "integer"
    },
    "IntervalSeconds": {
     "maximum": 60,
     "minimum": 5,
     "type": "integer"
    },
    "Path": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^/.*$",
     "type": "string"
    },
    "Port": {
     "maximum": 65535,
     "minimum": 80,
     "type": "integer"
    },
    "Protocol": {
     "$ref": "#/definitions/Protocol"
    },
    "StatusCodeMatcher": {
     "maxLength": 2000,
     "minLength": 3,
     "pattern": "^[0-9,\\-]+$",
     "type": "string"
    },
    "TimeoutMs": {
     "maximum": 5000,
     "minimum": 100,
     "type": "integer"
    },
    "UnhealthyThresholdCount": {
     "maximum": 10,
     "minimum": 2,
     "type": "integer"
    }
   },
   "required": [
    "Port",
    "Path"
   ],
   "type": "object"
  },
  "InboundLinksCount": {
   "type": "integer"
  },
  "ListenerConfig": {
   "additionalProperties": false,
   "properties": {
    "Protocols": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/Protocol"
     },
     "maxItems": 2,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "Protocols"
   ],
   "type": "object"
  },
  "ManagedEndpointConfiguration": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "AutoScalingGroupsConfiguration": {
       "$ref": "#/definitions/AutoScalingGroupsConfiguration"
      }
     },
     "required": [
      "AutoScalingGroupsConfiguration"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "EksEndpointsConfiguration": {
       "$ref": "#/definitions/EksEndpointsConfiguration"
      }
     },
     "required": [
      "EksEndpointsConfiguration"
     ]
    }
   ],
   "type": "object"
  },
  "Port": {
   "maximum": 65535,
   "minimum": 1,
   "type": "integer"
  },
  "Protocol": {
   "enum": [
    "HTTP",
    "HTTPS"
   ],
   "type": "string"
  },
  "ResponderGatewayStatus": {
   "enum": [
    "PENDING_CREATION",
    "ACTIVE",
    "PENDING_DELETION",
    "DELETED",
    "ERROR",
    "PENDING_UPDATE",
    "ISOLATED",
    "PENDING_ISOLATION",
    "PENDING_RESTORATION"
   ],
   "type": "string"
  },
  "SecurityGroupIds": {
   "format": "AWS::EC2::SecurityGroup.Ids",
   "insertionOrder": false,
   "items": {
    "anyOf": [
     {
      "relationshipRef": {
       "propertyPath": "/properties/GroupId",
       "typeName": "AWS::EC2::SecurityGroup"
      }
     },
     {
      "relationshipRef": {
       "propertyPath": "/properties/Id",
       "typeName": "AWS::EC2::SecurityGroup"
      }
     }
    ],
    "format": "AWS::EC2::SecurityGroup.Id",
    "maxLength": 43,
    "minLength": 11,
    "pattern": "^sg-[0-9a-f]{8,40}$",
    "type": "string"
   },
   "minItems": 1,
   "type": "array",
   "uniqueItems": true
  },
  "SubnetIds": {
   "insertionOrder": false,
   "items": {
    "maxLength": 24,
    "minLength": 15,
    "pattern": "^subnet-\\w{8,17}$",
    "relationshipRef": {
     "propertyPath": "/properties/SubnetId",
     "typeName": "AWS::EC2::Subnet"
    },
    "type": "string"
   },
   "minItems": 1,
   "type": "array",
   "uniqueItems": true
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^(resourceArn|internalId|[a-zA-Z0-9+\\-=._:/@]+)$",
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Key"
   ],
   "type": "object"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "minItems": 0,
   "type": "array",
   "uniqueItems": true
  },
  "TotalLinksCount": {
   "type": "integer"
  },
  "TrustStoreConfiguration": {
   "additionalProperties": false,
   "properties": {
    "CertificateAuthorityCertificates": {
     "$ref": "#/definitions/CertificateAuthorityCertificates"
    }
   },
   "required": [
    "CertificateAuthorityCertificates"
   ],
   "type": "object"
  },
  "UpdatedTimestamp": {
   "type": "string"
  },
  "VpcId": {
   "format": "AWS::EC2::VPC.Id",
   "maxLength": 50,
   "minLength": 5,
   "pattern": "^vpc-[a-f0-9]{8,17}$",
   "relationshipRef": {
    "propertyPath": "/properties/VpcId",
    "typeName": "AWS::EC2::VPC"
   },
   "type": "string"
  }
 },
 "primaryIdentifier": [
  "/properties/Arn"
 ],
 "properties": {
  "AcmCertificateArn": {
   "$ref": "#/definitions/AcmCertificateArn"
  },
  "Arn": {
   "$ref": "#/definitions/Arn"
  },
  "CertificateAssociationStatus": {
   "$ref": "#/definitions/CertificateAssociationStatus"
  },
  "CreatedTimestamp": {
   "$ref": "#/definitions/CreatedTimestamp"
  },
  "Description": {
   "$ref": "#/definitions/Description"
  },
  "DomainName": {
   "$ref": "#/definitions/DomainName"
  },
  "ExternalInboundEndpoint": {
   "$ref": "#/definitions/ExternalInboundEndpoint"
  },
  "GatewayId": {
   "$ref": "#/definitions/GatewayId"
  },
  "GatewayType": {
   "$ref": "#/definitions/GatewayType"
  },
  "ListenerConfig": {
   "$ref": "#/definitions/ListenerConfig"
  },
  "ManagedEndpointConfiguration": {
   "$ref": "#/definitions/ManagedEndpointConfiguration"
  },
  "Port": {
   "$ref": "#/definitions/Port"
  },
  "Protocol": {
   "$ref": "#/definitions/Protocol"
  },
  "ResponderGatewayStatus": {
   "$ref": "#/definitions/ResponderGatewayStatus"
  },
  "SecurityGroupIds": {
   "$ref": "#/definitions/SecurityGroupIds"
  },
  "SubnetIds": {
   "$ref": "#/definitions/SubnetIds"
  },
  "Tags": {
   "$ref": "#/definitions/Tags"
  },
  "TrustStoreConfiguration": {
   "$ref": "#/definitions/TrustStoreConfiguration"
  },
  "UpdatedTimestamp": {
   "$ref": "#/definitions/UpdatedTimestamp"
  },
  "VpcId": {
   "$ref": "#/definitions/VpcId"
  }
 },
 "readOnlyProperties": [
  "/properties/GatewayId",
  "/properties/Arn",
  "/properties/ResponderGatewayStatus",
  "/properties/CreatedTimestamp",
  "/properties/UpdatedTimestamp",
  "/properties/ExternalInboundEndpoint",
  "/properties/CertificateAssociationStatus"
 ],
 "required": [
  "VpcId",
  "SubnetIds",
  "SecurityGroupIds",
  "Port",
  "Protocol"
 ],
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::RTBFabric::ResponderGateway"
}
