-
Notifications
You must be signed in to change notification settings - Fork 151
/
patchBaseline.go
620 lines (560 loc) · 27.5 KB
/
patchBaseline.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
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package ssm
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides an SSM Patch Baseline resource
//
// > **NOTE on Patch Baselines:** The `approvedPatches` and `approvalRule` are
// both marked as optional fields, but the Patch Baseline requires that at least one
// of them is specified.
//
// ## Example Usage
//
// Basic usage using `approvedPatches` only
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ssm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ssm.NewPatchBaseline(ctx, "production", &ssm.PatchBaselineArgs{
// ApprovedPatches: pulumi.StringArray{
// pulumi.String("KB123456"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// Advanced usage, specifying patch filters
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ssm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ssm.NewPatchBaseline(ctx, "production", &ssm.PatchBaselineArgs{
// ApprovalRules: ssm.PatchBaselineApprovalRuleArray{
// &ssm.PatchBaselineApprovalRuleArgs{
// ApproveAfterDays: pulumi.Int(7),
// ComplianceLevel: pulumi.String("HIGH"),
// PatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{
// &ssm.PatchBaselineApprovalRulePatchFilterArgs{
// Key: pulumi.String("PRODUCT"),
// Values: pulumi.StringArray{
// pulumi.String("WindowsServer2016"),
// },
// },
// &ssm.PatchBaselineApprovalRulePatchFilterArgs{
// Key: pulumi.String("CLASSIFICATION"),
// Values: pulumi.StringArray{
// pulumi.String("CriticalUpdates"),
// pulumi.String("SecurityUpdates"),
// pulumi.String("Updates"),
// },
// },
// &ssm.PatchBaselineApprovalRulePatchFilterArgs{
// Key: pulumi.String("MSRC_SEVERITY"),
// Values: pulumi.StringArray{
// pulumi.String("Critical"),
// pulumi.String("Important"),
// pulumi.String("Moderate"),
// },
// },
// },
// },
// &ssm.PatchBaselineApprovalRuleArgs{
// ApproveAfterDays: pulumi.Int(7),
// PatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{
// &ssm.PatchBaselineApprovalRulePatchFilterArgs{
// Key: pulumi.String("PRODUCT"),
// Values: pulumi.StringArray{
// pulumi.String("WindowsServer2012"),
// },
// },
// },
// },
// },
// ApprovedPatches: pulumi.StringArray{
// pulumi.String("KB123456"),
// pulumi.String("KB456789"),
// },
// Description: pulumi.String("Patch Baseline Description"),
// GlobalFilters: ssm.PatchBaselineGlobalFilterArray{
// &ssm.PatchBaselineGlobalFilterArgs{
// Key: pulumi.String("PRODUCT"),
// Values: pulumi.StringArray{
// pulumi.String("WindowsServer2008"),
// },
// },
// &ssm.PatchBaselineGlobalFilterArgs{
// Key: pulumi.String("CLASSIFICATION"),
// Values: pulumi.StringArray{
// pulumi.String("ServicePacks"),
// },
// },
// &ssm.PatchBaselineGlobalFilterArgs{
// Key: pulumi.String("MSRC_SEVERITY"),
// Values: pulumi.StringArray{
// pulumi.String("Low"),
// },
// },
// },
// RejectedPatches: pulumi.StringArray{
// pulumi.String("KB987654"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// Advanced usage, specifying Microsoft application and Windows patch rules
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ssm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ssm.NewPatchBaseline(ctx, "windowsOsApps", &ssm.PatchBaselineArgs{
// ApprovalRules: ssm.PatchBaselineApprovalRuleArray{
// &ssm.PatchBaselineApprovalRuleArgs{
// ApproveAfterDays: pulumi.Int(7),
// PatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{
// &ssm.PatchBaselineApprovalRulePatchFilterArgs{
// Key: pulumi.String("CLASSIFICATION"),
// Values: pulumi.StringArray{
// pulumi.String("CriticalUpdates"),
// pulumi.String("SecurityUpdates"),
// },
// },
// &ssm.PatchBaselineApprovalRulePatchFilterArgs{
// Key: pulumi.String("MSRC_SEVERITY"),
// Values: pulumi.StringArray{
// pulumi.String("Critical"),
// pulumi.String("Important"),
// },
// },
// },
// },
// &ssm.PatchBaselineApprovalRuleArgs{
// ApproveAfterDays: pulumi.Int(7),
// PatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{
// &ssm.PatchBaselineApprovalRulePatchFilterArgs{
// Key: pulumi.String("PATCH_SET"),
// Values: pulumi.StringArray{
// pulumi.String("APPLICATION"),
// },
// },
// &ssm.PatchBaselineApprovalRulePatchFilterArgs{
// Key: pulumi.String("PRODUCT"),
// Values: pulumi.StringArray{
// pulumi.String("Office 2013"),
// pulumi.String("Office 2016"),
// },
// },
// },
// },
// },
// Description: pulumi.String("Patch both Windows and Microsoft apps"),
// OperatingSystem: pulumi.String("WINDOWS"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// Advanced usage, specifying alternate patch source repository
//
// ```go
// package main
//
// import (
// "fmt"
//
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ssm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ssm.NewPatchBaseline(ctx, "al201709", &ssm.PatchBaselineArgs{
// ApprovalRules: ssm.PatchBaselineApprovalRuleArray{
// nil,
// },
// Description: pulumi.String("My patch repository for Amazon Linux 2017.09"),
// OperatingSystem: pulumi.String("AMAZON_LINUX"),
// Sources: ssm.PatchBaselineSourceArray{
// &ssm.PatchBaselineSourceArgs{
// Configuration: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "[amzn-main]\n", "name=amzn-main-Base\n", "mirrorlist=http://repo./", "$", "awsregion./", "$", "awsdomain//", "$", "releasever/main/mirror.list\n", "mirrorlist_expire=300\n", "metadata_expire=300\n", "priority=10\n", "failovermethod=priority\n", "fastestmirror_enabled=0\n", "gpgcheck=1\n", "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\n", "enabled=1\n", "retries=3\n", "timeout=5\n", "report_instanceid=yes\n", "\n")),
// Name: pulumi.String("My-AL2017.09"),
// Products: pulumi.StringArray{
// pulumi.String("AmazonLinux2017.09"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// SSM Patch Baselines can be imported by their baseline ID, e.g.
//
// ```sh
// $ pulumi import aws:ssm/patchBaseline:PatchBaseline example pb-12345678
// ```
type PatchBaseline struct {
pulumi.CustomResourceState
// A set of rules used to include patches in the baseline. up to 10 approval rules can be specified. Each approvalRule block requires the fields documented below.
ApprovalRules PatchBaselineApprovalRuleArrayOutput `pulumi:"approvalRules"`
// A list of explicitly approved patches for the baseline.
ApprovedPatches pulumi.StringArrayOutput `pulumi:"approvedPatches"`
// Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. Valid compliance levels include the following: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `INFORMATIONAL`, `UNSPECIFIED`. The default value is `UNSPECIFIED`.
ApprovedPatchesComplianceLevel pulumi.StringPtrOutput `pulumi:"approvedPatchesComplianceLevel"`
// Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. Applies to Linux instances only.
ApprovedPatchesEnableNonSecurity pulumi.BoolPtrOutput `pulumi:"approvedPatchesEnableNonSecurity"`
// The ARN of the patch baseline.
Arn pulumi.StringOutput `pulumi:"arn"`
// The description of the patch baseline.
Description pulumi.StringPtrOutput `pulumi:"description"`
// A set of global filters used to exclude patches from the baseline. Up to 4 global filters can be specified using Key/Value pairs. Valid Keys are `PRODUCT | CLASSIFICATION | MSRC_SEVERITY | PATCH_ID`.
GlobalFilters PatchBaselineGlobalFilterArrayOutput `pulumi:"globalFilters"`
// The name specified to identify the patch source.
Name pulumi.StringOutput `pulumi:"name"`
// Defines the operating system the patch baseline applies to. Supported operating systems include `WINDOWS`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `SUSE`, `UBUNTU`, `CENTOS`, and `REDHAT_ENTERPRISE_LINUX`. The Default value is `WINDOWS`.
OperatingSystem pulumi.StringPtrOutput `pulumi:"operatingSystem"`
// A list of rejected patches.
RejectedPatches pulumi.StringArrayOutput `pulumi:"rejectedPatches"`
// The action for Patch Manager to take on patches included in the `rejectedPatches` list. Allow values are `ALLOW_AS_DEPENDENCY` and `BLOCK`.
RejectedPatchesAction pulumi.StringOutput `pulumi:"rejectedPatchesAction"`
// Configuration block(s) with alternate sources for patches. Applies to Linux instances only. Documented below.
Sources PatchBaselineSourceArrayOutput `pulumi:"sources"`
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}
// NewPatchBaseline registers a new resource with the given unique name, arguments, and options.
func NewPatchBaseline(ctx *pulumi.Context,
name string, args *PatchBaselineArgs, opts ...pulumi.ResourceOption) (*PatchBaseline, error) {
if args == nil {
args = &PatchBaselineArgs{}
}
var resource PatchBaseline
err := ctx.RegisterResource("aws:ssm/patchBaseline:PatchBaseline", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPatchBaseline gets an existing PatchBaseline 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 GetPatchBaseline(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PatchBaselineState, opts ...pulumi.ResourceOption) (*PatchBaseline, error) {
var resource PatchBaseline
err := ctx.ReadResource("aws:ssm/patchBaseline:PatchBaseline", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PatchBaseline resources.
type patchBaselineState struct {
// A set of rules used to include patches in the baseline. up to 10 approval rules can be specified. Each approvalRule block requires the fields documented below.
ApprovalRules []PatchBaselineApprovalRule `pulumi:"approvalRules"`
// A list of explicitly approved patches for the baseline.
ApprovedPatches []string `pulumi:"approvedPatches"`
// Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. Valid compliance levels include the following: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `INFORMATIONAL`, `UNSPECIFIED`. The default value is `UNSPECIFIED`.
ApprovedPatchesComplianceLevel *string `pulumi:"approvedPatchesComplianceLevel"`
// Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. Applies to Linux instances only.
ApprovedPatchesEnableNonSecurity *bool `pulumi:"approvedPatchesEnableNonSecurity"`
// The ARN of the patch baseline.
Arn *string `pulumi:"arn"`
// The description of the patch baseline.
Description *string `pulumi:"description"`
// A set of global filters used to exclude patches from the baseline. Up to 4 global filters can be specified using Key/Value pairs. Valid Keys are `PRODUCT | CLASSIFICATION | MSRC_SEVERITY | PATCH_ID`.
GlobalFilters []PatchBaselineGlobalFilter `pulumi:"globalFilters"`
// The name specified to identify the patch source.
Name *string `pulumi:"name"`
// Defines the operating system the patch baseline applies to. Supported operating systems include `WINDOWS`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `SUSE`, `UBUNTU`, `CENTOS`, and `REDHAT_ENTERPRISE_LINUX`. The Default value is `WINDOWS`.
OperatingSystem *string `pulumi:"operatingSystem"`
// A list of rejected patches.
RejectedPatches []string `pulumi:"rejectedPatches"`
// The action for Patch Manager to take on patches included in the `rejectedPatches` list. Allow values are `ALLOW_AS_DEPENDENCY` and `BLOCK`.
RejectedPatchesAction *string `pulumi:"rejectedPatchesAction"`
// Configuration block(s) with alternate sources for patches. Applies to Linux instances only. Documented below.
Sources []PatchBaselineSource `pulumi:"sources"`
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll map[string]string `pulumi:"tagsAll"`
}
type PatchBaselineState struct {
// A set of rules used to include patches in the baseline. up to 10 approval rules can be specified. Each approvalRule block requires the fields documented below.
ApprovalRules PatchBaselineApprovalRuleArrayInput
// A list of explicitly approved patches for the baseline.
ApprovedPatches pulumi.StringArrayInput
// Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. Valid compliance levels include the following: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `INFORMATIONAL`, `UNSPECIFIED`. The default value is `UNSPECIFIED`.
ApprovedPatchesComplianceLevel pulumi.StringPtrInput
// Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. Applies to Linux instances only.
ApprovedPatchesEnableNonSecurity pulumi.BoolPtrInput
// The ARN of the patch baseline.
Arn pulumi.StringPtrInput
// The description of the patch baseline.
Description pulumi.StringPtrInput
// A set of global filters used to exclude patches from the baseline. Up to 4 global filters can be specified using Key/Value pairs. Valid Keys are `PRODUCT | CLASSIFICATION | MSRC_SEVERITY | PATCH_ID`.
GlobalFilters PatchBaselineGlobalFilterArrayInput
// The name specified to identify the patch source.
Name pulumi.StringPtrInput
// Defines the operating system the patch baseline applies to. Supported operating systems include `WINDOWS`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `SUSE`, `UBUNTU`, `CENTOS`, and `REDHAT_ENTERPRISE_LINUX`. The Default value is `WINDOWS`.
OperatingSystem pulumi.StringPtrInput
// A list of rejected patches.
RejectedPatches pulumi.StringArrayInput
// The action for Patch Manager to take on patches included in the `rejectedPatches` list. Allow values are `ALLOW_AS_DEPENDENCY` and `BLOCK`.
RejectedPatchesAction pulumi.StringPtrInput
// Configuration block(s) with alternate sources for patches. Applies to Linux instances only. Documented below.
Sources PatchBaselineSourceArrayInput
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll pulumi.StringMapInput
}
func (PatchBaselineState) ElementType() reflect.Type {
return reflect.TypeOf((*patchBaselineState)(nil)).Elem()
}
type patchBaselineArgs struct {
// A set of rules used to include patches in the baseline. up to 10 approval rules can be specified. Each approvalRule block requires the fields documented below.
ApprovalRules []PatchBaselineApprovalRule `pulumi:"approvalRules"`
// A list of explicitly approved patches for the baseline.
ApprovedPatches []string `pulumi:"approvedPatches"`
// Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. Valid compliance levels include the following: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `INFORMATIONAL`, `UNSPECIFIED`. The default value is `UNSPECIFIED`.
ApprovedPatchesComplianceLevel *string `pulumi:"approvedPatchesComplianceLevel"`
// Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. Applies to Linux instances only.
ApprovedPatchesEnableNonSecurity *bool `pulumi:"approvedPatchesEnableNonSecurity"`
// The description of the patch baseline.
Description *string `pulumi:"description"`
// A set of global filters used to exclude patches from the baseline. Up to 4 global filters can be specified using Key/Value pairs. Valid Keys are `PRODUCT | CLASSIFICATION | MSRC_SEVERITY | PATCH_ID`.
GlobalFilters []PatchBaselineGlobalFilter `pulumi:"globalFilters"`
// The name specified to identify the patch source.
Name *string `pulumi:"name"`
// Defines the operating system the patch baseline applies to. Supported operating systems include `WINDOWS`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `SUSE`, `UBUNTU`, `CENTOS`, and `REDHAT_ENTERPRISE_LINUX`. The Default value is `WINDOWS`.
OperatingSystem *string `pulumi:"operatingSystem"`
// A list of rejected patches.
RejectedPatches []string `pulumi:"rejectedPatches"`
// The action for Patch Manager to take on patches included in the `rejectedPatches` list. Allow values are `ALLOW_AS_DEPENDENCY` and `BLOCK`.
RejectedPatchesAction *string `pulumi:"rejectedPatchesAction"`
// Configuration block(s) with alternate sources for patches. Applies to Linux instances only. Documented below.
Sources []PatchBaselineSource `pulumi:"sources"`
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll map[string]string `pulumi:"tagsAll"`
}
// The set of arguments for constructing a PatchBaseline resource.
type PatchBaselineArgs struct {
// A set of rules used to include patches in the baseline. up to 10 approval rules can be specified. Each approvalRule block requires the fields documented below.
ApprovalRules PatchBaselineApprovalRuleArrayInput
// A list of explicitly approved patches for the baseline.
ApprovedPatches pulumi.StringArrayInput
// Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. Valid compliance levels include the following: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `INFORMATIONAL`, `UNSPECIFIED`. The default value is `UNSPECIFIED`.
ApprovedPatchesComplianceLevel pulumi.StringPtrInput
// Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. Applies to Linux instances only.
ApprovedPatchesEnableNonSecurity pulumi.BoolPtrInput
// The description of the patch baseline.
Description pulumi.StringPtrInput
// A set of global filters used to exclude patches from the baseline. Up to 4 global filters can be specified using Key/Value pairs. Valid Keys are `PRODUCT | CLASSIFICATION | MSRC_SEVERITY | PATCH_ID`.
GlobalFilters PatchBaselineGlobalFilterArrayInput
// The name specified to identify the patch source.
Name pulumi.StringPtrInput
// Defines the operating system the patch baseline applies to. Supported operating systems include `WINDOWS`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `SUSE`, `UBUNTU`, `CENTOS`, and `REDHAT_ENTERPRISE_LINUX`. The Default value is `WINDOWS`.
OperatingSystem pulumi.StringPtrInput
// A list of rejected patches.
RejectedPatches pulumi.StringArrayInput
// The action for Patch Manager to take on patches included in the `rejectedPatches` list. Allow values are `ALLOW_AS_DEPENDENCY` and `BLOCK`.
RejectedPatchesAction pulumi.StringPtrInput
// Configuration block(s) with alternate sources for patches. Applies to Linux instances only. Documented below.
Sources PatchBaselineSourceArrayInput
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll pulumi.StringMapInput
}
func (PatchBaselineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*patchBaselineArgs)(nil)).Elem()
}
type PatchBaselineInput interface {
pulumi.Input
ToPatchBaselineOutput() PatchBaselineOutput
ToPatchBaselineOutputWithContext(ctx context.Context) PatchBaselineOutput
}
func (*PatchBaseline) ElementType() reflect.Type {
return reflect.TypeOf((*PatchBaseline)(nil))
}
func (i *PatchBaseline) ToPatchBaselineOutput() PatchBaselineOutput {
return i.ToPatchBaselineOutputWithContext(context.Background())
}
func (i *PatchBaseline) ToPatchBaselineOutputWithContext(ctx context.Context) PatchBaselineOutput {
return pulumi.ToOutputWithContext(ctx, i).(PatchBaselineOutput)
}
func (i *PatchBaseline) ToPatchBaselinePtrOutput() PatchBaselinePtrOutput {
return i.ToPatchBaselinePtrOutputWithContext(context.Background())
}
func (i *PatchBaseline) ToPatchBaselinePtrOutputWithContext(ctx context.Context) PatchBaselinePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(PatchBaselinePtrOutput)
}
type PatchBaselinePtrInput interface {
pulumi.Input
ToPatchBaselinePtrOutput() PatchBaselinePtrOutput
ToPatchBaselinePtrOutputWithContext(ctx context.Context) PatchBaselinePtrOutput
}
type patchBaselinePtrType PatchBaselineArgs
func (*patchBaselinePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**PatchBaseline)(nil))
}
func (i *patchBaselinePtrType) ToPatchBaselinePtrOutput() PatchBaselinePtrOutput {
return i.ToPatchBaselinePtrOutputWithContext(context.Background())
}
func (i *patchBaselinePtrType) ToPatchBaselinePtrOutputWithContext(ctx context.Context) PatchBaselinePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(PatchBaselinePtrOutput)
}
// PatchBaselineArrayInput is an input type that accepts PatchBaselineArray and PatchBaselineArrayOutput values.
// You can construct a concrete instance of `PatchBaselineArrayInput` via:
//
// PatchBaselineArray{ PatchBaselineArgs{...} }
type PatchBaselineArrayInput interface {
pulumi.Input
ToPatchBaselineArrayOutput() PatchBaselineArrayOutput
ToPatchBaselineArrayOutputWithContext(context.Context) PatchBaselineArrayOutput
}
type PatchBaselineArray []PatchBaselineInput
func (PatchBaselineArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*PatchBaseline)(nil))
}
func (i PatchBaselineArray) ToPatchBaselineArrayOutput() PatchBaselineArrayOutput {
return i.ToPatchBaselineArrayOutputWithContext(context.Background())
}
func (i PatchBaselineArray) ToPatchBaselineArrayOutputWithContext(ctx context.Context) PatchBaselineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PatchBaselineArrayOutput)
}
// PatchBaselineMapInput is an input type that accepts PatchBaselineMap and PatchBaselineMapOutput values.
// You can construct a concrete instance of `PatchBaselineMapInput` via:
//
// PatchBaselineMap{ "key": PatchBaselineArgs{...} }
type PatchBaselineMapInput interface {
pulumi.Input
ToPatchBaselineMapOutput() PatchBaselineMapOutput
ToPatchBaselineMapOutputWithContext(context.Context) PatchBaselineMapOutput
}
type PatchBaselineMap map[string]PatchBaselineInput
func (PatchBaselineMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*PatchBaseline)(nil))
}
func (i PatchBaselineMap) ToPatchBaselineMapOutput() PatchBaselineMapOutput {
return i.ToPatchBaselineMapOutputWithContext(context.Background())
}
func (i PatchBaselineMap) ToPatchBaselineMapOutputWithContext(ctx context.Context) PatchBaselineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PatchBaselineMapOutput)
}
type PatchBaselineOutput struct {
*pulumi.OutputState
}
func (PatchBaselineOutput) ElementType() reflect.Type {
return reflect.TypeOf((*PatchBaseline)(nil))
}
func (o PatchBaselineOutput) ToPatchBaselineOutput() PatchBaselineOutput {
return o
}
func (o PatchBaselineOutput) ToPatchBaselineOutputWithContext(ctx context.Context) PatchBaselineOutput {
return o
}
func (o PatchBaselineOutput) ToPatchBaselinePtrOutput() PatchBaselinePtrOutput {
return o.ToPatchBaselinePtrOutputWithContext(context.Background())
}
func (o PatchBaselineOutput) ToPatchBaselinePtrOutputWithContext(ctx context.Context) PatchBaselinePtrOutput {
return o.ApplyT(func(v PatchBaseline) *PatchBaseline {
return &v
}).(PatchBaselinePtrOutput)
}
type PatchBaselinePtrOutput struct {
*pulumi.OutputState
}
func (PatchBaselinePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PatchBaseline)(nil))
}
func (o PatchBaselinePtrOutput) ToPatchBaselinePtrOutput() PatchBaselinePtrOutput {
return o
}
func (o PatchBaselinePtrOutput) ToPatchBaselinePtrOutputWithContext(ctx context.Context) PatchBaselinePtrOutput {
return o
}
type PatchBaselineArrayOutput struct{ *pulumi.OutputState }
func (PatchBaselineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]PatchBaseline)(nil))
}
func (o PatchBaselineArrayOutput) ToPatchBaselineArrayOutput() PatchBaselineArrayOutput {
return o
}
func (o PatchBaselineArrayOutput) ToPatchBaselineArrayOutputWithContext(ctx context.Context) PatchBaselineArrayOutput {
return o
}
func (o PatchBaselineArrayOutput) Index(i pulumi.IntInput) PatchBaselineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) PatchBaseline {
return vs[0].([]PatchBaseline)[vs[1].(int)]
}).(PatchBaselineOutput)
}
type PatchBaselineMapOutput struct{ *pulumi.OutputState }
func (PatchBaselineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]PatchBaseline)(nil))
}
func (o PatchBaselineMapOutput) ToPatchBaselineMapOutput() PatchBaselineMapOutput {
return o
}
func (o PatchBaselineMapOutput) ToPatchBaselineMapOutputWithContext(ctx context.Context) PatchBaselineMapOutput {
return o
}
func (o PatchBaselineMapOutput) MapIndex(k pulumi.StringInput) PatchBaselineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) PatchBaseline {
return vs[0].(map[string]PatchBaseline)[vs[1].(string)]
}).(PatchBaselineOutput)
}
func init() {
pulumi.RegisterOutputType(PatchBaselineOutput{})
pulumi.RegisterOutputType(PatchBaselinePtrOutput{})
pulumi.RegisterOutputType(PatchBaselineArrayOutput{})
pulumi.RegisterOutputType(PatchBaselineMapOutput{})
}