CfnPlacementGroupProps
Struct External
Properties for defining a CfnPlacementGroup.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnPlacementGroupProps: ec2.CfnPlacementGroupProps = {
parentGroupId: 'parentGroupId',
partitionCount: 123,
spreadLevel: 'spreadLevel',
strategy: 'strategy',
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
cfn_placement_group_props = ec2.CfnPlacementGroupProps(
parent_group_id="parentGroupId",
partition_count=123,
spread_level="spreadLevel",
strategy="strategy",
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
CfnPlacementGroupProps cfnPlacementGroupProps = CfnPlacementGroupProps.builder()
.parentGroupId("parentGroupId")
.partitionCount(123)
.spreadLevel("spreadLevel")
.strategy("strategy")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cfnPlacementGroupProps = new CfnPlacementGroupProps {
ParentGroupId = "parentGroupId",
PartitionCount = 123,
SpreadLevel = "spreadLevel",
Strategy = "strategy",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnPlacementGroupProps := &CfnPlacementGroupProps{
ParentGroupId: jsii.String("parentGroupId"),
PartitionCount: jsii.Number(123),
SpreadLevel: jsii.String("spreadLevel"),
Strategy: jsii.String("strategy"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
parentGroupIdoptionalstringparent_group_idoptionalstrparentGroupIdoptionalStringParentGroupIdoptionalstringParentGroupIdoptional*string #The ID of a parent placement group.
Valid for strategies that support parent group linking.
partitionCountoptionalnumberpartition_countoptionalint | floatpartitionCountoptionalNumberPartitionCountoptionaldoublePartitionCountoptional*float64 #The number of partitions.
Valid only when Strategy is set to partition .
spreadLeveloptionalstringspread_leveloptionalstrspreadLeveloptionalStringSpreadLeveloptionalstringSpreadLeveloptional*string #Determines how placement groups spread instances.
- Host – You can use
hostonly with Outpost placement groups. - Rack – No usage restrictions.
strategyoptionalstringstrategyoptionalstrstrategyoptionalStringStrategyoptionalstringStrategyoptional*string #The placement strategy.