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

Description

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

Creating a Request

data ModifyCapacityReservation Source #

See: newModifyCapacityReservation smart constructor.

Constructors

ModifyCapacityReservation' 

Fields

  • accept :: Maybe Bool

    Reserved. Capacity Reservations you have created are accepted by default.

  • additionalInfo :: Maybe Text

    Reserved for future use.

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

  • endDate :: Maybe ISO8601

    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.

  • endDateType :: Maybe 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 an EndDate value if EndDateType is unlimited.
    • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if EndDateType is limited.
  • instanceCount :: Maybe Int

    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.

  • capacityReservationId :: Text

    The ID of the Capacity Reservation.

Instances

Instances details
ToHeaders ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

ToPath ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

ToQuery ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

AWSRequest ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

Generic ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

Associated Types

type Rep ModifyCapacityReservation :: Type -> Type #

Read ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

Show ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

NFData ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

Eq ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

Hashable ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

type AWSResponse ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

type Rep ModifyCapacityReservation Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

type Rep ModifyCapacityReservation = D1 ('MetaData "ModifyCapacityReservation" "Amazonka.EC2.ModifyCapacityReservation" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifyCapacityReservation'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "accept") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "additionalInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "endDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ISO8601)) :*: S1 ('MetaSel ('Just "endDateType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EndDateType))) :*: (S1 ('MetaSel ('Just "instanceCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "capacityReservationId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

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 an EndDate value if EndDateType is unlimited.
  • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if EndDateType is limited.

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_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 an EndDate value if EndDateType is unlimited.
  • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if EndDateType is limited.

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.

Destructuring the Response

data ModifyCapacityReservationResponse Source #

See: newModifyCapacityReservationResponse smart constructor.

Constructors

ModifyCapacityReservationResponse' 

Fields

Instances

Instances details
Generic ModifyCapacityReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

Associated Types

type Rep ModifyCapacityReservationResponse :: Type -> Type #

Read ModifyCapacityReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

Show ModifyCapacityReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

NFData ModifyCapacityReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

Eq ModifyCapacityReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.ModifyCapacityReservation

type Rep ModifyCapacityReservationResponse Source # 
Instance details

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.