deleteResourcePolicy method
Removes the association of a resource-based policy from an app monitor.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw InvalidPolicyRevisionIdException.
May throw PolicyNotFoundException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
The app monitor that you want to remove the resource policy from.
Parameter policyRevisionId :
Specifies a specific policy revision to delete. Provide a
PolicyRevisionId to ensure an atomic delete operation. If the
revision ID that you provide doesn't match the latest policy revision ID,
the request will be rejected with an
InvalidPolicyRevisionIdException error.
Implementation
Future<DeleteResourcePolicyResponse> deleteResourcePolicy({
required String name,
String? policyRevisionId,
}) async {
final $query = <String, List<String>>{
if (policyRevisionId != null) 'policyRevisionId': [policyRevisionId],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/appmonitor/${Uri.encodeComponent(name)}/policy',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeleteResourcePolicyResponse.fromJson(response);
}