Skip to content

BillingClient#

Index > Billing > BillingClient

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

BillingClient#

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

# BillingClient usage example

from boto3.session import Session
from types_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.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from types_boto3_billing.client import Exceptions

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

Methods#

can_paginate#

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:
    ...

generate_presigned_url#

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:
    ...

create_billing_view#

Creates a billing view with the specified billing view attributes.

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

# create_billing_view method definition

def create_billing_view(
    self,
    *,
    name: str,
    sourceViews: Sequence[str],
    description: str = ...,
    dataFilterExpression: ExpressionTypeDef = ...,  # (1)
    clientToken: str = ...,
    resourceTags: Sequence[ResourceTagTypeDef] = ...,  # (2)
) -> CreateBillingViewResponseTypeDef:  # (3)
    ...
  1. See ExpressionTypeDef
  2. See ResourceTagTypeDef
  3. See CreateBillingViewResponseTypeDef
# create_billing_view method usage example with argument unpacking

kwargs: CreateBillingViewRequestRequestTypeDef = {  # (1)
    "name": ...,
    "sourceViews": ...,
}

parent.create_billing_view(**kwargs)
  1. See CreateBillingViewRequestRequestTypeDef

delete_billing_view#

Deletes the specified billing view.

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

# delete_billing_view method definition

def delete_billing_view(
    self,
    *,
    arn: str,
) -> DeleteBillingViewResponseTypeDef:  # (1)
    ...
  1. See DeleteBillingViewResponseTypeDef
# delete_billing_view method usage example with argument unpacking

kwargs: DeleteBillingViewRequestRequestTypeDef = {  # (1)
    "arn": ...,
}

parent.delete_billing_view(**kwargs)
  1. See DeleteBillingViewRequestRequestTypeDef

get_billing_view#

Returns the metadata associated to the specified billing view ARN.

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

# get_billing_view method definition

def get_billing_view(
    self,
    *,
    arn: str,
) -> GetBillingViewResponseTypeDef:  # (1)
    ...
  1. See GetBillingViewResponseTypeDef
# get_billing_view method usage example with argument unpacking

kwargs: GetBillingViewRequestRequestTypeDef = {  # (1)
    "arn": ...,
}

parent.get_billing_view(**kwargs)
  1. See GetBillingViewRequestRequestTypeDef

get_resource_policy#

Returns the resource-based policy document attached to the resource in JSON format.

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

# get_resource_policy method definition

def get_resource_policy(
    self,
    *,
    resourceArn: str,
) -> GetResourcePolicyResponseTypeDef:  # (1)
    ...
  1. See GetResourcePolicyResponseTypeDef
# get_resource_policy method usage example with argument unpacking

kwargs: GetResourcePolicyRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.get_resource_policy(**kwargs)
  1. See GetResourcePolicyRequestRequestTypeDef

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)
    arns: Sequence[str] = ...,
    billingViewTypes: Sequence[BillingViewTypeType] = ...,  # (2)
    ownerAccountId: str = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListBillingViewsResponseTypeDef:  # (3)
    ...
  1. See ActiveTimeRangeTypeDef
  2. See BillingViewTypeType
  3. See ListBillingViewsResponseTypeDef
# list_billing_views method usage example with argument unpacking

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

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

list_source_views_for_billing_view#

Lists the source views (managed Amazon Web Services billing views) associated with the billing view.

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

# list_source_views_for_billing_view method definition

def list_source_views_for_billing_view(
    self,
    *,
    arn: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListSourceViewsForBillingViewResponseTypeDef:  # (1)
    ...
  1. See ListSourceViewsForBillingViewResponseTypeDef
# list_source_views_for_billing_view method usage example with argument unpacking

kwargs: ListSourceViewsForBillingViewRequestRequestTypeDef = {  # (1)
    "arn": ...,
}

parent.list_source_views_for_billing_view(**kwargs)
  1. See ListSourceViewsForBillingViewRequestRequestTypeDef

list_tags_for_resource#

Lists tags associated with the billing view resource.

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

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

tag_resource#

An API operation for adding one or more tags (key-value pairs) to a resource.

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

# tag_resource method definition

def tag_resource(
    self,
    *,
    resourceArn: str,
    resourceTags: Sequence[ResourceTagTypeDef],  # (1)
) -> dict[str, Any]:
    ...
  1. See ResourceTagTypeDef
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "resourceTags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Removes one or more tags from a resource.

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

# untag_resource method definition

def untag_resource(
    self,
    *,
    resourceArn: str,
    resourceTagKeys: Sequence[str],
) -> dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "resourceTagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_billing_view#

An API to update the attributes of the billing view.

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

# update_billing_view method definition

def update_billing_view(
    self,
    *,
    arn: str,
    name: str = ...,
    description: str = ...,
    dataFilterExpression: ExpressionTypeDef = ...,  # (1)
) -> UpdateBillingViewResponseTypeDef:  # (2)
    ...
  1. See ExpressionTypeDef
  2. See UpdateBillingViewResponseTypeDef
# update_billing_view method usage example with argument unpacking

kwargs: UpdateBillingViewRequestRequestTypeDef = {  # (1)
    "arn": ...,
}

parent.update_billing_view(**kwargs)
  1. See UpdateBillingViewRequestRequestTypeDef

get_paginator#

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