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 |
Cancels the specified Capacity Reservation, releases the reserved
capacity, and changes the Capacity Reservation's state to cancelled
.
Instances running in the reserved capacity continue running until you stop them. Stopped instances that target the Capacity Reservation can no longer launch. Modify these instances to either target a different Capacity Reservation, launch On-Demand Instance capacity, or run in any open Capacity Reservation that has matching attributes and sufficient capacity.
Synopsis
- data CancelCapacityReservation = CancelCapacityReservation' {}
- newCancelCapacityReservation :: Text -> CancelCapacityReservation
- cancelCapacityReservation_dryRun :: Lens' CancelCapacityReservation (Maybe Bool)
- cancelCapacityReservation_capacityReservationId :: Lens' CancelCapacityReservation Text
- data CancelCapacityReservationResponse = CancelCapacityReservationResponse' {
- return' :: Maybe Bool
- httpStatus :: Int
- newCancelCapacityReservationResponse :: Int -> CancelCapacityReservationResponse
- cancelCapacityReservationResponse_return :: Lens' CancelCapacityReservationResponse (Maybe Bool)
- cancelCapacityReservationResponse_httpStatus :: Lens' CancelCapacityReservationResponse Int
Creating a Request
data CancelCapacityReservation Source #
See: newCancelCapacityReservation
smart constructor.
CancelCapacityReservation' | |
|
Instances
newCancelCapacityReservation Source #
Create a value of CancelCapacityReservation
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:CancelCapacityReservation'
, cancelCapacityReservation_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
.
CancelCapacityReservation
, cancelCapacityReservation_capacityReservationId
- The ID of the Capacity Reservation to be cancelled.
Request Lenses
cancelCapacityReservation_dryRun :: Lens' CancelCapacityReservation (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
.
cancelCapacityReservation_capacityReservationId :: Lens' CancelCapacityReservation Text Source #
The ID of the Capacity Reservation to be cancelled.
Destructuring the Response
data CancelCapacityReservationResponse Source #
See: newCancelCapacityReservationResponse
smart constructor.
CancelCapacityReservationResponse' | |
|
Instances
Generic CancelCapacityReservationResponse Source # | |
Read CancelCapacityReservationResponse Source # | |
Show CancelCapacityReservationResponse Source # | |
Defined in Amazonka.EC2.CancelCapacityReservation | |
NFData CancelCapacityReservationResponse Source # | |
Defined in Amazonka.EC2.CancelCapacityReservation rnf :: CancelCapacityReservationResponse -> () # | |
Eq CancelCapacityReservationResponse Source # | |
type Rep CancelCapacityReservationResponse Source # | |
Defined in Amazonka.EC2.CancelCapacityReservation type Rep CancelCapacityReservationResponse = D1 ('MetaData "CancelCapacityReservationResponse" "Amazonka.EC2.CancelCapacityReservation" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CancelCapacityReservationResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "return'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newCancelCapacityReservationResponse Source #
Create a value of CancelCapacityReservationResponse
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':CancelCapacityReservationResponse'
, cancelCapacityReservationResponse_return
- Returns true
if the request succeeds; otherwise, it returns an error.
$sel:httpStatus:CancelCapacityReservationResponse'
, cancelCapacityReservationResponse_httpStatus
- The response's http status code.
Response Lenses
cancelCapacityReservationResponse_return :: Lens' CancelCapacityReservationResponse (Maybe Bool) Source #
Returns true
if the request succeeds; otherwise, it returns an error.
cancelCapacityReservationResponse_httpStatus :: Lens' CancelCapacityReservationResponse Int Source #
The response's http status code.