Class: Aws::EC2::Types::GetSpotPlacementScoresRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb

Overview

Note:

When making an API call, you may pass GetSpotPlacementScoresRequest data as a hash:

{
  instance_types: ["String"],
  target_capacity: 1, # required
  target_capacity_unit_type: "vcpu", # accepts vcpu, memory-mib, units
  single_availability_zone: false,
  region_names: ["String"],
  instance_requirements_with_metadata: {
    architecture_types: ["i386"], # accepts i386, x86_64, arm64, x86_64_mac
    virtualization_types: ["hvm"], # accepts hvm, paravirtual
    instance_requirements: {
      v_cpu_count: { # required
        min: 1, # required
        max: 1,
      },
      memory_mi_b: { # required
        min: 1, # required
        max: 1,
      },
      cpu_manufacturers: ["intel"], # accepts intel, amd, amazon-web-services
      memory_gi_b_per_v_cpu: {
        min: 1.0,
        max: 1.0,
      },
      excluded_instance_types: ["ExcludedInstanceType"],
      instance_generations: ["current"], # accepts current, previous
      spot_max_price_percentage_over_lowest_price: 1,
      on_demand_max_price_percentage_over_lowest_price: 1,
      bare_metal: "included", # accepts included, required, excluded
      burstable_performance: "included", # accepts included, required, excluded
      require_hibernate_support: false,
      network_interface_count: {
        min: 1,
        max: 1,
      },
      local_storage: "included", # accepts included, required, excluded
      local_storage_types: ["hdd"], # accepts hdd, ssd
      total_local_storage_gb: {
        min: 1.0,
        max: 1.0,
      },
      baseline_ebs_bandwidth_mbps: {
        min: 1,
        max: 1,
      },
      accelerator_types: ["gpu"], # accepts gpu, fpga, inference
      accelerator_count: {
        min: 1,
        max: 1,
      },
      accelerator_manufacturers: ["nvidia"], # accepts nvidia, amd, amazon-web-services, xilinx
      accelerator_names: ["a100"], # accepts a100, v100, k80, t4, m60, radeon-pro-v520, vu9p
      accelerator_total_memory_mi_b: {
        min: 1,
        max: 1,
      },
    },
  },
  dry_run: false,
  max_results: 1,
  next_token: "String",
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#dry_runBoolean

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:

  • (Boolean)


36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 36135

class GetSpotPlacementScoresRequest < Struct.new(
  :instance_types,
  :target_capacity,
  :target_capacity_unit_type,
  :single_availability_zone,
  :region_names,
  :instance_requirements_with_metadata,
  :dry_run,
  :max_results,
  :next_token)
  SENSITIVE = []
  include Aws::Structure
end

#instance_requirements_with_metadataTypes::InstanceRequirementsWithMetadataRequest

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.



36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 36135

class GetSpotPlacementScoresRequest < Struct.new(
  :instance_types,
  :target_capacity,
  :target_capacity_unit_type,
  :single_availability_zone,
  :region_names,
  :instance_requirements_with_metadata,
  :dry_run,
  :max_results,
  :next_token)
  SENSITIVE = []
  include Aws::Structure
end

#instance_typesArray<String>

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:

  • (Array<String>)


36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 36135

class GetSpotPlacementScoresRequest < Struct.new(
  :instance_types,
  :target_capacity,
  :target_capacity_unit_type,
  :single_availability_zone,
  :region_names,
  :instance_requirements_with_metadata,
  :dry_run,
  :max_results,
  :next_token)
  SENSITIVE = []
  include Aws::Structure
end

#max_resultsInteger

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.

Returns:

  • (Integer)


36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 36135

class GetSpotPlacementScoresRequest < Struct.new(
  :instance_types,
  :target_capacity,
  :target_capacity_unit_type,
  :single_availability_zone,
  :region_names,
  :instance_requirements_with_metadata,
  :dry_run,
  :max_results,
  :next_token)
  SENSITIVE = []
  include Aws::Structure
end

#next_tokenString

The token for the next set of results.

Returns:

  • (String)


36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 36135

class GetSpotPlacementScoresRequest < Struct.new(
  :instance_types,
  :target_capacity,
  :target_capacity_unit_type,
  :single_availability_zone,
  :region_names,
  :instance_requirements_with_metadata,
  :dry_run,
  :max_results,
  :next_token)
  SENSITIVE = []
  include Aws::Structure
end

#region_namesArray<String>

The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example, us-east-1.

Returns:

  • (Array<String>)


36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 36135

class GetSpotPlacementScoresRequest < Struct.new(
  :instance_types,
  :target_capacity,
  :target_capacity_unit_type,
  :single_availability_zone,
  :region_names,
  :instance_requirements_with_metadata,
  :dry_run,
  :max_results,
  :next_token)
  SENSITIVE = []
  include Aws::Structure
end

#single_availability_zoneBoolean

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:

  • (Boolean)


36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 36135

class GetSpotPlacementScoresRequest < Struct.new(
  :instance_types,
  :target_capacity,
  :target_capacity_unit_type,
  :single_availability_zone,
  :region_names,
  :instance_requirements_with_metadata,
  :dry_run,
  :max_results,
  :next_token)
  SENSITIVE = []
  include Aws::Structure
end

#target_capacityInteger

The target capacity.

Returns:

  • (Integer)


36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 36135

class GetSpotPlacementScoresRequest < Struct.new(
  :instance_types,
  :target_capacity,
  :target_capacity_unit_type,
  :single_availability_zone,
  :region_names,
  :instance_requirements_with_metadata,
  :dry_run,
  :max_results,
  :next_token)
  SENSITIVE = []
  include Aws::Structure
end

#target_capacity_unit_typeString

The unit for the target capacity.

Default: units (translates to number of instances)

Returns:

  • (String)


36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 36135

class GetSpotPlacementScoresRequest < Struct.new(
  :instance_types,
  :target_capacity,
  :target_capacity_unit_type,
  :single_availability_zone,
  :region_names,
  :instance_requirements_with_metadata,
  :dry_run,
  :max_results,
  :next_token)
  SENSITIVE = []
  include Aws::Structure
end