1. Packages
  2. AWS
  3. API Docs
  4. cur
  5. getReportDefinition
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.cur.getReportDefinition

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const reportDefinition = aws.cur.getReportDefinition({
        reportName: "example",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    report_definition = aws.cur.get_report_definition(report_name="example")
    
    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.LookupReportDefinition(ctx, &cur.LookupReportDefinitionArgs{
    			ReportName: "example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var reportDefinition = Aws.Cur.GetReportDefinition.Invoke(new()
        {
            ReportName = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.cur.CurFunctions;
    import com.pulumi.aws.cur.inputs.GetReportDefinitionArgs;
    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) {
            final var reportDefinition = CurFunctions.getReportDefinition(GetReportDefinitionArgs.builder()
                .reportName("example")
                .build());
    
        }
    }
    
    variables:
      reportDefinition:
        fn::invoke:
          Function: aws:cur:getReportDefinition
          Arguments:
            reportName: example
    

    Using getReportDefinition

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getReportDefinition(args: GetReportDefinitionArgs, opts?: InvokeOptions): Promise<GetReportDefinitionResult>
    function getReportDefinitionOutput(args: GetReportDefinitionOutputArgs, opts?: InvokeOptions): Output<GetReportDefinitionResult>
    def get_report_definition(report_name: Optional[str] = None,
                              tags: Optional[Mapping[str, str]] = None,
                              opts: Optional[InvokeOptions] = None) -> GetReportDefinitionResult
    def get_report_definition_output(report_name: Optional[pulumi.Input[str]] = None,
                              tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetReportDefinitionResult]
    func LookupReportDefinition(ctx *Context, args *LookupReportDefinitionArgs, opts ...InvokeOption) (*LookupReportDefinitionResult, error)
    func LookupReportDefinitionOutput(ctx *Context, args *LookupReportDefinitionOutputArgs, opts ...InvokeOption) LookupReportDefinitionResultOutput

    > Note: This function is named LookupReportDefinition in the Go SDK.

    public static class GetReportDefinition 
    {
        public static Task<GetReportDefinitionResult> InvokeAsync(GetReportDefinitionArgs args, InvokeOptions? opts = null)
        public static Output<GetReportDefinitionResult> Invoke(GetReportDefinitionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetReportDefinitionResult> getReportDefinition(GetReportDefinitionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:cur/getReportDefinition:getReportDefinition
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ReportName string
    Name of the report definition to match.
    Tags Dictionary<string, string>
    Map of key-value pairs assigned to the resource.
    ReportName string
    Name of the report definition to match.
    Tags map[string]string
    Map of key-value pairs assigned to the resource.
    reportName String
    Name of the report definition to match.
    tags Map<String,String>
    Map of key-value pairs assigned to the resource.
    reportName string
    Name of the report definition to match.
    tags {[key: string]: string}
    Map of key-value pairs assigned to the resource.
    report_name str
    Name of the report definition to match.
    tags Mapping[str, str]
    Map of key-value pairs assigned to the resource.
    reportName String
    Name of the report definition to match.
    tags Map<String>
    Map of key-value pairs assigned to the resource.

    getReportDefinition Result

    The following output properties are available:

    AdditionalArtifacts List<string>
    A list of additional artifacts.
    AdditionalSchemaElements List<string>
    A list of schema elements.
    Compression string
    Preferred format for report.
    Format string
    Preferred compression format for report.
    Id string
    The provider-assigned unique ID for this managed resource.
    RefreshClosedReports bool
    If true reports are updated after they have been finalized.
    ReportName string
    ReportVersioning string
    Overwrite the previous version of each report or to deliver the report in addition to the previous versions.
    S3Bucket string
    Name of customer S3 bucket.
    S3Prefix string
    Preferred report path prefix.
    S3Region string
    Region of customer S3 bucket.
    Tags Dictionary<string, string>
    Map of key-value pairs assigned to the resource.
    TimeUnit string
    Frequency on which report data are measured and displayed.
    AdditionalArtifacts []string
    A list of additional artifacts.
    AdditionalSchemaElements []string
    A list of schema elements.
    Compression string
    Preferred format for report.
    Format string
    Preferred compression format for report.
    Id string
    The provider-assigned unique ID for this managed resource.
    RefreshClosedReports bool
    If true reports are updated after they have been finalized.
    ReportName string
    ReportVersioning string
    Overwrite the previous version of each report or to deliver the report in addition to the previous versions.
    S3Bucket string
    Name of customer S3 bucket.
    S3Prefix string
    Preferred report path prefix.
    S3Region string
    Region of customer S3 bucket.
    Tags map[string]string
    Map of key-value pairs assigned to the resource.
    TimeUnit string
    Frequency on which report data are measured and displayed.
    additionalArtifacts List<String>
    A list of additional artifacts.
    additionalSchemaElements List<String>
    A list of schema elements.
    compression String
    Preferred format for report.
    format String
    Preferred compression format for report.
    id String
    The provider-assigned unique ID for this managed resource.
    refreshClosedReports Boolean
    If true reports are updated after they have been finalized.
    reportName String
    reportVersioning String
    Overwrite the previous version of each report or to deliver the report in addition to the previous versions.
    s3Bucket String
    Name of customer S3 bucket.
    s3Prefix String
    Preferred report path prefix.
    s3Region String
    Region of customer S3 bucket.
    tags Map<String,String>
    Map of key-value pairs assigned to the resource.
    timeUnit String
    Frequency on which report data are measured and displayed.
    additionalArtifacts string[]
    A list of additional artifacts.
    additionalSchemaElements string[]
    A list of schema elements.
    compression string
    Preferred format for report.
    format string
    Preferred compression format for report.
    id string
    The provider-assigned unique ID for this managed resource.
    refreshClosedReports boolean
    If true reports are updated after they have been finalized.
    reportName string
    reportVersioning string
    Overwrite the previous version of each report or to deliver the report in addition to the previous versions.
    s3Bucket string
    Name of customer S3 bucket.
    s3Prefix string
    Preferred report path prefix.
    s3Region string
    Region of customer S3 bucket.
    tags {[key: string]: string}
    Map of key-value pairs assigned to the resource.
    timeUnit string
    Frequency on which report data are measured and displayed.
    additional_artifacts Sequence[str]
    A list of additional artifacts.
    additional_schema_elements Sequence[str]
    A list of schema elements.
    compression str
    Preferred format for report.
    format str
    Preferred compression format for report.
    id str
    The provider-assigned unique ID for this managed resource.
    refresh_closed_reports bool
    If true reports are updated after they have been finalized.
    report_name str
    report_versioning str
    Overwrite the previous version of each report or to deliver the report in addition to the previous versions.
    s3_bucket str
    Name of customer S3 bucket.
    s3_prefix str
    Preferred report path prefix.
    s3_region str
    Region of customer S3 bucket.
    tags Mapping[str, str]
    Map of key-value pairs assigned to the resource.
    time_unit str
    Frequency on which report data are measured and displayed.
    additionalArtifacts List<String>
    A list of additional artifacts.
    additionalSchemaElements List<String>
    A list of schema elements.
    compression String
    Preferred format for report.
    format String
    Preferred compression format for report.
    id String
    The provider-assigned unique ID for this managed resource.
    refreshClosedReports Boolean
    If true reports are updated after they have been finalized.
    reportName String
    reportVersioning String
    Overwrite the previous version of each report or to deliver the report in addition to the previous versions.
    s3Bucket String
    Name of customer S3 bucket.
    s3Prefix String
    Preferred report path prefix.
    s3Region String
    Region of customer S3 bucket.
    tags Map<String>
    Map of key-value pairs assigned to the resource.
    timeUnit String
    Frequency on which report data are measured and displayed.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi