-
Notifications
You must be signed in to change notification settings - Fork 151
/
getPatchBaseline.go
102 lines (97 loc) · 2.86 KB
/
getPatchBaseline.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
// *** 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 (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides an SSM Patch Baseline data source. Useful if you wish to reuse the default baselines provided.
//
// ## Example Usage
//
// To retrieve a baseline provided by AWS:
//
// ```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 {
// opt0 := "AWS-"
// opt1 := "CENTOS"
// _, err := ssm.LookupPatchBaseline(ctx, &ssm.LookupPatchBaselineArgs{
// NamePrefix: &opt0,
// OperatingSystem: &opt1,
// Owner: "AWS",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// To retrieve a baseline on your account:
//
// ```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 {
// opt0 := true
// opt1 := "MyCustomBaseline"
// opt2 := "WINDOWS"
// _, err := ssm.LookupPatchBaseline(ctx, &ssm.LookupPatchBaselineArgs{
// DefaultBaseline: &opt0,
// NamePrefix: &opt1,
// OperatingSystem: &opt2,
// Owner: "Self",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func LookupPatchBaseline(ctx *pulumi.Context, args *LookupPatchBaselineArgs, opts ...pulumi.InvokeOption) (*LookupPatchBaselineResult, error) {
var rv LookupPatchBaselineResult
err := ctx.Invoke("aws:ssm/getPatchBaseline:getPatchBaseline", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPatchBaseline.
type LookupPatchBaselineArgs struct {
// Filters the results against the baselines defaultBaseline field.
DefaultBaseline *bool `pulumi:"defaultBaseline"`
// Filter results by the baseline name prefix.
NamePrefix *string `pulumi:"namePrefix"`
// The specified OS for the baseline.
OperatingSystem *string `pulumi:"operatingSystem"`
// The owner of the baseline. Valid values: `All`, `AWS`, `Self` (the current account).
Owner string `pulumi:"owner"`
}
// A collection of values returned by getPatchBaseline.
type LookupPatchBaselineResult struct {
DefaultBaseline *bool `pulumi:"defaultBaseline"`
// The description of the baseline.
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The name of the baseline.
Name string `pulumi:"name"`
NamePrefix *string `pulumi:"namePrefix"`
OperatingSystem *string `pulumi:"operatingSystem"`
Owner string `pulumi:"owner"`
}