Skip to content

BillingClient#

Index > Billing > BillingClient

Auto-generated documentation for Billing type annotations stubs module mypy-boto3-billing.

BillingClient#

Type annotations and code completion for boto3.client("billing"). boto3 documentation

# BillingClient usage example

from boto3.session import Session
from mypy_boto3_billing.client import BillingClient

def get_billing_client() -> BillingClient:
    return Session().client("billing")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("billing").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("billing")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.InternalServerException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_billing.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("billing").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("billing").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("billing").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

list_billing_views#

Lists the billing views available for a given time period.

Type annotations and code completion for boto3.client("billing").list_billing_views method. boto3 documentation

# list_billing_views method definition

def list_billing_views(
    self,
    *,
    activeTimeRange: ActiveTimeRangeTypeDef,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListBillingViewsResponseTypeDef:  # (2)
    ...
  1. See ActiveTimeRangeTypeDef
  2. See ListBillingViewsResponseTypeDef
# list_billing_views method usage example with argument unpacking

kwargs: ListBillingViewsRequestRequestTypeDef = {  # (1)
    "activeTimeRange": ...,
}

parent.list_billing_views(**kwargs)
  1. See ListBillingViewsRequestRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("billing").get_paginator method with overloads.