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 |
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
- data GetCapacityReservationUsage = GetCapacityReservationUsage' {}
- newGetCapacityReservationUsage :: Text -> GetCapacityReservationUsage
- getCapacityReservationUsage_dryRun :: Lens' GetCapacityReservationUsage (Maybe Bool)
- getCapacityReservationUsage_maxResults :: Lens' GetCapacityReservationUsage (Maybe Natural)
- getCapacityReservationUsage_nextToken :: Lens' GetCapacityReservationUsage (Maybe Text)
- getCapacityReservationUsage_capacityReservationId :: Lens' GetCapacityReservationUsage Text
- data GetCapacityReservationUsageResponse = GetCapacityReservationUsageResponse' {}
- newGetCapacityReservationUsageResponse :: Int -> GetCapacityReservationUsageResponse
- getCapacityReservationUsageResponse_availableInstanceCount :: Lens' GetCapacityReservationUsageResponse (Maybe Int)
- getCapacityReservationUsageResponse_capacityReservationId :: Lens' GetCapacityReservationUsageResponse (Maybe Text)
- getCapacityReservationUsageResponse_instanceType :: Lens' GetCapacityReservationUsageResponse (Maybe Text)
- getCapacityReservationUsageResponse_instanceUsages :: Lens' GetCapacityReservationUsageResponse (Maybe [InstanceUsage])
- getCapacityReservationUsageResponse_nextToken :: Lens' GetCapacityReservationUsageResponse (Maybe Text)
- getCapacityReservationUsageResponse_state :: Lens' GetCapacityReservationUsageResponse (Maybe CapacityReservationState)
- getCapacityReservationUsageResponse_totalInstanceCount :: Lens' GetCapacityReservationUsageResponse (Maybe Int)
- getCapacityReservationUsageResponse_httpStatus :: Lens' GetCapacityReservationUsageResponse Int
Creating a Request
data GetCapacityReservationUsage Source #
See: newGetCapacityReservationUsage
smart constructor.
GetCapacityReservationUsage' | |
|
Instances
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.
getCapacityReservationUsage_capacityReservationId :: Lens' GetCapacityReservationUsage Text Source #
The ID of the Capacity Reservation.
Destructuring the Response
data GetCapacityReservationUsageResponse Source #
See: newGetCapacityReservationUsageResponse
smart constructor.
GetCapacityReservationUsageResponse' | |
|
Instances
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_capacityReservationId :: Lens' GetCapacityReservationUsageResponse (Maybe Text) Source #
The ID of the Capacity Reservation.
getCapacityReservationUsageResponse_instanceType :: Lens' GetCapacityReservationUsageResponse (Maybe Text) Source #
The type of instance for which the Capacity Reservation reserves capacity.
getCapacityReservationUsageResponse_instanceUsages :: Lens' GetCapacityReservationUsageResponse (Maybe [InstanceUsage]) Source #
Information about the Capacity Reservation usage.
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.
getCapacityReservationUsageResponse_httpStatus :: Lens' GetCapacityReservationUsageResponse Int Source #
The response's http status code.