generated from pulumi/pulumi-tf-provider-boilerplate
/
getSensitiveType.go
248 lines (213 loc) · 12.3 KB
/
getSensitiveType.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
// 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 details about a specific Sensitive Type resource in Oracle Cloud Infrastructure Data Safe service.
//
// Gets the details of the specified sensitive type.
//
// ## 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.GetSensitiveType(ctx, &datasafe.GetSensitiveTypeArgs{
// SensitiveTypeId: testSensitiveTypeOciDataSafeSensitiveType.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupSensitiveType(ctx *pulumi.Context, args *LookupSensitiveTypeArgs, opts ...pulumi.InvokeOption) (*LookupSensitiveTypeResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSensitiveTypeResult
err := ctx.Invoke("oci:DataSafe/getSensitiveType:getSensitiveType", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSensitiveType.
type LookupSensitiveTypeArgs struct {
// The OCID of the sensitive type.
SensitiveTypeId string `pulumi:"sensitiveTypeId"`
}
// A collection of values returned by getSensitiveType.
type LookupSensitiveTypeResult struct {
// A regular expression to be used by data discovery for matching column comments.
CommentPattern string `pulumi:"commentPattern"`
// The OCID of the compartment that contains the sensitive type.
CompartmentId string `pulumi:"compartmentId"`
// A regular expression to be used by data discovery for matching column data values.
DataPattern string `pulumi:"dataPattern"`
// The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type.
DefaultMaskingFormatId string `pulumi:"defaultMaskingFormatId"`
// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Operations.CostCenter": "42"}`
DefinedTags map[string]interface{} `pulumi:"definedTags"`
// The description of the sensitive type.
Description string `pulumi:"description"`
// The display name of the sensitive type.
DisplayName string `pulumi:"displayName"`
// The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for grouping similar sensitive types.
EntityType string `pulumi:"entityType"`
// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}`
FreeformTags map[string]interface{} `pulumi:"freeformTags"`
// The OCID of the sensitive type.
Id string `pulumi:"id"`
// Specifies whether the sensitive type is common. Common sensitive types belong to library sensitive types which are frequently used to perform sensitive data discovery.
IsCommon bool `pulumi:"isCommon"`
// A regular expression to be used by data discovery for matching column names.
NamePattern string `pulumi:"namePattern"`
// The OCID of the parent sensitive category.
ParentCategoryId string `pulumi:"parentCategoryId"`
// The search type indicating how the column name, comment and data patterns should be used by data discovery. [Learn more](https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-types.html#GUID-1D1AD98E-B93F-4FF2-80AE-CB7D8A14F6CC).
SearchType string `pulumi:"searchType"`
SensitiveTypeId string `pulumi:"sensitiveTypeId"`
// The short name of the sensitive type.
ShortName string `pulumi:"shortName"`
// Specifies whether the sensitive type is user-defined or predefined.
Source string `pulumi:"source"`
// The current state of the sensitive type.
State string `pulumi:"state"`
// System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}`
SystemTags map[string]interface{} `pulumi:"systemTags"`
// The date and time the sensitive type was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339).
TimeCreated string `pulumi:"timeCreated"`
// The date and time the sensitive type was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339).
TimeUpdated string `pulumi:"timeUpdated"`
}
func LookupSensitiveTypeOutput(ctx *pulumi.Context, args LookupSensitiveTypeOutputArgs, opts ...pulumi.InvokeOption) LookupSensitiveTypeResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupSensitiveTypeResult, error) {
args := v.(LookupSensitiveTypeArgs)
r, err := LookupSensitiveType(ctx, &args, opts...)
var s LookupSensitiveTypeResult
if r != nil {
s = *r
}
return s, err
}).(LookupSensitiveTypeResultOutput)
}
// A collection of arguments for invoking getSensitiveType.
type LookupSensitiveTypeOutputArgs struct {
// The OCID of the sensitive type.
SensitiveTypeId pulumi.StringInput `pulumi:"sensitiveTypeId"`
}
func (LookupSensitiveTypeOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSensitiveTypeArgs)(nil)).Elem()
}
// A collection of values returned by getSensitiveType.
type LookupSensitiveTypeResultOutput struct{ *pulumi.OutputState }
func (LookupSensitiveTypeResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSensitiveTypeResult)(nil)).Elem()
}
func (o LookupSensitiveTypeResultOutput) ToLookupSensitiveTypeResultOutput() LookupSensitiveTypeResultOutput {
return o
}
func (o LookupSensitiveTypeResultOutput) ToLookupSensitiveTypeResultOutputWithContext(ctx context.Context) LookupSensitiveTypeResultOutput {
return o
}
// A regular expression to be used by data discovery for matching column comments.
func (o LookupSensitiveTypeResultOutput) CommentPattern() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.CommentPattern }).(pulumi.StringOutput)
}
// The OCID of the compartment that contains the sensitive type.
func (o LookupSensitiveTypeResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
// A regular expression to be used by data discovery for matching column data values.
func (o LookupSensitiveTypeResultOutput) DataPattern() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.DataPattern }).(pulumi.StringOutput)
}
// The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type.
func (o LookupSensitiveTypeResultOutput) DefaultMaskingFormatId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.DefaultMaskingFormatId }).(pulumi.StringOutput)
}
// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Operations.CostCenter": "42"}`
func (o LookupSensitiveTypeResultOutput) DefinedTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) map[string]interface{} { return v.DefinedTags }).(pulumi.MapOutput)
}
// The description of the sensitive type.
func (o LookupSensitiveTypeResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.Description }).(pulumi.StringOutput)
}
// The display name of the sensitive type.
func (o LookupSensitiveTypeResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for grouping similar sensitive types.
func (o LookupSensitiveTypeResultOutput) EntityType() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.EntityType }).(pulumi.StringOutput)
}
// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}`
func (o LookupSensitiveTypeResultOutput) FreeformTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) map[string]interface{} { return v.FreeformTags }).(pulumi.MapOutput)
}
// The OCID of the sensitive type.
func (o LookupSensitiveTypeResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.Id }).(pulumi.StringOutput)
}
// Specifies whether the sensitive type is common. Common sensitive types belong to library sensitive types which are frequently used to perform sensitive data discovery.
func (o LookupSensitiveTypeResultOutput) IsCommon() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) bool { return v.IsCommon }).(pulumi.BoolOutput)
}
// A regular expression to be used by data discovery for matching column names.
func (o LookupSensitiveTypeResultOutput) NamePattern() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.NamePattern }).(pulumi.StringOutput)
}
// The OCID of the parent sensitive category.
func (o LookupSensitiveTypeResultOutput) ParentCategoryId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.ParentCategoryId }).(pulumi.StringOutput)
}
// The search type indicating how the column name, comment and data patterns should be used by data discovery. [Learn more](https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-types.html#GUID-1D1AD98E-B93F-4FF2-80AE-CB7D8A14F6CC).
func (o LookupSensitiveTypeResultOutput) SearchType() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.SearchType }).(pulumi.StringOutput)
}
func (o LookupSensitiveTypeResultOutput) SensitiveTypeId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.SensitiveTypeId }).(pulumi.StringOutput)
}
// The short name of the sensitive type.
func (o LookupSensitiveTypeResultOutput) ShortName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.ShortName }).(pulumi.StringOutput)
}
// Specifies whether the sensitive type is user-defined or predefined.
func (o LookupSensitiveTypeResultOutput) Source() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.Source }).(pulumi.StringOutput)
}
// The current state of the sensitive type.
func (o LookupSensitiveTypeResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.State }).(pulumi.StringOutput)
}
// System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: `{"orcl-cloud.free-tier-retained": "true"}`
func (o LookupSensitiveTypeResultOutput) SystemTags() pulumi.MapOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) map[string]interface{} { return v.SystemTags }).(pulumi.MapOutput)
}
// The date and time the sensitive type was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339).
func (o LookupSensitiveTypeResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The date and time the sensitive type was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339).
func (o LookupSensitiveTypeResultOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v LookupSensitiveTypeResult) string { return v.TimeUpdated }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSensitiveTypeResultOutput{})
}