Struct aws_sdk_ec2::client::fluent_builders::GetSpotPlacementScores
source · [−]pub struct GetSpotPlacementScores<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }
Expand description
Fluent builder constructing a request to GetSpotPlacementScores
.
Calculates the Spot placement score for a Region or Availability Zone based on the specified target capacity and compute requirements.
You can specify your compute requirements either by using InstanceRequirementsWithMetadata
and letting Amazon EC2 choose the optimal instance types to fulfill your Spot request, or you can specify the instance types by using InstanceTypes
.
For more information, see Spot placement score in the Amazon EC2 User Guide.
Implementations
impl<C, M, R> GetSpotPlacementScores<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> GetSpotPlacementScores<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<GetSpotPlacementScoresOutput, SdkError<GetSpotPlacementScoresError>> where
R::Policy: SmithyRetryPolicy<GetSpotPlacementScoresInputOperationOutputAlias, GetSpotPlacementScoresOutput, GetSpotPlacementScoresError, GetSpotPlacementScoresInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<GetSpotPlacementScoresOutput, SdkError<GetSpotPlacementScoresError>> where
R::Policy: SmithyRetryPolicy<GetSpotPlacementScoresInputOperationOutputAlias, GetSpotPlacementScoresOutput, GetSpotPlacementScoresError, GetSpotPlacementScoresInputOperationRetryAlias>,
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
Create a paginator for this request
Paginators are used by calling send().await
which returns a Stream
.
Appends an item to InstanceTypes
.
To override the contents of this collection use set_instance_types
.
The instance types. We recommend that you specify at least three instance types. If you specify one or two instance types, or specify variations of a single instance type (for example, an m3.xlarge
with and without instance storage), the returned placement score will always be low.
If you specify InstanceTypes
, you can't specify InstanceRequirementsWithMetadata
.
The instance types. We recommend that you specify at least three instance types. If you specify one or two instance types, or specify variations of a single instance type (for example, an m3.xlarge
with and without instance storage), the returned placement score will always be low.
If you specify InstanceTypes
, you can't specify InstanceRequirementsWithMetadata
.
The target capacity.
The target capacity.
The unit for the target capacity.
Default: units
(translates to number of instances)
The unit for the target capacity.
Default: units
(translates to number of instances)
Specify true
so that the response returns a list of scored Availability Zones. Otherwise, the response returns a list of scored Regions.
A list of scored Availability Zones is useful if you want to launch all of your Spot capacity into a single Availability Zone.
Specify true
so that the response returns a list of scored Availability Zones. Otherwise, the response returns a list of scored Regions.
A list of scored Availability Zones is useful if you want to launch all of your Spot capacity into a single Availability Zone.
Appends an item to RegionNames
.
To override the contents of this collection use set_region_names
.
The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example, us-east-1
.
The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example, us-east-1
.
pub fn instance_requirements_with_metadata(
self,
input: InstanceRequirementsWithMetadataRequest
) -> Self
pub fn instance_requirements_with_metadata(
self,
input: InstanceRequirementsWithMetadataRequest
) -> Self
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify InstanceRequirementsWithMetadata
, you can't specify InstanceTypes
.
pub fn set_instance_requirements_with_metadata(
self,
input: Option<InstanceRequirementsWithMetadataRequest>
) -> Self
pub fn set_instance_requirements_with_metadata(
self,
input: Option<InstanceRequirementsWithMetadataRequest>
) -> Self
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify InstanceRequirementsWithMetadata
, you can't specify InstanceTypes
.
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
.
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
.
The maximum number of results to return in a single call. Specify a value between 1 and
1000. The default value is 1000. To retrieve the remaining results, make another call with
the returned NextToken
value.
The maximum number of results to return in a single call. Specify a value between 1 and
1000. The default value is 1000. To retrieve the remaining results, make another call with
the returned NextToken
value.
The token for the next set of results.
The token for the next set of results.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for GetSpotPlacementScores<C, M, R>
impl<C, M, R> Send for GetSpotPlacementScores<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for GetSpotPlacementScores<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for GetSpotPlacementScores<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for GetSpotPlacementScores<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more