Table of Contents
A low-level client representing AWS Cost and Usage Report Service:
import boto3
client = boto3.client('cur')
These are the available methods:
Check if an operation can be paginated.
Delete a specified report definition
See also: AWS API Documentation
Request Syntax
response = client.delete_report_definition(
ReportName='string'
)
{
'ResponseMessage': 'string'
}
Response Structure
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'
)
dict
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 a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns an object that can wait for some condition.
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',
]
}
)
[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.
{}
Response Structure
The available paginators are:
paginator = client.get_paginator('describe_report_definitions')
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'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'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