listScramSecrets method

Future<ListScramSecretsResponse> listScramSecrets({
  1. required String clusterArn,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of the Scram Secrets associated with an Amazon MSK cluster.

May throw BadRequestException. May throw UnauthorizedException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.

Parameter clusterArn :

The arn of the cluster.

Parameter maxResults :

The maxResults of the query.

Parameter nextToken :

The nextToken of the query.

Implementation

Future<ListScramSecretsResponse> listScramSecrets({
  required String clusterArn,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(clusterArn, 'clusterArn');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v1/clusters/${Uri.encodeComponent(clusterArn)}/scram-secrets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListScramSecretsResponse.fromJson(response);
}