generated from pulumi/pulumi-tf-provider-boilerplate
/
getSecurityAssessmentSecurityFeatures.go
281 lines (249 loc) · 17.8 KB
/
getSecurityAssessmentSecurityFeatures.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
// 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 datasafe
import (
"context"
"reflect"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This data source provides the list of Security Assessment Security Features in Oracle Cloud Infrastructure Data Safe service.
//
// Lists the usage of Database security features for a given compartment or a target level, based on the filters provided.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/DataSafe"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := DataSafe.GetSecurityAssessmentSecurityFeatures(ctx, &datasafe.GetSecurityAssessmentSecurityFeaturesArgs{
// CompartmentId: compartmentId,
// AccessLevel: pulumi.StringRef(securityAssessmentSecurityFeatureAccessLevel),
// CompartmentIdInSubtree: pulumi.BoolRef(securityAssessmentSecurityFeatureCompartmentIdInSubtree),
// TargetId: pulumi.StringRef(testTarget.Id),
// TargetsWithColumnEncryption: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithColumnEncryption),
// TargetsWithDatabaseVault: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithDatabaseVault),
// TargetsWithExternalAuthentication: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithExternalAuthentication),
// TargetsWithFineGrainedAudit: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithFineGrainedAudit),
// TargetsWithGlobalAuthentication: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithGlobalAuthentication),
// TargetsWithNetworkEncryption: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithNetworkEncryption),
// TargetsWithPasswordAuthentication: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithPasswordAuthentication),
// TargetsWithPrivilegeAnalysis: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithPrivilegeAnalysis),
// TargetsWithTablespaceEncryption: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithTablespaceEncryption),
// TargetsWithTraditionalAudit: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithTraditionalAudit),
// TargetsWithUnifiedAudit: pulumi.StringRef(securityAssessmentSecurityFeatureTargetsWithUnifiedAudit),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetSecurityAssessmentSecurityFeatures(ctx *pulumi.Context, args *GetSecurityAssessmentSecurityFeaturesArgs, opts ...pulumi.InvokeOption) (*GetSecurityAssessmentSecurityFeaturesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetSecurityAssessmentSecurityFeaturesResult
err := ctx.Invoke("oci:DataSafe/getSecurityAssessmentSecurityFeatures:getSecurityAssessmentSecurityFeatures", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSecurityAssessmentSecurityFeatures.
type GetSecurityAssessmentSecurityFeaturesArgs struct {
// Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
AccessLevel *string `pulumi:"accessLevel"`
// A filter to return only resources that match the specified compartment OCID.
CompartmentId string `pulumi:"compartmentId"`
// Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
CompartmentIdInSubtree *bool `pulumi:"compartmentIdInSubtree"`
Filters []GetSecurityAssessmentSecurityFeaturesFilter `pulumi:"filters"`
// A filter to return only items related to a specific target OCID.
TargetId *string `pulumi:"targetId"`
// A filter to return only the targets that enable the DB security feature - Column Encryption enabled/disabled.
TargetsWithColumnEncryption *string `pulumi:"targetsWithColumnEncryption"`
// A filter to return only the targets with the DB security feature - Database Vault enabled/disabled.
TargetsWithDatabaseVault *string `pulumi:"targetsWithDatabaseVault"`
// A filter to return only the targets with the DB security feature - External Authentication enabled/disabled.
TargetsWithExternalAuthentication *string `pulumi:"targetsWithExternalAuthentication"`
// A filter to return only the targets with the DB security feature - Fine Grained Audit enabled/disabled.
TargetsWithFineGrainedAudit *string `pulumi:"targetsWithFineGrainedAudit"`
// A filter to return only the targets with the DB security feature - Global Authentication enabled/disabled.
TargetsWithGlobalAuthentication *string `pulumi:"targetsWithGlobalAuthentication"`
// A filter to return only the targets with the DB security feature - Network Encryption enabled/disabled.
TargetsWithNetworkEncryption *string `pulumi:"targetsWithNetworkEncryption"`
// A filter to return only the targets with the DB security feature - Password Authentication enabled/disabled.
TargetsWithPasswordAuthentication *string `pulumi:"targetsWithPasswordAuthentication"`
// A filter to return only the targets with the DB security feature - Privilege Analysis enabled/disabled.
TargetsWithPrivilegeAnalysis *string `pulumi:"targetsWithPrivilegeAnalysis"`
// A filter to return only the targets with the DB security feature - Tablespace Encryption enabled/disabled.
TargetsWithTablespaceEncryption *string `pulumi:"targetsWithTablespaceEncryption"`
// A filter to return only the targets with the DB security feature - Traditional Audit enabled/disabled.
TargetsWithTraditionalAudit *string `pulumi:"targetsWithTraditionalAudit"`
// A filter to return only the targets with the DB security feature - Unified Audit enabled/disabled.
TargetsWithUnifiedAudit *string `pulumi:"targetsWithUnifiedAudit"`
}
// A collection of values returned by getSecurityAssessmentSecurityFeatures.
type GetSecurityAssessmentSecurityFeaturesResult struct {
AccessLevel *string `pulumi:"accessLevel"`
// The OCID of the compartment.
CompartmentId string `pulumi:"compartmentId"`
CompartmentIdInSubtree *bool `pulumi:"compartmentIdInSubtree"`
Filters []GetSecurityAssessmentSecurityFeaturesFilter `pulumi:"filters"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The list of security_feature_collection.
SecurityFeatureCollections []GetSecurityAssessmentSecurityFeaturesSecurityFeatureCollection `pulumi:"securityFeatureCollections"`
// The OCID of the target database.
TargetId *string `pulumi:"targetId"`
TargetsWithColumnEncryption *string `pulumi:"targetsWithColumnEncryption"`
TargetsWithDatabaseVault *string `pulumi:"targetsWithDatabaseVault"`
TargetsWithExternalAuthentication *string `pulumi:"targetsWithExternalAuthentication"`
TargetsWithFineGrainedAudit *string `pulumi:"targetsWithFineGrainedAudit"`
TargetsWithGlobalAuthentication *string `pulumi:"targetsWithGlobalAuthentication"`
TargetsWithNetworkEncryption *string `pulumi:"targetsWithNetworkEncryption"`
TargetsWithPasswordAuthentication *string `pulumi:"targetsWithPasswordAuthentication"`
TargetsWithPrivilegeAnalysis *string `pulumi:"targetsWithPrivilegeAnalysis"`
TargetsWithTablespaceEncryption *string `pulumi:"targetsWithTablespaceEncryption"`
TargetsWithTraditionalAudit *string `pulumi:"targetsWithTraditionalAudit"`
TargetsWithUnifiedAudit *string `pulumi:"targetsWithUnifiedAudit"`
}
func GetSecurityAssessmentSecurityFeaturesOutput(ctx *pulumi.Context, args GetSecurityAssessmentSecurityFeaturesOutputArgs, opts ...pulumi.InvokeOption) GetSecurityAssessmentSecurityFeaturesResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetSecurityAssessmentSecurityFeaturesResult, error) {
args := v.(GetSecurityAssessmentSecurityFeaturesArgs)
r, err := GetSecurityAssessmentSecurityFeatures(ctx, &args, opts...)
var s GetSecurityAssessmentSecurityFeaturesResult
if r != nil {
s = *r
}
return s, err
}).(GetSecurityAssessmentSecurityFeaturesResultOutput)
}
// A collection of arguments for invoking getSecurityAssessmentSecurityFeatures.
type GetSecurityAssessmentSecurityFeaturesOutputArgs struct {
// Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.
AccessLevel pulumi.StringPtrInput `pulumi:"accessLevel"`
// A filter to return only resources that match the specified compartment OCID.
CompartmentId pulumi.StringInput `pulumi:"compartmentId"`
// Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
CompartmentIdInSubtree pulumi.BoolPtrInput `pulumi:"compartmentIdInSubtree"`
Filters GetSecurityAssessmentSecurityFeaturesFilterArrayInput `pulumi:"filters"`
// A filter to return only items related to a specific target OCID.
TargetId pulumi.StringPtrInput `pulumi:"targetId"`
// A filter to return only the targets that enable the DB security feature - Column Encryption enabled/disabled.
TargetsWithColumnEncryption pulumi.StringPtrInput `pulumi:"targetsWithColumnEncryption"`
// A filter to return only the targets with the DB security feature - Database Vault enabled/disabled.
TargetsWithDatabaseVault pulumi.StringPtrInput `pulumi:"targetsWithDatabaseVault"`
// A filter to return only the targets with the DB security feature - External Authentication enabled/disabled.
TargetsWithExternalAuthentication pulumi.StringPtrInput `pulumi:"targetsWithExternalAuthentication"`
// A filter to return only the targets with the DB security feature - Fine Grained Audit enabled/disabled.
TargetsWithFineGrainedAudit pulumi.StringPtrInput `pulumi:"targetsWithFineGrainedAudit"`
// A filter to return only the targets with the DB security feature - Global Authentication enabled/disabled.
TargetsWithGlobalAuthentication pulumi.StringPtrInput `pulumi:"targetsWithGlobalAuthentication"`
// A filter to return only the targets with the DB security feature - Network Encryption enabled/disabled.
TargetsWithNetworkEncryption pulumi.StringPtrInput `pulumi:"targetsWithNetworkEncryption"`
// A filter to return only the targets with the DB security feature - Password Authentication enabled/disabled.
TargetsWithPasswordAuthentication pulumi.StringPtrInput `pulumi:"targetsWithPasswordAuthentication"`
// A filter to return only the targets with the DB security feature - Privilege Analysis enabled/disabled.
TargetsWithPrivilegeAnalysis pulumi.StringPtrInput `pulumi:"targetsWithPrivilegeAnalysis"`
// A filter to return only the targets with the DB security feature - Tablespace Encryption enabled/disabled.
TargetsWithTablespaceEncryption pulumi.StringPtrInput `pulumi:"targetsWithTablespaceEncryption"`
// A filter to return only the targets with the DB security feature - Traditional Audit enabled/disabled.
TargetsWithTraditionalAudit pulumi.StringPtrInput `pulumi:"targetsWithTraditionalAudit"`
// A filter to return only the targets with the DB security feature - Unified Audit enabled/disabled.
TargetsWithUnifiedAudit pulumi.StringPtrInput `pulumi:"targetsWithUnifiedAudit"`
}
func (GetSecurityAssessmentSecurityFeaturesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSecurityAssessmentSecurityFeaturesArgs)(nil)).Elem()
}
// A collection of values returned by getSecurityAssessmentSecurityFeatures.
type GetSecurityAssessmentSecurityFeaturesResultOutput struct{ *pulumi.OutputState }
func (GetSecurityAssessmentSecurityFeaturesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSecurityAssessmentSecurityFeaturesResult)(nil)).Elem()
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) ToGetSecurityAssessmentSecurityFeaturesResultOutput() GetSecurityAssessmentSecurityFeaturesResultOutput {
return o
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) ToGetSecurityAssessmentSecurityFeaturesResultOutputWithContext(ctx context.Context) GetSecurityAssessmentSecurityFeaturesResultOutput {
return o
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) AccessLevel() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.AccessLevel }).(pulumi.StringPtrOutput)
}
// The OCID of the compartment.
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) CompartmentIdInSubtree() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *bool { return v.CompartmentIdInSubtree }).(pulumi.BoolPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) Filters() GetSecurityAssessmentSecurityFeaturesFilterArrayOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) []GetSecurityAssessmentSecurityFeaturesFilter {
return v.Filters
}).(GetSecurityAssessmentSecurityFeaturesFilterArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) string { return v.Id }).(pulumi.StringOutput)
}
// The list of security_feature_collection.
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) SecurityFeatureCollections() GetSecurityAssessmentSecurityFeaturesSecurityFeatureCollectionArrayOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) []GetSecurityAssessmentSecurityFeaturesSecurityFeatureCollection {
return v.SecurityFeatureCollections
}).(GetSecurityAssessmentSecurityFeaturesSecurityFeatureCollectionArrayOutput)
}
// The OCID of the target database.
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetId }).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithColumnEncryption() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetsWithColumnEncryption }).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithDatabaseVault() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetsWithDatabaseVault }).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithExternalAuthentication() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string {
return v.TargetsWithExternalAuthentication
}).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithFineGrainedAudit() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetsWithFineGrainedAudit }).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithGlobalAuthentication() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetsWithGlobalAuthentication }).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithNetworkEncryption() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetsWithNetworkEncryption }).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithPasswordAuthentication() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string {
return v.TargetsWithPasswordAuthentication
}).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithPrivilegeAnalysis() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetsWithPrivilegeAnalysis }).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithTablespaceEncryption() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetsWithTablespaceEncryption }).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithTraditionalAudit() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetsWithTraditionalAudit }).(pulumi.StringPtrOutput)
}
func (o GetSecurityAssessmentSecurityFeaturesResultOutput) TargetsWithUnifiedAudit() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetSecurityAssessmentSecurityFeaturesResult) *string { return v.TargetsWithUnifiedAudit }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetSecurityAssessmentSecurityFeaturesResultOutput{})
}