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
Modifier and TypeClassDescriptionstatic interface
The details of the Auto Scaling group for the capacity provider.static final class
A fluent builder forCfnCapacityProvider
.static interface
The managed scaling settings for the Auto Scaling group capacity provider.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnCapacityProvider
(Construct scope, String id, CfnCapacityProviderProps props) Create a newAWS::ECS::CapacityProvider
.protected
CfnCapacityProvider
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnCapacityProvider
(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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
The Auto Scaling group settings for the capacity provider.void
The Auto Scaling group settings for the capacity provider.void
The 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, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in 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-RandomString
format 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-RandomString
format is used.
-