Class Schedule
Provides an AutoScaling Schedule resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var foobarGroup = new Aws.AutoScaling.Group("foobarGroup", new Aws.AutoScaling.GroupArgs
{
AvailabilityZones =
{
"us-west-2a",
},
ForceDelete = true,
HealthCheckGracePeriod = 300,
HealthCheckType = "ELB",
MaxSize = 1,
MinSize = 1,
TerminationPolicies =
{
"OldestInstance",
},
});
var foobarSchedule = new Aws.AutoScaling.Schedule("foobarSchedule", new Aws.AutoScaling.ScheduleArgs
{
AutoscalingGroupName = foobarGroup.Name,
DesiredCapacity = 0,
EndTime = "2016-12-12T06:00:00Z",
MaxSize = 1,
MinSize = 0,
ScheduledActionName = "foobar",
StartTime = "2016-12-11T18:00:00Z",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.AutoScaling
Assembly: Pulumi.Aws.dll
Syntax
public class Schedule : CustomResource
Constructors
View SourceSchedule(String, ScheduleArgs, CustomResourceOptions)
Create a Schedule resource with the given unique name, arguments, and options.
Declaration
public Schedule(string name, ScheduleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ScheduleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
The ARN assigned by AWS to the autoscaling schedule.
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AutoscalingGroupName
The name or Amazon Resource Name (ARN) of the Auto Scaling group.
Declaration
public Output<string> AutoscalingGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DesiredCapacity
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.
Declaration
public Output<int> DesiredCapacity { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
EndTime
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.
Declaration
public Output<string> EndTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MaxSize
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.
Declaration
public Output<int> MaxSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
MinSize
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.
Declaration
public Output<int> MinSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Recurrence
The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format.
Declaration
public Output<string> Recurrence { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ScheduledActionName
The name of this scaling action.
Declaration
public Output<string> ScheduledActionName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StartTime
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.
Declaration
public Output<string> StartTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ScheduleState, CustomResourceOptions)
Get an existing Schedule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Schedule Get(string name, Input<string> id, ScheduleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ScheduleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Schedule |