Skip to content

describe_subscribers_for_notification

describe_subscribers_for_notification(
    account_id: AccountId,
    budget_name: BudgetName,
    notification: Notification,
    *,
    config_overrides: Optional[BudgetsClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[GenericString] = None,
) -> DescribeSubscribersForNotificationResponse

Lists the subscribers that are associated with a notification.

Parameters:

  • account_id (AccountId) –

    The accountId that is associated with the budget whose subscribers you want descriptions of.

  • budget_name (BudgetName) –

    The name of the budget whose subscribers you want descriptions of.

  • notification (Notification) –

    The notification whose subscribers you want to list.

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

    An optional integer that represents how many entries a paginated response contains.

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

    The pagination token that you include in your request to indicate the next set of results that you want to retrieve.

Raises:

Source code in docs_src/capo_budgets/_services/budgets.py
def describe_subscribers_for_notification(
    self,
    account_id: "capo_budgets.types.account_id.AccountId",
    budget_name: "capo_budgets.types.budget_name.BudgetName",
    notification: "capo_budgets.types.notification.Notification",
    *,
    config_overrides: Optional[BudgetsClientConfig] = None,
    max_results: Optional["capo_budgets.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_budgets.types.generic_string.GenericString"] = None,
) -> "capo_budgets.types.describe_subscribers_for_notification_response.DescribeSubscribersForNotificationResponse":
    """<p>Lists the subscribers that are associated with a notification.</p>

    Args:
        account_id: <p>The <code>accountId</code> that is associated with the budget whose subscribers you want descriptions of.</p>
        budget_name: <p>The name of the budget whose subscribers you want descriptions of.</p>
        notification: <p>The notification whose subscribers you want to list.</p>
        max_results: <p>An optional integer that represents how many entries a paginated response contains.</p>
        next_token: <p>The pagination token that you include in your request to indicate the next set of results that you want to retrieve.</p>

    Raises:
        capo_budgets.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to use this operation with the given parameters.</p>
        capo_budgets.errors.expired_next_token_exception.ExpiredNextTokenException: <p>The pagination token expired.</p>
        capo_budgets.errors.internal_error_exception.InternalErrorException: <p>An error on the server occurred during the processing of your request. Try again later.</p>
        capo_budgets.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The pagination token is invalid.</p>
        capo_budgets.errors.invalid_parameter_exception.InvalidParameterException: <p>An error on the client occurred. Typically, the cause is an invalid input value.</p>
        capo_budgets.errors.not_found_exception.NotFoundException: <p>We can’t locate the resource that you specified.</p>
        capo_budgets.errors.throttling_exception.ThrottlingException: <p>The number of API requests has exceeded the maximum allowed API request throttling limit for the account.</p>
        capo_budgets.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_budgets.types.describe_subscribers_for_notification_request.DescribeSubscribersForNotificationRequest]",
    ) -> OperationResponse[
        "capo_budgets.types.describe_subscribers_for_notification_response.DescribeSubscribersForNotificationResponse"
    ]:
        import capo_budgets._operations.aws_budget_service_gateway.describe_subscribers_for_notification

        output, http_response = (
            capo_budgets._operations.aws_budget_service_gateway.describe_subscribers_for_notification.describe_subscribers_for_notification(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_budgets.types.describe_subscribers_for_notification_response.DescribeSubscribersForNotificationResponse",
    ) -> dict[str, Any]:
        import capo_budgets.types.describe_subscribers_for_notification_response

        return capo_budgets.types.describe_subscribers_for_notification_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeSubscribersForNotification", redact_output=_redact_output
        ),
    )
    input_: capo_budgets.types.describe_subscribers_for_notification_request.DescribeSubscribersForNotificationRequest = {
        "account_id": account_id,
        "budget_name": budget_name,
        "notification": notification,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output