Class CfnCapacityProvider
A CloudFormation AWS::ECS::CapacityProvider
.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class CfnCapacityProvider : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnCapacityProvider
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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.
CloudformationResource: AWS::ECS::CapacityProvider
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html
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
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(Construct, String, ICfnCapacityProviderProps) | Create a new |
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 |
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 | 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(Construct, String, ICfnCapacityProviderProps)
Create a new AWS::ECS::CapacityProvider
.
public CfnCapacityProvider(Construct scope, string id, ICfnCapacityProviderProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnCapacityProviderProps
- resource properties.
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
Properties
AutoScalingGroupProvider
The Auto Scaling group settings for the capacity provider.
public virtual object AutoScalingGroupProvider { get; set; }
Property Value
System.Object
Remarks
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
Remarks
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.
Tags
The metadata that you apply to the capacity provider to help you categorize and organize it.
public virtual TagManager Tags { get; }
Property Value
Remarks
Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
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>