cancelResourceRequest method
Cancels the specified resource operation request. For more information, see Canceling resource operation requests in the Amazon Web Services Cloud Control API User Guide.
Only resource operations requests with a status of PENDING or
IN_PROGRESS can be canceled.
May throw ConcurrentModificationException.
May throw RequestTokenNotFoundException.
Parameter requestToken :
The RequestToken of the ProgressEvent object
returned by the resource operation request.
Implementation
Future<CancelResourceRequestOutput> cancelResourceRequest({
required String requestToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'CloudApiService.CancelResourceRequest'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'RequestToken': requestToken,
},
);
return CancelResourceRequestOutput.fromJson(jsonResponse.body);
}