listPagesByEngagement method

Future<ListPagesByEngagementResult> listPagesByEngagement({
  1. required String engagementId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the engagements to contact channels that occurred by engaging a contact.

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 maxResults : The maximum number of engagements to contact channels to list per page of results.

Parameter nextToken : The pagination token to continue to the next page of results.

Implementation

Future<ListPagesByEngagementResult> listPagesByEngagement({
  required String engagementId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    1024,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SSMContacts.ListPagesByEngagement'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'EngagementId': engagementId,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListPagesByEngagementResult.fromJson(jsonResponse.body);
}