GET /#Action=ModifyInstanceAttribute
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 in a VPC 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.
Servers
- https://ec2.{region}.amazonaws.com
- https://ec2.amazonaws.com
- https://ec2.{region}.amazonaws.com.cn
Request headers
Name | Type | Required | Description |
---|---|---|---|
X-Amz-Content-Sha256 |
String | No | |
X-Amz-Credential |
String | No | |
X-Amz-Date |
String | No | |
X-Amz-Algorithm |
String | No | |
X-Amz-SignedHeaders |
String | No | |
X-Amz-Security-Token |
String | No | |
X-Amz-Signature |
String | No |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
Version |
String | Yes |
Possible values:
|
Ramdisk |
Object | No |
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB. |
DisableApiTermination |
Object | No |
If the value is |
Attribute |
String | No |
The name of the attribute to modify. You can modify the following attributes only: Possible values:
|
InstanceInitiatedShutdownBehavior |
Object | No |
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown). |
Value |
String | No |
A new value for the attribute. Use only with the |
InstanceId |
String | Yes |
The ID of the instance. |
SriovNetSupport |
Object | No |
Set to There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time. This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable. |
BlockDeviceMapping[] |
Array | No |
Modifies the 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 Guide. |
Kernel |
Object | No |
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB. |
InstanceType |
Object | No |
Changes the instance type to the specified value. For more information, see Instance types in the Amazon EC2 User Guide. If the instance type is not valid, the error returned is |
EbsOptimized |
Object | No |
Specifies whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance. |
SourceDestCheck |
Object | No |
Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is |
GroupId[] |
Array | No |
[EC2-VPC] Replaces the security groups of the instance with the specified security groups. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name. |
UserData |
Object | No |
Changes the instance's user data to the specified value. If you are using an Amazon Web Services SDK or command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. |
DisableApiStop |
Object | No |
Indicates whether an instance is enabled for stop protection. For more information, see Stop Protection.
|
EnaSupport |
Object | No |
Set to This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable. |
DryRun |
Boolean | No |
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is |
Action |
String | Yes |
Possible values:
|
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.