CfnSpotFleetProps
- class aws_cdk.aws_ec2.CfnSpotFleetProps(*, spot_fleet_request_config_data)
Bases:
object
Properties for defining a
CfnSpotFleet
.- Parameters:
spot_fleet_request_config_data (
Union
[IResolvable
,SpotFleetRequestConfigDataProperty
,Dict
[str
,Any
]]) – Describes the configuration of a Spot Fleet request.- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-spotfleet.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_ec2 as ec2 cfn_spot_fleet_props = ec2.CfnSpotFleetProps( spot_fleet_request_config_data=ec2.CfnSpotFleet.SpotFleetRequestConfigDataProperty( iam_fleet_role="iamFleetRole", target_capacity=123, # the properties below are optional allocation_strategy="allocationStrategy", context="context", excess_capacity_termination_policy="excessCapacityTerminationPolicy", instance_interruption_behavior="instanceInterruptionBehavior", instance_pools_to_use_count=123, launch_specifications=[ec2.CfnSpotFleet.SpotFleetLaunchSpecificationProperty( image_id="imageId", # the properties below are optional block_device_mappings=[ec2.CfnSpotFleet.BlockDeviceMappingProperty( device_name="deviceName", # the properties below are optional ebs=ec2.CfnSpotFleet.EbsBlockDeviceProperty( delete_on_termination=False, encrypted=False, iops=123, snapshot_id="snapshotId", volume_size=123, volume_type="volumeType" ), no_device="noDevice", virtual_name="virtualName" )], ebs_optimized=False, iam_instance_profile=ec2.CfnSpotFleet.IamInstanceProfileSpecificationProperty( arn="arn" ), instance_requirements=ec2.CfnSpotFleet.InstanceRequirementsRequestProperty( accelerator_count=ec2.CfnSpotFleet.AcceleratorCountRequestProperty( max=123, min=123 ), accelerator_manufacturers=["acceleratorManufacturers"], accelerator_names=["acceleratorNames"], accelerator_total_memory_mi_b=ec2.CfnSpotFleet.AcceleratorTotalMemoryMiBRequestProperty( max=123, min=123 ), accelerator_types=["acceleratorTypes"], allowed_instance_types=["allowedInstanceTypes"], bare_metal="bareMetal", baseline_ebs_bandwidth_mbps=ec2.CfnSpotFleet.BaselineEbsBandwidthMbpsRequestProperty( max=123, min=123 ), burstable_performance="burstablePerformance", cpu_manufacturers=["cpuManufacturers"], excluded_instance_types=["excludedInstanceTypes"], instance_generations=["instanceGenerations"], local_storage="localStorage", local_storage_types=["localStorageTypes"], max_spot_price_as_percentage_of_optimal_on_demand_price=123, memory_gi_bPer_vCpu=ec2.CfnSpotFleet.MemoryGiBPerVCpuRequestProperty( max=123, min=123 ), memory_mi_b=ec2.CfnSpotFleet.MemoryMiBRequestProperty( max=123, min=123 ), network_bandwidth_gbps=ec2.CfnSpotFleet.NetworkBandwidthGbpsRequestProperty( max=123, min=123 ), network_interface_count=ec2.CfnSpotFleet.NetworkInterfaceCountRequestProperty( max=123, min=123 ), on_demand_max_price_percentage_over_lowest_price=123, require_hibernate_support=False, spot_max_price_percentage_over_lowest_price=123, total_local_storage_gb=ec2.CfnSpotFleet.TotalLocalStorageGBRequestProperty( max=123, min=123 ), v_cpu_count=ec2.CfnSpotFleet.VCpuCountRangeRequestProperty( max=123, min=123 ) ), instance_type="instanceType", kernel_id="kernelId", key_name="keyName", monitoring=ec2.CfnSpotFleet.SpotFleetMonitoringProperty( enabled=False ), network_interfaces=[ec2.CfnSpotFleet.InstanceNetworkInterfaceSpecificationProperty( associate_public_ip_address=False, delete_on_termination=False, description="description", device_index=123, groups=["groups"], ipv6_address_count=123, ipv6_addresses=[ec2.CfnSpotFleet.InstanceIpv6AddressProperty( ipv6_address="ipv6Address" )], network_interface_id="networkInterfaceId", private_ip_addresses=[ec2.CfnSpotFleet.PrivateIpAddressSpecificationProperty( private_ip_address="privateIpAddress", # the properties below are optional primary=False )], secondary_private_ip_address_count=123, subnet_id="subnetId" )], placement=ec2.CfnSpotFleet.SpotPlacementProperty( availability_zone="availabilityZone", group_name="groupName", tenancy="tenancy" ), ramdisk_id="ramdiskId", security_groups=[ec2.CfnSpotFleet.GroupIdentifierProperty( group_id="groupId" )], spot_price="spotPrice", subnet_id="subnetId", tag_specifications=[ec2.CfnSpotFleet.SpotFleetTagSpecificationProperty( resource_type="resourceType", tags=[CfnTag( key="key", value="value" )] )], user_data="userData", weighted_capacity=123 )], launch_template_configs=[ec2.CfnSpotFleet.LaunchTemplateConfigProperty( launch_template_specification=ec2.CfnSpotFleet.FleetLaunchTemplateSpecificationProperty( version="version", # the properties below are optional launch_template_id="launchTemplateId", launch_template_name="launchTemplateName" ), overrides=[ec2.CfnSpotFleet.LaunchTemplateOverridesProperty( availability_zone="availabilityZone", instance_requirements=ec2.CfnSpotFleet.InstanceRequirementsRequestProperty( accelerator_count=ec2.CfnSpotFleet.AcceleratorCountRequestProperty( max=123, min=123 ), accelerator_manufacturers=["acceleratorManufacturers"], accelerator_names=["acceleratorNames"], accelerator_total_memory_mi_b=ec2.CfnSpotFleet.AcceleratorTotalMemoryMiBRequestProperty( max=123, min=123 ), accelerator_types=["acceleratorTypes"], allowed_instance_types=["allowedInstanceTypes"], bare_metal="bareMetal", baseline_ebs_bandwidth_mbps=ec2.CfnSpotFleet.BaselineEbsBandwidthMbpsRequestProperty( max=123, min=123 ), burstable_performance="burstablePerformance", cpu_manufacturers=["cpuManufacturers"], excluded_instance_types=["excludedInstanceTypes"], instance_generations=["instanceGenerations"], local_storage="localStorage", local_storage_types=["localStorageTypes"], max_spot_price_as_percentage_of_optimal_on_demand_price=123, memory_gi_bPer_vCpu=ec2.CfnSpotFleet.MemoryGiBPerVCpuRequestProperty( max=123, min=123 ), memory_mi_b=ec2.CfnSpotFleet.MemoryMiBRequestProperty( max=123, min=123 ), network_bandwidth_gbps=ec2.CfnSpotFleet.NetworkBandwidthGbpsRequestProperty( max=123, min=123 ), network_interface_count=ec2.CfnSpotFleet.NetworkInterfaceCountRequestProperty( max=123, min=123 ), on_demand_max_price_percentage_over_lowest_price=123, require_hibernate_support=False, spot_max_price_percentage_over_lowest_price=123, total_local_storage_gb=ec2.CfnSpotFleet.TotalLocalStorageGBRequestProperty( max=123, min=123 ), v_cpu_count=ec2.CfnSpotFleet.VCpuCountRangeRequestProperty( max=123, min=123 ) ), instance_type="instanceType", priority=123, spot_price="spotPrice", subnet_id="subnetId", weighted_capacity=123 )] )], load_balancers_config=ec2.CfnSpotFleet.LoadBalancersConfigProperty( classic_load_balancers_config=ec2.CfnSpotFleet.ClassicLoadBalancersConfigProperty( classic_load_balancers=[ec2.CfnSpotFleet.ClassicLoadBalancerProperty( name="name" )] ), target_groups_config=ec2.CfnSpotFleet.TargetGroupsConfigProperty( target_groups=[ec2.CfnSpotFleet.TargetGroupProperty( arn="arn" )] ) ), on_demand_allocation_strategy="onDemandAllocationStrategy", on_demand_max_total_price="onDemandMaxTotalPrice", on_demand_target_capacity=123, replace_unhealthy_instances=False, spot_maintenance_strategies=ec2.CfnSpotFleet.SpotMaintenanceStrategiesProperty( capacity_rebalance=ec2.CfnSpotFleet.SpotCapacityRebalanceProperty( replacement_strategy="replacementStrategy", termination_delay=123 ) ), spot_max_total_price="spotMaxTotalPrice", spot_price="spotPrice", tag_specifications=[ec2.CfnSpotFleet.SpotFleetTagSpecificationProperty( resource_type="resourceType", tags=[CfnTag( key="key", value="value" )] )], target_capacity_unit_type="targetCapacityUnitType", terminate_instances_with_expiration=False, type="type", valid_from="validFrom", valid_until="validUntil" ) )
Attributes
- spot_fleet_request_config_data
Describes the configuration of a Spot Fleet request.