Show / Hide Table of Contents

Class CfnScheduledAction

A CloudFormation AWS::AutoScaling::ScheduledAction.

Inheritance
System.Object
Construct
CfnElement
CfnRefElement
CfnResource
CfnScheduledAction
Implements
IConstruct
Constructs.IConstruct
IDependable
IInspectable
Inherited Members
CfnResource.IsCfnResource(IConstruct)
CfnResource.AddDeletionOverride(String)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(String, Object)
CfnResource.AddOverride(String, Object)
CfnResource.AddPropertyDeletionOverride(String)
CfnResource.AddPropertyOverride(String, Object)
CfnResource.ApplyRemovalPolicy(Nullable<RemovalPolicy>, IRemovalPolicyOptions)
CfnResource.GetAtt(String)
CfnResource.GetMetadata(String)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(Object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnRefElement.Ref
CfnElement.IsCfnElement(Object)
CfnElement.OverrideLogicalId(String)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public class CfnScheduledAction : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnScheduledAction
    Inherits CfnResource
    Implements IConstruct, IDependable, IInspectable
Remarks

The AWS::AutoScaling::ScheduledAction resource specifies an Amazon EC2 Auto Scaling scheduled action so that the Auto Scaling group can change the number of instances available for your application in response to predictable load changes.

When you update a stack with an Auto Scaling group and scheduled action, CloudFormation always sets the min size, max size, and desired capacity properties of your group to the values that are defined in the AWS::AutoScaling::AutoScalingGroup section of your template. However, you might not want CloudFormation to do that when you have a scheduled action in effect. You can use an UpdatePolicy attribute to prevent CloudFormation from changing the min size, max size, or desired capacity property values during a stack update unless you modified the individual values in your template. If you have rolling updates enabled, before you can update the Auto Scaling group, you must suspend scheduled actions by specifying an UpdatePolicy attribute for the Auto Scaling group. You can find a sample update policy for rolling updates in Auto scaling template snippets .

For more information, see Scheduled scaling and Suspending and resuming scaling processes in the Amazon EC2 Auto Scaling User Guide .

CloudformationResource: AWS::AutoScaling::ScheduledAction

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.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.AutoScaling;

var cfnScheduledAction = new CfnScheduledAction(this, "MyCfnScheduledAction", new CfnScheduledActionProps {
    AutoScalingGroupName = "autoScalingGroupName",

    // the properties below are optional
    DesiredCapacity = 123,
    EndTime = "endTime",
    MaxSize = 123,
    MinSize = 123,
    Recurrence = "recurrence",
    StartTime = "startTime",
    TimeZone = "timeZone"
});

Synopsis

Constructors

CfnScheduledAction(Construct, String, ICfnScheduledActionProps)

Create a new AWS::AutoScaling::ScheduledAction.

CfnScheduledAction(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

CfnScheduledAction(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

Properties

AttrScheduledActionName

Returns the name of a scheduled action.

AutoScalingGroupName

The name of the Auto Scaling group.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties
DesiredCapacity

The desired capacity is the initial capacity of the Auto Scaling group after the scheduled action runs and the capacity it attempts to maintain.

EndTime

The date and time for the recurring schedule to end, in UTC.

MaxSize

The maximum size of the Auto Scaling group.

MinSize

The minimum size of the Auto Scaling group.

Recurrence

The recurring schedule for this action.

StartTime

The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and in quotes (for example, &quot;2021-06-01T00:00:00Z&quot; ).

TimeZone

Specifies the time zone for a cron expression.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<String, Object>)

Constructors

CfnScheduledAction(Construct, String, ICfnScheduledActionProps)

Create a new AWS::AutoScaling::ScheduledAction.

public CfnScheduledAction(Construct scope, string id, ICfnScheduledActionProps props)
Parameters
scope Construct
  • scope in which this resource is defined.
id System.String
  • scoped id of the resource.
props ICfnScheduledActionProps
  • resource properties.

CfnScheduledAction(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected CfnScheduledAction(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

CfnScheduledAction(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected CfnScheduledAction(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

Properties

AttrScheduledActionName

Returns the name of a scheduled action.

public virtual string AttrScheduledActionName { get; }
Property Value

System.String

Remarks

CloudformationAttribute: ScheduledActionName

AutoScalingGroupName

The name of the Auto Scaling group.

public virtual string AutoScalingGroupName { get; set; }
Property Value

System.String

Remarks

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.html#cfn-autoscaling-scheduledaction-autoscalinggroupname

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
CfnResource.CfnProperties

DesiredCapacity

The desired capacity is the initial capacity of the Auto Scaling group after the scheduled action runs and the capacity it attempts to maintain.

public virtual Nullable<double> DesiredCapacity { get; set; }
Property Value

System.Nullable<System.Double>

Remarks

It can scale beyond this capacity if you add more scaling conditions.

You must specify at least one of the following properties: MaxSize , MinSize , or DesiredCapacity .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.html#cfn-autoscaling-scheduledaction-desiredcapacity

EndTime

The date and time for the recurring schedule to end, in UTC.

public virtual string EndTime { get; set; }
Property Value

System.String

Remarks

For example, "2021-06-01T00:00:00Z" .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.html#cfn-autoscaling-scheduledaction-endtime

MaxSize

The maximum size of the Auto Scaling group.

public virtual Nullable<double> MaxSize { get; set; }
Property Value

System.Nullable<System.Double>

Remarks

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.html#cfn-autoscaling-scheduledaction-maxsize

MinSize

The minimum size of the Auto Scaling group.

public virtual Nullable<double> MinSize { get; set; }
Property Value

System.Nullable<System.Double>

Remarks

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.html#cfn-autoscaling-scheduledaction-minsize

Recurrence

The recurring schedule for this action.

public virtual string Recurrence { get; set; }
Property Value

System.String

Remarks

This format consists of five fields separated by white spaces: [Minute] [Hour] [Day_of_Month] [Month_of_Year] [Day_of_Week]. The value must be in quotes (for example, "30 0 1 1,6,12 *" ). For more information about this format, see Crontab .

When StartTime and EndTime are specified with Recurrence , they form the boundaries of when the recurring action starts and stops.

Cron expressions use Universal Coordinated Time (UTC) by default.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.html#cfn-autoscaling-scheduledaction-recurrence

StartTime

The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and in quotes (for example, &quot;2021-06-01T00:00:00Z&quot; ).

public virtual string StartTime { get; set; }
Property Value

System.String

Remarks

If you specify Recurrence and StartTime , Amazon EC2 Auto Scaling performs the action at this time, and then performs the action based on the specified recurrence.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.html#cfn-autoscaling-scheduledaction-starttime

TimeZone

Specifies the time zone for a cron expression.

public virtual string TimeZone { get; set; }
Property Value

System.String

Remarks

If a time zone is not provided, UTC is used by default.

Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti ). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.html#cfn-autoscaling-scheduledaction-timezone

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>

Overrides
CfnResource.RenderProperties(IDictionary<String, Object>)

Implements

IConstruct
Constructs.IConstruct
IDependable
IInspectable
Back to top Generated by DocFX