CostandUsageReportServiceClient#
Index > CostandUsageReportService > CostandUsageReportServiceClient
Auto-generated documentation for CostandUsageReportService type annotations stubs module types-aiobotocore-cur.
CostandUsageReportServiceClient#
Type annotations and code completion for session.create_client("cur")
boto3 documentation
CostandUsageReportServiceClient usage example
from aiobotocore.session import get_session
from types_aiobotocore_cur.client import CostandUsageReportServiceClient
session = get_session()
async with session.create_client("cur") as client:
client: CostandUsageReportServiceClient
Exceptions#
aiobotocore
client exceptions are generated in runtime.
This class provides code completion for session.create_client("cur").exceptions
structure.
CostandUsageReportServiceClient.exceptions usage example
async with session.create_client("cur") as client:
try:
do_something(client)
except (
client.ClientError,
client.DuplicateReportNameException,
client.InternalErrorException,
client.ReportLimitReachedException,
client.ValidationException,
) as e:
print(e)
CostandUsageReportServiceClient usage type checking example
from types_aiobotocore_cur.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for session.create_client("cur").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 session.create_client("cur").close
method.
boto3 documentation
# close method definition
await def close(
self,
) -> None:
...
delete_report_definition#
Deletes the specified report.
Type annotations and code completion for session.create_client("cur").delete_report_definition
method.
boto3 documentation
# delete_report_definition method definition
await def delete_report_definition(
self,
*,
ReportName: str = ...,
) -> DeleteReportDefinitionResponseTypeDef: # (1)
...
# delete_report_definition method usage example with argument unpacking
kwargs: DeleteReportDefinitionRequestRequestTypeDef = { # (1)
"ReportName": ...,
}
parent.delete_report_definition(**kwargs)
describe_report_definitions#
Lists the AWS Cost and Usage reports available to this account.
Type annotations and code completion for session.create_client("cur").describe_report_definitions
method.
boto3 documentation
# describe_report_definitions method definition
await def describe_report_definitions(
self,
*,
MaxResults: int = ...,
NextToken: str = ...,
) -> DescribeReportDefinitionsResponseTypeDef: # (1)
...
# describe_report_definitions method usage example with argument unpacking
kwargs: DescribeReportDefinitionsRequestRequestTypeDef = { # (1)
"MaxResults": ...,
}
parent.describe_report_definitions(**kwargs)
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for session.create_client("cur").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
await def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
modify_report_definition#
Allows you to programatically update your report preferences.
Type annotations and code completion for session.create_client("cur").modify_report_definition
method.
boto3 documentation
# modify_report_definition method definition
await def modify_report_definition(
self,
*,
ReportName: str,
ReportDefinition: ReportDefinitionTypeDef, # (1)
) -> Dict[str, Any]:
...
# modify_report_definition method usage example with argument unpacking
kwargs: ModifyReportDefinitionRequestRequestTypeDef = { # (1)
"ReportName": ...,
"ReportDefinition": ...,
}
parent.modify_report_definition(**kwargs)
put_report_definition#
Creates a new report using the description that you provide.
Type annotations and code completion for session.create_client("cur").put_report_definition
method.
boto3 documentation
# put_report_definition method definition
await def put_report_definition(
self,
*,
ReportDefinition: ReportDefinitionTypeDef, # (1)
) -> Dict[str, Any]:
...
# put_report_definition method usage example with argument unpacking
kwargs: PutReportDefinitionRequestRequestTypeDef = { # (1)
"ReportDefinition": ...,
}
parent.put_report_definition(**kwargs)
__aenter__#
Type annotations and code completion for session.create_client("cur").__aenter__
method.
boto3 documentation
# __aenter__ method definition
await def __aenter__(
self,
) -> CostandUsageReportServiceClient:
...
__aexit__#
Type annotations and code completion for session.create_client("cur").__aexit__
method.
boto3 documentation
# __aexit__ method definition
await def __aexit__(
self,
exc_type: Any,
exc_val: Any,
exc_tb: Any,
) -> Any:
...
get_paginator#
Type annotations and code completion for session.create_client("cur").get_paginator
method with overloads.
client.get_paginator("describe_report_definitions")
-> DescribeReportDefinitionsPaginator