AWS Cost Explorer Service
Cost Management APIs

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

PutReportDefinition

Creates a new report using the description that you provide.

Request Syntax

{ "ReportDefinition": { "AdditionalArtifacts": [ "string" ], "AdditionalSchemaElements": [ "string" ], "Compression": "string", "Format": "string", "RefreshClosedReports": boolean, "ReportName": "string", "ReportVersioning": "string", "S3Bucket": "string", "S3Prefix": "string", "S3Region": "string", "TimeUnit": "string" } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ReportDefinition

Represents the output of the PutReportDefinition operation. The content consists of the detailed metadata and data file information.

Type: ReportDefinition object

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

DuplicateReportNameException

A report with the specified name already exists in the account. Specify a different report name.

HTTP Status Code: 400

InternalErrorException

An error on the server occurred during the processing of your request. Try again later.

HTTP Status Code: 500

ReportLimitReachedException

This account already has five reports defined. To define a new report, you must delete an existing report.

HTTP Status Code: 400

ValidationException

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

Example

The following is a sample request and response of the PutReportDefinition operation.

Sample Request

POST / HTTP/1.1 Host: api.cur.<region>.<domain> x-amz-Date: <Date> Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature> User-Agent: <UserAgentString> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Connection: Keep-Alive X-Amz-Target: AWSOrigamiServiceGateway.PutReportDefinition { "ReportDefinition": { "ReportName": "ExampleReport", "TimeUnit": "DAILY", "Format": "textORcsv", "Compression": "ZIP", "AdditionalSchemaElements": [ "RESOURCES" ], "S3Bucket": "example-s3-bucket", "S3Prefix": "exampleprefix", "S3Region": "us-east-1", "AdditionalArtifacts": [ "REDSHIFT", "QUICKSIGHT" ] } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: