Show / Hide Table of Contents

Class ScheduledAction

Provides an Application AutoScaling ScheduledAction resource.

Example Usage

DynamoDB Table Autoscaling

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var dynamodbTarget = new Aws.AppAutoScaling.Target("dynamodbTarget", new Aws.AppAutoScaling.TargetArgs
    {
        MaxCapacity = 100,
        MinCapacity = 5,
        ResourceId = "table/tableName",
        ScalableDimension = "dynamodb:table:ReadCapacityUnits",
        ServiceNamespace = "dynamodb",
    });
    var dynamodbScheduledAction = new Aws.AppAutoScaling.ScheduledAction("dynamodbScheduledAction", new Aws.AppAutoScaling.ScheduledActionArgs
    {
        ResourceId = dynamodbTarget.ResourceId,
        ScalableDimension = dynamodbTarget.ScalableDimension,
        ScalableTargetAction = new Aws.AppAutoScaling.Inputs.ScheduledActionScalableTargetActionArgs
        {
            MaxCapacity = 200,
            MinCapacity = 1,
        },
        Schedule = "at(2006-01-02T15:04:05)",
        ServiceNamespace = dynamodbTarget.ServiceNamespace,
    });
}

}

ECS Service Autoscaling

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var ecsTarget = new Aws.AppAutoScaling.Target("ecsTarget", new Aws.AppAutoScaling.TargetArgs
    {
        MaxCapacity = 4,
        MinCapacity = 1,
        ResourceId = "service/clusterName/serviceName",
        ScalableDimension = "ecs:service:DesiredCount",
        ServiceNamespace = "ecs",
    });
    var ecsScheduledAction = new Aws.AppAutoScaling.ScheduledAction("ecsScheduledAction", new Aws.AppAutoScaling.ScheduledActionArgs
    {
        ResourceId = ecsTarget.ResourceId,
        ScalableDimension = ecsTarget.ScalableDimension,
        ScalableTargetAction = new Aws.AppAutoScaling.Inputs.ScheduledActionScalableTargetActionArgs
        {
            MaxCapacity = 10,
            MinCapacity = 1,
        },
        Schedule = "at(2006-01-02T15:04:05)",
        ServiceNamespace = ecsTarget.ServiceNamespace,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
ScheduledAction
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.AppAutoScaling
Assembly: Pulumi.Aws.dll
Syntax
public class ScheduledAction : CustomResource

Constructors

View Source

ScheduledAction(String, ScheduledActionArgs, CustomResourceOptions)

Create a ScheduledAction resource with the given unique name, arguments, and options.

Declaration
public ScheduledAction(string name, ScheduledActionArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ScheduledActionArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The Amazon Resource Name (ARN) of the scheduled action.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

EndTime

The date and time for the scheduled action to end. Specify the following format: 2006-01-02T15:04:05Z

Declaration
public Output<string> EndTime { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the scheduled action.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

ResourceId

The identifier of the resource associated with the scheduled action. Documentation can be found in the parameter at: AWS Application Auto Scaling API Reference

Declaration
public Output<string> ResourceId { get; }
Property Value
Type Description
Output<System.String>
View Source

ScalableDimension

The scalable dimension. Documentation can be found in the parameter at: AWS Application Auto Scaling API Reference Example: ecs:service:DesiredCount

Declaration
public Output<string> ScalableDimension { get; }
Property Value
Type Description
Output<System.String>
View Source

ScalableTargetAction

The new minimum and maximum capacity. You can set both values or just one. See below

Declaration
public Output<ScheduledActionScalableTargetAction> ScalableTargetAction { get; }
Property Value
Type Description
Output<ScheduledActionScalableTargetAction>
View Source

Schedule

The schedule for this action. The following formats are supported: At expressions - at(yyyy-mm-ddThh:mm:ss), Rate expressions - rate(valueunit), Cron expressions - cron(fields). In UTC. Documentation can be found in the parameter at: AWS Application Auto Scaling API Reference

Declaration
public Output<string> Schedule { get; }
Property Value
Type Description
Output<System.String>
View Source

ServiceNamespace

The namespace of the AWS service. Documentation can be found in the parameter at: AWS Application Auto Scaling API Reference Example: ecs

Declaration
public Output<string> ServiceNamespace { get; }
Property Value
Type Description
Output<System.String>
View Source

StartTime

The date and time for the scheduled action to start. Specify the following format: 2006-01-02T15:04:05Z

Declaration
public Output<string> StartTime { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ScheduledActionState, CustomResourceOptions)

Get an existing ScheduledAction resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static ScheduledAction Get(string name, Input<string> id, ScheduledActionState 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.

ScheduledActionState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ScheduledAction
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.