Skip to content

delete_telemetry_rule async

delete_telemetry_rule(
    rule_identifier: RuleIdentifier,
    *,
    config_overrides: Optional[AsyncObservabilityAdminClientConfig] = None,
) -> None

Deletes a telemetry rule from your account. Any telemetry configurations previously created by the rule will remain but no new resources will be configured by this rule.

Parameters:

  • rule_identifier (RuleIdentifier) –

    The identifier (name or ARN) of the telemetry rule to delete.

Raises:

Source code in docs_src/capo_observabilityadmin/_services/async_observability_admin.py
async def delete_telemetry_rule(
    self,
    rule_identifier: "capo_observabilityadmin.types.rule_identifier.RuleIdentifier",
    *,
    config_overrides: Optional[AsyncObservabilityAdminClientConfig] = None,
) -> None:
    """<p> Deletes a telemetry rule from your account. Any telemetry configurations previously created by the rule will remain but no new resources will be configured by this rule. </p>

    Args:
        rule_identifier: <p> The identifier (name or ARN) of the telemetry rule to delete. </p>

    Raises:
        capo_observabilityadmin.errors.access_denied_exception.AccessDeniedException: <p> Indicates you don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html">Access management for Amazon Web Services resources</a> in the IAM user guide. </p>
        capo_observabilityadmin.errors.internal_server_exception.InternalServerException: <p> Indicates the request has failed to process because of an unknown server error, exception, or failure. </p>
        capo_observabilityadmin.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified resource (such as a telemetry rule) could not be found. </p>
        capo_observabilityadmin.errors.too_many_requests_exception.TooManyRequestsException: <p> The request throughput limit was exceeded. </p>
        capo_observabilityadmin.errors.validation_exception.ValidationException: <p> Indicates input validation failed. Check your request parameters and retry the request. </p>
        capo_observabilityadmin.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_observabilityadmin.types.delete_telemetry_rule_input.DeleteTelemetryRuleInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_observabilityadmin._operations.observability_admin.delete_telemetry_rule

        (
            output,
            http_response,
        ) = await capo_observabilityadmin._operations.observability_admin.delete_telemetry_rule.async_delete_telemetry_rule(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteTelemetryRule")
    )
    input_: capo_observabilityadmin.types.delete_telemetry_rule_input.DeleteTelemetryRuleInput = {
        "rule_identifier": rule_identifier
    }

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