OpsWorks.Client.
describe_load_based_auto_scaling
(**kwargs)¶Describes load-based auto scaling configurations for specified layers.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
See also: AWS API Documentation
Request Syntax
response = client.describe_load_based_auto_scaling(
LayerIds=[
'string',
]
)
[REQUIRED]
An array of layer IDs.
{
'LoadBasedAutoScalingConfigurations': [
{
'LayerId': 'string',
'Enable': True|False,
'UpScaling': {
'InstanceCount': 123,
'ThresholdsWaitTime': 123,
'IgnoreMetricsTime': 123,
'CpuThreshold': 123.0,
'MemoryThreshold': 123.0,
'LoadThreshold': 123.0,
'Alarms': [
'string',
]
},
'DownScaling': {
'InstanceCount': 123,
'ThresholdsWaitTime': 123,
'IgnoreMetricsTime': 123,
'CpuThreshold': 123.0,
'MemoryThreshold': 123.0,
'LoadThreshold': 123.0,
'Alarms': [
'string',
]
}
},
]
}
Response Structure
Contains the response to a DescribeLoadBasedAutoScaling
request.
An array of LoadBasedAutoScalingConfiguration
objects that describe each layer's configuration.
Describes a layer's load-based auto scaling configuration.
The layer ID.
Whether load-based auto scaling is enabled for the layer.
An AutoScalingThresholds
object that describes the upscaling configuration, which defines how and when AWS OpsWorks Stacks increases the number of instances.
The number of instances to add or remove when the load exceeds a threshold.
The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks Stacks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime
allows you to direct AWS OpsWorks Stacks to suppress scaling events long enough to get the new instances online.
The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).
Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
Note
To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms
. You can either have AWS OpsWorks Stacks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks Stacks to Act on Your Behalf.
An AutoScalingThresholds
object that describes the downscaling configuration, which defines how and when AWS OpsWorks Stacks reduces the number of instances.
The number of instances to add or remove when the load exceeds a threshold.
The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, AWS OpsWorks Stacks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime
allows you to direct AWS OpsWorks Stacks to suppress scaling events long enough to get the new instances online.
The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).
Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
Note
To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms
. You can either have AWS OpsWorks Stacks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing AWS OpsWorks Stacks to Act on Your Behalf.
Exceptions
OpsWorks.Client.exceptions.ValidationException
OpsWorks.Client.exceptions.ResourceNotFoundException