cancel method
Cancels unfinished test executions in a test matrix.
This call returns immediately and cancellation proceeds asynchronously. If the matrix is already final, this operation will have no effect. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Test Matrix does not exist
Request parameters:
projectId
- Cloud project that owns the test.
testMatrixId
- Test matrix that will be canceled.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a CancelTestMatrixResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<CancelTestMatrixResponse> cancel(
core.String projectId,
core.String testMatrixId, {
core.String? $fields,
}) async {
final _queryParams = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final _url = 'v1/projects/' +
commons.escapeVariable('$projectId') +
'/testMatrices/' +
commons.escapeVariable('$testMatrixId') +
':cancel';
final _response = await _requester.request(
_url,
'POST',
queryParams: _queryParams,
);
return CancelTestMatrixResponse.fromJson(
_response as core.Map<core.String, core.dynamic>);
}