Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Modifies the placement attributes for a specified instance. You can do the following:
- Modify the affinity between an instance and a
Dedicated Host.
When affinity is set to
host
and the instance is not associated with a specific Dedicated Host, the next time the instance is launched, it is automatically associated with the host on which it lands. If the instance is restarted or rebooted, this relationship persists. - Change the Dedicated Host with which an instance is associated.
- Change the instance tenancy of an instance.
- Move an instance to or from a placement group.
At least one attribute for affinity, host ID, tenancy, or placement group name must be specified in the request. Affinity and tenancy can be modified in the same request.
To modify the host ID, tenancy, placement group, or partition for an
instance, the instance must be in the stopped
state.
Synopsis
- data ModifyInstancePlacement = ModifyInstancePlacement' {}
- newModifyInstancePlacement :: Text -> ModifyInstancePlacement
- modifyInstancePlacement_affinity :: Lens' ModifyInstancePlacement (Maybe Affinity)
- modifyInstancePlacement_groupId :: Lens' ModifyInstancePlacement (Maybe Text)
- modifyInstancePlacement_groupName :: Lens' ModifyInstancePlacement (Maybe Text)
- modifyInstancePlacement_hostId :: Lens' ModifyInstancePlacement (Maybe Text)
- modifyInstancePlacement_hostResourceGroupArn :: Lens' ModifyInstancePlacement (Maybe Text)
- modifyInstancePlacement_partitionNumber :: Lens' ModifyInstancePlacement (Maybe Int)
- modifyInstancePlacement_tenancy :: Lens' ModifyInstancePlacement (Maybe HostTenancy)
- modifyInstancePlacement_instanceId :: Lens' ModifyInstancePlacement Text
- data ModifyInstancePlacementResponse = ModifyInstancePlacementResponse' {
- return' :: Maybe Bool
- httpStatus :: Int
- newModifyInstancePlacementResponse :: Int -> ModifyInstancePlacementResponse
- modifyInstancePlacementResponse_return :: Lens' ModifyInstancePlacementResponse (Maybe Bool)
- modifyInstancePlacementResponse_httpStatus :: Lens' ModifyInstancePlacementResponse Int
Creating a Request
data ModifyInstancePlacement Source #
See: newModifyInstancePlacement
smart constructor.
ModifyInstancePlacement' | |
|
Instances
newModifyInstancePlacement Source #
Create a value of ModifyInstancePlacement
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:
ModifyInstancePlacement
, modifyInstancePlacement_affinity
- The affinity setting for the instance.
ModifyInstancePlacement
, modifyInstancePlacement_groupId
- The Group Id of a placement group. You must specify the Placement Group
Group Id to launch an instance in a shared placement group.
ModifyInstancePlacement
, modifyInstancePlacement_groupName
- The name of the placement group in which to place the instance. For
spread placement groups, the instance must have a tenancy of default
.
For cluster and partition placement groups, the instance must have a
tenancy of default
or dedicated
.
To remove an instance from a placement group, specify an empty string ("").
ModifyInstancePlacement
, modifyInstancePlacement_hostId
- The ID of the Dedicated Host with which to associate the instance.
ModifyInstancePlacement
, modifyInstancePlacement_hostResourceGroupArn
- The ARN of the host resource group in which to place the instance.
ModifyInstancePlacement
, modifyInstancePlacement_partitionNumber
- The number of the partition in which to place the instance. Valid only
if the placement group strategy is set to partition
.
ModifyInstancePlacement
, modifyInstancePlacement_tenancy
- The tenancy for the instance.
For T3 instances, you can't change the tenancy from dedicated
to
host
, or from host
to dedicated
. Attempting to make one of these
unsupported tenancy changes results in the InvalidTenancy
error code.
ModifyInstancePlacement
, modifyInstancePlacement_instanceId
- The ID of the instance that you are modifying.
Request Lenses
modifyInstancePlacement_affinity :: Lens' ModifyInstancePlacement (Maybe Affinity) Source #
The affinity setting for the instance.
modifyInstancePlacement_groupId :: Lens' ModifyInstancePlacement (Maybe Text) Source #
The Group Id of a placement group. You must specify the Placement Group Group Id to launch an instance in a shared placement group.
modifyInstancePlacement_groupName :: Lens' ModifyInstancePlacement (Maybe Text) Source #
The name of the placement group in which to place the instance. For
spread placement groups, the instance must have a tenancy of default
.
For cluster and partition placement groups, the instance must have a
tenancy of default
or dedicated
.
To remove an instance from a placement group, specify an empty string ("").
modifyInstancePlacement_hostId :: Lens' ModifyInstancePlacement (Maybe Text) Source #
The ID of the Dedicated Host with which to associate the instance.
modifyInstancePlacement_hostResourceGroupArn :: Lens' ModifyInstancePlacement (Maybe Text) Source #
The ARN of the host resource group in which to place the instance.
modifyInstancePlacement_partitionNumber :: Lens' ModifyInstancePlacement (Maybe Int) Source #
The number of the partition in which to place the instance. Valid only
if the placement group strategy is set to partition
.
modifyInstancePlacement_tenancy :: Lens' ModifyInstancePlacement (Maybe HostTenancy) Source #
The tenancy for the instance.
For T3 instances, you can't change the tenancy from dedicated
to
host
, or from host
to dedicated
. Attempting to make one of these
unsupported tenancy changes results in the InvalidTenancy
error code.
modifyInstancePlacement_instanceId :: Lens' ModifyInstancePlacement Text Source #
The ID of the instance that you are modifying.
Destructuring the Response
data ModifyInstancePlacementResponse Source #
See: newModifyInstancePlacementResponse
smart constructor.
ModifyInstancePlacementResponse' | |
|
Instances
Generic ModifyInstancePlacementResponse Source # | |
Read ModifyInstancePlacementResponse Source # | |
Show ModifyInstancePlacementResponse Source # | |
Defined in Amazonka.EC2.ModifyInstancePlacement | |
NFData ModifyInstancePlacementResponse Source # | |
Defined in Amazonka.EC2.ModifyInstancePlacement rnf :: ModifyInstancePlacementResponse -> () # | |
Eq ModifyInstancePlacementResponse Source # | |
type Rep ModifyInstancePlacementResponse Source # | |
Defined in Amazonka.EC2.ModifyInstancePlacement type Rep ModifyInstancePlacementResponse = D1 ('MetaData "ModifyInstancePlacementResponse" "Amazonka.EC2.ModifyInstancePlacement" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifyInstancePlacementResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "return'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newModifyInstancePlacementResponse Source #
Create a value of ModifyInstancePlacementResponse
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:return':ModifyInstancePlacementResponse'
, modifyInstancePlacementResponse_return
- Is true
if the request succeeds, and an error otherwise.
$sel:httpStatus:ModifyInstancePlacementResponse'
, modifyInstancePlacementResponse_httpStatus
- The response's http status code.
Response Lenses
modifyInstancePlacementResponse_return :: Lens' ModifyInstancePlacementResponse (Maybe Bool) Source #
Is true
if the request succeeds, and an error otherwise.
modifyInstancePlacementResponse_httpStatus :: Lens' ModifyInstancePlacementResponse Int Source #
The response's http status code.