github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/backup/getFramework.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 framework. 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.LookupFramework(ctx, &backup.LookupFrameworkArgs{ 32 // Name: "my_example_backup_framework_name", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupFramework(ctx *pulumi.Context, args *LookupFrameworkArgs, opts ...pulumi.InvokeOption) (*LookupFrameworkResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupFrameworkResult 46 err := ctx.Invoke("aws:backup/getFramework:getFramework", 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 getFramework. 54 type LookupFrameworkArgs struct { 55 // Backup framework name. 56 Name string `pulumi:"name"` 57 // Tag key-value pair applied to those AWS resources that you want to trigger an evaluation for a rule. A maximum of one key-value pair can be provided. 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getFramework. 62 type LookupFrameworkResult struct { 63 // ARN of the backup framework. 64 Arn string `pulumi:"arn"` 65 // One or more control blocks that make up the framework. Each control in the list has a name, input parameters, and scope. Detailed below. 66 Controls []GetFrameworkControl `pulumi:"controls"` 67 // Date and time that a framework is created, in Unix format and Coordinated Universal Time (UTC). 68 CreationTime string `pulumi:"creationTime"` 69 // Deployment status of a framework. The statuses are: `CREATE_IN_PROGRESS` | `UPDATE_IN_PROGRESS` | `DELETE_IN_PROGRESS` | `COMPLETED`| `FAILED`. 70 DeploymentStatus string `pulumi:"deploymentStatus"` 71 // Description of the framework. 72 Description string `pulumi:"description"` 73 // The provider-assigned unique ID for this managed resource. 74 Id string `pulumi:"id"` 75 // Name of a parameter, for example, BackupPlanFrequency. 76 Name string `pulumi:"name"` 77 // Framework consists of one or more controls. Each control governs a resource, such as backup plans, backup selections, backup vaults, or recovery points. You can also turn AWS Config recording on or off for each resource. The statuses are: `ACTIVE`, `PARTIALLY_ACTIVE`, `INACTIVE`, `UNAVAILABLE`. For more information refer to the [AWS documentation for Framework Status](https://docs.aws.amazon.com/aws-backup/latest/devguide/API_DescribeFramework.html#Backup-DescribeFramework-response-FrameworkStatus) 78 Status string `pulumi:"status"` 79 // Tag key-value pair applied to those AWS resources that you want to trigger an evaluation for a rule. A maximum of one key-value pair can be provided. 80 Tags map[string]string `pulumi:"tags"` 81 } 82 83 func LookupFrameworkOutput(ctx *pulumi.Context, args LookupFrameworkOutputArgs, opts ...pulumi.InvokeOption) LookupFrameworkResultOutput { 84 return pulumi.ToOutputWithContext(context.Background(), args). 85 ApplyT(func(v interface{}) (LookupFrameworkResult, error) { 86 args := v.(LookupFrameworkArgs) 87 r, err := LookupFramework(ctx, &args, opts...) 88 var s LookupFrameworkResult 89 if r != nil { 90 s = *r 91 } 92 return s, err 93 }).(LookupFrameworkResultOutput) 94 } 95 96 // A collection of arguments for invoking getFramework. 97 type LookupFrameworkOutputArgs struct { 98 // Backup framework name. 99 Name pulumi.StringInput `pulumi:"name"` 100 // Tag key-value pair applied to those AWS resources that you want to trigger an evaluation for a rule. A maximum of one key-value pair can be provided. 101 Tags pulumi.StringMapInput `pulumi:"tags"` 102 } 103 104 func (LookupFrameworkOutputArgs) ElementType() reflect.Type { 105 return reflect.TypeOf((*LookupFrameworkArgs)(nil)).Elem() 106 } 107 108 // A collection of values returned by getFramework. 109 type LookupFrameworkResultOutput struct{ *pulumi.OutputState } 110 111 func (LookupFrameworkResultOutput) ElementType() reflect.Type { 112 return reflect.TypeOf((*LookupFrameworkResult)(nil)).Elem() 113 } 114 115 func (o LookupFrameworkResultOutput) ToLookupFrameworkResultOutput() LookupFrameworkResultOutput { 116 return o 117 } 118 119 func (o LookupFrameworkResultOutput) ToLookupFrameworkResultOutputWithContext(ctx context.Context) LookupFrameworkResultOutput { 120 return o 121 } 122 123 // ARN of the backup framework. 124 func (o LookupFrameworkResultOutput) Arn() pulumi.StringOutput { 125 return o.ApplyT(func(v LookupFrameworkResult) string { return v.Arn }).(pulumi.StringOutput) 126 } 127 128 // One or more control blocks that make up the framework. Each control in the list has a name, input parameters, and scope. Detailed below. 129 func (o LookupFrameworkResultOutput) Controls() GetFrameworkControlArrayOutput { 130 return o.ApplyT(func(v LookupFrameworkResult) []GetFrameworkControl { return v.Controls }).(GetFrameworkControlArrayOutput) 131 } 132 133 // Date and time that a framework is created, in Unix format and Coordinated Universal Time (UTC). 134 func (o LookupFrameworkResultOutput) CreationTime() pulumi.StringOutput { 135 return o.ApplyT(func(v LookupFrameworkResult) string { return v.CreationTime }).(pulumi.StringOutput) 136 } 137 138 // Deployment status of a framework. The statuses are: `CREATE_IN_PROGRESS` | `UPDATE_IN_PROGRESS` | `DELETE_IN_PROGRESS` | `COMPLETED`| `FAILED`. 139 func (o LookupFrameworkResultOutput) DeploymentStatus() pulumi.StringOutput { 140 return o.ApplyT(func(v LookupFrameworkResult) string { return v.DeploymentStatus }).(pulumi.StringOutput) 141 } 142 143 // Description of the framework. 144 func (o LookupFrameworkResultOutput) Description() pulumi.StringOutput { 145 return o.ApplyT(func(v LookupFrameworkResult) string { return v.Description }).(pulumi.StringOutput) 146 } 147 148 // The provider-assigned unique ID for this managed resource. 149 func (o LookupFrameworkResultOutput) Id() pulumi.StringOutput { 150 return o.ApplyT(func(v LookupFrameworkResult) string { return v.Id }).(pulumi.StringOutput) 151 } 152 153 // Name of a parameter, for example, BackupPlanFrequency. 154 func (o LookupFrameworkResultOutput) Name() pulumi.StringOutput { 155 return o.ApplyT(func(v LookupFrameworkResult) string { return v.Name }).(pulumi.StringOutput) 156 } 157 158 // Framework consists of one or more controls. Each control governs a resource, such as backup plans, backup selections, backup vaults, or recovery points. You can also turn AWS Config recording on or off for each resource. The statuses are: `ACTIVE`, `PARTIALLY_ACTIVE`, `INACTIVE`, `UNAVAILABLE`. For more information refer to the [AWS documentation for Framework Status](https://docs.aws.amazon.com/aws-backup/latest/devguide/API_DescribeFramework.html#Backup-DescribeFramework-response-FrameworkStatus) 159 func (o LookupFrameworkResultOutput) Status() pulumi.StringOutput { 160 return o.ApplyT(func(v LookupFrameworkResult) string { return v.Status }).(pulumi.StringOutput) 161 } 162 163 // Tag key-value pair applied to those AWS resources that you want to trigger an evaluation for a rule. A maximum of one key-value pair can be provided. 164 func (o LookupFrameworkResultOutput) Tags() pulumi.StringMapOutput { 165 return o.ApplyT(func(v LookupFrameworkResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 166 } 167 168 func init() { 169 pulumi.RegisterOutputType(LookupFrameworkResultOutput{}) 170 }