deleteProtection method

Future<void> deleteProtection({
  1. required String protectionId,
})

Deletes an AWS Shield Advanced Protection.

May throw InternalErrorException. May throw ResourceNotFoundException. May throw OptimisticLockException.

Parameter protectionId : The unique identifier (ID) for the Protection object to be deleted.

Implementation

Future<void> deleteProtection({
  required String protectionId,
}) async {
  ArgumentError.checkNotNull(protectionId, 'protectionId');
  _s.validateStringLength(
    'protectionId',
    protectionId,
    1,
    36,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSShield_20160616.DeleteProtection'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ProtectionId': protectionId,
    },
  );
}