Class CfnCapacityProvider
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.ecs.CfnCapacityProvider
- All Implemented Interfaces:
IInspectable,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:07.365Z")
@Stability(Stable)
public class CfnCapacityProvider
extends CfnResource
implements IInspectable, ITaggable
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
.managedDraining("managedDraining")
.managedScaling(ManagedScalingProperty.builder()
.instanceWarmupPeriod(123)
.maximumScalingStepSize(123)
.minimumScalingStepSize(123)
.status("status")
.targetCapacity(123)
.build())
.managedTerminationProtection("managedTerminationProtection")
.build())
.name("name")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
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.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnCapacityProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCapacityProvider(software.amazon.jsii.JsiiObjectRef objRef) CfnCapacityProvider(software.constructs.Construct scope, String id) CfnCapacityProvider(software.constructs.Construct scope, String id, CfnCapacityProviderProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe Auto Scaling group settings for the capacity provider.getName()The name of the capacity provider.getTags()Tag Manager which manages the tags for this resource.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.voidsetTagsRaw(List<CfnTag> value) The metadata that you apply to the capacity provider to help you categorize and organize it.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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 software.constructs.Construct scope, @NotNull String id, @Nullable CfnCapacityProviderProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties.
-
CfnCapacityProvider
@Stability(Stable) public CfnCapacityProvider(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
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
Tag Manager which manages the tags for this resource. -
getAutoScalingGroupProvider
The Auto Scaling group settings for the capacity provider. -
setAutoScalingGroupProvider
The Auto Scaling group settings for the capacity provider. -
setAutoScalingGroupProvider
@Stability(Stable) public void setAutoScalingGroupProvider(@Nullable CfnCapacityProvider.AutoScalingGroupProviderProperty value) The Auto Scaling group settings for the capacity provider. -
getName
The name of the capacity provider. -
setName
The name of the capacity provider. -
getTagsRaw
The metadata that you apply to the capacity provider to help you categorize and organize it. -
setTagsRaw
The metadata that you apply to the capacity provider to help you categorize and organize it.
-