UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

137 lines 6.04 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ReportDefinition = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages Cost and Usage Report Definitions. * * > *NOTE:* The AWS Cost and Usage Report service is only available in `us-east-1` currently. * * ## Example Usage * * ```typescript * 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 * * Using `pulumi import`, import Report Definitions using the `report_name`. For example: * * ```sh * $ pulumi import aws:cur/reportDefinition:ReportDefinition example_cur_report_definition example-cur-report-definition * ``` */ class ReportDefinition extends pulumi.CustomResource { /** * Get an existing ReportDefinition resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new ReportDefinition(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ReportDefinition. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ReportDefinition.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["additionalArtifacts"] = state?.additionalArtifacts; resourceInputs["additionalSchemaElements"] = state?.additionalSchemaElements; resourceInputs["arn"] = state?.arn; resourceInputs["compression"] = state?.compression; resourceInputs["format"] = state?.format; resourceInputs["refreshClosedReports"] = state?.refreshClosedReports; resourceInputs["reportName"] = state?.reportName; resourceInputs["reportVersioning"] = state?.reportVersioning; resourceInputs["s3Bucket"] = state?.s3Bucket; resourceInputs["s3Prefix"] = state?.s3Prefix; resourceInputs["s3Region"] = state?.s3Region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeUnit"] = state?.timeUnit; } else { const args = argsOrState; if (args?.additionalSchemaElements === undefined && !opts.urn) { throw new Error("Missing required property 'additionalSchemaElements'"); } if (args?.compression === undefined && !opts.urn) { throw new Error("Missing required property 'compression'"); } if (args?.format === undefined && !opts.urn) { throw new Error("Missing required property 'format'"); } if (args?.reportName === undefined && !opts.urn) { throw new Error("Missing required property 'reportName'"); } if (args?.s3Bucket === undefined && !opts.urn) { throw new Error("Missing required property 's3Bucket'"); } if (args?.s3Prefix === undefined && !opts.urn) { throw new Error("Missing required property 's3Prefix'"); } if (args?.s3Region === undefined && !opts.urn) { throw new Error("Missing required property 's3Region'"); } if (args?.timeUnit === undefined && !opts.urn) { throw new Error("Missing required property 'timeUnit'"); } resourceInputs["additionalArtifacts"] = args?.additionalArtifacts; resourceInputs["additionalSchemaElements"] = args?.additionalSchemaElements; resourceInputs["compression"] = args?.compression; resourceInputs["format"] = args?.format; resourceInputs["refreshClosedReports"] = args?.refreshClosedReports; resourceInputs["reportName"] = args?.reportName; resourceInputs["reportVersioning"] = args?.reportVersioning; resourceInputs["s3Bucket"] = args?.s3Bucket; resourceInputs["s3Prefix"] = args?.s3Prefix; resourceInputs["s3Region"] = args?.s3Region; resourceInputs["tags"] = args?.tags; resourceInputs["timeUnit"] = args?.timeUnit; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ReportDefinition.__pulumiType, name, resourceInputs, opts); } } exports.ReportDefinition = ReportDefinition; /** @internal */ ReportDefinition.__pulumiType = 'aws:cur/reportDefinition:ReportDefinition'; //# sourceMappingURL=reportDefinition.js.map