describeNotifyTemplates method
Describes the specified notify templates or all notify templates in your account.
If you specify template IDs, the output includes information for only the specified notify templates. If you specify filters, the output includes information for only those notify templates that meet the filter criteria. If you don't specify template IDs or filters, the output includes information for all notify templates.
If you specify a template ID that isn't valid, an error is returned.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter filters :
An array of NotifyTemplateFilter objects to filter the results on.
Parameter maxResults :
The maximum number of results to return per each request.
Parameter nextToken :
The token to be used for the next set of paginated results. You don't need
to supply a value for this field in the initial request.
Parameter templateIds :
An array of template IDs to describe.
Implementation
Future<DescribeNotifyTemplatesResult> describeNotifyTemplates({
List<NotifyTemplateFilter>? filters,
int? maxResults,
String? nextToken,
List<String>? templateIds,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PinpointSMSVoiceV2.DescribeNotifyTemplates'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (templateIds != null) 'TemplateIds': templateIds,
},
);
return DescribeNotifyTemplatesResult.fromJson(jsonResponse.body);
}