Amazon EC2 Ec2 Instance Attribute API
The Ec2 Instance Attribute API from Amazon EC2 — 3 operation(s) for ec2 instance attribute.
The Ec2 Instance Attribute API from Amazon EC2 — 3 operation(s) for ec2 instance attribute.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/amazon-ec2:amazon-ec2-instance-attribute-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Amazon Elastic Compute Cloud Instance Attribute API
version: '2016-11-15'
description: Generated from AWS's published Smithy model for Amazon Elastic Compute Cloud. 3 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://ec2.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
tags:
- name: Instance Attribute
paths:
/?Action=DescribeInstanceAttribute:
post:
operationId: DescribeInstanceAttribute
summary: Describe Instance Attribute
description: Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Available attributes include SQL license exemption configuration for instances registered with the SQL LE service.
responses:
'200':
description: Success
content:
text/xml:
schema:
$ref: '#/components/schemas/InstanceAttribute'
example:
InstanceId: i-1234567890abcdef0
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
Status: attached
DeleteOnTermination: true
VolumeId: vol-049df61146c4d7901
AttachTime: '2013-05-17T22:42:34.000Z'
- DeviceName: /dev/sdf
Ebs:
Status: attached
DeleteOnTermination: false
VolumeId: vol-049df61146c4d7901
AttachTime: '2013-09-10T23:07:00.000Z'
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
allOf:
- type: object
required:
- Action
- Version
properties:
Action:
type: string
const: DescribeInstanceAttribute
Version:
type: string
const: '2016-11-15'
- $ref: '#/components/schemas/DescribeInstanceAttributeRequest'
example:
InstanceId: i-1234567890abcdef0
Attribute: blockDeviceMapping
tags:
- Instance Attribute
/?Action=ModifyInstanceAttribute:
post:
operationId: ModifyInstanceAttribute
summary: Modify Instance Attribute
description: 'Modifies the specified attribute of the specified instance. You can specify only one attribute at a time. Note: Using this action to change the security groups associated with an elastic network interface (ENI) attached to an instance can result in an error if the instance has more than one ENI. To change the security groups associated with an ENI attached to an instance that has multiple ENIs, we recommend that you use the ModifyNetworkInterfaceAttribute action. To modify some attributes, the instance must be stopped. For more information, see Modify a stopped instance in the Amazon EC2 User Guide.'
responses:
'200':
description: Success
content:
text/xml:
schema:
type: string
example: {}
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
allOf:
- type: object
required:
- Action
- Version
properties:
Action:
type: string
const: ModifyInstanceAttribute
Version:
type: string
const: '2016-11-15'
- $ref: '#/components/schemas/ModifyInstanceAttributeRequest'
example:
InstanceId: i-1234567890abcdef0
EnaSupport:
Value: true
tags:
- Instance Attribute
/?Action=ResetInstanceAttribute:
post:
operationId: ResetInstanceAttribute
summary: Reset Instance Attribute
description: Resets an attribute of an instance to its default value. To reset the kernel or ramdisk, the instance must be in a stopped state. To reset the sourceDestCheck, the instance can be either running or stopped. The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true, which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT instances in the Amazon VPC User Guide.
responses:
'200':
description: Success
content:
text/xml:
schema:
type: string
example: {}
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
allOf:
- type: object
required:
- Action
- Version
properties:
Action:
type: string
const: ResetInstanceAttribute
Version:
type: string
const: '2016-11-15'
- $ref: '#/components/schemas/ResetInstanceAttributeRequest'
example:
Attribute: sourceDestCheck
InstanceId: i-1234567890abcdef0
tags:
- Instance Attribute
components:
schemas:
EbsInstanceBlockDeviceSpecification:
type: object
properties:
VolumeId:
type: string
description: The ID of the EBS volume.
DeleteOnTermination:
type: boolean
description: Indicates whether the volume is deleted on instance termination.
EnclaveOptionsRequest:
type: object
properties:
Enabled:
type: boolean
description: To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true.
SecureBlobAttributeValue:
type: object
properties:
Value:
type: string
format: byte
description: The attribute value.
InstanceBlockDeviceMappingSpecification:
type: object
properties:
DeviceName:
type: string
description: The device name. For available device names, see Device names for volumes.
Ebs:
$ref: '#/components/schemas/EbsInstanceBlockDeviceSpecification'
VirtualName:
type: string
description: The virtual device name.
NoDevice:
type: string
description: Suppresses the specified device included in the block device mapping.
AttributeValue:
type: object
properties:
Value:
type: string
description: The attribute value. The value is case-sensitive.
InstanceAttribute:
type: object
properties:
BlockDeviceMappings:
type: array
items:
$ref: '#/components/schemas/InstanceBlockDeviceMapping'
description: The block device mapping of the instance.
DisableApiTermination:
$ref: '#/components/schemas/AttributeBooleanValue'
EnaSupport:
$ref: '#/components/schemas/AttributeBooleanValue'
EnclaveOptions:
$ref: '#/components/schemas/EnclaveOptions'
EbsOptimized:
$ref: '#/components/schemas/AttributeBooleanValue'
InstanceId:
type: string
description: The ID of the instance.
InstanceInitiatedShutdownBehavior:
$ref: '#/components/schemas/AttributeValue'
InstanceType:
$ref: '#/components/schemas/AttributeValue'
KernelId:
$ref: '#/components/schemas/AttributeValue'
ProductCodes:
type: array
items:
$ref: '#/components/schemas/ProductCode'
description: The product codes.
RamdiskId:
$ref: '#/components/schemas/AttributeValue'
RootDeviceName:
$ref: '#/components/schemas/AttributeValue'
SourceDestCheck:
$ref: '#/components/schemas/AttributeBooleanValue'
SriovNetSupport:
$ref: '#/components/schemas/AttributeValue'
UserData:
$ref: '#/components/schemas/AttributeValue'
DisableApiStop:
$ref: '#/components/schemas/AttributeBooleanValue'
Groups:
type: array
items:
$ref: '#/components/schemas/GroupIdentifier'
description: The security groups associated with the instance.
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.
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: '#/components/schemas/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.
InstanceBlockDeviceMapping:
type: object
properties:
DeviceName:
type: string
description: The device name.
Ebs:
$ref: '#/components/schemas/EbsInstanceBlockDevice'
ModifyInstanceAttributeRequest:
type: object
properties:
SourceDestCheck:
$ref: '#/components/schemas/AttributeBooleanValue'
EnclaveOptions:
$ref: '#/components/schemas/EnclaveOptionsRequest'
DisableApiStop:
$ref: '#/components/schemas/AttributeBooleanValue'
DryRun:
type: boolean
description: Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
InstanceId:
type: string
description: The ID of the instance.
Attribute:
type: string
enum:
- instanceType
- kernel
- ramdisk
- userData
- disableApiTermination
- instanceInitiatedShutdownBehavior
- rootDeviceName
- blockDeviceMapping
- productCodes
- sourceDestCheck
- groupSet
- ebsOptimized
- sriovNetSupport
- enaSupport
- enclaveOptions
- disableApiStop
description: 'The name of the attribute to modify. When changing the instance type: If the original instance type is configured for configurable bandwidth, and the desired instance type doesn''t support configurable bandwidth, first set the existing bandwidth configuration to default using the ModifyInstanceNetworkPerformanceOptions operation. You can modify the following attributes only: disableApiTermination | instanceType | kernel | ramdisk | instanceInitiatedShutdownBehavior | blockDeviceMapping | userData | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport | enaSupport | nvmeSupport | disableA'
Value:
type: string
description: A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or instanceInitiatedShutdownBehavior attribute.
BlockDeviceMappings:
type: array
items:
$ref: '#/components/schemas/InstanceBlockDeviceMappingSpecification'
description: Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated. You can't modify the DeleteOnTermination attribute for volumes that are attached to Amazon Web Services-managed resources. To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Update the block device mapping when launching an instance in the Amazon EC2 User Guid
DisableApiTermination:
$ref: '#/components/schemas/AttributeBooleanValue'
InstanceType:
$ref: '#/components/schemas/AttributeValue'
Kernel:
$ref: '#/components/schemas/AttributeValue'
Ramdisk:
$ref: '#/components/schemas/AttributeValue'
UserData:
$ref: '#/components/schemas/SecureBlobAttributeValue'
InstanceInitiatedShutdownBehavior:
$ref: '#/components/schemas/AttributeValue'
Groups:
type: array
items:
type: string
description: Replaces the security groups of the instance with the specified security groups. You must specify the ID of at least one security group, even if it's just the default security group for the VPC.
EbsOptimized:
$ref: '#/components/schemas/AttributeBooleanValue'
SriovNetSupport:
$ref: '#/components/schemas/AttributeValue'
EnaSupport:
$ref: '#/components/schemas/AttributeBooleanValue'
required:
- InstanceId
DescribeInstanceAttributeRequest:
type: object
properties:
DryRun:
type: boolean
description: Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
InstanceId:
type: string
description: The ID of the instance.
Attribute:
type: string
enum:
- instanceType
- kernel
- ramdisk
- userData
- disableApiTermination
- instanceInitiatedShutdownBehavior
- rootDeviceName
- blockDeviceMapping
- productCodes
- sourceDestCheck
- groupSet
- ebsOptimized
- sriovNetSupport
- enaSupport
- enclaveOptions
- disableApiStop
description: The instance attribute. Note that the enaSupport attribute is not supported.
required:
- InstanceId
- Attribute
ProductCode:
type: object
properties:
ProductCodeId:
type: string
description: The product code.
ProductCodeType:
type: string
enum:
- devpay
- marketplace
description: The type of product code.
GroupIdentifier:
type: object
properties:
GroupId:
type: string
description: The ID of the security group.
GroupName:
type: string
description: The name of the security group.
AttributeBooleanValue:
type: object
properties:
Value:
type: boolean
description: The attribute value. The valid values are true or false.
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.
ResetInstanceAttributeRequest:
type: object
properties:
DryRun:
type: boolean
description: Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
InstanceId:
type: string
description: The ID of the instance.
Attribute:
type: string
enum:
- instanceType
- kernel
- ramdisk
- userData
- disableApiTermination
- instanceInitiatedShutdownBehavior
- rootDeviceName
- blockDeviceMapping
- productCodes
- sourceDestCheck
- groupSet
- ebsOptimized
- sriovNetSupport
- enaSupport
- enclaveOptions
- disableApiStop
description: 'The attribute to reset. You can only reset the following attributes: kernel | ramdisk | sourceDestCheck.'
required:
- InstanceId
- Attribute
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: ec2
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/ec2/service/2016-11-15/ec2-2016-11-15.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)