/* * 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; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.CreateCapacityReservationRequestMarshaller; /** * */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateCapacityReservationRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest { /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensure * Idempotency. *

*/ private String clientToken; /** *

* The instance type for which to reserve capacity. For more information, see Instance types in the * Amazon EC2 User Guide. *

*/ private String instanceType; /** *

* The type of operating system for which to reserve capacity. *

*/ private String instancePlatform; /** *

* The Availability Zone in which to create the Capacity Reservation. *

*/ private String availabilityZone; /** *

* The ID of the Availability Zone in which to create the Capacity Reservation. *

*/ private String availabilityZoneId; /** *

* Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy * settings: *

* */ private String tenancy; /** *

* The number of instances for which to reserve capacity. *

*

* Valid range: 1 - 1000 *

*/ private Integer instanceCount; /** *

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

*

* You must provide an EndDate value if EndDateType is limited. Omit * EndDate if EndDateType is unlimited. *

*

* If the EndDateType is limited, the Capacity Reservation is cancelled within an hour * from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed * to end between 13:30:55 and 14:30:55 on 5/31/2019. *

*/ private java.util.Date endDate; /** *

* Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following * end types: *

* */ private String endDateType; /** *

* Indicates the type of instance launches that the Capacity Reservation accepts. The options include: *

* *

* Default: open *

*/ private String instanceMatchCriteria; /** *

* The tags to apply to the Capacity Reservation during launch. *

*/ private com.amazonaws.internal.SdkInternalList tagSpecifications; /** *

* The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation. *

*/ private String outpostArn; /** *

* The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For * more information, see Capacity * Reservations for cluster placement groups in the Amazon EC2 User Guide. *

*/ private String placementGroupArn; /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensure * Idempotency. *

* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensure * Idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensure * Idempotency. *

* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensure * Idempotency. */ public String getClientToken() { return this.clientToken; } /** *

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensure * Idempotency. *

* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensure * Idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCapacityReservationRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* The instance type for which to reserve capacity. For more information, see Instance types in the * Amazon EC2 User Guide. *

* * @param instanceType * The instance type for which to reserve capacity. For more information, see Instance types in the * Amazon EC2 User Guide. */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The instance type for which to reserve capacity. For more information, see Instance types in the * Amazon EC2 User Guide. *

* * @return The instance type for which to reserve capacity. For more information, see Instance types in the * Amazon EC2 User Guide. */ public String getInstanceType() { return this.instanceType; } /** *

* The instance type for which to reserve capacity. For more information, see Instance types in the * Amazon EC2 User Guide. *

* * @param instanceType * The instance type for which to reserve capacity. For more information, see Instance types in the * Amazon EC2 User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCapacityReservationRequest withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *

* The type of operating system for which to reserve capacity. *

* * @param instancePlatform * The type of operating system for which to reserve capacity. * @see CapacityReservationInstancePlatform */ public void setInstancePlatform(String instancePlatform) { this.instancePlatform = instancePlatform; } /** *

* The type of operating system for which to reserve capacity. *

* * @return The type of operating system for which to reserve capacity. * @see CapacityReservationInstancePlatform */ public String getInstancePlatform() { return this.instancePlatform; } /** *

* The type of operating system for which to reserve capacity. *

* * @param instancePlatform * The type of operating system for which to reserve capacity. * @return Returns a reference to this object so that method calls can be chained together. * @see CapacityReservationInstancePlatform */ public CreateCapacityReservationRequest withInstancePlatform(String instancePlatform) { setInstancePlatform(instancePlatform); return this; } /** *

* The type of operating system for which to reserve capacity. *

* * @param instancePlatform * The type of operating system for which to reserve capacity. * @return Returns a reference to this object so that method calls can be chained together. * @see CapacityReservationInstancePlatform */ public CreateCapacityReservationRequest withInstancePlatform(CapacityReservationInstancePlatform instancePlatform) { this.instancePlatform = instancePlatform.toString(); return this; } /** *

* The Availability Zone in which to create the Capacity Reservation. *

* * @param availabilityZone * The Availability Zone in which to create the Capacity Reservation. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** *

* The Availability Zone in which to create the Capacity Reservation. *

* * @return The Availability Zone in which to create the Capacity Reservation. */ public String getAvailabilityZone() { return this.availabilityZone; } /** *

* The Availability Zone in which to create the Capacity Reservation. *

* * @param availabilityZone * The Availability Zone in which to create the Capacity Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCapacityReservationRequest withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** *

* The ID of the Availability Zone in which to create the Capacity Reservation. *

* * @param availabilityZoneId * The ID of the Availability Zone in which to create the Capacity Reservation. */ public void setAvailabilityZoneId(String availabilityZoneId) { this.availabilityZoneId = availabilityZoneId; } /** *

* The ID of the Availability Zone in which to create the Capacity Reservation. *

* * @return The ID of the Availability Zone in which to create the Capacity Reservation. */ public String getAvailabilityZoneId() { return this.availabilityZoneId; } /** *

* The ID of the Availability Zone in which to create the Capacity Reservation. *

* * @param availabilityZoneId * The ID of the Availability Zone in which to create the Capacity Reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCapacityReservationRequest withAvailabilityZoneId(String availabilityZoneId) { setAvailabilityZoneId(availabilityZoneId); return this; } /** *

* Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy * settings: *

* * * @param tenancy * Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following * tenancy settings:

*