github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/auditmanager/control.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 Control. 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.NewControl(ctx, "example", &auditmanager.ControlArgs{ 34 // Name: pulumi.String("example"), 35 // ControlMappingSources: auditmanager.ControlControlMappingSourceArray{ 36 // &auditmanager.ControlControlMappingSourceArgs{ 37 // SourceName: pulumi.String("example"), 38 // SourceSetUpOption: pulumi.String("Procedural_Controls_Mapping"), 39 // SourceType: pulumi.String("MANUAL"), 40 // }, 41 // }, 42 // }) 43 // if err != nil { 44 // return err 45 // } 46 // return nil 47 // }) 48 // } 49 // 50 // ``` 51 // <!--End PulumiCodeChooser --> 52 // 53 // ## Import 54 // 55 // Using `pulumi import`, import an Audit Manager Control using the `id`. For example: 56 // 57 // ```sh 58 // $ pulumi import aws:auditmanager/control:Control example abc123-de45 59 // ``` 60 type Control struct { 61 pulumi.CustomResourceState 62 63 // Recommended actions to carry out if the control isn't fulfilled. 64 ActionPlanInstructions pulumi.StringPtrOutput `pulumi:"actionPlanInstructions"` 65 // Title of the action plan for remediating the control. 66 ActionPlanTitle pulumi.StringPtrOutput `pulumi:"actionPlanTitle"` 67 // Amazon Resource Name (ARN) of the control. 68 // * `control_mapping_sources.*.source_id` - Unique identifier for the source. 69 Arn pulumi.StringOutput `pulumi:"arn"` 70 // Data mapping sources. See `controlMappingSources` below. 71 // 72 // The following arguments are optional: 73 ControlMappingSources ControlControlMappingSourceArrayOutput `pulumi:"controlMappingSources"` 74 // Description of the control. 75 Description pulumi.StringPtrOutput `pulumi:"description"` 76 // Name of the control. 77 Name pulumi.StringOutput `pulumi:"name"` 78 // A map of tags to assign to the control. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 79 Tags pulumi.StringMapOutput `pulumi:"tags"` 80 // Deprecated: Please use `tags` instead. 81 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 82 // Steps to follow to determine if the control is satisfied. 83 TestingInformation pulumi.StringPtrOutput `pulumi:"testingInformation"` 84 // Type of control, such as a custom control or a standard control. 85 Type pulumi.StringOutput `pulumi:"type"` 86 } 87 88 // NewControl registers a new resource with the given unique name, arguments, and options. 89 func NewControl(ctx *pulumi.Context, 90 name string, args *ControlArgs, opts ...pulumi.ResourceOption) (*Control, error) { 91 if args == nil { 92 args = &ControlArgs{} 93 } 94 95 opts = internal.PkgResourceDefaultOpts(opts) 96 var resource Control 97 err := ctx.RegisterResource("aws:auditmanager/control:Control", name, args, &resource, opts...) 98 if err != nil { 99 return nil, err 100 } 101 return &resource, nil 102 } 103 104 // GetControl gets an existing Control resource's state with the given name, ID, and optional 105 // state properties that are used to uniquely qualify the lookup (nil if not required). 106 func GetControl(ctx *pulumi.Context, 107 name string, id pulumi.IDInput, state *ControlState, opts ...pulumi.ResourceOption) (*Control, error) { 108 var resource Control 109 err := ctx.ReadResource("aws:auditmanager/control:Control", name, id, state, &resource, opts...) 110 if err != nil { 111 return nil, err 112 } 113 return &resource, nil 114 } 115 116 // Input properties used for looking up and filtering Control resources. 117 type controlState struct { 118 // Recommended actions to carry out if the control isn't fulfilled. 119 ActionPlanInstructions *string `pulumi:"actionPlanInstructions"` 120 // Title of the action plan for remediating the control. 121 ActionPlanTitle *string `pulumi:"actionPlanTitle"` 122 // Amazon Resource Name (ARN) of the control. 123 // * `control_mapping_sources.*.source_id` - Unique identifier for the source. 124 Arn *string `pulumi:"arn"` 125 // Data mapping sources. See `controlMappingSources` below. 126 // 127 // The following arguments are optional: 128 ControlMappingSources []ControlControlMappingSource `pulumi:"controlMappingSources"` 129 // Description of the control. 130 Description *string `pulumi:"description"` 131 // Name of the control. 132 Name *string `pulumi:"name"` 133 // A map of tags to assign to the control. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 134 Tags map[string]string `pulumi:"tags"` 135 // Deprecated: Please use `tags` instead. 136 TagsAll map[string]string `pulumi:"tagsAll"` 137 // Steps to follow to determine if the control is satisfied. 138 TestingInformation *string `pulumi:"testingInformation"` 139 // Type of control, such as a custom control or a standard control. 140 Type *string `pulumi:"type"` 141 } 142 143 type ControlState struct { 144 // Recommended actions to carry out if the control isn't fulfilled. 145 ActionPlanInstructions pulumi.StringPtrInput 146 // Title of the action plan for remediating the control. 147 ActionPlanTitle pulumi.StringPtrInput 148 // Amazon Resource Name (ARN) of the control. 149 // * `control_mapping_sources.*.source_id` - Unique identifier for the source. 150 Arn pulumi.StringPtrInput 151 // Data mapping sources. See `controlMappingSources` below. 152 // 153 // The following arguments are optional: 154 ControlMappingSources ControlControlMappingSourceArrayInput 155 // Description of the control. 156 Description pulumi.StringPtrInput 157 // Name of the control. 158 Name pulumi.StringPtrInput 159 // A map of tags to assign to the control. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 160 Tags pulumi.StringMapInput 161 // Deprecated: Please use `tags` instead. 162 TagsAll pulumi.StringMapInput 163 // Steps to follow to determine if the control is satisfied. 164 TestingInformation pulumi.StringPtrInput 165 // Type of control, such as a custom control or a standard control. 166 Type pulumi.StringPtrInput 167 } 168 169 func (ControlState) ElementType() reflect.Type { 170 return reflect.TypeOf((*controlState)(nil)).Elem() 171 } 172 173 type controlArgs struct { 174 // Recommended actions to carry out if the control isn't fulfilled. 175 ActionPlanInstructions *string `pulumi:"actionPlanInstructions"` 176 // Title of the action plan for remediating the control. 177 ActionPlanTitle *string `pulumi:"actionPlanTitle"` 178 // Data mapping sources. See `controlMappingSources` below. 179 // 180 // The following arguments are optional: 181 ControlMappingSources []ControlControlMappingSource `pulumi:"controlMappingSources"` 182 // Description of the control. 183 Description *string `pulumi:"description"` 184 // Name of the control. 185 Name *string `pulumi:"name"` 186 // A map of tags to assign to the control. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 187 Tags map[string]string `pulumi:"tags"` 188 // Steps to follow to determine if the control is satisfied. 189 TestingInformation *string `pulumi:"testingInformation"` 190 } 191 192 // The set of arguments for constructing a Control resource. 193 type ControlArgs struct { 194 // Recommended actions to carry out if the control isn't fulfilled. 195 ActionPlanInstructions pulumi.StringPtrInput 196 // Title of the action plan for remediating the control. 197 ActionPlanTitle pulumi.StringPtrInput 198 // Data mapping sources. See `controlMappingSources` below. 199 // 200 // The following arguments are optional: 201 ControlMappingSources ControlControlMappingSourceArrayInput 202 // Description of the control. 203 Description pulumi.StringPtrInput 204 // Name of the control. 205 Name pulumi.StringPtrInput 206 // A map of tags to assign to the control. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 207 Tags pulumi.StringMapInput 208 // Steps to follow to determine if the control is satisfied. 209 TestingInformation pulumi.StringPtrInput 210 } 211 212 func (ControlArgs) ElementType() reflect.Type { 213 return reflect.TypeOf((*controlArgs)(nil)).Elem() 214 } 215 216 type ControlInput interface { 217 pulumi.Input 218 219 ToControlOutput() ControlOutput 220 ToControlOutputWithContext(ctx context.Context) ControlOutput 221 } 222 223 func (*Control) ElementType() reflect.Type { 224 return reflect.TypeOf((**Control)(nil)).Elem() 225 } 226 227 func (i *Control) ToControlOutput() ControlOutput { 228 return i.ToControlOutputWithContext(context.Background()) 229 } 230 231 func (i *Control) ToControlOutputWithContext(ctx context.Context) ControlOutput { 232 return pulumi.ToOutputWithContext(ctx, i).(ControlOutput) 233 } 234 235 // ControlArrayInput is an input type that accepts ControlArray and ControlArrayOutput values. 236 // You can construct a concrete instance of `ControlArrayInput` via: 237 // 238 // ControlArray{ ControlArgs{...} } 239 type ControlArrayInput interface { 240 pulumi.Input 241 242 ToControlArrayOutput() ControlArrayOutput 243 ToControlArrayOutputWithContext(context.Context) ControlArrayOutput 244 } 245 246 type ControlArray []ControlInput 247 248 func (ControlArray) ElementType() reflect.Type { 249 return reflect.TypeOf((*[]*Control)(nil)).Elem() 250 } 251 252 func (i ControlArray) ToControlArrayOutput() ControlArrayOutput { 253 return i.ToControlArrayOutputWithContext(context.Background()) 254 } 255 256 func (i ControlArray) ToControlArrayOutputWithContext(ctx context.Context) ControlArrayOutput { 257 return pulumi.ToOutputWithContext(ctx, i).(ControlArrayOutput) 258 } 259 260 // ControlMapInput is an input type that accepts ControlMap and ControlMapOutput values. 261 // You can construct a concrete instance of `ControlMapInput` via: 262 // 263 // ControlMap{ "key": ControlArgs{...} } 264 type ControlMapInput interface { 265 pulumi.Input 266 267 ToControlMapOutput() ControlMapOutput 268 ToControlMapOutputWithContext(context.Context) ControlMapOutput 269 } 270 271 type ControlMap map[string]ControlInput 272 273 func (ControlMap) ElementType() reflect.Type { 274 return reflect.TypeOf((*map[string]*Control)(nil)).Elem() 275 } 276 277 func (i ControlMap) ToControlMapOutput() ControlMapOutput { 278 return i.ToControlMapOutputWithContext(context.Background()) 279 } 280 281 func (i ControlMap) ToControlMapOutputWithContext(ctx context.Context) ControlMapOutput { 282 return pulumi.ToOutputWithContext(ctx, i).(ControlMapOutput) 283 } 284 285 type ControlOutput struct{ *pulumi.OutputState } 286 287 func (ControlOutput) ElementType() reflect.Type { 288 return reflect.TypeOf((**Control)(nil)).Elem() 289 } 290 291 func (o ControlOutput) ToControlOutput() ControlOutput { 292 return o 293 } 294 295 func (o ControlOutput) ToControlOutputWithContext(ctx context.Context) ControlOutput { 296 return o 297 } 298 299 // Recommended actions to carry out if the control isn't fulfilled. 300 func (o ControlOutput) ActionPlanInstructions() pulumi.StringPtrOutput { 301 return o.ApplyT(func(v *Control) pulumi.StringPtrOutput { return v.ActionPlanInstructions }).(pulumi.StringPtrOutput) 302 } 303 304 // Title of the action plan for remediating the control. 305 func (o ControlOutput) ActionPlanTitle() pulumi.StringPtrOutput { 306 return o.ApplyT(func(v *Control) pulumi.StringPtrOutput { return v.ActionPlanTitle }).(pulumi.StringPtrOutput) 307 } 308 309 // Amazon Resource Name (ARN) of the control. 310 // * `control_mapping_sources.*.source_id` - Unique identifier for the source. 311 func (o ControlOutput) Arn() pulumi.StringOutput { 312 return o.ApplyT(func(v *Control) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 313 } 314 315 // Data mapping sources. See `controlMappingSources` below. 316 // 317 // The following arguments are optional: 318 func (o ControlOutput) ControlMappingSources() ControlControlMappingSourceArrayOutput { 319 return o.ApplyT(func(v *Control) ControlControlMappingSourceArrayOutput { return v.ControlMappingSources }).(ControlControlMappingSourceArrayOutput) 320 } 321 322 // Description of the control. 323 func (o ControlOutput) Description() pulumi.StringPtrOutput { 324 return o.ApplyT(func(v *Control) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 325 } 326 327 // Name of the control. 328 func (o ControlOutput) Name() pulumi.StringOutput { 329 return o.ApplyT(func(v *Control) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 330 } 331 332 // A map of tags to assign to the control. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 333 func (o ControlOutput) Tags() pulumi.StringMapOutput { 334 return o.ApplyT(func(v *Control) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 335 } 336 337 // Deprecated: Please use `tags` instead. 338 func (o ControlOutput) TagsAll() pulumi.StringMapOutput { 339 return o.ApplyT(func(v *Control) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 340 } 341 342 // Steps to follow to determine if the control is satisfied. 343 func (o ControlOutput) TestingInformation() pulumi.StringPtrOutput { 344 return o.ApplyT(func(v *Control) pulumi.StringPtrOutput { return v.TestingInformation }).(pulumi.StringPtrOutput) 345 } 346 347 // Type of control, such as a custom control or a standard control. 348 func (o ControlOutput) Type() pulumi.StringOutput { 349 return o.ApplyT(func(v *Control) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) 350 } 351 352 type ControlArrayOutput struct{ *pulumi.OutputState } 353 354 func (ControlArrayOutput) ElementType() reflect.Type { 355 return reflect.TypeOf((*[]*Control)(nil)).Elem() 356 } 357 358 func (o ControlArrayOutput) ToControlArrayOutput() ControlArrayOutput { 359 return o 360 } 361 362 func (o ControlArrayOutput) ToControlArrayOutputWithContext(ctx context.Context) ControlArrayOutput { 363 return o 364 } 365 366 func (o ControlArrayOutput) Index(i pulumi.IntInput) ControlOutput { 367 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Control { 368 return vs[0].([]*Control)[vs[1].(int)] 369 }).(ControlOutput) 370 } 371 372 type ControlMapOutput struct{ *pulumi.OutputState } 373 374 func (ControlMapOutput) ElementType() reflect.Type { 375 return reflect.TypeOf((*map[string]*Control)(nil)).Elem() 376 } 377 378 func (o ControlMapOutput) ToControlMapOutput() ControlMapOutput { 379 return o 380 } 381 382 func (o ControlMapOutput) ToControlMapOutputWithContext(ctx context.Context) ControlMapOutput { 383 return o 384 } 385 386 func (o ControlMapOutput) MapIndex(k pulumi.StringInput) ControlOutput { 387 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Control { 388 return vs[0].(map[string]*Control)[vs[1].(string)] 389 }).(ControlOutput) 390 } 391 392 func init() { 393 pulumi.RegisterInputType(reflect.TypeOf((*ControlInput)(nil)).Elem(), &Control{}) 394 pulumi.RegisterInputType(reflect.TypeOf((*ControlArrayInput)(nil)).Elem(), ControlArray{}) 395 pulumi.RegisterInputType(reflect.TypeOf((*ControlMapInput)(nil)).Elem(), ControlMap{}) 396 pulumi.RegisterOutputType(ControlOutput{}) 397 pulumi.RegisterOutputType(ControlArrayOutput{}) 398 pulumi.RegisterOutputType(ControlMapOutput{}) 399 }