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. For more information, see Host affinity in the Amazon EC2 User Guide.

Public Property GroupId System.String

Gets and sets the property GroupId.

The Group Id of a placement group. You must specify the Placement Group Group Id to launch an instance in a shared placement group.

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. The instance must have a tenancy of host to specify this parameter.

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.

The number of the partition in which to place the instance. Valid only if the placement group strategy is set to partition.

Public Property Tenancy Amazon.EC2.HostTenancy

Gets and sets the property Tenancy.

The tenancy for the instance.

For T3 instances, you must launch the instance on a Dedicated Host to use a tenancy of host. You can't change the tenancy from host to dedicated or default. Attempting to make one of these unsupported tenancy changes results in an InvalidRequest 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