AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the ModifyInstancePlacement operation. Modifies the placement attributes for a specified instance. You can do the following:

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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.EC2.AmazonEC2Request
      Amazon.EC2.Model.ModifyInstancePlacementRequest

Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z

Syntax

C#
public class ModifyInstancePlacementRequest : AmazonEC2Request
         IAmazonWebServiceRequest

The ModifyInstancePlacementRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property Affinity Amazon.EC2.Affinity

Gets and sets the property Affinity.

The affinity setting for the instance.

Public Property GroupName System.String

Gets and sets the property GroupName.

The name of the placement group in which to place the instance. For spread placement groups, the instance must have a tenancy of default. For cluster and partition placement groups, the instance must have a tenancy of default or dedicated.

To remove an instance from a placement group, specify an empty string ("").

Public Property HostId System.String

Gets and sets the property HostId.

The ID of the Dedicated Host with which to associate the instance.

Public Property HostResourceGroupArn System.String

Gets and sets the property HostResourceGroupArn.

The ARN of the host resource group in which to place the instance.

Public Property InstanceId System.String

Gets and sets the property InstanceId.

The ID of the instance that you are modifying.

Public Property PartitionNumber System.Int32

Gets and sets the property PartitionNumber.

Reserved for future use.

Public Property Tenancy Amazon.EC2.HostTenancy

Gets and sets the property Tenancy.

The tenancy for the instance.

For T3 instances, you can't change the tenancy from dedicated to host, or from host to dedicated. Attempting to make one of these unsupported tenancy changes results in the InvalidTenancy error code.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5