listSyslogConfigurations method

Future<ListSyslogConfigurationsResponse> listSyslogConfigurations({
  1. String? logGroupIdentifier,
  2. int? maxResults,
  3. String? nextToken,
  4. String? vpcEndpointId,
})

Returns a list of syslog configurations. You can optionally filter the results by log group or VPC endpoint.

May throw AccessDeniedException. May throw InvalidOperationException. May throw InvalidParameterException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException.

Parameter logGroupIdentifier : The name or ARN of the log group to filter syslog configurations for.

Parameter maxResults : The maximum number of syslog configurations to return in the response.

Parameter nextToken : The token for the next set of items to return. You received this token from a previous call.

Parameter vpcEndpointId : The ID of the VPC endpoint to filter syslog configurations for.

Implementation

Future<ListSyslogConfigurationsResponse> listSyslogConfigurations({
  String? logGroupIdentifier,
  int? maxResults,
  String? nextToken,
  String? vpcEndpointId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    50,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Logs_20140328.ListSyslogConfigurations'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (logGroupIdentifier != null)
        'logGroupIdentifier': logGroupIdentifier,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
      if (vpcEndpointId != null) 'vpcEndpointId': vpcEndpointId,
    },
  );

  return ListSyslogConfigurationsResponse.fromJson(jsonResponse.body);
}