Skip to content

list_syslog_configurations async

list_syslog_configurations(
    *,
    config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
    log_group_identifier: Optional[LogGroupIdentifier] = None,
    vpc_endpoint_id: Optional[VpcEndpointId] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[ListSyslogConfigurationsMaxResults] = None,
) -> ListSyslogConfigurationsResponse

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

Parameters:

  • log_group_identifier (Optional[LogGroupIdentifier], default: None ) –

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

  • vpc_endpoint_id (Optional[VpcEndpointId], default: None ) –

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

  • next_token (Optional[NextToken], default: None ) –

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

  • max_results (Optional[ListSyslogConfigurationsMaxResults], default: None ) –

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

Raises:

Source code in docs_src/capo_cloudwatch_logs/_services/async_cloud_watch_logs.py
async def list_syslog_configurations(
    self,
    *,
    config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
    log_group_identifier: Optional[
        "capo_cloudwatch_logs.types.log_group_identifier.LogGroupIdentifier"
    ] = None,
    vpc_endpoint_id: Optional[
        "capo_cloudwatch_logs.types.vpc_endpoint_id.VpcEndpointId"
    ] = None,
    next_token: Optional["capo_cloudwatch_logs.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_cloudwatch_logs.types.list_syslog_configurations_max_results.ListSyslogConfigurationsMaxResults"
    ] = None,
) -> "capo_cloudwatch_logs.types.list_syslog_configurations_response.ListSyslogConfigurationsResponse":
    """<p>Returns a list of syslog configurations. You can optionally filter the results by log group or VPC endpoint.</p>

    Args:
        log_group_identifier: <p>The name or ARN of the log group to filter syslog configurations for.</p>
        vpc_endpoint_id: <p>The ID of the VPC endpoint to filter syslog configurations for.</p>
        next_token: <p>The token for the next set of items to return. You received this token from a previous call.</p>
        max_results: <p>The maximum number of syslog configurations to return in the response.</p>

    Raises:
        capo_cloudwatch_logs.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
        capo_cloudwatch_logs.errors.invalid_operation_exception.InvalidOperationException: <p>The operation is not valid on the specified resource.</p>
        capo_cloudwatch_logs.errors.invalid_parameter_exception.InvalidParameterException: <p>A parameter is specified incorrectly.</p>
        capo_cloudwatch_logs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_cloudwatch_logs.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service cannot complete the request.</p>
        capo_cloudwatch_logs.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits.</p>
        capo_cloudwatch_logs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatch_logs.types.list_syslog_configurations_request.ListSyslogConfigurationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatch_logs.types.list_syslog_configurations_response.ListSyslogConfigurationsResponse"
    ]:
        import capo_cloudwatch_logs._operations.logs_20140328.list_syslog_configurations

        (
            output,
            http_response,
        ) = await capo_cloudwatch_logs._operations.logs_20140328.list_syslog_configurations.async_list_syslog_configurations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListSyslogConfigurations")
    )
    input_: capo_cloudwatch_logs.types.list_syslog_configurations_request.ListSyslogConfigurationsRequest = {}
    if log_group_identifier is not None:
        input_["log_group_identifier"] = log_group_identifier
    if vpc_endpoint_id is not None:
        input_["vpc_endpoint_id"] = vpc_endpoint_id
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output