generated from pulumi/pulumi-tf-provider-boilerplate
/
getService.go
254 lines (214 loc) · 10.4 KB
/
getService.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
// 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"
"github.com/pulumiverse/pulumi-aquasec/sdk/go/aquasec/internal"
)
func LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupServiceResult
err := ctx.Invoke("aquasec:index/getService:getService", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getService.
type LookupServiceArgs struct {
Name string `pulumi:"name"`
}
// A collection of values returned by getService.
type LookupServiceResult struct {
// Indicates the application scope of the service.
ApplicationScopes []string `pulumi:"applicationScopes"`
// Username of the account that created the service.
Author string `pulumi:"author"`
// The number of containers associated with the service.
ContainersCount int `pulumi:"containersCount"`
// A textual description of the service record; maximum 500 characters.
Description string `pulumi:"description"`
// Enforcement status of the service.
Enforce bool `pulumi:"enforce"`
// Whether the service has been evaluated for security vulnerabilities.
Evaluated bool `pulumi:"evaluated"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Indicates if registered or not.
IsRegistered bool `pulumi:"isRegistered"`
// Timestamp of the last update in Unix time format.
Lastupdate int `pulumi:"lastupdate"`
// Indicates if monitoring is enabled or not
Monitoring bool `pulumi:"monitoring"`
// The name of the service. It is recommended not to use whitespace characters in the name.
Name string `pulumi:"name"`
// The number of container that are not evaluated.
NotEvaluatedCount int `pulumi:"notEvaluatedCount"`
// The service's policies; an array of container firewall policy names.
Policies []string `pulumi:"policies"`
// Rules priority, must be between 1-100.
Priority int `pulumi:"priority"`
// Logical expression of how to compute the dependency of the scope variables.
ScopeExpression string `pulumi:"scopeExpression"`
// List of scope attributes.
ScopeVariables []GetServiceScopeVariable `pulumi:"scopeVariables"`
// Type of the workload. container or host.
Target string `pulumi:"target"`
// The number of containers allocated to the service that are not registered.
UnregisteredCount int `pulumi:"unregisteredCount"`
// Number of high severity vulnerabilities.
VulnerabilitiesHigh int `pulumi:"vulnerabilitiesHigh"`
// Number of low severity vulnerabilities.
VulnerabilitiesLow int `pulumi:"vulnerabilitiesLow"`
// Number of malware.
VulnerabilitiesMalware int `pulumi:"vulnerabilitiesMalware"`
// Number of medium severity vulnerabilities.
VulnerabilitiesMedium int `pulumi:"vulnerabilitiesMedium"`
// Number of negligible vulnerabilities.
VulnerabilitiesNegligible int `pulumi:"vulnerabilitiesNegligible"`
// The CVSS average vulnerabilities score.
VulnerabilitiesScoreAverage int `pulumi:"vulnerabilitiesScoreAverage"`
// Number of sensitive vulnerabilities.
VulnerabilitiesSensitive int `pulumi:"vulnerabilitiesSensitive"`
// Total number of vulnerabilities.
VulnerabilitiesTotal int `pulumi:"vulnerabilitiesTotal"`
}
func LookupServiceOutput(ctx *pulumi.Context, args LookupServiceOutputArgs, opts ...pulumi.InvokeOption) LookupServiceResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupServiceResult, error) {
args := v.(LookupServiceArgs)
r, err := LookupService(ctx, &args, opts...)
var s LookupServiceResult
if r != nil {
s = *r
}
return s, err
}).(LookupServiceResultOutput)
}
// A collection of arguments for invoking getService.
type LookupServiceOutputArgs struct {
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupServiceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceArgs)(nil)).Elem()
}
// A collection of values returned by getService.
type LookupServiceResultOutput struct{ *pulumi.OutputState }
func (LookupServiceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceResult)(nil)).Elem()
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutput() LookupServiceResultOutput {
return o
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutputWithContext(ctx context.Context) LookupServiceResultOutput {
return o
}
// Indicates the application scope of the service.
func (o LookupServiceResultOutput) ApplicationScopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupServiceResult) []string { return v.ApplicationScopes }).(pulumi.StringArrayOutput)
}
// Username of the account that created the service.
func (o LookupServiceResultOutput) Author() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Author }).(pulumi.StringOutput)
}
// The number of containers associated with the service.
func (o LookupServiceResultOutput) ContainersCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.ContainersCount }).(pulumi.IntOutput)
}
// A textual description of the service record; maximum 500 characters.
func (o LookupServiceResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Description }).(pulumi.StringOutput)
}
// Enforcement status of the service.
func (o LookupServiceResultOutput) Enforce() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServiceResult) bool { return v.Enforce }).(pulumi.BoolOutput)
}
// Whether the service has been evaluated for security vulnerabilities.
func (o LookupServiceResultOutput) Evaluated() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServiceResult) bool { return v.Evaluated }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupServiceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Id }).(pulumi.StringOutput)
}
// Indicates if registered or not.
func (o LookupServiceResultOutput) IsRegistered() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServiceResult) bool { return v.IsRegistered }).(pulumi.BoolOutput)
}
// Timestamp of the last update in Unix time format.
func (o LookupServiceResultOutput) Lastupdate() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.Lastupdate }).(pulumi.IntOutput)
}
// Indicates if monitoring is enabled or not
func (o LookupServiceResultOutput) Monitoring() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServiceResult) bool { return v.Monitoring }).(pulumi.BoolOutput)
}
// The name of the service. It is recommended not to use whitespace characters in the name.
func (o LookupServiceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput)
}
// The number of container that are not evaluated.
func (o LookupServiceResultOutput) NotEvaluatedCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.NotEvaluatedCount }).(pulumi.IntOutput)
}
// The service's policies; an array of container firewall policy names.
func (o LookupServiceResultOutput) Policies() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupServiceResult) []string { return v.Policies }).(pulumi.StringArrayOutput)
}
// Rules priority, must be between 1-100.
func (o LookupServiceResultOutput) Priority() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.Priority }).(pulumi.IntOutput)
}
// Logical expression of how to compute the dependency of the scope variables.
func (o LookupServiceResultOutput) ScopeExpression() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.ScopeExpression }).(pulumi.StringOutput)
}
// List of scope attributes.
func (o LookupServiceResultOutput) ScopeVariables() GetServiceScopeVariableArrayOutput {
return o.ApplyT(func(v LookupServiceResult) []GetServiceScopeVariable { return v.ScopeVariables }).(GetServiceScopeVariableArrayOutput)
}
// Type of the workload. container or host.
func (o LookupServiceResultOutput) Target() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Target }).(pulumi.StringOutput)
}
// The number of containers allocated to the service that are not registered.
func (o LookupServiceResultOutput) UnregisteredCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.UnregisteredCount }).(pulumi.IntOutput)
}
// Number of high severity vulnerabilities.
func (o LookupServiceResultOutput) VulnerabilitiesHigh() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.VulnerabilitiesHigh }).(pulumi.IntOutput)
}
// Number of low severity vulnerabilities.
func (o LookupServiceResultOutput) VulnerabilitiesLow() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.VulnerabilitiesLow }).(pulumi.IntOutput)
}
// Number of malware.
func (o LookupServiceResultOutput) VulnerabilitiesMalware() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.VulnerabilitiesMalware }).(pulumi.IntOutput)
}
// Number of medium severity vulnerabilities.
func (o LookupServiceResultOutput) VulnerabilitiesMedium() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.VulnerabilitiesMedium }).(pulumi.IntOutput)
}
// Number of negligible vulnerabilities.
func (o LookupServiceResultOutput) VulnerabilitiesNegligible() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.VulnerabilitiesNegligible }).(pulumi.IntOutput)
}
// The CVSS average vulnerabilities score.
func (o LookupServiceResultOutput) VulnerabilitiesScoreAverage() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.VulnerabilitiesScoreAverage }).(pulumi.IntOutput)
}
// Number of sensitive vulnerabilities.
func (o LookupServiceResultOutput) VulnerabilitiesSensitive() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.VulnerabilitiesSensitive }).(pulumi.IntOutput)
}
// Total number of vulnerabilities.
func (o LookupServiceResultOutput) VulnerabilitiesTotal() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.VulnerabilitiesTotal }).(pulumi.IntOutput)
}
func init() {
pulumi.RegisterOutputType(LookupServiceResultOutput{})
}