CfnScalableTargetPropsMixin

class aws_cdk.mixins_preview.aws_applicationautoscaling.mixins.CfnScalableTargetPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::ApplicationAutoScaling::ScalableTarget resource specifies a resource that Application Auto Scaling can scale, such as an AWS::DynamoDB::Table or AWS::ECS::Service resource.

For more information, see Getting started in the Application Auto Scaling User Guide . .. epigraph:

If the resource that you want Application Auto Scaling to scale is not yet created in your account, add a dependency on the resource when registering it as a scalable target using the `DependsOn <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html>`_ attribute.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalabletarget.html

CloudformationResource:

AWS::ApplicationAutoScaling::ScalableTarget

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_applicationautoscaling import mixins as applicationautoscaling_mixins

cfn_scalable_target_props_mixin = applicationautoscaling_mixins.CfnScalableTargetPropsMixin(applicationautoscaling_mixins.CfnScalableTargetMixinProps(
    max_capacity=123,
    min_capacity=123,
    resource_id="resourceId",
    role_arn="roleArn",
    scalable_dimension="scalableDimension",
    scheduled_actions=[applicationautoscaling_mixins.CfnScalableTargetPropsMixin.ScheduledActionProperty(
        end_time=Date(),
        scalable_target_action=applicationautoscaling_mixins.CfnScalableTargetPropsMixin.ScalableTargetActionProperty(
            max_capacity=123,
            min_capacity=123
        ),
        schedule="schedule",
        scheduled_action_name="scheduledActionName",
        start_time=Date(),
        timezone="timezone"
    )],
    service_namespace="serviceNamespace",
    suspended_state=applicationautoscaling_mixins.CfnScalableTargetPropsMixin.SuspendedStateProperty(
        dynamic_scaling_in_suspended=False,
        dynamic_scaling_out_suspended=False,
        scheduled_scaling_suspended=False
    )
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::ApplicationAutoScaling::ScalableTarget.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['maxCapacity', 'minCapacity', 'resourceId', 'roleArn', 'scalableDimension', 'scheduledActions', 'serviceNamespace', 'suspendedState']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

ScalableTargetActionProperty

class CfnScalableTargetPropsMixin.ScalableTargetActionProperty(*, max_capacity=None, min_capacity=None)

Bases: object

ScalableTargetAction specifies the minimum and maximum capacity for the ScalableTargetAction property of the AWS::ApplicationAutoScaling::ScalableTarget ScheduledAction property type.

Parameters:
  • max_capacity (Union[int, float, None]) – The maximum capacity.

  • min_capacity (Union[int, float, None]) – The minimum capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scalabletargetaction.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_applicationautoscaling import mixins as applicationautoscaling_mixins

scalable_target_action_property = applicationautoscaling_mixins.CfnScalableTargetPropsMixin.ScalableTargetActionProperty(
    max_capacity=123,
    min_capacity=123
)

Attributes

max_capacity

The maximum capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scalabletargetaction.html#cfn-applicationautoscaling-scalabletarget-scalabletargetaction-maxcapacity

min_capacity

The minimum capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scalabletargetaction.html#cfn-applicationautoscaling-scalabletarget-scalabletargetaction-mincapacity

ScheduledActionProperty

class CfnScalableTargetPropsMixin.ScheduledActionProperty(*, end_time=None, scalable_target_action=None, schedule=None, scheduled_action_name=None, start_time=None, timezone=None)

Bases: object

ScheduledAction is a property of the AWS::ApplicationAutoScaling::ScalableTarget resource that specifies a scheduled action for a scalable target.

For more information, see Scheduled scaling in the Application Auto Scaling User Guide .

Parameters:
  • end_time (Union[datetime, IResolvable, None]) – The date and time that the action is scheduled to end, in UTC.

  • scalable_target_action (Union[IResolvable, ScalableTargetActionProperty, Dict[str, Any], None]) – The new minimum and maximum capacity. You can set both values or just one. At the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.

  • schedule (Optional[str]) – The schedule for this action. The following formats are supported:. - At expressions - “ at( *yyyy* - *mm* - *dd* T *hh* : *mm* : *ss* ) “ - Rate expressions - “ rate( *value* *unit* ) “ - Cron expressions - “ cron( *fields* ) “ At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a regular interval. At and cron expressions use Universal Coordinated Time (UTC) by default. The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] [Day_of_Week] [Year]. For rate expressions, value is a positive integer and unit is minute | minutes | hour | hours | day | days .

  • scheduled_action_name (Optional[str]) – The name of the scheduled action. This name must be unique among all other scheduled actions on the specified scalable target.

  • start_time (Union[datetime, IResolvable, None]) – The date and time that the action is scheduled to begin, in UTC.

  • timezone (Optional[str]) – The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an at or cron expression.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_applicationautoscaling import mixins as applicationautoscaling_mixins

scheduled_action_property = applicationautoscaling_mixins.CfnScalableTargetPropsMixin.ScheduledActionProperty(
    end_time=Date(),
    scalable_target_action=applicationautoscaling_mixins.CfnScalableTargetPropsMixin.ScalableTargetActionProperty(
        max_capacity=123,
        min_capacity=123
    ),
    schedule="schedule",
    scheduled_action_name="scheduledActionName",
    start_time=Date(),
    timezone="timezone"
)

Attributes

end_time

The date and time that the action is scheduled to end, in UTC.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html#cfn-applicationautoscaling-scalabletarget-scheduledaction-endtime

scalable_target_action

The new minimum and maximum capacity.

You can set both values or just one. At the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html#cfn-applicationautoscaling-scalabletarget-scheduledaction-scalabletargetaction

schedule

.

  • At expressions - “ at( *yyyy* - *mm* - *dd* T *hh* : *mm* : *ss* )

  • Rate expressions - “ rate( *value* *unit* )

  • Cron expressions - “ cron( *fields* )

At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a regular interval.

At and cron expressions use Universal Coordinated Time (UTC) by default.

The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] [Day_of_Week] [Year].

For rate expressions, value is a positive integer and unit is minute | minutes | hour | hours | day | days .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html#cfn-applicationautoscaling-scalabletarget-scheduledaction-schedule

Type:

The schedule for this action. The following formats are supported

scheduled_action_name

The name of the scheduled action.

This name must be unique among all other scheduled actions on the specified scalable target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html#cfn-applicationautoscaling-scalabletarget-scheduledaction-scheduledactionname

start_time

The date and time that the action is scheduled to begin, in UTC.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html#cfn-applicationautoscaling-scalabletarget-scheduledaction-starttime

timezone

The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an at or cron expression.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html#cfn-applicationautoscaling-scalabletarget-scheduledaction-timezone

SuspendedStateProperty

class CfnScalableTargetPropsMixin.SuspendedStateProperty(*, dynamic_scaling_in_suspended=None, dynamic_scaling_out_suspended=None, scheduled_scaling_suspended=None)

Bases: object

SuspendedState is a property of the AWS::ApplicationAutoScaling::ScalableTarget resource that specifies whether the scaling activities for a scalable target are in a suspended state.

For more information, see Suspending and resuming scaling in the Application Auto Scaling User Guide .

Parameters:
  • dynamic_scaling_in_suspended (Union[bool, IResolvable, None]) – Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Set the value to true if you don’t want Application Auto Scaling to remove capacity when a scaling policy is triggered. The default is false .

  • dynamic_scaling_out_suspended (Union[bool, IResolvable, None]) – Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Set the value to true if you don’t want Application Auto Scaling to add capacity when a scaling policy is triggered. The default is false .

  • scheduled_scaling_suspended (Union[bool, IResolvable, None]) – Whether scheduled scaling is suspended. Set the value to true if you don’t want Application Auto Scaling to add or remove capacity by initiating scheduled actions. The default is false .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-suspendedstate.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_applicationautoscaling import mixins as applicationautoscaling_mixins

suspended_state_property = applicationautoscaling_mixins.CfnScalableTargetPropsMixin.SuspendedStateProperty(
    dynamic_scaling_in_suspended=False,
    dynamic_scaling_out_suspended=False,
    scheduled_scaling_suspended=False
)

Attributes

dynamic_scaling_in_suspended

Whether scale in by a target tracking scaling policy or a step scaling policy is suspended.

Set the value to true if you don’t want Application Auto Scaling to remove capacity when a scaling policy is triggered. The default is false .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-suspendedstate.html#cfn-applicationautoscaling-scalabletarget-suspendedstate-dynamicscalinginsuspended

dynamic_scaling_out_suspended

Whether scale out by a target tracking scaling policy or a step scaling policy is suspended.

Set the value to true if you don’t want Application Auto Scaling to add capacity when a scaling policy is triggered. The default is false .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-suspendedstate.html#cfn-applicationautoscaling-scalabletarget-suspendedstate-dynamicscalingoutsuspended

scheduled_scaling_suspended

Whether scheduled scaling is suspended.

Set the value to true if you don’t want Application Auto Scaling to add or remove capacity by initiating scheduled actions. The default is false .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-suspendedstate.html#cfn-applicationautoscaling-scalabletarget-suspendedstate-scheduledscalingsuspended