updateProblem method
Future<void>
updateProblem({
- required String problemId,
- UpdateStatus? updateStatus,
- Visibility? visibility,
Updates the visibility of the problem or specifies the problem as
RESOLVED.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter problemId :
The ID of the problem.
Parameter updateStatus :
The status of the problem. Arguments can be passed for only problems that
show a status of RECOVERING.
Parameter visibility :
The visibility of a problem. When you pass a value of
IGNORED, the problem is removed from the default view, and
all notifications for the problem are suspended. When VISIBLE
is passed, the IGNORED action is reversed.
Implementation
Future<void> updateProblem({
required String problemId,
UpdateStatus? updateStatus,
Visibility? visibility,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'EC2WindowsBarleyService.UpdateProblem'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProblemId': problemId,
if (updateStatus != null) 'UpdateStatus': updateStatus.value,
if (visibility != null) 'Visibility': visibility.value,
},
);
}