/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class CreateCapacityReservationRequest : public EC2Request { public: AWS_EC2_API CreateCapacityReservationRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateCapacityReservation"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

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

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

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

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

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

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

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

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

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

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

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

*/ inline CreateCapacityReservationRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

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

*/ inline CreateCapacityReservationRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

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

*/ inline CreateCapacityReservationRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

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

*/ inline const Aws::String& GetInstanceType() const{ return m_instanceType; } /** *

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

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

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

*/ inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

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

*/ inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

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

*/ inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); } /** *

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

*/ inline CreateCapacityReservationRequest& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;} /** *

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

*/ inline CreateCapacityReservationRequest& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;} /** *

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

*/ inline CreateCapacityReservationRequest& WithInstanceType(const char* value) { SetInstanceType(value); return *this;} /** *

The type of operating system for which to reserve capacity.

*/ inline const CapacityReservationInstancePlatform& GetInstancePlatform() const{ return m_instancePlatform; } /** *

The type of operating system for which to reserve capacity.

*/ inline bool InstancePlatformHasBeenSet() const { return m_instancePlatformHasBeenSet; } /** *

The type of operating system for which to reserve capacity.

*/ inline void SetInstancePlatform(const CapacityReservationInstancePlatform& value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = value; } /** *

The type of operating system for which to reserve capacity.

*/ inline void SetInstancePlatform(CapacityReservationInstancePlatform&& value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = std::move(value); } /** *

The type of operating system for which to reserve capacity.

*/ inline CreateCapacityReservationRequest& WithInstancePlatform(const CapacityReservationInstancePlatform& value) { SetInstancePlatform(value); return *this;} /** *

The type of operating system for which to reserve capacity.

*/ inline CreateCapacityReservationRequest& WithInstancePlatform(CapacityReservationInstancePlatform&& value) { SetInstancePlatform(std::move(value)); return *this;} /** *

The Availability Zone in which to create the Capacity Reservation.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone in which to create the Capacity Reservation.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone in which to create the Capacity Reservation.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone in which to create the Capacity Reservation.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone in which to create the Capacity Reservation.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone in which to create the Capacity Reservation.

*/ inline CreateCapacityReservationRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone in which to create the Capacity Reservation.

*/ inline CreateCapacityReservationRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone in which to create the Capacity Reservation.

*/ inline CreateCapacityReservationRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

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

*/ inline const Aws::String& GetAvailabilityZoneId() const{ return m_availabilityZoneId; } /** *

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

*/ inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; } /** *

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

*/ inline void SetAvailabilityZoneId(const Aws::String& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = value; } /** *

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

*/ inline void SetAvailabilityZoneId(Aws::String&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::move(value); } /** *

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

*/ inline void SetAvailabilityZoneId(const char* value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId.assign(value); } /** *

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

*/ inline CreateCapacityReservationRequest& WithAvailabilityZoneId(const Aws::String& value) { SetAvailabilityZoneId(value); return *this;} /** *

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

*/ inline CreateCapacityReservationRequest& WithAvailabilityZoneId(Aws::String&& value) { SetAvailabilityZoneId(std::move(value)); return *this;} /** *

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

*/ inline CreateCapacityReservationRequest& WithAvailabilityZoneId(const char* value) { SetAvailabilityZoneId(value); 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.

  • *
*/ inline const CapacityReservationTenancy& GetTenancy() const{ return m_tenancy; } /** *

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.

  • *
*/ inline bool TenancyHasBeenSet() const { return m_tenancyHasBeenSet; } /** *

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.

  • *
*/ inline void SetTenancy(const CapacityReservationTenancy& value) { m_tenancyHasBeenSet = true; m_tenancy = value; } /** *

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.

  • *
*/ inline void SetTenancy(CapacityReservationTenancy&& value) { m_tenancyHasBeenSet = true; m_tenancy = std::move(value); } /** *

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.

  • *
*/ inline CreateCapacityReservationRequest& WithTenancy(const CapacityReservationTenancy& value) { SetTenancy(value); 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.

  • *
*/ inline CreateCapacityReservationRequest& WithTenancy(CapacityReservationTenancy&& value) { SetTenancy(std::move(value)); return *this;} /** *

The number of instances for which to reserve capacity.

Valid range: 1 * - 1000

*/ inline int GetInstanceCount() const{ return m_instanceCount; } /** *

The number of instances for which to reserve capacity.

Valid range: 1 * - 1000

*/ inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; } /** *

The number of instances for which to reserve capacity.

Valid range: 1 * - 1000

*/ inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; } /** *

The number of instances for which to reserve capacity.

Valid range: 1 * - 1000

*/ inline CreateCapacityReservationRequest& WithInstanceCount(int value) { SetInstanceCount(value); 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.

*/ inline bool GetEbsOptimized() const{ return m_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.

*/ inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; } /** *

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.

*/ inline void SetEbsOptimized(bool value) { m_ebsOptimizedHasBeenSet = true; m_ebsOptimized = value; } /** *

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.

*/ inline CreateCapacityReservationRequest& WithEbsOptimized(bool value) { SetEbsOptimized(value); return *this;} /** *

Deprecated.

*/ inline bool GetEphemeralStorage() const{ return m_ephemeralStorage; } /** *

Deprecated.

*/ inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; } /** *

Deprecated.

*/ inline void SetEphemeralStorage(bool value) { m_ephemeralStorageHasBeenSet = true; m_ephemeralStorage = value; } /** *

Deprecated.

*/ inline CreateCapacityReservationRequest& WithEphemeralStorage(bool value) { SetEphemeralStorage(value); 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.

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.

*/ inline const Aws::Utils::DateTime& GetEndDate() const{ return m_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.

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.

*/ inline bool EndDateHasBeenSet() const { return m_endDateHasBeenSet; } /** *

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.

*/ inline void SetEndDate(const Aws::Utils::DateTime& value) { m_endDateHasBeenSet = true; m_endDate = value; } /** *

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.

*/ inline void SetEndDate(Aws::Utils::DateTime&& value) { m_endDateHasBeenSet = true; m_endDate = std::move(value); } /** *

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.

*/ inline CreateCapacityReservationRequest& WithEndDate(const Aws::Utils::DateTime& value) { SetEndDate(value); 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.

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.

*/ inline CreateCapacityReservationRequest& WithEndDate(Aws::Utils::DateTime&& value) { SetEndDate(std::move(value)); 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. Do not provide an EndDate if the * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if the * EndDateType value is limited.

*/ inline const EndDateType& GetEndDateType() const{ return m_endDateType; } /** *

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. Do not provide an EndDate if the * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if the * EndDateType value is limited.

*/ inline bool EndDateTypeHasBeenSet() const { return m_endDateTypeHasBeenSet; } /** *

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. Do not provide an EndDate if the * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if the * EndDateType value is limited.

*/ inline void SetEndDateType(const EndDateType& value) { m_endDateTypeHasBeenSet = true; m_endDateType = value; } /** *

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. Do not provide an EndDate if the * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if the * EndDateType value is limited.

*/ inline void SetEndDateType(EndDateType&& value) { m_endDateTypeHasBeenSet = true; m_endDateType = std::move(value); } /** *

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. Do not provide an EndDate if the * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if the * EndDateType value is limited.

*/ inline CreateCapacityReservationRequest& WithEndDateType(const EndDateType& value) { SetEndDateType(value); 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. Do not provide an EndDate if the * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if the * EndDateType value is limited.

*/ inline CreateCapacityReservationRequest& WithEndDateType(EndDateType&& value) { SetEndDateType(std::move(value)); return *this;} /** *

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

  • open - The Capacity * Reservation automatically matches all instances that have matching attributes * (instance type, platform, and Availability Zone). Instances that have matching * attributes run in 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.

Default: open

*/ inline const InstanceMatchCriteria& GetInstanceMatchCriteria() const{ return m_instanceMatchCriteria; } /** *

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

  • open - The Capacity * Reservation automatically matches all instances that have matching attributes * (instance type, platform, and Availability Zone). Instances that have matching * attributes run in 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.

Default: open

*/ inline bool InstanceMatchCriteriaHasBeenSet() const { return m_instanceMatchCriteriaHasBeenSet; } /** *

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

  • open - The Capacity * Reservation automatically matches all instances that have matching attributes * (instance type, platform, and Availability Zone). Instances that have matching * attributes run in 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.

Default: open

*/ inline void SetInstanceMatchCriteria(const InstanceMatchCriteria& value) { m_instanceMatchCriteriaHasBeenSet = true; m_instanceMatchCriteria = value; } /** *

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

  • open - The Capacity * Reservation automatically matches all instances that have matching attributes * (instance type, platform, and Availability Zone). Instances that have matching * attributes run in 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.

Default: open

*/ inline void SetInstanceMatchCriteria(InstanceMatchCriteria&& value) { m_instanceMatchCriteriaHasBeenSet = true; m_instanceMatchCriteria = std::move(value); } /** *

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

  • open - The Capacity * Reservation automatically matches all instances that have matching attributes * (instance type, platform, and Availability Zone). Instances that have matching * attributes run in 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.

Default: open

*/ inline CreateCapacityReservationRequest& WithInstanceMatchCriteria(const InstanceMatchCriteria& value) { SetInstanceMatchCriteria(value); return *this;} /** *

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

  • open - The Capacity * Reservation automatically matches all instances that have matching attributes * (instance type, platform, and Availability Zone). Instances that have matching * attributes run in 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.

Default: open

*/ inline CreateCapacityReservationRequest& WithInstanceMatchCriteria(InstanceMatchCriteria&& value) { SetInstanceMatchCriteria(std::move(value)); return *this;} /** *

The tags to apply to the Capacity Reservation during launch.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

The tags to apply to the Capacity Reservation during launch.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

The tags to apply to the Capacity Reservation during launch.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

The tags to apply to the Capacity Reservation during launch.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

The tags to apply to the Capacity Reservation during launch.

*/ inline CreateCapacityReservationRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

The tags to apply to the Capacity Reservation during launch.

*/ inline CreateCapacityReservationRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

The tags to apply to the Capacity Reservation during launch.

*/ inline CreateCapacityReservationRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

The tags to apply to the Capacity Reservation during launch.

*/ inline CreateCapacityReservationRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } /** *

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.

*/ inline bool GetDryRun() const{ return m_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.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

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.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

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.

*/ inline CreateCapacityReservationRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

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

*/ inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; } /** *

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

*/ inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; } /** *

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

*/ inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; } /** *

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

*/ inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); } /** *

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

*/ inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); } /** *

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

*/ inline CreateCapacityReservationRequest& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;} /** *

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

*/ inline CreateCapacityReservationRequest& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;} /** *

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

*/ inline CreateCapacityReservationRequest& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;} /** *

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.

*/ inline const Aws::String& GetPlacementGroupArn() const{ return m_placementGroupArn; } /** *

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.

*/ inline bool PlacementGroupArnHasBeenSet() const { return m_placementGroupArnHasBeenSet; } /** *

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.

*/ inline void SetPlacementGroupArn(const Aws::String& value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn = value; } /** *

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.

*/ inline void SetPlacementGroupArn(Aws::String&& value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn = std::move(value); } /** *

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.

*/ inline void SetPlacementGroupArn(const char* value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn.assign(value); } /** *

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.

*/ inline CreateCapacityReservationRequest& WithPlacementGroupArn(const Aws::String& value) { SetPlacementGroupArn(value); return *this;} /** *

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.

*/ inline CreateCapacityReservationRequest& WithPlacementGroupArn(Aws::String&& value) { SetPlacementGroupArn(std::move(value)); return *this;} /** *

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.

*/ inline CreateCapacityReservationRequest& WithPlacementGroupArn(const char* value) { SetPlacementGroupArn(value); return *this;} private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::String m_instanceType; bool m_instanceTypeHasBeenSet = false; CapacityReservationInstancePlatform m_instancePlatform; bool m_instancePlatformHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; Aws::String m_availabilityZoneId; bool m_availabilityZoneIdHasBeenSet = false; CapacityReservationTenancy m_tenancy; bool m_tenancyHasBeenSet = false; int m_instanceCount; bool m_instanceCountHasBeenSet = false; bool m_ebsOptimized; bool m_ebsOptimizedHasBeenSet = false; bool m_ephemeralStorage; bool m_ephemeralStorageHasBeenSet = false; Aws::Utils::DateTime m_endDate; bool m_endDateHasBeenSet = false; EndDateType m_endDateType; bool m_endDateTypeHasBeenSet = false; InstanceMatchCriteria m_instanceMatchCriteria; bool m_instanceMatchCriteriaHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::String m_outpostArn; bool m_outpostArnHasBeenSet = false; Aws::String m_placementGroupArn; bool m_placementGroupArnHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws