create_placement_group
¶
create_placement_group(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 | |