ModifyInstanceAttribute
In this article:
ModifyInstanceAttribute#
Description#
Modifies the specified attribute of the specified instance.
Request Parameters#
Required parameters#
instanceId — The ID of the instance.
Type: String
Required: Yes
Optional parameters#
DisableApiTermination — Indicates whether it is possible to terminate an instance via API.
Type: AttributeBooleanValue object
Required: No
GroupSet — Not supported
InstanceInitiatedShutdownBehavior.Value — This action defines whether the instance will be stopped or terminated when you run the OS shutdown command.
Type: String
Valid values:
stop
|terminate
Required: No
InstanceType.Value — The instance type.
Type: String
Valid values: See. description of instance types
Required: No
HighAvailable — The high availability mode.
Type: AttributeBooleanValue object
Required: No
KeyName.Value — The name of SSH key pair.
Type: String
Required: No
Kernel — Not supported
Ramdisk — Not supported
RamMonitoring — Indicates whether RAM monitoring is enabled for the instance. Monitoring requires to additional configuration of the instance.
Type: AttributeBooleanValue object
Required: No
RootDeviceName.Value — The name of the root (boot) device or ID of the attached volume to be used as the new boot volume.
Type: String
Valid values:
disk1
|cdrom1
|menu
|vol-XXXXXXXX
Default value:
disk1
Required: No
SourceDestCheck — Indicates whether source/destination checking is enabled.
True
means checking is enabled, andFalse
means checking is disabled. This value must be false for a NAT instance to perform NAT.Type: AttributeBooleanValue object
Required: No
UserData.Value — The instance’s user data. Data that is passed in this parameter must be base64-encoded and must not exceed 16 KB.
Type: String
Required: No
VirtualizationType.Value — The virtualization type (legacy OS support).
Type: String
Possible values:
hvm
|hvm-legacy
Required: No
Response Elements#
return —
True
is returned if the request succeeds and an error otherwise.Type: Boolean
requestId — The request ID.
Type: String
Examples#
c2-ec2 ModifyInstanceAttribute InstanceId i-01234567 InstanceType.Value <instance_type>