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.Value — If the value is true, you can’t terminate the instance using the API.
Type: Boolean
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.Value — The high availability mode.
Type: Boolean
Required: No
KeyName.Value — The name of SSH key pair.
Type: String
Required: No
Kernel — Not supported
Ramdisk — Not supported
RootDeviceName.Value — The device name of the root device volume.
Type: String
Valid values:
disk<N>
|cdrom<N>
|floppy<N>
|menu
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
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>