ReportDefinition

class ReportDefinition : KotlinCustomResource

Manages Cost and Usage Report Definitions.

NOTE: The AWS Cost and Usage Report service is only available in us-east-1 currently.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleCurReportDefinition = new aws.cur.ReportDefinition("example_cur_report_definition", {
reportName: "example-cur-report-definition",
timeUnit: "HOURLY",
format: "textORcsv",
compression: "GZIP",
additionalSchemaElements: [
"RESOURCES",
"SPLIT_COST_ALLOCATION_DATA",
],
s3Bucket: "example-bucket-name",
s3Region: "us-east-1",
additionalArtifacts: [
"REDSHIFT",
"QUICKSIGHT",
],
});
import pulumi
import pulumi_aws as aws
example_cur_report_definition = aws.cur.ReportDefinition("example_cur_report_definition",
report_name="example-cur-report-definition",
time_unit="HOURLY",
format="textORcsv",
compression="GZIP",
additional_schema_elements=[
"RESOURCES",
"SPLIT_COST_ALLOCATION_DATA",
],
s3_bucket="example-bucket-name",
s3_region="us-east-1",
additional_artifacts=[
"REDSHIFT",
"QUICKSIGHT",
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleCurReportDefinition = new Aws.Cur.ReportDefinition("example_cur_report_definition", new()
{
ReportName = "example-cur-report-definition",
TimeUnit = "HOURLY",
Format = "textORcsv",
Compression = "GZIP",
AdditionalSchemaElements = new[]
{
"RESOURCES",
"SPLIT_COST_ALLOCATION_DATA",
},
S3Bucket = "example-bucket-name",
S3Region = "us-east-1",
AdditionalArtifacts = new[]
{
"REDSHIFT",
"QUICKSIGHT",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cur"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cur.NewReportDefinition(ctx, "example_cur_report_definition", &cur.ReportDefinitionArgs{
ReportName: pulumi.String("example-cur-report-definition"),
TimeUnit: pulumi.String("HOURLY"),
Format: pulumi.String("textORcsv"),
Compression: pulumi.String("GZIP"),
AdditionalSchemaElements: pulumi.StringArray{
pulumi.String("RESOURCES"),
pulumi.String("SPLIT_COST_ALLOCATION_DATA"),
},
S3Bucket: pulumi.String("example-bucket-name"),
S3Region: pulumi.String("us-east-1"),
AdditionalArtifacts: pulumi.StringArray{
pulumi.String("REDSHIFT"),
pulumi.String("QUICKSIGHT"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cur.ReportDefinition;
import com.pulumi.aws.cur.ReportDefinitionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleCurReportDefinition = new ReportDefinition("exampleCurReportDefinition", ReportDefinitionArgs.builder()
.reportName("example-cur-report-definition")
.timeUnit("HOURLY")
.format("textORcsv")
.compression("GZIP")
.additionalSchemaElements(
"RESOURCES",
"SPLIT_COST_ALLOCATION_DATA")
.s3Bucket("example-bucket-name")
.s3Region("us-east-1")
.additionalArtifacts(
"REDSHIFT",
"QUICKSIGHT")
.build());
}
}
resources:
exampleCurReportDefinition:
type: aws:cur:ReportDefinition
name: example_cur_report_definition
properties:
reportName: example-cur-report-definition
timeUnit: HOURLY
format: textORcsv
compression: GZIP
additionalSchemaElements:
- RESOURCES
- SPLIT_COST_ALLOCATION_DATA
s3Bucket: example-bucket-name
s3Region: us-east-1
additionalArtifacts:
- REDSHIFT
- QUICKSIGHT

Import

Using pulumi import, import Report Definitions using the report_name. For example:

$ pulumi import aws:cur/reportDefinition:ReportDefinition example_cur_report_definition example-cur-report-definition

Properties

Link copied to clipboard

A list of additional artifacts. Valid values are: REDSHIFT, QUICKSIGHT, ATHENA. When ATHENA exists within additional_artifacts, no other artifact type can be declared and report_versioning must be OVERWRITE_REPORT.

Link copied to clipboard

A list of schema elements. Valid values are: RESOURCES, SPLIT_COST_ALLOCATION_DATA.

Link copied to clipboard
val arn: Output<String>

The Amazon Resource Name (ARN) specifying the cur report.

Link copied to clipboard
val compression: Output<String>

Compression format for report. Valid values are: GZIP, ZIP, Parquet. If Parquet is used, then format must also be Parquet.

Link copied to clipboard
val format: Output<String>

Format for report. Valid values are: textORcsv, Parquet. If Parquet is used, then Compression must also be Parquet.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Set to true to update your reports after they have been finalized if AWS detects charges related to previous months.

Link copied to clipboard
val reportName: Output<String>

Unique name for the report. Must start with a number/letter and is case sensitive. Limited to 256 characters.

Link copied to clipboard
val reportVersioning: Output<String>?

Overwrite the previous version of each report or to deliver the report in addition to the previous versions. Valid values are: CREATE_NEW_REPORT and OVERWRITE_REPORT.

Link copied to clipboard
val s3Bucket: Output<String>

Name of the existing S3 bucket to hold generated reports.

Link copied to clipboard
val s3Prefix: Output<String>?

Report path prefix. Limited to 256 characters.

Link copied to clipboard
val s3Region: Output<String>

Region of the existing S3 bucket to hold generated reports.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val timeUnit: Output<String>

The frequency on which report data are measured and displayed. Valid values are: DAILY, HOURLY, MONTHLY.

Link copied to clipboard
val urn: Output<String>