/
inspectTemplate.go
190 lines (158 loc) · 7.71 KB
/
inspectTemplate.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v2
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
// Auto-naming is currently not supported for this resource.
type InspectTemplate struct {
pulumi.CustomResourceState
// The creation timestamp of an inspectTemplate.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// Short description (max 256 chars).
Description pulumi.StringOutput `pulumi:"description"`
// Display name (max 256 chars).
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The core content of the template. Configuration of the scanning process.
InspectConfig GooglePrivacyDlpV2InspectConfigResponseOutput `pulumi:"inspectConfig"`
Location pulumi.StringOutput `pulumi:"location"`
// The template name. The template will have one of the following formats: `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
Name pulumi.StringOutput `pulumi:"name"`
Project pulumi.StringOutput `pulumi:"project"`
// The last update timestamp of an inspectTemplate.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
}
// NewInspectTemplate registers a new resource with the given unique name, arguments, and options.
func NewInspectTemplate(ctx *pulumi.Context,
name string, args *InspectTemplateArgs, opts ...pulumi.ResourceOption) (*InspectTemplate, error) {
if args == nil {
args = &InspectTemplateArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"location",
"project",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource InspectTemplate
err := ctx.RegisterResource("google-native:dlp/v2:InspectTemplate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInspectTemplate gets an existing InspectTemplate resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetInspectTemplate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InspectTemplateState, opts ...pulumi.ResourceOption) (*InspectTemplate, error) {
var resource InspectTemplate
err := ctx.ReadResource("google-native:dlp/v2:InspectTemplate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InspectTemplate resources.
type inspectTemplateState struct {
}
type InspectTemplateState struct {
}
func (InspectTemplateState) ElementType() reflect.Type {
return reflect.TypeOf((*inspectTemplateState)(nil)).Elem()
}
type inspectTemplateArgs struct {
// Short description (max 256 chars).
Description *string `pulumi:"description"`
// Display name (max 256 chars).
DisplayName *string `pulumi:"displayName"`
// The core content of the template. Configuration of the scanning process.
InspectConfig *GooglePrivacyDlpV2InspectConfig `pulumi:"inspectConfig"`
// Deprecated. This field has no effect.
//
// Deprecated: Deprecated. This field has no effect.
Location *string `pulumi:"location"`
Project *string `pulumi:"project"`
// The template id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. Can be empty to allow the system to generate one.
TemplateId *string `pulumi:"templateId"`
}
// The set of arguments for constructing a InspectTemplate resource.
type InspectTemplateArgs struct {
// Short description (max 256 chars).
Description pulumi.StringPtrInput
// Display name (max 256 chars).
DisplayName pulumi.StringPtrInput
// The core content of the template. Configuration of the scanning process.
InspectConfig GooglePrivacyDlpV2InspectConfigPtrInput
// Deprecated. This field has no effect.
//
// Deprecated: Deprecated. This field has no effect.
Location pulumi.StringPtrInput
Project pulumi.StringPtrInput
// The template id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: `[a-zA-Z\d-_]+`. The maximum length is 100 characters. Can be empty to allow the system to generate one.
TemplateId pulumi.StringPtrInput
}
func (InspectTemplateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*inspectTemplateArgs)(nil)).Elem()
}
type InspectTemplateInput interface {
pulumi.Input
ToInspectTemplateOutput() InspectTemplateOutput
ToInspectTemplateOutputWithContext(ctx context.Context) InspectTemplateOutput
}
func (*InspectTemplate) ElementType() reflect.Type {
return reflect.TypeOf((**InspectTemplate)(nil)).Elem()
}
func (i *InspectTemplate) ToInspectTemplateOutput() InspectTemplateOutput {
return i.ToInspectTemplateOutputWithContext(context.Background())
}
func (i *InspectTemplate) ToInspectTemplateOutputWithContext(ctx context.Context) InspectTemplateOutput {
return pulumi.ToOutputWithContext(ctx, i).(InspectTemplateOutput)
}
type InspectTemplateOutput struct{ *pulumi.OutputState }
func (InspectTemplateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InspectTemplate)(nil)).Elem()
}
func (o InspectTemplateOutput) ToInspectTemplateOutput() InspectTemplateOutput {
return o
}
func (o InspectTemplateOutput) ToInspectTemplateOutputWithContext(ctx context.Context) InspectTemplateOutput {
return o
}
// The creation timestamp of an inspectTemplate.
func (o InspectTemplateOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *InspectTemplate) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// Short description (max 256 chars).
func (o InspectTemplateOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *InspectTemplate) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// Display name (max 256 chars).
func (o InspectTemplateOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *InspectTemplate) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The core content of the template. Configuration of the scanning process.
func (o InspectTemplateOutput) InspectConfig() GooglePrivacyDlpV2InspectConfigResponseOutput {
return o.ApplyT(func(v *InspectTemplate) GooglePrivacyDlpV2InspectConfigResponseOutput { return v.InspectConfig }).(GooglePrivacyDlpV2InspectConfigResponseOutput)
}
func (o InspectTemplateOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *InspectTemplate) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The template name. The template will have one of the following formats: `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
func (o InspectTemplateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *InspectTemplate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o InspectTemplateOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *InspectTemplate) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// The last update timestamp of an inspectTemplate.
func (o InspectTemplateOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *InspectTemplate) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InspectTemplateInput)(nil)).Elem(), &InspectTemplate{})
pulumi.RegisterOutputType(InspectTemplateOutput{})
}