acceptPage method
Used to acknowledge an engagement to a contact channel during an incident.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter acceptCode :
A 6-digit code used to acknowledge the page.
Parameter acceptType :
The type indicates if the page was DELIVERED or
READ.
Parameter pageId :
The Amazon Resource Name (ARN) of the engagement to a contact channel.
Parameter acceptCodeValidation :
An optional field that Incident Manager uses to ENFORCE
AcceptCode validation when acknowledging an page.
Acknowledgement can occur by replying to a page, or when entering the
AcceptCode in the console. Enforcing AcceptCode validation causes Incident
Manager to verify that the code entered by the user matches the code sent
by Incident Manager with the page.
Incident Manager can also IGNORE AcceptCode
validation. Ignoring AcceptCode validation causes Incident
Manager to accept any value entered for the AcceptCode.
Parameter contactChannelId :
The ARN of the contact channel.
Parameter note :
Information provided by the user when the user acknowledges the page.
Implementation
Future<void> acceptPage({
required String acceptCode,
required AcceptType acceptType,
required String pageId,
AcceptCodeValidation? acceptCodeValidation,
String? contactChannelId,
String? note,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SSMContacts.AcceptPage'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AcceptCode': acceptCode,
'AcceptType': acceptType.value,
'PageId': pageId,
if (acceptCodeValidation != null)
'AcceptCodeValidation': acceptCodeValidation.value,
if (contactChannelId != null) 'ContactChannelId': contactChannelId,
if (note != null) 'Note': note,
},
);
}