POST /#Action=ModifyInstancePlacement
Modifies the placement attributes for a specified instance. You can do the following:
-
Modify the affinity between an instance and a Dedicated Host. When affinity is set to
host
and the instance is not associated with a specific Dedicated Host, the next time the instance is launched, it is automatically associated with the host on which it lands. If the instance is restarted or rebooted, this relationship persists. -
Change the Dedicated Host with which an instance is associated.
-
Change the instance tenancy of an instance.
-
Move an instance to or from a placement group.
At least one attribute for affinity, host ID, tenancy, or placement group name must be specified in the request. Affinity and tenancy can be modified in the same request.
To modify the host ID, tenancy, placement group, or partition for an instance, the instance must be in the stopped
state.
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 | |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "text/xml" |
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:
|
Action |
String | Yes |
Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
InstanceId |
String | Yes |
The ID of the instance that you are modifying. |
HostResourceGroupArn |
String | No |
The ARN of the host resource group in which to place the instance. |
GroupName |
String | No |
The name of the placement group in which to place the instance. For spread placement groups, the instance must have a tenancy of To remove an instance from a placement group, specify an empty string (""). |
Tenancy |
String | No |
The tenancy for the instance. For T3 instances, you can't change the tenancy from Possible values:
|
HostId |
String | No |
The ID of the Dedicated Host with which to associate the instance. |
GroupId |
String | No |
The Group Id of a placement group. You must specify the Placement Group Group Id to launch an instance in a shared placement group. |
Affinity |
String | No |
The affinity setting for the instance. Possible values:
|
PartitionNumber |
Integer | No |
The number of the partition in which to place the instance. Valid only if the placement group strategy is set to |
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.