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

Description

Gets usage information about a Capacity Reservation. If the Capacity Reservation is shared, it shows usage information for the Capacity Reservation owner and each Amazon Web Services account that is currently using the shared capacity. If the Capacity Reservation is not shared, it shows only the Capacity Reservation owner's usage.

Synopsis

Creating a Request

data GetCapacityReservationUsage Source #

See: newGetCapacityReservationUsage smart constructor.

Constructors

GetCapacityReservationUsage' 

Fields

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

  • maxResults :: Maybe Natural

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

    Valid range: Minimum value of 1. Maximum value of 1000.

  • nextToken :: Maybe Text

    The token to use to retrieve the next page of results.

  • capacityReservationId :: Text

    The ID of the Capacity Reservation.

Instances

Instances details
ToHeaders GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

ToPath GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

ToQuery GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

AWSRequest GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

Generic GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

Associated Types

type Rep GetCapacityReservationUsage :: Type -> Type #

Read GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

Show GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

NFData GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

Eq GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

Hashable GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

type AWSResponse GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

type Rep GetCapacityReservationUsage Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

type Rep GetCapacityReservationUsage = D1 ('MetaData "GetCapacityReservationUsage" "Amazonka.EC2.GetCapacityReservationUsage" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "GetCapacityReservationUsage'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "capacityReservationId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newGetCapacityReservationUsage Source #

Create a value of GetCapacityReservationUsage 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:GetCapacityReservationUsage', getCapacityReservationUsage_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.

$sel:maxResults:GetCapacityReservationUsage', getCapacityReservationUsage_maxResults - The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

Valid range: Minimum value of 1. Maximum value of 1000.

GetCapacityReservationUsage, getCapacityReservationUsage_nextToken - The token to use to retrieve the next page of results.

GetCapacityReservationUsage, getCapacityReservationUsage_capacityReservationId - The ID of the Capacity Reservation.

Request Lenses

getCapacityReservationUsage_dryRun :: Lens' GetCapacityReservationUsage (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.

getCapacityReservationUsage_maxResults :: Lens' GetCapacityReservationUsage (Maybe Natural) Source #

The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

Valid range: Minimum value of 1. Maximum value of 1000.

getCapacityReservationUsage_nextToken :: Lens' GetCapacityReservationUsage (Maybe Text) Source #

The token to use to retrieve the next page of results.

Destructuring the Response

data GetCapacityReservationUsageResponse Source #

Constructors

GetCapacityReservationUsageResponse' 

Fields

  • availableInstanceCount :: Maybe Int

    The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

  • capacityReservationId :: Maybe Text

    The ID of the Capacity Reservation.

  • instanceType :: Maybe Text

    The type of instance for which the Capacity Reservation reserves capacity.

  • instanceUsages :: Maybe [InstanceUsage]

    Information about the Capacity Reservation usage.

  • nextToken :: Maybe Text

    The token to use to retrieve the next page of results. This value is null when there are no more results to return.

  • state :: Maybe CapacityReservationState

    The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

    • active - The Capacity Reservation is active and the capacity is available for your use.
    • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.
    • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.
    • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.
    • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
  • totalInstanceCount :: Maybe Int

    The number of instances for which the Capacity Reservation reserves capacity.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic GetCapacityReservationUsageResponse Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

Read GetCapacityReservationUsageResponse Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

Show GetCapacityReservationUsageResponse Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

NFData GetCapacityReservationUsageResponse Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

Eq GetCapacityReservationUsageResponse Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

type Rep GetCapacityReservationUsageResponse Source # 
Instance details

Defined in Amazonka.EC2.GetCapacityReservationUsage

type Rep GetCapacityReservationUsageResponse = D1 ('MetaData "GetCapacityReservationUsageResponse" "Amazonka.EC2.GetCapacityReservationUsage" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "GetCapacityReservationUsageResponse'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "availableInstanceCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "capacityReservationId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "instanceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "instanceUsages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [InstanceUsage])))) :*: ((S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CapacityReservationState))) :*: (S1 ('MetaSel ('Just "totalInstanceCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

newGetCapacityReservationUsageResponse Source #

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

GetCapacityReservationUsageResponse, getCapacityReservationUsageResponse_availableInstanceCount - The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

GetCapacityReservationUsage, getCapacityReservationUsageResponse_capacityReservationId - The ID of the Capacity Reservation.

GetCapacityReservationUsageResponse, getCapacityReservationUsageResponse_instanceType - The type of instance for which the Capacity Reservation reserves capacity.

$sel:instanceUsages:GetCapacityReservationUsageResponse', getCapacityReservationUsageResponse_instanceUsages - Information about the Capacity Reservation usage.

GetCapacityReservationUsage, getCapacityReservationUsageResponse_nextToken - The token to use to retrieve the next page of results. This value is null when there are no more results to return.

GetCapacityReservationUsageResponse, getCapacityReservationUsageResponse_state - The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

  • active - The Capacity Reservation is active and the capacity is available for your use.
  • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.
  • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.
  • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.
  • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.

GetCapacityReservationUsageResponse, getCapacityReservationUsageResponse_totalInstanceCount - The number of instances for which the Capacity Reservation reserves capacity.

$sel:httpStatus:GetCapacityReservationUsageResponse', getCapacityReservationUsageResponse_httpStatus - The response's http status code.

Response Lenses

getCapacityReservationUsageResponse_availableInstanceCount :: Lens' GetCapacityReservationUsageResponse (Maybe Int) Source #

The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

getCapacityReservationUsageResponse_instanceType :: Lens' GetCapacityReservationUsageResponse (Maybe Text) Source #

The type of instance for which the Capacity Reservation reserves capacity.

getCapacityReservationUsageResponse_nextToken :: Lens' GetCapacityReservationUsageResponse (Maybe Text) Source #

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

getCapacityReservationUsageResponse_state :: Lens' GetCapacityReservationUsageResponse (Maybe CapacityReservationState) Source #

The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

  • active - The Capacity Reservation is active and the capacity is available for your use.
  • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.
  • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.
  • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.
  • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.

getCapacityReservationUsageResponse_totalInstanceCount :: Lens' GetCapacityReservationUsageResponse (Maybe Int) Source #

The number of instances for which the Capacity Reservation reserves capacity.