aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
842 lines (841 loc) • 463 kB
TypeScript
import * as cdk from "../../core/lib";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
import { CapacityProviderReference, ClusterCapacityProviderAssociationsReference, ClusterReference, ExpressGatewayServiceReference, ICapacityProviderRef, IClusterCapacityProviderAssociationsRef, IClusterRef, IExpressGatewayServiceRef, IPrimaryTaskSetRef, IServiceRef, ITaskDefinitionRef, ITaskSetRef, PrimaryTaskSetReference, ServiceReference, TaskDefinitionReference, TaskSetReference } from "../../interfaces/generated/aws-ecs-interfaces.generated";
import { aws_ecs as ecsRefs, aws_iam as iamRefs } from "../../interfaces";
/**
* 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.
*
* @cloudformationResource AWS::ECS::CapacityProvider
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html
*/
export declare class CfnCapacityProvider extends cdk.CfnResource implements cdk.IInspectable, ICapacityProviderRef, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnCapacityProvider from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnCapacityProvider;
/**
* Checks whether the given object is a CfnCapacityProvider
*/
static isCfnCapacityProvider(x: any): x is CfnCapacityProvider;
/**
* Creates a new ICapacityProviderRef from a capacityProviderName
*/
static fromCapacityProviderName(scope: constructs.Construct, id: string, capacityProviderName: string): ICapacityProviderRef;
static arnForCapacityProvider(resource: ICapacityProviderRef): string;
/**
* The Auto Scaling group settings for the capacity provider.
*/
autoScalingGroupProvider?: CfnCapacityProvider.AutoScalingGroupProviderProperty | cdk.IResolvable;
/**
* The cluster that this capacity provider is associated with.
*/
clusterName?: string;
/**
* The configuration for the Amazon ECS Managed Instances provider.
*/
managedInstancesProvider?: cdk.IResolvable | CfnCapacityProvider.ManagedInstancesProviderProperty;
/**
* The name of the capacity provider.
*/
name?: string;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* The metadata that you apply to the capacity provider to help you categorize and organize it.
*/
tagsRaw?: Array<cdk.CfnTag>;
/**
* Create a new `AWS::ECS::CapacityProvider`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props?: CfnCapacityProviderProps);
get capacityProviderRef(): CapacityProviderReference;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnCapacityProvider {
/**
* The details of the Auto Scaling group for the capacity provider.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html
*/
interface AutoScalingGroupProviderProperty {
/**
* The Amazon Resource Name (ARN) that identifies the Auto Scaling group, or the Auto Scaling group name.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-autoscalinggrouparn
*/
readonly autoScalingGroupArn: string;
/**
* The managed draining option for the Auto Scaling group capacity provider.
*
* When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-manageddraining
*/
readonly managedDraining?: string;
/**
* The managed scaling settings for the Auto Scaling group capacity provider.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedscaling
*/
readonly managedScaling?: cdk.IResolvable | CfnCapacityProvider.ManagedScalingProperty;
/**
* The managed termination protection setting to use for the Auto Scaling group capacity provider.
*
* This determines whether the Auto Scaling group has managed termination protection. The default is off.
*
* > When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn't work.
*
* When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions on as well. For more information, see [Instance Protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) in the *AWS Auto Scaling User Guide* .
*
* When managed termination protection is off, your Amazon EC2 instances aren't protected from termination when the Auto Scaling group scales in.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedterminationprotection
*/
readonly managedTerminationProtection?: string;
}
/**
* The managed scaling settings for the Auto Scaling group capacity provider.
*
* When managed scaling is turned on, Amazon ECS manages the scale-in and scale-out actions of the Auto Scaling group. Amazon ECS manages a target tracking scaling policy using an Amazon ECS managed CloudWatch metric with the specified `targetCapacity` value as the target value for the metric. For more information, see [Using managed scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling) in the *Amazon Elastic Container Service Developer Guide* .
*
* If managed scaling is off, the user must manage the scaling of the Auto Scaling group.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html
*/
interface ManagedScalingProperty {
/**
* The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group.
*
* If this parameter is omitted, the default value of `300` seconds is used.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-instancewarmupperiod
*/
readonly instanceWarmupPeriod?: number;
/**
* The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time.
*
* If this parameter is omitted, the default value of `10000` is used.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-maximumscalingstepsize
*/
readonly maximumScalingStepSize?: number;
/**
* The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time.
*
* The scale in process is not affected by this parameter If this parameter is omitted, the default value of `1` is used.
*
* When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-minimumscalingstepsize
*/
readonly minimumScalingStepSize?: number;
/**
* Determines whether to use managed scaling for the capacity provider.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-status
*/
readonly status?: string;
/**
* The target capacity utilization as a percentage for the capacity provider.
*
* The specified value must be greater than `0` and less than or equal to `100` . For example, if you want the capacity provider to maintain 10% spare capacity, then that means the utilization is 90%, so use a `targetCapacity` of `90` . The default value of `100` percent results in the Amazon EC2 instances in your Auto Scaling group being completely used.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-targetcapacity
*/
readonly targetCapacity?: number;
}
/**
* 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 .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html
*/
interface ManagedInstancesProviderProperty {
/**
* Defines how Amazon ECS Managed Instances optimizes the infrastastructure in your capacity provider.
*
* 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructureoptimization
*/
readonly infrastructureOptimization?: CfnCapacityProvider.InfrastructureOptimizationProperty | cdk.IResolvable;
/**
* The Amazon Resource Name (ARN) of the infrastructure role that Amazon ECS assumes to manage instances.
*
* 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](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/infrastructure_IAM_role.html) in the *Amazon ECS Developer Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructurerolearn
*/
readonly infrastructureRoleArn: string;
/**
* The launch template that defines how Amazon ECS launches Amazon ECS Managed Instances.
*
* 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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) in the *Amazon EC2 User Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-instancelaunchtemplate
*/
readonly instanceLaunchTemplate: CfnCapacityProvider.InstanceLaunchTemplateProperty | cdk.IResolvable;
/**
* Determines whether tags from the capacity provider are automatically applied to Amazon ECS Managed Instances.
*
* This helps with cost allocation and resource management by ensuring consistent tagging across your infrastructure.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-propagatetags
*/
readonly propagateTags?: string;
}
/**
* The configuration that controls how Amazon ECS optimizes your infrastructure.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-infrastructureoptimization.html
*/
interface InfrastructureOptimizationProperty {
/**
* This parameter defines the number of seconds Amazon ECS Managed Instances waits before optimizing EC2 instances that have become idle or underutilized.
*
* A longer delay increases the likelihood of placing new tasks on idle or underutilized instances instances, reducing startup time. A shorter delay helps reduce infrastructure costs by optimizing idle or underutilized instances,instances more quickly.
*
* Valid values are:
*
* - `null` - Uses the default optimization behavior.
* - `-1` - Disables automatic infrastructure optimization.
* - A value between `0` and `3600` (inclusive) - Specifies the number of seconds to wait before optimizing instances.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-infrastructureoptimization.html#cfn-ecs-capacityprovider-infrastructureoptimization-scaleinafter
*/
readonly scaleInAfter?: number;
}
/**
* The launch template configuration for Amazon ECS Managed Instances.
*
* 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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html
*/
interface InstanceLaunchTemplateProperty {
/**
* 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](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/managed-instances-instance-profile.html) in the *Amazon ECS Developer Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-ec2instanceprofilearn
*/
readonly ec2InstanceProfileArn: string;
/**
* 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-instancerequirements
*/
readonly instanceRequirements?: CfnCapacityProvider.InstanceRequirementsRequestProperty | cdk.IResolvable;
/**
* 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](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/detailed-monitoring-managed-instances.html) in the Amazon ECS Developer Guide.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-monitoring
*/
readonly monitoring?: string;
/**
* The network configuration for Amazon ECS Managed Instances.
*
* This specifies the subnets and security groups that instances use for network connectivity.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-networkconfiguration
*/
readonly networkConfiguration: cdk.IResolvable | CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty;
/**
* The storage configuration for Amazon ECS Managed Instances.
*
* This defines the root volume size and type for the instances.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-storageconfiguration
*/
readonly storageConfiguration?: cdk.IResolvable | CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty;
}
/**
* The storage configuration for Amazon ECS Managed Instances.
*
* This defines the root volume configuration for the instances.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration.html
*/
interface ManagedInstancesStorageConfigurationProperty {
/**
* The size of the tasks volume.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration.html#cfn-ecs-capacityprovider-managedinstancesstorageconfiguration-storagesizegib
*/
readonly storageSizeGiB: number;
}
/**
* The network configuration for Amazon ECS Managed Instances.
*
* This specifies the VPC subnets and security groups that instances use for network connectivity. Amazon ECS Managed Instances support multiple network modes including `awsvpc` (instances receive ENIs for task isolation), `host` (instances share network namespace with tasks), and `none` (no external network connectivity), ensuring backward compatibility for migrating workloads from Fargate or Amazon EC2.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html
*/
interface ManagedInstancesNetworkConfigurationProperty {
/**
* The list of security group IDs to apply to Amazon ECS Managed Instances.
*
* These security groups control the network traffic allowed to and from the instances.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-securitygroups
*/
readonly securityGroups?: Array<string>;
/**
* The list of subnet IDs where Amazon ECS can launch Amazon ECS Managed Instances.
*
* Instances are distributed across the specified subnets for high availability. All subnets must be in the same VPC.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-subnets
*/
readonly subnets: Array<string>;
}
/**
* The instance requirements for attribute-based instance type selection.
*
* Instead of specifying exact instance types, you define requirements such as vCPU count, memory size, network performance, and accelerator specifications. Amazon ECS automatically selects Amazon EC2 instance types that match these requirements, providing flexibility and helping to mitigate capacity constraints.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html
*/
interface InstanceRequirementsRequestProperty {
/**
* The minimum and maximum number of accelerators for the instance types.
*
* This is used when you need instances with specific numbers of GPUs or other accelerators.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratorcount
*/
readonly acceleratorCount?: CfnCapacityProvider.AcceleratorCountRequestProperty | cdk.IResolvable;
/**
* The accelerator manufacturers to include.
*
* You can specify `nvidia` , `amd` , `amazon-web-services` , or `xilinx` depending on your accelerator requirements.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratormanufacturers
*/
readonly acceleratorManufacturers?: Array<string>;
/**
* The specific accelerator names to include.
*
* For example, you can specify `a100` , `v100` , `k80` , or other specific accelerator models.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratornames
*/
readonly acceleratorNames?: Array<string>;
/**
* The minimum and maximum total accelerator memory in mebibytes (MiB).
*
* This is important for GPU workloads that require specific amounts of video memory.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortotalmemorymib
*/
readonly acceleratorTotalMemoryMiB?: CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty | cdk.IResolvable;
/**
* The accelerator types to include.
*
* You can specify `gpu` for graphics processing units, `fpga` for field programmable gate arrays, or `inference` for machine learning inference accelerators.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortypes
*/
readonly acceleratorTypes?: Array<string>;
/**
* The instance types to include in the selection.
*
* When specified, Amazon ECS only considers these instance types, subject to the other requirements specified.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-allowedinstancetypes
*/
readonly allowedInstanceTypes?: Array<string>;
/**
* Indicates whether to include bare metal instance types.
*
* Set to `included` to allow bare metal instances, `excluded` to exclude them, or `required` to use only bare metal instances.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-baremetal
*/
readonly bareMetal?: string;
/**
* The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps).
*
* This is important for workloads with high storage I/O requirements.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-baselineebsbandwidthmbps
*/
readonly baselineEbsBandwidthMbps?: CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty | cdk.IResolvable;
/**
* Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g).
*
* Set to `included` to allow burstable instances, `excluded` to exclude them, or `required` to use only burstable instances.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-burstableperformance
*/
readonly burstablePerformance?: string;
/**
* The CPU manufacturers to include or exclude.
*
* You can specify `intel` , `amd` , or `amazon-web-services` to control which CPU types are used for your workloads.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-cpumanufacturers
*/
readonly cpuManufacturers?: Array<string>;
/**
* The instance types to exclude from selection.
*
* Use this to prevent Amazon ECS from selecting specific instance types that may not be suitable for your workloads.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-excludedinstancetypes
*/
readonly excludedInstanceTypes?: Array<string>;
/**
* The instance generations to include.
*
* You can specify `current` to use the latest generation instances, or `previous` to include previous generation instances for cost optimization.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-instancegenerations
*/
readonly instanceGenerations?: Array<string>;
/**
* Indicates whether to include instance types with local storage.
*
* Set to `included` to allow local storage, `excluded` to exclude it, or `required` to use only instances with local storage.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-localstorage
*/
readonly localStorage?: string;
/**
* The local storage types to include.
*
* You can specify `hdd` for hard disk drives, `ssd` for solid state drives, or both.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-localstoragetypes
*/
readonly localStorageTypes?: Array<string>;
/**
* The maximum price for Spot instances as a percentage of the optimal On-Demand price.
*
* This provides more precise cost control for Spot instance selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-maxspotpriceaspercentageofoptimalondemandprice
*/
readonly maxSpotPriceAsPercentageOfOptimalOnDemandPrice?: number;
/**
* The minimum and maximum amount of memory per vCPU in gibibytes (GiB).
*
* This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-memorygibpervcpu
*/
readonly memoryGiBPerVCpu?: cdk.IResolvable | CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty;
/**
* The minimum and maximum amount of memory in mebibytes (MiB) for the instance types.
*
* Amazon ECS selects instance types that have memory within this range.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-memorymib
*/
readonly memoryMiB: cdk.IResolvable | CfnCapacityProvider.MemoryMiBRequestProperty;
/**
* The minimum and maximum network bandwidth in gigabits per second (Gbps).
*
* This is crucial for network-intensive workloads that require high throughput.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-networkbandwidthgbps
*/
readonly networkBandwidthGbps?: cdk.IResolvable | CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty;
/**
* The minimum and maximum number of network interfaces for the instance types.
*
* This is useful for workloads that require multiple network interfaces.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-networkinterfacecount
*/
readonly networkInterfaceCount?: cdk.IResolvable | CfnCapacityProvider.NetworkInterfaceCountRequestProperty;
/**
* The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price.
*
* The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon ECS selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-ondemandmaxpricepercentageoverlowestprice
*/
readonly onDemandMaxPricePercentageOverLowestPrice?: number;
/**
* Indicates whether the instance types must support hibernation.
*
* When set to `true` , only instance types that support hibernation are selected.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-requirehibernatesupport
*/
readonly requireHibernateSupport?: boolean | cdk.IResolvable;
/**
* The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance.
*
* This helps control Spot instance costs while maintaining access to capacity.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-spotmaxpricepercentageoverlowestprice
*/
readonly spotMaxPricePercentageOverLowestPrice?: number;
/**
* The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-totallocalstoragegb
*/
readonly totalLocalStorageGb?: cdk.IResolvable | CfnCapacityProvider.TotalLocalStorageGBRequestProperty;
/**
* The minimum and maximum number of vCPUs for the instance types.
*
* Amazon ECS selects instance types that have vCPU counts within this range.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-vcpucount
*/
readonly vCpuCount: cdk.IResolvable | CfnCapacityProvider.VCpuCountRangeRequestProperty;
}
/**
* The minimum and maximum number of network interfaces for instance type selection.
*
* This is useful for workloads that require multiple network interfaces.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkinterfacecountrequest.html
*/
interface NetworkInterfaceCountRequestProperty {
/**
* The maximum number of network interfaces.
*
* Instance types that support more network interfaces are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkinterfacecountrequest.html#cfn-ecs-capacityprovider-networkinterfacecountrequest-max
*/
readonly max?: number;
/**
* The minimum number of network interfaces.
*
* Instance types that support fewer network interfaces are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkinterfacecountrequest.html#cfn-ecs-capacityprovider-networkinterfacecountrequest-min
*/
readonly min?: number;
}
/**
* The minimum and maximum amount of memory per vCPU in gibibytes (GiB).
*
* This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorygibpervcpurequest.html
*/
interface MemoryGiBPerVCpuRequestProperty {
/**
* The maximum amount of memory per vCPU in GiB.
*
* Instance types with a higher memory-to-vCPU ratio are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorygibpervcpurequest.html#cfn-ecs-capacityprovider-memorygibpervcpurequest-max
*/
readonly max?: number;
/**
* The minimum amount of memory per vCPU in GiB.
*
* Instance types with a lower memory-to-vCPU ratio are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorygibpervcpurequest.html#cfn-ecs-capacityprovider-memorygibpervcpurequest-min
*/
readonly min?: number;
}
/**
* The minimum and maximum number of vCPUs for instance type selection.
*
* This allows you to specify a range of vCPU counts that meet your workload requirements.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-vcpucountrangerequest.html
*/
interface VCpuCountRangeRequestProperty {
/**
* The maximum number of vCPUs.
*
* Instance types with more vCPUs than this value are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-vcpucountrangerequest.html#cfn-ecs-capacityprovider-vcpucountrangerequest-max
*/
readonly max?: number;
/**
* The minimum number of vCPUs.
*
* Instance types with fewer vCPUs than this value are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-vcpucountrangerequest.html#cfn-ecs-capacityprovider-vcpucountrangerequest-min
*/
readonly min: number;
}
/**
* The minimum and maximum network bandwidth in gigabits per second (Gbps) for instance type selection.
*
* This is important for network-intensive workloads.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.html
*/
interface NetworkBandwidthGbpsRequestProperty {
/**
* The maximum network bandwidth in Gbps.
*
* Instance types with higher network bandwidth are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.html#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-max
*/
readonly max?: number;
/**
* The minimum network bandwidth in Gbps.
*
* Instance types with lower network bandwidth are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.html#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-min
*/
readonly min?: number;
}
/**
* The minimum and maximum number of accelerators (such as GPUs) for instance type selection.
*
* This is used for workloads that require specific numbers of accelerators.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratorcountrequest.html
*/
interface AcceleratorCountRequestProperty {
/**
* The maximum number of accelerators.
*
* Instance types with more accelerators are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratorcountrequest.html#cfn-ecs-capacityprovider-acceleratorcountrequest-max
*/
readonly max?: number;
/**
* The minimum number of accelerators.
*
* Instance types with fewer accelerators are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratorcountrequest.html#cfn-ecs-capacityprovider-acceleratorcountrequest-min
*/
readonly min?: number;
}
/**
* The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps) for instance type selection.
*
* This is important for workloads with high storage I/O requirements.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.html
*/
interface BaselineEbsBandwidthMbpsRequestProperty {
/**
* The maximum baseline Amazon EBS bandwidth in Mbps.
*
* Instance types with higher Amazon EBS bandwidth are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.html#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-max
*/
readonly max?: number;
/**
* The minimum baseline Amazon EBS bandwidth in Mbps.
*
* Instance types with lower Amazon EBS bandwidth are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.html#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-min
*/
readonly min?: number;
}
/**
* The minimum and maximum total accelerator memory in mebibytes (MiB) for instance type selection.
*
* This is important for GPU workloads that require specific amounts of video memory.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.html
*/
interface AcceleratorTotalMemoryMiBRequestProperty {
/**
* The maximum total accelerator memory in MiB.
*
* Instance types with more accelerator memory are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.html#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-max
*/
readonly max?: number;
/**
* The minimum total accelerator memory in MiB.
*
* Instance types with less accelerator memory are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.html#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-min
*/
readonly min?: number;
}
/**
* The minimum and maximum amount of memory in mebibytes (MiB) for instance type selection.
*
* This ensures that selected instance types have adequate memory for your workloads.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html
*/
interface MemoryMiBRequestProperty {
/**
* The maximum amount of memory in MiB.
*
* Instance types with more memory than this value are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html#cfn-ecs-capacityprovider-memorymibrequest-max
*/
readonly max?: number;
/**
* The minimum amount of memory in MiB.
*
* Instance types with less memory than this value are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html#cfn-ecs-capacityprovider-memorymibrequest-min
*/
readonly min: number;
}
/**
* The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.
*
* This is useful for workloads that require local storage for temporary data or caching.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.html
*/
interface TotalLocalStorageGBRequestProperty {
/**
* The maximum total local storage in GB.
*
* Instance types with more local storage are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.html#cfn-ecs-capacityprovider-totallocalstoragegbrequest-max
*/
readonly max?: number;
/**
* The minimum total local storage in GB.
*
* Instance types with less local storage are excluded from selection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.html#cfn-ecs-capacityprovider-totallocalstoragegbrequest-min
*/
readonly min?: number;
}
}
/**
* Properties for defining a `CfnCapacityProvider`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html
*/
export interface CfnCapacityProviderProps {
/**
* The Auto Scaling group settings for the capacity provider.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider
*/
readonly autoScalingGroupProvider?: CfnCapacityProvider.AutoScalingGroupProviderProperty | cdk.IResolvable;
/**
* The cluster that this capacity provider is associated with.
*
* Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.
*
* This is required for Managed instances.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-clustername
*/
readonly clusterName?: string;
/**
* The configuration for the Amazon ECS Managed Instances provider.
*
* This includes the infrastructure role, the launch template configuration, and tag propagation settings.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider
*/
readonly managedInstancesProvider?: cdk.IResolvable | CfnCapacityProvider.ManagedInstancesProviderProperty;
/**
* The name of the capacity provider.
*
* If a name is specified, it cannot start with `aws` , `ecs` , or `fargate` . If no name is specified, a default name in the `CFNStackName-CFNResourceName-RandomString` format is used.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-name
*/
readonly name?: string;
/**
* The metadata that you apply to the capacity provider to help you categorize and organize it.
*
* Each tag consists of a key and an optional value. You define both.
*
* The following basic restrictions apply to tags:
*
* - Maximum number of tags per resource - 50
* - For each resource, each tag key must be unique, and each tag key can have only one value.