Class CfnCapacityProvider
Creates a new capacity provider.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCapacityProvider : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnCapacityProvider
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html
CloudformationResource: AWS::ECS::CapacityProvider
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
var cfnCapacityProvider = new CfnCapacityProvider(this, "MyCfnCapacityProvider", new CfnCapacityProviderProps {
AutoScalingGroupProvider = new AutoScalingGroupProviderProperty {
AutoScalingGroupArn = "autoScalingGroupArn",
// the properties below are optional
ManagedDraining = "managedDraining",
ManagedScaling = new ManagedScalingProperty {
InstanceWarmupPeriod = 123,
MaximumScalingStepSize = 123,
MinimumScalingStepSize = 123,
Status = "status",
TargetCapacity = 123
},
ManagedTerminationProtection = "managedTerminationProtection"
},
// the properties below are optional
Name = "name",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnCapacityProvider(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnCapacityProvider(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnCapacityProvider(Construct, String, ICfnCapacityProviderProps) |
Properties
AutoScalingGroupProvider | The Auto Scaling group settings for the capacity provider. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Name | The name of the capacity provider. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | The metadata that you apply to the capacity provider to help you categorize and organize it. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnCapacityProvider(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnCapacityProvider(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnCapacityProvider(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnCapacityProvider(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnCapacityProvider(Construct, String, ICfnCapacityProviderProps)
public CfnCapacityProvider(Construct scope, string id, ICfnCapacityProviderProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnCapacityProviderProps
Resource properties.
Properties
AutoScalingGroupProvider
The Auto Scaling group settings for the capacity provider.
public virtual object AutoScalingGroupProvider { get; set; }
Property Value
System.Object
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Name
The name of the capacity provider.
public virtual string Name { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
The metadata that you apply to the capacity provider to help you categorize and organize it.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>