deleteResourcePolicy method

Future<void> deleteResourcePolicy({
  1. String? policyName,
})

Deletes a resource policy from this account. This revokes the access of the identities in that policy to put log events to this account.

May throw InvalidParameterException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.

Parameter policyName : The name of the policy to be revoked. This parameter is required.

Implementation

Future<void> deleteResourcePolicy({
  String? policyName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Logs_20140328.DeleteResourcePolicy'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (policyName != null) 'policyName': policyName,
    },
  );
}