/** * 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 #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes a Spot Instance request.

See Also:

AWS * API Reference

*/ class SpotInstanceRequest { public: AWS_EC2_API SpotInstanceRequest(); AWS_EC2_API SpotInstanceRequest(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API SpotInstanceRequest& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

Deprecated.

*/ inline const Aws::String& GetActualBlockHourlyPrice() const{ return m_actualBlockHourlyPrice; } /** *

Deprecated.

*/ inline bool ActualBlockHourlyPriceHasBeenSet() const { return m_actualBlockHourlyPriceHasBeenSet; } /** *

Deprecated.

*/ inline void SetActualBlockHourlyPrice(const Aws::String& value) { m_actualBlockHourlyPriceHasBeenSet = true; m_actualBlockHourlyPrice = value; } /** *

Deprecated.

*/ inline void SetActualBlockHourlyPrice(Aws::String&& value) { m_actualBlockHourlyPriceHasBeenSet = true; m_actualBlockHourlyPrice = std::move(value); } /** *

Deprecated.

*/ inline void SetActualBlockHourlyPrice(const char* value) { m_actualBlockHourlyPriceHasBeenSet = true; m_actualBlockHourlyPrice.assign(value); } /** *

Deprecated.

*/ inline SpotInstanceRequest& WithActualBlockHourlyPrice(const Aws::String& value) { SetActualBlockHourlyPrice(value); return *this;} /** *

Deprecated.

*/ inline SpotInstanceRequest& WithActualBlockHourlyPrice(Aws::String&& value) { SetActualBlockHourlyPrice(std::move(value)); return *this;} /** *

Deprecated.

*/ inline SpotInstanceRequest& WithActualBlockHourlyPrice(const char* value) { SetActualBlockHourlyPrice(value); return *this;} /** *

The Availability Zone group. If you specify the same Availability Zone group * for all Spot Instance requests, all Spot Instances are launched in the same * Availability Zone.

*/ inline const Aws::String& GetAvailabilityZoneGroup() const{ return m_availabilityZoneGroup; } /** *

The Availability Zone group. If you specify the same Availability Zone group * for all Spot Instance requests, all Spot Instances are launched in the same * Availability Zone.

*/ inline bool AvailabilityZoneGroupHasBeenSet() const { return m_availabilityZoneGroupHasBeenSet; } /** *

The Availability Zone group. If you specify the same Availability Zone group * for all Spot Instance requests, all Spot Instances are launched in the same * Availability Zone.

*/ inline void SetAvailabilityZoneGroup(const Aws::String& value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup = value; } /** *

The Availability Zone group. If you specify the same Availability Zone group * for all Spot Instance requests, all Spot Instances are launched in the same * Availability Zone.

*/ inline void SetAvailabilityZoneGroup(Aws::String&& value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup = std::move(value); } /** *

The Availability Zone group. If you specify the same Availability Zone group * for all Spot Instance requests, all Spot Instances are launched in the same * Availability Zone.

*/ inline void SetAvailabilityZoneGroup(const char* value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup.assign(value); } /** *

The Availability Zone group. If you specify the same Availability Zone group * for all Spot Instance requests, all Spot Instances are launched in the same * Availability Zone.

*/ inline SpotInstanceRequest& WithAvailabilityZoneGroup(const Aws::String& value) { SetAvailabilityZoneGroup(value); return *this;} /** *

The Availability Zone group. If you specify the same Availability Zone group * for all Spot Instance requests, all Spot Instances are launched in the same * Availability Zone.

*/ inline SpotInstanceRequest& WithAvailabilityZoneGroup(Aws::String&& value) { SetAvailabilityZoneGroup(std::move(value)); return *this;} /** *

The Availability Zone group. If you specify the same Availability Zone group * for all Spot Instance requests, all Spot Instances are launched in the same * Availability Zone.

*/ inline SpotInstanceRequest& WithAvailabilityZoneGroup(const char* value) { SetAvailabilityZoneGroup(value); return *this;} /** *

Deprecated.

*/ inline int GetBlockDurationMinutes() const{ return m_blockDurationMinutes; } /** *

Deprecated.

*/ inline bool BlockDurationMinutesHasBeenSet() const { return m_blockDurationMinutesHasBeenSet; } /** *

Deprecated.

*/ inline void SetBlockDurationMinutes(int value) { m_blockDurationMinutesHasBeenSet = true; m_blockDurationMinutes = value; } /** *

Deprecated.

*/ inline SpotInstanceRequest& WithBlockDurationMinutes(int value) { SetBlockDurationMinutes(value); return *this;} /** *

The date and time when the Spot Instance request was created, in UTC format * (for example, * YYYY-MM-DDTHH:MM:SSZ).

*/ inline const Aws::Utils::DateTime& GetCreateTime() const{ return m_createTime; } /** *

The date and time when the Spot Instance request was created, in UTC format * (for example, * YYYY-MM-DDTHH:MM:SSZ).

*/ inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; } /** *

The date and time when the Spot Instance request was created, in UTC format * (for example, * YYYY-MM-DDTHH:MM:SSZ).

*/ inline void SetCreateTime(const Aws::Utils::DateTime& value) { m_createTimeHasBeenSet = true; m_createTime = value; } /** *

The date and time when the Spot Instance request was created, in UTC format * (for example, * YYYY-MM-DDTHH:MM:SSZ).

*/ inline void SetCreateTime(Aws::Utils::DateTime&& value) { m_createTimeHasBeenSet = true; m_createTime = std::move(value); } /** *

The date and time when the Spot Instance request was created, in UTC format * (for example, * YYYY-MM-DDTHH:MM:SSZ).

*/ inline SpotInstanceRequest& WithCreateTime(const Aws::Utils::DateTime& value) { SetCreateTime(value); return *this;} /** *

The date and time when the Spot Instance request was created, in UTC format * (for example, * YYYY-MM-DDTHH:MM:SSZ).

*/ inline SpotInstanceRequest& WithCreateTime(Aws::Utils::DateTime&& value) { SetCreateTime(std::move(value)); return *this;} /** *

The fault codes for the Spot Instance request, if any.

*/ inline const SpotInstanceStateFault& GetFault() const{ return m_fault; } /** *

The fault codes for the Spot Instance request, if any.

*/ inline bool FaultHasBeenSet() const { return m_faultHasBeenSet; } /** *

The fault codes for the Spot Instance request, if any.

*/ inline void SetFault(const SpotInstanceStateFault& value) { m_faultHasBeenSet = true; m_fault = value; } /** *

The fault codes for the Spot Instance request, if any.

*/ inline void SetFault(SpotInstanceStateFault&& value) { m_faultHasBeenSet = true; m_fault = std::move(value); } /** *

The fault codes for the Spot Instance request, if any.

*/ inline SpotInstanceRequest& WithFault(const SpotInstanceStateFault& value) { SetFault(value); return *this;} /** *

The fault codes for the Spot Instance request, if any.

*/ inline SpotInstanceRequest& WithFault(SpotInstanceStateFault&& value) { SetFault(std::move(value)); return *this;} /** *

The instance ID, if an instance has been launched to fulfill the Spot * Instance request.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The instance ID, if an instance has been launched to fulfill the Spot * Instance request.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The instance ID, if an instance has been launched to fulfill the Spot * Instance request.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The instance ID, if an instance has been launched to fulfill the Spot * Instance request.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The instance ID, if an instance has been launched to fulfill the Spot * Instance request.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The instance ID, if an instance has been launched to fulfill the Spot * Instance request.

*/ inline SpotInstanceRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The instance ID, if an instance has been launched to fulfill the Spot * Instance request.

*/ inline SpotInstanceRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The instance ID, if an instance has been launched to fulfill the Spot * Instance request.

*/ inline SpotInstanceRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

The instance launch group. Launch groups are Spot Instances that launch * together and terminate together.

*/ inline const Aws::String& GetLaunchGroup() const{ return m_launchGroup; } /** *

The instance launch group. Launch groups are Spot Instances that launch * together and terminate together.

*/ inline bool LaunchGroupHasBeenSet() const { return m_launchGroupHasBeenSet; } /** *

The instance launch group. Launch groups are Spot Instances that launch * together and terminate together.

*/ inline void SetLaunchGroup(const Aws::String& value) { m_launchGroupHasBeenSet = true; m_launchGroup = value; } /** *

The instance launch group. Launch groups are Spot Instances that launch * together and terminate together.

*/ inline void SetLaunchGroup(Aws::String&& value) { m_launchGroupHasBeenSet = true; m_launchGroup = std::move(value); } /** *

The instance launch group. Launch groups are Spot Instances that launch * together and terminate together.

*/ inline void SetLaunchGroup(const char* value) { m_launchGroupHasBeenSet = true; m_launchGroup.assign(value); } /** *

The instance launch group. Launch groups are Spot Instances that launch * together and terminate together.

*/ inline SpotInstanceRequest& WithLaunchGroup(const Aws::String& value) { SetLaunchGroup(value); return *this;} /** *

The instance launch group. Launch groups are Spot Instances that launch * together and terminate together.

*/ inline SpotInstanceRequest& WithLaunchGroup(Aws::String&& value) { SetLaunchGroup(std::move(value)); return *this;} /** *

The instance launch group. Launch groups are Spot Instances that launch * together and terminate together.

*/ inline SpotInstanceRequest& WithLaunchGroup(const char* value) { SetLaunchGroup(value); return *this;} /** *

Additional information for launching instances.

*/ inline const LaunchSpecification& GetLaunchSpecification() const{ return m_launchSpecification; } /** *

Additional information for launching instances.

*/ inline bool LaunchSpecificationHasBeenSet() const { return m_launchSpecificationHasBeenSet; } /** *

Additional information for launching instances.

*/ inline void SetLaunchSpecification(const LaunchSpecification& value) { m_launchSpecificationHasBeenSet = true; m_launchSpecification = value; } /** *

Additional information for launching instances.

*/ inline void SetLaunchSpecification(LaunchSpecification&& value) { m_launchSpecificationHasBeenSet = true; m_launchSpecification = std::move(value); } /** *

Additional information for launching instances.

*/ inline SpotInstanceRequest& WithLaunchSpecification(const LaunchSpecification& value) { SetLaunchSpecification(value); return *this;} /** *

Additional information for launching instances.

*/ inline SpotInstanceRequest& WithLaunchSpecification(LaunchSpecification&& value) { SetLaunchSpecification(std::move(value)); return *this;} /** *

The Availability Zone in which the request is launched.

*/ inline const Aws::String& GetLaunchedAvailabilityZone() const{ return m_launchedAvailabilityZone; } /** *

The Availability Zone in which the request is launched.

*/ inline bool LaunchedAvailabilityZoneHasBeenSet() const { return m_launchedAvailabilityZoneHasBeenSet; } /** *

The Availability Zone in which the request is launched.

*/ inline void SetLaunchedAvailabilityZone(const Aws::String& value) { m_launchedAvailabilityZoneHasBeenSet = true; m_launchedAvailabilityZone = value; } /** *

The Availability Zone in which the request is launched.

*/ inline void SetLaunchedAvailabilityZone(Aws::String&& value) { m_launchedAvailabilityZoneHasBeenSet = true; m_launchedAvailabilityZone = std::move(value); } /** *

The Availability Zone in which the request is launched.

*/ inline void SetLaunchedAvailabilityZone(const char* value) { m_launchedAvailabilityZoneHasBeenSet = true; m_launchedAvailabilityZone.assign(value); } /** *

The Availability Zone in which the request is launched.

*/ inline SpotInstanceRequest& WithLaunchedAvailabilityZone(const Aws::String& value) { SetLaunchedAvailabilityZone(value); return *this;} /** *

The Availability Zone in which the request is launched.

*/ inline SpotInstanceRequest& WithLaunchedAvailabilityZone(Aws::String&& value) { SetLaunchedAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone in which the request is launched.

*/ inline SpotInstanceRequest& WithLaunchedAvailabilityZone(const char* value) { SetLaunchedAvailabilityZone(value); return *this;} /** *

The product description associated with the Spot Instance.

*/ inline const RIProductDescription& GetProductDescription() const{ return m_productDescription; } /** *

The product description associated with the Spot Instance.

*/ inline bool ProductDescriptionHasBeenSet() const { return m_productDescriptionHasBeenSet; } /** *

The product description associated with the Spot Instance.

*/ inline void SetProductDescription(const RIProductDescription& value) { m_productDescriptionHasBeenSet = true; m_productDescription = value; } /** *

The product description associated with the Spot Instance.

*/ inline void SetProductDescription(RIProductDescription&& value) { m_productDescriptionHasBeenSet = true; m_productDescription = std::move(value); } /** *

The product description associated with the Spot Instance.

*/ inline SpotInstanceRequest& WithProductDescription(const RIProductDescription& value) { SetProductDescription(value); return *this;} /** *

The product description associated with the Spot Instance.

*/ inline SpotInstanceRequest& WithProductDescription(RIProductDescription&& value) { SetProductDescription(std::move(value)); return *this;} /** *

The ID of the Spot Instance request.

*/ inline const Aws::String& GetSpotInstanceRequestId() const{ return m_spotInstanceRequestId; } /** *

The ID of the Spot Instance request.

*/ inline bool SpotInstanceRequestIdHasBeenSet() const { return m_spotInstanceRequestIdHasBeenSet; } /** *

The ID of the Spot Instance request.

*/ inline void SetSpotInstanceRequestId(const Aws::String& value) { m_spotInstanceRequestIdHasBeenSet = true; m_spotInstanceRequestId = value; } /** *

The ID of the Spot Instance request.

*/ inline void SetSpotInstanceRequestId(Aws::String&& value) { m_spotInstanceRequestIdHasBeenSet = true; m_spotInstanceRequestId = std::move(value); } /** *

The ID of the Spot Instance request.

*/ inline void SetSpotInstanceRequestId(const char* value) { m_spotInstanceRequestIdHasBeenSet = true; m_spotInstanceRequestId.assign(value); } /** *

The ID of the Spot Instance request.

*/ inline SpotInstanceRequest& WithSpotInstanceRequestId(const Aws::String& value) { SetSpotInstanceRequestId(value); return *this;} /** *

The ID of the Spot Instance request.

*/ inline SpotInstanceRequest& WithSpotInstanceRequestId(Aws::String&& value) { SetSpotInstanceRequestId(std::move(value)); return *this;} /** *

The ID of the Spot Instance request.

*/ inline SpotInstanceRequest& WithSpotInstanceRequestId(const char* value) { SetSpotInstanceRequestId(value); return *this;} /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline const Aws::String& GetSpotPrice() const{ return m_spotPrice; } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline bool SpotPriceHasBeenSet() const { return m_spotPriceHasBeenSet; } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline void SetSpotPrice(const Aws::String& value) { m_spotPriceHasBeenSet = true; m_spotPrice = value; } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline void SetSpotPrice(Aws::String&& value) { m_spotPriceHasBeenSet = true; m_spotPrice = std::move(value); } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline void SetSpotPrice(const char* value) { m_spotPriceHasBeenSet = true; m_spotPrice.assign(value); } /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline SpotInstanceRequest& WithSpotPrice(const Aws::String& value) { SetSpotPrice(value); return *this;} /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline SpotInstanceRequest& WithSpotPrice(Aws::String&& value) { SetSpotPrice(std::move(value)); return *this;} /** *

The maximum price per unit hour that you are willing to pay for a Spot * Instance. We do not recommend using this parameter because it can lead to * increased interruptions. If you do not specify this parameter, you will pay the * current Spot price.

If you specify a maximum price, your * instances will be interrupted more frequently than if you do not specify this * parameter.

*/ inline SpotInstanceRequest& WithSpotPrice(const char* value) { SetSpotPrice(value); return *this;} /** *

The state of the Spot Instance request. Spot request status information helps * track your Spot Instance requests. For more information, see Spot * request status in the Amazon EC2 User Guide for Linux Instances.

*/ inline const SpotInstanceState& GetState() const{ return m_state; } /** *

The state of the Spot Instance request. Spot request status information helps * track your Spot Instance requests. For more information, see Spot * request status in the Amazon EC2 User Guide for Linux Instances.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The state of the Spot Instance request. Spot request status information helps * track your Spot Instance requests. For more information, see Spot * request status in the Amazon EC2 User Guide for Linux Instances.

*/ inline void SetState(const SpotInstanceState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The state of the Spot Instance request. Spot request status information helps * track your Spot Instance requests. For more information, see Spot * request status in the Amazon EC2 User Guide for Linux Instances.

*/ inline void SetState(SpotInstanceState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The state of the Spot Instance request. Spot request status information helps * track your Spot Instance requests. For more information, see Spot * request status in the Amazon EC2 User Guide for Linux Instances.

*/ inline SpotInstanceRequest& WithState(const SpotInstanceState& value) { SetState(value); return *this;} /** *

The state of the Spot Instance request. Spot request status information helps * track your Spot Instance requests. For more information, see Spot * request status in the Amazon EC2 User Guide for Linux Instances.

*/ inline SpotInstanceRequest& WithState(SpotInstanceState&& value) { SetState(std::move(value)); return *this;} /** *

The status code and status message describing the Spot Instance request.

*/ inline const SpotInstanceStatus& GetStatus() const{ return m_status; } /** *

The status code and status message describing the Spot Instance request.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status code and status message describing the Spot Instance request.

*/ inline void SetStatus(const SpotInstanceStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status code and status message describing the Spot Instance request.

*/ inline void SetStatus(SpotInstanceStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status code and status message describing the Spot Instance request.

*/ inline SpotInstanceRequest& WithStatus(const SpotInstanceStatus& value) { SetStatus(value); return *this;} /** *

The status code and status message describing the Spot Instance request.

*/ inline SpotInstanceRequest& WithStatus(SpotInstanceStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

Any tags assigned to the resource.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Any tags assigned to the resource.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Any tags assigned to the resource.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Any tags assigned to the resource.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Any tags assigned to the resource.

*/ inline SpotInstanceRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Any tags assigned to the resource.

*/ inline SpotInstanceRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Any tags assigned to the resource.

*/ inline SpotInstanceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Any tags assigned to the resource.

*/ inline SpotInstanceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The Spot Instance request type.

*/ inline const SpotInstanceType& GetType() const{ return m_type; } /** *

The Spot Instance request type.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The Spot Instance request type.

*/ inline void SetType(const SpotInstanceType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The Spot Instance request type.

*/ inline void SetType(SpotInstanceType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The Spot Instance request type.

*/ inline SpotInstanceRequest& WithType(const SpotInstanceType& value) { SetType(value); return *this;} /** *

The Spot Instance request type.

*/ inline SpotInstanceRequest& WithType(SpotInstanceType&& value) { SetType(std::move(value)); return *this;} /** *

The start date of the request, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). The request * becomes active at this date and time.

*/ inline const Aws::Utils::DateTime& GetValidFrom() const{ return m_validFrom; } /** *

The start date of the request, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). The request * becomes active at this date and time.

*/ inline bool ValidFromHasBeenSet() const { return m_validFromHasBeenSet; } /** *

The start date of the request, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). The request * becomes active at this date and time.

*/ inline void SetValidFrom(const Aws::Utils::DateTime& value) { m_validFromHasBeenSet = true; m_validFrom = value; } /** *

The start date of the request, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). The request * becomes active at this date and time.

*/ inline void SetValidFrom(Aws::Utils::DateTime&& value) { m_validFromHasBeenSet = true; m_validFrom = std::move(value); } /** *

The start date of the request, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). The request * becomes active at this date and time.

*/ inline SpotInstanceRequest& WithValidFrom(const Aws::Utils::DateTime& value) { SetValidFrom(value); return *this;} /** *

The start date of the request, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). The request * becomes active at this date and time.

*/ inline SpotInstanceRequest& WithValidFrom(Aws::Utils::DateTime&& value) { SetValidFrom(std::move(value)); return *this;} /** *

The end date of the request, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

  • *

    For a persistent request, the request remains active until the * validUntil date and time is reached. Otherwise, the request remains * active until you cancel it.

  • For a one-time request, the * request remains active until all instances launch, the request is canceled, or * the validUntil date and time is reached. By default, the request is * valid for 7 days from the date the request was created.

*/ inline const Aws::Utils::DateTime& GetValidUntil() const{ return m_validUntil; } /** *

The end date of the request, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

  • *

    For a persistent request, the request remains active until the * validUntil date and time is reached. Otherwise, the request remains * active until you cancel it.

  • For a one-time request, the * request remains active until all instances launch, the request is canceled, or * the validUntil date and time is reached. By default, the request is * valid for 7 days from the date the request was created.

*/ inline bool ValidUntilHasBeenSet() const { return m_validUntilHasBeenSet; } /** *

The end date of the request, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

  • *

    For a persistent request, the request remains active until the * validUntil date and time is reached. Otherwise, the request remains * active until you cancel it.

  • For a one-time request, the * request remains active until all instances launch, the request is canceled, or * the validUntil date and time is reached. By default, the request is * valid for 7 days from the date the request was created.

*/ inline void SetValidUntil(const Aws::Utils::DateTime& value) { m_validUntilHasBeenSet = true; m_validUntil = value; } /** *

The end date of the request, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

  • *

    For a persistent request, the request remains active until the * validUntil date and time is reached. Otherwise, the request remains * active until you cancel it.

  • For a one-time request, the * request remains active until all instances launch, the request is canceled, or * the validUntil date and time is reached. By default, the request is * valid for 7 days from the date the request was created.

*/ inline void SetValidUntil(Aws::Utils::DateTime&& value) { m_validUntilHasBeenSet = true; m_validUntil = std::move(value); } /** *

The end date of the request, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

  • *

    For a persistent request, the request remains active until the * validUntil date and time is reached. Otherwise, the request remains * active until you cancel it.

  • For a one-time request, the * request remains active until all instances launch, the request is canceled, or * the validUntil date and time is reached. By default, the request is * valid for 7 days from the date the request was created.

*/ inline SpotInstanceRequest& WithValidUntil(const Aws::Utils::DateTime& value) { SetValidUntil(value); return *this;} /** *

The end date of the request, in UTC format * (YYYY-MM-DDTHH:MM:SSZ).

  • *

    For a persistent request, the request remains active until the * validUntil date and time is reached. Otherwise, the request remains * active until you cancel it.

  • For a one-time request, the * request remains active until all instances launch, the request is canceled, or * the validUntil date and time is reached. By default, the request is * valid for 7 days from the date the request was created.

*/ inline SpotInstanceRequest& WithValidUntil(Aws::Utils::DateTime&& value) { SetValidUntil(std::move(value)); return *this;} /** *

The behavior when a Spot Instance is interrupted.

*/ inline const InstanceInterruptionBehavior& GetInstanceInterruptionBehavior() const{ return m_instanceInterruptionBehavior; } /** *

The behavior when a Spot Instance is interrupted.

*/ inline bool InstanceInterruptionBehaviorHasBeenSet() const { return m_instanceInterruptionBehaviorHasBeenSet; } /** *

The behavior when a Spot Instance is interrupted.

*/ inline void SetInstanceInterruptionBehavior(const InstanceInterruptionBehavior& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = value; } /** *

The behavior when a Spot Instance is interrupted.

*/ inline void SetInstanceInterruptionBehavior(InstanceInterruptionBehavior&& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = std::move(value); } /** *

The behavior when a Spot Instance is interrupted.

*/ inline SpotInstanceRequest& WithInstanceInterruptionBehavior(const InstanceInterruptionBehavior& value) { SetInstanceInterruptionBehavior(value); return *this;} /** *

The behavior when a Spot Instance is interrupted.

*/ inline SpotInstanceRequest& WithInstanceInterruptionBehavior(InstanceInterruptionBehavior&& value) { SetInstanceInterruptionBehavior(std::move(value)); return *this;} private: Aws::String m_actualBlockHourlyPrice; bool m_actualBlockHourlyPriceHasBeenSet = false; Aws::String m_availabilityZoneGroup; bool m_availabilityZoneGroupHasBeenSet = false; int m_blockDurationMinutes; bool m_blockDurationMinutesHasBeenSet = false; Aws::Utils::DateTime m_createTime; bool m_createTimeHasBeenSet = false; SpotInstanceStateFault m_fault; bool m_faultHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_launchGroup; bool m_launchGroupHasBeenSet = false; LaunchSpecification m_launchSpecification; bool m_launchSpecificationHasBeenSet = false; Aws::String m_launchedAvailabilityZone; bool m_launchedAvailabilityZoneHasBeenSet = false; RIProductDescription m_productDescription; bool m_productDescriptionHasBeenSet = false; Aws::String m_spotInstanceRequestId; bool m_spotInstanceRequestIdHasBeenSet = false; Aws::String m_spotPrice; bool m_spotPriceHasBeenSet = false; SpotInstanceState m_state; bool m_stateHasBeenSet = false; SpotInstanceStatus m_status; bool m_statusHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; SpotInstanceType m_type; bool m_typeHasBeenSet = false; Aws::Utils::DateTime m_validFrom; bool m_validFromHasBeenSet = false; Aws::Utils::DateTime m_validUntil; bool m_validUntilHasBeenSet = false; InstanceInterruptionBehavior m_instanceInterruptionBehavior; bool m_instanceInterruptionBehaviorHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws