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:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> 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 to AWS::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 to AWS::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.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnCapacityProviderMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()