Skip to content

describe_alarm_contributors async

describe_alarm_contributors(
    *,
    config_overrides: Optional[AsyncCloudWatchClientConfig] = None,
    alarm_name: Optional[AlarmName] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeAlarmContributorsOutput

Returns the information of the current alarm contributors that are in ALARM state. This operation returns details about the individual time series that contribute to the alarm's state.

Parameters:

  • alarm_name (Optional[AlarmName], default: None ) –

    The name of the alarm for which to retrieve contributor information.

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

    The token returned by a previous call to indicate that there is more data available.

Raises:

Source code in docs_src/capo_cloudwatch/_services/async_cloud_watch.py
async def describe_alarm_contributors(
    self,
    *,
    config_overrides: Optional[AsyncCloudWatchClientConfig] = None,
    alarm_name: Optional["capo_cloudwatch.types.alarm_name.AlarmName"] = None,
    next_token: Optional["capo_cloudwatch.types.next_token.NextToken"] = None,
) -> "capo_cloudwatch.types.describe_alarm_contributors_output.DescribeAlarmContributorsOutput":
    """<p>Returns the information of the current alarm contributors that are in <code>ALARM</code> state. This operation returns details about the individual time series that contribute to the alarm's state.</p>

    Args:
        alarm_name: <p>The name of the alarm for which to retrieve contributor information.</p>
        next_token: <p>The token returned by a previous call to indicate that there is more data available.</p>

    Raises:
        capo_cloudwatch.errors.invalid_next_token.InvalidNextToken: <p>The next token specified is invalid.</p>
        capo_cloudwatch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The named resource does not exist.</p>
        capo_cloudwatch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatch.types.describe_alarm_contributors_input.DescribeAlarmContributorsInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatch.types.describe_alarm_contributors_output.DescribeAlarmContributorsOutput"
    ]:
        import capo_cloudwatch._operations.granite_service_version20100801.describe_alarm_contributors

        (
            output,
            http_response,
        ) = await capo_cloudwatch._operations.granite_service_version20100801.describe_alarm_contributors.async_describe_alarm_contributors(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeAlarmContributors")
    )
    input_: capo_cloudwatch.types.describe_alarm_contributors_input.DescribeAlarmContributorsInput = {}
    if alarm_name is not None:
        input_["alarm_name"] = alarm_name
    if next_token is not None:
        input_["next_token"] = next_token

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