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 a Capacity Reservation's capacity and the conditions under which it is to be released. You cannot change a Capacity Reservation's instance type, EBS optimization, instance store settings, platform, Availability Zone, or instance eligibility. If you need to modify any of these attributes, we recommend that you cancel the Capacity Reservation, and then create a new one with the required attributes.
Synopsis
- data ModifyCapacityReservation = ModifyCapacityReservation' {}
- newModifyCapacityReservation :: Text -> ModifyCapacityReservation
- modifyCapacityReservation_accept :: Lens' ModifyCapacityReservation (Maybe Bool)
- modifyCapacityReservation_additionalInfo :: Lens' ModifyCapacityReservation (Maybe Text)
- modifyCapacityReservation_dryRun :: Lens' ModifyCapacityReservation (Maybe Bool)
- modifyCapacityReservation_endDate :: Lens' ModifyCapacityReservation (Maybe UTCTime)
- modifyCapacityReservation_endDateType :: Lens' ModifyCapacityReservation (Maybe EndDateType)
- modifyCapacityReservation_instanceCount :: Lens' ModifyCapacityReservation (Maybe Int)
- modifyCapacityReservation_capacityReservationId :: Lens' ModifyCapacityReservation Text
- data ModifyCapacityReservationResponse = ModifyCapacityReservationResponse' {
- return' :: Maybe Bool
- httpStatus :: Int
- newModifyCapacityReservationResponse :: Int -> ModifyCapacityReservationResponse
- modifyCapacityReservationResponse_return :: Lens' ModifyCapacityReservationResponse (Maybe Bool)
- modifyCapacityReservationResponse_httpStatus :: Lens' ModifyCapacityReservationResponse Int
Creating a Request
data ModifyCapacityReservation Source #
See: newModifyCapacityReservation
smart constructor.
ModifyCapacityReservation' | |
|
Instances
newModifyCapacityReservation Source #
Create a value of ModifyCapacityReservation
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:accept:ModifyCapacityReservation'
, modifyCapacityReservation_accept
- Reserved. Capacity Reservations you have created are accepted by
default.
ModifyCapacityReservation
, modifyCapacityReservation_additionalInfo
- Reserved for future use.
$sel:dryRun:ModifyCapacityReservation'
, modifyCapacityReservation_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
.
ModifyCapacityReservation
, modifyCapacityReservation_endDate
- The date and time at which the Capacity Reservation expires. When a
Capacity Reservation expires, the reserved capacity is released and you
can no longer launch instances into it. The Capacity Reservation's
state changes to expired
when it reaches its end date and time.
The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.
You must provide an EndDate
value if EndDateType
is limited
. Omit
EndDate
if EndDateType
is unlimited
.
ModifyCapacityReservation
, modifyCapacityReservation_endDateType
- Indicates the way in which the Capacity Reservation ends. A Capacity
Reservation can have one of the following end types:
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not provide anEndDate
value ifEndDateType
isunlimited
.limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value ifEndDateType
islimited
.
ModifyCapacityReservation
, modifyCapacityReservation_instanceCount
- The number of instances for which to reserve capacity. The number of
instances can't be increased or decreased by more than 1000
in a
single request.
ModifyCapacityReservation
, modifyCapacityReservation_capacityReservationId
- The ID of the Capacity Reservation.
Request Lenses
modifyCapacityReservation_accept :: Lens' ModifyCapacityReservation (Maybe Bool) Source #
Reserved. Capacity Reservations you have created are accepted by default.
modifyCapacityReservation_additionalInfo :: Lens' ModifyCapacityReservation (Maybe Text) Source #
Reserved for future use.
modifyCapacityReservation_dryRun :: Lens' ModifyCapacityReservation (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
.
modifyCapacityReservation_endDate :: Lens' ModifyCapacityReservation (Maybe UTCTime) Source #
The date and time at which the Capacity Reservation expires. When a
Capacity Reservation expires, the reserved capacity is released and you
can no longer launch instances into it. The Capacity Reservation's
state changes to expired
when it reaches its end date and time.
The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.
You must provide an EndDate
value if EndDateType
is limited
. Omit
EndDate
if EndDateType
is unlimited
.
modifyCapacityReservation_endDateType :: Lens' ModifyCapacityReservation (Maybe EndDateType) Source #
Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not provide anEndDate
value ifEndDateType
isunlimited
.limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value ifEndDateType
islimited
.
modifyCapacityReservation_instanceCount :: Lens' ModifyCapacityReservation (Maybe Int) Source #
The number of instances for which to reserve capacity. The number of
instances can't be increased or decreased by more than 1000
in a
single request.
modifyCapacityReservation_capacityReservationId :: Lens' ModifyCapacityReservation Text Source #
The ID of the Capacity Reservation.
Destructuring the Response
data ModifyCapacityReservationResponse Source #
See: newModifyCapacityReservationResponse
smart constructor.
ModifyCapacityReservationResponse' | |
|
Instances
Generic ModifyCapacityReservationResponse Source # | |
Read ModifyCapacityReservationResponse Source # | |
Show ModifyCapacityReservationResponse Source # | |
Defined in Amazonka.EC2.ModifyCapacityReservation | |
NFData ModifyCapacityReservationResponse Source # | |
Defined in Amazonka.EC2.ModifyCapacityReservation rnf :: ModifyCapacityReservationResponse -> () # | |
Eq ModifyCapacityReservationResponse Source # | |
type Rep ModifyCapacityReservationResponse Source # | |
Defined in Amazonka.EC2.ModifyCapacityReservation type Rep ModifyCapacityReservationResponse = D1 ('MetaData "ModifyCapacityReservationResponse" "Amazonka.EC2.ModifyCapacityReservation" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifyCapacityReservationResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "return'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newModifyCapacityReservationResponse Source #
Create a value of ModifyCapacityReservationResponse
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':ModifyCapacityReservationResponse'
, modifyCapacityReservationResponse_return
- Returns true
if the request succeeds; otherwise, it returns an error.
$sel:httpStatus:ModifyCapacityReservationResponse'
, modifyCapacityReservationResponse_httpStatus
- The response's http status code.
Response Lenses
modifyCapacityReservationResponse_return :: Lens' ModifyCapacityReservationResponse (Maybe Bool) Source #
Returns true
if the request succeeds; otherwise, it returns an error.
modifyCapacityReservationResponse_httpStatus :: Lens' ModifyCapacityReservationResponse Int Source #
The response's http status code.