Skip to main content

Troposphere resource for AwsCommunity::ApplicationAutoscaling::ScheduledAction

Project description

AwsCommunity::ApplicationAutoscaling::ScheduledAction

Troposphere object for the AwsCommunity::ApplicationAutoscaling::ScheduledAction resource.

See The AWS CFN Community Registry or the original resource here

The resoure properties detail what attributes to assign for the resource

Example

Creates a scheduled action for a dynamodb table

from troposphere import Template
from troposphere_awscommunity_applicationautoscaling_scheduledaction import (
    ScheduledAction,
    ScalableTargetAction,
)


def test_scheduled_action():
    props: dict = {
        "ScheduledActionName": "cfn-testing-resource",
        "ServiceNamespace": "dynamodb",
        "ScalableDimension": "dynamodb:table:ReadCapacityUnits",
        "ScalableTargetAction": ScalableTargetAction(
            **{"MinCapacity": 1, "MaxCapacity": 4}
        ),
        "Schedule": "cron(5 2 ? * FRI)",
        "Timezone": "Europe/London",
        "ResourceId": "table/awscommunityscheduledactiontesttable",
    }
    tpl = Template()
    action = tpl.add_resource(ScheduledAction("MyAction", **props))
    print(tpl.to_yaml())

Renders, with the template, the following

Resources:
  MyAction:
    Properties:
      ResourceId: table/awscommunityscheduledactiontesttable
      ScalableDimension: dynamodb:table:ReadCapacityUnits
      ScalableTargetAction:
        MaxCapacity: 4
        MinCapacity: 1
      Schedule: cron(5 2 ? * FRI)
      ScheduledActionName: cfn-testing-resource
      ServiceNamespace: dynamodb
      Timezone: Europe/London
    Type: AwsCommunity::ApplicationAutoscaling::ScheduledAction

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page