listSecurityConfigs method

Future<ListSecurityConfigsResponse> listSecurityConfigs({
  1. required SecurityConfigType type,
  2. int? maxResults,
  3. String? nextToken,
})

Returns information about configured OpenSearch Serverless security configurations. For more information, see SAML authentication for Amazon OpenSearch Serverless.

May throw InternalServerException. May throw ValidationException.

Parameter type : The type of security configuration.

Parameter maxResults : An optional parameter that specifies the maximum number of results to return. You can use nextToken to get the next page of results. The default is 20.

Parameter nextToken : If your initial ListSecurityConfigs operation returns a nextToken, you can include the returned nextToken in subsequent ListSecurityConfigs operations, which returns results in the next page.

Implementation

Future<ListSecurityConfigsResponse> listSecurityConfigs({
  required SecurityConfigType type,
  int? maxResults,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'OpenSearchServerless.ListSecurityConfigs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'type': type.value,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListSecurityConfigsResponse.fromJson(jsonResponse.body);
}