Module autoscaling
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
Functions
Others
- AttachmentArgs
- AttachmentState
- GetGroupArgs
- GetGroupResult
- GroupArgs
- GroupDesiredCapacityMetric
- GroupInServiceInstancesMetric
- GroupMaxSizeMetric
- GroupMinSizeMetric
- GroupPendingInstances
- GroupStandbyInstances
- GroupState
- GroupTerminatingInstances
- GroupTotalInstances
- InstanceLaunchErrorNotification
- InstanceLaunchNotification
- InstanceTerminateErrorNotification
- InstanceTerminateNotification
- LifecycleHookArgs
- LifecycleHookState
- Metric
- MetricsGranularity
- NotificationArgs
- NotificationState
- NotificationType
- OneMinuteMetricsGranularity
- PolicyArgs
- PolicyState
- ScheduleArgs
- ScheduleState
- TestNotification
Resources
Resource Attachment
class Attachment extends CustomResourceProvides an AutoScaling Attachment resource.
NOTE on AutoScaling Groups and ASG Attachments: This provider currently provides both a standalone ASG Attachment resource (describing an ASG attached to an ELB), and an AutoScaling Group resource with
loadBalancersdefined in-line. At this time you cannot use an ASG with in-line load balancers in conjunction with an ASG Attachment resource. Doing so will cause a conflict and will overwrite attachments.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create a new load balancer attachment
const asgAttachmentBar = new aws.autoscaling.Attachment("asg_attachment_bar", {
autoscalingGroupName: aws_autoscaling_group_asg.id,
elb: aws_elb_bar.id,
});constructor
new Attachment(name: string, args: AttachmentArgs, opts?: pulumi.CustomResourceOptions)Create a Attachment resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AttachmentState, opts?: pulumi.CustomResourceOptions): AttachmentGet an existing Attachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AttachmentReturns true if the given object is an instance of Attachment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property albTargetGroupArn
public albTargetGroupArn: pulumi.Output<string | undefined>;The ARN of an ALB Target Group.
property autoscalingGroupName
public autoscalingGroupName: pulumi.Output<string>;Name of ASG to associate with the ELB.
property elb
public elb: pulumi.Output<string | undefined>;The name of the ELB.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Group
class Group extends CustomResourceProvides an AutoScaling Group resource.
Note: You must specify either
launchConfiguration,launchTemplate, ormixedInstancesPolicy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.ec2.PlacementGroup("test", {
strategy: "cluster",
});
const bar = new aws.autoscaling.Group("bar", {
desiredCapacity: 4,
forceDelete: true,
healthCheckGracePeriod: 300,
healthCheckType: "ELB",
initialLifecycleHooks: [{
defaultResult: "CONTINUE",
heartbeatTimeout: 2000,
lifecycleTransition: "autoscaling:EC2_INSTANCE_LAUNCHING",
name: "foobar",
notificationMetadata: `{
"foo": "bar"
}
`,
notificationTargetArn: "arn:aws:sqs:us-east-1:444455556666:queue1*",
roleArn: "arn:aws:iam::123456789012:role/S3Access",
}],
launchConfiguration: aws_launch_configuration_foobar.name,
maxSize: 5,
minSize: 2,
placementGroup: test.id,
tags: [
{
key: "foo",
propagateAtLaunch: true,
value: "bar",
},
{
key: "lorem",
propagateAtLaunch: false,
value: "ipsum",
},
],
vpcZoneIdentifiers: [
aws_subnet_example1.id,
aws_subnet_example2.id,
],
}, { timeouts: {
delete: "15m",
} });With Latest Version Of Launch Template
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foobar = new aws.ec2.LaunchTemplate("foobar", {
imageId: "ami-1a2b3c",
instanceType: "t2.micro",
namePrefix: "foobar",
});
const bar = new aws.autoscaling.Group("bar", {
availabilityZones: ["us-east-1a"],
desiredCapacity: 1,
launchTemplate: {
id: foobar.id,
version: "$Latest",
},
maxSize: 1,
minSize: 1,
});Mixed Instances Policy
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleLaunchTemplate = new aws.ec2.LaunchTemplate("example", {
imageId: aws_ami_example.id,
instanceType: "c5.large",
namePrefix: "example",
});
const exampleGroup = new aws.autoscaling.Group("example", {
availabilityZones: ["us-east-1a"],
desiredCapacity: 1,
maxSize: 1,
minSize: 1,
mixedInstancesPolicy: {
launchTemplate: {
launchTemplateSpecification: {
launchTemplateId: exampleLaunchTemplate.id,
},
overrides: [
{
instanceType: "c4.large",
weightedCapacity: "3",
},
{
instanceType: "c3.large",
weightedCapacity: "2",
},
],
},
},
});Interpolated tags
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const extraTags = config.get("extraTags") || [
{
key: "Foo",
propagateAtLaunch: true,
value: "Bar",
},
{
key: "Baz",
propagateAtLaunch: true,
value: "Bam",
},
];
const bar = new aws.autoscaling.Group("bar", {
launchConfiguration: aws_launch_configuration_foobar.name,
maxSize: 5,
minSize: 2,
tagsCollection: [{"key": "interpolation1", "value": "value3", "propagate_at_launch": true}, {"key": "interpolation2", "value": "value4", "propagate_at_launch": true}].concat(extraTags),
vpcZoneIdentifiers: [
aws_subnet_example1.id,
aws_subnet_example2.id,
],
});Waiting for Capacity
A newly-created ASG is initially empty and begins to scale to minSize (or
desiredCapacity, if specified) by launching instances using the provided
Launch Configuration. These instances take time to launch and boot.
On ASG Update, changes to these values also take time to result in the target number of instances providing service.
This provider provides two mechanisms to help consistently manage ASG scale up time across dependent resources.
Waiting for ASG Capacity
The first is default behavior. This provider waits after ASG creation for
minSize (or desiredCapacity, if specified) healthy instances to show up
in the ASG before continuing.
If minSize or desiredCapacity are changed in a subsequent update,
this provider will also wait for the correct number of healthy instances before
continuing.
This provider considers an instance “healthy” when the ASG reports HealthStatus:
"Healthy" and LifecycleState: "InService". See the AWS AutoScaling
Docs
for more information on an ASG’s lifecycle.
This provider will wait for healthy instances for up to
waitForCapacityTimeout. If ASG creation is taking more than a few minutes,
it’s worth investigating for scaling activity errors, which can be caused by
problems with the selected Launch Configuration.
Setting waitForCapacityTimeout to "0" disables ASG Capacity waiting.
Waiting for ELB Capacity
The second mechanism is optional, and affects ASGs with attached ELBs specified
via the loadBalancers attribute or with ALBs specified with targetGroupArns.
The minElbCapacity parameter causes this provider to wait for at least the
requested number of instances to show up "InService" in all attached ELBs
during ASG creation. It has no effect on ASG updates.
If waitForElbCapacity is set, this provider will wait for exactly that number
of Instances to be "InService" in all attached ELBs on both creation and
updates.
These parameters can be used to ensure that service is being provided before this provider moves on. If new instances don’t pass the ELB’s health checks for any reason, the deployment will time out, and the ASG will be marked as tainted (i.e. marked to be destroyed in a follow up run).
As with ASG Capacity, this provider will wait for up to waitForCapacityTimeout
for the proper number of instances to be healthy.
Troubleshooting Capacity Waiting Timeouts
If ASG creation takes more than a few minutes, this could indicate one of a number of configuration problems. See the AWS Docs on Load Balancer Troubleshooting for more information.
constructor
new Group(name: string, args: GroupArgs, opts?: pulumi.CustomResourceOptions)Create a Group resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GroupState, opts?: pulumi.CustomResourceOptions): GroupGet an existing Group resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is GroupReturns true if the given object is an instance of Group. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN for this AutoScaling Group
property availabilityZones
public availabilityZones: pulumi.Output<string[]>;A list of one or more availability zones for the group. This parameter should not be specified when using vpcZoneIdentifier.
property defaultCooldown
public defaultCooldown: pulumi.Output<number>;The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
property desiredCapacity
public desiredCapacity: pulumi.Output<number>;The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
property enabledMetrics
public enabledMetrics: pulumi.Output<Metric[] | undefined>;A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.
property forceDelete
public forceDelete: pulumi.Output<boolean | undefined>;Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling group to delete even if it’s in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
property healthCheckGracePeriod
public healthCheckGracePeriod: pulumi.Output<number | undefined>;Time (in seconds) after instance comes into service before checking health.
property healthCheckType
public healthCheckType: pulumi.Output<string>;“EC2” or “ELB”. Controls how health checking is done.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property initialLifecycleHooks
public initialLifecycleHooks: pulumi.Output<GroupInitialLifecycleHook[] | undefined>;One or more
Lifecycle Hooks
to attach to the autoscaling group before instances are launched. The
syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without the autoscalingGroupName attribute. Please note that this will only work when creating
a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.
property launchConfiguration
public launchConfiguration: pulumi.Output<string | undefined>;The name of the launch configuration to use.
property launchTemplate
public launchTemplate: pulumi.Output<GroupLaunchTemplate | undefined>;Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
property loadBalancers
public loadBalancers: pulumi.Output<string[]>;A list of elastic load balancer names to add to the autoscaling
group names. Only valid for classic load balancers. For ALBs, use targetGroupArns instead.
property maxInstanceLifetime
public maxInstanceLifetime: pulumi.Output<number | undefined>;The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.
property maxSize
public maxSize: pulumi.Output<number>;The maximum size of the auto scale group.
property metricsGranularity
public metricsGranularity: pulumi.Output<string | undefined>;The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.
property minElbCapacity
public minElbCapacity: pulumi.Output<number | undefined>;Setting this causes this provider to wait for this number of instances from this autoscaling group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
property minSize
public minSize: pulumi.Output<number>;The minimum size of the auto scale group. (See also Waiting for Capacity below.)
property mixedInstancesPolicy
public mixedInstancesPolicy: pulumi.Output<GroupMixedInstancesPolicy | undefined>;Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.
property name
public name: pulumi.Output<string>;The name of the auto scaling group. By default generated by this provider.
property namePrefix
public namePrefix: pulumi.Output<string | undefined>;Creates a unique name beginning with the specified
prefix. Conflicts with name.
property placementGroup
public placementGroup: pulumi.Output<string | undefined>;The name of the placement group into which you’ll launch your instances, if any.
property protectFromScaleIn
public protectFromScaleIn: pulumi.Output<boolean | undefined>;Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
property serviceLinkedRoleArn
public serviceLinkedRoleArn: pulumi.Output<string>;The ARN of the service-linked role that the ASG will use to call other AWS services
property suspendedProcesses
public suspendedProcesses: pulumi.Output<string[] | undefined>;A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer.
Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.
property tags
public tags: pulumi.Output<GroupTag[] | undefined>;Configuration block(s) containing resource tags. Conflicts with tags. Documented below.
property tagsCollection
public tagsCollection: pulumi.Output<{[key: string]: any}[] | undefined>;Set of maps containing resource tags. Conflicts with tag. Documented below.
property targetGroupArns
public targetGroupArns: pulumi.Output<string[]>;A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.
property terminationPolicies
public terminationPolicies: pulumi.Output<string[] | undefined>;A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property vpcZoneIdentifiers
public vpcZoneIdentifiers: pulumi.Output<string[]>;A list of subnet IDs to launch resources in.
property waitForCapacityTimeout
public waitForCapacityTimeout: pulumi.Output<string | undefined>;A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.
property waitForElbCapacity
public waitForElbCapacity: pulumi.Output<number | undefined>;Setting this will cause this provider to wait
for exactly this number of healthy instances from this autoscaling group in
all attached load balancers on both create and update operations. (Takes
precedence over minElbCapacity behavior.)
(See also Waiting for Capacity below.)
Resource LifecycleHook
class LifecycleHook extends CustomResourceProvides an AutoScaling Lifecycle Hook resource.
NOTE: This provider has two types of ways you can add lifecycle hooks - via the
initialLifecycleHookattribute from theaws.autoscaling.Groupresource, or via this one. Hooks added via this resource will not be added until the autoscaling group has been created, and depending on yourcapacitysettings, after the initial instances have been launched, creating unintended behavior. If you need hooks to run on all instances, add them withinitialLifecycleHookinaws.autoscaling.Group, but take care to not duplicate those hooks with this resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foobarGroup = new aws.autoscaling.Group("foobar", {
availabilityZones: ["us-west-2a"],
healthCheckType: "EC2",
tags: [{
key: "Foo",
propagateAtLaunch: true,
value: "foo-bar",
}],
terminationPolicies: ["OldestInstance"],
});
const foobarLifecycleHook = new aws.autoscaling.LifecycleHook("foobar", {
autoscalingGroupName: foobarGroup.name,
defaultResult: "CONTINUE",
heartbeatTimeout: 2000,
lifecycleTransition: "autoscaling:EC2_INSTANCE_LAUNCHING",
notificationMetadata: `{
"foo": "bar"
}
`,
notificationTargetArn: "arn:aws:sqs:us-east-1:444455556666:queue1*",
roleArn: "arn:aws:iam::123456789012:role/S3Access",
});constructor
new LifecycleHook(name: string, args: LifecycleHookArgs, opts?: pulumi.CustomResourceOptions)Create a LifecycleHook resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LifecycleHookState, opts?: pulumi.CustomResourceOptions): LifecycleHookGet an existing LifecycleHook resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is LifecycleHookReturns true if the given object is an instance of LifecycleHook. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property autoscalingGroupName
public autoscalingGroupName: pulumi.Output<string>;The name of the Auto Scaling group to which you want to assign the lifecycle hook
property defaultResult
public defaultResult: pulumi.Output<string>;Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.
property heartbeatTimeout
public heartbeatTimeout: pulumi.Output<number | undefined>;Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. When the lifecycle hook times out, Auto Scaling performs the action defined in the DefaultResult parameter
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property lifecycleTransition
public lifecycleTransition: pulumi.Output<string>;The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types
property name
public name: pulumi.Output<string>;The name of the lifecycle hook.
property notificationMetadata
public notificationMetadata: pulumi.Output<string | undefined>;Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.
property notificationTargetArn
public notificationTargetArn: pulumi.Output<string | undefined>;The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.
property roleArn
public roleArn: pulumi.Output<string | undefined>;The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Notification
class Notification extends CustomResourceProvides an AutoScaling Group with Notification support, via SNS Topics. Each of
the notifications map to a Notification Configuration inside Amazon Web
Services, and are applied to each AutoScaling Group you supply.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.sns.Topic("example", {});
const bar = new aws.autoscaling.Group("bar", {});
const foo = new aws.autoscaling.Group("foo", {});
const exampleNotifications = new aws.autoscaling.Notification("example_notifications", {
groupNames: [
bar.name,
foo.name,
],
notifications: [
"autoscaling:EC2_INSTANCE_LAUNCH",
"autoscaling:EC2_INSTANCE_TERMINATE",
"autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
"autoscaling:EC2_INSTANCE_TERMINATE_ERROR",
],
topicArn: example.arn,
});constructor
new Notification(name: string, args: NotificationArgs, opts?: pulumi.CustomResourceOptions)Create a Notification resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NotificationState, opts?: pulumi.CustomResourceOptions): NotificationGet an existing Notification resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is NotificationReturns true if the given object is an instance of Notification. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property groupNames
public groupNames: pulumi.Output<string[]>;A list of AutoScaling Group Names
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property notifications
public notifications: pulumi.Output<NotificationType[]>;A list of Notification Types that trigger notifications. Acceptable values are documented in the AWS documentation here
property topicArn
public topicArn: pulumi.Output<string>;The Topic ARN for notifications to be sent through
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Policy
class Policy extends CustomResourceProvides an AutoScaling Scaling Policy resource.
NOTE: You may want to omit
desiredCapacityattribute from attachedaws.autoscaling.Groupwhen using autoscaling policies. It’s good practice to pick either manual or dynamic (policy-based) scaling.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const bar = new aws.autoscaling.Group("bar", {
availabilityZones: ["us-east-1a"],
forceDelete: true,
healthCheckGracePeriod: 300,
healthCheckType: "ELB",
launchConfiguration: aws_launch_configuration_foo.name,
maxSize: 5,
minSize: 2,
});
const bat = new aws.autoscaling.Policy("bat", {
adjustmentType: "ChangeInCapacity",
autoscalingGroupName: bar.name,
cooldown: 300,
scalingAdjustment: 4,
});constructor
new Policy(name: string, args: PolicyArgs, opts?: pulumi.CustomResourceOptions)Create a Policy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PolicyState, opts?: pulumi.CustomResourceOptions): PolicyGet an existing Policy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is PolicyReturns true if the given object is an instance of Policy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property adjustmentType
public adjustmentType: pulumi.Output<string | undefined>;Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
property arn
public arn: pulumi.Output<string>;The ARN assigned by AWS to the scaling policy.
property autoscalingGroupName
public autoscalingGroupName: pulumi.Output<string>;The name of the autoscaling group.
property cooldown
public cooldown: pulumi.Output<number | undefined>;The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
property estimatedInstanceWarmup
public estimatedInstanceWarmup: pulumi.Output<number | undefined>;The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property metricAggregationType
public metricAggregationType: pulumi.Output<string>;The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
property minAdjustmentMagnitude
public minAdjustmentMagnitude: pulumi.Output<number | undefined>;property name
public name: pulumi.Output<string>;The name of the dimension.
property policyType
public policyType: pulumi.Output<string | undefined>;The policy type, either “SimpleScaling”, “StepScaling” or “TargetTrackingScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
property scalingAdjustment
public scalingAdjustment: pulumi.Output<number | undefined>;The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
property stepAdjustments
public stepAdjustments: pulumi.Output<PolicyStepAdjustment[] | undefined>;A set of adjustments that manage group scaling. These have the following structure:
property targetTrackingConfiguration
public targetTrackingConfiguration: pulumi.Output<PolicyTargetTrackingConfiguration | undefined>;A target tracking policy. These have the following structure:
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Schedule
class Schedule extends CustomResourceProvides an AutoScaling Schedule resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foobarGroup = new aws.autoscaling.Group("foobar", {
availabilityZones: ["us-west-2a"],
forceDelete: true,
healthCheckGracePeriod: 300,
healthCheckType: "ELB",
maxSize: 1,
minSize: 1,
terminationPolicies: ["OldestInstance"],
});
const foobarSchedule = new aws.autoscaling.Schedule("foobar", {
autoscalingGroupName: foobarGroup.name,
desiredCapacity: 0,
endTime: "2016-12-12T06:00:00Z",
maxSize: 1,
minSize: 0,
scheduledActionName: "foobar",
startTime: "2016-12-11T18:00:00Z",
});constructor
new Schedule(name: string, args: ScheduleArgs, opts?: pulumi.CustomResourceOptions)Create a Schedule resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ScheduleState, opts?: pulumi.CustomResourceOptions): ScheduleGet an existing Schedule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ScheduleReturns true if the given object is an instance of Schedule. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN assigned by AWS to the autoscaling schedule.
property autoscalingGroupName
public autoscalingGroupName: pulumi.Output<string>;The name or Amazon Resource Name (ARN) of the Auto Scaling group.
property desiredCapacity
public desiredCapacity: pulumi.Output<number>;The number of EC2 instances that should be running in the group. Default 0. Set to -1 if you don’t want to change the desired capacity at the scheduled time.
property endTime
public endTime: pulumi.Output<string>;The time for this action to end, in “YYYY-MM-DDThh:mm:ssZ” format in UTC/GMT only (for example, 2014-06-01T00:00:00Z ). If you try to schedule your action in the past, Auto Scaling returns an error message.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property maxSize
public maxSize: pulumi.Output<number>;The maximum size for the Auto Scaling group. Default 0. Set to -1 if you don’t want to change the maximum size at the scheduled time.
property minSize
public minSize: pulumi.Output<number>;The minimum size for the Auto Scaling group. Default 0. Set to -1 if you don’t want to change the minimum size at the scheduled time.
property recurrence
public recurrence: pulumi.Output<string>;The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format.
property scheduledActionName
public scheduledActionName: pulumi.Output<string>;The name of this scaling action.
property startTime
public startTime: pulumi.Output<string>;The time for this action to start, in “YYYY-MM-DDThh:mm:ssZ” format in UTC/GMT only (for example, 2014-06-01T00:00:00Z ). If you try to schedule your action in the past, Auto Scaling returns an error message.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getGroup
getGroup(args: GetGroupArgs, opts?: pulumi.InvokeOptions): Promise<GetGroupResult>Use this data source to get information on an existing autoscaling group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foo = pulumi.output(aws.autoscaling.getGroup({
name: "foo",
}, { async: true }));Others
interface AttachmentArgs
interface AttachmentArgsThe set of arguments for constructing a Attachment resource.
property albTargetGroupArn
albTargetGroupArn?: pulumi.Input<string>;The ARN of an ALB Target Group.
property autoscalingGroupName
autoscalingGroupName: pulumi.Input<string>;Name of ASG to associate with the ELB.
property elb
elb?: pulumi.Input<string>;The name of the ELB.
interface AttachmentState
interface AttachmentStateInput properties used for looking up and filtering Attachment resources.
property albTargetGroupArn
albTargetGroupArn?: pulumi.Input<string>;The ARN of an ALB Target Group.
property autoscalingGroupName
autoscalingGroupName?: pulumi.Input<string>;Name of ASG to associate with the ELB.
property elb
elb?: pulumi.Input<string>;The name of the ELB.
interface GetGroupArgs
interface GetGroupArgsA collection of arguments for invoking getGroup.
property name
name: string;Specify the exact name of the desired autoscaling group.
interface GetGroupResult
interface GetGroupResultA collection of values returned by getGroup.
property arn
arn: string;The Amazon Resource Name (ARN) of the Auto Scaling group.
property availabilityZones
availabilityZones: string[];One or more Availability Zones for the group.
property defaultCooldown
defaultCooldown: number;property desiredCapacity
desiredCapacity: number;The desired size of the group.
property healthCheckGracePeriod
healthCheckGracePeriod: number;The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service.
property healthCheckType
healthCheckType: string;The service to use for the health checks. The valid values are EC2 and ELB.
property id
id: string;The provider-assigned unique ID for this managed resource.
property launchConfiguration
launchConfiguration: string;The name of the associated launch configuration.
property loadBalancers
loadBalancers: string[];One or more load balancers associated with the group.
property maxSize
maxSize: number;The maximum size of the group.
property minSize
minSize: number;The minimum size of the group.
property name
name: string;The name of the Auto Scaling group.
property newInstancesProtectedFromScaleIn
newInstancesProtectedFromScaleIn: boolean;property placementGroup
placementGroup: string;The name of the placement group into which to launch your instances, if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in the Amazon Elastic Compute Cloud User Guide.
property serviceLinkedRoleArn
serviceLinkedRoleArn: string;The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS services on your behalf.
property status
status: string;The current state of the group when DeleteAutoScalingGroup is in progress.
property targetGroupArns
targetGroupArns: string[];The Amazon Resource Names (ARN) of the target groups for your load balancer.
property terminationPolicies
terminationPolicies: string[];The termination policies for the group.
property vpcZoneIdentifier
vpcZoneIdentifier: string;VPC ID for the group.
interface GroupArgs
interface GroupArgsThe set of arguments for constructing a Group resource.
property availabilityZones
availabilityZones?: pulumi.Input<pulumi.Input<string>[]>;A list of one or more availability zones for the group. This parameter should not be specified when using vpcZoneIdentifier.
property defaultCooldown
defaultCooldown?: pulumi.Input<number>;The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
property desiredCapacity
desiredCapacity?: pulumi.Input<number>;The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
property enabledMetrics
enabledMetrics?: pulumi.Input<pulumi.Input<Metric>[]>;A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.
property forceDelete
forceDelete?: pulumi.Input<boolean>;Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling group to delete even if it’s in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
property healthCheckGracePeriod
healthCheckGracePeriod?: pulumi.Input<number>;Time (in seconds) after instance comes into service before checking health.
property healthCheckType
healthCheckType?: pulumi.Input<string>;“EC2” or “ELB”. Controls how health checking is done.
property initialLifecycleHooks
initialLifecycleHooks?: pulumi.Input<pulumi.Input<GroupInitialLifecycleHook>[]>;One or more
Lifecycle Hooks
to attach to the autoscaling group before instances are launched. The
syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without the autoscalingGroupName attribute. Please note that this will only work when creating
a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.
property launchConfiguration
launchConfiguration?: pulumi.Input<string | LaunchConfiguration>;The name of the launch configuration to use.
property launchTemplate
launchTemplate?: pulumi.Input<GroupLaunchTemplate>;Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
property loadBalancers
loadBalancers?: pulumi.Input<pulumi.Input<string>[]>;A list of elastic load balancer names to add to the autoscaling
group names. Only valid for classic load balancers. For ALBs, use targetGroupArns instead.
property maxInstanceLifetime
maxInstanceLifetime?: pulumi.Input<number>;The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.
property maxSize
maxSize: pulumi.Input<number>;The maximum size of the auto scale group.
property metricsGranularity
metricsGranularity?: pulumi.Input<string | MetricsGranularity>;The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.
property minElbCapacity
minElbCapacity?: pulumi.Input<number>;Setting this causes this provider to wait for this number of instances from this autoscaling group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
property minSize
minSize: pulumi.Input<number>;The minimum size of the auto scale group. (See also Waiting for Capacity below.)
property mixedInstancesPolicy
mixedInstancesPolicy?: pulumi.Input<GroupMixedInstancesPolicy>;Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.
property name
name?: pulumi.Input<string>;The name of the auto scaling group. By default generated by this provider.
property namePrefix
namePrefix?: pulumi.Input<string>;Creates a unique name beginning with the specified
prefix. Conflicts with name.
property placementGroup
placementGroup?: pulumi.Input<string | PlacementGroup>;The name of the placement group into which you’ll launch your instances, if any.
property protectFromScaleIn
protectFromScaleIn?: pulumi.Input<boolean>;Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
property serviceLinkedRoleArn
serviceLinkedRoleArn?: pulumi.Input<string>;The ARN of the service-linked role that the ASG will use to call other AWS services
property suspendedProcesses
suspendedProcesses?: pulumi.Input<pulumi.Input<string>[]>;A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer.
Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.
property tags
tags?: pulumi.Input<pulumi.Input<GroupTag>[]>;Configuration block(s) containing resource tags. Conflicts with tags. Documented below.
property tagsCollection
tagsCollection?: pulumi.Input<pulumi.Input<{[key: string]: any}>[]>;Set of maps containing resource tags. Conflicts with tag. Documented below.
property targetGroupArns
targetGroupArns?: pulumi.Input<pulumi.Input<string>[]>;A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.
property terminationPolicies
terminationPolicies?: pulumi.Input<pulumi.Input<string>[]>;A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.
property vpcZoneIdentifiers
vpcZoneIdentifiers?: pulumi.Input<pulumi.Input<string>[]>;A list of subnet IDs to launch resources in.
property waitForCapacityTimeout
waitForCapacityTimeout?: pulumi.Input<string>;A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.
property waitForElbCapacity
waitForElbCapacity?: pulumi.Input<number>;Setting this will cause this provider to wait
for exactly this number of healthy instances from this autoscaling group in
all attached load balancers on both create and update operations. (Takes
precedence over minElbCapacity behavior.)
(See also Waiting for Capacity below.)
let GroupDesiredCapacityMetric
let GroupDesiredCapacityMetric: Metric = "GroupDesiredCapacity";let GroupInServiceInstancesMetric
let GroupInServiceInstancesMetric: Metric = "GroupInServiceInstances";let GroupMaxSizeMetric
let GroupMaxSizeMetric: Metric = "GroupMaxSize";let GroupMinSizeMetric
let GroupMinSizeMetric: Metric = "GroupMinSize";let GroupPendingInstances
let GroupPendingInstances: Metric = "GroupPendingInstances";let GroupStandbyInstances
let GroupStandbyInstances: Metric = "GroupStandbyInstances";interface GroupState
interface GroupStateInput properties used for looking up and filtering Group resources.
property arn
arn?: pulumi.Input<string>;The ARN for this AutoScaling Group
property availabilityZones
availabilityZones?: pulumi.Input<pulumi.Input<string>[]>;A list of one or more availability zones for the group. This parameter should not be specified when using vpcZoneIdentifier.
property defaultCooldown
defaultCooldown?: pulumi.Input<number>;The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
property desiredCapacity
desiredCapacity?: pulumi.Input<number>;The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
property enabledMetrics
enabledMetrics?: pulumi.Input<pulumi.Input<Metric>[]>;A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.
property forceDelete
forceDelete?: pulumi.Input<boolean>;Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling group to delete even if it’s in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
property healthCheckGracePeriod
healthCheckGracePeriod?: pulumi.Input<number>;Time (in seconds) after instance comes into service before checking health.
property healthCheckType
healthCheckType?: pulumi.Input<string>;“EC2” or “ELB”. Controls how health checking is done.
property initialLifecycleHooks
initialLifecycleHooks?: pulumi.Input<pulumi.Input<GroupInitialLifecycleHook>[]>;One or more
Lifecycle Hooks
to attach to the autoscaling group before instances are launched. The
syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without the autoscalingGroupName attribute. Please note that this will only work when creating
a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.
property launchConfiguration
launchConfiguration?: pulumi.Input<string | LaunchConfiguration>;The name of the launch configuration to use.
property launchTemplate
launchTemplate?: pulumi.Input<GroupLaunchTemplate>;Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
property loadBalancers
loadBalancers?: pulumi.Input<pulumi.Input<string>[]>;A list of elastic load balancer names to add to the autoscaling
group names. Only valid for classic load balancers. For ALBs, use targetGroupArns instead.
property maxInstanceLifetime
maxInstanceLifetime?: pulumi.Input<number>;The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.
property maxSize
maxSize?: pulumi.Input<number>;The maximum size of the auto scale group.
property metricsGranularity
metricsGranularity?: pulumi.Input<string | MetricsGranularity>;The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.
property minElbCapacity
minElbCapacity?: pulumi.Input<number>;Setting this causes this provider to wait for this number of instances from this autoscaling group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
property minSize
minSize?: pulumi.Input<number>;The minimum size of the auto scale group. (See also Waiting for Capacity below.)
property mixedInstancesPolicy
mixedInstancesPolicy?: pulumi.Input<GroupMixedInstancesPolicy>;Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.
property name
name?: pulumi.Input<string>;The name of the auto scaling group. By default generated by this provider.
property namePrefix
namePrefix?: pulumi.Input<string>;Creates a unique name beginning with the specified
prefix. Conflicts with name.
property placementGroup
placementGroup?: pulumi.Input<string | PlacementGroup>;The name of the placement group into which you’ll launch your instances, if any.
property protectFromScaleIn
protectFromScaleIn?: pulumi.Input<boolean>;Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
property serviceLinkedRoleArn
serviceLinkedRoleArn?: pulumi.Input<string>;The ARN of the service-linked role that the ASG will use to call other AWS services
property suspendedProcesses
suspendedProcesses?: pulumi.Input<pulumi.Input<string>[]>;A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer.
Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.
property tags
tags?: pulumi.Input<pulumi.Input<GroupTag>[]>;Configuration block(s) containing resource tags. Conflicts with tags. Documented below.
property tagsCollection
tagsCollection?: pulumi.Input<pulumi.Input<{[key: string]: any}>[]>;Set of maps containing resource tags. Conflicts with tag. Documented below.
property targetGroupArns
targetGroupArns?: pulumi.Input<pulumi.Input<string>[]>;A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.
property terminationPolicies
terminationPolicies?: pulumi.Input<pulumi.Input<string>[]>;A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.
property vpcZoneIdentifiers
vpcZoneIdentifiers?: pulumi.Input<pulumi.Input<string>[]>;A list of subnet IDs to launch resources in.
property waitForCapacityTimeout
waitForCapacityTimeout?: pulumi.Input<string>;A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.
property waitForElbCapacity
waitForElbCapacity?: pulumi.Input<number>;Setting this will cause this provider to wait
for exactly this number of healthy instances from this autoscaling group in
all attached load balancers on both create and update operations. (Takes
precedence over minElbCapacity behavior.)
(See also Waiting for Capacity below.)
let GroupTerminatingInstances
let GroupTerminatingInstances: Metric = "GroupTerminatingInstances";let GroupTotalInstances
let GroupTotalInstances: Metric = "GroupTotalInstances";let InstanceLaunchErrorNotification
let InstanceLaunchErrorNotification: NotificationType = "autoscaling:EC2_INSTANCE_LAUNCH_ERROR";let InstanceLaunchNotification
let InstanceLaunchNotification: NotificationType = "autoscaling:EC2_INSTANCE_LAUNCH";let InstanceTerminateErrorNotification
let InstanceTerminateErrorNotification: NotificationType = "autoscaling:EC2_INSTANCE_TERMINATE_ERROR";let InstanceTerminateNotification
let InstanceTerminateNotification: NotificationType = "autoscaling:EC2_INSTANCE_TERMINATE";interface LifecycleHookArgs
interface LifecycleHookArgsThe set of arguments for constructing a LifecycleHook resource.
property autoscalingGroupName
autoscalingGroupName: pulumi.Input<string>;The name of the Auto Scaling group to which you want to assign the lifecycle hook
property defaultResult
defaultResult?: pulumi.Input<string>;Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.
property heartbeatTimeout
heartbeatTimeout?: pulumi.Input<number>;Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. When the lifecycle hook times out, Auto Scaling performs the action defined in the DefaultResult parameter
property lifecycleTransition
lifecycleTransition: pulumi.Input<string>;The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types
property name
name?: pulumi.Input<string>;The name of the lifecycle hook.
property notificationMetadata
notificationMetadata?: pulumi.Input<string>;Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.
property notificationTargetArn
notificationTargetArn?: pulumi.Input<string>;The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.
property roleArn
roleArn?: pulumi.Input<string>;The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.
interface LifecycleHookState
interface LifecycleHookStateInput properties used for looking up and filtering LifecycleHook resources.
property autoscalingGroupName
autoscalingGroupName?: pulumi.Input<string>;The name of the Auto Scaling group to which you want to assign the lifecycle hook
property defaultResult
defaultResult?: pulumi.Input<string>;Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The value for this parameter can be either CONTINUE or ABANDON. The default value for this parameter is ABANDON.
property heartbeatTimeout
heartbeatTimeout?: pulumi.Input<number>;Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. When the lifecycle hook times out, Auto Scaling performs the action defined in the DefaultResult parameter
property lifecycleTransition
lifecycleTransition?: pulumi.Input<string>;The instance state to which you want to attach the lifecycle hook. For a list of lifecycle hook types, see describe-lifecycle-hook-types
property name
name?: pulumi.Input<string>;The name of the lifecycle hook.
property notificationMetadata
notificationMetadata?: pulumi.Input<string>;Contains additional information that you want to include any time Auto Scaling sends a message to the notification target.
property notificationTargetArn
notificationTargetArn?: pulumi.Input<string>;The ARN of the notification target that Auto Scaling will use to notify you when an instance is in the transition state for the lifecycle hook. This ARN target can be either an SQS queue or an SNS topic.
property roleArn
roleArn?: pulumi.Input<string>;The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.
type Metric
type Metric = "GroupMinSize" | "GroupMaxSize" | "GroupDesiredCapacity" | "GroupInServiceInstances" | "GroupPendingInstances" | "GroupStandbyInstances" | "GroupTerminatingInstances" | "GroupTotalInstances";type MetricsGranularity
type MetricsGranularity = "1Minute";interface NotificationArgs
interface NotificationArgsThe set of arguments for constructing a Notification resource.
property groupNames
groupNames: pulumi.Input<pulumi.Input<string>[]>;A list of AutoScaling Group Names
property notifications
notifications: pulumi.Input<pulumi.Input<NotificationType>[]>;A list of Notification Types that trigger notifications. Acceptable values are documented in the AWS documentation here
property topicArn
topicArn: pulumi.Input<string>;The Topic ARN for notifications to be sent through
interface NotificationState
interface NotificationStateInput properties used for looking up and filtering Notification resources.
property groupNames
groupNames?: pulumi.Input<pulumi.Input<string>[]>;A list of AutoScaling Group Names
property notifications
notifications?: pulumi.Input<pulumi.Input<NotificationType>[]>;A list of Notification Types that trigger notifications. Acceptable values are documented in the AWS documentation here
property topicArn
topicArn?: pulumi.Input<string>;The Topic ARN for notifications to be sent through
type NotificationType
type NotificationType = "autoscaling:EC2_INSTANCE_LAUNCH" | "autoscaling:EC2_INSTANCE_TERMINATE" | "autoscaling:EC2_INSTANCE_LAUNCH_ERROR" | "autoscaling:EC2_INSTANCE_TERMINATE_ERROR" | "autoscaling:TEST_NOTIFICATION";let OneMinuteMetricsGranularity
let OneMinuteMetricsGranularity: MetricsGranularity = "1Minute";interface PolicyArgs
interface PolicyArgsThe set of arguments for constructing a Policy resource.
property adjustmentType
adjustmentType?: pulumi.Input<string>;Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
property autoscalingGroupName
autoscalingGroupName: pulumi.Input<string>;The name of the autoscaling group.
property cooldown
cooldown?: pulumi.Input<number>;The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
property estimatedInstanceWarmup
estimatedInstanceWarmup?: pulumi.Input<number>;The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
property metricAggregationType
metricAggregationType?: pulumi.Input<string>;The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
property minAdjustmentMagnitude
minAdjustmentMagnitude?: pulumi.Input<number>;property name
name?: pulumi.Input<string>;The name of the dimension.
property policyType
policyType?: pulumi.Input<string>;The policy type, either “SimpleScaling”, “StepScaling” or “TargetTrackingScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
property scalingAdjustment
scalingAdjustment?: pulumi.Input<number>;The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
property stepAdjustments
stepAdjustments?: pulumi.Input<pulumi.Input<PolicyStepAdjustment>[]>;A set of adjustments that manage group scaling. These have the following structure:
property targetTrackingConfiguration
targetTrackingConfiguration?: pulumi.Input<PolicyTargetTrackingConfiguration>;A target tracking policy. These have the following structure:
interface PolicyState
interface PolicyStateInput properties used for looking up and filtering Policy resources.
property adjustmentType
adjustmentType?: pulumi.Input<string>;Specifies whether the adjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
property arn
arn?: pulumi.Input<string>;The ARN assigned by AWS to the scaling policy.
property autoscalingGroupName
autoscalingGroupName?: pulumi.Input<string>;The name of the autoscaling group.
property cooldown
cooldown?: pulumi.Input<number>;The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
property estimatedInstanceWarmup
estimatedInstanceWarmup?: pulumi.Input<number>;The estimated time, in seconds, until a newly launched instance will contribute CloudWatch metrics. Without a value, AWS will default to the group’s specified cooldown period.
property metricAggregationType
metricAggregationType?: pulumi.Input<string>;The aggregation type for the policy’s metrics. Valid values are “Minimum”, “Maximum”, and “Average”. Without a value, AWS will treat the aggregation type as “Average”.
property minAdjustmentMagnitude
minAdjustmentMagnitude?: pulumi.Input<number>;property name
name?: pulumi.Input<string>;The name of the dimension.
property policyType
policyType?: pulumi.Input<string>;The policy type, either “SimpleScaling”, “StepScaling” or “TargetTrackingScaling”. If this value isn’t provided, AWS will default to “SimpleScaling.”
property scalingAdjustment
scalingAdjustment?: pulumi.Input<number>;The number of members by which to scale, when the adjustment bounds are breached. A positive value scales up. A negative value scales down.
property stepAdjustments
stepAdjustments?: pulumi.Input<pulumi.Input<PolicyStepAdjustment>[]>;A set of adjustments that manage group scaling. These have the following structure:
property targetTrackingConfiguration
targetTrackingConfiguration?: pulumi.Input<PolicyTargetTrackingConfiguration>;A target tracking policy. These have the following structure:
interface ScheduleArgs
interface ScheduleArgsThe set of arguments for constructing a Schedule resource.
property autoscalingGroupName
autoscalingGroupName: pulumi.Input<string>;The name or Amazon Resource Name (ARN) of the Auto Scaling group.
property desiredCapacity
desiredCapacity?: pulumi.Input<number>;The number of EC2 instances that should be running in the group. Default 0. Set to -1 if you don’t want to change the desired capacity at the scheduled time.
property endTime
endTime?: pulumi.Input<string>;The time for this action to end, in “YYYY-MM-DDThh:mm:ssZ” format in UTC/GMT only (for example, 2014-06-01T00:00:00Z ). If you try to schedule your action in the past, Auto Scaling returns an error message.
property maxSize
maxSize?: pulumi.Input<number>;The maximum size for the Auto Scaling group. Default 0. Set to -1 if you don’t want to change the maximum size at the scheduled time.
property minSize
minSize?: pulumi.Input<number>;The minimum size for the Auto Scaling group. Default 0. Set to -1 if you don’t want to change the minimum size at the scheduled time.
property recurrence
recurrence?: pulumi.Input<string>;The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format.
property scheduledActionName
scheduledActionName: pulumi.Input<string>;The name of this scaling action.
property startTime
startTime?: pulumi.Input<string>;The time for this action to start, in “YYYY-MM-DDThh:mm:ssZ” format in UTC/GMT only (for example, 2014-06-01T00:00:00Z ). If you try to schedule your action in the past, Auto Scaling returns an error message.
interface ScheduleState
interface ScheduleStateInput properties used for looking up and filtering Schedule resources.
property arn
arn?: pulumi.Input<string>;The ARN assigned by AWS to the autoscaling schedule.
property autoscalingGroupName
autoscalingGroupName?: pulumi.Input<string>;The name or Amazon Resource Name (ARN) of the Auto Scaling group.
property desiredCapacity
desiredCapacity?: pulumi.Input<number>;The number of EC2 instances that should be running in the group. Default 0. Set to -1 if you don’t want to change the desired capacity at the scheduled time.
property endTime
endTime?: pulumi.Input<string>;The time for this action to end, in “YYYY-MM-DDThh:mm:ssZ” format in UTC/GMT only (for example, 2014-06-01T00:00:00Z ). If you try to schedule your action in the past, Auto Scaling returns an error message.
property maxSize
maxSize?: pulumi.Input<number>;The maximum size for the Auto Scaling group. Default 0. Set to -1 if you don’t want to change the maximum size at the scheduled time.
property minSize
minSize?: pulumi.Input<number>;The minimum size for the Auto Scaling group. Default 0. Set to -1 if you don’t want to change the minimum size at the scheduled time.
property recurrence
recurrence?: pulumi.Input<string>;The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format.
property scheduledActionName
scheduledActionName?: pulumi.Input<string>;The name of this scaling action.
property startTime
startTime?: pulumi.Input<string>;The time for this action to start, in “YYYY-MM-DDThh:mm:ssZ” format in UTC/GMT only (for example, 2014-06-01T00:00:00Z ). If you try to schedule your action in the past, Auto Scaling returns an error message.
let TestNotification
let TestNotification: NotificationType = "autoscaling:TEST_NOTIFICATION";