public class CreateReservedInstancesListingRequest extends AmazonWebServiceRequest implements java.io.Serializable
CreateReservedInstancesListing operation
.
Creates a listing for Amazon EC2 Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Reserved Instance listing at a time. To get a list of your Reserved Instances, you can use the DescribeReservedInstances operation.
The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.
To sell your Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Reserved Instances, and specify the upfront price to receive for them. Your Reserved Instance listings then become available for purchase. To view the details of your Reserved Instance listing, you can use the DescribeReservedInstancesListings operation.
For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide .
Constructor and Description |
---|
CreateReservedInstancesListingRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getClientToken()
Unique, case-sensitive identifier you provide to ensure idempotency of
your listings.
|
java.lang.Integer |
getInstanceCount()
The number of instances that are a part of a Reserved Instance account
to be listed in the Reserved Instance Marketplace.
|
java.util.List<PriceScheduleSpecification> |
getPriceSchedules()
A list specifying the price of the Reserved Instance for each month
remaining in the Reserved Instance term.
|
java.lang.String |
getReservedInstancesId()
The ID of the active Reserved Instance.
|
int |
hashCode() |
void |
setClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure idempotency of
your listings.
|
void |
setInstanceCount(java.lang.Integer instanceCount)
The number of instances that are a part of a Reserved Instance account
to be listed in the Reserved Instance Marketplace.
|
void |
setPriceSchedules(java.util.Collection<PriceScheduleSpecification> priceSchedules)
A list specifying the price of the Reserved Instance for each month
remaining in the Reserved Instance term.
|
void |
setReservedInstancesId(java.lang.String reservedInstancesId)
The ID of the active Reserved Instance.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateReservedInstancesListingRequest |
withClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure idempotency of
your listings.
|
CreateReservedInstancesListingRequest |
withInstanceCount(java.lang.Integer instanceCount)
The number of instances that are a part of a Reserved Instance account
to be listed in the Reserved Instance Marketplace.
|
CreateReservedInstancesListingRequest |
withPriceSchedules(java.util.Collection<PriceScheduleSpecification> priceSchedules)
A list specifying the price of the Reserved Instance for each month
remaining in the Reserved Instance term.
|
CreateReservedInstancesListingRequest |
withPriceSchedules(PriceScheduleSpecification... priceSchedules)
A list specifying the price of the Reserved Instance for each month
remaining in the Reserved Instance term.
|
CreateReservedInstancesListingRequest |
withReservedInstancesId(java.lang.String reservedInstancesId)
The ID of the active Reserved Instance.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public CreateReservedInstancesListingRequest()
public java.lang.String getReservedInstancesId()
public void setReservedInstancesId(java.lang.String reservedInstancesId)
reservedInstancesId
- The ID of the active Reserved Instance.public CreateReservedInstancesListingRequest withReservedInstancesId(java.lang.String reservedInstancesId)
Returns a reference to this object so that method calls can be chained together.
reservedInstancesId
- The ID of the active Reserved Instance.public java.lang.Integer getInstanceCount()
public void setInstanceCount(java.lang.Integer instanceCount)
instanceCount
- The number of instances that are a part of a Reserved Instance account
to be listed in the Reserved Instance Marketplace. This number should
be less than or equal to the instance count associated with the
Reserved Instance ID specified in this call.public CreateReservedInstancesListingRequest withInstanceCount(java.lang.Integer instanceCount)
Returns a reference to this object so that method calls can be chained together.
instanceCount
- The number of instances that are a part of a Reserved Instance account
to be listed in the Reserved Instance Marketplace. This number should
be less than or equal to the instance count associated with the
Reserved Instance ID specified in this call.public java.util.List<PriceScheduleSpecification> getPriceSchedules()
public void setPriceSchedules(java.util.Collection<PriceScheduleSpecification> priceSchedules)
priceSchedules
- A list specifying the price of the Reserved Instance for each month
remaining in the Reserved Instance term.public CreateReservedInstancesListingRequest withPriceSchedules(PriceScheduleSpecification... priceSchedules)
Returns a reference to this object so that method calls can be chained together.
priceSchedules
- A list specifying the price of the Reserved Instance for each month
remaining in the Reserved Instance term.public CreateReservedInstancesListingRequest withPriceSchedules(java.util.Collection<PriceScheduleSpecification> priceSchedules)
Returns a reference to this object so that method calls can be chained together.
priceSchedules
- A list specifying the price of the Reserved Instance for each month
remaining in the Reserved Instance term.public java.lang.String getClientToken()
public void setClientToken(java.lang.String clientToken)
clientToken
- Unique, case-sensitive identifier you provide to ensure idempotency of
your listings. This helps avoid duplicate listings. For more
information, see Ensuring
Idempotency.public CreateReservedInstancesListingRequest withClientToken(java.lang.String clientToken)
Returns a reference to this object so that method calls can be chained together.
clientToken
- Unique, case-sensitive identifier you provide to ensure idempotency of
your listings. This helps avoid duplicate listings. For more
information, see Ensuring
Idempotency.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.