Interface ICfnCapacityProviderProps
Properties for defining a CfnCapacityProvider.
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnCapacityProviderProps
Syntax (vb)
Public Interface ICfnCapacityProviderProps
Remarks
See: 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 cfnCapacityProviderProps = 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"
},
ClusterName = "clusterName",
ManagedInstancesProvider = new ManagedInstancesProviderProperty {
InfrastructureRoleArn = "infrastructureRoleArn",
InstanceLaunchTemplate = new InstanceLaunchTemplateProperty {
Ec2InstanceProfileArn = "ec2InstanceProfileArn",
NetworkConfiguration = new ManagedInstancesNetworkConfigurationProperty {
SecurityGroups = new [] { "securityGroups" },
Subnets = new [] { "subnets" }
},
// the properties below are optional
CapacityOptionType = "capacityOptionType",
CapacityReservations = new CapacityReservationRequestProperty {
ReservationGroupArn = "reservationGroupArn",
ReservationPreference = "reservationPreference"
},
FipsEnabled = false,
InstanceRequirements = new InstanceRequirementsRequestProperty {
MemoryMiB = new MemoryMiBRequestProperty {
Min = 123,
// the properties below are optional
Max = 123
},
VCpuCount = new VCpuCountRangeRequestProperty {
Min = 123,
// the properties below are optional
Max = 123
},
// the properties below are optional
AcceleratorCount = new AcceleratorCountRequestProperty {
Max = 123,
Min = 123
},
AcceleratorManufacturers = new [] { "acceleratorManufacturers" },
AcceleratorNames = new [] { "acceleratorNames" },
AcceleratorTotalMemoryMiB = new AcceleratorTotalMemoryMiBRequestProperty {
Max = 123,
Min = 123
},
AcceleratorTypes = new [] { "acceleratorTypes" },
AllowedInstanceTypes = new [] { "allowedInstanceTypes" },
BareMetal = "bareMetal",
BaselineEbsBandwidthMbps = new BaselineEbsBandwidthMbpsRequestProperty {
Max = 123,
Min = 123
},
BurstablePerformance = "burstablePerformance",
CpuManufacturers = new [] { "cpuManufacturers" },
ExcludedInstanceTypes = new [] { "excludedInstanceTypes" },
InstanceGenerations = new [] { "instanceGenerations" },
LocalStorage = "localStorage",
LocalStorageTypes = new [] { "localStorageTypes" },
MaxSpotPriceAsPercentageOfOptimalOnDemandPrice = 123,
MemoryGiBPerVCpu = new MemoryGiBPerVCpuRequestProperty {
Max = 123,
Min = 123
},
NetworkBandwidthGbps = new NetworkBandwidthGbpsRequestProperty {
Max = 123,
Min = 123
},
NetworkInterfaceCount = new NetworkInterfaceCountRequestProperty {
Max = 123,
Min = 123
},
OnDemandMaxPricePercentageOverLowestPrice = 123,
RequireHibernateSupport = false,
SpotMaxPricePercentageOverLowestPrice = 123,
TotalLocalStorageGb = new TotalLocalStorageGBRequestProperty {
Max = 123,
Min = 123
}
},
Monitoring = "monitoring",
StorageConfiguration = new ManagedInstancesStorageConfigurationProperty {
StorageSizeGiB = 123
}
},
// the properties below are optional
InfrastructureOptimization = new InfrastructureOptimizationProperty {
ScaleInAfter = 123
},
PropagateTags = "propagateTags"
},
Name = "name",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Properties
| AutoScalingGroupProvider | The Auto Scaling group settings for the capacity provider. |
| ClusterName | The cluster that this capacity provider is associated with. |
| ManagedInstancesProvider | The configuration for the Amazon ECS Managed Instances provider. |
| Name | The name of the capacity provider. |
| Tags | The metadata that you apply to the capacity provider to help you categorize and organize it. |
Properties
AutoScalingGroupProvider
The Auto Scaling group settings for the capacity provider.
object? AutoScalingGroupProvider { get; }
Property Value
Remarks
ClusterName
The cluster that this capacity provider is associated with.
string? ClusterName { get; }
Property Value
Remarks
Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.
This is required for Managed instances.
ManagedInstancesProvider
The configuration for the Amazon ECS Managed Instances provider.
object? ManagedInstancesProvider { get; }
Property Value
Remarks
This includes the infrastructure role, the launch template configuration, and tag propagation settings.
Type union: either IResolvable or CfnCapacityProvider.IManagedInstancesProviderProperty
Name
The name of the capacity provider.
string? Name { get; }
Property Value
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.
ICfnTag[]? Tags { get; }
Property Value
ICfnTag[]
Remarks
Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
: .
- 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.