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.BillingViewHealthStatusException,
    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:
    ...associate_source_views#
Associates one or more source billing views with an existing billing view.
Type annotations and code completion for boto3.client("billing").associate_source_views method.
 boto3 documentation
# associate_source_views method definition
def associate_source_views(
    self,
    *,
    arn: str,
    sourceViews: Sequence[str],
) -> AssociateSourceViewsResponseTypeDef:  # (1)
    ...# associate_source_views method usage example with argument unpacking
kwargs: AssociateSourceViewsRequestTypeDef = {  # (1)
    "arn": ...,
    "sourceViews": ...,
}
parent.associate_source_views(**kwargs)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: ExpressionUnionTypeDef = ...,  # (1)
    clientToken: str = ...,
    resourceTags: Sequence[ResourceTagTypeDef] = ...,  # (2)
) -> CreateBillingViewResponseTypeDef:  # (3)
    ...- See ExpressionUnionTypeDef
- See Sequence[ResourceTagTypeDef]
- See CreateBillingViewResponseTypeDef
# create_billing_view method usage example with argument unpacking
kwargs: CreateBillingViewRequestTypeDef = {  # (1)
    "name": ...,
    "sourceViews": ...,
}
parent.create_billing_view(**kwargs)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,
    force: bool = ...,
) -> DeleteBillingViewResponseTypeDef:  # (1)
    ...# delete_billing_view method usage example with argument unpacking
kwargs: DeleteBillingViewRequestTypeDef = {  # (1)
    "arn": ...,
}
parent.delete_billing_view(**kwargs)disassociate_source_views#
Removes the association between one or more source billing views and an existing billing view.
Type annotations and code completion for boto3.client("billing").disassociate_source_views method.
 boto3 documentation
# disassociate_source_views method definition
def disassociate_source_views(
    self,
    *,
    arn: str,
    sourceViews: Sequence[str],
) -> DisassociateSourceViewsResponseTypeDef:  # (1)
    ...# disassociate_source_views method usage example with argument unpacking
kwargs: DisassociateSourceViewsRequestTypeDef = {  # (1)
    "arn": ...,
    "sourceViews": ...,
}
parent.disassociate_source_views(**kwargs)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)
    ...# get_billing_view method usage example with argument unpacking
kwargs: GetBillingViewRequestTypeDef = {  # (1)
    "arn": ...,
}
parent.get_billing_view(**kwargs)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)
    ...# get_resource_policy method usage example with argument unpacking
kwargs: GetResourcePolicyRequestTypeDef = {  # (1)
    "resourceArn": ...,
}
parent.get_resource_policy(**kwargs)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 = ...,
    sourceAccountId: str = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListBillingViewsResponseTypeDef:  # (3)
    ...- See ActiveTimeRangeTypeDef
- See Sequence[BillingViewTypeType]
- See ListBillingViewsResponseTypeDef
# list_billing_views method usage example with argument unpacking
kwargs: ListBillingViewsRequestTypeDef = {  # (1)
    "activeTimeRange": ...,
}
parent.list_billing_views(**kwargs)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)
    ...# list_source_views_for_billing_view method usage example with argument unpacking
kwargs: ListSourceViewsForBillingViewRequestTypeDef = {  # (1)
    "arn": ...,
}
parent.list_source_views_for_billing_view(**kwargs)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)
    ...# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)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]:
    ...- See Sequence[ResourceTagTypeDef]
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "resourceTags": ...,
}
parent.tag_resource(**kwargs)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: UntagResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "resourceTagKeys": ...,
}
parent.untag_resource(**kwargs)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: ExpressionUnionTypeDef = ...,  # (1)
) -> UpdateBillingViewResponseTypeDef:  # (2)
    ...# update_billing_view method usage example with argument unpacking
kwargs: UpdateBillingViewRequestTypeDef = {  # (1)
    "arn": ...,
}
parent.update_billing_view(**kwargs)get_paginator#
Type annotations and code completion for boto3.client("billing").get_paginator method with overloads.
- client.get_paginator("list_billing_views")-> ListBillingViewsPaginator
- client.get_paginator("list_source_views_for_billing_view")-> ListSourceViewsForBillingViewPaginator