Skip to content
v2.278.0

CfnClusterCapacityProviderAssociationsProps Struct ​

Properties for defining a CfnClusterCapacityProviderAssociations.

Example ​

ts
// 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 cfnClusterCapacityProviderAssociationsProps: ecs.CfnClusterCapacityProviderAssociationsProps = {
  cluster: 'cluster',
  defaultCapacityProviderStrategy: [{
    capacityProvider: 'capacityProvider',

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

  // the properties below are optional
  capacityProviders: ['capacityProviders'],
};
python
# 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

cfn_cluster_capacity_provider_associations_props = ecs.CfnClusterCapacityProviderAssociationsProps(
    cluster="cluster",
    default_capacity_provider_strategy=[ecs.CfnClusterCapacityProviderAssociations.CapacityProviderStrategyProperty(
        capacity_provider="capacityProvider",

        # the properties below are optional
        base=123,
        weight=123
    )],

    # the properties below are optional
    capacity_providers=["capacityProviders"]
)
java
// 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.*;

CfnClusterCapacityProviderAssociationsProps cfnClusterCapacityProviderAssociationsProps = CfnClusterCapacityProviderAssociationsProps.builder()
        .cluster("cluster")
        .defaultCapacityProviderStrategy(List.of(CapacityProviderStrategyProperty.builder()
                .capacityProvider("capacityProvider")

                // the properties below are optional
                .base(123)
                .weight(123)
                .build()))

        // the properties below are optional
        .capacityProviders(List.of("capacityProviders"))
        .build();
csharp
// 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 cfnClusterCapacityProviderAssociationsProps = new CfnClusterCapacityProviderAssociationsProps {
    Cluster = "cluster",
    DefaultCapacityProviderStrategy = new [] { new CapacityProviderStrategyProperty {
        CapacityProvider = "capacityProvider",

        // the properties below are optional
        Base = 123,
        Weight = 123
    } },

    // the properties below are optional
    CapacityProviders = new [] { "capacityProviders" }
};
go
// 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"

cfnClusterCapacityProviderAssociationsProps := &CfnClusterCapacityProviderAssociationsProps{
	Cluster: jsii.String("cluster"),
	DefaultCapacityProviderStrategy: []interface{}{
		&CapacityProviderStrategyProperty{
			CapacityProvider: jsii.String("capacityProvider"),

			// the properties below are optional
			Base: jsii.Number(123),
			Weight: jsii.Number(123),
		},
	},

	// the properties below are optional
	CapacityProviders: []interface{}{
		jsii.String("capacityProviders"),
	},
}

Properties ​

capacityProvidersoptionalstring | ICapacityProviderRef[]capacity_providersoptionaltyping.List[typing.Union[str, ICapacityProviderRef]]capacityProvidersoptionalList<String>CapacityProvidersoptionalstring[]CapacityProvidersoptional*[]interface{} #
The capacity providers to associate with the cluster.
clusterstring | IClusterRefclustertyping.Union[str, IClusterRef]clusterStringClusterstringClusterinterface{} required #
The cluster the capacity provider association is the target of.
defaultCapacityProviderStrategyIResolvable | IResolvable | CfnClusterCapacityProviderAssociations.CapacityProviderStrategyProperty[]default_capacity_provider_strategytyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CapacityProviderStrategyProperty]]]defaultCapacityProviderStrategyIResolvableDefaultCapacityProviderStrategyIResolvableDefaultCapacityProviderStrategyinterface{} required #
The default capacity provider strategy to associate with the cluster.