stopEngagement method
Stops an engagement before it finishes the final stage of the escalation plan or engagement plan. Further contacts aren't engaged.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter engagementId :
The Amazon Resource Name (ARN) of the engagement.
Parameter reason :
The reason that you're stopping the engagement.
Implementation
Future<void> stopEngagement({
required String engagementId,
String? reason,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SSMContacts.StopEngagement'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'EngagementId': engagementId,
if (reason != null) 'Reason': reason,
},
);
}