/
aiFeatureStore.go
371 lines (310 loc) · 14.1 KB
/
aiFeatureStore.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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package vertex
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Import
//
// Featurestore can be imported using any of these accepted formats
//
// ```sh
// $ pulumi import gcp:vertex/aiFeatureStore:AiFeatureStore default projects/{{project}}/locations/{{region}}/featurestores/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:vertex/aiFeatureStore:AiFeatureStore default {{project}}/{{region}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:vertex/aiFeatureStore:AiFeatureStore default {{region}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:vertex/aiFeatureStore:AiFeatureStore default {{name}}
// ```
type AiFeatureStore struct {
pulumi.CustomResourceState
// The timestamp of when the featurestore was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to
// nine fractional digits.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// Used to perform consistent read-modify-write updates.
Etag pulumi.StringOutput `pulumi:"etag"`
// If set to true, any EntityTypes and Features for this Featurestore will also be deleted
ForceDestroy pulumi.BoolPtrOutput `pulumi:"forceDestroy"`
// A set of key/value label pairs to assign to this Featurestore.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// The name of the Featurestore. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number.
Name pulumi.StringOutput `pulumi:"name"`
// Config for online serving resources.
// Structure is documented below.
OnlineServingConfig AiFeatureStoreOnlineServingConfigPtrOutput `pulumi:"onlineServingConfig"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// The region of the dataset. eg us-central1
Region pulumi.StringOutput `pulumi:"region"`
// The timestamp of when the featurestore was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
// to nine fractional digits.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
}
// NewAiFeatureStore registers a new resource with the given unique name, arguments, and options.
func NewAiFeatureStore(ctx *pulumi.Context,
name string, args *AiFeatureStoreArgs, opts ...pulumi.ResourceOption) (*AiFeatureStore, error) {
if args == nil {
args = &AiFeatureStoreArgs{}
}
var resource AiFeatureStore
err := ctx.RegisterResource("gcp:vertex/aiFeatureStore:AiFeatureStore", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAiFeatureStore gets an existing AiFeatureStore 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 GetAiFeatureStore(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AiFeatureStoreState, opts ...pulumi.ResourceOption) (*AiFeatureStore, error) {
var resource AiFeatureStore
err := ctx.ReadResource("gcp:vertex/aiFeatureStore:AiFeatureStore", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AiFeatureStore resources.
type aiFeatureStoreState struct {
// The timestamp of when the featurestore was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to
// nine fractional digits.
CreateTime *string `pulumi:"createTime"`
// Used to perform consistent read-modify-write updates.
Etag *string `pulumi:"etag"`
// If set to true, any EntityTypes and Features for this Featurestore will also be deleted
ForceDestroy *bool `pulumi:"forceDestroy"`
// A set of key/value label pairs to assign to this Featurestore.
Labels map[string]string `pulumi:"labels"`
// The name of the Featurestore. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number.
Name *string `pulumi:"name"`
// Config for online serving resources.
// Structure is documented below.
OnlineServingConfig *AiFeatureStoreOnlineServingConfig `pulumi:"onlineServingConfig"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// The region of the dataset. eg us-central1
Region *string `pulumi:"region"`
// The timestamp of when the featurestore was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
// to nine fractional digits.
UpdateTime *string `pulumi:"updateTime"`
}
type AiFeatureStoreState struct {
// The timestamp of when the featurestore was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to
// nine fractional digits.
CreateTime pulumi.StringPtrInput
// Used to perform consistent read-modify-write updates.
Etag pulumi.StringPtrInput
// If set to true, any EntityTypes and Features for this Featurestore will also be deleted
ForceDestroy pulumi.BoolPtrInput
// A set of key/value label pairs to assign to this Featurestore.
Labels pulumi.StringMapInput
// The name of the Featurestore. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number.
Name pulumi.StringPtrInput
// Config for online serving resources.
// Structure is documented below.
OnlineServingConfig AiFeatureStoreOnlineServingConfigPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// The region of the dataset. eg us-central1
Region pulumi.StringPtrInput
// The timestamp of when the featurestore was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
// to nine fractional digits.
UpdateTime pulumi.StringPtrInput
}
func (AiFeatureStoreState) ElementType() reflect.Type {
return reflect.TypeOf((*aiFeatureStoreState)(nil)).Elem()
}
type aiFeatureStoreArgs struct {
// If set to true, any EntityTypes and Features for this Featurestore will also be deleted
ForceDestroy *bool `pulumi:"forceDestroy"`
// A set of key/value label pairs to assign to this Featurestore.
Labels map[string]string `pulumi:"labels"`
// The name of the Featurestore. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number.
Name *string `pulumi:"name"`
// Config for online serving resources.
// Structure is documented below.
OnlineServingConfig *AiFeatureStoreOnlineServingConfig `pulumi:"onlineServingConfig"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// The region of the dataset. eg us-central1
Region *string `pulumi:"region"`
}
// The set of arguments for constructing a AiFeatureStore resource.
type AiFeatureStoreArgs struct {
// If set to true, any EntityTypes and Features for this Featurestore will also be deleted
ForceDestroy pulumi.BoolPtrInput
// A set of key/value label pairs to assign to this Featurestore.
Labels pulumi.StringMapInput
// The name of the Featurestore. This value may be up to 60 characters, and valid characters are [a-z0-9_]. The first character cannot be a number.
Name pulumi.StringPtrInput
// Config for online serving resources.
// Structure is documented below.
OnlineServingConfig AiFeatureStoreOnlineServingConfigPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// The region of the dataset. eg us-central1
Region pulumi.StringPtrInput
}
func (AiFeatureStoreArgs) ElementType() reflect.Type {
return reflect.TypeOf((*aiFeatureStoreArgs)(nil)).Elem()
}
type AiFeatureStoreInput interface {
pulumi.Input
ToAiFeatureStoreOutput() AiFeatureStoreOutput
ToAiFeatureStoreOutputWithContext(ctx context.Context) AiFeatureStoreOutput
}
func (*AiFeatureStore) ElementType() reflect.Type {
return reflect.TypeOf((*AiFeatureStore)(nil))
}
func (i *AiFeatureStore) ToAiFeatureStoreOutput() AiFeatureStoreOutput {
return i.ToAiFeatureStoreOutputWithContext(context.Background())
}
func (i *AiFeatureStore) ToAiFeatureStoreOutputWithContext(ctx context.Context) AiFeatureStoreOutput {
return pulumi.ToOutputWithContext(ctx, i).(AiFeatureStoreOutput)
}
func (i *AiFeatureStore) ToAiFeatureStorePtrOutput() AiFeatureStorePtrOutput {
return i.ToAiFeatureStorePtrOutputWithContext(context.Background())
}
func (i *AiFeatureStore) ToAiFeatureStorePtrOutputWithContext(ctx context.Context) AiFeatureStorePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AiFeatureStorePtrOutput)
}
type AiFeatureStorePtrInput interface {
pulumi.Input
ToAiFeatureStorePtrOutput() AiFeatureStorePtrOutput
ToAiFeatureStorePtrOutputWithContext(ctx context.Context) AiFeatureStorePtrOutput
}
type aiFeatureStorePtrType AiFeatureStoreArgs
func (*aiFeatureStorePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AiFeatureStore)(nil))
}
func (i *aiFeatureStorePtrType) ToAiFeatureStorePtrOutput() AiFeatureStorePtrOutput {
return i.ToAiFeatureStorePtrOutputWithContext(context.Background())
}
func (i *aiFeatureStorePtrType) ToAiFeatureStorePtrOutputWithContext(ctx context.Context) AiFeatureStorePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AiFeatureStorePtrOutput)
}
// AiFeatureStoreArrayInput is an input type that accepts AiFeatureStoreArray and AiFeatureStoreArrayOutput values.
// You can construct a concrete instance of `AiFeatureStoreArrayInput` via:
//
// AiFeatureStoreArray{ AiFeatureStoreArgs{...} }
type AiFeatureStoreArrayInput interface {
pulumi.Input
ToAiFeatureStoreArrayOutput() AiFeatureStoreArrayOutput
ToAiFeatureStoreArrayOutputWithContext(context.Context) AiFeatureStoreArrayOutput
}
type AiFeatureStoreArray []AiFeatureStoreInput
func (AiFeatureStoreArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AiFeatureStore)(nil)).Elem()
}
func (i AiFeatureStoreArray) ToAiFeatureStoreArrayOutput() AiFeatureStoreArrayOutput {
return i.ToAiFeatureStoreArrayOutputWithContext(context.Background())
}
func (i AiFeatureStoreArray) ToAiFeatureStoreArrayOutputWithContext(ctx context.Context) AiFeatureStoreArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AiFeatureStoreArrayOutput)
}
// AiFeatureStoreMapInput is an input type that accepts AiFeatureStoreMap and AiFeatureStoreMapOutput values.
// You can construct a concrete instance of `AiFeatureStoreMapInput` via:
//
// AiFeatureStoreMap{ "key": AiFeatureStoreArgs{...} }
type AiFeatureStoreMapInput interface {
pulumi.Input
ToAiFeatureStoreMapOutput() AiFeatureStoreMapOutput
ToAiFeatureStoreMapOutputWithContext(context.Context) AiFeatureStoreMapOutput
}
type AiFeatureStoreMap map[string]AiFeatureStoreInput
func (AiFeatureStoreMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AiFeatureStore)(nil)).Elem()
}
func (i AiFeatureStoreMap) ToAiFeatureStoreMapOutput() AiFeatureStoreMapOutput {
return i.ToAiFeatureStoreMapOutputWithContext(context.Background())
}
func (i AiFeatureStoreMap) ToAiFeatureStoreMapOutputWithContext(ctx context.Context) AiFeatureStoreMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AiFeatureStoreMapOutput)
}
type AiFeatureStoreOutput struct{ *pulumi.OutputState }
func (AiFeatureStoreOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AiFeatureStore)(nil))
}
func (o AiFeatureStoreOutput) ToAiFeatureStoreOutput() AiFeatureStoreOutput {
return o
}
func (o AiFeatureStoreOutput) ToAiFeatureStoreOutputWithContext(ctx context.Context) AiFeatureStoreOutput {
return o
}
func (o AiFeatureStoreOutput) ToAiFeatureStorePtrOutput() AiFeatureStorePtrOutput {
return o.ToAiFeatureStorePtrOutputWithContext(context.Background())
}
func (o AiFeatureStoreOutput) ToAiFeatureStorePtrOutputWithContext(ctx context.Context) AiFeatureStorePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AiFeatureStore) *AiFeatureStore {
return &v
}).(AiFeatureStorePtrOutput)
}
type AiFeatureStorePtrOutput struct{ *pulumi.OutputState }
func (AiFeatureStorePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AiFeatureStore)(nil))
}
func (o AiFeatureStorePtrOutput) ToAiFeatureStorePtrOutput() AiFeatureStorePtrOutput {
return o
}
func (o AiFeatureStorePtrOutput) ToAiFeatureStorePtrOutputWithContext(ctx context.Context) AiFeatureStorePtrOutput {
return o
}
func (o AiFeatureStorePtrOutput) Elem() AiFeatureStoreOutput {
return o.ApplyT(func(v *AiFeatureStore) AiFeatureStore {
if v != nil {
return *v
}
var ret AiFeatureStore
return ret
}).(AiFeatureStoreOutput)
}
type AiFeatureStoreArrayOutput struct{ *pulumi.OutputState }
func (AiFeatureStoreArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AiFeatureStore)(nil))
}
func (o AiFeatureStoreArrayOutput) ToAiFeatureStoreArrayOutput() AiFeatureStoreArrayOutput {
return o
}
func (o AiFeatureStoreArrayOutput) ToAiFeatureStoreArrayOutputWithContext(ctx context.Context) AiFeatureStoreArrayOutput {
return o
}
func (o AiFeatureStoreArrayOutput) Index(i pulumi.IntInput) AiFeatureStoreOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AiFeatureStore {
return vs[0].([]AiFeatureStore)[vs[1].(int)]
}).(AiFeatureStoreOutput)
}
type AiFeatureStoreMapOutput struct{ *pulumi.OutputState }
func (AiFeatureStoreMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]AiFeatureStore)(nil))
}
func (o AiFeatureStoreMapOutput) ToAiFeatureStoreMapOutput() AiFeatureStoreMapOutput {
return o
}
func (o AiFeatureStoreMapOutput) ToAiFeatureStoreMapOutputWithContext(ctx context.Context) AiFeatureStoreMapOutput {
return o
}
func (o AiFeatureStoreMapOutput) MapIndex(k pulumi.StringInput) AiFeatureStoreOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) AiFeatureStore {
return vs[0].(map[string]AiFeatureStore)[vs[1].(string)]
}).(AiFeatureStoreOutput)
}
func init() {
pulumi.RegisterOutputType(AiFeatureStoreOutput{})
pulumi.RegisterOutputType(AiFeatureStorePtrOutput{})
pulumi.RegisterOutputType(AiFeatureStoreArrayOutput{})
pulumi.RegisterOutputType(AiFeatureStoreMapOutput{})
}