Table of Contents
ApplicationCostProfiler.
Client
¶A low-level client representing AWS Application Cost Profiler
This reference provides descriptions of the AWS Application Cost Profiler API.
The AWS Application Cost Profiler API provides programmatic access to view, create, update, and delete application cost report definitions, as well as to import your usage data into the Application Cost Profiler service.
For more information about using this service, see the AWS Application Cost Profiler User Guide .
import boto3
client = boto3.client('applicationcostprofiler')
These are the available methods:
can_paginate()
close()
delete_report_definition()
get_paginator()
get_report_definition()
get_waiter()
import_application_usage()
list_report_definitions()
put_report_definition()
update_report_definition()
can_paginate
(operation_name)¶Check if an operation can be paginated.
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")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
delete_report_definition
(**kwargs)¶Deletes the specified report definition in AWS Application Cost Profiler. This stops the report from being generated.
See also: AWS API Documentation
Request Syntax
response = client.delete_report_definition(
reportId='string'
)
[REQUIRED]
Required. ID of the report to delete.
{
'reportId': 'string'
}
Response Structure
ID of the report that was deleted.
Exceptions
ApplicationCostProfiler.Client.exceptions.InternalServerException
ApplicationCostProfiler.Client.exceptions.ThrottlingException
ApplicationCostProfiler.Client.exceptions.ValidationException
ApplicationCostProfiler.Client.exceptions.AccessDeniedException
get_paginator
(operation_name)¶Create a paginator for an operation.
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")
.client.can_paginate
method to
check if an operation is pageable.get_report_definition
(**kwargs)¶Retrieves the definition of a report already configured in AWS Application Cost Profiler.
See also: AWS API Documentation
Request Syntax
response = client.get_report_definition(
reportId='string'
)
[REQUIRED]
ID of the report to retrieve.
{
'reportId': 'string',
'reportDescription': 'string',
'reportFrequency': 'MONTHLY'|'DAILY'|'ALL',
'format': 'CSV'|'PARQUET',
'destinationS3Location': {
'bucket': 'string',
'prefix': 'string'
},
'createdAt': datetime(2015, 1, 1),
'lastUpdated': datetime(2015, 1, 1)
}
Response Structure
ID of the report retrieved.
Description of the report.
Cadence used to generate the report.
Format of the generated report.
Amazon Simple Storage Service (Amazon S3) location where the report is uploaded.
Name of the S3 bucket.
Prefix for the location to write to.
Timestamp (milliseconds) when this report definition was created.
Timestamp (milliseconds) when this report definition was last updated.
Exceptions
ApplicationCostProfiler.Client.exceptions.InternalServerException
ApplicationCostProfiler.Client.exceptions.ThrottlingException
ApplicationCostProfiler.Client.exceptions.ValidationException
ApplicationCostProfiler.Client.exceptions.AccessDeniedException
get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
import_application_usage
(**kwargs)¶Ingests application usage data from Amazon Simple Storage Service (Amazon S3).
The data must already exist in the S3 location. As part of the action, AWS Application Cost Profiler copies the object from your S3 bucket to an S3 bucket owned by Amazon for processing asynchronously.
See also: AWS API Documentation
Request Syntax
response = client.import_application_usage(
sourceS3Location={
'bucket': 'string',
'key': 'string',
'region': 'ap-east-1'|'me-south-1'|'eu-south-1'|'af-south-1'
}
)
[REQUIRED]
Amazon S3 location to import application usage data from.
Name of the bucket.
Key of the object.
Region of the bucket. Only required for Regions that are disabled by default. For more infomration about Regions that are disabled by default, see Enabling a Region in the AWS General Reference guide .
{
'importId': 'string'
}
Response Structure
ID of the import request.
Exceptions
ApplicationCostProfiler.Client.exceptions.InternalServerException
ApplicationCostProfiler.Client.exceptions.ThrottlingException
ApplicationCostProfiler.Client.exceptions.ValidationException
ApplicationCostProfiler.Client.exceptions.AccessDeniedException
list_report_definitions
(**kwargs)¶Retrieves a list of all reports and their configurations for your AWS account.
The maximum number of reports is one.
See also: AWS API Documentation
Request Syntax
response = client.list_report_definitions(
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'reportDefinitions': [
{
'reportId': 'string',
'reportDescription': 'string',
'reportFrequency': 'MONTHLY'|'DAILY'|'ALL',
'format': 'CSV'|'PARQUET',
'destinationS3Location': {
'bucket': 'string',
'prefix': 'string'
},
'createdAt': datetime(2015, 1, 1),
'lastUpdatedAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
reportDefinitions (list) --
The retrieved reports.
(dict) --
The configuration of a report in AWS Application Cost Profiler.
reportId (string) --
The ID of the report.
reportDescription (string) --
Description of the report
reportFrequency (string) --
The cadence at which the report is generated.
format (string) --
The format used for the generated reports.
destinationS3Location (dict) --
The location in Amazon Simple Storage Service (Amazon S3) the reports should be saved to.
bucket (string) --
Name of the S3 bucket.
prefix (string) --
Prefix for the location to write to.
createdAt (datetime) --
Timestamp (milliseconds) when this report definition was created.
lastUpdatedAt (datetime) --
Timestamp (milliseconds) when this report definition was last updated.
nextToken (string) --
The value of the next token, if it exists. Null if there are no more results.
Exceptions
ApplicationCostProfiler.Client.exceptions.InternalServerException
ApplicationCostProfiler.Client.exceptions.ThrottlingException
ApplicationCostProfiler.Client.exceptions.ValidationException
ApplicationCostProfiler.Client.exceptions.AccessDeniedException
put_report_definition
(**kwargs)¶Creates the report definition for a report in Application Cost Profiler.
See also: AWS API Documentation
Request Syntax
response = client.put_report_definition(
reportId='string',
reportDescription='string',
reportFrequency='MONTHLY'|'DAILY'|'ALL',
format='CSV'|'PARQUET',
destinationS3Location={
'bucket': 'string',
'prefix': 'string'
}
)
[REQUIRED]
Required. ID of the report. You can choose any valid string matching the pattern for the ID.
[REQUIRED]
Required. Description of the report.
[REQUIRED]
Required. The cadence to generate the report.
[REQUIRED]
Required. The format to use for the generated report.
[REQUIRED]
Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the report.
Name of the S3 bucket.
Prefix for the location to write to.
dict
Response Syntax
{
'reportId': 'string'
}
Response Structure
(dict) --
reportId (string) --
ID of the report.
Exceptions
ApplicationCostProfiler.Client.exceptions.InternalServerException
ApplicationCostProfiler.Client.exceptions.ThrottlingException
ApplicationCostProfiler.Client.exceptions.ValidationException
ApplicationCostProfiler.Client.exceptions.AccessDeniedException
ApplicationCostProfiler.Client.exceptions.ServiceQuotaExceededException
update_report_definition
(**kwargs)¶Updates existing report in AWS Application Cost Profiler.
See also: AWS API Documentation
Request Syntax
response = client.update_report_definition(
reportId='string',
reportDescription='string',
reportFrequency='MONTHLY'|'DAILY'|'ALL',
format='CSV'|'PARQUET',
destinationS3Location={
'bucket': 'string',
'prefix': 'string'
}
)
[REQUIRED]
Required. ID of the report to update.
[REQUIRED]
Required. Description of the report.
[REQUIRED]
Required. The cadence to generate the report.
[REQUIRED]
Required. The format to use for the generated report.
[REQUIRED]
Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the report.
Name of the S3 bucket.
Prefix for the location to write to.
dict
Response Syntax
{
'reportId': 'string'
}
Response Structure
(dict) --
reportId (string) --
ID of the report.
Exceptions
ApplicationCostProfiler.Client.exceptions.InternalServerException
ApplicationCostProfiler.Client.exceptions.ThrottlingException
ApplicationCostProfiler.Client.exceptions.ValidationException
ApplicationCostProfiler.Client.exceptions.AccessDeniedException
The available paginators are:
ApplicationCostProfiler.Paginator.
ListReportDefinitions
¶paginator = client.get_paginator('list_report_definitions')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from ApplicationCostProfiler.Client.list_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': [
{
'reportId': 'string',
'reportDescription': 'string',
'reportFrequency': 'MONTHLY'|'DAILY'|'ALL',
'format': 'CSV'|'PARQUET',
'destinationS3Location': {
'bucket': 'string',
'prefix': 'string'
},
'createdAt': datetime(2015, 1, 1),
'lastUpdatedAt': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
The retrieved reports.
The configuration of a report in AWS Application Cost Profiler.
The ID of the report.
Description of the report
The cadence at which the report is generated.
The format used for the generated reports.
The location in Amazon Simple Storage Service (Amazon S3) the reports should be saved to.
Name of the S3 bucket.
Prefix for the location to write to.
Timestamp (milliseconds) when this report definition was created.
Timestamp (milliseconds) when this report definition was last updated.
A token to resume pagination.