Class DBCapacityReservation
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<DBCapacityReservation.Builder,DBCapacityReservation>
Contains the details of a DB capacity reservation.
This data type is used as a response element in the following operations:
-
CancelDBCapacityReservation -
CreateDBCapacityReservation -
DescribeDBCapacityReservations -
ModifyDBCapacityReservation
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionThe unused capacity of the reservation, reported for each Availability Zone of the reservation.builder()The capacity commitment of the reservation.final InstantThe date and time when the reservation was created, in Universal Coordinated Time (UTC).final StringThe Amazon Resource Name (ARN) of the DB capacity reservation.final StringThe unique identifier of the DB capacity reservation.final StringThe name that you specified for the DB capacity reservation.final StringThe DB instance class for the reserved capacity.final InstantendDate()The date and time when the reservation expires, in Universal Coordinated Time (UTC).final Stringengine()The database engine for the reserved capacity.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the AvailableCapacityPerAvailabilityZoneList property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the TagList property.final StringThe license model for the reserved capacity.final IntegerThe number of DB instances that Amazon RDS reserves in each Availability Zone of the reservation.static Class<? extends DBCapacityReservation.Builder> final InstantThe date and time when a future-dated reservation starts, in Universal Coordinated Time (UTC).state()The current state of the DB capacity reservation.final StringThe current state of the DB capacity reservation.tagList()The tags associated with the DB capacity reservation.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
dbCapacityReservationName
The name that you specified for the DB capacity reservation.
- Returns:
- The name that you specified for the DB capacity reservation.
-
dbInstanceClass
The DB instance class for the reserved capacity. You specify this value when you create the reservation, and you can't change it afterward.
- Returns:
- The DB instance class for the reserved capacity. You specify this value when you create the reservation, and you can't change it afterward.
-
engine
The database engine for the reserved capacity. You specify this value when you create the reservation, and you can't change it afterward.
- Returns:
- The database engine for the reserved capacity. You specify this value when you create the reservation, and you can't change it afterward.
-
licenseModel
The license model for the reserved capacity. Amazon RDS returns this value only for a reservation that reserves capacity for a specific license model. Amazon RDS doesn't return this value for a reservation whose database engine doesn't support a license model.
A DB instance launches into the reservation only when the license model of the DB instance matches this value. For a reservation that holds no license model, Amazon RDS applies no license model check at launch.
Valid Values:
-
RDS for Microsoft SQL Server Enterprise Edition and Standard Edition -
license-included | bring-your-own-media -
RDS for Microsoft SQL Server Developer Edition -
bring-your-own-license -
RDS for Oracle -
bring-your-own-license | license-included -
RDS for Db2 Standard Edition and Advanced Edition -
bring-your-own-license | marketplace-license
For RDS for Db2 Standard Edition and Advanced Edition, a reservation created without a license model holds
bring-your-own-license.- Returns:
- The license model for the reserved capacity. Amazon RDS returns this value only for a reservation that
reserves capacity for a specific license model. Amazon RDS doesn't return this value for a reservation
whose database engine doesn't support a license model.
A DB instance launches into the reservation only when the license model of the DB instance matches this value. For a reservation that holds no license model, Amazon RDS applies no license model check at launch.
Valid Values:
-
RDS for Microsoft SQL Server Enterprise Edition and Standard Edition -
license-included | bring-your-own-media -
RDS for Microsoft SQL Server Developer Edition -
bring-your-own-license -
RDS for Oracle -
bring-your-own-license | license-included -
RDS for Db2 Standard Edition and Advanced Edition -
bring-your-own-license | marketplace-license
For RDS for Db2 Standard Edition and Advanced Edition, a reservation created without a license model holds
bring-your-own-license. -
-
-
reservedCapacityPerAvailabilityZone
The number of DB instances that Amazon RDS reserves in each Availability Zone of the reservation. This value matches the
CapacityPerAvailabilityZoneparameter of the request. The total reserved capacity is this value multiplied by the number of Availability Zones of the reservation.- Returns:
- The number of DB instances that Amazon RDS reserves in each Availability Zone of the reservation. This
value matches the
CapacityPerAvailabilityZoneparameter of the request. The total reserved capacity is this value multiplied by the number of Availability Zones of the reservation.
-
hasAvailableCapacityPerAvailabilityZoneList
public final boolean hasAvailableCapacityPerAvailabilityZoneList()For responses, this returns true if the service returned a value for the AvailableCapacityPerAvailabilityZoneList property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
availableCapacityPerAvailabilityZoneList
The unused capacity of the reservation, reported for each Availability Zone of the reservation. Each entry names one Availability Zone, and it reports the number of DB instances that remain available in that Availability Zone.
Amazon RDS reports available capacity only for a reservation that is in the
activestate and not past its end date. Otherwise, each entry reports an available capacity of0. A future-dated reservation that hasn't started reports0, and a reservation that Amazon RDS is modifying reports0.A reservation reports the
pendingstate while Amazon RDS modifies it. Therefore, a reservation in theactivestate that reports no available capacity has no unused capacity.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAvailableCapacityPerAvailabilityZoneList()method.- Returns:
- The unused capacity of the reservation, reported for each Availability Zone of the reservation. Each
entry names one Availability Zone, and it reports the number of DB instances that remain available in
that Availability Zone.
Amazon RDS reports available capacity only for a reservation that is in the
activestate and not past its end date. Otherwise, each entry reports an available capacity of0. A future-dated reservation that hasn't started reports0, and a reservation that Amazon RDS is modifying reports0.A reservation reports the
pendingstate while Amazon RDS modifies it. Therefore, a reservation in theactivestate that reports no available capacity has no unused capacity.
-
endDate
The date and time when the reservation expires, in Universal Coordinated Time (UTC). Amazon RDS doesn't return this value if the reservation doesn't expire.
A DB instance that uses the reservation keeps running after the reservation expires. It continues on unreserved capacity, and Amazon RDS doesn't stop it or modify it. However, Amazon RDS no longer reserves capacity for the DB instance. Amazon RDS might later move the DB instance to different hardware, for example during hardware maintenance. That move can fail when the Amazon Web Services Region has insufficient capacity for the DB instance class.
- Returns:
- The date and time when the reservation expires, in Universal Coordinated Time (UTC). Amazon RDS doesn't
return this value if the reservation doesn't expire.
A DB instance that uses the reservation keeps running after the reservation expires. It continues on unreserved capacity, and Amazon RDS doesn't stop it or modify it. However, Amazon RDS no longer reserves capacity for the DB instance. Amazon RDS might later move the DB instance to different hardware, for example during hardware maintenance. That move can fail when the Amazon Web Services Region has insufficient capacity for the DB instance class.
-
createDate
The date and time when the reservation was created, in Universal Coordinated Time (UTC).
- Returns:
- The date and time when the reservation was created, in Universal Coordinated Time (UTC).
-
startDate
The date and time when a future-dated reservation starts, in Universal Coordinated Time (UTC). Amazon RDS doesn't return this value for a reservation that started immediately.
- Returns:
- The date and time when a future-dated reservation starts, in Universal Coordinated Time (UTC). Amazon RDS doesn't return this value for a reservation that started immediately.
-
commitmentInfo
The capacity commitment of the reservation. Amazon RDS returns this object only for a future-dated reservation.
- Returns:
- The capacity commitment of the reservation. Amazon RDS returns this object only for a future-dated reservation.
-
state
The current state of the DB capacity reservation. A DB instance can use the reservation in the
activestate only.Valid Values:
-
active- Amazon RDS holds the reserved capacity, and a DB instance can use it. -
pending- The reservation isn't ready to use yet. Amazon RDS is creating the reserved capacity, or it is applying a requested modification. -
assessing- Amazon RDS is evaluating the request for a future-dated reservation. -
scheduled- Amazon RDS accepted a future-dated reservation, and the reservation is waiting for its start date. -
delayed- Amazon RDS couldn't provide the reserved capacity of a future-dated reservation by its start date. -
unsupported- Amazon RDS can't fulfill the future-dated reservation as requested. -
expired- The reservation passed its end date. Amazon RDS releases the reserved capacity. -
cancelled- You cancelled the reservation, and Amazon RDS released the reserved capacity. -
failed- Amazon RDS couldn't reserve the capacity.
The values
assessing,scheduled,delayed, andunsupportedapply to a future-dated reservation only.If the service returns an enum value that is not available in the current SDK version,
statewill returnDBCapacityReservationState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The current state of the DB capacity reservation. A DB instance can use the reservation in the
activestate only.Valid Values:
-
active- Amazon RDS holds the reserved capacity, and a DB instance can use it. -
pending- The reservation isn't ready to use yet. Amazon RDS is creating the reserved capacity, or it is applying a requested modification. -
assessing- Amazon RDS is evaluating the request for a future-dated reservation. -
scheduled- Amazon RDS accepted a future-dated reservation, and the reservation is waiting for its start date. -
delayed- Amazon RDS couldn't provide the reserved capacity of a future-dated reservation by its start date. -
unsupported- Amazon RDS can't fulfill the future-dated reservation as requested. -
expired- The reservation passed its end date. Amazon RDS releases the reserved capacity. -
cancelled- You cancelled the reservation, and Amazon RDS released the reserved capacity. -
failed- Amazon RDS couldn't reserve the capacity.
The values
assessing,scheduled,delayed, andunsupportedapply to a future-dated reservation only. -
- See Also:
-
-
stateAsString
The current state of the DB capacity reservation. A DB instance can use the reservation in the
activestate only.Valid Values:
-
active- Amazon RDS holds the reserved capacity, and a DB instance can use it. -
pending- The reservation isn't ready to use yet. Amazon RDS is creating the reserved capacity, or it is applying a requested modification. -
assessing- Amazon RDS is evaluating the request for a future-dated reservation. -
scheduled- Amazon RDS accepted a future-dated reservation, and the reservation is waiting for its start date. -
delayed- Amazon RDS couldn't provide the reserved capacity of a future-dated reservation by its start date. -
unsupported- Amazon RDS can't fulfill the future-dated reservation as requested. -
expired- The reservation passed its end date. Amazon RDS releases the reserved capacity. -
cancelled- You cancelled the reservation, and Amazon RDS released the reserved capacity. -
failed- Amazon RDS couldn't reserve the capacity.
The values
assessing,scheduled,delayed, andunsupportedapply to a future-dated reservation only.If the service returns an enum value that is not available in the current SDK version,
statewill returnDBCapacityReservationState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The current state of the DB capacity reservation. A DB instance can use the reservation in the
activestate only.Valid Values:
-
active- Amazon RDS holds the reserved capacity, and a DB instance can use it. -
pending- The reservation isn't ready to use yet. Amazon RDS is creating the reserved capacity, or it is applying a requested modification. -
assessing- Amazon RDS is evaluating the request for a future-dated reservation. -
scheduled- Amazon RDS accepted a future-dated reservation, and the reservation is waiting for its start date. -
delayed- Amazon RDS couldn't provide the reserved capacity of a future-dated reservation by its start date. -
unsupported- Amazon RDS can't fulfill the future-dated reservation as requested. -
expired- The reservation passed its end date. Amazon RDS releases the reserved capacity. -
cancelled- You cancelled the reservation, and Amazon RDS released the reserved capacity. -
failed- Amazon RDS couldn't reserve the capacity.
The values
assessing,scheduled,delayed, andunsupportedapply to a future-dated reservation only. -
- See Also:
-
-
dbCapacityReservationArn
The Amazon Resource Name (ARN) of the DB capacity reservation.
- Returns:
- The Amazon Resource Name (ARN) of the DB capacity reservation.
-
dbCapacityReservationIdentifier
The unique identifier of the DB capacity reservation. The identifier has the prefix
dbcr-. Every other DB capacity reservation operation takes this identifier.- Returns:
- The unique identifier of the DB capacity reservation. The identifier has the prefix
dbcr-. Every other DB capacity reservation operation takes this identifier.
-
hasTagList
public final boolean hasTagList()For responses, this returns true if the service returned a value for the TagList property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tagList
The tags associated with the DB capacity reservation.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTagList()method.- Returns:
- The tags associated with the DB capacity reservation.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<DBCapacityReservation.Builder,DBCapacityReservation> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-