Skip to content

list_custom_line_item_versions async

list_custom_line_item_versions(
    arn: CustomLineItemArn,
    *,
    config_overrides: Optional[AsyncbillingconductorClientConfig] = None,
    max_results: Optional[MaxCustomLineItemResults] = None,
    next_token: Optional[Token] = None,
    filters: Optional[ListCustomLineItemVersionsFilter] = None,
) -> ListCustomLineItemVersionsOutput

A paginated call to get a list of all custom line item versions.

Parameters:

  • arn (CustomLineItemArn) –

    The Amazon Resource Name (ARN) for the custom line item.

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

    The maximum number of custom line item versions to retrieve.

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

    The pagination token that's used on subsequent calls to retrieve custom line item versions.

  • filters (Optional[ListCustomLineItemVersionsFilter], default: None ) –

    A ListCustomLineItemVersionsFilter that specifies the billing period range in which the custom line item versions are applied.

Raises:

Source code in docs_src/capo_billingconductor/_services/async_billingconductor.py
async def list_custom_line_item_versions(
    self,
    arn: "capo_billingconductor.types.custom_line_item_arn.CustomLineItemArn",
    *,
    config_overrides: Optional[AsyncbillingconductorClientConfig] = None,
    max_results: Optional[
        "capo_billingconductor.types.max_custom_line_item_results.MaxCustomLineItemResults"
    ] = None,
    next_token: Optional["capo_billingconductor.types.token.Token"] = None,
    filters: Optional[
        "capo_billingconductor.types.list_custom_line_item_versions_filter.ListCustomLineItemVersionsFilter"
    ] = None,
) -> "capo_billingconductor.types.list_custom_line_item_versions_output.ListCustomLineItemVersionsOutput":
    """<p>A paginated call to get a list of all custom line item versions.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) for the custom line item.</p>
        max_results: <p>The maximum number of custom line item versions to retrieve.</p>
        next_token: <p>The pagination token that's used on subsequent calls to retrieve custom line item versions.</p>
        filters: <p>A <code>ListCustomLineItemVersionsFilter</code> that specifies the billing period range in which the custom line item versions are applied.</p>

    Raises:
        capo_billingconductor.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. </p>
        capo_billingconductor.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request. </p>
        capo_billingconductor.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
        capo_billingconductor.errors.validation_exception.ValidationException: <p>The input doesn't match with the constraints specified by Amazon Web Services services.</p>
        capo_billingconductor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_billingconductor.types.list_custom_line_item_versions_input.ListCustomLineItemVersionsInput]",
    ) -> AsyncOperationResponse[
        "capo_billingconductor.types.list_custom_line_item_versions_output.ListCustomLineItemVersionsOutput"
    ]:
        import capo_billingconductor._operations.aws_billing_conductor.list_custom_line_item_versions

        (
            output,
            http_response,
        ) = await capo_billingconductor._operations.aws_billing_conductor.list_custom_line_item_versions.async_list_custom_line_item_versions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_billingconductor.types.list_custom_line_item_versions_output.ListCustomLineItemVersionsOutput",
    ) -> dict[str, Any]:
        import capo_billingconductor.types.list_custom_line_item_versions_output

        return capo_billingconductor.types.list_custom_line_item_versions_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListCustomLineItemVersions", redact_output=_redact_output
        ),
    )
    input_: capo_billingconductor.types.list_custom_line_item_versions_input.ListCustomLineItemVersionsInput = {
        "arn": arn
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if filters is not None:
        input_["filters"] = filters

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