disableMetricsCollection method

Future<void> disableMetricsCollection({
  1. required String autoScalingGroupName,
  2. List<String>? metrics,
})

Disables group metrics for the specified Auto Scaling group.

May throw ResourceContentionFault.

Parameter autoScalingGroupName : The name of the Auto Scaling group.

Parameter metrics : Specifies one or more of the following metrics:

  • GroupMinSize
  • GroupMaxSize
  • GroupDesiredCapacity
  • GroupInServiceInstances
  • GroupPendingInstances
  • GroupStandbyInstances
  • GroupTerminatingInstances
  • GroupTotalInstances
  • GroupInServiceCapacity
  • GroupPendingCapacity
  • GroupStandbyCapacity
  • GroupTerminatingCapacity
  • GroupTotalCapacity
If you omit this parameter, all metrics are disabled.

Implementation

Future<void> disableMetricsCollection({
  required String autoScalingGroupName,
  List<String>? metrics,
}) async {
  ArgumentError.checkNotNull(autoScalingGroupName, 'autoScalingGroupName');
  _s.validateStringLength(
    'autoScalingGroupName',
    autoScalingGroupName,
    1,
    255,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['AutoScalingGroupName'] = autoScalingGroupName;
  metrics?.also((arg) => $request['Metrics'] = arg);
  await _protocol.send(
    $request,
    action: 'DisableMetricsCollection',
    version: '2011-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DisableMetricsCollectionQuery'],
    shapes: shapes,
  );
}