Class CfnCapacityProvider
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::ECS::CapacityProvider.
Creates a new 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 that use an Auto Scaling group can be created. Amazon ECS tasks on AWS Fargate use the FARGATE and FARGATE_SPOT capacity providers. These providers are available to all accounts in the AWS Regions that AWS Fargate supports.
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe details of the Auto Scaling group for the capacity provider.static final classA fluent builder forCfnCapacityProvider.static interfaceThe managed scaling settings for the Auto Scaling group capacity provider.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnCapacityProvider(Construct scope, String id, CfnCapacityProviderProps props) Create a newAWS::ECS::CapacityProvider.protectedCfnCapacityProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCapacityProvider(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe Auto Scaling group settings for the capacity provider.getName()The name of the capacity provider.getTags()The metadata that you apply to the capacity provider to help you categorize and organize it.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThe Auto Scaling group settings for the capacity provider.voidThe Auto Scaling group settings for the capacity provider.voidThe name of the capacity provider.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnCapacityProvider
protected CfnCapacityProvider(software.amazon.jsii.JsiiObjectRef objRef) -
CfnCapacityProvider
protected CfnCapacityProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnCapacityProvider
@Stability(Stable) public CfnCapacityProvider(@NotNull Construct scope, @NotNull String id, @NotNull CfnCapacityProviderProps props) Create a newAWS::ECS::CapacityProvider.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
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.
- Maximum key length - 128 Unicode characters in UTF-8
- Maximum value length - 256 Unicode characters in UTF-8
- If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
- Tag keys and values are case-sensitive.
- Do not use
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.
-
getAutoScalingGroupProvider
The Auto Scaling group settings for the capacity provider. -
setAutoScalingGroupProvider
@Stability(Stable) public void setAutoScalingGroupProvider(@NotNull CfnCapacityProvider.AutoScalingGroupProviderProperty value) The Auto Scaling group settings for the capacity provider. -
setAutoScalingGroupProvider
The Auto Scaling group settings for the capacity provider. -
getName
The name of the capacity provider.If a name is specified, it cannot start with
aws,ecs, orfargate. If no name is specified, a default name in theCFNStackName-CFNResourceName-RandomStringformat is used. -
setName
The name of the capacity provider.If a name is specified, it cannot start with
aws,ecs, orfargate. If no name is specified, a default name in theCFNStackName-CFNResourceName-RandomStringformat is used.
-