CapacityProvider
Provides an ECS cluster capacity provider. More information can be found on the ECS Developer Guide.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var test = new Aws.Ecs.CapacityProvider("test", new Aws.Ecs.CapacityProviderArgs
{
AutoScalingGroupProvider = new Aws.Ecs.Inputs.CapacityProviderAutoScalingGroupProviderArgs
{
AutoScalingGroupArn = aws_autoscaling_group.Test.Arn,
ManagedTerminationProtection = "ENABLED",
ManagedScaling = new Aws.Ecs.Inputs.CapacityProviderAutoScalingGroupProviderManagedScalingArgs
{
MaximumScalingStepSize = 1000,
MinimumScalingStepSize = 1,
Status = "ENABLED",
TargetCapacity = 10,
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewCapacityProvider(ctx, "test", &ecs.CapacityProviderArgs{
AutoScalingGroupProvider: &ecs.CapacityProviderAutoScalingGroupProviderArgs{
AutoScalingGroupArn: pulumi.String(aws_autoscaling_group.Test.Arn),
ManagedTerminationProtection: pulumi.String("ENABLED"),
ManagedScaling: &ecs.CapacityProviderAutoScalingGroupProviderManagedScalingArgs{
MaximumScalingStepSize: pulumi.Int(1000),
MinimumScalingStepSize: pulumi.Int(1),
Status: pulumi.String("ENABLED"),
TargetCapacity: pulumi.Int(10),
},
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
test = aws.ecs.CapacityProvider("test", auto_scaling_group_provider={
"autoScalingGroupArn": aws_autoscaling_group["test"]["arn"],
"managedTerminationProtection": "ENABLED",
"managedScaling": {
"maximumScalingStepSize": 1000,
"minimumScalingStepSize": 1,
"status": "ENABLED",
"target_capacity": 10,
},
})import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.ecs.CapacityProvider("test", {autoScalingGroupProvider: {
autoScalingGroupArn: aws_autoscaling_group.test.arn,
managedTerminationProtection: "ENABLED",
managedScaling: {
maximumScalingStepSize: 1000,
minimumScalingStepSize: 1,
status: "ENABLED",
targetCapacity: 10,
},
}});Create a CapacityProvider Resource
new CapacityProvider(name: string, args: CapacityProviderArgs, opts?: CustomResourceOptions);def CapacityProvider(resource_name, opts=None, auto_scaling_group_provider=None, name=None, tags=None, __props__=None);func NewCapacityProvider(ctx *Context, name string, args CapacityProviderArgs, opts ...ResourceOption) (*CapacityProvider, error)public CapacityProvider(string name, CapacityProviderArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args CapacityProviderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CapacityProviderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CapacityProviderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
CapacityProvider Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The CapacityProvider resource accepts the following input properties:
- Auto
Scaling CapacityGroup Provider Provider Auto Scaling Group Provider Args Nested argument defining the provider for the ECS auto scaling group. Defined below.
- Name string
The name of the capacity provider.
- Dictionary<string, string>
Key-value map of resource tags.
- Auto
Scaling CapacityGroup Provider Provider Auto Scaling Group Provider Nested argument defining the provider for the ECS auto scaling group. Defined below.
- Name string
The name of the capacity provider.
- map[string]string
Key-value map of resource tags.
- auto
Scaling CapacityGroup Provider Provider Auto Scaling Group Provider Nested argument defining the provider for the ECS auto scaling group. Defined below.
- name string
The name of the capacity provider.
- {[key: string]: string}
Key-value map of resource tags.
- auto_
scaling_ Dict[Capacitygroup_ provider Provider Auto Scaling Group Provider] Nested argument defining the provider for the ECS auto scaling group. Defined below.
- name str
The name of the capacity provider.
- Dict[str, str]
Key-value map of resource tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the CapacityProvider resource produces the following output properties:
Look up an Existing CapacityProvider Resource
Get an existing CapacityProvider resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CapacityProviderState, opts?: CustomResourceOptions): CapacityProviderstatic get(resource_name, id, opts=None, arn=None, auto_scaling_group_provider=None, name=None, tags=None, __props__=None);func GetCapacityProvider(ctx *Context, name string, id IDInput, state *CapacityProviderState, opts ...ResourceOption) (*CapacityProvider, error)public static CapacityProvider Get(string name, Input<string> id, CapacityProviderState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
The Amazon Resource Name (ARN) that identifies the capacity provider.
- Auto
Scaling CapacityGroup Provider Provider Auto Scaling Group Provider Args Nested argument defining the provider for the ECS auto scaling group. Defined below.
- Name string
The name of the capacity provider.
- Dictionary<string, string>
Key-value map of resource tags.
- Arn string
The Amazon Resource Name (ARN) that identifies the capacity provider.
- Auto
Scaling CapacityGroup Provider Provider Auto Scaling Group Provider Nested argument defining the provider for the ECS auto scaling group. Defined below.
- Name string
The name of the capacity provider.
- map[string]string
Key-value map of resource tags.
- arn string
The Amazon Resource Name (ARN) that identifies the capacity provider.
- auto
Scaling CapacityGroup Provider Provider Auto Scaling Group Provider Nested argument defining the provider for the ECS auto scaling group. Defined below.
- name string
The name of the capacity provider.
- {[key: string]: string}
Key-value map of resource tags.
- arn str
The Amazon Resource Name (ARN) that identifies the capacity provider.
- auto_
scaling_ Dict[Capacitygroup_ provider Provider Auto Scaling Group Provider] Nested argument defining the provider for the ECS auto scaling group. Defined below.
- name str
The name of the capacity provider.
- Dict[str, str]
Key-value map of resource tags.
Supporting Types
CapacityProviderAutoScalingGroupProvider
- Auto
Scaling stringGroup Arn - The Amazon Resource Name (ARN) of the associated auto scaling group.
- Managed
Scaling CapacityProvider Auto Scaling Group Provider Managed Scaling Args - Nested argument defining the parameters of the auto scaling. Defined below.
- Managed
Termination stringProtection - Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are
ENABLEDandDISABLED.
- Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are
- Auto
Scaling stringGroup Arn - The Amazon Resource Name (ARN) of the associated auto scaling group.
- Managed
Scaling CapacityProvider Auto Scaling Group Provider Managed Scaling - Nested argument defining the parameters of the auto scaling. Defined below.
- Managed
Termination stringProtection - Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are
ENABLEDandDISABLED.
- Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are
- auto
Scaling stringGroup Arn - The Amazon Resource Name (ARN) of the associated auto scaling group.
- managed
Scaling CapacityProvider Auto Scaling Group Provider Managed Scaling - Nested argument defining the parameters of the auto scaling. Defined below.
- managed
Termination stringProtection - Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are
ENABLEDandDISABLED.
- Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are
- auto
Scaling strGroup Arn - The Amazon Resource Name (ARN) of the associated auto scaling group.
- managed
Scaling Dict[CapacityProvider Auto Scaling Group Provider Managed Scaling] - Nested argument defining the parameters of the auto scaling. Defined below.
- managed
Termination strProtection - Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are
ENABLEDandDISABLED.
- Enables or disables container-aware termination of instances in the auto scaling group when scale-in happens. Valid values are
CapacityProviderAutoScalingGroupProviderManagedScaling
- Maximum
Scaling intStep Size The maximum step adjustment size. A number between 1 and 10,000.
- Minimum
Scaling intStep Size The minimum step adjustment size. A number between 1 and 10,000.
- Status string
Whether auto scaling is managed by ECS. Valid values are
ENABLEDandDISABLED.- Target
Capacity int The target utilization for the capacity provider. A number between 1 and 100.
- Maximum
Scaling intStep Size The maximum step adjustment size. A number between 1 and 10,000.
- Minimum
Scaling intStep Size The minimum step adjustment size. A number between 1 and 10,000.
- Status string
Whether auto scaling is managed by ECS. Valid values are
ENABLEDandDISABLED.- Target
Capacity int The target utilization for the capacity provider. A number between 1 and 100.
- maximum
Scaling numberStep Size The maximum step adjustment size. A number between 1 and 10,000.
- minimum
Scaling numberStep Size The minimum step adjustment size. A number between 1 and 10,000.
- status string
Whether auto scaling is managed by ECS. Valid values are
ENABLEDandDISABLED.- target
Capacity number The target utilization for the capacity provider. A number between 1 and 100.
- maximum
Scaling floatStep Size The maximum step adjustment size. A number between 1 and 10,000.
- minimum
Scaling floatStep Size The minimum step adjustment size. A number between 1 and 10,000.
- status str
Whether auto scaling is managed by ECS. Valid values are
ENABLEDandDISABLED.- target_
capacity float The target utilization for the capacity provider. A number between 1 and 100.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.