deleteAccelerator method

Future<void> deleteAccelerator({
  1. required String acceleratorArn,
})

Delete an accelerator. Before you can delete an accelerator, you must disable it and remove all dependent resources (listeners and endpoint groups). To disable the accelerator, update the accelerator to set Enabled to false.

The IP addresses are assigned to your accelerator for as long as it exists, even if you disable the accelerator and it no longer accepts or routes traffic. However, when you delete an accelerator, you lose the static IP addresses that are assigned to the accelerator, so you can no longer route traffic by using them. As a best practice, ensure that you have permissions in place to avoid inadvertently deleting accelerators. You can use IAM policies with Global Accelerator to limit the users who have permissions to delete an accelerator. For more information, see Authentication and Access Control in the AWS Global Accelerator Developer Guide.

May throw AcceleratorNotFoundException. May throw AcceleratorNotDisabledException. May throw AssociatedListenerFoundException. May throw InternalServiceErrorException. May throw InvalidArgumentException.

Parameter acceleratorArn : The Amazon Resource Name (ARN) of an accelerator.

Implementation

Future<void> deleteAccelerator({
  required String acceleratorArn,
}) async {
  ArgumentError.checkNotNull(acceleratorArn, 'acceleratorArn');
  _s.validateStringLength(
    'acceleratorArn',
    acceleratorArn,
    0,
    255,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GlobalAccelerator_V20180706.DeleteAccelerator'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AcceleratorArn': acceleratorArn,
    },
  );
}