ReportDefinition class

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",
    s3Prefix: "example-cur-report",
    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_prefix="example-cur-report",
    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",
        S3Prefix = "example-cur-report",
        S3Region = "us-east-1",
        AdditionalArtifacts = new[]
        {
            "REDSHIFT",
            "QUICKSIGHT",
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/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"),
			S3Prefix: pulumi.String("example-cur-report"),
			S3Region: pulumi.String("us-east-1"),
			AdditionalArtifacts: pulumi.StringArray{
				pulumi.String("REDSHIFT"),
				pulumi.String("QUICKSIGHT"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "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_prefix                  = "example-cur-report"
  s3_region                  = "us-east-1"
  additional_artifacts       = ["REDSHIFT", "QUICKSIGHT"]
}
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.ArrayList;
import java.util.Arrays;
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")
            .s3Prefix("example-cur-report")
            .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
      s3Prefix: example-cur-report
      s3Region: us-east-1
      additionalArtifacts:
        - REDSHIFT
        - QUICKSIGHT

Import

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

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

Constructors

ReportDefinition(String name, {ReportDefinitionArgs? args, CustomResourceOptions? options})
Creates a new ReportDefinition. name The Pulumi resource name. args Arguments used to configure this ReportDefinition. The set of arguments for ReportDefinition. options Resource options controlling this resource's behavior.
ReportDefinition.reference(String urn)
Creates a typed reference to an existing ReportDefinition resource.

Properties

additionalArtifacts ↔ Output<List<String>?>
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 reportVersioning must be OVERWRITE_REPORT.
latefinal
additionalSchemaElements ↔ Output<List<String>>
A list of schema elements. Valid values are: RESOURCES, SPLIT_COST_ALLOCATION_DATA, MANUAL_DISCOUNT_COMPATIBILITY.
latefinal
arn ↔ Output<String>
ARN specifying the cur report.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
compression ↔ Output<String>
Compression format for report. Valid values are: GZIP, ZIP, Parquet. If Parquet is used, then format must also be Parquet.
latefinal
format ↔ Output<String>
Format for report. Valid values are: textORcsv, Parquet. If Parquet is used, then Compression must also be Parquet.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
refreshClosedReports ↔ Output<bool?>
Set to true to update your reports after they have been finalized if AWS detects charges related to previous months.
latefinal
reportName ↔ Output<String>
Unique name for the report. Must start with a number/letter and is case sensitive. Limited to 256 characters.
latefinal
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.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
s3Bucket ↔ Output<String>
Name of the existing S3 bucket to hold generated reports.
latefinal
s3Prefix ↔ Output<String>
Report path prefix. Limited to 256 characters. May be empty ("") but the resource can then not be modified via the AWS Console.
latefinal
s3Region ↔ Output<String>
Region of the existing S3 bucket to hold generated reports.
latefinal
tags ↔ Output<Map<String, String>?>
Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
timeUnit ↔ Output<String>
The frequency on which report data are measured and displayed. Valid values are: DAILY, HOURLY, MONTHLY.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {ReportDefinitionState? state, CustomResourceOptions? options}) → ReportDefinition
Gets an existing ReportDefinition resource's state with the given name and id.