describeRegistrationAttachments method

Future<DescribeRegistrationAttachmentsResult> describeRegistrationAttachments({
  1. List<RegistrationAttachmentFilter>? filters,
  2. int? maxResults,
  3. String? nextToken,
  4. List<String>? registrationAttachmentIds,
})

Retrieves the specified registration attachments or all registration attachments associated with your Amazon Web Services account.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter filters : An array of RegistrationAttachmentFilter objects to filter the results.

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 registrationAttachmentIds : The unique identifier of registration attachments to find. This is an array of RegistrationAttachmentId.

Implementation

Future<DescribeRegistrationAttachmentsResult>
    describeRegistrationAttachments({
  List<RegistrationAttachmentFilter>? filters,
  int? maxResults,
  String? nextToken,
  List<String>? registrationAttachmentIds,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PinpointSMSVoiceV2.DescribeRegistrationAttachments'
  };
  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 (registrationAttachmentIds != null)
        'RegistrationAttachmentIds': registrationAttachmentIds,
    },
  );

  return DescribeRegistrationAttachmentsResult.fromJson(jsonResponse.body);
}