ManagedInstancesProviderProperty Struct
The configuration for a Amazon ECS Managed Instances provider.
Amazon ECS uses this configuration to automatically launch, manage, and terminate Amazon EC2 instances on your behalf. Managed instances provide access to the full range of Amazon EC2 instance types and features while offloading infrastructure management to AWS .
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const managedInstancesProviderProperty: ecs.CfnCapacityProvider.ManagedInstancesProviderProperty = {
infrastructureRoleArn: 'infrastructureRoleArn',
instanceLaunchTemplate: {
ec2InstanceProfileArn: 'ec2InstanceProfileArn',
networkConfiguration: {
securityGroups: ['securityGroups'],
subnets: ['subnets'],
},
// the properties below are optional
capacityOptionType: 'capacityOptionType',
capacityReservations: {
reservationGroupArn: 'reservationGroupArn',
reservationPreference: 'reservationPreference',
},
fipsEnabled: false,
instanceMetadataTagsPropagation: false,
instanceRequirements: {
memoryMiB: {
min: 123,
// the properties below are optional
max: 123,
},
vCpuCount: {
min: 123,
// the properties below are optional
max: 123,
},
// the properties below are optional
acceleratorCount: {
max: 123,
min: 123,
},
acceleratorManufacturers: ['acceleratorManufacturers'],
acceleratorNames: ['acceleratorNames'],
acceleratorTotalMemoryMiB: {
max: 123,
min: 123,
},
acceleratorTypes: ['acceleratorTypes'],
allowedInstanceTypes: ['allowedInstanceTypes'],
bareMetal: 'bareMetal',
baselineEbsBandwidthMbps: {
max: 123,
min: 123,
},
burstablePerformance: 'burstablePerformance',
cpuManufacturers: ['cpuManufacturers'],
excludedInstanceTypes: ['excludedInstanceTypes'],
instanceGenerations: ['instanceGenerations'],
localStorage: 'localStorage',
localStorageTypes: ['localStorageTypes'],
maxSpotPriceAsPercentageOfOptimalOnDemandPrice: 123,
memoryGiBPerVCpu: {
max: 123,
min: 123,
},
networkBandwidthGbps: {
max: 123,
min: 123,
},
networkInterfaceCount: {
max: 123,
min: 123,
},
onDemandMaxPricePercentageOverLowestPrice: 123,
requireHibernateSupport: false,
spotMaxPricePercentageOverLowestPrice: 123,
totalLocalStorageGb: {
max: 123,
min: 123,
},
},
localStorageConfiguration: {
useLocalStorage: false,
},
monitoring: 'monitoring',
nitroEnclavesEnabled: false,
storageConfiguration: {
storageSizeGiB: 123,
},
},
// the properties below are optional
autoRepairConfiguration: {
actionsStatus: 'actionsStatus',
},
infrastructureOptimization: {
scaleInAfter: 123,
},
propagateTags: 'propagateTags',
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs
managed_instances_provider_property = ecs.CfnCapacityProvider.ManagedInstancesProviderProperty(
infrastructure_role_arn="infrastructureRoleArn",
instance_launch_template=ecs.CfnCapacityProvider.InstanceLaunchTemplateProperty(
ec2_instance_profile_arn="ec2InstanceProfileArn",
network_configuration=ecs.CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty(
security_groups=["securityGroups"],
subnets=["subnets"]
),
# the properties below are optional
capacity_option_type="capacityOptionType",
capacity_reservations=ecs.CfnCapacityProvider.CapacityReservationRequestProperty(
reservation_group_arn="reservationGroupArn",
reservation_preference="reservationPreference"
),
fips_enabled=False,
instance_metadata_tags_propagation=False,
instance_requirements=ecs.CfnCapacityProvider.InstanceRequirementsRequestProperty(
memory_mi_b=ecs.CfnCapacityProvider.MemoryMiBRequestProperty(
min=123,
# the properties below are optional
max=123
),
v_cpu_count=ecs.CfnCapacityProvider.VCpuCountRangeRequestProperty(
min=123,
# the properties below are optional
max=123
),
# the properties below are optional
accelerator_count=ecs.CfnCapacityProvider.AcceleratorCountRequestProperty(
max=123,
min=123
),
accelerator_manufacturers=["acceleratorManufacturers"],
accelerator_names=["acceleratorNames"],
accelerator_total_memory_mi_b=ecs.CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty(
max=123,
min=123
),
accelerator_types=["acceleratorTypes"],
allowed_instance_types=["allowedInstanceTypes"],
bare_metal="bareMetal",
baseline_ebs_bandwidth_mbps=ecs.CfnCapacityProvider.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_b_per_v_cpu=ecs.CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty(
max=123,
min=123
),
network_bandwidth_gbps=ecs.CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty(
max=123,
min=123
),
network_interface_count=ecs.CfnCapacityProvider.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=ecs.CfnCapacityProvider.TotalLocalStorageGBRequestProperty(
max=123,
min=123
)
),
local_storage_configuration=ecs.CfnCapacityProvider.ManagedInstancesLocalStorageConfigurationProperty(
use_local_storage=False
),
monitoring="monitoring",
nitro_enclaves_enabled=False,
storage_configuration=ecs.CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty(
storage_size_gi_b=123
)
),
# the properties below are optional
auto_repair_configuration=ecs.CfnCapacityProvider.AutoRepairConfigurationProperty(
actions_status="actionsStatus"
),
infrastructure_optimization=ecs.CfnCapacityProvider.InfrastructureOptimizationProperty(
scale_in_after=123
),
propagate_tags="propagateTags"
)
// 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.*;
ManagedInstancesProviderProperty managedInstancesProviderProperty = ManagedInstancesProviderProperty.builder()
.infrastructureRoleArn("infrastructureRoleArn")
.instanceLaunchTemplate(InstanceLaunchTemplateProperty.builder()
.ec2InstanceProfileArn("ec2InstanceProfileArn")
.networkConfiguration(ManagedInstancesNetworkConfigurationProperty.builder()
.securityGroups(List.of("securityGroups"))
.subnets(List.of("subnets"))
.build())
// the properties below are optional
.capacityOptionType("capacityOptionType")
.capacityReservations(CapacityReservationRequestProperty.builder()
.reservationGroupArn("reservationGroupArn")
.reservationPreference("reservationPreference")
.build())
.fipsEnabled(false)
.instanceMetadataTagsPropagation(false)
.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())
.localStorageConfiguration(ManagedInstancesLocalStorageConfigurationProperty.builder()
.useLocalStorage(false)
.build())
.monitoring("monitoring")
.nitroEnclavesEnabled(false)
.storageConfiguration(ManagedInstancesStorageConfigurationProperty.builder()
.storageSizeGiB(123)
.build())
.build())
// the properties below are optional
.autoRepairConfiguration(AutoRepairConfigurationProperty.builder()
.actionsStatus("actionsStatus")
.build())
.infrastructureOptimization(InfrastructureOptimizationProperty.builder()
.scaleInAfter(123)
.build())
.propagateTags("propagateTags")
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
var managedInstancesProviderProperty = new ManagedInstancesProviderProperty {
InfrastructureRoleArn = "infrastructureRoleArn",
InstanceLaunchTemplate = new InstanceLaunchTemplateProperty {
Ec2InstanceProfileArn = "ec2InstanceProfileArn",
NetworkConfiguration = new ManagedInstancesNetworkConfigurationProperty {
SecurityGroups = new [] { "securityGroups" },
Subnets = new [] { "subnets" }
},
// the properties below are optional
CapacityOptionType = "capacityOptionType",
CapacityReservations = new CapacityReservationRequestProperty {
ReservationGroupArn = "reservationGroupArn",
ReservationPreference = "reservationPreference"
},
FipsEnabled = false,
InstanceMetadataTagsPropagation = false,
InstanceRequirements = new InstanceRequirementsRequestProperty {
MemoryMiB = new MemoryMiBRequestProperty {
Min = 123,
// the properties below are optional
Max = 123
},
VCpuCount = new VCpuCountRangeRequestProperty {
Min = 123,
// the properties below are optional
Max = 123
},
// the properties below are optional
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
},
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
},
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
}
},
LocalStorageConfiguration = new ManagedInstancesLocalStorageConfigurationProperty {
UseLocalStorage = false
},
Monitoring = "monitoring",
NitroEnclavesEnabled = false,
StorageConfiguration = new ManagedInstancesStorageConfigurationProperty {
StorageSizeGiB = 123
}
},
// the properties below are optional
AutoRepairConfiguration = new AutoRepairConfigurationProperty {
ActionsStatus = "actionsStatus"
},
InfrastructureOptimization = new InfrastructureOptimizationProperty {
ScaleInAfter = 123
},
PropagateTags = "propagateTags"
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
managedInstancesProviderProperty := &ManagedInstancesProviderProperty{
InfrastructureRoleArn: jsii.String("infrastructureRoleArn"),
InstanceLaunchTemplate: &InstanceLaunchTemplateProperty{
Ec2InstanceProfileArn: jsii.String("ec2InstanceProfileArn"),
NetworkConfiguration: &ManagedInstancesNetworkConfigurationProperty{
SecurityGroups: []*string{
jsii.String("securityGroups"),
},
Subnets: []*string{
jsii.String("subnets"),
},
},
// the properties below are optional
CapacityOptionType: jsii.String("capacityOptionType"),
CapacityReservations: &CapacityReservationRequestProperty{
ReservationGroupArn: jsii.String("reservationGroupArn"),
ReservationPreference: jsii.String("reservationPreference"),
},
FipsEnabled: jsii.Boolean(false),
InstanceMetadataTagsPropagation: jsii.Boolean(false),
InstanceRequirements: &InstanceRequirementsRequestProperty{
MemoryMiB: &MemoryMiBRequestProperty{
Min: jsii.Number(123),
// the properties below are optional
Max: jsii.Number(123),
},
VCpuCount: &VCpuCountRangeRequestProperty{
Min: jsii.Number(123),
// the properties below are optional
Max: jsii.Number(123),
},
// the properties below are optional
AcceleratorCount: &AcceleratorCountRequestProperty{
Max: jsii.Number(123),
Min: jsii.Number(123),
},
AcceleratorManufacturers: []*string{
jsii.String("acceleratorManufacturers"),
},
AcceleratorNames: []*string{
jsii.String("acceleratorNames"),
},
AcceleratorTotalMemoryMiB: &AcceleratorTotalMemoryMiBRequestProperty{
Max: jsii.Number(123),
Min: jsii.Number(123),
},
AcceleratorTypes: []*string{
jsii.String("acceleratorTypes"),
},
AllowedInstanceTypes: []*string{
jsii.String("allowedInstanceTypes"),
},
BareMetal: jsii.String("bareMetal"),
BaselineEbsBandwidthMbps: &BaselineEbsBandwidthMbpsRequestProperty{
Max: jsii.Number(123),
Min: jsii.Number(123),
},
BurstablePerformance: jsii.String("burstablePerformance"),
CpuManufacturers: []*string{
jsii.String("cpuManufacturers"),
},
ExcludedInstanceTypes: []*string{
jsii.String("excludedInstanceTypes"),
},
InstanceGenerations: []*string{
jsii.String("instanceGenerations"),
},
LocalStorage: jsii.String("localStorage"),
LocalStorageTypes: []*string{
jsii.String("localStorageTypes"),
},
MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: jsii.Number(123),
MemoryGiBPerVCpu: &MemoryGiBPerVCpuRequestProperty{
Max: jsii.Number(123),
Min: jsii.Number(123),
},
NetworkBandwidthGbps: &NetworkBandwidthGbpsRequestProperty{
Max: jsii.Number(123),
Min: jsii.Number(123),
},
NetworkInterfaceCount: &NetworkInterfaceCountRequestProperty{
Max: jsii.Number(123),
Min: jsii.Number(123),
},
OnDemandMaxPricePercentageOverLowestPrice: jsii.Number(123),
RequireHibernateSupport: jsii.Boolean(false),
SpotMaxPricePercentageOverLowestPrice: jsii.Number(123),
TotalLocalStorageGb: &TotalLocalStorageGBRequestProperty{
Max: jsii.Number(123),
Min: jsii.Number(123),
},
},
LocalStorageConfiguration: &ManagedInstancesLocalStorageConfigurationProperty{
UseLocalStorage: jsii.Boolean(false),
},
Monitoring: jsii.String("monitoring"),
NitroEnclavesEnabled: jsii.Boolean(false),
StorageConfiguration: &ManagedInstancesStorageConfigurationProperty{
StorageSizeGiB: jsii.Number(123),
},
},
// the properties below are optional
AutoRepairConfiguration: &AutoRepairConfigurationProperty{
ActionsStatus: jsii.String("actionsStatus"),
},
InfrastructureOptimization: &InfrastructureOptimizationProperty{
ScaleInAfter: jsii.Number(123),
},
PropagateTags: jsii.String("propagateTags"),
}
Properties
autoRepairConfigurationoptionalIResolvable | CfnCapacityProvider.auto_repair_configurationoptionaltyping.Union[IResolvable, AutoRepairConfigurationProperty]autoRepairConfigurationoptionalIResolvableAutoRepairConfigurationoptionalIResolvableAutoRepairConfigurationoptionalinterface{} #infrastructureOptimizationoptionalIResolvable | CfnCapacityProvider.infrastructure_optimizationoptionaltyping.Union[IResolvable, InfrastructureOptimizationProperty]infrastructureOptimizationoptionalIResolvableInfrastructureOptimizationoptionalIResolvableInfrastructureOptimizationoptionalinterface{} #Configure it to turn on or off the infrastructure optimization in your capacity provider, and to control the idle or underutilized EC2 instances optimization delay.
infrastructureRoleArnstringinfrastructure_role_arnstrinfrastructureRoleArnStringInfrastructureRoleArnstringInfrastructureRoleArn*string required #notes
This role must include permissions for Amazon EC2 instance lifecycle management, networking, and any additional AWS services required for your workloads.
For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide .
instanceLaunchTemplateIResolvable | CfnCapacityProvider.instance_launch_templatetyping.Union[IResolvable, InstanceLaunchTemplateProperty]instanceLaunchTemplateIResolvableInstanceLaunchTemplateIResolvableInstanceLaunchTemplateinterface{} required #notes
This includes the instance profile for your tasks, network and storage configuration, and instance requirements that determine which Amazon EC2 instance types can be used.
For more information, see Store instance launch parameters in Amazon EC2 launch templates in the Amazon EC2 User Guide .
propagateTagsoptionalstringpropagate_tagsoptionalstrpropagateTagsoptionalStringPropagateTagsoptionalstringPropagateTagsoptional*string #This helps with cost allocation and resource management by ensuring consistent tagging across your infrastructure.