generated from pulumi/pulumi-tf-provider-boilerplate
/
getMaskingAnalytic.go
166 lines (145 loc) · 6.72 KB
/
getMaskingAnalytic.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
// 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 Masking Analytic resource in Oracle Cloud Infrastructure Data Safe service.
//
// Gets consolidated masking analytics data based on the specified query parameters.
// If CompartmentIdInSubtreeQueryParam is specified as true, the behaviour
// is equivalent to accessLevel "ACCESSIBLE" by default.
//
// ## 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.GetMaskingAnalytic(ctx, &datasafe.GetMaskingAnalyticArgs{
// CompartmentId: compartmentId,
// CompartmentIdInSubtree: pulumi.BoolRef(maskingAnalyticCompartmentIdInSubtree),
// GroupBy: pulumi.StringRef(maskingAnalyticGroupBy),
// MaskingPolicyId: pulumi.StringRef(testMaskingPolicy.Id),
// TargetId: pulumi.StringRef(testTarget.Id),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetMaskingAnalytic(ctx *pulumi.Context, args *GetMaskingAnalyticArgs, opts ...pulumi.InvokeOption) (*GetMaskingAnalyticResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetMaskingAnalyticResult
err := ctx.Invoke("oci:DataSafe/getMaskingAnalytic:getMaskingAnalytic", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getMaskingAnalytic.
type GetMaskingAnalyticArgs struct {
// 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"`
// Attribute by which the masking analytics data should be grouped.
GroupBy *string `pulumi:"groupBy"`
// A filter to return only the resources that match the specified masking policy OCID.
MaskingPolicyId *string `pulumi:"maskingPolicyId"`
// A filter to return only items related to a specific target OCID.
TargetId *string `pulumi:"targetId"`
}
// A collection of values returned by getMaskingAnalytic.
type GetMaskingAnalyticResult struct {
CompartmentId string `pulumi:"compartmentId"`
CompartmentIdInSubtree *bool `pulumi:"compartmentIdInSubtree"`
GroupBy *string `pulumi:"groupBy"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An array of masking analytics summary objects.
Items []GetMaskingAnalyticItem `pulumi:"items"`
MaskingPolicyId *string `pulumi:"maskingPolicyId"`
// The OCID of the target database.
TargetId *string `pulumi:"targetId"`
}
func GetMaskingAnalyticOutput(ctx *pulumi.Context, args GetMaskingAnalyticOutputArgs, opts ...pulumi.InvokeOption) GetMaskingAnalyticResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetMaskingAnalyticResult, error) {
args := v.(GetMaskingAnalyticArgs)
r, err := GetMaskingAnalytic(ctx, &args, opts...)
var s GetMaskingAnalyticResult
if r != nil {
s = *r
}
return s, err
}).(GetMaskingAnalyticResultOutput)
}
// A collection of arguments for invoking getMaskingAnalytic.
type GetMaskingAnalyticOutputArgs struct {
// 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"`
// Attribute by which the masking analytics data should be grouped.
GroupBy pulumi.StringPtrInput `pulumi:"groupBy"`
// A filter to return only the resources that match the specified masking policy OCID.
MaskingPolicyId pulumi.StringPtrInput `pulumi:"maskingPolicyId"`
// A filter to return only items related to a specific target OCID.
TargetId pulumi.StringPtrInput `pulumi:"targetId"`
}
func (GetMaskingAnalyticOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetMaskingAnalyticArgs)(nil)).Elem()
}
// A collection of values returned by getMaskingAnalytic.
type GetMaskingAnalyticResultOutput struct{ *pulumi.OutputState }
func (GetMaskingAnalyticResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetMaskingAnalyticResult)(nil)).Elem()
}
func (o GetMaskingAnalyticResultOutput) ToGetMaskingAnalyticResultOutput() GetMaskingAnalyticResultOutput {
return o
}
func (o GetMaskingAnalyticResultOutput) ToGetMaskingAnalyticResultOutputWithContext(ctx context.Context) GetMaskingAnalyticResultOutput {
return o
}
func (o GetMaskingAnalyticResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v GetMaskingAnalyticResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
func (o GetMaskingAnalyticResultOutput) CompartmentIdInSubtree() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetMaskingAnalyticResult) *bool { return v.CompartmentIdInSubtree }).(pulumi.BoolPtrOutput)
}
func (o GetMaskingAnalyticResultOutput) GroupBy() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetMaskingAnalyticResult) *string { return v.GroupBy }).(pulumi.StringPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetMaskingAnalyticResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetMaskingAnalyticResult) string { return v.Id }).(pulumi.StringOutput)
}
// An array of masking analytics summary objects.
func (o GetMaskingAnalyticResultOutput) Items() GetMaskingAnalyticItemArrayOutput {
return o.ApplyT(func(v GetMaskingAnalyticResult) []GetMaskingAnalyticItem { return v.Items }).(GetMaskingAnalyticItemArrayOutput)
}
func (o GetMaskingAnalyticResultOutput) MaskingPolicyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetMaskingAnalyticResult) *string { return v.MaskingPolicyId }).(pulumi.StringPtrOutput)
}
// The OCID of the target database.
func (o GetMaskingAnalyticResultOutput) TargetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetMaskingAnalyticResult) *string { return v.TargetId }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetMaskingAnalyticResultOutput{})
}