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.ModifyHosts

Description

Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled, any instances that you launch with a tenancy of host but without a specific host ID are placed onto any available Dedicated Host in your account that has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID to have the instance launch onto a specific host. If no host ID is provided, the instance is launched onto a suitable host with auto-placement enabled.

You can also use this API action to modify a Dedicated Host to support either multiple instance types in an instance family, or to support a specific instance type only.

Synopsis

Creating a Request

data ModifyHosts Source #

See: newModifyHosts smart constructor.

Constructors

ModifyHosts' 

Fields

  • autoPlacement :: Maybe AutoPlacement

    Specify whether to enable or disable auto-placement.

  • hostRecovery :: Maybe HostRecovery

    Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see Host recovery in the Amazon EC2 User Guide.

  • instanceFamily :: Maybe Text

    Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.

    If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

  • instanceType :: Maybe Text

    Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.

    If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

  • hostIds :: [Text]

    The IDs of the Dedicated Hosts to modify.

Instances

Instances details
ToHeaders ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

Methods

toHeaders :: ModifyHosts -> [Header] #

ToPath ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

ToQuery ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

AWSRequest ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

Associated Types

type AWSResponse ModifyHosts #

Generic ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

Associated Types

type Rep ModifyHosts :: Type -> Type #

Read ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

Show ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

NFData ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

Methods

rnf :: ModifyHosts -> () #

Eq ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

Hashable ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

type AWSResponse ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

type Rep ModifyHosts Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

type Rep ModifyHosts = D1 ('MetaData "ModifyHosts" "Amazonka.EC2.ModifyHosts" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifyHosts'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "autoPlacement") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AutoPlacement)) :*: S1 ('MetaSel ('Just "hostRecovery") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe HostRecovery))) :*: (S1 ('MetaSel ('Just "instanceFamily") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "instanceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "hostIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text])))))

newModifyHosts :: ModifyHosts Source #

Create a value of ModifyHosts 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:

ModifyHosts, modifyHosts_autoPlacement - Specify whether to enable or disable auto-placement.

ModifyHosts, modifyHosts_hostRecovery - Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see Host recovery in the Amazon EC2 User Guide.

ModifyHosts, modifyHosts_instanceFamily - Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.

If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

ModifyHosts, modifyHosts_instanceType - Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.

If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

$sel:hostIds:ModifyHosts', modifyHosts_hostIds - The IDs of the Dedicated Hosts to modify.

Request Lenses

modifyHosts_autoPlacement :: Lens' ModifyHosts (Maybe AutoPlacement) Source #

Specify whether to enable or disable auto-placement.

modifyHosts_hostRecovery :: Lens' ModifyHosts (Maybe HostRecovery) Source #

Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see Host recovery in the Amazon EC2 User Guide.

modifyHosts_instanceFamily :: Lens' ModifyHosts (Maybe Text) Source #

Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.

If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

modifyHosts_instanceType :: Lens' ModifyHosts (Maybe Text) Source #

Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.

If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

modifyHosts_hostIds :: Lens' ModifyHosts [Text] Source #

The IDs of the Dedicated Hosts to modify.

Destructuring the Response

data ModifyHostsResponse Source #

See: newModifyHostsResponse smart constructor.

Constructors

ModifyHostsResponse' 

Fields

Instances

Instances details
Generic ModifyHostsResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

Associated Types

type Rep ModifyHostsResponse :: Type -> Type #

Read ModifyHostsResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

Show ModifyHostsResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

NFData ModifyHostsResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

Methods

rnf :: ModifyHostsResponse -> () #

Eq ModifyHostsResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

type Rep ModifyHostsResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyHosts

type Rep ModifyHostsResponse = D1 ('MetaData "ModifyHostsResponse" "Amazonka.EC2.ModifyHosts" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifyHostsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "successful") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "unsuccessful") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [UnsuccessfulItem])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newModifyHostsResponse Source #

Create a value of ModifyHostsResponse 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:successful:ModifyHostsResponse', modifyHostsResponse_successful - The IDs of the Dedicated Hosts that were successfully modified.

$sel:unsuccessful:ModifyHostsResponse', modifyHostsResponse_unsuccessful - The IDs of the Dedicated Hosts that could not be modified. Check whether the setting you requested can be used.

$sel:httpStatus:ModifyHostsResponse', modifyHostsResponse_httpStatus - The response's http status code.

Response Lenses

modifyHostsResponse_successful :: Lens' ModifyHostsResponse (Maybe [Text]) Source #

The IDs of the Dedicated Hosts that were successfully modified.

modifyHostsResponse_unsuccessful :: Lens' ModifyHostsResponse (Maybe [UnsuccessfulItem]) Source #

The IDs of the Dedicated Hosts that could not be modified. Check whether the setting you requested can be used.