@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.580Z") @Stability(value=Stable) public class CfnCapacityProvider extends CfnResource implements IInspectable
The AWS::ECS::CapacityProvider resource creates an Amazon Elastic Container Service (Amazon ECS) capacity provider. Capacity providers are associated with an Amazon ECS cluster and are used in capacity provider strategies to facilitate cluster auto scaling.
Only capacity providers using an Auto Scaling group can be created. Amazon ECS tasks on AWS Fargate use the FARGATE and FARGATE_SPOT capacity providers which are already created and available to all accounts in Regions supported by AWS Fargate .
Example:
// 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.*;
CfnCapacityProvider cfnCapacityProvider = CfnCapacityProvider.Builder.create(this, "MyCfnCapacityProvider")
.autoScalingGroupProvider(AutoScalingGroupProviderProperty.builder()
.autoScalingGroupArn("autoScalingGroupArn")
// the properties below are optional
.managedScaling(ManagedScalingProperty.builder()
.instanceWarmupPeriod(123)
.maximumScalingStepSize(123)
.minimumScalingStepSize(123)
.status("status")
.targetCapacity(123)
.build())
.managedTerminationProtection("managedTerminationProtection")
.build())
// the properties below are optional
.name("name")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnCapacityProvider.AutoScalingGroupProviderProperty
The `AutoScalingGroupProvider` property specifies the details of the Auto Scaling group for the capacity provider.
|
static class |
CfnCapacityProvider.Builder
A fluent builder for
CfnCapacityProvider. |
static interface |
CfnCapacityProvider.ManagedScalingProperty
The `ManagedScaling` property specifies the settings for the Auto Scaling group capacity provider.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnCapacityProvider(software.constructs.Construct scope,
String id,
CfnCapacityProviderProps props)
Create a new `AWS::ECS::CapacityProvider`.
|
protected |
CfnCapacityProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnCapacityProvider(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAutoScalingGroupProvider()
The Auto Scaling group settings for the capacity provider.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getName()
The name of the capacity provider.
|
TagManager |
getTags()
The metadata that you apply to the capacity provider to help you categorize and organize it.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAutoScalingGroupProvider(CfnCapacityProvider.AutoScalingGroupProviderProperty value)
The Auto Scaling group settings for the capacity provider.
|
void |
setAutoScalingGroupProvider(IResolvable value)
The Auto Scaling group settings for the capacity provider.
|
void |
setName(String value)
The name of the capacity provider.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnCapacityProvider(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnCapacityProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnCapacityProvider(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnCapacityProviderProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
aws: , AWS: , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.@Stability(value=Stable) @NotNull public Object getAutoScalingGroupProvider()
@Stability(value=Stable)
public void setAutoScalingGroupProvider(@NotNull
CfnCapacityProvider.AutoScalingGroupProviderProperty value)
@Stability(value=Stable)
public void setAutoScalingGroupProvider(@NotNull
IResolvable value)
@Stability(value=Stable) @Nullable public String getName()
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.
@Stability(value=Stable)
public void setName(@Nullable
String value)
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.
Copyright © 2022. All rights reserved.