Show / Hide Table of Contents

Class CfnEC2FleetProps

Properties for defining a CfnEC2Fleet.

Inheritance
object
CfnEC2FleetProps
Implements
ICfnEC2FleetProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnEC2FleetProps : ICfnEC2FleetProps
Syntax (vb)
Public Class CfnEC2FleetProps Implements ICfnEC2FleetProps
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.EC2;

             var cfnEC2FleetProps = new CfnEC2FleetProps {
                 LaunchTemplateConfigs = new [] { new FleetLaunchTemplateConfigRequestProperty {
                     LaunchTemplateSpecification = new FleetLaunchTemplateSpecificationRequestProperty {
                         Version = "version",

                         // the properties below are optional
                         LaunchTemplateId = "launchTemplateId",
                         LaunchTemplateName = "launchTemplateName"
                     },
                     Overrides = new [] { new FleetLaunchTemplateOverridesRequestProperty {
                         AvailabilityZone = "availabilityZone",
                         BlockDeviceMappings = new [] { new BlockDeviceMappingProperty {
                             DeviceName = "deviceName",
                             Ebs = new EbsBlockDeviceProperty {
                                 DeleteOnTermination = false,
                                 Encrypted = false,
                                 Iops = 123,
                                 KmsKeyId = "kmsKeyId",
                                 SnapshotId = "snapshotId",
                                 VolumeSize = 123,
                                 VolumeType = "volumeType"
                             },
                             NoDevice = "noDevice",
                             VirtualName = "virtualName"
                         } },
                         InstanceRequirements = new InstanceRequirementsRequestProperty {
                             AcceleratorCount = new AcceleratorCountRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             AcceleratorManufacturers = new [] { "acceleratorManufacturers" },
                             AcceleratorNames = new [] { "acceleratorNames" },
                             AcceleratorTotalMemoryMiB = new AcceleratorTotalMemoryMiBRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             AcceleratorTypes = new [] { "acceleratorTypes" },
                             AllowedInstanceTypes = new [] { "allowedInstanceTypes" },
                             BareMetal = "bareMetal",
                             BaselineEbsBandwidthMbps = new BaselineEbsBandwidthMbpsRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             BaselinePerformanceFactors = new BaselinePerformanceFactorsRequestProperty {
                                 Cpu = new CpuPerformanceFactorRequestProperty {
                                     References = new [] { new PerformanceFactorReferenceRequestProperty {
                                         InstanceFamily = "instanceFamily"
                                     } }
                                 }
                             },
                             BurstablePerformance = "burstablePerformance",
                             CpuManufacturers = new [] { "cpuManufacturers" },
                             ExcludedInstanceTypes = new [] { "excludedInstanceTypes" },
                             InstanceGenerations = new [] { "instanceGenerations" },
                             LocalStorage = "localStorage",
                             LocalStorageTypes = new [] { "localStorageTypes" },
                             MaxSpotPriceAsPercentageOfOptimalOnDemandPrice = 123,
                             MemoryGiBPerVCpu = new MemoryGiBPerVCpuRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             MemoryMiB = new MemoryMiBRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             NetworkBandwidthGbps = new NetworkBandwidthGbpsRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             NetworkInterfaceCount = new NetworkInterfaceCountRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             OnDemandMaxPricePercentageOverLowestPrice = 123,
                             RequireHibernateSupport = false,
                             SpotMaxPricePercentageOverLowestPrice = 123,
                             TotalLocalStorageGb = new TotalLocalStorageGBRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             VCpuCount = new VCpuCountRangeRequestProperty {
                                 Max = 123,
                                 Min = 123
                             }
                         },
                         InstanceType = "instanceType",
                         MaxPrice = "maxPrice",
                         Placement = new PlacementProperty {
                             Affinity = "affinity",
                             AvailabilityZone = "availabilityZone",
                             GroupName = "groupName",
                             HostId = "hostId",
                             HostResourceGroupArn = "hostResourceGroupArn",
                             PartitionNumber = 123,
                             SpreadDomain = "spreadDomain",
                             Tenancy = "tenancy"
                         },
                         Priority = 123,
                         SubnetId = "subnetId",
                         WeightedCapacity = 123
                     } }
                 } },
                 TargetCapacitySpecification = new TargetCapacitySpecificationRequestProperty {
                     TotalTargetCapacity = 123,

                     // the properties below are optional
                     DefaultTargetCapacityType = "defaultTargetCapacityType",
                     OnDemandTargetCapacity = 123,
                     SpotTargetCapacity = 123,
                     TargetCapacityUnitType = "targetCapacityUnitType"
                 },

                 // the properties below are optional
                 Context = "context",
                 ExcessCapacityTerminationPolicy = "excessCapacityTerminationPolicy",
                 OnDemandOptions = new OnDemandOptionsRequestProperty {
                     AllocationStrategy = "allocationStrategy",
                     CapacityReservationOptions = new CapacityReservationOptionsRequestProperty {
                         UsageStrategy = "usageStrategy"
                     },
                     MaxTotalPrice = "maxTotalPrice",
                     MinTargetCapacity = 123,
                     SingleAvailabilityZone = false,
                     SingleInstanceType = false
                 },
                 ReplaceUnhealthyInstances = false,
                 SpotOptions = new SpotOptionsRequestProperty {
                     AllocationStrategy = "allocationStrategy",
                     InstanceInterruptionBehavior = "instanceInterruptionBehavior",
                     InstancePoolsToUseCount = 123,
                     MaintenanceStrategies = new MaintenanceStrategiesProperty {
                         CapacityRebalance = new CapacityRebalanceProperty {
                             ReplacementStrategy = "replacementStrategy",
                             TerminationDelay = 123
                         }
                     },
                     MaxTotalPrice = "maxTotalPrice",
                     MinTargetCapacity = 123,
                     SingleAvailabilityZone = false,
                     SingleInstanceType = false
                 },
                 TagSpecifications = new [] { new TagSpecificationProperty {
                     ResourceType = "resourceType",
                     Tags = new [] { new CfnTag {
                         Key = "key",
                         Value = "value"
                     } }
                 } },
                 TerminateInstancesWithExpiration = false,
                 Type = "type",
                 ValidFrom = "validFrom",
                 ValidUntil = "validUntil"
             };

Synopsis

Constructors

CfnEC2FleetProps()

Properties for defining a CfnEC2Fleet.

Properties

Context

Reserved.

ExcessCapacityTerminationPolicy

Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

LaunchTemplateConfigs

The configuration for the EC2 Fleet.

OnDemandOptions

Describes the configuration of On-Demand Instances in an EC2 Fleet.

ReplaceUnhealthyInstances

Indicates whether EC2 Fleet should replace unhealthy Spot Instances.

SpotOptions

Describes the configuration of Spot Instances in an EC2 Fleet.

TagSpecifications

The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tag your resources .

TargetCapacitySpecification

The number of units to request.

TerminateInstancesWithExpiration

Indicates whether running instances should be terminated when the EC2 Fleet expires.

Type

The fleet type. The default value is maintain .

ValidFrom

The start date and time of the request, in UTC format (for example, YYYY - MM - DD T HH : MM : SS Z).

ValidUntil

The end date and time of the request, in UTC format (for example, YYYY - MM - DD T HH : MM : SS Z).

Constructors

CfnEC2FleetProps()

Properties for defining a CfnEC2Fleet.

public CfnEC2FleetProps()
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.EC2;

             var cfnEC2FleetProps = new CfnEC2FleetProps {
                 LaunchTemplateConfigs = new [] { new FleetLaunchTemplateConfigRequestProperty {
                     LaunchTemplateSpecification = new FleetLaunchTemplateSpecificationRequestProperty {
                         Version = "version",

                         // the properties below are optional
                         LaunchTemplateId = "launchTemplateId",
                         LaunchTemplateName = "launchTemplateName"
                     },
                     Overrides = new [] { new FleetLaunchTemplateOverridesRequestProperty {
                         AvailabilityZone = "availabilityZone",
                         BlockDeviceMappings = new [] { new BlockDeviceMappingProperty {
                             DeviceName = "deviceName",
                             Ebs = new EbsBlockDeviceProperty {
                                 DeleteOnTermination = false,
                                 Encrypted = false,
                                 Iops = 123,
                                 KmsKeyId = "kmsKeyId",
                                 SnapshotId = "snapshotId",
                                 VolumeSize = 123,
                                 VolumeType = "volumeType"
                             },
                             NoDevice = "noDevice",
                             VirtualName = "virtualName"
                         } },
                         InstanceRequirements = new InstanceRequirementsRequestProperty {
                             AcceleratorCount = new AcceleratorCountRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             AcceleratorManufacturers = new [] { "acceleratorManufacturers" },
                             AcceleratorNames = new [] { "acceleratorNames" },
                             AcceleratorTotalMemoryMiB = new AcceleratorTotalMemoryMiBRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             AcceleratorTypes = new [] { "acceleratorTypes" },
                             AllowedInstanceTypes = new [] { "allowedInstanceTypes" },
                             BareMetal = "bareMetal",
                             BaselineEbsBandwidthMbps = new BaselineEbsBandwidthMbpsRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             BaselinePerformanceFactors = new BaselinePerformanceFactorsRequestProperty {
                                 Cpu = new CpuPerformanceFactorRequestProperty {
                                     References = new [] { new PerformanceFactorReferenceRequestProperty {
                                         InstanceFamily = "instanceFamily"
                                     } }
                                 }
                             },
                             BurstablePerformance = "burstablePerformance",
                             CpuManufacturers = new [] { "cpuManufacturers" },
                             ExcludedInstanceTypes = new [] { "excludedInstanceTypes" },
                             InstanceGenerations = new [] { "instanceGenerations" },
                             LocalStorage = "localStorage",
                             LocalStorageTypes = new [] { "localStorageTypes" },
                             MaxSpotPriceAsPercentageOfOptimalOnDemandPrice = 123,
                             MemoryGiBPerVCpu = new MemoryGiBPerVCpuRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             MemoryMiB = new MemoryMiBRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             NetworkBandwidthGbps = new NetworkBandwidthGbpsRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             NetworkInterfaceCount = new NetworkInterfaceCountRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             OnDemandMaxPricePercentageOverLowestPrice = 123,
                             RequireHibernateSupport = false,
                             SpotMaxPricePercentageOverLowestPrice = 123,
                             TotalLocalStorageGb = new TotalLocalStorageGBRequestProperty {
                                 Max = 123,
                                 Min = 123
                             },
                             VCpuCount = new VCpuCountRangeRequestProperty {
                                 Max = 123,
                                 Min = 123
                             }
                         },
                         InstanceType = "instanceType",
                         MaxPrice = "maxPrice",
                         Placement = new PlacementProperty {
                             Affinity = "affinity",
                             AvailabilityZone = "availabilityZone",
                             GroupName = "groupName",
                             HostId = "hostId",
                             HostResourceGroupArn = "hostResourceGroupArn",
                             PartitionNumber = 123,
                             SpreadDomain = "spreadDomain",
                             Tenancy = "tenancy"
                         },
                         Priority = 123,
                         SubnetId = "subnetId",
                         WeightedCapacity = 123
                     } }
                 } },
                 TargetCapacitySpecification = new TargetCapacitySpecificationRequestProperty {
                     TotalTargetCapacity = 123,

                     // the properties below are optional
                     DefaultTargetCapacityType = "defaultTargetCapacityType",
                     OnDemandTargetCapacity = 123,
                     SpotTargetCapacity = 123,
                     TargetCapacityUnitType = "targetCapacityUnitType"
                 },

                 // the properties below are optional
                 Context = "context",
                 ExcessCapacityTerminationPolicy = "excessCapacityTerminationPolicy",
                 OnDemandOptions = new OnDemandOptionsRequestProperty {
                     AllocationStrategy = "allocationStrategy",
                     CapacityReservationOptions = new CapacityReservationOptionsRequestProperty {
                         UsageStrategy = "usageStrategy"
                     },
                     MaxTotalPrice = "maxTotalPrice",
                     MinTargetCapacity = 123,
                     SingleAvailabilityZone = false,
                     SingleInstanceType = false
                 },
                 ReplaceUnhealthyInstances = false,
                 SpotOptions = new SpotOptionsRequestProperty {
                     AllocationStrategy = "allocationStrategy",
                     InstanceInterruptionBehavior = "instanceInterruptionBehavior",
                     InstancePoolsToUseCount = 123,
                     MaintenanceStrategies = new MaintenanceStrategiesProperty {
                         CapacityRebalance = new CapacityRebalanceProperty {
                             ReplacementStrategy = "replacementStrategy",
                             TerminationDelay = 123
                         }
                     },
                     MaxTotalPrice = "maxTotalPrice",
                     MinTargetCapacity = 123,
                     SingleAvailabilityZone = false,
                     SingleInstanceType = false
                 },
                 TagSpecifications = new [] { new TagSpecificationProperty {
                     ResourceType = "resourceType",
                     Tags = new [] { new CfnTag {
                         Key = "key",
                         Value = "value"
                     } }
                 } },
                 TerminateInstancesWithExpiration = false,
                 Type = "type",
                 ValidFrom = "validFrom",
                 ValidUntil = "validUntil"
             };

Properties

Context

Reserved.

public string? Context { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-context

ExcessCapacityTerminationPolicy

Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

public string? ExcessCapacityTerminationPolicy { get; set; }
Property Value

string

Remarks

Supported only for fleets of type maintain .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-excesscapacityterminationpolicy

LaunchTemplateConfigs

The configuration for the EC2 Fleet.

public object LaunchTemplateConfigs { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-launchtemplateconfigs

OnDemandOptions

Describes the configuration of On-Demand Instances in an EC2 Fleet.

public object? OnDemandOptions { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-ondemandoptions

ReplaceUnhealthyInstances

Indicates whether EC2 Fleet should replace unhealthy Spot Instances.

public object? ReplaceUnhealthyInstances { get; set; }
Property Value

object

Remarks

Supported only for fleets of type maintain . For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-replaceunhealthyinstances

SpotOptions

Describes the configuration of Spot Instances in an EC2 Fleet.

public object? SpotOptions { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-spotoptions

TagSpecifications

The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tag your resources .

public object? TagSpecifications { get; set; }
Property Value

object

Remarks

If the fleet type is instant , specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

If the fleet type is maintain or request , specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance . To tag instances at launch, specify the tags in a launch template .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-tagspecifications

TargetCapacitySpecification

The number of units to request.

public object TargetCapacitySpecification { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-targetcapacityspecification

TerminateInstancesWithExpiration

Indicates whether running instances should be terminated when the EC2 Fleet expires.

public object? TerminateInstancesWithExpiration { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-terminateinstanceswithexpiration

Type

The fleet type. The default value is maintain .

public string? Type { get; set; }
Property Value

string

Remarks

    For more information, see EC2 Fleet request types in the Amazon EC2 User Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-type

    ValidFrom

    The start date and time of the request, in UTC format (for example, YYYY - MM - DD T HH : MM : SS Z).

    public string? ValidFrom { get; set; }
    Property Value

    string

    Remarks

    The default is to start fulfilling the request immediately.

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-validfrom

    ValidUntil

    The end date and time of the request, in UTC format (for example, YYYY - MM - DD T HH : MM : SS Z).

    public string? ValidUntil { get; set; }
    Property Value

    string

    Remarks

    At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html#cfn-ec2-ec2fleet-validuntil

    Implements

    ICfnEC2FleetProps
    Back to top Generated by DocFX