Interface GetSpotPlacementScoresRequest.Builder

All Superinterfaces:
AwsRequest.Builder, Buildable, CopyableBuilder<GetSpotPlacementScoresRequest.Builder,GetSpotPlacementScoresRequest>, Ec2Request.Builder, SdkBuilder<GetSpotPlacementScoresRequest.Builder,GetSpotPlacementScoresRequest>, SdkPojo, SdkRequest.Builder
Enclosing class:
GetSpotPlacementScoresRequest

public static interface GetSpotPlacementScoresRequest.Builder extends Ec2Request.Builder, SdkPojo, CopyableBuilder<GetSpotPlacementScoresRequest.Builder,GetSpotPlacementScoresRequest>
  • 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 specify InstanceRequirementsWithMetadata.

      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, 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • instanceTypes

      GetSpotPlacementScoresRequest.Builder instanceTypes(String... 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 specify InstanceRequirementsWithMetadata.

      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, 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • targetCapacity

      GetSpotPlacementScoresRequest.Builder targetCapacity(Integer 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

      GetSpotPlacementScoresRequest.Builder targetCapacityUnitType(String 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

      GetSpotPlacementScoresRequest.Builder singleAvailabilityZone(Boolean 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 - 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.

      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

      GetSpotPlacementScoresRequest.Builder regionNames(String... 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 specify InstanceTypes.

      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 specify InstanceTypes.

      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 InstanceRequirementsWithMetadata, you can't specify InstanceTypes.

      This is a convenience method that creates an instance of the InstanceRequirementsWithMetadataRequest.Builder avoiding the need to create one manually via InstanceRequirementsWithMetadataRequest.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to instanceRequirementsWithMetadata(InstanceRequirementsWithMetadataRequest).

      Parameters:
      instanceRequirementsWithMetadata - a consumer that will call methods on InstanceRequirementsWithMetadataRequest.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 is UnauthorizedOperation.

      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 is DryRunOperation. Otherwise, it is UnauthorizedOperation.
      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 interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.