github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/backup/getReportPlan.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package backup 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Use this data source to get information on an existing backup report plan. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := backup.LookupReportPlan(ctx, &backup.LookupReportPlanArgs{ 32 // Name: "my_example_backup_report_plan_name", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupReportPlan(ctx *pulumi.Context, args *LookupReportPlanArgs, opts ...pulumi.InvokeOption) (*LookupReportPlanResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupReportPlanResult 46 err := ctx.Invoke("aws:backup/getReportPlan:getReportPlan", args, &rv, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &rv, nil 51 } 52 53 // A collection of arguments for invoking getReportPlan. 54 type LookupReportPlanArgs struct { 55 // Backup report plan name. 56 Name string `pulumi:"name"` 57 // Metadata that you can assign to help organize the report plans you create. 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getReportPlan. 62 type LookupReportPlanResult struct { 63 // ARN of the backup report plan. 64 Arn string `pulumi:"arn"` 65 // Date and time that a report plan is created, in Unix format and Coordinated Universal Time (UTC). 66 CreationTime string `pulumi:"creationTime"` 67 // Deployment status of a report plan. The statuses are: `CREATE_IN_PROGRESS` | `UPDATE_IN_PROGRESS` | `DELETE_IN_PROGRESS` | `COMPLETED`. 68 DeploymentStatus string `pulumi:"deploymentStatus"` 69 // Description of the report plan. 70 Description string `pulumi:"description"` 71 // The provider-assigned unique ID for this managed resource. 72 Id string `pulumi:"id"` 73 Name string `pulumi:"name"` 74 // An object that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports. Detailed below. 75 ReportDeliveryChannels []GetReportPlanReportDeliveryChannel `pulumi:"reportDeliveryChannels"` 76 // An object that identifies the report template for the report. Reports are built using a report template. Detailed below. 77 ReportSettings []GetReportPlanReportSetting `pulumi:"reportSettings"` 78 // Metadata that you can assign to help organize the report plans you create. 79 Tags map[string]string `pulumi:"tags"` 80 } 81 82 func LookupReportPlanOutput(ctx *pulumi.Context, args LookupReportPlanOutputArgs, opts ...pulumi.InvokeOption) LookupReportPlanResultOutput { 83 return pulumi.ToOutputWithContext(context.Background(), args). 84 ApplyT(func(v interface{}) (LookupReportPlanResult, error) { 85 args := v.(LookupReportPlanArgs) 86 r, err := LookupReportPlan(ctx, &args, opts...) 87 var s LookupReportPlanResult 88 if r != nil { 89 s = *r 90 } 91 return s, err 92 }).(LookupReportPlanResultOutput) 93 } 94 95 // A collection of arguments for invoking getReportPlan. 96 type LookupReportPlanOutputArgs struct { 97 // Backup report plan name. 98 Name pulumi.StringInput `pulumi:"name"` 99 // Metadata that you can assign to help organize the report plans you create. 100 Tags pulumi.StringMapInput `pulumi:"tags"` 101 } 102 103 func (LookupReportPlanOutputArgs) ElementType() reflect.Type { 104 return reflect.TypeOf((*LookupReportPlanArgs)(nil)).Elem() 105 } 106 107 // A collection of values returned by getReportPlan. 108 type LookupReportPlanResultOutput struct{ *pulumi.OutputState } 109 110 func (LookupReportPlanResultOutput) ElementType() reflect.Type { 111 return reflect.TypeOf((*LookupReportPlanResult)(nil)).Elem() 112 } 113 114 func (o LookupReportPlanResultOutput) ToLookupReportPlanResultOutput() LookupReportPlanResultOutput { 115 return o 116 } 117 118 func (o LookupReportPlanResultOutput) ToLookupReportPlanResultOutputWithContext(ctx context.Context) LookupReportPlanResultOutput { 119 return o 120 } 121 122 // ARN of the backup report plan. 123 func (o LookupReportPlanResultOutput) Arn() pulumi.StringOutput { 124 return o.ApplyT(func(v LookupReportPlanResult) string { return v.Arn }).(pulumi.StringOutput) 125 } 126 127 // Date and time that a report plan is created, in Unix format and Coordinated Universal Time (UTC). 128 func (o LookupReportPlanResultOutput) CreationTime() pulumi.StringOutput { 129 return o.ApplyT(func(v LookupReportPlanResult) string { return v.CreationTime }).(pulumi.StringOutput) 130 } 131 132 // Deployment status of a report plan. The statuses are: `CREATE_IN_PROGRESS` | `UPDATE_IN_PROGRESS` | `DELETE_IN_PROGRESS` | `COMPLETED`. 133 func (o LookupReportPlanResultOutput) DeploymentStatus() pulumi.StringOutput { 134 return o.ApplyT(func(v LookupReportPlanResult) string { return v.DeploymentStatus }).(pulumi.StringOutput) 135 } 136 137 // Description of the report plan. 138 func (o LookupReportPlanResultOutput) Description() pulumi.StringOutput { 139 return o.ApplyT(func(v LookupReportPlanResult) string { return v.Description }).(pulumi.StringOutput) 140 } 141 142 // The provider-assigned unique ID for this managed resource. 143 func (o LookupReportPlanResultOutput) Id() pulumi.StringOutput { 144 return o.ApplyT(func(v LookupReportPlanResult) string { return v.Id }).(pulumi.StringOutput) 145 } 146 147 func (o LookupReportPlanResultOutput) Name() pulumi.StringOutput { 148 return o.ApplyT(func(v LookupReportPlanResult) string { return v.Name }).(pulumi.StringOutput) 149 } 150 151 // An object that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports. Detailed below. 152 func (o LookupReportPlanResultOutput) ReportDeliveryChannels() GetReportPlanReportDeliveryChannelArrayOutput { 153 return o.ApplyT(func(v LookupReportPlanResult) []GetReportPlanReportDeliveryChannel { return v.ReportDeliveryChannels }).(GetReportPlanReportDeliveryChannelArrayOutput) 154 } 155 156 // An object that identifies the report template for the report. Reports are built using a report template. Detailed below. 157 func (o LookupReportPlanResultOutput) ReportSettings() GetReportPlanReportSettingArrayOutput { 158 return o.ApplyT(func(v LookupReportPlanResult) []GetReportPlanReportSetting { return v.ReportSettings }).(GetReportPlanReportSettingArrayOutput) 159 } 160 161 // Metadata that you can assign to help organize the report plans you create. 162 func (o LookupReportPlanResultOutput) Tags() pulumi.StringMapOutput { 163 return o.ApplyT(func(v LookupReportPlanResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 164 } 165 166 func init() { 167 pulumi.RegisterOutputType(LookupReportPlanResultOutput{}) 168 }