aws-cdk-lib.aws_ecs.CapacityProviderStrategy

interface CapacityProviderStrategy

LanguageType name
.NETAmazon.CDK.AWS.ECS.CapacityProviderStrategy
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecs#CapacityProviderStrategy
Javasoftware.amazon.awscdk.services.ecs.CapacityProviderStrategy
Pythonaws_cdk.aws_ecs.CapacityProviderStrategy
TypeScript (source)aws-cdk-lib » aws_ecs » CapacityProviderStrategy

A Capacity Provider strategy to use for the service.

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 capacityProviderStrategy: ecs.CapacityProviderStrategy = {
  capacityProvider: 'capacityProvider',

  // the properties below are optional
  base: 123,
  weight: 123,
};

Properties

NameTypeDescription
capacityProviderstringThe name of the capacity provider.
base?numberThe base value designates how many tasks, at a minimum, to run on the specified capacity provider.
weight?numberThe weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.

capacityProvider

Type: string

The name of the capacity provider.


base?

Type: number (optional, default: none)

The base value designates how many tasks, at a minimum, to run on the specified capacity provider.

Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.


weight?

Type: number (optional, default: 0)

The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.

The weight value is taken into consideration after the base value, if defined, is satisfied.