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.

  • GroupSetNot 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.

  • HighAvailable — The high availability mode.

  • KeyName.Value — The name of SSH key pair.

    • Type: String

    • Required: No

  • KernelNot supported

  • RamdiskNot supported

  • RamMonitoring — Indicates whether RAM monitoring is enabled for the instance. Monitoring requires to additional configuration of the instance.

  • 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, and False means checking is disabled. This value must be false for a NAT instance to perform NAT.

  • 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#

  • returnTrue 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>