disableMetricsCollection method
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
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,
);
}