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 CreatePlacementGroup operation. Creates a placement group in which to launch instances. The strategy of the placement group determines how the instances are organized within the group.
A cluster
placement group is a logical grouping of instances within a single
Availability Zone that benefit from low network latency, high network throughput.
A spread
placement group places instances on distinct hardware. A partition
placement group places groups of instances in different partitions, where instances
in one partition do not share the same hardware with instances in another partition.
For more information, see Placement groups in the Amazon EC2 User Guide.
Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z
public class CreatePlacementGroupRequest : AmazonEC2Request IAmazonWebServiceRequest
The CreatePlacementGroupRequest type exposes the following members
Name | Description | |
---|---|---|
![]() |
CreatePlacementGroupRequest() |
Empty constructor used to set properties independently even when a simple constructor is available |
![]() |
CreatePlacementGroupRequest(string, PlacementStrategy) |
Instantiates CreatePlacementGroupRequest with the parameterized properties |
Name | Type | Description | |
---|---|---|---|
![]() |
DryRun | System.Nullable<System.Boolean> |
Gets and sets the property DryRun.
Checks whether you have the required permissions for the operation, without actually
making the request, and provides an error response. If you have the required permissions,
the error response is |
![]() |
GroupName | System.String |
Gets and sets the property GroupName. A name for the placement group. Must be unique within the scope of your account for the Region. Constraints: Up to 255 ASCII characters |
![]() |
PartitionCount | System.Nullable<System.Int32> |
Gets and sets the property PartitionCount.
The number of partitions. Valid only when Strategy is set to |
![]() |
SpreadLevel | Amazon.EC2.SpreadLevel |
Gets and sets the property SpreadLevel. Determines how placement groups spread instances.
|
![]() |
Strategy | Amazon.EC2.PlacementStrategy |
Gets and sets the property Strategy. The placement strategy. |
![]() |
TagSpecifications | System.Collections.Generic.List<Amazon.EC2.Model.TagSpecification> |
Gets and sets the property TagSpecifications. The tags to apply to the new placement group. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true. |
This example creates a placement group with the specified name.
var client = new AmazonEC2Client(); var response = client.CreatePlacementGroup(new CreatePlacementGroupRequest { GroupName = "my-cluster", Strategy = "cluster" });
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer