{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/Name",
  "/properties/ConnectionConfiguration"
 ],
 "definitions": {
  "ConnectionConfiguration": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "SelfManaged": {
       "$ref": "#/definitions/SelfManagedMode"
      }
     },
     "required": [
      "SelfManaged"
     ],
     "title": "SelfManaged"
    },
    {
     "additionalProperties": false,
     "properties": {
      "ServiceManaged": {
       "$ref": "#/definitions/ServiceManagedMode"
      }
     },
     "required": [
      "ServiceManaged"
     ],
     "title": "ServiceManaged"
    }
   ],
   "type": "object"
  },
  "SelfManagedMode": {
   "additionalProperties": false,
   "properties": {
    "ResourceConfigurationId": {
     "maxLength": 2048,
     "minLength": 20,
     "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}$",
     "type": "string"
    }
   },
   "required": [
    "ResourceConfigurationId"
   ],
   "type": "object"
  },
  "ServiceManagedMode": {
   "additionalProperties": false,
   "properties": {
    "HostAddress": {
     "maxLength": 255,
     "minLength": 3,
     "pattern": "^[a-zA-Z0-9.:\\-]+$",
     "type": "string"
    },
    "IpAddressType": {
     "enum": [
      "IPV4",
      "IPV6",
      "DUAL_STACK"
     ],
     "type": "string"
    },
    "Ipv4AddressesPerEni": {
     "maximum": 62,
     "minimum": 1,
     "type": "integer"
    },
    "PortRanges": {
     "items": {
      "pattern": "^((\\d{1,5}\\-\\d{1,5})|(\\d+))$",
      "type": "string"
     },
     "maxItems": 11,
     "minItems": 1,
     "type": "array"
    },
    "SecurityGroupIds": {
     "items": {
      "maxLength": 20,
      "minLength": 11,
      "pattern": "^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$",
      "type": "string"
     },
     "maxItems": 5,
     "minItems": 1,
     "type": "array"
    },
    "SubnetIds": {
     "items": {
      "maxLength": 24,
      "minLength": 15,
      "pattern": "^subnet-(([0-9a-z]{8})|([0-9a-z]{17}))$",
      "type": "string"
     },
     "maxItems": 20,
     "minItems": 1,
     "type": "array"
    },
    "VpcId": {
     "maxLength": 50,
     "minLength": 5,
     "pattern": "^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$",
     "type": "string"
    }
   },
   "required": [
    "HostAddress",
    "VpcId"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Name"
 ],
 "properties": {
  "Arn": {
   "type": "string"
  },
  "Certificate": {
   "maxLength": 32768,
   "minLength": 1,
   "type": "string"
  },
  "CertificateExpiryTime": {
   "format": "date-time",
   "type": "string"
  },
  "ConnectionConfiguration": {
   "$ref": "#/definitions/ConnectionConfiguration"
  },
  "Name": {
   "maxLength": 30,
   "minLength": 3,
   "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
   "type": "string"
  },
  "Status": {
   "enum": [
    "ACTIVE",
    "CREATE_IN_PROGRESS",
    "CREATE_FAILED",
    "DELETE_IN_PROGRESS",
    "DELETE_FAILED"
   ],
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": true
  }
 },
 "readOnlyProperties": [
  "/properties/Status",
  "/properties/CertificateExpiryTime",
  "/properties/Arn"
 ],
 "required": [
  "Name",
  "ConnectionConfiguration"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::DevOpsAgent::PrivateConnection",
 "writeOnlyProperties": [
  "/properties/Certificate",
  "/properties/ConnectionConfiguration/ServiceManaged/SubnetIds",
  "/properties/ConnectionConfiguration/ServiceManaged/SecurityGroupIds",
  "/properties/ConnectionConfiguration/ServiceManaged/IpAddressType",
  "/properties/ConnectionConfiguration/ServiceManaged/Ipv4AddressesPerEni",
  "/properties/ConnectionConfiguration/ServiceManaged/PortRanges"
 ]
}
