@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:49.424Z") public class CfnCapacityProvider extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnCapacityProvider.AutoScalingGroupProviderProperty
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 managed scaling settings for the Auto Scaling group capacity provider.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnCapacityProvider(Construct scope,
java.lang.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 |
---|---|
java.lang.Object |
getAutoScalingGroupProvider()
The Auto Scaling group settings for the capacity provider.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.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(java.lang.String value)
The name of the capacity provider.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnCapacityProvider(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnCapacityProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnCapacityProvider(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
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.public java.lang.Object getAutoScalingGroupProvider()
public void setAutoScalingGroupProvider(CfnCapacityProvider.AutoScalingGroupProviderProperty value)
public void setAutoScalingGroupProvider(IResolvable value)
public java.lang.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.
public void setName(java.lang.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.