/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes a Capacity Reservation. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CapacityReservation implements Serializable, Cloneable { /** ** The ID of the Capacity Reservation. *
*/ private String capacityReservationId; /** ** The ID of the Amazon Web Services account that owns the Capacity Reservation. *
*/ private String ownerId; /** ** The Amazon Resource Name (ARN) of the Capacity Reservation. *
*/ private String capacityReservationArn; /** ** The Availability Zone ID of the Capacity Reservation. *
*/ private String availabilityZoneId; /** ** The type of instance for which the Capacity Reservation reserves capacity. *
*/ private String instanceType; /** ** The type of operating system for which the Capacity Reservation reserves capacity. *
*/ private String instancePlatform; /** ** The Availability Zone in which the capacity is reserved. *
*/ private String availabilityZone; /** ** Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy * settings: *
*
* default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web
* Services accounts.
*
* dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a
* single Amazon Web Services account.
*
* The total number of instances for which the Capacity Reservation reserves capacity. *
*/ private Integer totalInstanceCount; /** ** The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation. *
*/ private Integer availableInstanceCount; /** ** Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated * throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This * optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized * instance. *
*/ private Boolean ebsOptimized; /** ** Deprecated. *
*/ private Boolean ephemeralStorage; /** ** 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.
*
* The date and time at which the Capacity Reservation was started. *
*/ private java.util.Date startDate; /** *
* 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.
*
* 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.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time.
*
* Indicates the type of instance launches that the Capacity Reservation accepts. The options include: *
*
* open
- The Capacity Reservation accepts all instances that have matching attributes (instance type,
* platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation
* automatically without specifying any additional parameters.
*
* targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance
* type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only
* permitted instances can use the reserved capacity.
*
* The date and time at which the Capacity Reservation was created. *
*/ private java.util.Date createDate; /** ** Any tags assigned to the Capacity Reservation. *
*/ private com.amazonaws.internal.SdkInternalList* The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created. *
*/ private String outpostArn; /** ** The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity * Reservations that were created by a Capacity Reservation Fleet. *
*/ private String capacityReservationFleetId; /** ** The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For * more information, see Capacity * Reservations for cluster placement groups in the Amazon EC2 User Guide. *
*/ private String placementGroupArn; /** ** Information about instance capacity usage. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the Capacity Reservation. *
* * @param capacityReservationId * The ID of the Capacity Reservation. */ public void setCapacityReservationId(String capacityReservationId) { this.capacityReservationId = capacityReservationId; } /** ** The ID of the Capacity Reservation. *
* * @return The ID of the Capacity Reservation. */ public String getCapacityReservationId() { return this.capacityReservationId; } /** ** The ID of the Capacity Reservation. *
* * @param capacityReservationId * The ID of the Capacity Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withCapacityReservationId(String capacityReservationId) { setCapacityReservationId(capacityReservationId); return this; } /** ** The ID of the Amazon Web Services account that owns the Capacity Reservation. *
* * @param ownerId * The ID of the Amazon Web Services account that owns the Capacity Reservation. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** ** The ID of the Amazon Web Services account that owns the Capacity Reservation. *
* * @return The ID of the Amazon Web Services account that owns the Capacity Reservation. */ public String getOwnerId() { return this.ownerId; } /** ** The ID of the Amazon Web Services account that owns the Capacity Reservation. *
* * @param ownerId * The ID of the Amazon Web Services account that owns the Capacity Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** ** The Amazon Resource Name (ARN) of the Capacity Reservation. *
* * @param capacityReservationArn * The Amazon Resource Name (ARN) of the Capacity Reservation. */ public void setCapacityReservationArn(String capacityReservationArn) { this.capacityReservationArn = capacityReservationArn; } /** ** The Amazon Resource Name (ARN) of the Capacity Reservation. *
* * @return The Amazon Resource Name (ARN) of the Capacity Reservation. */ public String getCapacityReservationArn() { return this.capacityReservationArn; } /** ** The Amazon Resource Name (ARN) of the Capacity Reservation. *
* * @param capacityReservationArn * The Amazon Resource Name (ARN) of the Capacity Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withCapacityReservationArn(String capacityReservationArn) { setCapacityReservationArn(capacityReservationArn); return this; } /** ** The Availability Zone ID of the Capacity Reservation. *
* * @param availabilityZoneId * The Availability Zone ID of the Capacity Reservation. */ public void setAvailabilityZoneId(String availabilityZoneId) { this.availabilityZoneId = availabilityZoneId; } /** ** The Availability Zone ID of the Capacity Reservation. *
* * @return The Availability Zone ID of the Capacity Reservation. */ public String getAvailabilityZoneId() { return this.availabilityZoneId; } /** ** The Availability Zone ID of the Capacity Reservation. *
* * @param availabilityZoneId * The Availability Zone ID of the Capacity Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withAvailabilityZoneId(String availabilityZoneId) { setAvailabilityZoneId(availabilityZoneId); return this; } /** ** The type of instance for which the Capacity Reservation reserves capacity. *
* * @param instanceType * The type of instance for which the Capacity Reservation reserves capacity. */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** ** The type of instance for which the Capacity Reservation reserves capacity. *
* * @return The type of instance for which the Capacity Reservation reserves capacity. */ public String getInstanceType() { return this.instanceType; } /** ** The type of instance for which the Capacity Reservation reserves capacity. *
* * @param instanceType * The type of instance for which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** ** The type of operating system for which the Capacity Reservation reserves capacity. *
* * @param instancePlatform * The type of operating system for which the Capacity Reservation reserves capacity. * @see CapacityReservationInstancePlatform */ public void setInstancePlatform(String instancePlatform) { this.instancePlatform = instancePlatform; } /** ** The type of operating system for which the Capacity Reservation reserves capacity. *
* * @return The type of operating system for which the Capacity Reservation reserves capacity. * @see CapacityReservationInstancePlatform */ public String getInstancePlatform() { return this.instancePlatform; } /** ** The type of operating system for which the Capacity Reservation reserves capacity. *
* * @param instancePlatform * The type of operating system for which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. * @see CapacityReservationInstancePlatform */ public CapacityReservation withInstancePlatform(String instancePlatform) { setInstancePlatform(instancePlatform); return this; } /** ** The type of operating system for which the Capacity Reservation reserves capacity. *
* * @param instancePlatform * The type of operating system for which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. * @see CapacityReservationInstancePlatform */ public CapacityReservation withInstancePlatform(CapacityReservationInstancePlatform instancePlatform) { this.instancePlatform = instancePlatform.toString(); return this; } /** ** The Availability Zone in which the capacity is reserved. *
* * @param availabilityZone * The Availability Zone in which the capacity is reserved. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** ** The Availability Zone in which the capacity is reserved. *
* * @return The Availability Zone in which the capacity is reserved. */ public String getAvailabilityZone() { return this.availabilityZone; } /** ** The Availability Zone in which the capacity is reserved. *
* * @param availabilityZone * The Availability Zone in which the capacity is reserved. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** ** Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy * settings: *
*
* default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web
* Services accounts.
*
* dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a
* single Amazon Web Services account.
*
* default
- The Capacity Reservation is created on hardware that is shared with other Amazon
* Web Services accounts.
*
* dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated
* to a single Amazon Web Services account.
*
* Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy * settings: *
*
* default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web
* Services accounts.
*
* dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a
* single Amazon Web Services account.
*
* default
- The Capacity Reservation is created on hardware that is shared with other Amazon
* Web Services accounts.
*
* dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated
* to a single Amazon Web Services account.
*
* Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy * settings: *
*
* default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web
* Services accounts.
*
* dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a
* single Amazon Web Services account.
*
* default
- The Capacity Reservation is created on hardware that is shared with other Amazon
* Web Services accounts.
*
* dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated
* to a single Amazon Web Services account.
*
* Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy * settings: *
*
* default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web
* Services accounts.
*
* dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a
* single Amazon Web Services account.
*
* default
- The Capacity Reservation is created on hardware that is shared with other Amazon
* Web Services accounts.
*
* dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated
* to a single Amazon Web Services account.
*
* The total number of instances for which the Capacity Reservation reserves capacity. *
* * @param totalInstanceCount * The total number of instances for which the Capacity Reservation reserves capacity. */ public void setTotalInstanceCount(Integer totalInstanceCount) { this.totalInstanceCount = totalInstanceCount; } /** ** The total number of instances for which the Capacity Reservation reserves capacity. *
* * @return The total number of instances for which the Capacity Reservation reserves capacity. */ public Integer getTotalInstanceCount() { return this.totalInstanceCount; } /** ** The total number of instances for which the Capacity Reservation reserves capacity. *
* * @param totalInstanceCount * The total number of instances for which the Capacity Reservation reserves capacity. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withTotalInstanceCount(Integer totalInstanceCount) { setTotalInstanceCount(totalInstanceCount); return this; } /** ** The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation. *
* * @param availableInstanceCount * The remaining capacity. Indicates the number of instances that can be launched in the Capacity * Reservation. */ public void setAvailableInstanceCount(Integer availableInstanceCount) { this.availableInstanceCount = availableInstanceCount; } /** ** The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation. *
* * @return The remaining capacity. Indicates the number of instances that can be launched in the Capacity * Reservation. */ public Integer getAvailableInstanceCount() { return this.availableInstanceCount; } /** ** The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation. *
* * @param availableInstanceCount * The remaining capacity. Indicates the number of instances that can be launched in the Capacity * Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withAvailableInstanceCount(Integer availableInstanceCount) { setAvailableInstanceCount(availableInstanceCount); return this; } /** ** Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated * throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This * optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized * instance. *
* * @param ebsOptimized * Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides * dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O * performance. This optimization isn't available with all instance types. Additional usage charges apply * when using an EBS- optimized instance. */ public void setEbsOptimized(Boolean ebsOptimized) { this.ebsOptimized = ebsOptimized; } /** ** Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated * throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This * optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized * instance. *
* * @return Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides * dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O * performance. This optimization isn't available with all instance types. Additional usage charges apply * when using an EBS- optimized instance. */ public Boolean getEbsOptimized() { return this.ebsOptimized; } /** ** Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated * throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This * optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized * instance. *
* * @param ebsOptimized * Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides * dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O * performance. This optimization isn't available with all instance types. Additional usage charges apply * when using an EBS- optimized instance. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withEbsOptimized(Boolean ebsOptimized) { setEbsOptimized(ebsOptimized); return this; } /** ** Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated * throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This * optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized * instance. *
* * @return Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides * dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O * performance. This optimization isn't available with all instance types. Additional usage charges apply * when using an EBS- optimized instance. */ public Boolean isEbsOptimized() { return this.ebsOptimized; } /** ** Deprecated. *
* * @param ephemeralStorage * Deprecated. */ public void setEphemeralStorage(Boolean ephemeralStorage) { this.ephemeralStorage = ephemeralStorage; } /** ** Deprecated. *
* * @return Deprecated. */ public Boolean getEphemeralStorage() { return this.ephemeralStorage; } /** ** Deprecated. *
* * @param ephemeralStorage * Deprecated. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withEphemeralStorage(Boolean ephemeralStorage) { setEphemeralStorage(ephemeralStorage); return this; } /** ** Deprecated. *
* * @return Deprecated. */ public Boolean isEphemeralStorage() { return this.ephemeralStorage; } /** ** 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* The date and time at which the Capacity Reservation was started. *
* * @param startDate * The date and time at which the Capacity Reservation was started. */ public void setStartDate(java.util.Date startDate) { this.startDate = startDate; } /** ** The date and time at which the Capacity Reservation was started. *
* * @return The date and time at which the Capacity Reservation was started. */ public java.util.Date getStartDate() { return this.startDate; } /** ** The date and time at which the Capacity Reservation was started. *
* * @param startDate * The date and time at which the Capacity Reservation was started. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withStartDate(java.util.Date startDate) { setStartDate(startDate); return this; } /** *
* 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.
*
expired
when it reaches its end date and time.
*/
public void setEndDate(java.util.Date endDate) {
this.endDate = 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.
*
expired
when it reaches its end date and time.
*/
public java.util.Date getEndDate() {
return this.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.
*
expired
when it reaches its end date and time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CapacityReservation withEndDate(java.util.Date endDate) {
setEndDate(endDate);
return this;
}
/**
* * 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.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time.
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time.
*
* 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.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time.
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time.
*
* 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.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time.
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time.
*
* 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.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time.
*
* unlimited
- The Capacity Reservation remains active until you explicitly cancel it.
*
* limited
- The Capacity Reservation expires automatically at a specified date and time.
*
* Indicates the type of instance launches that the Capacity Reservation accepts. The options include: *
*
* open
- The Capacity Reservation accepts all instances that have matching attributes (instance type,
* platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation
* automatically without specifying any additional parameters.
*
* targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance
* type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only
* permitted instances can use the reserved capacity.
*
* open
- The Capacity Reservation accepts all instances that have matching attributes (instance
* type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity
* Reservation automatically without specifying any additional parameters.
*
* targeted
- The Capacity Reservation only accepts instances that have matching attributes
* (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This
* ensures that only permitted instances can use the reserved capacity.
*
* Indicates the type of instance launches that the Capacity Reservation accepts. The options include: *
*
* open
- The Capacity Reservation accepts all instances that have matching attributes (instance type,
* platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation
* automatically without specifying any additional parameters.
*
* targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance
* type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only
* permitted instances can use the reserved capacity.
*
* open
- The Capacity Reservation accepts all instances that have matching attributes
* (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the
* Capacity Reservation automatically without specifying any additional parameters.
*
* targeted
- The Capacity Reservation only accepts instances that have matching attributes
* (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This
* ensures that only permitted instances can use the reserved capacity.
*
* Indicates the type of instance launches that the Capacity Reservation accepts. The options include: *
*
* open
- The Capacity Reservation accepts all instances that have matching attributes (instance type,
* platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation
* automatically without specifying any additional parameters.
*
* targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance
* type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only
* permitted instances can use the reserved capacity.
*
* open
- The Capacity Reservation accepts all instances that have matching attributes (instance
* type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity
* Reservation automatically without specifying any additional parameters.
*
* targeted
- The Capacity Reservation only accepts instances that have matching attributes
* (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This
* ensures that only permitted instances can use the reserved capacity.
*
* Indicates the type of instance launches that the Capacity Reservation accepts. The options include: *
*
* open
- The Capacity Reservation accepts all instances that have matching attributes (instance type,
* platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation
* automatically without specifying any additional parameters.
*
* targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance
* type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only
* permitted instances can use the reserved capacity.
*
* open
- The Capacity Reservation accepts all instances that have matching attributes (instance
* type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity
* Reservation automatically without specifying any additional parameters.
*
* targeted
- The Capacity Reservation only accepts instances that have matching attributes
* (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This
* ensures that only permitted instances can use the reserved capacity.
*
* The date and time at which the Capacity Reservation was created. *
* * @param createDate * The date and time at which the Capacity Reservation was created. */ public void setCreateDate(java.util.Date createDate) { this.createDate = createDate; } /** ** The date and time at which the Capacity Reservation was created. *
* * @return The date and time at which the Capacity Reservation was created. */ public java.util.Date getCreateDate() { return this.createDate; } /** ** The date and time at which the Capacity Reservation was created. *
* * @param createDate * The date and time at which the Capacity Reservation was created. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withCreateDate(java.util.Date createDate) { setCreateDate(createDate); return this; } /** ** Any tags assigned to the Capacity Reservation. *
* * @return Any tags assigned to the Capacity Reservation. */ public java.util.List* Any tags assigned to the Capacity Reservation. *
* * @param tags * Any tags assigned to the Capacity Reservation. */ public void setTags(java.util.Collection* Any tags assigned to the Capacity Reservation. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * Any tags assigned to the Capacity Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* Any tags assigned to the Capacity Reservation. *
* * @param tags * Any tags assigned to the Capacity Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withTags(java.util.Collection* The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created. *
* * @param outpostArn * The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created. */ public void setOutpostArn(String outpostArn) { this.outpostArn = outpostArn; } /** ** The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created. *
* * @return The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created. */ public String getOutpostArn() { return this.outpostArn; } /** ** The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created. *
* * @param outpostArn * The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withOutpostArn(String outpostArn) { setOutpostArn(outpostArn); return this; } /** ** The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity * Reservations that were created by a Capacity Reservation Fleet. *
* * @param capacityReservationFleetId * The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for * Capacity Reservations that were created by a Capacity Reservation Fleet. */ public void setCapacityReservationFleetId(String capacityReservationFleetId) { this.capacityReservationFleetId = capacityReservationFleetId; } /** ** The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity * Reservations that were created by a Capacity Reservation Fleet. *
* * @return The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for * Capacity Reservations that were created by a Capacity Reservation Fleet. */ public String getCapacityReservationFleetId() { return this.capacityReservationFleetId; } /** ** The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity * Reservations that were created by a Capacity Reservation Fleet. *
* * @param capacityReservationFleetId * The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for * Capacity Reservations that were created by a Capacity Reservation Fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withCapacityReservationFleetId(String capacityReservationFleetId) { setCapacityReservationFleetId(capacityReservationFleetId); return this; } /** ** The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For * more information, see Capacity * Reservations for cluster placement groups in the Amazon EC2 User Guide. *
* * @param placementGroupArn * The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was * created. For more information, see Capacity Reservations for cluster * placement groups in the Amazon EC2 User Guide. */ public void setPlacementGroupArn(String placementGroupArn) { this.placementGroupArn = placementGroupArn; } /** ** The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For * more information, see Capacity * Reservations for cluster placement groups in the Amazon EC2 User Guide. *
* * @return The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was * created. For more information, see Capacity Reservations for cluster * placement groups in the Amazon EC2 User Guide. */ public String getPlacementGroupArn() { return this.placementGroupArn; } /** ** The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For * more information, see Capacity * Reservations for cluster placement groups in the Amazon EC2 User Guide. *
* * @param placementGroupArn * The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was * created. For more information, see Capacity Reservations for cluster * placement groups in the Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withPlacementGroupArn(String placementGroupArn) { setPlacementGroupArn(placementGroupArn); return this; } /** ** Information about instance capacity usage. *
* * @return Information about instance capacity usage. */ public java.util.List* Information about instance capacity usage. *
* * @param capacityAllocations * Information about instance capacity usage. */ public void setCapacityAllocations(java.util.Collection* Information about instance capacity usage. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCapacityAllocations(java.util.Collection)} or {@link #withCapacityAllocations(java.util.Collection)} * if you want to override the existing values. *
* * @param capacityAllocations * Information about instance capacity usage. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withCapacityAllocations(CapacityAllocation... capacityAllocations) { if (this.capacityAllocations == null) { setCapacityAllocations(new com.amazonaws.internal.SdkInternalList* Information about instance capacity usage. *
* * @param capacityAllocations * Information about instance capacity usage. * @return Returns a reference to this object so that method calls can be chained together. */ public CapacityReservation withCapacityAllocations(java.util.Collection