github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/auditmanager/framework.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 auditmanager 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 // Resource for managing an AWS Audit Manager Framework. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/auditmanager" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := auditmanager.NewFramework(ctx, "test", &auditmanager.FrameworkArgs{ 34 // Name: pulumi.String("example"), 35 // ControlSets: auditmanager.FrameworkControlSetArray{ 36 // &auditmanager.FrameworkControlSetArgs{ 37 // Name: pulumi.String("example"), 38 // Controls: auditmanager.FrameworkControlSetControlArray{ 39 // &auditmanager.FrameworkControlSetControlArgs{ 40 // Id: pulumi.Any(testAwsAuditmanagerControl.Id), 41 // }, 42 // }, 43 // }, 44 // }, 45 // }) 46 // if err != nil { 47 // return err 48 // } 49 // return nil 50 // }) 51 // } 52 // 53 // ``` 54 // <!--End PulumiCodeChooser --> 55 // 56 // ## Import 57 // 58 // Using `pulumi import`, import Audit Manager Framework using the framework `id`. For example: 59 // 60 // ```sh 61 // $ pulumi import aws:auditmanager/framework:Framework example abc123-de45 62 // ``` 63 type Framework struct { 64 pulumi.CustomResourceState 65 66 // Amazon Resource Name (ARN) of the framework. 67 // * `control_sets[*].id` - Unique identifier for the framework control set. 68 Arn pulumi.StringOutput `pulumi:"arn"` 69 // Compliance type that the new custom framework supports, such as `CIS` or `HIPAA`. 70 ComplianceType pulumi.StringPtrOutput `pulumi:"complianceType"` 71 // Control sets that are associated with the framework. See `controlSets` below. 72 // 73 // The following arguments are optional: 74 ControlSets FrameworkControlSetArrayOutput `pulumi:"controlSets"` 75 // Description of the framework. 76 Description pulumi.StringPtrOutput `pulumi:"description"` 77 // Framework type, such as a custom framework or a standard framework. 78 FrameworkType pulumi.StringOutput `pulumi:"frameworkType"` 79 // Name of the framework. 80 Name pulumi.StringOutput `pulumi:"name"` 81 // A map of tags to assign to the framework. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 82 Tags pulumi.StringMapOutput `pulumi:"tags"` 83 // Deprecated: Please use `tags` instead. 84 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 85 } 86 87 // NewFramework registers a new resource with the given unique name, arguments, and options. 88 func NewFramework(ctx *pulumi.Context, 89 name string, args *FrameworkArgs, opts ...pulumi.ResourceOption) (*Framework, error) { 90 if args == nil { 91 args = &FrameworkArgs{} 92 } 93 94 opts = internal.PkgResourceDefaultOpts(opts) 95 var resource Framework 96 err := ctx.RegisterResource("aws:auditmanager/framework:Framework", name, args, &resource, opts...) 97 if err != nil { 98 return nil, err 99 } 100 return &resource, nil 101 } 102 103 // GetFramework gets an existing Framework resource's state with the given name, ID, and optional 104 // state properties that are used to uniquely qualify the lookup (nil if not required). 105 func GetFramework(ctx *pulumi.Context, 106 name string, id pulumi.IDInput, state *FrameworkState, opts ...pulumi.ResourceOption) (*Framework, error) { 107 var resource Framework 108 err := ctx.ReadResource("aws:auditmanager/framework:Framework", name, id, state, &resource, opts...) 109 if err != nil { 110 return nil, err 111 } 112 return &resource, nil 113 } 114 115 // Input properties used for looking up and filtering Framework resources. 116 type frameworkState struct { 117 // Amazon Resource Name (ARN) of the framework. 118 // * `control_sets[*].id` - Unique identifier for the framework control set. 119 Arn *string `pulumi:"arn"` 120 // Compliance type that the new custom framework supports, such as `CIS` or `HIPAA`. 121 ComplianceType *string `pulumi:"complianceType"` 122 // Control sets that are associated with the framework. See `controlSets` below. 123 // 124 // The following arguments are optional: 125 ControlSets []FrameworkControlSet `pulumi:"controlSets"` 126 // Description of the framework. 127 Description *string `pulumi:"description"` 128 // Framework type, such as a custom framework or a standard framework. 129 FrameworkType *string `pulumi:"frameworkType"` 130 // Name of the framework. 131 Name *string `pulumi:"name"` 132 // A map of tags to assign to the framework. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 133 Tags map[string]string `pulumi:"tags"` 134 // Deprecated: Please use `tags` instead. 135 TagsAll map[string]string `pulumi:"tagsAll"` 136 } 137 138 type FrameworkState struct { 139 // Amazon Resource Name (ARN) of the framework. 140 // * `control_sets[*].id` - Unique identifier for the framework control set. 141 Arn pulumi.StringPtrInput 142 // Compliance type that the new custom framework supports, such as `CIS` or `HIPAA`. 143 ComplianceType pulumi.StringPtrInput 144 // Control sets that are associated with the framework. See `controlSets` below. 145 // 146 // The following arguments are optional: 147 ControlSets FrameworkControlSetArrayInput 148 // Description of the framework. 149 Description pulumi.StringPtrInput 150 // Framework type, such as a custom framework or a standard framework. 151 FrameworkType pulumi.StringPtrInput 152 // Name of the framework. 153 Name pulumi.StringPtrInput 154 // A map of tags to assign to the framework. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 155 Tags pulumi.StringMapInput 156 // Deprecated: Please use `tags` instead. 157 TagsAll pulumi.StringMapInput 158 } 159 160 func (FrameworkState) ElementType() reflect.Type { 161 return reflect.TypeOf((*frameworkState)(nil)).Elem() 162 } 163 164 type frameworkArgs struct { 165 // Compliance type that the new custom framework supports, such as `CIS` or `HIPAA`. 166 ComplianceType *string `pulumi:"complianceType"` 167 // Control sets that are associated with the framework. See `controlSets` below. 168 // 169 // The following arguments are optional: 170 ControlSets []FrameworkControlSet `pulumi:"controlSets"` 171 // Description of the framework. 172 Description *string `pulumi:"description"` 173 // Name of the framework. 174 Name *string `pulumi:"name"` 175 // A map of tags to assign to the framework. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 176 Tags map[string]string `pulumi:"tags"` 177 } 178 179 // The set of arguments for constructing a Framework resource. 180 type FrameworkArgs struct { 181 // Compliance type that the new custom framework supports, such as `CIS` or `HIPAA`. 182 ComplianceType pulumi.StringPtrInput 183 // Control sets that are associated with the framework. See `controlSets` below. 184 // 185 // The following arguments are optional: 186 ControlSets FrameworkControlSetArrayInput 187 // Description of the framework. 188 Description pulumi.StringPtrInput 189 // Name of the framework. 190 Name pulumi.StringPtrInput 191 // A map of tags to assign to the framework. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 192 Tags pulumi.StringMapInput 193 } 194 195 func (FrameworkArgs) ElementType() reflect.Type { 196 return reflect.TypeOf((*frameworkArgs)(nil)).Elem() 197 } 198 199 type FrameworkInput interface { 200 pulumi.Input 201 202 ToFrameworkOutput() FrameworkOutput 203 ToFrameworkOutputWithContext(ctx context.Context) FrameworkOutput 204 } 205 206 func (*Framework) ElementType() reflect.Type { 207 return reflect.TypeOf((**Framework)(nil)).Elem() 208 } 209 210 func (i *Framework) ToFrameworkOutput() FrameworkOutput { 211 return i.ToFrameworkOutputWithContext(context.Background()) 212 } 213 214 func (i *Framework) ToFrameworkOutputWithContext(ctx context.Context) FrameworkOutput { 215 return pulumi.ToOutputWithContext(ctx, i).(FrameworkOutput) 216 } 217 218 // FrameworkArrayInput is an input type that accepts FrameworkArray and FrameworkArrayOutput values. 219 // You can construct a concrete instance of `FrameworkArrayInput` via: 220 // 221 // FrameworkArray{ FrameworkArgs{...} } 222 type FrameworkArrayInput interface { 223 pulumi.Input 224 225 ToFrameworkArrayOutput() FrameworkArrayOutput 226 ToFrameworkArrayOutputWithContext(context.Context) FrameworkArrayOutput 227 } 228 229 type FrameworkArray []FrameworkInput 230 231 func (FrameworkArray) ElementType() reflect.Type { 232 return reflect.TypeOf((*[]*Framework)(nil)).Elem() 233 } 234 235 func (i FrameworkArray) ToFrameworkArrayOutput() FrameworkArrayOutput { 236 return i.ToFrameworkArrayOutputWithContext(context.Background()) 237 } 238 239 func (i FrameworkArray) ToFrameworkArrayOutputWithContext(ctx context.Context) FrameworkArrayOutput { 240 return pulumi.ToOutputWithContext(ctx, i).(FrameworkArrayOutput) 241 } 242 243 // FrameworkMapInput is an input type that accepts FrameworkMap and FrameworkMapOutput values. 244 // You can construct a concrete instance of `FrameworkMapInput` via: 245 // 246 // FrameworkMap{ "key": FrameworkArgs{...} } 247 type FrameworkMapInput interface { 248 pulumi.Input 249 250 ToFrameworkMapOutput() FrameworkMapOutput 251 ToFrameworkMapOutputWithContext(context.Context) FrameworkMapOutput 252 } 253 254 type FrameworkMap map[string]FrameworkInput 255 256 func (FrameworkMap) ElementType() reflect.Type { 257 return reflect.TypeOf((*map[string]*Framework)(nil)).Elem() 258 } 259 260 func (i FrameworkMap) ToFrameworkMapOutput() FrameworkMapOutput { 261 return i.ToFrameworkMapOutputWithContext(context.Background()) 262 } 263 264 func (i FrameworkMap) ToFrameworkMapOutputWithContext(ctx context.Context) FrameworkMapOutput { 265 return pulumi.ToOutputWithContext(ctx, i).(FrameworkMapOutput) 266 } 267 268 type FrameworkOutput struct{ *pulumi.OutputState } 269 270 func (FrameworkOutput) ElementType() reflect.Type { 271 return reflect.TypeOf((**Framework)(nil)).Elem() 272 } 273 274 func (o FrameworkOutput) ToFrameworkOutput() FrameworkOutput { 275 return o 276 } 277 278 func (o FrameworkOutput) ToFrameworkOutputWithContext(ctx context.Context) FrameworkOutput { 279 return o 280 } 281 282 // Amazon Resource Name (ARN) of the framework. 283 // * `control_sets[*].id` - Unique identifier for the framework control set. 284 func (o FrameworkOutput) Arn() pulumi.StringOutput { 285 return o.ApplyT(func(v *Framework) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 286 } 287 288 // Compliance type that the new custom framework supports, such as `CIS` or `HIPAA`. 289 func (o FrameworkOutput) ComplianceType() pulumi.StringPtrOutput { 290 return o.ApplyT(func(v *Framework) pulumi.StringPtrOutput { return v.ComplianceType }).(pulumi.StringPtrOutput) 291 } 292 293 // Control sets that are associated with the framework. See `controlSets` below. 294 // 295 // The following arguments are optional: 296 func (o FrameworkOutput) ControlSets() FrameworkControlSetArrayOutput { 297 return o.ApplyT(func(v *Framework) FrameworkControlSetArrayOutput { return v.ControlSets }).(FrameworkControlSetArrayOutput) 298 } 299 300 // Description of the framework. 301 func (o FrameworkOutput) Description() pulumi.StringPtrOutput { 302 return o.ApplyT(func(v *Framework) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 303 } 304 305 // Framework type, such as a custom framework or a standard framework. 306 func (o FrameworkOutput) FrameworkType() pulumi.StringOutput { 307 return o.ApplyT(func(v *Framework) pulumi.StringOutput { return v.FrameworkType }).(pulumi.StringOutput) 308 } 309 310 // Name of the framework. 311 func (o FrameworkOutput) Name() pulumi.StringOutput { 312 return o.ApplyT(func(v *Framework) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 313 } 314 315 // A map of tags to assign to the framework. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 316 func (o FrameworkOutput) Tags() pulumi.StringMapOutput { 317 return o.ApplyT(func(v *Framework) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 318 } 319 320 // Deprecated: Please use `tags` instead. 321 func (o FrameworkOutput) TagsAll() pulumi.StringMapOutput { 322 return o.ApplyT(func(v *Framework) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 323 } 324 325 type FrameworkArrayOutput struct{ *pulumi.OutputState } 326 327 func (FrameworkArrayOutput) ElementType() reflect.Type { 328 return reflect.TypeOf((*[]*Framework)(nil)).Elem() 329 } 330 331 func (o FrameworkArrayOutput) ToFrameworkArrayOutput() FrameworkArrayOutput { 332 return o 333 } 334 335 func (o FrameworkArrayOutput) ToFrameworkArrayOutputWithContext(ctx context.Context) FrameworkArrayOutput { 336 return o 337 } 338 339 func (o FrameworkArrayOutput) Index(i pulumi.IntInput) FrameworkOutput { 340 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Framework { 341 return vs[0].([]*Framework)[vs[1].(int)] 342 }).(FrameworkOutput) 343 } 344 345 type FrameworkMapOutput struct{ *pulumi.OutputState } 346 347 func (FrameworkMapOutput) ElementType() reflect.Type { 348 return reflect.TypeOf((*map[string]*Framework)(nil)).Elem() 349 } 350 351 func (o FrameworkMapOutput) ToFrameworkMapOutput() FrameworkMapOutput { 352 return o 353 } 354 355 func (o FrameworkMapOutput) ToFrameworkMapOutputWithContext(ctx context.Context) FrameworkMapOutput { 356 return o 357 } 358 359 func (o FrameworkMapOutput) MapIndex(k pulumi.StringInput) FrameworkOutput { 360 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Framework { 361 return vs[0].(map[string]*Framework)[vs[1].(string)] 362 }).(FrameworkOutput) 363 } 364 365 func init() { 366 pulumi.RegisterInputType(reflect.TypeOf((*FrameworkInput)(nil)).Elem(), &Framework{}) 367 pulumi.RegisterInputType(reflect.TypeOf((*FrameworkArrayInput)(nil)).Elem(), FrameworkArray{}) 368 pulumi.RegisterInputType(reflect.TypeOf((*FrameworkMapInput)(nil)).Elem(), FrameworkMap{}) 369 pulumi.RegisterOutputType(FrameworkOutput{}) 370 pulumi.RegisterOutputType(FrameworkArrayOutput{}) 371 pulumi.RegisterOutputType(FrameworkMapOutput{}) 372 }