generated from pulumi/pulumi-tf-provider-boilerplate
/
aggregateConfigRule.go
540 lines (477 loc) · 29.7 KB
/
aggregateConfigRule.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
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
// 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"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a Cloud Config Aggregate Config Rule resource.
//
// For information about Cloud Config Aggregate Config Rule and how to use it, see [What is Aggregate Config Rule](https://www.alibabacloud.com/help/doc-detail/154216.html).
//
// > **NOTE:** Available in v1.124.0+.
//
// ## Example Usage
//
// # Basic Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/cfg"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/cfg"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleAggregator, err := cfg.NewAggregator(ctx, "exampleAggregator", &cfg.AggregatorArgs{
// AggregatorAccounts: cfg.AggregatorAggregatorAccountArray{
// &cfg.AggregatorAggregatorAccountArgs{
// AccountId: pulumi.String("140278452670****"),
// AccountName: pulumi.String("test-2"),
// AccountType: pulumi.String("ResourceDirectory"),
// },
// },
// AggregatorName: pulumi.String("tf-testaccaggregator"),
// Description: pulumi.String("tf-testaccaggregator"),
// })
// if err != nil {
// return err
// }
// _, err = cfg.NewAggregateConfigRule(ctx, "exampleAggregateConfigRule", &cfg.AggregateConfigRuleArgs{
// AggregateConfigRuleName: pulumi.String("tf-testaccconfig1234"),
// AggregatorId: exampleAggregator.ID(),
// ConfigRuleTriggerTypes: pulumi.String("ConfigurationItemChangeNotification"),
// SourceOwner: pulumi.String("ALIYUN"),
// SourceIdentifier: pulumi.String("ecs-cpu-min-count-limit"),
// RiskLevel: pulumi.Int(1),
// ResourceTypesScopes: pulumi.StringArray{
// pulumi.String("ACS::ECS::Instance"),
// },
// InputParameters: pulumi.AnyMap{
// "cpuCount": pulumi.Any("4"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Cloud Config Aggregate Config Rule can be imported using the id, e.g.
//
// ```sh
//
// $ pulumi import alicloud:cfg/aggregateConfigRule:AggregateConfigRule example "<aggregator_id>:<config_rule_id>"
//
// ```
type AggregateConfigRule struct {
pulumi.CustomResourceState
// The name of the rule.
AggregateConfigRuleName pulumi.StringOutput `pulumi:"aggregateConfigRuleName"`
// The Aggregator Id.
AggregatorId pulumi.StringOutput `pulumi:"aggregatorId"`
// (Available in 1.141.0+) The rule ID of Aggregate Config Rule.
ConfigRuleId pulumi.StringOutput `pulumi:"configRuleId"`
// The trigger type of the rule. Valid values: `ConfigurationItemChangeNotification`: The rule is triggered upon configuration changes. `ScheduledNotification`: The rule is triggered as scheduled.
ConfigRuleTriggerTypes pulumi.StringOutput `pulumi:"configRuleTriggerTypes"`
// The description of the rule.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The rule monitors excluded resource IDs, multiple of which are separated by commas, only applies to rules created based on managed rules, , custom rule this field is empty.
ExcludeResourceIdsScope pulumi.StringPtrOutput `pulumi:"excludeResourceIdsScope"`
// The settings map of the input parameters for the rule.
InputParameters pulumi.MapOutput `pulumi:"inputParameters"`
// The frequency of the compliance evaluations. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, `TwentyFour_Hours`. System default value is `TwentyFour_Hours` and valid when the `configRuleTriggerTypes` is `ScheduledNotification`.
MaximumExecutionFrequency pulumi.StringOutput `pulumi:"maximumExecutionFrequency"`
// The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
RegionIdsScope pulumi.StringPtrOutput `pulumi:"regionIdsScope"`
// The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
ResourceGroupIdsScope pulumi.StringPtrOutput `pulumi:"resourceGroupIdsScope"`
// Resource types to be evaluated. [Alibaba Cloud services that support Cloud Config.](https://www.alibabacloud.com/help/en/doc-detail/127411.htm)
ResourceTypesScopes pulumi.StringArrayOutput `pulumi:"resourceTypesScopes"`
// The risk level of the resources that are not compliant with the rule. Valid values: `1`: critical `2`: warning `3`: info.
RiskLevel pulumi.IntOutput `pulumi:"riskLevel"`
// The identifier of the rule. For a managed rule, the value is the identifier of the managed rule. For a custom rule, the value is the ARN of the custom rule. Using managed rules, refer to [List of Managed rules.](https://www.alibabacloud.com/help/en/doc-detail/127404.htm)
SourceIdentifier pulumi.StringOutput `pulumi:"sourceIdentifier"`
// Specifies whether you or Alibaba Cloud owns and manages the rule. Valid values: `CUSTOM_FC`: The rule is a custom rule and you own the rule. `ALIYUN`: The rule is a managed rule and Alibaba Cloud owns the rule.
SourceOwner pulumi.StringOutput `pulumi:"sourceOwner"`
// The rule status. The valid values: `ACTIVE`, `INACTIVE`.
Status pulumi.StringOutput `pulumi:"status"`
// The rule monitors the tag key, only applies to rules created based on managed rules.
TagKeyScope pulumi.StringPtrOutput `pulumi:"tagKeyScope"`
// The rule monitors the tag value, use with the `tagKeyScope` options. only applies to rules created based on managed rules.
TagValueScope pulumi.StringPtrOutput `pulumi:"tagValueScope"`
}
// NewAggregateConfigRule registers a new resource with the given unique name, arguments, and options.
func NewAggregateConfigRule(ctx *pulumi.Context,
name string, args *AggregateConfigRuleArgs, opts ...pulumi.ResourceOption) (*AggregateConfigRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AggregateConfigRuleName == nil {
return nil, errors.New("invalid value for required argument 'AggregateConfigRuleName'")
}
if args.AggregatorId == nil {
return nil, errors.New("invalid value for required argument 'AggregatorId'")
}
if args.ConfigRuleTriggerTypes == nil {
return nil, errors.New("invalid value for required argument 'ConfigRuleTriggerTypes'")
}
if args.ResourceTypesScopes == nil {
return nil, errors.New("invalid value for required argument 'ResourceTypesScopes'")
}
if args.RiskLevel == nil {
return nil, errors.New("invalid value for required argument 'RiskLevel'")
}
if args.SourceIdentifier == nil {
return nil, errors.New("invalid value for required argument 'SourceIdentifier'")
}
if args.SourceOwner == nil {
return nil, errors.New("invalid value for required argument 'SourceOwner'")
}
opts = pkgResourceDefaultOpts(opts)
var resource AggregateConfigRule
err := ctx.RegisterResource("alicloud:cfg/aggregateConfigRule:AggregateConfigRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAggregateConfigRule gets an existing AggregateConfigRule 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 GetAggregateConfigRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AggregateConfigRuleState, opts ...pulumi.ResourceOption) (*AggregateConfigRule, error) {
var resource AggregateConfigRule
err := ctx.ReadResource("alicloud:cfg/aggregateConfigRule:AggregateConfigRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AggregateConfigRule resources.
type aggregateConfigRuleState struct {
// The name of the rule.
AggregateConfigRuleName *string `pulumi:"aggregateConfigRuleName"`
// The Aggregator Id.
AggregatorId *string `pulumi:"aggregatorId"`
// (Available in 1.141.0+) The rule ID of Aggregate Config Rule.
ConfigRuleId *string `pulumi:"configRuleId"`
// The trigger type of the rule. Valid values: `ConfigurationItemChangeNotification`: The rule is triggered upon configuration changes. `ScheduledNotification`: The rule is triggered as scheduled.
ConfigRuleTriggerTypes *string `pulumi:"configRuleTriggerTypes"`
// The description of the rule.
Description *string `pulumi:"description"`
// The rule monitors excluded resource IDs, multiple of which are separated by commas, only applies to rules created based on managed rules, , custom rule this field is empty.
ExcludeResourceIdsScope *string `pulumi:"excludeResourceIdsScope"`
// The settings map of the input parameters for the rule.
InputParameters map[string]interface{} `pulumi:"inputParameters"`
// The frequency of the compliance evaluations. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, `TwentyFour_Hours`. System default value is `TwentyFour_Hours` and valid when the `configRuleTriggerTypes` is `ScheduledNotification`.
MaximumExecutionFrequency *string `pulumi:"maximumExecutionFrequency"`
// The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
RegionIdsScope *string `pulumi:"regionIdsScope"`
// The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
ResourceGroupIdsScope *string `pulumi:"resourceGroupIdsScope"`
// Resource types to be evaluated. [Alibaba Cloud services that support Cloud Config.](https://www.alibabacloud.com/help/en/doc-detail/127411.htm)
ResourceTypesScopes []string `pulumi:"resourceTypesScopes"`
// The risk level of the resources that are not compliant with the rule. Valid values: `1`: critical `2`: warning `3`: info.
RiskLevel *int `pulumi:"riskLevel"`
// The identifier of the rule. For a managed rule, the value is the identifier of the managed rule. For a custom rule, the value is the ARN of the custom rule. Using managed rules, refer to [List of Managed rules.](https://www.alibabacloud.com/help/en/doc-detail/127404.htm)
SourceIdentifier *string `pulumi:"sourceIdentifier"`
// Specifies whether you or Alibaba Cloud owns and manages the rule. Valid values: `CUSTOM_FC`: The rule is a custom rule and you own the rule. `ALIYUN`: The rule is a managed rule and Alibaba Cloud owns the rule.
SourceOwner *string `pulumi:"sourceOwner"`
// The rule status. The valid values: `ACTIVE`, `INACTIVE`.
Status *string `pulumi:"status"`
// The rule monitors the tag key, only applies to rules created based on managed rules.
TagKeyScope *string `pulumi:"tagKeyScope"`
// The rule monitors the tag value, use with the `tagKeyScope` options. only applies to rules created based on managed rules.
TagValueScope *string `pulumi:"tagValueScope"`
}
type AggregateConfigRuleState struct {
// The name of the rule.
AggregateConfigRuleName pulumi.StringPtrInput
// The Aggregator Id.
AggregatorId pulumi.StringPtrInput
// (Available in 1.141.0+) The rule ID of Aggregate Config Rule.
ConfigRuleId pulumi.StringPtrInput
// The trigger type of the rule. Valid values: `ConfigurationItemChangeNotification`: The rule is triggered upon configuration changes. `ScheduledNotification`: The rule is triggered as scheduled.
ConfigRuleTriggerTypes pulumi.StringPtrInput
// The description of the rule.
Description pulumi.StringPtrInput
// The rule monitors excluded resource IDs, multiple of which are separated by commas, only applies to rules created based on managed rules, , custom rule this field is empty.
ExcludeResourceIdsScope pulumi.StringPtrInput
// The settings map of the input parameters for the rule.
InputParameters pulumi.MapInput
// The frequency of the compliance evaluations. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, `TwentyFour_Hours`. System default value is `TwentyFour_Hours` and valid when the `configRuleTriggerTypes` is `ScheduledNotification`.
MaximumExecutionFrequency pulumi.StringPtrInput
// The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
RegionIdsScope pulumi.StringPtrInput
// The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
ResourceGroupIdsScope pulumi.StringPtrInput
// Resource types to be evaluated. [Alibaba Cloud services that support Cloud Config.](https://www.alibabacloud.com/help/en/doc-detail/127411.htm)
ResourceTypesScopes pulumi.StringArrayInput
// The risk level of the resources that are not compliant with the rule. Valid values: `1`: critical `2`: warning `3`: info.
RiskLevel pulumi.IntPtrInput
// The identifier of the rule. For a managed rule, the value is the identifier of the managed rule. For a custom rule, the value is the ARN of the custom rule. Using managed rules, refer to [List of Managed rules.](https://www.alibabacloud.com/help/en/doc-detail/127404.htm)
SourceIdentifier pulumi.StringPtrInput
// Specifies whether you or Alibaba Cloud owns and manages the rule. Valid values: `CUSTOM_FC`: The rule is a custom rule and you own the rule. `ALIYUN`: The rule is a managed rule and Alibaba Cloud owns the rule.
SourceOwner pulumi.StringPtrInput
// The rule status. The valid values: `ACTIVE`, `INACTIVE`.
Status pulumi.StringPtrInput
// The rule monitors the tag key, only applies to rules created based on managed rules.
TagKeyScope pulumi.StringPtrInput
// The rule monitors the tag value, use with the `tagKeyScope` options. only applies to rules created based on managed rules.
TagValueScope pulumi.StringPtrInput
}
func (AggregateConfigRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*aggregateConfigRuleState)(nil)).Elem()
}
type aggregateConfigRuleArgs struct {
// The name of the rule.
AggregateConfigRuleName string `pulumi:"aggregateConfigRuleName"`
// The Aggregator Id.
AggregatorId string `pulumi:"aggregatorId"`
// The trigger type of the rule. Valid values: `ConfigurationItemChangeNotification`: The rule is triggered upon configuration changes. `ScheduledNotification`: The rule is triggered as scheduled.
ConfigRuleTriggerTypes string `pulumi:"configRuleTriggerTypes"`
// The description of the rule.
Description *string `pulumi:"description"`
// The rule monitors excluded resource IDs, multiple of which are separated by commas, only applies to rules created based on managed rules, , custom rule this field is empty.
ExcludeResourceIdsScope *string `pulumi:"excludeResourceIdsScope"`
// The settings map of the input parameters for the rule.
InputParameters map[string]interface{} `pulumi:"inputParameters"`
// The frequency of the compliance evaluations. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, `TwentyFour_Hours`. System default value is `TwentyFour_Hours` and valid when the `configRuleTriggerTypes` is `ScheduledNotification`.
MaximumExecutionFrequency *string `pulumi:"maximumExecutionFrequency"`
// The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
RegionIdsScope *string `pulumi:"regionIdsScope"`
// The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
ResourceGroupIdsScope *string `pulumi:"resourceGroupIdsScope"`
// Resource types to be evaluated. [Alibaba Cloud services that support Cloud Config.](https://www.alibabacloud.com/help/en/doc-detail/127411.htm)
ResourceTypesScopes []string `pulumi:"resourceTypesScopes"`
// The risk level of the resources that are not compliant with the rule. Valid values: `1`: critical `2`: warning `3`: info.
RiskLevel int `pulumi:"riskLevel"`
// The identifier of the rule. For a managed rule, the value is the identifier of the managed rule. For a custom rule, the value is the ARN of the custom rule. Using managed rules, refer to [List of Managed rules.](https://www.alibabacloud.com/help/en/doc-detail/127404.htm)
SourceIdentifier string `pulumi:"sourceIdentifier"`
// Specifies whether you or Alibaba Cloud owns and manages the rule. Valid values: `CUSTOM_FC`: The rule is a custom rule and you own the rule. `ALIYUN`: The rule is a managed rule and Alibaba Cloud owns the rule.
SourceOwner string `pulumi:"sourceOwner"`
// The rule status. The valid values: `ACTIVE`, `INACTIVE`.
Status *string `pulumi:"status"`
// The rule monitors the tag key, only applies to rules created based on managed rules.
TagKeyScope *string `pulumi:"tagKeyScope"`
// The rule monitors the tag value, use with the `tagKeyScope` options. only applies to rules created based on managed rules.
TagValueScope *string `pulumi:"tagValueScope"`
}
// The set of arguments for constructing a AggregateConfigRule resource.
type AggregateConfigRuleArgs struct {
// The name of the rule.
AggregateConfigRuleName pulumi.StringInput
// The Aggregator Id.
AggregatorId pulumi.StringInput
// The trigger type of the rule. Valid values: `ConfigurationItemChangeNotification`: The rule is triggered upon configuration changes. `ScheduledNotification`: The rule is triggered as scheduled.
ConfigRuleTriggerTypes pulumi.StringInput
// The description of the rule.
Description pulumi.StringPtrInput
// The rule monitors excluded resource IDs, multiple of which are separated by commas, only applies to rules created based on managed rules, , custom rule this field is empty.
ExcludeResourceIdsScope pulumi.StringPtrInput
// The settings map of the input parameters for the rule.
InputParameters pulumi.MapInput
// The frequency of the compliance evaluations. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, `TwentyFour_Hours`. System default value is `TwentyFour_Hours` and valid when the `configRuleTriggerTypes` is `ScheduledNotification`.
MaximumExecutionFrequency pulumi.StringPtrInput
// The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
RegionIdsScope pulumi.StringPtrInput
// The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
ResourceGroupIdsScope pulumi.StringPtrInput
// Resource types to be evaluated. [Alibaba Cloud services that support Cloud Config.](https://www.alibabacloud.com/help/en/doc-detail/127411.htm)
ResourceTypesScopes pulumi.StringArrayInput
// The risk level of the resources that are not compliant with the rule. Valid values: `1`: critical `2`: warning `3`: info.
RiskLevel pulumi.IntInput
// The identifier of the rule. For a managed rule, the value is the identifier of the managed rule. For a custom rule, the value is the ARN of the custom rule. Using managed rules, refer to [List of Managed rules.](https://www.alibabacloud.com/help/en/doc-detail/127404.htm)
SourceIdentifier pulumi.StringInput
// Specifies whether you or Alibaba Cloud owns and manages the rule. Valid values: `CUSTOM_FC`: The rule is a custom rule and you own the rule. `ALIYUN`: The rule is a managed rule and Alibaba Cloud owns the rule.
SourceOwner pulumi.StringInput
// The rule status. The valid values: `ACTIVE`, `INACTIVE`.
Status pulumi.StringPtrInput
// The rule monitors the tag key, only applies to rules created based on managed rules.
TagKeyScope pulumi.StringPtrInput
// The rule monitors the tag value, use with the `tagKeyScope` options. only applies to rules created based on managed rules.
TagValueScope pulumi.StringPtrInput
}
func (AggregateConfigRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*aggregateConfigRuleArgs)(nil)).Elem()
}
type AggregateConfigRuleInput interface {
pulumi.Input
ToAggregateConfigRuleOutput() AggregateConfigRuleOutput
ToAggregateConfigRuleOutputWithContext(ctx context.Context) AggregateConfigRuleOutput
}
func (*AggregateConfigRule) ElementType() reflect.Type {
return reflect.TypeOf((**AggregateConfigRule)(nil)).Elem()
}
func (i *AggregateConfigRule) ToAggregateConfigRuleOutput() AggregateConfigRuleOutput {
return i.ToAggregateConfigRuleOutputWithContext(context.Background())
}
func (i *AggregateConfigRule) ToAggregateConfigRuleOutputWithContext(ctx context.Context) AggregateConfigRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(AggregateConfigRuleOutput)
}
// AggregateConfigRuleArrayInput is an input type that accepts AggregateConfigRuleArray and AggregateConfigRuleArrayOutput values.
// You can construct a concrete instance of `AggregateConfigRuleArrayInput` via:
//
// AggregateConfigRuleArray{ AggregateConfigRuleArgs{...} }
type AggregateConfigRuleArrayInput interface {
pulumi.Input
ToAggregateConfigRuleArrayOutput() AggregateConfigRuleArrayOutput
ToAggregateConfigRuleArrayOutputWithContext(context.Context) AggregateConfigRuleArrayOutput
}
type AggregateConfigRuleArray []AggregateConfigRuleInput
func (AggregateConfigRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AggregateConfigRule)(nil)).Elem()
}
func (i AggregateConfigRuleArray) ToAggregateConfigRuleArrayOutput() AggregateConfigRuleArrayOutput {
return i.ToAggregateConfigRuleArrayOutputWithContext(context.Background())
}
func (i AggregateConfigRuleArray) ToAggregateConfigRuleArrayOutputWithContext(ctx context.Context) AggregateConfigRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AggregateConfigRuleArrayOutput)
}
// AggregateConfigRuleMapInput is an input type that accepts AggregateConfigRuleMap and AggregateConfigRuleMapOutput values.
// You can construct a concrete instance of `AggregateConfigRuleMapInput` via:
//
// AggregateConfigRuleMap{ "key": AggregateConfigRuleArgs{...} }
type AggregateConfigRuleMapInput interface {
pulumi.Input
ToAggregateConfigRuleMapOutput() AggregateConfigRuleMapOutput
ToAggregateConfigRuleMapOutputWithContext(context.Context) AggregateConfigRuleMapOutput
}
type AggregateConfigRuleMap map[string]AggregateConfigRuleInput
func (AggregateConfigRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AggregateConfigRule)(nil)).Elem()
}
func (i AggregateConfigRuleMap) ToAggregateConfigRuleMapOutput() AggregateConfigRuleMapOutput {
return i.ToAggregateConfigRuleMapOutputWithContext(context.Background())
}
func (i AggregateConfigRuleMap) ToAggregateConfigRuleMapOutputWithContext(ctx context.Context) AggregateConfigRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AggregateConfigRuleMapOutput)
}
type AggregateConfigRuleOutput struct{ *pulumi.OutputState }
func (AggregateConfigRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AggregateConfigRule)(nil)).Elem()
}
func (o AggregateConfigRuleOutput) ToAggregateConfigRuleOutput() AggregateConfigRuleOutput {
return o
}
func (o AggregateConfigRuleOutput) ToAggregateConfigRuleOutputWithContext(ctx context.Context) AggregateConfigRuleOutput {
return o
}
// The name of the rule.
func (o AggregateConfigRuleOutput) AggregateConfigRuleName() pulumi.StringOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringOutput { return v.AggregateConfigRuleName }).(pulumi.StringOutput)
}
// The Aggregator Id.
func (o AggregateConfigRuleOutput) AggregatorId() pulumi.StringOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringOutput { return v.AggregatorId }).(pulumi.StringOutput)
}
// (Available in 1.141.0+) The rule ID of Aggregate Config Rule.
func (o AggregateConfigRuleOutput) ConfigRuleId() pulumi.StringOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringOutput { return v.ConfigRuleId }).(pulumi.StringOutput)
}
// The trigger type of the rule. Valid values: `ConfigurationItemChangeNotification`: The rule is triggered upon configuration changes. `ScheduledNotification`: The rule is triggered as scheduled.
func (o AggregateConfigRuleOutput) ConfigRuleTriggerTypes() pulumi.StringOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringOutput { return v.ConfigRuleTriggerTypes }).(pulumi.StringOutput)
}
// The description of the rule.
func (o AggregateConfigRuleOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The rule monitors excluded resource IDs, multiple of which are separated by commas, only applies to rules created based on managed rules, , custom rule this field is empty.
func (o AggregateConfigRuleOutput) ExcludeResourceIdsScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringPtrOutput { return v.ExcludeResourceIdsScope }).(pulumi.StringPtrOutput)
}
// The settings map of the input parameters for the rule.
func (o AggregateConfigRuleOutput) InputParameters() pulumi.MapOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.MapOutput { return v.InputParameters }).(pulumi.MapOutput)
}
// The frequency of the compliance evaluations. Valid values: `One_Hour`, `Three_Hours`, `Six_Hours`, `Twelve_Hours`, `TwentyFour_Hours`. System default value is `TwentyFour_Hours` and valid when the `configRuleTriggerTypes` is `ScheduledNotification`.
func (o AggregateConfigRuleOutput) MaximumExecutionFrequency() pulumi.StringOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringOutput { return v.MaximumExecutionFrequency }).(pulumi.StringOutput)
}
// The rule monitors region IDs, separated by commas, only applies to rules created based on managed rules.
func (o AggregateConfigRuleOutput) RegionIdsScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringPtrOutput { return v.RegionIdsScope }).(pulumi.StringPtrOutput)
}
// The rule monitors resource group IDs, separated by commas, only applies to rules created based on managed rules.
func (o AggregateConfigRuleOutput) ResourceGroupIdsScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringPtrOutput { return v.ResourceGroupIdsScope }).(pulumi.StringPtrOutput)
}
// Resource types to be evaluated. [Alibaba Cloud services that support Cloud Config.](https://www.alibabacloud.com/help/en/doc-detail/127411.htm)
func (o AggregateConfigRuleOutput) ResourceTypesScopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringArrayOutput { return v.ResourceTypesScopes }).(pulumi.StringArrayOutput)
}
// The risk level of the resources that are not compliant with the rule. Valid values: `1`: critical `2`: warning `3`: info.
func (o AggregateConfigRuleOutput) RiskLevel() pulumi.IntOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.IntOutput { return v.RiskLevel }).(pulumi.IntOutput)
}
// The identifier of the rule. For a managed rule, the value is the identifier of the managed rule. For a custom rule, the value is the ARN of the custom rule. Using managed rules, refer to [List of Managed rules.](https://www.alibabacloud.com/help/en/doc-detail/127404.htm)
func (o AggregateConfigRuleOutput) SourceIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringOutput { return v.SourceIdentifier }).(pulumi.StringOutput)
}
// Specifies whether you or Alibaba Cloud owns and manages the rule. Valid values: `CUSTOM_FC`: The rule is a custom rule and you own the rule. `ALIYUN`: The rule is a managed rule and Alibaba Cloud owns the rule.
func (o AggregateConfigRuleOutput) SourceOwner() pulumi.StringOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringOutput { return v.SourceOwner }).(pulumi.StringOutput)
}
// The rule status. The valid values: `ACTIVE`, `INACTIVE`.
func (o AggregateConfigRuleOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// The rule monitors the tag key, only applies to rules created based on managed rules.
func (o AggregateConfigRuleOutput) TagKeyScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringPtrOutput { return v.TagKeyScope }).(pulumi.StringPtrOutput)
}
// The rule monitors the tag value, use with the `tagKeyScope` options. only applies to rules created based on managed rules.
func (o AggregateConfigRuleOutput) TagValueScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AggregateConfigRule) pulumi.StringPtrOutput { return v.TagValueScope }).(pulumi.StringPtrOutput)
}
type AggregateConfigRuleArrayOutput struct{ *pulumi.OutputState }
func (AggregateConfigRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AggregateConfigRule)(nil)).Elem()
}
func (o AggregateConfigRuleArrayOutput) ToAggregateConfigRuleArrayOutput() AggregateConfigRuleArrayOutput {
return o
}
func (o AggregateConfigRuleArrayOutput) ToAggregateConfigRuleArrayOutputWithContext(ctx context.Context) AggregateConfigRuleArrayOutput {
return o
}
func (o AggregateConfigRuleArrayOutput) Index(i pulumi.IntInput) AggregateConfigRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AggregateConfigRule {
return vs[0].([]*AggregateConfigRule)[vs[1].(int)]
}).(AggregateConfigRuleOutput)
}
type AggregateConfigRuleMapOutput struct{ *pulumi.OutputState }
func (AggregateConfigRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AggregateConfigRule)(nil)).Elem()
}
func (o AggregateConfigRuleMapOutput) ToAggregateConfigRuleMapOutput() AggregateConfigRuleMapOutput {
return o
}
func (o AggregateConfigRuleMapOutput) ToAggregateConfigRuleMapOutputWithContext(ctx context.Context) AggregateConfigRuleMapOutput {
return o
}
func (o AggregateConfigRuleMapOutput) MapIndex(k pulumi.StringInput) AggregateConfigRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AggregateConfigRule {
return vs[0].(map[string]*AggregateConfigRule)[vs[1].(string)]
}).(AggregateConfigRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AggregateConfigRuleInput)(nil)).Elem(), &AggregateConfigRule{})
pulumi.RegisterInputType(reflect.TypeOf((*AggregateConfigRuleArrayInput)(nil)).Elem(), AggregateConfigRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AggregateConfigRuleMapInput)(nil)).Elem(), AggregateConfigRuleMap{})
pulumi.RegisterOutputType(AggregateConfigRuleOutput{})
pulumi.RegisterOutputType(AggregateConfigRuleArrayOutput{})
pulumi.RegisterOutputType(AggregateConfigRuleMapOutput{})
}