searchDashboards method

Future<SearchDashboardsResponse> searchDashboards({
  1. required String awsAccountId,
  2. required List<DashboardSearchFilter> filters,
  3. int? maxResults,
  4. String? nextToken,
})

Searches for dashboards that belong to a user.

May throw ThrottlingException. May throw ResourceNotFoundException. May throw InvalidParameterValueException. May throw UnsupportedUserEditionException. May throw InvalidNextTokenException. May throw InternalFailureException.

Parameter awsAccountId : The ID of the AWS account that contains the user whose dashboards you're searching for.

Parameter filters : The filters to apply to the search. Currently, you can search only by user name, for example, "Filters": { "Name": "QUICKSIGHT_USER", "Operator": "StringEquals", "Value": "arn:aws:quicksight:us-east-1:1:user/default/UserName1" }

Parameter maxResults : The maximum number of results to be returned per request.

Parameter nextToken : The token for the next set of results, or null if there are no more results.

Implementation

Future<SearchDashboardsResponse> searchDashboards({
  required String awsAccountId,
  required List<DashboardSearchFilter> filters,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(filters, 'filters');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    'Filters': filters,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/search/dashboards',
    exceptionFnMap: _exceptionFns,
  );
  return SearchDashboardsResponse.fromJson(response);
}