create_placement_group
async
¶
create_placement_group(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
partition_count: Optional[Integer] = None,
tag_specifications: Optional[TagSpecificationList] = None,
spread_level: Optional[SpreadLevel] = None,
linked_group_id: Optional[PlacementGroupId] = None,
operator: Optional[OperatorRequest] = None,
parent_group_id: Optional[PlacementGroupId] = None,
dry_run: Optional[Boolean] = None,
group_name: Optional[String] = None,
strategy: Optional[PlacementStrategy] = None,
) -> CreatePlacementGroupResult
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:
-
partition_count(Optional[Integer], default:None) –The number of partitions. Valid only when Strategy is set to
partition. -
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the new placement group.
-
spread_level(Optional[SpreadLevel], default:None) –Determines how placement groups spread instances.
-
Host – You can use
hostonly with Outpost placement groups. -
Rack – No usage restrictions.
-
-
linked_group_id(Optional[PlacementGroupId], default:None) –Reserved for future use.
-
operator(Optional[OperatorRequest], default:None) –Reserved for internal use.
-
parent_group_id(Optional[PlacementGroupId], default:None) –The ID of a parent placement group. Valid only when Strategy is set to
cluster. -
dry_run(Optional[Boolean], default: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 isUnauthorizedOperation. -
group_name(Optional[String], default: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
-
strategy(Optional[PlacementStrategy], default:None) –The placement strategy.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a placement group This example creates a placement group with the specified name.
Source code in docs_src/capo_ec2/_services/async_ec2.py
11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 | |