cur

package
v4.38.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LookupReportDefinitionArgs

type LookupReportDefinitionArgs struct {
	// The name of the report definition to match.
	ReportName string `pulumi:"reportName"`
}

A collection of arguments for invoking getReportDefinition.

type LookupReportDefinitionOutputArgs added in v4.21.0

type LookupReportDefinitionOutputArgs struct {
	// The name of the report definition to match.
	ReportName pulumi.StringInput `pulumi:"reportName"`
}

A collection of arguments for invoking getReportDefinition.

func (LookupReportDefinitionOutputArgs) ElementType added in v4.21.0

type LookupReportDefinitionResult

type LookupReportDefinitionResult struct {
	// A list of additional artifacts.
	AdditionalArtifacts []string `pulumi:"additionalArtifacts"`
	// A list of schema elements.
	AdditionalSchemaElements []string `pulumi:"additionalSchemaElements"`
	// Preferred format for report.
	Compression string `pulumi:"compression"`
	// Preferred compression format for report.
	Format string `pulumi:"format"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// If true reports are updated after they have been finalized.
	RefreshClosedReports bool   `pulumi:"refreshClosedReports"`
	ReportName           string `pulumi:"reportName"`
	// Overwrite the previous version of each report or to deliver the report in addition to the previous versions.
	ReportVersioning string `pulumi:"reportVersioning"`
	// Name of customer S3 bucket.
	S3Bucket string `pulumi:"s3Bucket"`
	// Preferred report path prefix.
	S3Prefix string `pulumi:"s3Prefix"`
	// Region of customer S3 bucket.
	S3Region string `pulumi:"s3Region"`
	// The frequency on which report data are measured and displayed.
	TimeUnit string `pulumi:"timeUnit"`
}

A collection of values returned by getReportDefinition.

func LookupReportDefinition

func LookupReportDefinition(ctx *pulumi.Context, args *LookupReportDefinitionArgs, opts ...pulumi.InvokeOption) (*LookupReportDefinitionResult, error)

Use this data source to get information on an AWS Cost and Usage Report Definition.

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

> *NOTE:* If AWS Organizations is enabled, only the master account can use this resource.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/cur"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cur.LookupReportDefinition(ctx, &cur.LookupReportDefinitionArgs{
			ReportName: "example",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type LookupReportDefinitionResultOutput added in v4.21.0

type LookupReportDefinitionResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getReportDefinition.

func LookupReportDefinitionOutput added in v4.21.0

func (LookupReportDefinitionResultOutput) AdditionalArtifacts added in v4.21.0

A list of additional artifacts.

func (LookupReportDefinitionResultOutput) AdditionalSchemaElements added in v4.21.0

func (o LookupReportDefinitionResultOutput) AdditionalSchemaElements() pulumi.StringArrayOutput

A list of schema elements.

func (LookupReportDefinitionResultOutput) Compression added in v4.21.0

Preferred format for report.

func (LookupReportDefinitionResultOutput) ElementType added in v4.21.0

func (LookupReportDefinitionResultOutput) Format added in v4.21.0

Preferred compression format for report.

func (LookupReportDefinitionResultOutput) Id added in v4.21.0

The provider-assigned unique ID for this managed resource.

func (LookupReportDefinitionResultOutput) RefreshClosedReports added in v4.21.0

func (o LookupReportDefinitionResultOutput) RefreshClosedReports() pulumi.BoolOutput

If true reports are updated after they have been finalized.

func (LookupReportDefinitionResultOutput) ReportName added in v4.21.0

func (LookupReportDefinitionResultOutput) ReportVersioning added in v4.21.0

Overwrite the previous version of each report or to deliver the report in addition to the previous versions.

func (LookupReportDefinitionResultOutput) S3Bucket added in v4.21.0

Name of customer S3 bucket.

func (LookupReportDefinitionResultOutput) S3Prefix added in v4.21.0

Preferred report path prefix.

func (LookupReportDefinitionResultOutput) S3Region added in v4.21.0

Region of customer S3 bucket.

func (LookupReportDefinitionResultOutput) TimeUnit added in v4.21.0

The frequency on which report data are measured and displayed.

func (LookupReportDefinitionResultOutput) ToLookupReportDefinitionResultOutput added in v4.21.0

func (o LookupReportDefinitionResultOutput) ToLookupReportDefinitionResultOutput() LookupReportDefinitionResultOutput

func (LookupReportDefinitionResultOutput) ToLookupReportDefinitionResultOutputWithContext added in v4.21.0

func (o LookupReportDefinitionResultOutput) ToLookupReportDefinitionResultOutputWithContext(ctx context.Context) LookupReportDefinitionResultOutput

type ReportDefinition

type ReportDefinition struct {
	pulumi.CustomResourceState

	// 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`.
	AdditionalArtifacts pulumi.StringArrayOutput `pulumi:"additionalArtifacts"`
	// A list of schema elements. Valid values are: `RESOURCES`.
	AdditionalSchemaElements pulumi.StringArrayOutput `pulumi:"additionalSchemaElements"`
	// The Amazon Resource Name (ARN) specifying the cur report.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Compression format for report. Valid values are: `GZIP`, `ZIP`, `Parquet`. If `Parquet` is used, then format must also be `Parquet`.
	Compression pulumi.StringOutput `pulumi:"compression"`
	// Format for report. Valid values are: `textORcsv`, `Parquet`. If `Parquet` is used, then Compression must also be `Parquet`.
	Format pulumi.StringOutput `pulumi:"format"`
	// Set to true to update your reports after they have been finalized if AWS detects charges related to previous months.
	RefreshClosedReports pulumi.BoolPtrOutput `pulumi:"refreshClosedReports"`
	// Unique name for the report. Must start with a number/letter and is case sensitive. Limited to 256 characters.
	ReportName pulumi.StringOutput `pulumi:"reportName"`
	// 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`.
	ReportVersioning pulumi.StringPtrOutput `pulumi:"reportVersioning"`
	// Name of the existing S3 bucket to hold generated reports.
	S3Bucket pulumi.StringOutput `pulumi:"s3Bucket"`
	// Report path prefix. Limited to 256 characters.
	S3Prefix pulumi.StringPtrOutput `pulumi:"s3Prefix"`
	// Region of the existing S3 bucket to hold generated reports.
	S3Region pulumi.StringOutput `pulumi:"s3Region"`
	// The frequency on which report data are measured and displayed.  Valid values are: `HOURLY`, `DAILY`.
	TimeUnit pulumi.StringOutput `pulumi:"timeUnit"`
}

Manages Cost and Usage Report Definitions.

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

> *NOTE:* If AWS Organizations is enabled, only the master account can use this resource.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/cur"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cur.NewReportDefinition(ctx, "exampleCurReportDefinition", &cur.ReportDefinitionArgs{
			AdditionalArtifacts: pulumi.StringArray{
				pulumi.String("REDSHIFT"),
				pulumi.String("QUICKSIGHT"),
			},
			AdditionalSchemaElements: pulumi.StringArray{
				pulumi.String("RESOURCES"),
			},
			Compression: pulumi.String("GZIP"),
			Format:      pulumi.String("textORcsv"),
			ReportName:  pulumi.String("example-cur-report-definition"),
			S3Bucket:    pulumi.String("example-bucket-name"),
			S3Region:    pulumi.String("us-east-1"),
			TimeUnit:    pulumi.String("HOURLY"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Report Definitions can be imported using the `report_name`, e.g.,

```sh

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

```

func GetReportDefinition

func GetReportDefinition(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ReportDefinitionState, opts ...pulumi.ResourceOption) (*ReportDefinition, error)

GetReportDefinition gets an existing ReportDefinition resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewReportDefinition

func NewReportDefinition(ctx *pulumi.Context,
	name string, args *ReportDefinitionArgs, opts ...pulumi.ResourceOption) (*ReportDefinition, error)

NewReportDefinition registers a new resource with the given unique name, arguments, and options.

func (*ReportDefinition) ElementType

func (*ReportDefinition) ElementType() reflect.Type

func (*ReportDefinition) ToReportDefinitionOutput

func (i *ReportDefinition) ToReportDefinitionOutput() ReportDefinitionOutput

func (*ReportDefinition) ToReportDefinitionOutputWithContext

func (i *ReportDefinition) ToReportDefinitionOutputWithContext(ctx context.Context) ReportDefinitionOutput

type ReportDefinitionArgs

type ReportDefinitionArgs struct {
	// 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`.
	AdditionalArtifacts pulumi.StringArrayInput
	// A list of schema elements. Valid values are: `RESOURCES`.
	AdditionalSchemaElements pulumi.StringArrayInput
	// Compression format for report. Valid values are: `GZIP`, `ZIP`, `Parquet`. If `Parquet` is used, then format must also be `Parquet`.
	Compression pulumi.StringInput
	// Format for report. Valid values are: `textORcsv`, `Parquet`. If `Parquet` is used, then Compression must also be `Parquet`.
	Format pulumi.StringInput
	// Set to true to update your reports after they have been finalized if AWS detects charges related to previous months.
	RefreshClosedReports pulumi.BoolPtrInput
	// Unique name for the report. Must start with a number/letter and is case sensitive. Limited to 256 characters.
	ReportName pulumi.StringInput
	// 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`.
	ReportVersioning pulumi.StringPtrInput
	// Name of the existing S3 bucket to hold generated reports.
	S3Bucket pulumi.StringInput
	// Report path prefix. Limited to 256 characters.
	S3Prefix pulumi.StringPtrInput
	// Region of the existing S3 bucket to hold generated reports.
	S3Region pulumi.StringInput
	// The frequency on which report data are measured and displayed.  Valid values are: `HOURLY`, `DAILY`.
	TimeUnit pulumi.StringInput
}

The set of arguments for constructing a ReportDefinition resource.

func (ReportDefinitionArgs) ElementType

func (ReportDefinitionArgs) ElementType() reflect.Type

type ReportDefinitionArray

type ReportDefinitionArray []ReportDefinitionInput

func (ReportDefinitionArray) ElementType

func (ReportDefinitionArray) ElementType() reflect.Type

func (ReportDefinitionArray) ToReportDefinitionArrayOutput

func (i ReportDefinitionArray) ToReportDefinitionArrayOutput() ReportDefinitionArrayOutput

func (ReportDefinitionArray) ToReportDefinitionArrayOutputWithContext

func (i ReportDefinitionArray) ToReportDefinitionArrayOutputWithContext(ctx context.Context) ReportDefinitionArrayOutput

type ReportDefinitionArrayInput

type ReportDefinitionArrayInput interface {
	pulumi.Input

	ToReportDefinitionArrayOutput() ReportDefinitionArrayOutput
	ToReportDefinitionArrayOutputWithContext(context.Context) ReportDefinitionArrayOutput
}

ReportDefinitionArrayInput is an input type that accepts ReportDefinitionArray and ReportDefinitionArrayOutput values. You can construct a concrete instance of `ReportDefinitionArrayInput` via:

ReportDefinitionArray{ ReportDefinitionArgs{...} }

type ReportDefinitionArrayOutput

type ReportDefinitionArrayOutput struct{ *pulumi.OutputState }

func (ReportDefinitionArrayOutput) ElementType

func (ReportDefinitionArrayOutput) Index

func (ReportDefinitionArrayOutput) ToReportDefinitionArrayOutput

func (o ReportDefinitionArrayOutput) ToReportDefinitionArrayOutput() ReportDefinitionArrayOutput

func (ReportDefinitionArrayOutput) ToReportDefinitionArrayOutputWithContext

func (o ReportDefinitionArrayOutput) ToReportDefinitionArrayOutputWithContext(ctx context.Context) ReportDefinitionArrayOutput

type ReportDefinitionInput

type ReportDefinitionInput interface {
	pulumi.Input

	ToReportDefinitionOutput() ReportDefinitionOutput
	ToReportDefinitionOutputWithContext(ctx context.Context) ReportDefinitionOutput
}

type ReportDefinitionMap

type ReportDefinitionMap map[string]ReportDefinitionInput

func (ReportDefinitionMap) ElementType

func (ReportDefinitionMap) ElementType() reflect.Type

func (ReportDefinitionMap) ToReportDefinitionMapOutput

func (i ReportDefinitionMap) ToReportDefinitionMapOutput() ReportDefinitionMapOutput

func (ReportDefinitionMap) ToReportDefinitionMapOutputWithContext

func (i ReportDefinitionMap) ToReportDefinitionMapOutputWithContext(ctx context.Context) ReportDefinitionMapOutput

type ReportDefinitionMapInput

type ReportDefinitionMapInput interface {
	pulumi.Input

	ToReportDefinitionMapOutput() ReportDefinitionMapOutput
	ToReportDefinitionMapOutputWithContext(context.Context) ReportDefinitionMapOutput
}

ReportDefinitionMapInput is an input type that accepts ReportDefinitionMap and ReportDefinitionMapOutput values. You can construct a concrete instance of `ReportDefinitionMapInput` via:

ReportDefinitionMap{ "key": ReportDefinitionArgs{...} }

type ReportDefinitionMapOutput

type ReportDefinitionMapOutput struct{ *pulumi.OutputState }

func (ReportDefinitionMapOutput) ElementType

func (ReportDefinitionMapOutput) ElementType() reflect.Type

func (ReportDefinitionMapOutput) MapIndex

func (ReportDefinitionMapOutput) ToReportDefinitionMapOutput

func (o ReportDefinitionMapOutput) ToReportDefinitionMapOutput() ReportDefinitionMapOutput

func (ReportDefinitionMapOutput) ToReportDefinitionMapOutputWithContext

func (o ReportDefinitionMapOutput) ToReportDefinitionMapOutputWithContext(ctx context.Context) ReportDefinitionMapOutput

type ReportDefinitionOutput

type ReportDefinitionOutput struct{ *pulumi.OutputState }

func (ReportDefinitionOutput) ElementType

func (ReportDefinitionOutput) ElementType() reflect.Type

func (ReportDefinitionOutput) ToReportDefinitionOutput

func (o ReportDefinitionOutput) ToReportDefinitionOutput() ReportDefinitionOutput

func (ReportDefinitionOutput) ToReportDefinitionOutputWithContext

func (o ReportDefinitionOutput) ToReportDefinitionOutputWithContext(ctx context.Context) ReportDefinitionOutput

type ReportDefinitionState

type ReportDefinitionState struct {
	// 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`.
	AdditionalArtifacts pulumi.StringArrayInput
	// A list of schema elements. Valid values are: `RESOURCES`.
	AdditionalSchemaElements pulumi.StringArrayInput
	// The Amazon Resource Name (ARN) specifying the cur report.
	Arn pulumi.StringPtrInput
	// Compression format for report. Valid values are: `GZIP`, `ZIP`, `Parquet`. If `Parquet` is used, then format must also be `Parquet`.
	Compression pulumi.StringPtrInput
	// Format for report. Valid values are: `textORcsv`, `Parquet`. If `Parquet` is used, then Compression must also be `Parquet`.
	Format pulumi.StringPtrInput
	// Set to true to update your reports after they have been finalized if AWS detects charges related to previous months.
	RefreshClosedReports pulumi.BoolPtrInput
	// Unique name for the report. Must start with a number/letter and is case sensitive. Limited to 256 characters.
	ReportName pulumi.StringPtrInput
	// 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`.
	ReportVersioning pulumi.StringPtrInput
	// Name of the existing S3 bucket to hold generated reports.
	S3Bucket pulumi.StringPtrInput
	// Report path prefix. Limited to 256 characters.
	S3Prefix pulumi.StringPtrInput
	// Region of the existing S3 bucket to hold generated reports.
	S3Region pulumi.StringPtrInput
	// The frequency on which report data are measured and displayed.  Valid values are: `HOURLY`, `DAILY`.
	TimeUnit pulumi.StringPtrInput
}

func (ReportDefinitionState) ElementType

func (ReportDefinitionState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL