listDataSourceAttachments method

Future<ListDataSourceAttachmentsResponse> listDataSourceAttachments({
  1. required String id,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a paginated list of all data source attachments for an OpenSearch application, including attachments in all states (PENDING, ATTACHED, and FAILED).

May throw AccessDeniedException. May throw DisabledOperationException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter id : The unique identifier or name of the OpenSearch application to list attachments for.

Parameter maxResults : The maximum number of results to return per page. The default is 50.

Parameter nextToken : The pagination token from a previous call to retrieve the next set of results.

Implementation

Future<ListDataSourceAttachmentsResponse> listDataSourceAttachments({
  required String id,
  int? maxResults,
  String? nextToken,
}) async {
  final $payload = <String, dynamic>{
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/2021-01-01/opensearch/application/${Uri.encodeComponent(id)}/listDataSourceAttachments',
    exceptionFnMap: _exceptionFns,
  );
  return ListDataSourceAttachmentsResponse.fromJson(response);
}