{
 "$schema": "https://schema.cloudformation.us-east-1.amazonaws.com/provider.definition.schema.v1.json",
 "additionalProperties": false,
 "conditionalCreateOnlyProperties": [
  "/properties/AdditionalInfo",
  "/properties/Affinity",
  "/properties/EbsOptimized",
  "/properties/HostId",
  "/properties/InstanceType",
  "/properties/KernelId",
  "/properties/PrivateDnsNameOptions",
  "/properties/RamdiskId",
  "/properties/Tenancy",
  "/properties/UserData",
  "/properties/BlockDeviceMappings",
  "/properties/SecurityGroupIds"
 ],
 "createOnlyProperties": [
  "/properties/AvailabilityZone",
  "/properties/CpuOptions",
  "/properties/ElasticGpuSpecifications",
  "/properties/ElasticInferenceAccelerators",
  "/properties/EnclaveOptions",
  "/properties/HibernationOptions",
  "/properties/HostResourceGroupArn",
  "/properties/ImageId",
  "/properties/Ipv6AddressCount",
  "/properties/Ipv6Addresses",
  "/properties/KeyName",
  "/properties/LaunchTemplate",
  "/properties/LicenseSpecifications",
  "/properties/NetworkInterfaces",
  "/properties/PlacementGroupName",
  "/properties/PrivateIpAddress",
  "/properties/SecurityGroups",
  "/properties/SubnetId"
 ],
 "definitions": {
  "AssociationParameter": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "Value": {
     "insertionOrder": false,
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    }
   },
   "required": [
    "Value",
    "Key"
   ],
   "type": "object"
  },
  "BlockDeviceMapping": {
   "additionalProperties": false,
   "properties": {
    "DeviceName": {
     "type": "string"
    },
    "Ebs": {
     "$ref": "#/definitions/Ebs"
    },
    "NoDevice": {
     "additionalProperties": false,
     "type": "object"
    },
    "VirtualName": {
     "type": "string"
    }
   },
   "required": [
    "DeviceName"
   ],
   "requiredXor": [
    "VirtualName",
    "Ebs",
    "NoDevice"
   ],
   "type": "object"
  },
  "Ebs": {
   "additionalProperties": false,
   "properties": {
    "DeleteOnTermination": {
     "type": "boolean"
    },
    "Encrypted": {
     "type": "boolean"
    },
    "Iops": {
     "type": "integer"
    },
    "KmsKeyId": {
     "anyOf": [
      {
       "format": "AWS::KMS::Key.Arn"
      },
      {
       "format": "AWS::KMS::Key.Id"
      },
      {
       "format": "AWS::KMS::Alias.AliasName"
      }
     ],
     "type": "string"
    },
    "SnapshotId": {
     "type": "string"
    },
    "VolumeSize": {
     "type": "integer"
    },
    "VolumeType": {
     "enum": [
      "gp2",
      "gp3",
      "io1",
      "io2",
      "sc1",
      "st1",
      "standard"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "ElasticGpuSpecification": {
   "additionalProperties": false,
   "properties": {
    "Type": {
     "type": "string"
    }
   },
   "required": [
    "Type"
   ],
   "type": "object"
  },
  "ElasticInferenceAccelerator": {
   "additionalProperties": false,
   "properties": {
    "Count": {
     "minimum": 0,
     "type": "integer"
    },
    "Type": {
     "type": "string"
    }
   },
   "required": [
    "Type"
   ],
   "type": "object"
  },
  "EnaSrdSpecification": {
   "additionalProperties": false,
   "properties": {
    "EnaSrdEnabled": {
     "type": "boolean"
    },
    "EnaSrdUdpSpecification": {
     "$ref": "#/definitions/EnaSrdUdpSpecification"
    }
   },
   "type": "object"
  },
  "EnaSrdUdpSpecification": {
   "additionalProperties": false,
   "properties": {
    "EnaSrdUdpEnabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "InstanceIpv6Address": {
   "additionalProperties": false,
   "properties": {
    "Ipv6Address": {
     "type": "string"
    }
   },
   "required": [
    "Ipv6Address"
   ],
   "type": "object"
  },
  "LaunchTemplateSpecification": {
   "additionalProperties": false,
   "oneOf": [
    {
     "required": [
      "LaunchTemplateName",
      "Version"
     ]
    },
    {
     "required": [
      "LaunchTemplateId",
      "Version"
     ]
    }
   ],
   "properties": {
    "LaunchTemplateId": {
     "type": "string"
    },
    "LaunchTemplateName": {
     "type": "string"
    },
    "Version": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "LicenseSpecification": {
   "additionalProperties": false,
   "properties": {
    "LicenseConfigurationArn": {
     "type": "string"
    }
   },
   "required": [
    "LicenseConfigurationArn"
   ],
   "type": "object"
  },
  "MetadataOptions": {
   "additionalProperties": false,
   "properties": {
    "HttpEndpoint": {
     "enum": [
      "disabled",
      "enabled"
     ],
     "type": "string"
    },
    "HttpProtocolIpv6": {
     "enum": [
      "disabled",
      "enabled"
     ],
     "type": "string"
    },
    "HttpPutResponseHopLimit": {
     "default": 1,
     "maximum": 64,
     "minimum": 1,
     "type": "integer"
    },
    "HttpTokens": {
     "enum": [
      "optional",
      "required"
     ],
     "type": "string"
    },
    "InstanceMetadataTags": {
     "enum": [
      "disabled",
      "enabled"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "NetworkInterface": {
   "additionalProperties": false,
   "dependentExcluded": {
    "AssociateCarrierIpAddress": [
     "NetworkInterfaceId"
    ],
    "AssociatePublicIpAddress": [
     "NetworkInterfaceId"
    ],
    "NetworkInterfaceId": [
     "AssociateCarrierIpAddress",
     "AssociatePublicIpAddress"
    ]
   },
   "properties": {
    "AssociateCarrierIpAddress": {
     "type": "boolean"
    },
    "AssociatePublicIpAddress": {
     "type": "boolean"
    },
    "DeleteOnTermination": {
     "type": "boolean"
    },
    "Description": {
     "type": "string"
    },
    "DeviceIndex": {
     "type": "string"
    },
    "EnaSrdSpecification": {
     "$ref": "#/definitions/EnaSrdSpecification"
    },
    "GroupSet": {
     "format": "AWS::EC2::SecurityGroup.Ids",
     "insertionOrder": false,
     "items": {
      "format": "AWS::EC2::SecurityGroup.Id",
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "Ipv6AddressCount": {
     "type": "integer"
    },
    "Ipv6Addresses": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/InstanceIpv6Address"
     },
     "type": "array",
     "uniqueItems": false
    },
    "NetworkInterfaceId": {
     "type": "string"
    },
    "PrivateIpAddress": {
     "type": "string"
    },
    "PrivateIpAddresses": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/PrivateIpAddressSpecification"
     },
     "type": "array",
     "uniqueItems": false
    },
    "SecondaryPrivateIpAddressCount": {
     "type": "integer"
    },
    "SubnetId": {
     "format": "AWS::EC2::Subnet.Id",
     "type": "string"
    }
   },
   "required": [
    "DeviceIndex"
   ],
   "type": "object"
  },
  "PrivateDnsNameOptions": {
   "additionalProperties": false,
   "properties": {
    "EnableResourceNameDnsAAAARecord": {
     "type": "boolean"
    },
    "EnableResourceNameDnsARecord": {
     "type": "boolean"
    },
    "HostnameType": {
     "enum": [
      "ip-name",
      "resource-name"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "PrivateIpAddressSpecification": {
   "additionalProperties": false,
   "properties": {
    "Primary": {
     "type": "boolean"
    },
    "PrivateIpAddress": {
     "type": "string"
    }
   },
   "required": [
    "PrivateIpAddress",
    "Primary"
   ],
   "type": "object"
  },
  "SsmAssociation": {
   "additionalProperties": false,
   "properties": {
    "AssociationParameters": {
     "insertionOrder": false,
     "items": {
      "$ref": "#/definitions/AssociationParameter"
     },
     "type": "array",
     "uniqueItems": false
    },
    "DocumentName": {
     "type": "string"
    }
   },
   "required": [
    "DocumentName"
   ],
   "type": "object"
  },
  "State": {
   "additionalProperties": false,
   "properties": {
    "Code": {
     "type": "string"
    },
    "Name": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "type": "string"
    },
    "Value": {
     "type": "string"
    }
   },
   "required": [
    "Value",
    "Key"
   ],
   "type": "object"
  },
  "Volume": {
   "additionalProperties": false,
   "properties": {
    "Device": {
     "type": "string"
    },
    "VolumeId": {
     "type": "string"
    }
   },
   "required": [
    "VolumeId",
    "Device"
   ],
   "type": "object"
  }
 },
 "dependentExcluded": {
  "NetworkInterfaces": [
   "SubnetId"
  ],
  "SubnetId": [
   "NetworkInterfaces"
  ]
 },
 "primaryIdentifier": [
  "/properties/InstanceId"
 ],
 "properties": {
  "AdditionalInfo": {
   "type": "string"
  },
  "Affinity": {
   "enum": [
    "default",
    "host"
   ],
   "type": "string"
  },
  "AvailabilityZone": {
   "type": "string"
  },
  "BlockDeviceMappings": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/BlockDeviceMapping"
   },
   "type": "array",
   "uniqueItems": false
  },
  "CpuOptions": {
   "additionalProperties": false,
   "properties": {
    "CoreCount": {
     "type": "integer"
    },
    "ThreadsPerCore": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "CreditSpecification": {
   "additionalProperties": false,
   "properties": {
    "CPUCredits": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "DisableApiTermination": {
   "type": "boolean"
  },
  "EbsOptimized": {
   "type": "boolean"
  },
  "ElasticGpuSpecifications": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/ElasticGpuSpecification"
   },
   "type": "array",
   "uniqueItems": false
  },
  "ElasticInferenceAccelerators": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/ElasticInferenceAccelerator"
   },
   "type": "array",
   "uniqueItems": false
  },
  "EnclaveOptions": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "HibernationOptions": {
   "additionalProperties": false,
   "properties": {
    "Configured": {
     "default": false,
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "HostId": {
   "type": "string"
  },
  "HostResourceGroupArn": {
   "type": "string"
  },
  "IamInstanceProfile": {
   "type": "string"
  },
  "ImageId": {
   "format": "AWS::EC2::Image.Id",
   "type": "string"
  },
  "InstanceId": {
   "type": "string"
  },
  "InstanceInitiatedShutdownBehavior": {
   "enum": [
    "stop",
    "terminate"
   ],
   "type": "string"
  },
  "InstanceType": {
   "type": "string"
  },
  "Ipv6AddressCount": {
   "type": "integer"
  },
  "Ipv6Addresses": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/InstanceIpv6Address"
   },
   "type": "array",
   "uniqueItems": false
  },
  "KernelId": {
   "type": "string"
  },
  "KeyName": {
   "type": "string"
  },
  "LaunchTemplate": {
   "$ref": "#/definitions/LaunchTemplateSpecification",
   "type": "object"
  },
  "LicenseSpecifications": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/LicenseSpecification"
   },
   "type": "array",
   "uniqueItems": false
  },
  "MetadataOptions": {
   "$ref": "#/definitions/MetadataOptions",
   "type": "object"
  },
  "Monitoring": {
   "type": "boolean"
  },
  "NetworkInterfaces": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/NetworkInterface"
   },
   "type": "array",
   "uniqueItems": false
  },
  "PlacementGroupName": {
   "type": "string"
  },
  "PrivateDnsName": {
   "type": "string"
  },
  "PrivateDnsNameOptions": {
   "$ref": "#/definitions/PrivateDnsNameOptions",
   "type": "object"
  },
  "PrivateIp": {
   "type": "string"
  },
  "PrivateIpAddress": {
   "type": "string"
  },
  "PropagateTagsToVolumeOnCreation": {
   "type": "boolean"
  },
  "PublicDnsName": {
   "type": "string"
  },
  "PublicIp": {
   "type": "string"
  },
  "RamdiskId": {
   "type": "string"
  },
  "SecurityGroupIds": {
   "anyOf": [
    {
     "format": "AWS::EC2::SecurityGroup.Ids"
    },
    {
     "format": "AWS::EC2::SecurityGroup.Names"
    }
   ],
   "insertionOrder": false,
   "items": {
    "anyOf": [
     {
      "format": "AWS::EC2::SecurityGroup.Id"
     },
     {
      "format": "AWS::EC2::SecurityGroup.Name"
     }
    ],
    "type": "string"
   },
   "type": "array",
   "uniqueItems": false
  },
  "SecurityGroups": {
   "format": "AWS::EC2::SecurityGroup.Names",
   "insertionOrder": false,
   "items": {
    "format": "AWS::EC2::SecurityGroup.Name",
    "type": "string"
   },
   "type": "array",
   "uniqueItems": false
  },
  "SourceDestCheck": {
   "type": "boolean"
  },
  "SsmAssociations": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/SsmAssociation"
   },
   "type": "array",
   "uniqueItems": false
  },
  "State": {
   "$ref": "#/definitions/State",
   "type": "object"
  },
  "SubnetId": {
   "format": "AWS::EC2::Subnet.Id",
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": false
  },
  "Tenancy": {
   "type": "string"
  },
  "UserData": {
   "type": "string"
  },
  "Volumes": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Volume"
   },
   "type": "array",
   "uniqueItems": false
  },
  "VpcId": {
   "format": "AWS::EC2::VPC.Id",
   "type": "string"
  }
 },
 "readOnlyProperties": [
  "/properties/InstanceId",
  "/properties/PrivateIp",
  "/properties/PublicDnsName",
  "/properties/PublicIp",
  "/properties/PrivateDnsName",
  "/properties/VpcId",
  "/properties/State"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ec2.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::EC2::Instance",
 "writeOnlyProperties": [
  "/properties/BlockDeviceMappings/*/NoDevice",
  "/properties/BlockDeviceMappings/*/VirtualName",
  "/properties/LicenseSpecifications",
  "/properties/AdditionalInfo",
  "/properties/Ipv6AddressCount",
  "/properties/Ipv6Addresses",
  "/properties/PropagateTagsToVolumeOnCreation"
 ]
}
