Skip to content

list_business_support_subscription_history async

list_business_support_subscription_history(
    *,
    config_overrides: Optional[AsyncBillingClientConfig] = None,
    billing_month: Optional[BusinessSupportBillingMonth] = None,
    account_id: Optional[AccountId] = None,
    start_date: Optional[datetime] = None,
    end_date: Optional[datetime] = None,
    max_results: Optional[int] = None,
    next_token: Optional[PageToken] = None,
) -> ListBusinessSupportSubscriptionHistoryResponse

Returns the history of Business Support subscription contracts across accounts.

Parameters:

  • billing_month (Optional[BusinessSupportBillingMonth], default: None ) –

    The billing month to retrieve subscription contracts for, in YYYY-MM format. If you don't specify a value, defaults to the current month.

  • account_id (Optional[AccountId], default: None ) –

    The account ID to filter results to a specific account. If you don't specify a value, the response includes subscription history for all accounts.

  • start_date (Optional[datetime], default: None ) –

    The start date to filter subscription contracts from.

  • end_date (Optional[datetime], default: None ) –

    The end date to filter subscription contracts to.

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

    The maximum number of results to return per page. Default is 100.

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

    The pagination token for the next page of results.

Raises:

Source code in docs_src/capo_billing/_services/async_billing.py
async def list_business_support_subscription_history(
    self,
    *,
    config_overrides: Optional[AsyncBillingClientConfig] = None,
    billing_month: Optional[
        "capo_billing.types.business_support_billing_month.BusinessSupportBillingMonth"
    ] = None,
    account_id: Optional["capo_billing.types.account_id.AccountId"] = None,
    start_date: Optional[datetime.datetime] = None,
    end_date: Optional[datetime.datetime] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_billing.types.page_token.PageToken"] = None,
) -> "capo_billing.types.list_business_support_subscription_history_response.ListBusinessSupportSubscriptionHistoryResponse":
    """<p>Returns the history of Business Support subscription contracts across accounts.</p>

    Args:
        billing_month: <p>The billing month to retrieve subscription contracts for, in YYYY-MM format. If you don't specify a value, defaults to the current month.</p>
        account_id: <p>The account ID to filter results to a specific account. If you don't specify a value, the response includes subscription history for all accounts.</p>
        start_date: <p>The start date to filter subscription contracts from.</p>
        end_date: <p>The end date to filter subscription contracts to.</p>
        max_results: <p>The maximum number of results to return per page. Default is 100.</p>
        next_token: <p>The pagination token for the next page of results.</p>

    Raises:
        capo_billing.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_billing.errors.internal_server_exception.InternalServerException: <p>The request processing failed because of an unknown error, exception, or failure. </p>
        capo_billing.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified ARN in the request doesn't exist. </p>
        capo_billing.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
        capo_billing.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
        capo_billing.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_billing.types.list_business_support_subscription_history_request.ListBusinessSupportSubscriptionHistoryRequest]",
    ) -> AsyncOperationResponse[
        "capo_billing.types.list_business_support_subscription_history_response.ListBusinessSupportSubscriptionHistoryResponse"
    ]:
        import capo_billing._operations.aws_billing.list_business_support_subscription_history

        (
            output,
            http_response,
        ) = await capo_billing._operations.aws_billing.list_business_support_subscription_history.async_list_business_support_subscription_history(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBusinessSupportSubscriptionHistory")
    )
    input_: capo_billing.types.list_business_support_subscription_history_request.ListBusinessSupportSubscriptionHistoryRequest = {}
    if billing_month is not None:
        input_["billing_month"] = billing_month
    if account_id is not None:
        input_["account_id"] = account_id
    if start_date is not None:
        input_["start_date"] = start_date
    if end_date is not None:
        input_["end_date"] = end_date
    if max_results is not None:
        input_["max_results"] = max_results
    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