listContactChannels method
Lists all contact channels for the specified contact.
May throw AccessDeniedException.
May throw DataEncryptionException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter contactId :
The Amazon Resource Name (ARN) of the contact.
Parameter maxResults :
The maximum number of contact channels per page.
Parameter nextToken :
The pagination token to continue to the next page of results.
Implementation
Future<ListContactChannelsResult> listContactChannels({
required String contactId,
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.ListContactChannels'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ContactId': contactId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListContactChannelsResult.fromJson(jsonResponse.body);
}