/
organizationMuteConfig.go
204 lines (171 loc) · 13.5 KB
/
organizationMuteConfig.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a mute config.
type OrganizationMuteConfig struct {
pulumi.CustomResourceState
// The time at which the mute config was created. This field is set by the server and will be ignored if provided on config creation.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// A description of the mute config.
Description pulumi.StringOutput `pulumi:"description"`
// The human readable name to be displayed for the mute config.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`
Filter pulumi.StringOutput `pulumi:"filter"`
// Email address of the user who last edited the mute config. This field is set by the server and will be ignored if provided on config creation or update.
MostRecentEditor pulumi.StringOutput `pulumi:"mostRecentEditor"`
// Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
MuteConfigId pulumi.StringOutput `pulumi:"muteConfigId"`
// This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}"
Name pulumi.StringOutput `pulumi:"name"`
OrganizationId pulumi.StringOutput `pulumi:"organizationId"`
// The most recent time at which the mute config was updated. This field is set by the server and will be ignored if provided on config creation or update.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
}
// NewOrganizationMuteConfig registers a new resource with the given unique name, arguments, and options.
func NewOrganizationMuteConfig(ctx *pulumi.Context,
name string, args *OrganizationMuteConfigArgs, opts ...pulumi.ResourceOption) (*OrganizationMuteConfig, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Filter == nil {
return nil, errors.New("invalid value for required argument 'Filter'")
}
if args.MuteConfigId == nil {
return nil, errors.New("invalid value for required argument 'MuteConfigId'")
}
if args.OrganizationId == nil {
return nil, errors.New("invalid value for required argument 'OrganizationId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"muteConfigId",
"organizationId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource OrganizationMuteConfig
err := ctx.RegisterResource("google-native:securitycenter/v1:OrganizationMuteConfig", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOrganizationMuteConfig gets an existing OrganizationMuteConfig 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 GetOrganizationMuteConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OrganizationMuteConfigState, opts ...pulumi.ResourceOption) (*OrganizationMuteConfig, error) {
var resource OrganizationMuteConfig
err := ctx.ReadResource("google-native:securitycenter/v1:OrganizationMuteConfig", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering OrganizationMuteConfig resources.
type organizationMuteConfigState struct {
}
type OrganizationMuteConfigState struct {
}
func (OrganizationMuteConfigState) ElementType() reflect.Type {
return reflect.TypeOf((*organizationMuteConfigState)(nil)).Elem()
}
type organizationMuteConfigArgs struct {
// A description of the mute config.
Description *string `pulumi:"description"`
// The human readable name to be displayed for the mute config.
DisplayName *string `pulumi:"displayName"`
// An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`
Filter string `pulumi:"filter"`
// Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
MuteConfigId string `pulumi:"muteConfigId"`
// This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}"
Name *string `pulumi:"name"`
OrganizationId string `pulumi:"organizationId"`
}
// The set of arguments for constructing a OrganizationMuteConfig resource.
type OrganizationMuteConfigArgs struct {
// A description of the mute config.
Description pulumi.StringPtrInput
// The human readable name to be displayed for the mute config.
DisplayName pulumi.StringPtrInput
// An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`
Filter pulumi.StringInput
// Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
MuteConfigId pulumi.StringInput
// This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}"
Name pulumi.StringPtrInput
OrganizationId pulumi.StringInput
}
func (OrganizationMuteConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*organizationMuteConfigArgs)(nil)).Elem()
}
type OrganizationMuteConfigInput interface {
pulumi.Input
ToOrganizationMuteConfigOutput() OrganizationMuteConfigOutput
ToOrganizationMuteConfigOutputWithContext(ctx context.Context) OrganizationMuteConfigOutput
}
func (*OrganizationMuteConfig) ElementType() reflect.Type {
return reflect.TypeOf((**OrganizationMuteConfig)(nil)).Elem()
}
func (i *OrganizationMuteConfig) ToOrganizationMuteConfigOutput() OrganizationMuteConfigOutput {
return i.ToOrganizationMuteConfigOutputWithContext(context.Background())
}
func (i *OrganizationMuteConfig) ToOrganizationMuteConfigOutputWithContext(ctx context.Context) OrganizationMuteConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationMuteConfigOutput)
}
type OrganizationMuteConfigOutput struct{ *pulumi.OutputState }
func (OrganizationMuteConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((**OrganizationMuteConfig)(nil)).Elem()
}
func (o OrganizationMuteConfigOutput) ToOrganizationMuteConfigOutput() OrganizationMuteConfigOutput {
return o
}
func (o OrganizationMuteConfigOutput) ToOrganizationMuteConfigOutputWithContext(ctx context.Context) OrganizationMuteConfigOutput {
return o
}
// The time at which the mute config was created. This field is set by the server and will be ignored if provided on config creation.
func (o OrganizationMuteConfigOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationMuteConfig) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// A description of the mute config.
func (o OrganizationMuteConfigOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationMuteConfig) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// The human readable name to be displayed for the mute config.
func (o OrganizationMuteConfigOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationMuteConfig) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`
func (o OrganizationMuteConfigOutput) Filter() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationMuteConfig) pulumi.StringOutput { return v.Filter }).(pulumi.StringOutput)
}
// Email address of the user who last edited the mute config. This field is set by the server and will be ignored if provided on config creation or update.
func (o OrganizationMuteConfigOutput) MostRecentEditor() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationMuteConfig) pulumi.StringOutput { return v.MostRecentEditor }).(pulumi.StringOutput)
}
// Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
func (o OrganizationMuteConfigOutput) MuteConfigId() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationMuteConfig) pulumi.StringOutput { return v.MuteConfigId }).(pulumi.StringOutput)
}
// This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}"
func (o OrganizationMuteConfigOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationMuteConfig) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o OrganizationMuteConfigOutput) OrganizationId() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationMuteConfig) pulumi.StringOutput { return v.OrganizationId }).(pulumi.StringOutput)
}
// The most recent time at which the mute config was updated. This field is set by the server and will be ignored if provided on config creation or update.
func (o OrganizationMuteConfigOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *OrganizationMuteConfig) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationMuteConfigInput)(nil)).Elem(), &OrganizationMuteConfig{})
pulumi.RegisterOutputType(OrganizationMuteConfigOutput{})
}