{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ec2/json-schema/amazon-ec2-instance-attribute-schema.json",
  "title": "InstanceAttribute",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ec2-instance-attribute-api-openapi.yml#/components/schemas/InstanceAttribute",
  "type": "object",
  "properties": {
    "BlockDeviceMappings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InstanceBlockDeviceMapping"
      },
      "description": "The block device mapping of the instance."
    },
    "DisableApiTermination": {
      "$ref": "#/$defs/AttributeBooleanValue"
    },
    "EnaSupport": {
      "$ref": "#/$defs/AttributeBooleanValue"
    },
    "EnclaveOptions": {
      "$ref": "#/$defs/EnclaveOptions"
    },
    "EbsOptimized": {
      "$ref": "#/$defs/AttributeBooleanValue"
    },
    "InstanceId": {
      "type": "string",
      "description": "The ID of the instance."
    },
    "InstanceInitiatedShutdownBehavior": {
      "$ref": "#/$defs/AttributeValue"
    },
    "InstanceType": {
      "$ref": "#/$defs/AttributeValue"
    },
    "KernelId": {
      "$ref": "#/$defs/AttributeValue"
    },
    "ProductCodes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProductCode"
      },
      "description": "The product codes."
    },
    "RamdiskId": {
      "$ref": "#/$defs/AttributeValue"
    },
    "RootDeviceName": {
      "$ref": "#/$defs/AttributeValue"
    },
    "SourceDestCheck": {
      "$ref": "#/$defs/AttributeBooleanValue"
    },
    "SriovNetSupport": {
      "$ref": "#/$defs/AttributeValue"
    },
    "UserData": {
      "$ref": "#/$defs/AttributeValue"
    },
    "DisableApiStop": {
      "$ref": "#/$defs/AttributeBooleanValue"
    },
    "Groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GroupIdentifier"
      },
      "description": "The security groups associated with the instance."
    }
  },
  "$defs": {
    "AttributeBooleanValue": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "boolean",
          "description": "The attribute value. The valid values are true or false."
        }
      }
    },
    "AttributeValue": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "string",
          "description": "The attribute value. The value is case-sensitive."
        }
      }
    },
    "EbsInstanceBlockDevice": {
      "type": "object",
      "properties": {
        "AttachTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time stamp when the attachment initiated."
        },
        "DeleteOnTermination": {
          "type": "boolean",
          "description": "Indicates whether the volume is deleted on instance termination."
        },
        "Status": {
          "type": "string",
          "enum": [
            "attaching",
            "attached",
            "detaching",
            "detached"
          ],
          "description": "The attachment state."
        },
        "VolumeId": {
          "type": "string",
          "description": "The ID of the EBS volume."
        },
        "AssociatedResource": {
          "type": "string",
          "description": "The ARN of the Amazon Web Services-managed resource to which the volume is attached."
        },
        "VolumeOwnerId": {
          "type": "string",
          "description": "The ID of the Amazon Web Services account that owns the volume. This parameter is returned only for volumes that are attached to Amazon Web Services-managed resources."
        },
        "Operator": {
          "$ref": "#/$defs/OperatorResponse"
        },
        "EbsCardIndex": {
          "type": "integer",
          "description": "The index of the EBS card. Some instance types support multiple EBS cards. The default EBS card index is 0."
        }
      }
    },
    "EnclaveOptions": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "If this parameter is set to true, the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves."
        }
      }
    },
    "GroupIdentifier": {
      "type": "object",
      "properties": {
        "GroupId": {
          "type": "string",
          "description": "The ID of the security group."
        },
        "GroupName": {
          "type": "string",
          "description": "The name of the security group."
        }
      }
    },
    "InstanceBlockDeviceMapping": {
      "type": "object",
      "properties": {
        "DeviceName": {
          "type": "string",
          "description": "The device name."
        },
        "Ebs": {
          "$ref": "#/$defs/EbsInstanceBlockDevice"
        }
      }
    },
    "OperatorResponse": {
      "type": "object",
      "properties": {
        "Managed": {
          "type": "boolean",
          "description": "If true, the resource is managed by a service provider."
        },
        "Principal": {
          "type": "string",
          "description": "If managed is true, then the principal is returned. The principal is the service provider that manages the resource."
        },
        "HiddenByDefault": {
          "type": "boolean",
          "description": "If true, the resource is hidden by default based on the managed resource visibility settings for the account."
        }
      }
    },
    "ProductCode": {
      "type": "object",
      "properties": {
        "ProductCodeId": {
          "type": "string",
          "description": "The product code."
        },
        "ProductCodeType": {
          "type": "string",
          "enum": [
            "devpay",
            "marketplace"
          ],
          "description": "The type of product code."
        }
      }
    }
  }
}