createExclusion method

Future<LogExclusion> createExclusion(
  1. CreateExclusionRequest request
)

Creates a new exclusion in the _Default sink in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource.

Throws a http.ClientException if there were problems communicating with the API service. Throws a StatusException if the API failed with a Status message. Throws a ServiceException for any other failure.

Implementation

Future<LogExclusion> createExclusion(CreateExclusionRequest request) async {
  final url = Uri.https(_host, '/v2/${request.parent}/exclusions');
  final response = await _client.post(url, body: request.exclusion);
  return LogExclusion.fromJson(response);
}