describeLifecycleHooks method

Future<DescribeLifecycleHooksAnswer> describeLifecycleHooks({
  1. required String autoScalingGroupName,
  2. List<String>? lifecycleHookNames,
})

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);
}