Skip to content

describe_notification_rule async

describe_notification_rule(
    arn: NotificationRuleArn,
    *,
    config_overrides: Optional[AsynccodestarnotificationsClientConfig] = None,
) -> DescribeNotificationRuleResult

Returns information about a specified notification rule.

Parameters:

Raises:

Source code in docs_src/capo_codestar_notifications/_services/async_codestarnotifications.py
async def describe_notification_rule(
    self,
    arn: "capo_codestar_notifications.types.notification_rule_arn.NotificationRuleArn",
    *,
    config_overrides: Optional[AsynccodestarnotificationsClientConfig] = None,
) -> "capo_codestar_notifications.types.describe_notification_rule_result.DescribeNotificationRuleResult":
    """<p>Returns information about a specified notification rule.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the notification rule.</p>

    Raises:
        capo_codestar_notifications.errors.resource_not_found_exception.ResourceNotFoundException: <p>CodeStar Notifications can't find a resource that matches the provided ARN. </p>
        capo_codestar_notifications.errors.validation_exception.ValidationException: <p>One or more parameter values are not valid.</p>
        capo_codestar_notifications.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codestar_notifications.types.describe_notification_rule_request.DescribeNotificationRuleRequest]",
    ) -> AsyncOperationResponse[
        "capo_codestar_notifications.types.describe_notification_rule_result.DescribeNotificationRuleResult"
    ]:
        import capo_codestar_notifications._operations.code_star_notifications_20191015.describe_notification_rule

        (
            output,
            http_response,
        ) = await capo_codestar_notifications._operations.code_star_notifications_20191015.describe_notification_rule.async_describe_notification_rule(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_codestar_notifications.types.describe_notification_rule_result.DescribeNotificationRuleResult",
    ) -> dict[str, Any]:
        import capo_codestar_notifications.types.describe_notification_rule_result

        return capo_codestar_notifications.types.describe_notification_rule_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeNotificationRule", redact_output=_redact_output),
    )
    input_: capo_codestar_notifications.types.describe_notification_rule_request.DescribeNotificationRuleRequest = {
        "arn": arn
    }

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