cur

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 3 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 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"`
	ReportName string `pulumi:"reportName"`
	// 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/v2/go/aws/cur"
"github.com/pulumi/pulumi/sdk/v2/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 ReportDefinition

type ReportDefinition struct {
	pulumi.CustomResourceState

	// A list of additional artifacts. Valid values are: REDSHIFT, QUICKSIGHT.
	AdditionalArtifacts pulumi.StringArrayOutput `pulumi:"additionalArtifacts"`
	// A list of schema elements. Valid values are: RESOURCES.
	AdditionalSchemaElements pulumi.StringArrayOutput `pulumi:"additionalSchemaElements"`
	// Compression format for report. Valid values are: GZIP, ZIP.
	Compression pulumi.StringOutput `pulumi:"compression"`
	// Format for report. Valid values are: textORcsv.
	Format pulumi.StringOutput `pulumi:"format"`
	// Unique name for the report. Must start with a number/letter and is case sensitive. Limited to 256 characters.
	ReportName pulumi.StringOutput `pulumi:"reportName"`
	// 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/v2/go/aws/cur"
"github.com/pulumi/pulumi/sdk/v2/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
	})
}

```

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.

type ReportDefinitionArgs

type ReportDefinitionArgs struct {
	// A list of additional artifacts. Valid values are: REDSHIFT, QUICKSIGHT.
	AdditionalArtifacts pulumi.StringArrayInput
	// A list of schema elements. Valid values are: RESOURCES.
	AdditionalSchemaElements pulumi.StringArrayInput
	// Compression format for report. Valid values are: GZIP, ZIP.
	Compression pulumi.StringInput
	// Format for report. Valid values are: textORcsv.
	Format pulumi.StringInput
	// Unique name for the report. Must start with a number/letter and is case sensitive. Limited to 256 characters.
	ReportName pulumi.StringInput
	// 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 ReportDefinitionState

type ReportDefinitionState struct {
	// A list of additional artifacts. Valid values are: REDSHIFT, QUICKSIGHT.
	AdditionalArtifacts pulumi.StringArrayInput
	// A list of schema elements. Valid values are: RESOURCES.
	AdditionalSchemaElements pulumi.StringArrayInput
	// Compression format for report. Valid values are: GZIP, ZIP.
	Compression pulumi.StringPtrInput
	// Format for report. Valid values are: textORcsv.
	Format pulumi.StringPtrInput
	// Unique name for the report. Must start with a number/letter and is case sensitive. Limited to 256 characters.
	ReportName 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