Table of Contents
CostandUsageReportService.Client¶A low-level client representing AWS Cost and Usage Report Service:
client = session.create_client('cur')
These are the available methods:
can_paginate()delete_report_definition()describe_report_definitions()generate_presigned_url()get_paginator()get_waiter()put_report_definition()can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
delete_report_definition(**kwargs)¶Delete a specified report definition
See also: AWS API Documentation
Request Syntax
response = client.delete_report_definition(
ReportName='string'
)
| Parameters: | ReportName (string) – Preferred name for a report, it has to be unique. Must starts with a number/letter, case sensitive. Limited to 256 characters. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'ResponseMessage': 'string'
}
Response Structure
|
describe_report_definitions(**kwargs)¶Describe a list of report definitions owned by the account
See also: AWS API Documentation
Request Syntax
response = client.describe_report_definitions(
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ReportDefinitions': [
{
'ReportName': 'string',
'TimeUnit': 'HOURLY'|'DAILY',
'Format': 'textORcsv',
'Compression': 'ZIP'|'GZIP',
'AdditionalSchemaElements': [
'RESOURCES',
],
'S3Bucket': 'string',
'S3Prefix': 'string',
'S3Region': 'us-east-1'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1',
'AdditionalArtifacts': [
'REDSHIFT'|'QUICKSIGHT',
]
},
],
'NextToken': 'string'
}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_waiter(waiter_name)¶put_report_definition(**kwargs)¶Create a new report definition
See also: AWS API Documentation
Request Syntax
response = client.put_report_definition(
ReportDefinition={
'ReportName': 'string',
'TimeUnit': 'HOURLY'|'DAILY',
'Format': 'textORcsv',
'Compression': 'ZIP'|'GZIP',
'AdditionalSchemaElements': [
'RESOURCES',
],
'S3Bucket': 'string',
'S3Prefix': 'string',
'S3Region': 'us-east-1'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1',
'AdditionalArtifacts': [
'REDSHIFT'|'QUICKSIGHT',
]
}
)
| Parameters: | ReportDefinition (dict) – [REQUIRED] The definition of AWS Cost and Usage Report. Customer can specify the report name, time unit, report format, compression format, S3 bucket and additional artifacts and schema elements in the definition.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
The available paginators are:
CostandUsageReportService.Paginator.DescribeReportDefinitions¶paginator = client.get_paginator('describe_report_definitions')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from CostandUsageReportService.Client.describe_report_definitions().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'ReportDefinitions': [
{
'ReportName': 'string',
'TimeUnit': 'HOURLY'|'DAILY',
'Format': 'textORcsv',
'Compression': 'ZIP'|'GZIP',
'AdditionalSchemaElements': [
'RESOURCES',
],
'S3Bucket': 'string',
'S3Prefix': 'string',
'S3Region': 'us-east-1'|'us-west-1'|'us-west-2'|'eu-central-1'|'eu-west-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1',
'AdditionalArtifacts': [
'REDSHIFT'|'QUICKSIGHT',
]
},
],
}
Response Structure
|