Skip to content
v2.278.0

LoadBasedAutoScalingProperty Struct ​

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opsworks as opsworks } from 'aws-cdk-lib';
const loadBasedAutoScalingProperty: opsworks.CfnLayer.LoadBasedAutoScalingProperty = {
  downScaling: {
    cpuThreshold: 123,
    ignoreMetricsTime: 123,
    instanceCount: 123,
    loadThreshold: 123,
    memoryThreshold: 123,
    thresholdsWaitTime: 123,
  },
  enable: false,
  upScaling: {
    cpuThreshold: 123,
    ignoreMetricsTime: 123,
    instanceCount: 123,
    loadThreshold: 123,
    memoryThreshold: 123,
    thresholdsWaitTime: 123,
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_opsworks as opsworks

load_based_auto_scaling_property = opsworks.CfnLayer.LoadBasedAutoScalingProperty(
    down_scaling=opsworks.CfnLayer.AutoScalingThresholdsProperty(
        cpu_threshold=123,
        ignore_metrics_time=123,
        instance_count=123,
        load_threshold=123,
        memory_threshold=123,
        thresholds_wait_time=123
    ),
    enable=False,
    up_scaling=opsworks.CfnLayer.AutoScalingThresholdsProperty(
        cpu_threshold=123,
        ignore_metrics_time=123,
        instance_count=123,
        load_threshold=123,
        memory_threshold=123,
        thresholds_wait_time=123
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.opsworks.*;

LoadBasedAutoScalingProperty loadBasedAutoScalingProperty = LoadBasedAutoScalingProperty.builder()
        .downScaling(AutoScalingThresholdsProperty.builder()
                .cpuThreshold(123)
                .ignoreMetricsTime(123)
                .instanceCount(123)
                .loadThreshold(123)
                .memoryThreshold(123)
                .thresholdsWaitTime(123)
                .build())
        .enable(false)
        .upScaling(AutoScalingThresholdsProperty.builder()
                .cpuThreshold(123)
                .ignoreMetricsTime(123)
                .instanceCount(123)
                .loadThreshold(123)
                .memoryThreshold(123)
                .thresholdsWaitTime(123)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.OpsWorks;

var loadBasedAutoScalingProperty = new LoadBasedAutoScalingProperty {
    DownScaling = new AutoScalingThresholdsProperty {
        CpuThreshold = 123,
        IgnoreMetricsTime = 123,
        InstanceCount = 123,
        LoadThreshold = 123,
        MemoryThreshold = 123,
        ThresholdsWaitTime = 123
    },
    Enable = false,
    UpScaling = new AutoScalingThresholdsProperty {
        CpuThreshold = 123,
        IgnoreMetricsTime = 123,
        InstanceCount = 123,
        LoadThreshold = 123,
        MemoryThreshold = 123,
        ThresholdsWaitTime = 123
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

loadBasedAutoScalingProperty := &LoadBasedAutoScalingProperty{
	DownScaling: &AutoScalingThresholdsProperty{
		CpuThreshold: jsii.Number(123),
		IgnoreMetricsTime: jsii.Number(123),
		InstanceCount: jsii.Number(123),
		LoadThreshold: jsii.Number(123),
		MemoryThreshold: jsii.Number(123),
		ThresholdsWaitTime: jsii.Number(123),
	},
	Enable: jsii.Boolean(false),
	UpScaling: &AutoScalingThresholdsProperty{
		CpuThreshold: jsii.Number(123),
		IgnoreMetricsTime: jsii.Number(123),
		InstanceCount: jsii.Number(123),
		LoadThreshold: jsii.Number(123),
		MemoryThreshold: jsii.Number(123),
		ThresholdsWaitTime: jsii.Number(123),
	},
}

Properties ​

downScalingoptionalIResolvable | CfnLayer.AutoScalingThresholdsPropertydown_scalingoptionaltyping.Union[IResolvable, AutoScalingThresholdsProperty]downScalingoptionalIResolvableDownScalingoptionalIResolvableDownScalingoptionalinterface{} #
An `AutoScalingThresholds` object that describes the downscaling configuration, which defines how and when OpsWorks Stacks reduces the number of instances.
enableoptionalboolean | IResolvableenableoptionaltyping.Union[bool, IResolvable]enableoptionalBooleanEnableoptionalboolEnableoptionalinterface{} #
Whether load-based auto scaling is enabled for the layer.
upScalingoptionalIResolvable | CfnLayer.AutoScalingThresholdsPropertyup_scalingoptionaltyping.Union[IResolvable, AutoScalingThresholdsProperty]upScalingoptionalIResolvableUpScalingoptionalIResolvableUpScalingoptionalinterface{} #
An `AutoScalingThresholds` object that describes the upscaling configuration, which defines how and when OpsWorks Stacks increases the number of instances.