ModifyInstanceAttribute

GET /?Action=ModifyInstanceAttribute
Description

Modifies a specific attribute of an instance.
You can modify only one attribute at a time. You can modify the sourceDestCheck attribute only if the instance is in a Virtual Private Cloud (VPC).
You must stop the instance before modifying the following attributes:

  • InstanceType

  • UserData

  • EbsOptimized

Body parameter

Required: false
Name: ModifyInstanceAttributeRequest

Name Description Required Schema Default Example

BlockDeviceMapping.N

The block device mapping of the instance. This parameter modifies the DeleteOnTermination attribute for volumes attached to the instance.

false

InstanceBlockDeviceMappingSpecification

DisableApiTermination

If true, you cannot terminate the instance using Cockpit, the CLI or the API. If false, you can.

false

AttributeBooleanValue

EbsOptimized

If true, the instance is optimized for BSU I/O.

false

AttributeBooleanValue

GroupId.N

A list of security groups IDs associated with the instance.

false

string

InstanceId

The ID of the instance.

true

string

InstanceInitiatedShutdownBehavior

The instance behavior when you stop it. By default or if set to stop, the instance stops. If set to restart, the instance stops then automatically restarts. If set to terminate, the instance stops and is terminated.

false

AttributeValue

InstanceType

The type of instance. For more information, see Instance Types.

false

AttributeValue

SourceDestCheck

(VPC only)
If true, the source/destination check is enabled. If false, it is disabled.
This value must be false for a NAT instance to perform Network Address Translation (NAT) in a VPC.

false

AttributeBooleanValue

UserData

The Base64-encoded MIME user data.

false

BlobAttributeValue

Responses
HTTP Code 200
HTTP Code Description Schema

200

ModifyInstanceAttributeResult

Response 200

Response 200

Name Description Required Schema Default Example

requestId

The ID of the request.

false

string

return

If true, the request succeeds. Otherwise, an error is returned.

false

boolean