amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.CreatePlacementGroup

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 EC2 User Guide.

Synopsis

Creating a Request

data CreatePlacementGroup Source #

See: newCreatePlacementGroup smart constructor.

Constructors

CreatePlacementGroup' 

Fields

  • dryRun :: Maybe Bool

    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 :: Maybe Text

    A name for the placement group. Must be unique within the scope of your account for the Region.

    Constraints: Up to 255 ASCII characters

  • partitionCount :: Maybe Int

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

  • spreadLevel :: Maybe SpreadLevel

    Determines how placement groups spread instances.

    • Host – You can use host only with Outpost placement groups.
    • Rack – No usage restrictions.
  • strategy :: Maybe PlacementStrategy

    The placement strategy.

  • tagSpecifications :: Maybe [TagSpecification]

    The tags to apply to the new placement group.

Instances

Instances details
ToHeaders CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

ToPath CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

ToQuery CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

AWSRequest CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

Associated Types

type AWSResponse CreatePlacementGroup #

Generic CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

Associated Types

type Rep CreatePlacementGroup :: Type -> Type #

Read CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

Show CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

NFData CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

Methods

rnf :: CreatePlacementGroup -> () #

Eq CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

Hashable CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

type AWSResponse CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

type Rep CreatePlacementGroup Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

type Rep CreatePlacementGroup = D1 ('MetaData "CreatePlacementGroup" "Amazonka.EC2.CreatePlacementGroup" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreatePlacementGroup'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "groupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "partitionCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)))) :*: (S1 ('MetaSel ('Just "spreadLevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SpreadLevel)) :*: (S1 ('MetaSel ('Just "strategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PlacementStrategy)) :*: S1 ('MetaSel ('Just "tagSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TagSpecification]))))))

newCreatePlacementGroup :: CreatePlacementGroup Source #

Create a value of CreatePlacementGroup with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:dryRun:CreatePlacementGroup', createPlacementGroup_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.

CreatePlacementGroup, createPlacementGroup_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

CreatePlacementGroup, createPlacementGroup_partitionCount - The number of partitions. Valid only when Strategy is set to partition.

CreatePlacementGroup, createPlacementGroup_spreadLevel - Determines how placement groups spread instances.

  • Host – You can use host only with Outpost placement groups.
  • Rack – No usage restrictions.

CreatePlacementGroup, createPlacementGroup_strategy - The placement strategy.

CreatePlacementGroup, createPlacementGroup_tagSpecifications - The tags to apply to the new placement group.

Request Lenses

createPlacementGroup_dryRun :: Lens' CreatePlacementGroup (Maybe Bool) Source #

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.

createPlacementGroup_groupName :: Lens' CreatePlacementGroup (Maybe Text) Source #

A name for the placement group. Must be unique within the scope of your account for the Region.

Constraints: Up to 255 ASCII characters

createPlacementGroup_partitionCount :: Lens' CreatePlacementGroup (Maybe Int) Source #

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

createPlacementGroup_spreadLevel :: Lens' CreatePlacementGroup (Maybe SpreadLevel) Source #

Determines how placement groups spread instances.

  • Host – You can use host only with Outpost placement groups.
  • Rack – No usage restrictions.

Destructuring the Response

data CreatePlacementGroupResponse Source #

See: newCreatePlacementGroupResponse smart constructor.

Constructors

CreatePlacementGroupResponse' 

Fields

Instances

Instances details
Generic CreatePlacementGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

Associated Types

type Rep CreatePlacementGroupResponse :: Type -> Type #

Read CreatePlacementGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

Show CreatePlacementGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

NFData CreatePlacementGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

Eq CreatePlacementGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

type Rep CreatePlacementGroupResponse Source # 
Instance details

Defined in Amazonka.EC2.CreatePlacementGroup

type Rep CreatePlacementGroupResponse = D1 ('MetaData "CreatePlacementGroupResponse" "Amazonka.EC2.CreatePlacementGroup" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreatePlacementGroupResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "placementGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PlacementGroup)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreatePlacementGroupResponse Source #

Create a value of CreatePlacementGroupResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:placementGroup:CreatePlacementGroupResponse', createPlacementGroupResponse_placementGroup - Information about the placement group.

$sel:httpStatus:CreatePlacementGroupResponse', createPlacementGroupResponse_httpStatus - The response's http status code.

Response Lenses