Learn R Programming

paws.compute (version 0.1.12)

ec2_create_placement_group: Creates a placement group in which to launch instances

Description

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 Elastic Compute Cloud User Guide.

Usage

ec2_create_placement_group(DryRun, GroupName, Strategy, PartitionCount,
  TagSpecifications)

Value

A list with the following syntax:

list(
  PlacementGroup = list(
    GroupName = "string",
    State = "pending"|"available"|"deleting"|"deleted",
    Strategy = "cluster"|"spread"|"partition",
    PartitionCount = 123,
    GroupId = "string",
    Tags = list(
      list(
        Key = "string",
        Value = "string"
      )
    )
  )
)

Arguments

DryRun

Checks whether you have the required permissions for the action, 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.

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

Strategy

The placement strategy.

PartitionCount

The number of partitions. Valid only when Strategy is set to partition.

TagSpecifications

The tags to apply to the new placement group.

Request syntax

svc$create_placement_group(
  DryRun = TRUE|FALSE,
  GroupName = "string",
  Strategy = "cluster"|"spread"|"partition",
  PartitionCount = 123,
  TagSpecifications = list(
    list(
      ResourceType = "client-vpn-endpoint"|"customer-gateway"|"dedicated-host"|"dhcp-options"|"egress-only-internet-gateway"|"elastic-ip"|"elastic-gpu"|"export-image-task"|"export-instance-task"|"fleet"|"fpga-image"|"host-reservation"|"image"|"import-image-task"|"import-snapshot-task"|"instance"|"internet-gateway"|"key-pair"|"launch-template"|"local-gateway-route-table-vpc-association"|"natgateway"|"network-acl"|"network-interface"|"network-insights-analysis"|"network-insights-path"|"placement-group"|"reserved-instances"|"route-table"|"security-group"|"snapshot"|"spot-fleet-request"|"spot-instances-request"|"subnet"|"traffic-mirror-filter"|"traffic-mirror-session"|"traffic-mirror-target"|"transit-gateway"|"transit-gateway-attachment"|"transit-gateway-connect-peer"|"transit-gateway-multicast-domain"|"transit-gateway-route-table"|"volume"|"vpc"|"vpc-peering-connection"|"vpn-connection"|"vpn-gateway"|"vpc-flow-log",
      Tags = list(
        list(
          Key = "string",
          Value = "string"
        )
      )
    )
  )
)

Examples

Run this code
if (FALSE) {
# This example creates a placement group with the specified name.
svc$create_placement_group(
  GroupName = "my-cluster",
  Strategy = "cluster"
)
}

Run the code above in your browser using DataLab