Interface GetSpotPlacementScoresRequest.Builder
- All Superinterfaces:
AwsRequest.Builder
,Buildable
,CopyableBuilder<GetSpotPlacementScoresRequest.Builder,
,GetSpotPlacementScoresRequest> Ec2Request.Builder
,SdkBuilder<GetSpotPlacementScoresRequest.Builder,
,GetSpotPlacementScoresRequest> SdkPojo
,SdkRequest.Builder
- Enclosing class:
GetSpotPlacementScoresRequest
-
Method Summary
Modifier and TypeMethodDescriptionChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.instanceRequirementsWithMetadata
(Consumer<InstanceRequirementsWithMetadataRequest.Builder> instanceRequirementsWithMetadata) The attributes for the instance types.instanceRequirementsWithMetadata
(InstanceRequirementsWithMetadataRequest instanceRequirementsWithMetadata) The attributes for the instance types.instanceTypes
(String... instanceTypes) The instance types.instanceTypes
(Collection<String> instanceTypes) The instance types.maxResults
(Integer maxResults) The maximum number of items to return for this request.The token returned from a previous paginated request.overrideConfiguration
(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration
(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.regionNames
(String... regionNames) The Regions used to narrow down the list of Regions to be scored.regionNames
(Collection<String> regionNames) The Regions used to narrow down the list of Regions to be scored.singleAvailabilityZone
(Boolean singleAvailabilityZone) Specifytrue
so that the response returns a list of scored Availability Zones.targetCapacity
(Integer targetCapacity) The target capacity.targetCapacityUnitType
(String targetCapacityUnitType) The unit for the target capacity.targetCapacityUnitType
(TargetCapacityUnitType targetCapacityUnitType) The unit for the target capacity.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.services.ec2.model.Ec2Request.Builder
build
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
instanceTypes
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 specifyInstanceRequirementsWithMetadata
.- Parameters:
instanceTypes
- 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, anm3.xlarge
with and without instance storage), the returned placement score will always be low.If you specify
InstanceTypes
, you can't specifyInstanceRequirementsWithMetadata
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceTypes
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 specifyInstanceRequirementsWithMetadata
.- Parameters:
instanceTypes
- 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, anm3.xlarge
with and without instance storage), the returned placement score will always be low.If you specify
InstanceTypes
, you can't specifyInstanceRequirementsWithMetadata
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targetCapacity
The target capacity.
- Parameters:
targetCapacity
- The target capacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targetCapacityUnitType
The unit for the target capacity.
- Parameters:
targetCapacityUnitType
- The unit for the target capacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
targetCapacityUnitType
GetSpotPlacementScoresRequest.Builder targetCapacityUnitType(TargetCapacityUnitType targetCapacityUnitType) The unit for the target capacity.
- Parameters:
targetCapacityUnitType
- The unit for the target capacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
singleAvailabilityZone
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.
- Parameters:
singleAvailabilityZone
- Specifytrue
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
regionNames
The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example,
us-east-1
.- Parameters:
regionNames
- The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example,us-east-1
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
regionNames
The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example,
us-east-1
.- Parameters:
regionNames
- The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example,us-east-1
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceRequirementsWithMetadata
GetSpotPlacementScoresRequest.Builder instanceRequirementsWithMetadata(InstanceRequirementsWithMetadataRequest instanceRequirementsWithMetadata) 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 specifyInstanceTypes
.- Parameters:
instanceRequirementsWithMetadata
- 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 specifyInstanceTypes
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceRequirementsWithMetadata
default GetSpotPlacementScoresRequest.Builder instanceRequirementsWithMetadata(Consumer<InstanceRequirementsWithMetadataRequest.Builder> instanceRequirementsWithMetadata) The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify
This is a convenience method that creates an instance of theInstanceRequirementsWithMetadata
, you can't specifyInstanceTypes
.InstanceRequirementsWithMetadataRequest.Builder
avoiding the need to create one manually viaInstanceRequirementsWithMetadataRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toinstanceRequirementsWithMetadata(InstanceRequirementsWithMetadataRequest)
.- Parameters:
instanceRequirementsWithMetadata
- a consumer that will call methods onInstanceRequirementsWithMetadataRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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 isUnauthorizedOperation
.- Parameters:
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 isDryRunOperation
. Otherwise, it isUnauthorizedOperation
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
maxResults
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 Pagination.
- Parameters:
maxResults
- 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 Pagination.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
nextToken
The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
- Parameters:
nextToken
- The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
GetSpotPlacementScoresRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
overrideConfiguration
- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
GetSpotPlacementScoresRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.Builder
Add an optional request override configuration.- Specified by:
overrideConfiguration
in interfaceAwsRequest.Builder
- Parameters:
builderConsumer
- AConsumer
to which an emptyAwsRequestOverrideConfiguration.Builder
will be given.- Returns:
- This object for method chaining.
-