generated from pulumi/pulumi-tf-provider-boilerplate
/
getHostRuntimePolicy.go
331 lines (285 loc) · 16.5 KB
/
getHostRuntimePolicy.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
// 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 aquasec
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumiverse/pulumi-aquasec/sdk/go/aquasec"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// hostRuntimePolicy, err := aquasec.LookupHostRuntimePolicy(ctx, &aquasec.LookupHostRuntimePolicyArgs{
// Name: "hostRuntimePolicyName",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("hostRuntimePolicyDetails", hostRuntimePolicy)
// return nil
// })
// }
//
// ```
func LookupHostRuntimePolicy(ctx *pulumi.Context, args *LookupHostRuntimePolicyArgs, opts ...pulumi.InvokeOption) (*LookupHostRuntimePolicyResult, error) {
opts = pkgInvokeDefaultOpts(opts)
var rv LookupHostRuntimePolicyResult
err := ctx.Invoke("aquasec:index/getHostRuntimePolicy:getHostRuntimePolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getHostRuntimePolicy.
type LookupHostRuntimePolicyArgs struct {
// Name of the host runtime policy
Name string `pulumi:"name"`
}
// A collection of values returned by getHostRuntimePolicy.
type LookupHostRuntimePolicyResult struct {
// Indicates the application scope of the service.
ApplicationScopes []string `pulumi:"applicationScopes"`
// If true, all process activity will be audited.
AuditAllOsUserActivity bool `pulumi:"auditAllOsUserActivity"`
// Detects brute force login attempts
AuditBruteForceLogin bool `pulumi:"auditBruteForceLogin"`
// If true, full command arguments will be audited.
AuditFullCommandArguments bool `pulumi:"auditFullCommandArguments"`
// If true, host failed logins will be audited.
AuditHostFailedLoginEvents bool `pulumi:"auditHostFailedLoginEvents"`
// If true, host successful logins will be audited.
AuditHostSuccessfulLoginEvents bool `pulumi:"auditHostSuccessfulLoginEvents"`
// If true, account management will be audited.
AuditUserAccountManagement bool `pulumi:"auditUserAccountManagement"`
// Username of the account that created the service.
Author string `pulumi:"author"`
// Detect and prevent communication to DNS/IP addresses known to be used for Cryptocurrency Mining
BlockCryptocurrencyMining bool `pulumi:"blockCryptocurrencyMining"`
// List of files that are prevented from being read, modified and executed in the containers.
BlockedFiles []string `pulumi:"blockedFiles"`
// The description of the host runtime policy
Description string `pulumi:"description"`
// If true, detect and prevent communication from containers to IP addresses known to have a bad reputation.
EnableIpReputationSecurity bool `pulumi:"enableIpReputationSecurity"`
// Indicates if the runtime policy is enabled or not.
Enabled bool `pulumi:"enabled"`
// Indicates that policy should effect container execution (not just for audit).
Enforce bool `pulumi:"enforce"`
// Indicates the number of days after which the runtime policy will be changed to enforce mode.
EnforceAfterDays int `pulumi:"enforceAfterDays"`
// Configuration for file integrity monitoring.
FileIntegrityMonitorings []GetHostRuntimePolicyFileIntegrityMonitoring `pulumi:"fileIntegrityMonitorings"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Configuration for Real-Time Malware Protection.
MalwareScanOptions []GetHostRuntimePolicyMalwareScanOption `pulumi:"malwareScanOptions"`
// If true, system log will be monitored.
MonitorSystemLogIntegrity bool `pulumi:"monitorSystemLogIntegrity"`
// If true, system time changes will be monitored.
MonitorSystemTimeChanges bool `pulumi:"monitorSystemTimeChanges"`
// If true, windows service operations will be monitored.
MonitorWindowsServices bool `pulumi:"monitorWindowsServices"`
// Name of the host runtime policy
Name string `pulumi:"name"`
// List of OS (Linux or Windows) groups that are allowed to authenticate to the host, and block authentication requests from all others. Groups can be either Linux groups or Windows AD groups.
OsGroupsAlloweds []string `pulumi:"osGroupsAlloweds"`
// List of OS (Linux or Windows) groups that are not allowed to authenticate to the host, and block authentication requests from all others. Groups can be either Linux groups or Windows AD groups.
OsGroupsBlockeds []string `pulumi:"osGroupsBlockeds"`
// List of OS (Linux or Windows) users that are allowed to authenticate to the host, and block authentication requests from all others.
OsUsersAlloweds []string `pulumi:"osUsersAlloweds"`
// List of OS (Linux or Windows) users that are not allowed to authenticate to the host, and block authentication requests from all others.
OsUsersBlockeds []string `pulumi:"osUsersBlockeds"`
// List of packages that are not allowed read, write or execute all files that under the packages.
PackageBlocks []string `pulumi:"packageBlocks"`
// If true, port scanning behaviors will be audited.
PortScanningDetection bool `pulumi:"portScanningDetection"`
// Logical expression of how to compute the dependency of the scope variables.
ScopeExpression string `pulumi:"scopeExpression"`
// List of scope attributes.
ScopeVariables []GetHostRuntimePolicyScopeVariable `pulumi:"scopeVariables"`
// Configuration for windows registry monitoring.
WindowsRegistryMonitorings []GetHostRuntimePolicyWindowsRegistryMonitoring `pulumi:"windowsRegistryMonitorings"`
// Configuration for windows registry protection.
WindowsRegistryProtections []GetHostRuntimePolicyWindowsRegistryProtection `pulumi:"windowsRegistryProtections"`
}
func LookupHostRuntimePolicyOutput(ctx *pulumi.Context, args LookupHostRuntimePolicyOutputArgs, opts ...pulumi.InvokeOption) LookupHostRuntimePolicyResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupHostRuntimePolicyResult, error) {
args := v.(LookupHostRuntimePolicyArgs)
r, err := LookupHostRuntimePolicy(ctx, &args, opts...)
var s LookupHostRuntimePolicyResult
if r != nil {
s = *r
}
return s, err
}).(LookupHostRuntimePolicyResultOutput)
}
// A collection of arguments for invoking getHostRuntimePolicy.
type LookupHostRuntimePolicyOutputArgs struct {
// Name of the host runtime policy
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupHostRuntimePolicyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupHostRuntimePolicyArgs)(nil)).Elem()
}
// A collection of values returned by getHostRuntimePolicy.
type LookupHostRuntimePolicyResultOutput struct{ *pulumi.OutputState }
func (LookupHostRuntimePolicyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupHostRuntimePolicyResult)(nil)).Elem()
}
func (o LookupHostRuntimePolicyResultOutput) ToLookupHostRuntimePolicyResultOutput() LookupHostRuntimePolicyResultOutput {
return o
}
func (o LookupHostRuntimePolicyResultOutput) ToLookupHostRuntimePolicyResultOutputWithContext(ctx context.Context) LookupHostRuntimePolicyResultOutput {
return o
}
// Indicates the application scope of the service.
func (o LookupHostRuntimePolicyResultOutput) ApplicationScopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []string { return v.ApplicationScopes }).(pulumi.StringArrayOutput)
}
// If true, all process activity will be audited.
func (o LookupHostRuntimePolicyResultOutput) AuditAllOsUserActivity() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.AuditAllOsUserActivity }).(pulumi.BoolOutput)
}
// Detects brute force login attempts
func (o LookupHostRuntimePolicyResultOutput) AuditBruteForceLogin() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.AuditBruteForceLogin }).(pulumi.BoolOutput)
}
// If true, full command arguments will be audited.
func (o LookupHostRuntimePolicyResultOutput) AuditFullCommandArguments() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.AuditFullCommandArguments }).(pulumi.BoolOutput)
}
// If true, host failed logins will be audited.
func (o LookupHostRuntimePolicyResultOutput) AuditHostFailedLoginEvents() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.AuditHostFailedLoginEvents }).(pulumi.BoolOutput)
}
// If true, host successful logins will be audited.
func (o LookupHostRuntimePolicyResultOutput) AuditHostSuccessfulLoginEvents() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.AuditHostSuccessfulLoginEvents }).(pulumi.BoolOutput)
}
// If true, account management will be audited.
func (o LookupHostRuntimePolicyResultOutput) AuditUserAccountManagement() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.AuditUserAccountManagement }).(pulumi.BoolOutput)
}
// Username of the account that created the service.
func (o LookupHostRuntimePolicyResultOutput) Author() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) string { return v.Author }).(pulumi.StringOutput)
}
// Detect and prevent communication to DNS/IP addresses known to be used for Cryptocurrency Mining
func (o LookupHostRuntimePolicyResultOutput) BlockCryptocurrencyMining() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.BlockCryptocurrencyMining }).(pulumi.BoolOutput)
}
// List of files that are prevented from being read, modified and executed in the containers.
func (o LookupHostRuntimePolicyResultOutput) BlockedFiles() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []string { return v.BlockedFiles }).(pulumi.StringArrayOutput)
}
// The description of the host runtime policy
func (o LookupHostRuntimePolicyResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) string { return v.Description }).(pulumi.StringOutput)
}
// If true, detect and prevent communication from containers to IP addresses known to have a bad reputation.
func (o LookupHostRuntimePolicyResultOutput) EnableIpReputationSecurity() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.EnableIpReputationSecurity }).(pulumi.BoolOutput)
}
// Indicates if the runtime policy is enabled or not.
func (o LookupHostRuntimePolicyResultOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.Enabled }).(pulumi.BoolOutput)
}
// Indicates that policy should effect container execution (not just for audit).
func (o LookupHostRuntimePolicyResultOutput) Enforce() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.Enforce }).(pulumi.BoolOutput)
}
// Indicates the number of days after which the runtime policy will be changed to enforce mode.
func (o LookupHostRuntimePolicyResultOutput) EnforceAfterDays() pulumi.IntOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) int { return v.EnforceAfterDays }).(pulumi.IntOutput)
}
// Configuration for file integrity monitoring.
func (o LookupHostRuntimePolicyResultOutput) FileIntegrityMonitorings() GetHostRuntimePolicyFileIntegrityMonitoringArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []GetHostRuntimePolicyFileIntegrityMonitoring {
return v.FileIntegrityMonitorings
}).(GetHostRuntimePolicyFileIntegrityMonitoringArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupHostRuntimePolicyResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) string { return v.Id }).(pulumi.StringOutput)
}
// Configuration for Real-Time Malware Protection.
func (o LookupHostRuntimePolicyResultOutput) MalwareScanOptions() GetHostRuntimePolicyMalwareScanOptionArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []GetHostRuntimePolicyMalwareScanOption {
return v.MalwareScanOptions
}).(GetHostRuntimePolicyMalwareScanOptionArrayOutput)
}
// If true, system log will be monitored.
func (o LookupHostRuntimePolicyResultOutput) MonitorSystemLogIntegrity() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.MonitorSystemLogIntegrity }).(pulumi.BoolOutput)
}
// If true, system time changes will be monitored.
func (o LookupHostRuntimePolicyResultOutput) MonitorSystemTimeChanges() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.MonitorSystemTimeChanges }).(pulumi.BoolOutput)
}
// If true, windows service operations will be monitored.
func (o LookupHostRuntimePolicyResultOutput) MonitorWindowsServices() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.MonitorWindowsServices }).(pulumi.BoolOutput)
}
// Name of the host runtime policy
func (o LookupHostRuntimePolicyResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) string { return v.Name }).(pulumi.StringOutput)
}
// List of OS (Linux or Windows) groups that are allowed to authenticate to the host, and block authentication requests from all others. Groups can be either Linux groups or Windows AD groups.
func (o LookupHostRuntimePolicyResultOutput) OsGroupsAlloweds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []string { return v.OsGroupsAlloweds }).(pulumi.StringArrayOutput)
}
// List of OS (Linux or Windows) groups that are not allowed to authenticate to the host, and block authentication requests from all others. Groups can be either Linux groups or Windows AD groups.
func (o LookupHostRuntimePolicyResultOutput) OsGroupsBlockeds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []string { return v.OsGroupsBlockeds }).(pulumi.StringArrayOutput)
}
// List of OS (Linux or Windows) users that are allowed to authenticate to the host, and block authentication requests from all others.
func (o LookupHostRuntimePolicyResultOutput) OsUsersAlloweds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []string { return v.OsUsersAlloweds }).(pulumi.StringArrayOutput)
}
// List of OS (Linux or Windows) users that are not allowed to authenticate to the host, and block authentication requests from all others.
func (o LookupHostRuntimePolicyResultOutput) OsUsersBlockeds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []string { return v.OsUsersBlockeds }).(pulumi.StringArrayOutput)
}
// List of packages that are not allowed read, write or execute all files that under the packages.
func (o LookupHostRuntimePolicyResultOutput) PackageBlocks() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []string { return v.PackageBlocks }).(pulumi.StringArrayOutput)
}
// If true, port scanning behaviors will be audited.
func (o LookupHostRuntimePolicyResultOutput) PortScanningDetection() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) bool { return v.PortScanningDetection }).(pulumi.BoolOutput)
}
// Logical expression of how to compute the dependency of the scope variables.
func (o LookupHostRuntimePolicyResultOutput) ScopeExpression() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) string { return v.ScopeExpression }).(pulumi.StringOutput)
}
// List of scope attributes.
func (o LookupHostRuntimePolicyResultOutput) ScopeVariables() GetHostRuntimePolicyScopeVariableArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []GetHostRuntimePolicyScopeVariable { return v.ScopeVariables }).(GetHostRuntimePolicyScopeVariableArrayOutput)
}
// Configuration for windows registry monitoring.
func (o LookupHostRuntimePolicyResultOutput) WindowsRegistryMonitorings() GetHostRuntimePolicyWindowsRegistryMonitoringArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []GetHostRuntimePolicyWindowsRegistryMonitoring {
return v.WindowsRegistryMonitorings
}).(GetHostRuntimePolicyWindowsRegistryMonitoringArrayOutput)
}
// Configuration for windows registry protection.
func (o LookupHostRuntimePolicyResultOutput) WindowsRegistryProtections() GetHostRuntimePolicyWindowsRegistryProtectionArrayOutput {
return o.ApplyT(func(v LookupHostRuntimePolicyResult) []GetHostRuntimePolicyWindowsRegistryProtection {
return v.WindowsRegistryProtections
}).(GetHostRuntimePolicyWindowsRegistryProtectionArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupHostRuntimePolicyResultOutput{})
}