Skip to content

CostandUsageReportServiceClient

Index > CostandUsageReportService > CostandUsageReportServiceClient

Auto-generated documentation for CostandUsageReportService type annotations stubs module mypy-boto3-cur.

CostandUsageReportServiceClient

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

Usage example
from boto3.session import Session
from mypy_boto3_cur.client import CostandUsageReportServiceClient

def get_cur_client() -> CostandUsageReportServiceClient:
    return Session().client("cur")

Exceptions

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

Usage example
client = boto3.client("cur")

try:
    do_something(client)
except (
    client.ClientError,
    client.DuplicateReportNameException,
    client.InternalErrorException,
    client.ReportLimitReachedException,
    client.ValidationException,
) as e:
    print(e)
Type checking example
from mypy_boto3_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 boto3.client("cur").can_paginate method. boto3 documentation

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

close

Closes underlying endpoint connections.

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

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

delete_report_definition

Deletes the specified report.

Type annotations and code completion for boto3.client("cur").delete_report_definition method. boto3 documentation

Method definition
def delete_report_definition(
    self,
    *,
    ReportName: str = ...,
) -> DeleteReportDefinitionResponseTypeDef:  # (1)
    ...
  1. See DeleteReportDefinitionResponseTypeDef
Usage example with kwargs
kwargs: DeleteReportDefinitionRequestRequestTypeDef = {  # (1)
    "ReportName": ...,
}

parent.delete_report_definition(**kwargs)
  1. See DeleteReportDefinitionRequestRequestTypeDef

describe_report_definitions

Lists the AWS Cost and Usage reports available to this account.

Type annotations and code completion for boto3.client("cur").describe_report_definitions method. boto3 documentation

Method definition
def describe_report_definitions(
    self,
    *,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> DescribeReportDefinitionsResponseTypeDef:  # (1)
    ...
  1. See DescribeReportDefinitionsResponseTypeDef
Usage example with kwargs
kwargs: DescribeReportDefinitionsRequestRequestTypeDef = {  # (1)
    "MaxResults": ...,
}

parent.describe_report_definitions(**kwargs)
  1. See DescribeReportDefinitionsRequestRequestTypeDef

generate_presigned_url

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

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

Method definition
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 boto3.client("cur").modify_report_definition method. boto3 documentation

Method definition
def modify_report_definition(
    self,
    *,
    ReportName: str,
    ReportDefinition: ReportDefinitionTypeDef,  # (1)
) -> Dict[str, Any]:
    ...
  1. See ReportDefinitionTypeDef
Usage example with kwargs
kwargs: ModifyReportDefinitionRequestRequestTypeDef = {  # (1)
    "ReportName": ...,
    "ReportDefinition": ...,
}

parent.modify_report_definition(**kwargs)
  1. See ModifyReportDefinitionRequestRequestTypeDef

put_report_definition

Creates a new report using the description that you provide.

Type annotations and code completion for boto3.client("cur").put_report_definition method. boto3 documentation

Method definition
def put_report_definition(
    self,
    *,
    ReportDefinition: ReportDefinitionTypeDef,  # (1)
) -> Dict[str, Any]:
    ...
  1. See ReportDefinitionTypeDef
Usage example with kwargs
kwargs: PutReportDefinitionRequestRequestTypeDef = {  # (1)
    "ReportDefinition": ...,
}

parent.put_report_definition(**kwargs)
  1. See PutReportDefinitionRequestRequestTypeDef

get_paginator

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