awsapplicationautoscaling

package
v2.0.0-rc.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseScalableAttribute_IsConstruct

func BaseScalableAttribute_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnScalableTarget_CFN_RESOURCE_TYPE_NAME

func CfnScalableTarget_CFN_RESOURCE_TYPE_NAME() *string

func CfnScalableTarget_IsCfnElement

func CfnScalableTarget_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnScalableTarget_IsCfnResource

func CfnScalableTarget_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnScalableTarget_IsConstruct

func CfnScalableTarget_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func CfnScalingPolicy_CFN_RESOURCE_TYPE_NAME

func CfnScalingPolicy_CFN_RESOURCE_TYPE_NAME() *string

func CfnScalingPolicy_IsCfnElement

func CfnScalingPolicy_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnScalingPolicy_IsCfnResource

func CfnScalingPolicy_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnScalingPolicy_IsConstruct

func CfnScalingPolicy_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func NewBaseScalableAttribute_Override

func NewBaseScalableAttribute_Override(b BaseScalableAttribute, scope constructs.Construct, id *string, props *BaseScalableAttributeProps)

Experimental.

func NewCfnScalableTarget_Override

func NewCfnScalableTarget_Override(c CfnScalableTarget, scope constructs.Construct, id *string, props *CfnScalableTargetProps)

Create a new `AWS::ApplicationAutoScaling::ScalableTarget`.

func NewCfnScalingPolicy_Override

func NewCfnScalingPolicy_Override(c CfnScalingPolicy, scope constructs.Construct, id *string, props *CfnScalingPolicyProps)

Create a new `AWS::ApplicationAutoScaling::ScalingPolicy`.

func NewScalableTarget_Override

func NewScalableTarget_Override(s ScalableTarget, scope constructs.Construct, id *string, props *ScalableTargetProps)

Experimental.

func NewSchedule_Override

func NewSchedule_Override(s Schedule)

Experimental.

func NewStepScalingAction_Override

func NewStepScalingAction_Override(s StepScalingAction, scope constructs.Construct, id *string, props *StepScalingActionProps)

Experimental.

func NewStepScalingPolicy_Override

func NewStepScalingPolicy_Override(s StepScalingPolicy, scope constructs.Construct, id *string, props *StepScalingPolicyProps)

Experimental.

func NewTargetTrackingScalingPolicy_Override

func NewTargetTrackingScalingPolicy_Override(t TargetTrackingScalingPolicy, scope constructs.Construct, id *string, props *TargetTrackingScalingPolicyProps)

Experimental.

func ScalableTarget_IsConstruct

func ScalableTarget_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func ScalableTarget_IsResource

func ScalableTarget_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func StepScalingAction_IsConstruct

func StepScalingAction_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func StepScalingPolicy_IsConstruct

func StepScalingPolicy_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

func TargetTrackingScalingPolicy_IsConstruct

func TargetTrackingScalingPolicy_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead

Types

type AdjustmentTier

type AdjustmentTier struct {
	// What number to adjust the capacity with.
	//
	// The number is interpeted as an added capacity, a new fixed capacity or an
	// added percentage depending on the AdjustmentType value of the
	// StepScalingPolicy.
	//
	// Can be positive or negative.
	// Experimental.
	Adjustment *float64 `json:"adjustment"`
	// Lower bound where this scaling tier applies.
	//
	// The scaling tier applies if the difference between the metric
	// value and its alarm threshold is higher than this value.
	// Experimental.
	LowerBound *float64 `json:"lowerBound"`
	// Upper bound where this scaling tier applies.
	//
	// The scaling tier applies if the difference between the metric
	// value and its alarm threshold is lower than this value.
	// Experimental.
	UpperBound *float64 `json:"upperBound"`
}

An adjustment.

TODO: EXAMPLE

Experimental.

type AdjustmentType

type AdjustmentType string

How adjustment numbers are interpreted.

TODO: EXAMPLE

Experimental.

const (
	AdjustmentType_CHANGE_IN_CAPACITY         AdjustmentType = "CHANGE_IN_CAPACITY"
	AdjustmentType_EXACT_CAPACITY             AdjustmentType = "EXACT_CAPACITY"
	AdjustmentType_PERCENT_CHANGE_IN_CAPACITY AdjustmentType = "PERCENT_CHANGE_IN_CAPACITY"
)

type BaseScalableAttribute

type BaseScalableAttribute interface {
	constructs.Construct
	Node() constructs.Node
	Props() *BaseScalableAttributeProps
	DoScaleOnMetric(id *string, props *BasicStepScalingPolicyProps)
	DoScaleOnSchedule(id *string, props *ScalingSchedule)
	DoScaleToTrackMetric(id *string, props *BasicTargetTrackingScalingPolicyProps)
	ToString() *string
}

Represent an attribute for which autoscaling can be configured.

This class is basically a light wrapper around ScalableTarget, but with all methods protected instead of public so they can be selectively exposed and/or more specific versions of them can be exposed by derived classes for individual services support autoscaling.

Typical use cases:

  • Hide away the PredefinedMetric enum for target tracking policies.
  • Don't expose all scaling methods (for example Dynamo tables don't support Step Scaling, so the Dynamo subclass won't expose this method).

Experimental.

type BaseScalableAttributeProps

type BaseScalableAttributeProps struct {
	// Maximum capacity to scale to.
	// Experimental.
	MaxCapacity *float64 `json:"maxCapacity"`
	// Minimum capacity to scale to.
	// Experimental.
	MinCapacity *float64 `json:"minCapacity"`
	// Scalable dimension of the attribute.
	// Experimental.
	Dimension *string `json:"dimension"`
	// Resource ID of the attribute.
	// Experimental.
	ResourceId *string `json:"resourceId"`
	// Role to use for scaling.
	// Experimental.
	Role awsiam.IRole `json:"role"`
	// Service namespace of the scalable attribute.
	// Experimental.
	ServiceNamespace ServiceNamespace `json:"serviceNamespace"`
}

Properties for a ScalableTableAttribute.

TODO: EXAMPLE

Experimental.

type BaseTargetTrackingProps

type BaseTargetTrackingProps struct {
	// Indicates whether scale in by the target tracking policy is disabled.
	//
	// If the value is true, scale in is disabled and the target tracking policy
	// won't remove capacity from the scalable resource. Otherwise, scale in is
	// enabled and the target tracking policy can remove capacity from the
	// scalable resource.
	// Experimental.
	DisableScaleIn *bool `json:"disableScaleIn"`
	// A name for the scaling policy.
	// Experimental.
	PolicyName *string `json:"policyName"`
	// Period after a scale in activity completes before another scale in activity can start.
	// Experimental.
	ScaleInCooldown awscdk.Duration `json:"scaleInCooldown"`
	// Period after a scale out activity completes before another scale out activity can start.
	// Experimental.
	ScaleOutCooldown awscdk.Duration `json:"scaleOutCooldown"`
}

Base interface for target tracking props.

Contains the attributes that are common to target tracking policies, except the ones relating to the metric and to the scalable target.

This interface is reused by more specific target tracking props objects in other services.

TODO: EXAMPLE

Experimental.

type BasicStepScalingPolicyProps

type BasicStepScalingPolicyProps struct {
	// How the adjustment numbers inside 'intervals' are interpreted.
	// Experimental.
	AdjustmentType AdjustmentType `json:"adjustmentType"`
	// Grace period after scaling activity.
	//
	// Subsequent scale outs during the cooldown period are squashed so that only
	// the biggest scale out happens.
	//
	// Subsequent scale ins during the cooldown period are ignored.
	// See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_StepScalingPolicyConfiguration.html
	//
	// Experimental.
	Cooldown awscdk.Duration `json:"cooldown"`
	// How many evaluation periods of the metric to wait before triggering a scaling action.
	//
	// Raising this value can be used to smooth out the metric, at the expense
	// of slower response times.
	// Experimental.
	EvaluationPeriods *float64 `json:"evaluationPeriods"`
	// Metric to scale on.
	// Experimental.
	Metric awscloudwatch.IMetric `json:"metric"`
	// Aggregation to apply to all data points over the evaluation periods.
	//
	// Only has meaning if `evaluationPeriods != 1`.
	// Experimental.
	MetricAggregationType MetricAggregationType `json:"metricAggregationType"`
	// Minimum absolute number to adjust capacity with as result of percentage scaling.
	//
	// Only when using AdjustmentType = PercentChangeInCapacity, this number controls
	// the minimum absolute effect size.
	// Experimental.
	MinAdjustmentMagnitude *float64 `json:"minAdjustmentMagnitude"`
	// The intervals for scaling.
	//
	// Maps a range of metric values to a particular scaling behavior.
	// Experimental.
	ScalingSteps *[]*ScalingInterval `json:"scalingSteps"`
}

TODO: EXAMPLE

Experimental.

type BasicTargetTrackingScalingPolicyProps

type BasicTargetTrackingScalingPolicyProps struct {
	// Indicates whether scale in by the target tracking policy is disabled.
	//
	// If the value is true, scale in is disabled and the target tracking policy
	// won't remove capacity from the scalable resource. Otherwise, scale in is
	// enabled and the target tracking policy can remove capacity from the
	// scalable resource.
	// Experimental.
	DisableScaleIn *bool `json:"disableScaleIn"`
	// A name for the scaling policy.
	// Experimental.
	PolicyName *string `json:"policyName"`
	// Period after a scale in activity completes before another scale in activity can start.
	// Experimental.
	ScaleInCooldown awscdk.Duration `json:"scaleInCooldown"`
	// Period after a scale out activity completes before another scale out activity can start.
	// Experimental.
	ScaleOutCooldown awscdk.Duration `json:"scaleOutCooldown"`
	// A custom metric for application autoscaling.
	//
	// The metric must track utilization. Scaling out will happen if the metric is higher than
	// the target value, scaling in will happen in the metric is lower than the target value.
	//
	// Exactly one of customMetric or predefinedMetric must be specified.
	// Experimental.
	CustomMetric awscloudwatch.IMetric `json:"customMetric"`
	// A predefined metric for application autoscaling.
	//
	// The metric must track utilization. Scaling out will happen if the metric is higher than
	// the target value, scaling in will happen in the metric is lower than the target value.
	//
	// Exactly one of customMetric or predefinedMetric must be specified.
	// Experimental.
	PredefinedMetric PredefinedMetric `json:"predefinedMetric"`
	// Identify the resource associated with the metric type.
	//
	// Only used for predefined metric ALBRequestCountPerTarget.
	//
	// Example value: `app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>`
	// Experimental.
	ResourceLabel *string `json:"resourceLabel"`
	// The target value for the metric.
	// Experimental.
	TargetValue *float64 `json:"targetValue"`
}

Properties for a Target Tracking policy that include the metric but exclude the target.

TODO: EXAMPLE

Experimental.

type CfnScalableTarget

type CfnScalableTarget interface {
	awscdk.CfnResource
	awscdk.IInspectable
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogicalId() *string
	MaxCapacity() *float64
	SetMaxCapacity(val *float64)
	MinCapacity() *float64
	SetMinCapacity(val *float64)
	Node() constructs.Node
	Ref() *string
	ResourceId() *string
	SetResourceId(val *string)
	RoleArn() *string
	SetRoleArn(val *string)
	ScalableDimension() *string
	SetScalableDimension(val *string)
	ScheduledActions() interface{}
	SetScheduledActions(val interface{})
	ServiceNamespace() *string
	SetServiceNamespace(val *string)
	Stack() awscdk.Stack
	SuspendedState() interface{}
	SetSuspendedState(val interface{})
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target awscdk.CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	GetAtt(attributeName *string) awscdk.Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector awscdk.TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApplicationAutoScaling::ScalableTarget`.

TODO: EXAMPLE

func NewCfnScalableTarget

func NewCfnScalableTarget(scope constructs.Construct, id *string, props *CfnScalableTargetProps) CfnScalableTarget

Create a new `AWS::ApplicationAutoScaling::ScalableTarget`.

type CfnScalableTargetProps

type CfnScalableTargetProps struct {
	// `AWS::ApplicationAutoScaling::ScalableTarget.MaxCapacity`.
	MaxCapacity *float64 `json:"maxCapacity"`
	// `AWS::ApplicationAutoScaling::ScalableTarget.MinCapacity`.
	MinCapacity *float64 `json:"minCapacity"`
	// `AWS::ApplicationAutoScaling::ScalableTarget.ResourceId`.
	ResourceId *string `json:"resourceId"`
	// `AWS::ApplicationAutoScaling::ScalableTarget.RoleARN`.
	RoleArn *string `json:"roleArn"`
	// `AWS::ApplicationAutoScaling::ScalableTarget.ScalableDimension`.
	ScalableDimension *string `json:"scalableDimension"`
	// `AWS::ApplicationAutoScaling::ScalableTarget.ScheduledActions`.
	ScheduledActions interface{} `json:"scheduledActions"`
	// `AWS::ApplicationAutoScaling::ScalableTarget.ServiceNamespace`.
	ServiceNamespace *string `json:"serviceNamespace"`
	// `AWS::ApplicationAutoScaling::ScalableTarget.SuspendedState`.
	SuspendedState interface{} `json:"suspendedState"`
}

Properties for defining a `AWS::ApplicationAutoScaling::ScalableTarget`.

TODO: EXAMPLE

type CfnScalableTarget_ScalableTargetActionProperty

type CfnScalableTarget_ScalableTargetActionProperty struct {
	// `CfnScalableTarget.ScalableTargetActionProperty.MaxCapacity`.
	MaxCapacity *float64 `json:"maxCapacity"`
	// `CfnScalableTarget.ScalableTargetActionProperty.MinCapacity`.
	MinCapacity *float64 `json:"minCapacity"`
}

TODO: EXAMPLE

type CfnScalableTarget_ScheduledActionProperty

type CfnScalableTarget_ScheduledActionProperty struct {
	// `CfnScalableTarget.ScheduledActionProperty.EndTime`.
	EndTime interface{} `json:"endTime"`
	// `CfnScalableTarget.ScheduledActionProperty.ScalableTargetAction`.
	ScalableTargetAction interface{} `json:"scalableTargetAction"`
	// `CfnScalableTarget.ScheduledActionProperty.Schedule`.
	Schedule *string `json:"schedule"`
	// `CfnScalableTarget.ScheduledActionProperty.ScheduledActionName`.
	ScheduledActionName *string `json:"scheduledActionName"`
	// `CfnScalableTarget.ScheduledActionProperty.StartTime`.
	StartTime interface{} `json:"startTime"`
	// `CfnScalableTarget.ScheduledActionProperty.Timezone`.
	Timezone *string `json:"timezone"`
}

TODO: EXAMPLE

type CfnScalableTarget_SuspendedStateProperty

type CfnScalableTarget_SuspendedStateProperty struct {
	// `CfnScalableTarget.SuspendedStateProperty.DynamicScalingInSuspended`.
	DynamicScalingInSuspended interface{} `json:"dynamicScalingInSuspended"`
	// `CfnScalableTarget.SuspendedStateProperty.DynamicScalingOutSuspended`.
	DynamicScalingOutSuspended interface{} `json:"dynamicScalingOutSuspended"`
	// `CfnScalableTarget.SuspendedStateProperty.ScheduledScalingSuspended`.
	ScheduledScalingSuspended interface{} `json:"scheduledScalingSuspended"`
}

TODO: EXAMPLE

type CfnScalingPolicy

type CfnScalingPolicy interface {
	awscdk.CfnResource
	awscdk.IInspectable
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	LogicalId() *string
	Node() constructs.Node
	PolicyName() *string
	SetPolicyName(val *string)
	PolicyType() *string
	SetPolicyType(val *string)
	Ref() *string
	ResourceId() *string
	SetResourceId(val *string)
	ScalableDimension() *string
	SetScalableDimension(val *string)
	ScalingTargetId() *string
	SetScalingTargetId(val *string)
	ServiceNamespace() *string
	SetServiceNamespace(val *string)
	Stack() awscdk.Stack
	StepScalingPolicyConfiguration() interface{}
	SetStepScalingPolicyConfiguration(val interface{})
	TargetTrackingScalingPolicyConfiguration() interface{}
	SetTargetTrackingScalingPolicyConfiguration(val interface{})
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target awscdk.CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	GetAtt(attributeName *string) awscdk.Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector awscdk.TreeInspector)
	OverrideLogicalId(newLogicalId *string)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::ApplicationAutoScaling::ScalingPolicy`.

TODO: EXAMPLE

func NewCfnScalingPolicy

func NewCfnScalingPolicy(scope constructs.Construct, id *string, props *CfnScalingPolicyProps) CfnScalingPolicy

Create a new `AWS::ApplicationAutoScaling::ScalingPolicy`.

type CfnScalingPolicyProps

type CfnScalingPolicyProps struct {
	// `AWS::ApplicationAutoScaling::ScalingPolicy.PolicyName`.
	PolicyName *string `json:"policyName"`
	// `AWS::ApplicationAutoScaling::ScalingPolicy.PolicyType`.
	PolicyType *string `json:"policyType"`
	// `AWS::ApplicationAutoScaling::ScalingPolicy.ResourceId`.
	ResourceId *string `json:"resourceId"`
	// `AWS::ApplicationAutoScaling::ScalingPolicy.ScalableDimension`.
	ScalableDimension *string `json:"scalableDimension"`
	// `AWS::ApplicationAutoScaling::ScalingPolicy.ScalingTargetId`.
	ScalingTargetId *string `json:"scalingTargetId"`
	// `AWS::ApplicationAutoScaling::ScalingPolicy.ServiceNamespace`.
	ServiceNamespace *string `json:"serviceNamespace"`
	// `AWS::ApplicationAutoScaling::ScalingPolicy.StepScalingPolicyConfiguration`.
	StepScalingPolicyConfiguration interface{} `json:"stepScalingPolicyConfiguration"`
	// `AWS::ApplicationAutoScaling::ScalingPolicy.TargetTrackingScalingPolicyConfiguration`.
	TargetTrackingScalingPolicyConfiguration interface{} `json:"targetTrackingScalingPolicyConfiguration"`
}

Properties for defining a `AWS::ApplicationAutoScaling::ScalingPolicy`.

TODO: EXAMPLE

type CfnScalingPolicy_CustomizedMetricSpecificationProperty

type CfnScalingPolicy_CustomizedMetricSpecificationProperty struct {
	// `CfnScalingPolicy.CustomizedMetricSpecificationProperty.Dimensions`.
	Dimensions interface{} `json:"dimensions"`
	// `CfnScalingPolicy.CustomizedMetricSpecificationProperty.MetricName`.
	MetricName *string `json:"metricName"`
	// `CfnScalingPolicy.CustomizedMetricSpecificationProperty.Namespace`.
	Namespace *string `json:"namespace"`
	// `CfnScalingPolicy.CustomizedMetricSpecificationProperty.Statistic`.
	Statistic *string `json:"statistic"`
	// `CfnScalingPolicy.CustomizedMetricSpecificationProperty.Unit`.
	Unit *string `json:"unit"`
}

TODO: EXAMPLE

type CfnScalingPolicy_MetricDimensionProperty

type CfnScalingPolicy_MetricDimensionProperty struct {
	// `CfnScalingPolicy.MetricDimensionProperty.Name`.
	Name *string `json:"name"`
	// `CfnScalingPolicy.MetricDimensionProperty.Value`.
	Value *string `json:"value"`
}

TODO: EXAMPLE

type CfnScalingPolicy_PredefinedMetricSpecificationProperty

type CfnScalingPolicy_PredefinedMetricSpecificationProperty struct {
	// `CfnScalingPolicy.PredefinedMetricSpecificationProperty.PredefinedMetricType`.
	PredefinedMetricType *string `json:"predefinedMetricType"`
	// `CfnScalingPolicy.PredefinedMetricSpecificationProperty.ResourceLabel`.
	ResourceLabel *string `json:"resourceLabel"`
}

TODO: EXAMPLE

type CfnScalingPolicy_StepAdjustmentProperty

type CfnScalingPolicy_StepAdjustmentProperty struct {
	// `CfnScalingPolicy.StepAdjustmentProperty.MetricIntervalLowerBound`.
	MetricIntervalLowerBound *float64 `json:"metricIntervalLowerBound"`
	// `CfnScalingPolicy.StepAdjustmentProperty.MetricIntervalUpperBound`.
	MetricIntervalUpperBound *float64 `json:"metricIntervalUpperBound"`
	// `CfnScalingPolicy.StepAdjustmentProperty.ScalingAdjustment`.
	ScalingAdjustment *float64 `json:"scalingAdjustment"`
}

TODO: EXAMPLE

type CfnScalingPolicy_StepScalingPolicyConfigurationProperty

type CfnScalingPolicy_StepScalingPolicyConfigurationProperty struct {
	// `CfnScalingPolicy.StepScalingPolicyConfigurationProperty.AdjustmentType`.
	AdjustmentType *string `json:"adjustmentType"`
	// `CfnScalingPolicy.StepScalingPolicyConfigurationProperty.Cooldown`.
	Cooldown *float64 `json:"cooldown"`
	// `CfnScalingPolicy.StepScalingPolicyConfigurationProperty.MetricAggregationType`.
	MetricAggregationType *string `json:"metricAggregationType"`
	// `CfnScalingPolicy.StepScalingPolicyConfigurationProperty.MinAdjustmentMagnitude`.
	MinAdjustmentMagnitude *float64 `json:"minAdjustmentMagnitude"`
	// `CfnScalingPolicy.StepScalingPolicyConfigurationProperty.StepAdjustments`.
	StepAdjustments interface{} `json:"stepAdjustments"`
}

TODO: EXAMPLE

type CfnScalingPolicy_TargetTrackingScalingPolicyConfigurationProperty

type CfnScalingPolicy_TargetTrackingScalingPolicyConfigurationProperty struct {
	// `CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.CustomizedMetricSpecification`.
	CustomizedMetricSpecification interface{} `json:"customizedMetricSpecification"`
	// `CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.DisableScaleIn`.
	DisableScaleIn interface{} `json:"disableScaleIn"`
	// `CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.PredefinedMetricSpecification`.
	PredefinedMetricSpecification interface{} `json:"predefinedMetricSpecification"`
	// `CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.ScaleInCooldown`.
	ScaleInCooldown *float64 `json:"scaleInCooldown"`
	// `CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.ScaleOutCooldown`.
	ScaleOutCooldown *float64 `json:"scaleOutCooldown"`
	// `CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.TargetValue`.
	TargetValue *float64 `json:"targetValue"`
}

TODO: EXAMPLE

type CronOptions

type CronOptions struct {
	// The day of the month to run this rule at.
	// Experimental.
	Day *string `json:"day"`
	// The hour to run this rule at.
	// Experimental.
	Hour *string `json:"hour"`
	// The minute to run this rule at.
	// Experimental.
	Minute *string `json:"minute"`
	// The month to run this rule at.
	// Experimental.
	Month *string `json:"month"`
	// The day of the week to run this rule at.
	// Experimental.
	WeekDay *string `json:"weekDay"`
	// The year to run this rule at.
	// Experimental.
	Year *string `json:"year"`
}

Options to configure a cron expression.

All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.

TODO: EXAMPLE

See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions

Experimental.

type EnableScalingProps

type EnableScalingProps struct {
	// Maximum capacity to scale to.
	// Experimental.
	MaxCapacity *float64 `json:"maxCapacity"`
	// Minimum capacity to scale to.
	// Experimental.
	MinCapacity *float64 `json:"minCapacity"`
}

Properties for enabling Application Auto Scaling.

TODO: EXAMPLE

Experimental.

type IScalableTarget

type IScalableTarget interface {
	awscdk.IResource
	// Experimental.
	ScalableTargetId() *string
}

Experimental.

func ScalableTarget_FromScalableTargetId

func ScalableTarget_FromScalableTargetId(scope constructs.Construct, id *string, scalableTargetId *string) IScalableTarget

Experimental.

type MetricAggregationType

type MetricAggregationType string

How the scaling metric is going to be aggregated. Experimental.

const (
	MetricAggregationType_AVERAGE MetricAggregationType = "AVERAGE"
	MetricAggregationType_MAXIMUM MetricAggregationType = "MAXIMUM"
	MetricAggregationType_MINIMUM MetricAggregationType = "MINIMUM"
)

type PredefinedMetric

type PredefinedMetric string

One of the predefined autoscaling metrics.

TODO: EXAMPLE

Experimental.

const (
	PredefinedMetric_ALB_REQUEST_COUNT_PER_TARGET                   PredefinedMetric = "ALB_REQUEST_COUNT_PER_TARGET"
	PredefinedMetric_DYANMODB_WRITE_CAPACITY_UTILIZATION            PredefinedMetric = "DYANMODB_WRITE_CAPACITY_UTILIZATION"
	PredefinedMetric_DYNAMODB_READ_CAPACITY_UTILIZATION             PredefinedMetric = "DYNAMODB_READ_CAPACITY_UTILIZATION"
	PredefinedMetric_EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION PredefinedMetric = "EC2_SPOT_FLEET_REQUEST_AVERAGE_CPU_UTILIZATION"
	PredefinedMetric_EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN      PredefinedMetric = "EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_IN"
	PredefinedMetric_EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT     PredefinedMetric = "EC2_SPOT_FLEET_REQUEST_AVERAGE_NETWORK_OUT"
	PredefinedMetric_ECS_SERVICE_AVERAGE_CPU_UTILIZATION            PredefinedMetric = "ECS_SERVICE_AVERAGE_CPU_UTILIZATION"
	PredefinedMetric_ECS_SERVICE_AVERAGE_MEMORY_UTILIZATION         PredefinedMetric = "ECS_SERVICE_AVERAGE_MEMORY_UTILIZATION"
	PredefinedMetric_KAFKA_BROKER_STORAGE_UTILIZATION               PredefinedMetric = "KAFKA_BROKER_STORAGE_UTILIZATION"
	PredefinedMetric_LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION     PredefinedMetric = "LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION"
	PredefinedMetric_RDS_READER_AVERAGE_CPU_UTILIZATION             PredefinedMetric = "RDS_READER_AVERAGE_CPU_UTILIZATION"
	PredefinedMetric_RDS_READER_AVERAGE_DATABASE_CONNECTIONS        PredefinedMetric = "RDS_READER_AVERAGE_DATABASE_CONNECTIONS"
	PredefinedMetric_SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE     PredefinedMetric = "SAGEMAKER_VARIANT_INVOCATIONS_PER_INSTANCE"
)

type ScalableTarget

type ScalableTarget interface {
	awscdk.Resource
	IScalableTarget
	Env() *awscdk.ResourceEnvironment
	Node() constructs.Node
	PhysicalName() *string
	Role() awsiam.IRole
	ScalableTargetId() *string
	Stack() awscdk.Stack
	AddToRolePolicy(statement awsiam.PolicyStatement)
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	GeneratePhysicalName() *string
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	GetResourceNameAttribute(nameAttr *string) *string
	ScaleOnMetric(id *string, props *BasicStepScalingPolicyProps) StepScalingPolicy
	ScaleOnSchedule(id *string, action *ScalingSchedule)
	ScaleToTrackMetric(id *string, props *BasicTargetTrackingScalingPolicyProps) TargetTrackingScalingPolicy
	ToString() *string
}

Define a scalable target.

TODO: EXAMPLE

Experimental.

func NewScalableTarget

func NewScalableTarget(scope constructs.Construct, id *string, props *ScalableTargetProps) ScalableTarget

Experimental.

type ScalableTargetProps

type ScalableTargetProps struct {
	// The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.
	// Experimental.
	MaxCapacity *float64 `json:"maxCapacity"`
	// The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.
	// Experimental.
	MinCapacity *float64 `json:"minCapacity"`
	// The resource identifier to associate with this scalable target.
	//
	// This string consists of the resource type and unique identifier.
	//
	// Example value: `service/ecsStack-MyECSCluster-AB12CDE3F4GH/ecsStack-MyECSService-AB12CDE3F4GH`
	// See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html
	//
	// Experimental.
	ResourceId *string `json:"resourceId"`
	// The scalable dimension that's associated with the scalable target.
	//
	// Specify the service namespace, resource type, and scaling property.
	//
	// Example value: `ecs:service:DesiredCount`
	// See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_ScalingPolicy.html
	//
	// Experimental.
	ScalableDimension *string `json:"scalableDimension"`
	// The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service.
	//
	// For valid AWS service namespace values, see the RegisterScalableTarget
	// action in the Application Auto Scaling API Reference.
	// See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html
	//
	// Experimental.
	ServiceNamespace ServiceNamespace `json:"serviceNamespace"`
	// Role that allows Application Auto Scaling to modify your scalable target.
	// Experimental.
	Role awsiam.IRole `json:"role"`
}

Properties for a scalable target.

TODO: EXAMPLE

Experimental.

type ScalingInterval

type ScalingInterval struct {
	// The capacity adjustment to apply in this interval.
	//
	// The number is interpreted differently based on AdjustmentType:
	//
	// - ChangeInCapacity: add the adjustment to the current capacity.
	//   The number can be positive or negative.
	// - PercentChangeInCapacity: add or remove the given percentage of the current
	//    capacity to itself. The number can be in the range [-100..100].
	// - ExactCapacity: set the capacity to this number. The number must
	//    be positive.
	// Experimental.
	Change *float64 `json:"change"`
	// The lower bound of the interval.
	//
	// The scaling adjustment will be applied if the metric is higher than this value.
	// Experimental.
	Lower *float64 `json:"lower"`
	// The upper bound of the interval.
	//
	// The scaling adjustment will be applied if the metric is lower than this value.
	// Experimental.
	Upper *float64 `json:"upper"`
}

A range of metric values in which to apply a certain scaling operation.

TODO: EXAMPLE

Experimental.

type ScalingSchedule

type ScalingSchedule struct {
	// When this scheduled action expires.
	// Experimental.
	EndTime *time.Time `json:"endTime"`
	// The new maximum capacity.
	//
	// During the scheduled time, the current capacity is above the maximum
	// capacity, Application Auto Scaling scales in to the maximum capacity.
	//
	// At least one of maxCapacity and minCapacity must be supplied.
	// Experimental.
	MaxCapacity *float64 `json:"maxCapacity"`
	// The new minimum capacity.
	//
	// During the scheduled time, if the current capacity is below the minimum
	// capacity, Application Auto Scaling scales out to the minimum capacity.
	//
	// At least one of maxCapacity and minCapacity must be supplied.
	// Experimental.
	MinCapacity *float64 `json:"minCapacity"`
	// When to perform this action.
	// Experimental.
	Schedule Schedule `json:"schedule"`
	// When this scheduled action becomes active.
	// Experimental.
	StartTime *time.Time `json:"startTime"`
}

A scheduled scaling action.

TODO: EXAMPLE

Experimental.

type Schedule

type Schedule interface {
	ExpressionString() *string
}

Schedule for scheduled scaling actions.

TODO: EXAMPLE

Experimental.

func Schedule_At

func Schedule_At(moment *time.Time) Schedule

Construct a Schedule from a moment in time. Experimental.

func Schedule_Cron

func Schedule_Cron(options *CronOptions) Schedule

Create a schedule from a set of cron fields. Experimental.

func Schedule_Expression

func Schedule_Expression(expression *string) Schedule

Construct a schedule from a literal schedule expression. Experimental.

func Schedule_Rate

func Schedule_Rate(duration awscdk.Duration) Schedule

Construct a schedule from an interval and a time unit. Experimental.

type ServiceNamespace

type ServiceNamespace string

The service that supports Application AutoScaling.

TODO: EXAMPLE

Experimental.

const (
	ServiceNamespace_APPSTREAM          ServiceNamespace = "APPSTREAM"
	ServiceNamespace_COMPREHEND         ServiceNamespace = "COMPREHEND"
	ServiceNamespace_CUSTOM_RESOURCE    ServiceNamespace = "CUSTOM_RESOURCE"
	ServiceNamespace_DYNAMODB           ServiceNamespace = "DYNAMODB"
	ServiceNamespace_EC2                ServiceNamespace = "EC2"
	ServiceNamespace_ECS                ServiceNamespace = "ECS"
	ServiceNamespace_ELASTIC_MAP_REDUCE ServiceNamespace = "ELASTIC_MAP_REDUCE"
	ServiceNamespace_KAFKA              ServiceNamespace = "KAFKA"
	ServiceNamespace_LAMBDA             ServiceNamespace = "LAMBDA"
	ServiceNamespace_RDS                ServiceNamespace = "RDS"
	ServiceNamespace_SAGEMAKER          ServiceNamespace = "SAGEMAKER"
)

type StepScalingAction

type StepScalingAction interface {
	constructs.Construct
	Node() constructs.Node
	ScalingPolicyArn() *string
	AddAdjustment(adjustment *AdjustmentTier)
	ToString() *string
}

Define a step scaling action.

This kind of scaling policy adjusts the target capacity in configurable steps. The size of the step is configurable based on the metric's distance to its alarm threshold.

This Action must be used as the target of a CloudWatch alarm to take effect.

TODO: EXAMPLE

Experimental.

func NewStepScalingAction

func NewStepScalingAction(scope constructs.Construct, id *string, props *StepScalingActionProps) StepScalingAction

Experimental.

type StepScalingActionProps

type StepScalingActionProps struct {
	// How the adjustment numbers are interpreted.
	// Experimental.
	AdjustmentType AdjustmentType `json:"adjustmentType"`
	// Grace period after scaling activity.
	//
	// For scale out policies, multiple scale outs during the cooldown period are
	// squashed so that only the biggest scale out happens.
	//
	// For scale in policies, subsequent scale ins during the cooldown period are
	// ignored.
	// See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_StepScalingPolicyConfiguration.html
	//
	// Experimental.
	Cooldown awscdk.Duration `json:"cooldown"`
	// The aggregation type for the CloudWatch metrics.
	// Experimental.
	MetricAggregationType MetricAggregationType `json:"metricAggregationType"`
	// Minimum absolute number to adjust capacity with as result of percentage scaling.
	//
	// Only when using AdjustmentType = PercentChangeInCapacity, this number controls
	// the minimum absolute effect size.
	// Experimental.
	MinAdjustmentMagnitude *float64 `json:"minAdjustmentMagnitude"`
	// A name for the scaling policy.
	// Experimental.
	PolicyName *string `json:"policyName"`
	// The scalable target.
	// Experimental.
	ScalingTarget IScalableTarget `json:"scalingTarget"`
}

Properties for a scaling policy.

TODO: EXAMPLE

Experimental.

type StepScalingPolicy

type StepScalingPolicy interface {
	constructs.Construct
	LowerAction() StepScalingAction
	LowerAlarm() awscloudwatch.Alarm
	Node() constructs.Node
	UpperAction() StepScalingAction
	UpperAlarm() awscloudwatch.Alarm
	ToString() *string
}

Define a scaling strategy which scales depending on absolute values of some metric.

You can specify the scaling behavior for various values of the metric.

Implemented using one or more CloudWatch alarms and Step Scaling Policies.

TODO: EXAMPLE

Experimental.

func NewStepScalingPolicy

func NewStepScalingPolicy(scope constructs.Construct, id *string, props *StepScalingPolicyProps) StepScalingPolicy

Experimental.

type StepScalingPolicyProps

type StepScalingPolicyProps struct {
	// How the adjustment numbers inside 'intervals' are interpreted.
	// Experimental.
	AdjustmentType AdjustmentType `json:"adjustmentType"`
	// Grace period after scaling activity.
	//
	// Subsequent scale outs during the cooldown period are squashed so that only
	// the biggest scale out happens.
	//
	// Subsequent scale ins during the cooldown period are ignored.
	// See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_StepScalingPolicyConfiguration.html
	//
	// Experimental.
	Cooldown awscdk.Duration `json:"cooldown"`
	// How many evaluation periods of the metric to wait before triggering a scaling action.
	//
	// Raising this value can be used to smooth out the metric, at the expense
	// of slower response times.
	// Experimental.
	EvaluationPeriods *float64 `json:"evaluationPeriods"`
	// Metric to scale on.
	// Experimental.
	Metric awscloudwatch.IMetric `json:"metric"`
	// Aggregation to apply to all data points over the evaluation periods.
	//
	// Only has meaning if `evaluationPeriods != 1`.
	// Experimental.
	MetricAggregationType MetricAggregationType `json:"metricAggregationType"`
	// Minimum absolute number to adjust capacity with as result of percentage scaling.
	//
	// Only when using AdjustmentType = PercentChangeInCapacity, this number controls
	// the minimum absolute effect size.
	// Experimental.
	MinAdjustmentMagnitude *float64 `json:"minAdjustmentMagnitude"`
	// The intervals for scaling.
	//
	// Maps a range of metric values to a particular scaling behavior.
	// Experimental.
	ScalingSteps *[]*ScalingInterval `json:"scalingSteps"`
	// The scaling target.
	// Experimental.
	ScalingTarget IScalableTarget `json:"scalingTarget"`
}

TODO: EXAMPLE

Experimental.

type TargetTrackingScalingPolicy

type TargetTrackingScalingPolicy interface {
	constructs.Construct
	Node() constructs.Node
	ScalingPolicyArn() *string
	ToString() *string
}

TODO: EXAMPLE

Experimental.

func NewTargetTrackingScalingPolicy

func NewTargetTrackingScalingPolicy(scope constructs.Construct, id *string, props *TargetTrackingScalingPolicyProps) TargetTrackingScalingPolicy

Experimental.

type TargetTrackingScalingPolicyProps

type TargetTrackingScalingPolicyProps struct {
	// Indicates whether scale in by the target tracking policy is disabled.
	//
	// If the value is true, scale in is disabled and the target tracking policy
	// won't remove capacity from the scalable resource. Otherwise, scale in is
	// enabled and the target tracking policy can remove capacity from the
	// scalable resource.
	// Experimental.
	DisableScaleIn *bool `json:"disableScaleIn"`
	// A name for the scaling policy.
	// Experimental.
	PolicyName *string `json:"policyName"`
	// Period after a scale in activity completes before another scale in activity can start.
	// Experimental.
	ScaleInCooldown awscdk.Duration `json:"scaleInCooldown"`
	// Period after a scale out activity completes before another scale out activity can start.
	// Experimental.
	ScaleOutCooldown awscdk.Duration `json:"scaleOutCooldown"`
	// A custom metric for application autoscaling.
	//
	// The metric must track utilization. Scaling out will happen if the metric is higher than
	// the target value, scaling in will happen in the metric is lower than the target value.
	//
	// Exactly one of customMetric or predefinedMetric must be specified.
	// Experimental.
	CustomMetric awscloudwatch.IMetric `json:"customMetric"`
	// A predefined metric for application autoscaling.
	//
	// The metric must track utilization. Scaling out will happen if the metric is higher than
	// the target value, scaling in will happen in the metric is lower than the target value.
	//
	// Exactly one of customMetric or predefinedMetric must be specified.
	// Experimental.
	PredefinedMetric PredefinedMetric `json:"predefinedMetric"`
	// Identify the resource associated with the metric type.
	//
	// Only used for predefined metric ALBRequestCountPerTarget.
	//
	// Example value: `app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>`
	// Experimental.
	ResourceLabel *string `json:"resourceLabel"`
	// The target value for the metric.
	// Experimental.
	TargetValue *float64 `json:"targetValue"`
	// Experimental.
	ScalingTarget IScalableTarget `json:"scalingTarget"`
}

Properties for a concrete TargetTrackingPolicy.

Adds the scalingTarget.

TODO: EXAMPLE

Experimental.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL