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)
...
# create_billing_view method usage example with argument unpacking
kwargs: CreateBillingViewRequestRequestTypeDef = { # (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,
) -> DeleteBillingViewResponseTypeDef: # (1)
...
# delete_billing_view method usage example with argument unpacking
kwargs: DeleteBillingViewRequestRequestTypeDef = { # (1)
"arn": ...,
}
parent.delete_billing_view(**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: GetBillingViewRequestRequestTypeDef = { # (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: GetResourcePolicyRequestRequestTypeDef = { # (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 = ...,
maxResults: int = ...,
nextToken: str = ...,
) -> ListBillingViewsResponseTypeDef: # (3)
...
# list_billing_views method usage example with argument unpacking
kwargs: ListBillingViewsRequestRequestTypeDef = { # (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: ListSourceViewsForBillingViewRequestRequestTypeDef = { # (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: ListTagsForResourceRequestRequestTypeDef = { # (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]:
...
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestRequestTypeDef = { # (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: UntagResourceRequestRequestTypeDef = { # (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: ExpressionTypeDef = ..., # (1)
) -> UpdateBillingViewResponseTypeDef: # (2)
...
# update_billing_view method usage example with argument unpacking
kwargs: UpdateBillingViewRequestRequestTypeDef = { # (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")
-> ListBillingViewsPaginatorclient.get_paginator("list_source_views_for_billing_view")
-> ListSourceViewsForBillingViewPaginator