Interface CfnCapacityProvider.InstanceLaunchTemplateProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnCapacityProvider.InstanceLaunchTemplateProperty.Jsii$Proxy
- Enclosing class:
CfnCapacityProvider
This defines how Amazon ECS launches Amazon EC2 instances, including the instance profile for your tasks, network and storage configuration, capacity options, and instance requirements for flexible instance type selection.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;
InstanceLaunchTemplateProperty instanceLaunchTemplateProperty = InstanceLaunchTemplateProperty.builder()
.ec2InstanceProfileArn("ec2InstanceProfileArn")
.networkConfiguration(ManagedInstancesNetworkConfigurationProperty.builder()
.securityGroups(List.of("securityGroups"))
.subnets(List.of("subnets"))
.build())
// the properties below are optional
.capacityOptionType("capacityOptionType")
.instanceRequirements(InstanceRequirementsRequestProperty.builder()
.memoryMiB(MemoryMiBRequestProperty.builder()
.min(123)
// the properties below are optional
.max(123)
.build())
.vCpuCount(VCpuCountRangeRequestProperty.builder()
.min(123)
// the properties below are optional
.max(123)
.build())
// the properties below are optional
.acceleratorCount(AcceleratorCountRequestProperty.builder()
.max(123)
.min(123)
.build())
.acceleratorManufacturers(List.of("acceleratorManufacturers"))
.acceleratorNames(List.of("acceleratorNames"))
.acceleratorTotalMemoryMiB(AcceleratorTotalMemoryMiBRequestProperty.builder()
.max(123)
.min(123)
.build())
.acceleratorTypes(List.of("acceleratorTypes"))
.allowedInstanceTypes(List.of("allowedInstanceTypes"))
.bareMetal("bareMetal")
.baselineEbsBandwidthMbps(BaselineEbsBandwidthMbpsRequestProperty.builder()
.max(123)
.min(123)
.build())
.burstablePerformance("burstablePerformance")
.cpuManufacturers(List.of("cpuManufacturers"))
.excludedInstanceTypes(List.of("excludedInstanceTypes"))
.instanceGenerations(List.of("instanceGenerations"))
.localStorage("localStorage")
.localStorageTypes(List.of("localStorageTypes"))
.maxSpotPriceAsPercentageOfOptimalOnDemandPrice(123)
.memoryGiBPerVCpu(MemoryGiBPerVCpuRequestProperty.builder()
.max(123)
.min(123)
.build())
.networkBandwidthGbps(NetworkBandwidthGbpsRequestProperty.builder()
.max(123)
.min(123)
.build())
.networkInterfaceCount(NetworkInterfaceCountRequestProperty.builder()
.max(123)
.min(123)
.build())
.onDemandMaxPricePercentageOverLowestPrice(123)
.requireHibernateSupport(false)
.spotMaxPricePercentageOverLowestPrice(123)
.totalLocalStorageGb(TotalLocalStorageGBRequestProperty.builder()
.max(123)
.min(123)
.build())
.build())
.monitoring("monitoring")
.storageConfiguration(ManagedInstancesStorageConfigurationProperty.builder()
.storageSizeGiB(123)
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnCapacityProvider.InstanceLaunchTemplatePropertystatic final classAn implementation forCfnCapacityProvider.InstanceLaunchTemplateProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringThe capacity option type.The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances.default ObjectThe instance requirements.default StringCloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring.The network configuration for Amazon ECS Managed Instances.default ObjectThe storage configuration for Amazon ECS Managed Instances.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEc2InstanceProfileArn
The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances.This instance profile must include the necessary permissions for your tasks to access AWS services and resources.
For more information, see Amazon ECS instance profile for Managed Instances in the Amazon ECS Developer Guide .
- See Also:
-
getNetworkConfiguration
The network configuration for Amazon ECS Managed Instances.This specifies the subnets and security groups that instances use for network connectivity.
Returns union: either
IResolvableorCfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty- See Also:
-
getCapacityOptionType
The capacity option type.This determines whether Amazon ECS launches On-Demand or Spot Instances for your managed instance capacity provider.
Valid values are:
ON_DEMAND- Launches standard On-Demand Instances. On-Demand Instances provide predictable pricing and availability.SPOT- Launches Spot Instances that use spare Amazon EC2 capacity at reduced cost. Spot Instances can be interrupted by Amazon EC2 with a two-minute notification when the capacity is needed back.
The default is On-Demand
For more information about Amazon EC2 capacity options, see Instance purchasing options in the Amazon EC2 User Guide .
- See Also:
-
getInstanceRequirements
The instance requirements. You can specify:.- The instance types
- Instance requirements such as vCPU count, memory, network performance, and accelerator specifications
Amazon ECS automatically selects the instances that match the specified criteria.
Returns union: either
IResolvableorCfnCapacityProvider.InstanceRequirementsRequestProperty- See Also:
-
getMonitoring
CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring.By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.
- See Also:
-
getStorageConfiguration
The storage configuration for Amazon ECS Managed Instances.This defines the root volume size and type for the instances.
Returns union: either
IResolvableorCfnCapacityProvider.ManagedInstancesStorageConfigurationProperty- See Also:
-
builder
-