aws_sdk_ec2/client/get_spot_placement_scores.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`GetSpotPlacementScores`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder) operation.
4 /// This operation supports pagination; See [`into_paginator()`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::into_paginator).
5 ///
6 /// - The fluent builder is configurable:
7 /// - [`instance_types(impl Into<String>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::instance_types) / [`set_instance_types(Option<Vec::<String>>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::set_instance_types):<br>required: **false**<br><p>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 <code>m3.xlarge</code> with and without instance storage), the returned placement score will always be low.</p> <p>If you specify <code>InstanceTypes</code>, you can't specify <code>InstanceRequirementsWithMetadata</code>.</p><br>
8 /// - [`target_capacity(i32)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::target_capacity) / [`set_target_capacity(Option<i32>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::set_target_capacity):<br>required: **true**<br><p>The target capacity.</p><br>
9 /// - [`target_capacity_unit_type(TargetCapacityUnitType)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::target_capacity_unit_type) / [`set_target_capacity_unit_type(Option<TargetCapacityUnitType>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::set_target_capacity_unit_type):<br>required: **false**<br><p>The unit for the target capacity.</p><br>
10 /// - [`single_availability_zone(bool)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::single_availability_zone) / [`set_single_availability_zone(Option<bool>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::set_single_availability_zone):<br>required: **false**<br><p>Specify <code>true</code> so that the response returns a list of scored Availability Zones. Otherwise, the response returns a list of scored Regions.</p> <p>A list of scored Availability Zones is useful if you want to launch all of your Spot capacity into a single Availability Zone.</p><br>
11 /// - [`region_names(impl Into<String>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::region_names) / [`set_region_names(Option<Vec::<String>>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::set_region_names):<br>required: **false**<br><p>The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example, <code>us-east-1</code>.</p><br>
12 /// - [`instance_requirements_with_metadata(InstanceRequirementsWithMetadataRequest)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::instance_requirements_with_metadata) / [`set_instance_requirements_with_metadata(Option<InstanceRequirementsWithMetadataRequest>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::set_instance_requirements_with_metadata):<br>required: **false**<br><p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.</p> <p>If you specify <code>InstanceRequirementsWithMetadata</code>, you can't specify <code>InstanceTypes</code>.</p><br>
13 /// - [`dry_run(bool)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::set_dry_run):<br>required: **false**<br><p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
14 /// - [`max_results(i32)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p><br>
15 /// - [`next_token(impl Into<String>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::set_next_token):<br>required: **false**<br><p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p><br>
16 /// - On success, responds with [`GetSpotPlacementScoresOutput`](crate::operation::get_spot_placement_scores::GetSpotPlacementScoresOutput) with field(s):
17 /// - [`spot_placement_scores(Option<Vec::<SpotPlacementScore>>)`](crate::operation::get_spot_placement_scores::GetSpotPlacementScoresOutput::spot_placement_scores): <p>The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale from 1 to 10. Each score
reflects how likely it is that each Region or Availability Zone will succeed at fulfilling the specified target capacity
<i>at the time of the Spot placement score request</i>. A score of <code>10</code> means that your Spot capacity request is highly likely to succeed in that Region or Availability Zone.</p> <p>If you request a Spot placement score for Regions, a high score assumes that your fleet request will be configured to use all Availability Zones and the <code>capacity-optimized</code> allocation strategy. If you request a Spot placement score for Availability Zones, a high score assumes that your fleet request will be configured to use a single Availability Zone and the <code>capacity-optimized</code> allocation strategy.</p> <p>Different
Regions or Availability Zones might return the same score.</p><note> <p>The Spot placement score serves as a recommendation only. No score guarantees that your Spot request will be fully or partially fulfilled.</p> </note>
18 /// - [`next_token(Option<String>)`](crate::operation::get_spot_placement_scores::GetSpotPlacementScoresOutput::next_token): <p>The token to include in another request to get the next page of items. This value is <code>null</code> when there are no more items to return.</p>
19 /// - On failure, responds with [`SdkError<GetSpotPlacementScoresError>`](crate::operation::get_spot_placement_scores::GetSpotPlacementScoresError)
20 pub fn get_spot_placement_scores(&self) -> crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder {
21 crate::operation::get_spot_placement_scores::builders::GetSpotPlacementScoresFluentBuilder::new(self.handle.clone())
22 }
23}