deleteLifecycleHook method

Future<void> deleteLifecycleHook({
  1. required String autoScalingGroupName,
  2. required String lifecycleHookName,
})

Deletes the specified lifecycle hook.

If there are any outstanding lifecycle actions, they are completed first (ABANDON for launching instances, CONTINUE for terminating instances).

May throw ResourceContentionFault.

Parameter autoScalingGroupName : The name of the Auto Scaling group.

Parameter lifecycleHookName : The name of the lifecycle hook.

Implementation

Future<void> deleteLifecycleHook({
  required String autoScalingGroupName,
  required String lifecycleHookName,
}) async {
  ArgumentError.checkNotNull(autoScalingGroupName, 'autoScalingGroupName');
  _s.validateStringLength(
    'autoScalingGroupName',
    autoScalingGroupName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(lifecycleHookName, 'lifecycleHookName');
  _s.validateStringLength(
    'lifecycleHookName',
    lifecycleHookName,
    1,
    255,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['AutoScalingGroupName'] = autoScalingGroupName;
  $request['LifecycleHookName'] = lifecycleHookName;
  await _protocol.send(
    $request,
    action: 'DeleteLifecycleHook',
    version: '2011-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteLifecycleHookType'],
    shapes: shapes,
    resultWrapper: 'DeleteLifecycleHookResult',
  );
}