create_placement_group¶
Operation¶
create_placement_group
async
¶
create_placement_group(request: CreatePlacementGroupInput | CreatePlacementGroupInputDict, /, *, plugins: list[Plugin] | None = None) -> CreatePlacementGroupOutput
create_placement_group(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreatePlacementGroupInputDict]) -> CreatePlacementGroupOutput
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. A
precision-time placement group places instances on supported hardware
with direct access to high-precision time sources in Amazon Web Services
infrastructure.
For more information, see Placement groups in the Amazon EC2 User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CreatePlacementGroupOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
CreatePlacementGroupInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreatePlacementGroupInput structure.
Attributes¶
dry_run
class-attribute
instance-attribute
¶
dry_run: bool | None = ...
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
DryRunOperation. Otherwise, it is UnauthorizedOperation.
group_name
class-attribute
instance-attribute
¶
group_name: str | None = ...
A name for the placement group. Must be unique within the scope of your account for the Region.
Constraints: Up to 255 ASCII characters
linked_group_id
class-attribute
instance-attribute
¶
linked_group_id: str | None = ...
Reserved for future use.
operator
class-attribute
instance-attribute
¶
operator: OperatorRequest | None = ...
Reserved for internal use.
parent_group_id
class-attribute
instance-attribute
¶
parent_group_id: str | None = ...
The ID of a parent placement group. Valid only when Strategy is set
to cluster.
partition_count
class-attribute
instance-attribute
¶
partition_count: int | None = ...
The number of partitions. Valid only when Strategy is set to
partition.
spread_level
class-attribute
instance-attribute
¶
spread_level: str | None = ...
Determines how placement groups spread instances.
-
Host -- You can use
hostonly with Outpost placement groups. -
Rack -- No usage restrictions.
tag_specifications
class-attribute
instance-attribute
¶
tag_specifications: list[TagSpecification] | None = ...
The tags to apply to the new placement group.
Dictionaries¶
CreatePlacementGroupInputDict
¶
Bases: TypedDict
Dictionary form of CreatePlacementGroupInput.
Attributes¶
dry_run
instance-attribute
¶
dry_run: bool | None
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
DryRunOperation. Otherwise, it is UnauthorizedOperation.
group_name
instance-attribute
¶
group_name: str | None
A name for the placement group. Must be unique within the scope of your account for the Region.
Constraints: Up to 255 ASCII characters
operator
instance-attribute
¶
operator: OperatorRequest | OperatorRequestDict | None
Reserved for internal use.
parent_group_id
instance-attribute
¶
parent_group_id: str | None
The ID of a parent placement group. Valid only when Strategy is set
to cluster.
partition_count
instance-attribute
¶
partition_count: int | None
The number of partitions. Valid only when Strategy is set to
partition.
spread_level
instance-attribute
¶
spread_level: str | None
Determines how placement groups spread instances.
-
Host -- You can use
hostonly with Outpost placement groups. -
Rack -- No usage restrictions.
tag_specifications
instance-attribute
¶
tag_specifications: Sequence[TagSpecification | TagSpecificationDict] | None
The tags to apply to the new placement group.
Output¶
CreatePlacementGroupOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreatePlacementGroupOutput structure.
Attributes¶
placement_group
class-attribute
instance-attribute
¶
placement_group: PlacementGroup | None = ...
Information about the placement group.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.