Skip to content

view_billing

view_billing(
    *,
    config_overrides: Optional[Route53DomainsClientConfig] = None,
    start: Optional[Timestamp] = None,
    end: Optional[Timestamp] = None,
    marker: Optional[PageMarker] = None,
    max_items: Optional[PageMaxItems] = None,
) -> ViewBillingResponse

Returns all the domain-related billing records for the current Amazon Web Services account for a specified period

Parameters:

  • start (Optional[Timestamp], default: None ) –

    The beginning date and time for the time period for which you want a list of billing records. Specify the date and time in Unix time format and Coordinated Universal time (UTC).

  • end (Optional[Timestamp], default: None ) –

    The end date and time for the time period for which you want a list of billing records. Specify the date and time in Unix time format and Coordinated Universal time (UTC).

  • marker (Optional[PageMarker], default: None ) –

    For an initial request for a list of billing records, omit this element. If the number of billing records that are associated with the current Amazon Web Services account during the specified period is greater than the value that you specified for MaxItems, you can use Marker to return additional billing records. Get the value of NextPageMarker from the previous response, and submit another request that includes the value of NextPageMarker in the Marker element.

    Constraints: The marker must match the value of NextPageMarker that was returned in the previous response.

  • max_items (Optional[PageMaxItems], default: None ) –

    The number of billing records to be returned.

    Default: 20

Raises:

  • InvalidInput –

    The requested item is not acceptable. For example, for APIs that accept a domain name, the request might specify a domain name that doesn't belong to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, the password might be invalid.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_route_53_domains/_services/route53_domains.py
def view_billing(
    self,
    *,
    config_overrides: Optional[Route53DomainsClientConfig] = None,
    start: Optional["capo_route_53_domains.types.timestamp.Timestamp"] = None,
    end: Optional["capo_route_53_domains.types.timestamp.Timestamp"] = None,
    marker: Optional["capo_route_53_domains.types.page_marker.PageMarker"] = None,
    max_items: Optional[
        "capo_route_53_domains.types.page_max_items.PageMaxItems"
    ] = None,
) -> "capo_route_53_domains.types.view_billing_response.ViewBillingResponse":
    """<p>Returns all the domain-related billing records for the current Amazon Web Services account for a specified period</p>

    Args:
        start: <p>The beginning date and time for the time period for which you want a list of billing records. Specify the date and time in Unix time format and Coordinated Universal time (UTC).</p>
        end: <p>The end date and time for the time period for which you want a list of billing records. Specify the date and time in Unix time format and Coordinated Universal time (UTC).</p>
        marker: <p>For an initial request for a list of billing records, omit this element. If the number of billing records that are associated with the current Amazon Web Services account during the specified period is greater than the value that you specified for <code>MaxItems</code>, you can use <code>Marker</code> to return additional billing records. Get the value of <code>NextPageMarker</code> from the previous response, and submit another request that includes the value of <code>NextPageMarker</code> in the <code>Marker</code> element. </p> <p>Constraints: The marker must match the value of <code>NextPageMarker</code> that was returned in the previous response.</p>
        max_items: <p>The number of billing records to be returned.</p> <p>Default: 20</p>

    Raises:
        capo_route_53_domains.errors.invalid_input.InvalidInput: <p>The requested item is not acceptable. For example, for APIs that accept a domain name, the request might specify a domain name that doesn't belong to the account that submitted the request. For <code>AcceptDomainTransferFromAnotherAwsAccount</code>, the password might be invalid.</p>
        capo_route_53_domains.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route_53_domains.types.view_billing_request.ViewBillingRequest]",
    ) -> OperationResponse[
        "capo_route_53_domains.types.view_billing_response.ViewBillingResponse"
    ]:
        import capo_route_53_domains._operations.route53_domains_v20140515.view_billing

        output, http_response = (
            capo_route_53_domains._operations.route53_domains_v20140515.view_billing.view_billing(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ViewBilling")
    )
    input_: capo_route_53_domains.types.view_billing_request.ViewBillingRequest = {}
    if start is not None:
        input_["start"] = start
    if end is not None:
        input_["end"] = end
    if marker is not None:
        input_["marker"] = marker
    if max_items is not None:
        input_["max_items"] = max_items

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