Application Cost Profiler
API Reference
API Version 2020-09-10
Application Cost Profiler: API Reference
Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.
Table of Contents
Welcome ... 1
Actions ... 2
DeleteReportDefinition ... 3
Request Syntax ... 3
URI Request Parameters ... 3
Request Body ... 3
Response Syntax ... 3
Response Elements ... 3
Errors ... 4
See Also ... 4
GetReportDefinition ... 5
Request Syntax ... 5
URI Request Parameters ... 5
Request Body ... 5
Response Syntax ... 5
Response Elements ... 5
Errors ... 6
See Also ... 7
ImportApplicationUsage ... 8
Request Syntax ... 8
URI Request Parameters ... 8
Request Body ... 8
Response Syntax ... 8
Response Elements ... 8
Errors ... 9
See Also ... 9
ListReportDefinitions ... 10
Request Syntax ... 10
URI Request Parameters ... 10
Request Body ... 10
Response Syntax ... 10
Response Elements ... 11
Errors ... 11
See Also ... 11
PutReportDefinition ... 13
Request Syntax ... 13
URI Request Parameters ... 13
Request Body ... 13
Response Syntax ... 14
Response Elements ... 14
Errors ... 14
See Also ... 15
UpdateReportDefinition ... 16
Request Syntax ... 16
URI Request Parameters ... 16
Request Body ... 16
Response Syntax ... 17
Response Elements ... 17
Errors ... 17
See Also ... 18
Data Types ... 19
ReportDefinition ... 20
Contents ... 20
See Also ... 21
S3Location ... 22
Contents ... 22
See Also ... 22
SourceS3Location ... 23
Contents ... 23
See Also ... 23
Common Parameters ... 24
Common Errors ... 26
Welcome
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.
This document was last published on March 6, 2022.
Actions
The following actions are supported:
• DeleteReportDefinition (p. 3)
• GetReportDefinition (p. 5)
• ImportApplicationUsage (p. 8)
• ListReportDefinitions (p. 10)
• PutReportDefinition (p. 13)
• UpdateReportDefinition (p. 16)
DeleteReportDefinition
DeleteReportDefinition
Deletes the specified report definition in AWS Application Cost Profiler. This stops the report from being generated.
Request Syntax
DELETE /reportDefinition/reportId HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
reportId (p. 3)
Required. ID of the report to delete.
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: ^[0-9A-Za-z\.\-_]+$
Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json { "reportId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
reportId (p. 3)
ID of the report that was deleted.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: ^[0-9A-Za-z\.\-_]+$
Errors
Errors
For information about the errors that are common to all actions, see Common Errors (p. 26).
AccessDeniedException
You do not have permission to perform this action.
HTTP Status Code: 403 InternalServerException
An internal server error occurred. Retry your request.
HTTP Status Code: 500 ThrottlingException
The calls to AWS Application Cost Profiler API are throttled. The request was denied.
HTTP Status Code: 429 ValidationException
The input fails to satisfy the constraints for the API.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
GetReportDefinition
GetReportDefinition
Retrieves the definition of a report already configured in AWS Application Cost Profiler.
Request Syntax
GET /reportDefinition/reportId HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
reportId (p. 5)
ID of the report to retrieve.
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: ^[0-9A-Za-z\.\-_]+$
Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json { "createdAt": number,
"destinationS3Location": { "bucket": "string", "prefix": "string"
},
"format": "string", "lastUpdated": number,
"reportDescription": "string", "reportFrequency": "string", "reportId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
createdAt (p. 5)
Timestamp (milliseconds) when this report definition was created.
Errors
Type: Timestamp destinationS3Location (p. 5)
Amazon Simple Storage Service (Amazon S3) location where the report is uploaded.
Type: S3Location (p. 22) object format (p. 5)
Format of the generated report.
Type: String
Valid Values: CSV | PARQUET lastUpdated (p. 5)
Timestamp (milliseconds) when this report definition was last updated.
Type: Timestamp reportDescription (p. 5)
Description of the report.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern: .*\S.*
reportFrequency (p. 5)
Cadence used to generate the report.
Type: String
Valid Values: MONTHLY | DAILY | ALL reportId (p. 5)
ID of the report retrieved.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: ^[0-9A-Za-z\.\-_]+$
Errors
For information about the errors that are common to all actions, see Common Errors (p. 26).
AccessDeniedException
You do not have permission to perform this action.
HTTP Status Code: 403 InternalServerException
An internal server error occurred. Retry your request.
HTTP Status Code: 500
See Also
ThrottlingException
The calls to AWS Application Cost Profiler API are throttled. The request was denied.
HTTP Status Code: 429 ValidationException
The input fails to satisfy the constraints for the API.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
ImportApplicationUsage
ImportApplicationUsage
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.
Request Syntax
POST /importApplicationUsage HTTP/1.1 Content-type: application/json { "sourceS3Location": { "bucket": "string", "key": "string", "region": "string"
}}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
sourceS3Location (p. 8)
Amazon S3 location to import application usage data from.
Type: SourceS3Location (p. 23) object Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json { "importId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
importId (p. 8)
ID of the import request.
Errors
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: [0-9A-Za-z\.\-_]*
Errors
For information about the errors that are common to all actions, see Common Errors (p. 26).
AccessDeniedException
You do not have permission to perform this action.
HTTP Status Code: 403 InternalServerException
An internal server error occurred. Retry your request.
HTTP Status Code: 500 ThrottlingException
The calls to AWS Application Cost Profiler API are throttled. The request was denied.
HTTP Status Code: 429 ValidationException
The input fails to satisfy the constraints for the API.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
ListReportDefinitions
ListReportDefinitions
Retrieves a list of all reports and their configurations for your AWS account.
The maximum number of reports is one.
Request Syntax
GET /reportDefinition?maxResults=maxResults&nextToken=nextToken HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
maxResults (p. 10)
The maximum number of results to return.
Valid Range: Minimum value of 1. Maximum value of 100.
nextToken (p. 10)
The token value from a previous call to access the next page of results.
Length Constraints: Minimum length of 1. Maximum length of 102400.
Pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json { "nextToken": "string", "reportDefinitions": [ {
"createdAt": number, "destinationS3Location": { "bucket": "string", "prefix": "string"
},
"format": "string", "lastUpdatedAt": number, "reportDescription": "string", "reportFrequency": "string", "reportId": "string"
} ]}
Response Elements
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
nextToken (p. 10)
The value of the next token, if it exists. Null if there are no more results.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 102400.
Pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
reportDefinitions (p. 10) The retrieved reports.
Type: Array of ReportDefinition (p. 20) objects
Errors
For information about the errors that are common to all actions, see Common Errors (p. 26).
AccessDeniedException
You do not have permission to perform this action.
HTTP Status Code: 403 InternalServerException
An internal server error occurred. Retry your request.
HTTP Status Code: 500 ThrottlingException
The calls to AWS Application Cost Profiler API are throttled. The request was denied.
HTTP Status Code: 429 ValidationException
The input fails to satisfy the constraints for the API.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
See Also
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
PutReportDefinition
PutReportDefinition
Creates the report definition for a report in Application Cost Profiler.
Request Syntax
POST /reportDefinition HTTP/1.1 Content-type: application/json { "destinationS3Location": { "bucket": "string", "prefix": "string"
},
"format": "string",
"reportDescription": "string", "reportFrequency": "string", "reportId": "string"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
destinationS3Location (p. 13)
Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the report.
Type: S3Location (p. 22) object Required: Yes
format (p. 13)
Required. The format to use for the generated report.
Type: String
Valid Values: CSV | PARQUET Required: Yes
reportDescription (p. 13)
Required. Description of the report.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern: .*\S.*
Required: Yes
Response Syntax
reportFrequency (p. 13)
Required. The cadence to generate the report.
Type: String
Valid Values: MONTHLY | DAILY | ALL Required: Yes
reportId (p. 13)
Required. ID of the report. You can choose any valid string matching the pattern for the ID.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: ^[0-9A-Za-z\.\-_]+$
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json { "reportId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
reportId (p. 14) ID of the report.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: ^[0-9A-Za-z\.\-_]+$
Errors
For information about the errors that are common to all actions, see Common Errors (p. 26).
AccessDeniedException
You do not have permission to perform this action.
HTTP Status Code: 403
See Also
InternalServerException
An internal server error occurred. Retry your request.
HTTP Status Code: 500 ServiceQuotaExceededException
Your request exceeds one or more of the service quotas.
HTTP Status Code: 402 ThrottlingException
The calls to AWS Application Cost Profiler API are throttled. The request was denied.
HTTP Status Code: 429 ValidationException
The input fails to satisfy the constraints for the API.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
UpdateReportDefinition
UpdateReportDefinition
Updates existing report in AWS Application Cost Profiler.
Request Syntax
PUT /reportDefinition/reportId HTTP/1.1 Content-type: application/json
{ "destinationS3Location": { "bucket": "string", "prefix": "string"
},
"format": "string",
"reportDescription": "string", "reportFrequency": "string"
}
URI Request Parameters
The request uses the following URI parameters.
reportId (p. 16)
Required. ID of the report to update.
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: ^[0-9A-Za-z\.\-_]+$
Required: Yes
Request Body
The request accepts the following data in JSON format.
destinationS3Location (p. 16)
Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the report.
Type: S3Location (p. 22) object Required: Yes
format (p. 16)
Required. The format to use for the generated report.
Type: String
Valid Values: CSV | PARQUET Required: Yes
reportDescription (p. 16)
Required. Description of the report.
Response Syntax
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern: .*\S.*
Required: Yes reportFrequency (p. 16)
Required. The cadence to generate the report.
Type: String
Valid Values: MONTHLY | DAILY | ALL Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json {
"reportId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
reportId (p. 17) ID of the report.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: ^[0-9A-Za-z\.\-_]+$
Errors
For information about the errors that are common to all actions, see Common Errors (p. 26).
AccessDeniedException
You do not have permission to perform this action.
HTTP Status Code: 403 InternalServerException
An internal server error occurred. Retry your request.
HTTP Status Code: 500
See Also
ThrottlingException
The calls to AWS Application Cost Profiler API are throttled. The request was denied.
HTTP Status Code: 429 ValidationException
The input fails to satisfy the constraints for the API.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
Data Types
The AWS Application Cost Profiler API contains several data types that various actions use. This section describes each data type in detail.
Note
The order of each element in a data type structure is not guaranteed. Applications should not assume a particular order.
The following data types are supported:
• ReportDefinition (p. 20)
• S3Location (p. 22)
• SourceS3Location (p. 23)
ReportDefinition
ReportDefinition
The configuration of a report in AWS Application Cost Profiler.
Contents
createdAt
Timestamp (milliseconds) when this report definition was created.
Type: Timestamp Required: No destinationS3Location
The location in Amazon Simple Storage Service (Amazon S3) the reports should be saved to.
Type: S3Location (p. 22) object Required: No
format
The format used for the generated reports.
Type: String
Valid Values: CSV | PARQUET Required: No
lastUpdatedAt
Timestamp (milliseconds) when this report definition was last updated.
Type: Timestamp Required: No reportDescription
Description of the report Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern: .*\S.*
Required: No reportFrequency
The cadence at which the report is generated.
Type: String
Valid Values: MONTHLY | DAILY | ALL Required: No
reportId
The ID of the report.
See Also
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: ^[0-9A-Za-z\.\-_]+$
Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
S3Location
S3Location
Represents the Amazon Simple Storage Service (Amazon S3) location where AWS Application Cost Profiler reports are generated and then written to.
Contents
bucket
Name of the S3 bucket.
Type: String
Length Constraints: Minimum length of 3. Maximum length of 63.
Pattern: (?=^.{3,63}$)(?!^(\d+\.)+\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a- z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])$)
Required: Yes prefix
Prefix for the location to write to.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 512.
Pattern: .*\S.*
Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
SourceS3Location
SourceS3Location
Represents the Amazon Simple Storage Service (Amazon S3) location where usage data is read from.
Contents
bucket
Name of the bucket.
Type: String
Length Constraints: Minimum length of 3. Maximum length of 63.
Pattern: (?=^.{3,63}$)(?!^(\d+\.)+\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a- z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])$)
Required: Yes key
Key of the object.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 512.
Pattern: .*\S.*
Required: Yes region
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.
Type: String
Valid Values: ap-east-1 | me-south-1 | eu-south-1 | af-south-1 Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
Common Parameters
The following list contains the parameters that all actions use for signing Signature Version 4 requests with a query string. Any action-specific parameters are listed in the topic for that action. For more information about Signature Version 4, see Signature Version 4 Signing Process in the Amazon Web Services General Reference.
Action
The action to be performed.
Type: string Required: Yes Version
The API version that the request is written for, expressed in the format YYYY-MM-DD.
Type: string Required: Yes X-Amz-Algorithm
The hash algorithm that you used to create the request signature.
Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header.
Type: string
Valid Values: AWS4-HMAC-SHA256 Required: Conditional
X-Amz-Credential
The credential scope value, which is a string that includes your access key, the date, the region you are targeting, the service you are requesting, and a termination string ("aws4_request"). The value is expressed in the following format: access_key/YYYYMMDD/region/service/aws4_request.
For more information, see Task 2: Create a String to Sign for Signature Version 4 in the Amazon Web Services General Reference.
Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header.
Type: string
Required: Conditional X-Amz-Date
The date that is used to create the signature. The format must be ISO 8601 basic format (YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value:
20120325T120000Z.
Condition: X-Amz-Date is optional for all requests; it can be used to override the date used for signing requests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is
not required. When X-Amz-Date is used, it always overrides the value of the Date header. For more information, see Handling Dates in Signature Version 4 in the Amazon Web Services General Reference.
Type: string
Required: Conditional X-Amz-Security-Token
The temporary security token that was obtained through a call to AWS Security Token Service (AWS STS). For a list of services that support temporary security credentials from AWS Security Token Service, go to AWS Services That Work with IAM in the IAM User Guide.
Condition: If you're using temporary security credentials from the AWS Security Token Service, you must include the security token.
Type: string
Required: Conditional X-Amz-Signature
Specifies the hex-encoded signature that was calculated from the string to sign and the derived signing key.
Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header.
Type: string
Required: Conditional X-Amz-SignedHeaders
Specifies all the HTTP headers that were included as part of the canonical request. For more information about specifying signed headers, see Task 1: Create a Canonical Request For Signature Version 4 in the Amazon Web Services General Reference.
Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header.
Type: string
Required: Conditional
Common Errors
This section lists the errors common to the API actions of all AWS services. For errors specific to an API action for this service, see the topic for that API action.
AccessDeniedException
You do not have sufficient access to perform this action.
HTTP Status Code: 400 IncompleteSignature
The request signature does not conform to AWS standards.
HTTP Status Code: 400 InternalFailure
The request processing has failed because of an unknown error, exception or failure.
HTTP Status Code: 500 InvalidAction
The action or operation requested is invalid. Verify that the action is typed correctly.
HTTP Status Code: 400 InvalidClientTokenId
The X.509 certificate or AWS access key ID provided does not exist in our records.
HTTP Status Code: 403 InvalidParameterCombination
Parameters that must not be used together were used together.
HTTP Status Code: 400 InvalidParameterValue
An invalid or out-of-range value was supplied for the input parameter.
HTTP Status Code: 400 InvalidQueryParameter
The AWS query string is malformed or does not adhere to AWS standards.
HTTP Status Code: 400 MalformedQueryString
The query string contains a syntax error.
HTTP Status Code: 404 MissingAction
The request is missing an action or a required parameter.
HTTP Status Code: 400
MissingAuthenticationToken
The request must contain either a valid (registered) AWS access key ID or X.509 certificate.
HTTP Status Code: 403 MissingParameter
A required parameter for the specified action is not supplied.
HTTP Status Code: 400 NotAuthorized
You do not have permission to perform this action.
HTTP Status Code: 400 OptInRequired
The AWS access key ID needs a subscription for the service.
HTTP Status Code: 403 RequestExpired
The request reached the service more than 15 minutes after the date stamp on the request or more than 15 minutes after the request expiration date (such as for pre-signed URLs), or the date stamp on the request is more than 15 minutes in the future.
HTTP Status Code: 400 ServiceUnavailable
The request has failed due to a temporary failure of the server.
HTTP Status Code: 503 ThrottlingException
The request was denied due to request throttling.
HTTP Status Code: 400 ValidationError
The input fails to satisfy the constraints specified by an AWS service.
HTTP Status Code: 400