Class CfnCapacityProviderPropsMixin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.ecs.CfnCapacityProviderPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-03-11T13:19:58.846Z")
@Stability(Stable)
public class CfnCapacityProviderPropsMixin
extends Mixin
implements software.constructs.IMixin
Creates a capacity provider.
Capacity providers are associated with a cluster and are used in capacity provider strategies to facilitate cluster auto scaling. You can create capacity providers for Amazon ECS Managed Instances and EC2 instances. AWS Fargate has the predefined FARGATE and FARGATE_SPOT capacity providers.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.ecs.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
CfnCapacityProviderPropsMixin cfnCapacityProviderPropsMixin = CfnCapacityProviderPropsMixin.Builder.create(CfnCapacityProviderMixinProps.builder()
.autoScalingGroupProvider(AutoScalingGroupProviderProperty.builder()
.autoScalingGroupArn("autoScalingGroupArn")
.managedDraining("managedDraining")
.managedScaling(ManagedScalingProperty.builder()
.instanceWarmupPeriod(123)
.maximumScalingStepSize(123)
.minimumScalingStepSize(123)
.status("status")
.targetCapacity(123)
.build())
.managedTerminationProtection("managedTerminationProtection")
.build())
.clusterName("clusterName")
.managedInstancesProvider(ManagedInstancesProviderProperty.builder()
.infrastructureOptimization(InfrastructureOptimizationProperty.builder()
.scaleInAfter(123)
.build())
.infrastructureRoleArn("infrastructureRoleArn")
.instanceLaunchTemplate(InstanceLaunchTemplateProperty.builder()
.capacityOptionType("capacityOptionType")
.capacityReservations(CapacityReservationRequestProperty.builder()
.reservationGroupArn("reservationGroupArn")
.reservationPreference("reservationPreference")
.build())
.ec2InstanceProfileArn("ec2InstanceProfileArn")
.fipsEnabled(false)
.instanceRequirements(InstanceRequirementsRequestProperty.builder()
.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())
.memoryMiB(MemoryMiBRequestProperty.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())
.vCpuCount(VCpuCountRangeRequestProperty.builder()
.max(123)
.min(123)
.build())
.build())
.monitoring("monitoring")
.networkConfiguration(ManagedInstancesNetworkConfigurationProperty.builder()
.securityGroups(List.of("securityGroups"))
.subnets(List.of("subnets"))
.build())
.storageConfiguration(ManagedInstancesStorageConfigurationProperty.builder()
.storageSizeGiB(123)
.build())
.build())
.propagateTags("propagateTags")
.build())
.name("name")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe minimum and maximum number of accelerators (such as GPUs) for instance type selection.static interfaceThe minimum and maximum total accelerator memory in mebibytes (MiB) for instance type selection.static interfaceThe details of the Auto Scaling group for the capacity provider.static interfaceThe minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps) for instance type selection.static final classA fluent builder forCfnCapacityProviderPropsMixin.static interfaceExample:static interfaceThe configuration that controls how Amazon ECS optimizes your infrastructure.static interfaceThe launch template configuration for Amazon ECS Managed Instances.static interfaceThe instance requirements for attribute-based instance type selection.static interfaceThe network configuration for Amazon ECS Managed Instances.static interfaceThe configuration for a Amazon ECS Managed Instances provider.static interfaceThe storage configuration for Amazon ECS Managed Instances.static interfaceThe managed scaling settings for the Auto Scaling group capacity provider.static interfaceThe minimum and maximum amount of memory per vCPU in gibibytes (GiB).static interfaceThe minimum and maximum amount of memory in mebibytes (MiB) for instance type selection.static interfaceThe minimum and maximum network bandwidth in gigabits per second (Gbps) for instance type selection.static interfaceThe minimum and maximum number of network interfaces for instance type selection.static interfaceThe minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.static interfaceThe minimum and maximum number of vCPUs for instance type selection.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::ECS::CapacityProvider.Create a mixin to apply properties toAWS::ECS::CapacityProvider.protectedCfnCapacityProviderPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCapacityProviderPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnCapacityProviderMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnCapacityProviderPropsMixin
protected CfnCapacityProviderPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnCapacityProviderPropsMixin
protected CfnCapacityProviderPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnCapacityProviderPropsMixin
@Stability(Stable) public CfnCapacityProviderPropsMixin(@NotNull CfnCapacityProviderMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::ECS::CapacityProvider.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnCapacityProviderPropsMixin
@Stability(Stable) public CfnCapacityProviderPropsMixin(@NotNull CfnCapacityProviderMixinProps props) Create a mixin to apply properties toAWS::ECS::CapacityProvider.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-