disable_metrics_collection

AutoScaling.Client.disable_metrics_collection(**kwargs)

Disables group metrics collection for the specified Auto Scaling group.

See also: AWS API Documentation

Request Syntax

response = client.disable_metrics_collection(
    AutoScalingGroupName='string',
    Metrics=[
        'string',
    ]
)
Parameters
  • AutoScalingGroupName (string) --

    [REQUIRED]

    The name of the Auto Scaling group.

  • Metrics (list) --

    Identifies the metrics to disable.

    You can specify one or more of the following metrics:

    • GroupMinSize
    • GroupMaxSize
    • GroupDesiredCapacity
    • GroupInServiceInstances
    • GroupPendingInstances
    • GroupStandbyInstances
    • GroupTerminatingInstances
    • GroupTotalInstances
    • GroupInServiceCapacity
    • GroupPendingCapacity
    • GroupStandbyCapacity
    • GroupTerminatingCapacity
    • GroupTotalCapacity
    • WarmPoolDesiredCapacity
    • WarmPoolWarmedCapacity
    • WarmPoolPendingCapacity
    • WarmPoolTerminatingCapacity
    • WarmPoolTotalCapacity
    • GroupAndWarmPoolDesiredCapacity
    • GroupAndWarmPoolTotalCapacity

    If you omit this property, all metrics are disabled.

    For more information, see Auto Scaling group metrics in the Amazon EC2 Auto Scaling User Guide .

    • (string) --
Returns

None

Exceptions

  • AutoScaling.Client.exceptions.ResourceContentionFault

Examples

This example disables collecting data for the GroupDesiredCapacity metric for the specified Auto Scaling group.

response = client.disable_metrics_collection(
    AutoScalingGroupName='my-auto-scaling-group',
    Metrics=[
        'GroupDesiredCapacity',
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}