ModifyInstancePlacement#

Description#

Changes placement parameters for a specified instance.

Request Parameters#

Required parameters#

  • instanceId — The ID of the instance.

    • Type: String

    • Required: Yes

Optional parameters#

  • Affinity — The instance restart rule.

    • Type: String

    • Required: No

    • Valid values: default | host

  • GroupId — The placement group ID.

    • Type: String

    • Required: No

  • GroupName — The name of the placement group in which to place the instance. To remove an instance from its current placement group, pass an empty string "" in GroupName.

    • Type: String

    • Required: No

    • Valid values: ASCII, except \<>:/

    • Length constraints: from 1 to 255 symbols

  • HostId — The dedicated host ID. To remove an instance from the dedicated host, pass an empty string "" to HostId.

    • Type: String

    • Required: No

  • Tenancy — The type of placement for the iInstance.

    • Type: String

    • Required: No

    • Valid values: default | host

Response Elements#

  • requestId — The request ID

    • Type: String

  • returnTrue is returned if the request succeeds and an error otherwise.

    • Type: Boolean

Examples#

c2-ec2 ModifyInstancePlacement InstanceId <instance_id> GroupName ""

c2-ec2 ModifyInstancePlacement InstanceId <instance_id> GroupName <group_name>

c2-ec2 ModifyInstancePlacement InstanceId <instance_id> HostId <host_id>

c2-ec2 ModifyInstancePlacement InstanceId <instance_id> HostId ""