-
Notifications
You must be signed in to change notification settings - Fork 151
/
organizationCustomPolicyRule.go
490 lines (430 loc) · 23.8 KB
/
organizationCustomPolicyRule.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cfg
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Config Organization Custom Policy Rule. More information about these rules can be found in the [Enabling AWS Config Rules Across all Accounts in Your Organization](https://docs.aws.amazon.com/config/latest/developerguide/config-rule-multi-account-deployment.html) and [AWS Config Managed Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html) documentation. For working with Organization Managed Rules (those invoking an AWS managed rule), see the `aws_config_organization_managed__rule` resource.
//
// > **NOTE:** This resource must be created in the Organization master account and rules will include the master account unless its ID is added to the `excludedAccounts` argument.
//
// ## Example Usage
//
// ### Basic Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cfg"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := cfg.NewOrganizationCustomPolicyRule(ctx, "example", &cfg.OrganizationCustomPolicyRuleArgs{
// Name: pulumi.String("example_rule_name"),
// PolicyRuntime: pulumi.String("guard-2.x.x"),
// PolicyText: pulumi.String(`let status = ['ACTIVE']
//
// rule tableisactive when
//
// resourceType == "AWS::DynamoDB::Table" {
// configuration.tableStatus == %status
// }
//
// rule checkcompliance when
//
// resourceType == "AWS::DynamoDB::Table"
// tableisactive {
// let pitr = supplementaryConfiguration.ContinuousBackupsDescription.pointInTimeRecoveryDescription.pointInTimeRecoveryStatus
// %pitr == "ENABLED"
// }
//
// `),
//
// ResourceTypesScopes: pulumi.StringArray{
// pulumi.String("AWS::DynamoDB::Table"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// Using `pulumi import`, import a Config Organization Custom Policy Rule using the `name` argument. For example:
//
// ```sh
// $ pulumi import aws:cfg/organizationCustomPolicyRule:OrganizationCustomPolicyRule example example_rule_name
// ```
type OrganizationCustomPolicyRule struct {
pulumi.CustomResourceState
// Amazon Resource Name (ARN) of the rule
Arn pulumi.StringOutput `pulumi:"arn"`
// List of AWS account identifiers to exclude from the rule
DebugLogDeliveryAccounts pulumi.StringArrayOutput `pulumi:"debugLogDeliveryAccounts"`
// Description of the rule
Description pulumi.StringPtrOutput `pulumi:"description"`
// List of AWS account identifiers to exclude from the rule
ExcludedAccounts pulumi.StringArrayOutput `pulumi:"excludedAccounts"`
// A string in JSON format that is passed to the AWS Config Rule Lambda Function
InputParameters pulumi.StringPtrOutput `pulumi:"inputParameters"`
// Maximum frequency with which AWS Config runs evaluations for a rule, if the rule is triggered at a periodic frequency. Defaults to `TwentyFour_Hours` for periodic frequency triggered rules. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, or `TwentyFour_Hours`.
MaximumExecutionFrequency pulumi.StringPtrOutput `pulumi:"maximumExecutionFrequency"`
// name of the rule
Name pulumi.StringOutput `pulumi:"name"`
// runtime system for your organization AWS Config Custom Policy rules
PolicyRuntime pulumi.StringOutput `pulumi:"policyRuntime"`
// policy definition containing the logic for your organization AWS Config Custom Policy rule
PolicyText pulumi.StringOutput `pulumi:"policyText"`
// Identifier of the AWS resource to evaluate
ResourceIdScope pulumi.StringPtrOutput `pulumi:"resourceIdScope"`
// List of types of AWS resources to evaluate
ResourceTypesScopes pulumi.StringArrayOutput `pulumi:"resourceTypesScopes"`
// Tag key of AWS resources to evaluate
TagKeyScope pulumi.StringPtrOutput `pulumi:"tagKeyScope"`
// Tag value of AWS resources to evaluate
TagValueScope pulumi.StringPtrOutput `pulumi:"tagValueScope"`
// List of notification types that trigger AWS Config to run an evaluation for the rule. Valid values: `ConfigurationItemChangeNotification`, `OversizedConfigurationItemChangeNotification`
//
// The following arguments are optional:
TriggerTypes pulumi.StringArrayOutput `pulumi:"triggerTypes"`
}
// NewOrganizationCustomPolicyRule registers a new resource with the given unique name, arguments, and options.
func NewOrganizationCustomPolicyRule(ctx *pulumi.Context,
name string, args *OrganizationCustomPolicyRuleArgs, opts ...pulumi.ResourceOption) (*OrganizationCustomPolicyRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PolicyRuntime == nil {
return nil, errors.New("invalid value for required argument 'PolicyRuntime'")
}
if args.PolicyText == nil {
return nil, errors.New("invalid value for required argument 'PolicyText'")
}
if args.TriggerTypes == nil {
return nil, errors.New("invalid value for required argument 'TriggerTypes'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource OrganizationCustomPolicyRule
err := ctx.RegisterResource("aws:cfg/organizationCustomPolicyRule:OrganizationCustomPolicyRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOrganizationCustomPolicyRule gets an existing OrganizationCustomPolicyRule resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetOrganizationCustomPolicyRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OrganizationCustomPolicyRuleState, opts ...pulumi.ResourceOption) (*OrganizationCustomPolicyRule, error) {
var resource OrganizationCustomPolicyRule
err := ctx.ReadResource("aws:cfg/organizationCustomPolicyRule:OrganizationCustomPolicyRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering OrganizationCustomPolicyRule resources.
type organizationCustomPolicyRuleState struct {
// Amazon Resource Name (ARN) of the rule
Arn *string `pulumi:"arn"`
// List of AWS account identifiers to exclude from the rule
DebugLogDeliveryAccounts []string `pulumi:"debugLogDeliveryAccounts"`
// Description of the rule
Description *string `pulumi:"description"`
// List of AWS account identifiers to exclude from the rule
ExcludedAccounts []string `pulumi:"excludedAccounts"`
// A string in JSON format that is passed to the AWS Config Rule Lambda Function
InputParameters *string `pulumi:"inputParameters"`
// Maximum frequency with which AWS Config runs evaluations for a rule, if the rule is triggered at a periodic frequency. Defaults to `TwentyFour_Hours` for periodic frequency triggered rules. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, or `TwentyFour_Hours`.
MaximumExecutionFrequency *string `pulumi:"maximumExecutionFrequency"`
// name of the rule
Name *string `pulumi:"name"`
// runtime system for your organization AWS Config Custom Policy rules
PolicyRuntime *string `pulumi:"policyRuntime"`
// policy definition containing the logic for your organization AWS Config Custom Policy rule
PolicyText *string `pulumi:"policyText"`
// Identifier of the AWS resource to evaluate
ResourceIdScope *string `pulumi:"resourceIdScope"`
// List of types of AWS resources to evaluate
ResourceTypesScopes []string `pulumi:"resourceTypesScopes"`
// Tag key of AWS resources to evaluate
TagKeyScope *string `pulumi:"tagKeyScope"`
// Tag value of AWS resources to evaluate
TagValueScope *string `pulumi:"tagValueScope"`
// List of notification types that trigger AWS Config to run an evaluation for the rule. Valid values: `ConfigurationItemChangeNotification`, `OversizedConfigurationItemChangeNotification`
//
// The following arguments are optional:
TriggerTypes []string `pulumi:"triggerTypes"`
}
type OrganizationCustomPolicyRuleState struct {
// Amazon Resource Name (ARN) of the rule
Arn pulumi.StringPtrInput
// List of AWS account identifiers to exclude from the rule
DebugLogDeliveryAccounts pulumi.StringArrayInput
// Description of the rule
Description pulumi.StringPtrInput
// List of AWS account identifiers to exclude from the rule
ExcludedAccounts pulumi.StringArrayInput
// A string in JSON format that is passed to the AWS Config Rule Lambda Function
InputParameters pulumi.StringPtrInput
// Maximum frequency with which AWS Config runs evaluations for a rule, if the rule is triggered at a periodic frequency. Defaults to `TwentyFour_Hours` for periodic frequency triggered rules. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, or `TwentyFour_Hours`.
MaximumExecutionFrequency pulumi.StringPtrInput
// name of the rule
Name pulumi.StringPtrInput
// runtime system for your organization AWS Config Custom Policy rules
PolicyRuntime pulumi.StringPtrInput
// policy definition containing the logic for your organization AWS Config Custom Policy rule
PolicyText pulumi.StringPtrInput
// Identifier of the AWS resource to evaluate
ResourceIdScope pulumi.StringPtrInput
// List of types of AWS resources to evaluate
ResourceTypesScopes pulumi.StringArrayInput
// Tag key of AWS resources to evaluate
TagKeyScope pulumi.StringPtrInput
// Tag value of AWS resources to evaluate
TagValueScope pulumi.StringPtrInput
// List of notification types that trigger AWS Config to run an evaluation for the rule. Valid values: `ConfigurationItemChangeNotification`, `OversizedConfigurationItemChangeNotification`
//
// The following arguments are optional:
TriggerTypes pulumi.StringArrayInput
}
func (OrganizationCustomPolicyRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*organizationCustomPolicyRuleState)(nil)).Elem()
}
type organizationCustomPolicyRuleArgs struct {
// List of AWS account identifiers to exclude from the rule
DebugLogDeliveryAccounts []string `pulumi:"debugLogDeliveryAccounts"`
// Description of the rule
Description *string `pulumi:"description"`
// List of AWS account identifiers to exclude from the rule
ExcludedAccounts []string `pulumi:"excludedAccounts"`
// A string in JSON format that is passed to the AWS Config Rule Lambda Function
InputParameters *string `pulumi:"inputParameters"`
// Maximum frequency with which AWS Config runs evaluations for a rule, if the rule is triggered at a periodic frequency. Defaults to `TwentyFour_Hours` for periodic frequency triggered rules. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, or `TwentyFour_Hours`.
MaximumExecutionFrequency *string `pulumi:"maximumExecutionFrequency"`
// name of the rule
Name *string `pulumi:"name"`
// runtime system for your organization AWS Config Custom Policy rules
PolicyRuntime string `pulumi:"policyRuntime"`
// policy definition containing the logic for your organization AWS Config Custom Policy rule
PolicyText string `pulumi:"policyText"`
// Identifier of the AWS resource to evaluate
ResourceIdScope *string `pulumi:"resourceIdScope"`
// List of types of AWS resources to evaluate
ResourceTypesScopes []string `pulumi:"resourceTypesScopes"`
// Tag key of AWS resources to evaluate
TagKeyScope *string `pulumi:"tagKeyScope"`
// Tag value of AWS resources to evaluate
TagValueScope *string `pulumi:"tagValueScope"`
// List of notification types that trigger AWS Config to run an evaluation for the rule. Valid values: `ConfigurationItemChangeNotification`, `OversizedConfigurationItemChangeNotification`
//
// The following arguments are optional:
TriggerTypes []string `pulumi:"triggerTypes"`
}
// The set of arguments for constructing a OrganizationCustomPolicyRule resource.
type OrganizationCustomPolicyRuleArgs struct {
// List of AWS account identifiers to exclude from the rule
DebugLogDeliveryAccounts pulumi.StringArrayInput
// Description of the rule
Description pulumi.StringPtrInput
// List of AWS account identifiers to exclude from the rule
ExcludedAccounts pulumi.StringArrayInput
// A string in JSON format that is passed to the AWS Config Rule Lambda Function
InputParameters pulumi.StringPtrInput
// Maximum frequency with which AWS Config runs evaluations for a rule, if the rule is triggered at a periodic frequency. Defaults to `TwentyFour_Hours` for periodic frequency triggered rules. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, or `TwentyFour_Hours`.
MaximumExecutionFrequency pulumi.StringPtrInput
// name of the rule
Name pulumi.StringPtrInput
// runtime system for your organization AWS Config Custom Policy rules
PolicyRuntime pulumi.StringInput
// policy definition containing the logic for your organization AWS Config Custom Policy rule
PolicyText pulumi.StringInput
// Identifier of the AWS resource to evaluate
ResourceIdScope pulumi.StringPtrInput
// List of types of AWS resources to evaluate
ResourceTypesScopes pulumi.StringArrayInput
// Tag key of AWS resources to evaluate
TagKeyScope pulumi.StringPtrInput
// Tag value of AWS resources to evaluate
TagValueScope pulumi.StringPtrInput
// List of notification types that trigger AWS Config to run an evaluation for the rule. Valid values: `ConfigurationItemChangeNotification`, `OversizedConfigurationItemChangeNotification`
//
// The following arguments are optional:
TriggerTypes pulumi.StringArrayInput
}
func (OrganizationCustomPolicyRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*organizationCustomPolicyRuleArgs)(nil)).Elem()
}
type OrganizationCustomPolicyRuleInput interface {
pulumi.Input
ToOrganizationCustomPolicyRuleOutput() OrganizationCustomPolicyRuleOutput
ToOrganizationCustomPolicyRuleOutputWithContext(ctx context.Context) OrganizationCustomPolicyRuleOutput
}
func (*OrganizationCustomPolicyRule) ElementType() reflect.Type {
return reflect.TypeOf((**OrganizationCustomPolicyRule)(nil)).Elem()
}
func (i *OrganizationCustomPolicyRule) ToOrganizationCustomPolicyRuleOutput() OrganizationCustomPolicyRuleOutput {
return i.ToOrganizationCustomPolicyRuleOutputWithContext(context.Background())
}
func (i *OrganizationCustomPolicyRule) ToOrganizationCustomPolicyRuleOutputWithContext(ctx context.Context) OrganizationCustomPolicyRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationCustomPolicyRuleOutput)
}
// OrganizationCustomPolicyRuleArrayInput is an input type that accepts OrganizationCustomPolicyRuleArray and OrganizationCustomPolicyRuleArrayOutput values.
// You can construct a concrete instance of `OrganizationCustomPolicyRuleArrayInput` via:
//
// OrganizationCustomPolicyRuleArray{ OrganizationCustomPolicyRuleArgs{...} }
type OrganizationCustomPolicyRuleArrayInput interface {
pulumi.Input
ToOrganizationCustomPolicyRuleArrayOutput() OrganizationCustomPolicyRuleArrayOutput
ToOrganizationCustomPolicyRuleArrayOutputWithContext(context.Context) OrganizationCustomPolicyRuleArrayOutput
}
type OrganizationCustomPolicyRuleArray []OrganizationCustomPolicyRuleInput
func (OrganizationCustomPolicyRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OrganizationCustomPolicyRule)(nil)).Elem()
}
func (i OrganizationCustomPolicyRuleArray) ToOrganizationCustomPolicyRuleArrayOutput() OrganizationCustomPolicyRuleArrayOutput {
return i.ToOrganizationCustomPolicyRuleArrayOutputWithContext(context.Background())
}
func (i OrganizationCustomPolicyRuleArray) ToOrganizationCustomPolicyRuleArrayOutputWithContext(ctx context.Context) OrganizationCustomPolicyRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationCustomPolicyRuleArrayOutput)
}
// OrganizationCustomPolicyRuleMapInput is an input type that accepts OrganizationCustomPolicyRuleMap and OrganizationCustomPolicyRuleMapOutput values.
// You can construct a concrete instance of `OrganizationCustomPolicyRuleMapInput` via:
//
// OrganizationCustomPolicyRuleMap{ "key": OrganizationCustomPolicyRuleArgs{...} }
type OrganizationCustomPolicyRuleMapInput interface {
pulumi.Input
ToOrganizationCustomPolicyRuleMapOutput() OrganizationCustomPolicyRuleMapOutput
ToOrganizationCustomPolicyRuleMapOutputWithContext(context.Context) OrganizationCustomPolicyRuleMapOutput
}
type OrganizationCustomPolicyRuleMap map[string]OrganizationCustomPolicyRuleInput
func (OrganizationCustomPolicyRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OrganizationCustomPolicyRule)(nil)).Elem()
}
func (i OrganizationCustomPolicyRuleMap) ToOrganizationCustomPolicyRuleMapOutput() OrganizationCustomPolicyRuleMapOutput {
return i.ToOrganizationCustomPolicyRuleMapOutputWithContext(context.Background())
}
func (i OrganizationCustomPolicyRuleMap) ToOrganizationCustomPolicyRuleMapOutputWithContext(ctx context.Context) OrganizationCustomPolicyRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationCustomPolicyRuleMapOutput)
}
type OrganizationCustomPolicyRuleOutput struct{ *pulumi.OutputState }
func (OrganizationCustomPolicyRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**OrganizationCustomPolicyRule)(nil)).Elem()
}
func (o OrganizationCustomPolicyRuleOutput) ToOrganizationCustomPolicyRuleOutput() OrganizationCustomPolicyRuleOutput {
return o
}
func (o OrganizationCustomPolicyRuleOutput) ToOrganizationCustomPolicyRuleOutputWithContext(ctx context.Context) OrganizationCustomPolicyRuleOutput {
return o
}
// Amazon Resource Name (ARN) of the rule
func (o OrganizationCustomPolicyRuleOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// List of AWS account identifiers to exclude from the rule
func (o OrganizationCustomPolicyRuleOutput) DebugLogDeliveryAccounts() pulumi.StringArrayOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringArrayOutput { return v.DebugLogDeliveryAccounts }).(pulumi.StringArrayOutput)
}
// Description of the rule
func (o OrganizationCustomPolicyRuleOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// List of AWS account identifiers to exclude from the rule
func (o OrganizationCustomPolicyRuleOutput) ExcludedAccounts() pulumi.StringArrayOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringArrayOutput { return v.ExcludedAccounts }).(pulumi.StringArrayOutput)
}
// A string in JSON format that is passed to the AWS Config Rule Lambda Function
func (o OrganizationCustomPolicyRuleOutput) InputParameters() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringPtrOutput { return v.InputParameters }).(pulumi.StringPtrOutput)
}
// Maximum frequency with which AWS Config runs evaluations for a rule, if the rule is triggered at a periodic frequency. Defaults to `TwentyFour_Hours` for periodic frequency triggered rules. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, or `TwentyFour_Hours`.
func (o OrganizationCustomPolicyRuleOutput) MaximumExecutionFrequency() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringPtrOutput { return v.MaximumExecutionFrequency }).(pulumi.StringPtrOutput)
}
// name of the rule
func (o OrganizationCustomPolicyRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// runtime system for your organization AWS Config Custom Policy rules
func (o OrganizationCustomPolicyRuleOutput) PolicyRuntime() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringOutput { return v.PolicyRuntime }).(pulumi.StringOutput)
}
// policy definition containing the logic for your organization AWS Config Custom Policy rule
func (o OrganizationCustomPolicyRuleOutput) PolicyText() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringOutput { return v.PolicyText }).(pulumi.StringOutput)
}
// Identifier of the AWS resource to evaluate
func (o OrganizationCustomPolicyRuleOutput) ResourceIdScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringPtrOutput { return v.ResourceIdScope }).(pulumi.StringPtrOutput)
}
// List of types of AWS resources to evaluate
func (o OrganizationCustomPolicyRuleOutput) ResourceTypesScopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringArrayOutput { return v.ResourceTypesScopes }).(pulumi.StringArrayOutput)
}
// Tag key of AWS resources to evaluate
func (o OrganizationCustomPolicyRuleOutput) TagKeyScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringPtrOutput { return v.TagKeyScope }).(pulumi.StringPtrOutput)
}
// Tag value of AWS resources to evaluate
func (o OrganizationCustomPolicyRuleOutput) TagValueScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringPtrOutput { return v.TagValueScope }).(pulumi.StringPtrOutput)
}
// List of notification types that trigger AWS Config to run an evaluation for the rule. Valid values: `ConfigurationItemChangeNotification`, `OversizedConfigurationItemChangeNotification`
//
// The following arguments are optional:
func (o OrganizationCustomPolicyRuleOutput) TriggerTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *OrganizationCustomPolicyRule) pulumi.StringArrayOutput { return v.TriggerTypes }).(pulumi.StringArrayOutput)
}
type OrganizationCustomPolicyRuleArrayOutput struct{ *pulumi.OutputState }
func (OrganizationCustomPolicyRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OrganizationCustomPolicyRule)(nil)).Elem()
}
func (o OrganizationCustomPolicyRuleArrayOutput) ToOrganizationCustomPolicyRuleArrayOutput() OrganizationCustomPolicyRuleArrayOutput {
return o
}
func (o OrganizationCustomPolicyRuleArrayOutput) ToOrganizationCustomPolicyRuleArrayOutputWithContext(ctx context.Context) OrganizationCustomPolicyRuleArrayOutput {
return o
}
func (o OrganizationCustomPolicyRuleArrayOutput) Index(i pulumi.IntInput) OrganizationCustomPolicyRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OrganizationCustomPolicyRule {
return vs[0].([]*OrganizationCustomPolicyRule)[vs[1].(int)]
}).(OrganizationCustomPolicyRuleOutput)
}
type OrganizationCustomPolicyRuleMapOutput struct{ *pulumi.OutputState }
func (OrganizationCustomPolicyRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OrganizationCustomPolicyRule)(nil)).Elem()
}
func (o OrganizationCustomPolicyRuleMapOutput) ToOrganizationCustomPolicyRuleMapOutput() OrganizationCustomPolicyRuleMapOutput {
return o
}
func (o OrganizationCustomPolicyRuleMapOutput) ToOrganizationCustomPolicyRuleMapOutputWithContext(ctx context.Context) OrganizationCustomPolicyRuleMapOutput {
return o
}
func (o OrganizationCustomPolicyRuleMapOutput) MapIndex(k pulumi.StringInput) OrganizationCustomPolicyRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OrganizationCustomPolicyRule {
return vs[0].(map[string]*OrganizationCustomPolicyRule)[vs[1].(string)]
}).(OrganizationCustomPolicyRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationCustomPolicyRuleInput)(nil)).Elem(), &OrganizationCustomPolicyRule{})
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationCustomPolicyRuleArrayInput)(nil)).Elem(), OrganizationCustomPolicyRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationCustomPolicyRuleMapInput)(nil)).Elem(), OrganizationCustomPolicyRuleMap{})
pulumi.RegisterOutputType(OrganizationCustomPolicyRuleOutput{})
pulumi.RegisterOutputType(OrganizationCustomPolicyRuleArrayOutput{})
pulumi.RegisterOutputType(OrganizationCustomPolicyRuleMapOutput{})
}