describeLifecycleHooks method
Describes the lifecycle hooks for the specified Auto Scaling group.
May throw ResourceContentionFault.
Parameter autoScalingGroupName
:
The name of the Auto Scaling group.
Parameter lifecycleHookNames
:
The names of one or more lifecycle hooks. If you omit this parameter, all
lifecycle hooks are described.
Implementation
Future<DescribeLifecycleHooksAnswer> describeLifecycleHooks({
required String autoScalingGroupName,
List<String>? lifecycleHookNames,
}) async {
ArgumentError.checkNotNull(autoScalingGroupName, 'autoScalingGroupName');
_s.validateStringLength(
'autoScalingGroupName',
autoScalingGroupName,
1,
255,
isRequired: true,
);
final $request = <String, dynamic>{};
$request['AutoScalingGroupName'] = autoScalingGroupName;
lifecycleHookNames?.also((arg) => $request['LifecycleHookNames'] = arg);
final $result = await _protocol.send(
$request,
action: 'DescribeLifecycleHooks',
version: '2011-01-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DescribeLifecycleHooksType'],
shapes: shapes,
resultWrapper: 'DescribeLifecycleHooksResult',
);
return DescribeLifecycleHooksAnswer.fromXml($result);
}