/
metadataStore.go
191 lines (158 loc) · 9.28 KB
/
metadataStore.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
// 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 v1beta1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Initializes a MetadataStore, including allocation of resources.
// Auto-naming is currently not supported for this resource.
type MetadataStore struct {
pulumi.CustomResourceState
// Timestamp when this MetadataStore was created.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// Description of the MetadataStore.
Description pulumi.StringOutput `pulumi:"description"`
// Customer-managed encryption key spec for a Metadata Store. If set, this Metadata Store and all sub-resources of this Metadata Store are secured using this key.
EncryptionSpec GoogleCloudAiplatformV1beta1EncryptionSpecResponseOutput `pulumi:"encryptionSpec"`
Location pulumi.StringOutput `pulumi:"location"`
// The {metadatastore} portion of the resource name with the format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If not provided, the MetadataStore's ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are `/a-z-/`. Must be unique across all MetadataStores in the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting MetadataStore.)
MetadataStoreId pulumi.StringPtrOutput `pulumi:"metadataStoreId"`
// The resource name of the MetadataStore instance.
Name pulumi.StringOutput `pulumi:"name"`
Project pulumi.StringOutput `pulumi:"project"`
// State information of the MetadataStore.
State GoogleCloudAiplatformV1beta1MetadataStoreMetadataStoreStateResponseOutput `pulumi:"state"`
// Timestamp when this MetadataStore was last updated.
UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
}
// NewMetadataStore registers a new resource with the given unique name, arguments, and options.
func NewMetadataStore(ctx *pulumi.Context,
name string, args *MetadataStoreArgs, opts ...pulumi.ResourceOption) (*MetadataStore, error) {
if args == nil {
args = &MetadataStoreArgs{}
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"location",
"project",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource MetadataStore
err := ctx.RegisterResource("google-native:aiplatform/v1beta1:MetadataStore", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMetadataStore gets an existing MetadataStore 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 GetMetadataStore(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MetadataStoreState, opts ...pulumi.ResourceOption) (*MetadataStore, error) {
var resource MetadataStore
err := ctx.ReadResource("google-native:aiplatform/v1beta1:MetadataStore", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MetadataStore resources.
type metadataStoreState struct {
}
type MetadataStoreState struct {
}
func (MetadataStoreState) ElementType() reflect.Type {
return reflect.TypeOf((*metadataStoreState)(nil)).Elem()
}
type metadataStoreArgs struct {
// Description of the MetadataStore.
Description *string `pulumi:"description"`
// Customer-managed encryption key spec for a Metadata Store. If set, this Metadata Store and all sub-resources of this Metadata Store are secured using this key.
EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `pulumi:"encryptionSpec"`
Location *string `pulumi:"location"`
// The {metadatastore} portion of the resource name with the format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If not provided, the MetadataStore's ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are `/a-z-/`. Must be unique across all MetadataStores in the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting MetadataStore.)
MetadataStoreId *string `pulumi:"metadataStoreId"`
Project *string `pulumi:"project"`
}
// The set of arguments for constructing a MetadataStore resource.
type MetadataStoreArgs struct {
// Description of the MetadataStore.
Description pulumi.StringPtrInput
// Customer-managed encryption key spec for a Metadata Store. If set, this Metadata Store and all sub-resources of this Metadata Store are secured using this key.
EncryptionSpec GoogleCloudAiplatformV1beta1EncryptionSpecPtrInput
Location pulumi.StringPtrInput
// The {metadatastore} portion of the resource name with the format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If not provided, the MetadataStore's ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are `/a-z-/`. Must be unique across all MetadataStores in the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting MetadataStore.)
MetadataStoreId pulumi.StringPtrInput
Project pulumi.StringPtrInput
}
func (MetadataStoreArgs) ElementType() reflect.Type {
return reflect.TypeOf((*metadataStoreArgs)(nil)).Elem()
}
type MetadataStoreInput interface {
pulumi.Input
ToMetadataStoreOutput() MetadataStoreOutput
ToMetadataStoreOutputWithContext(ctx context.Context) MetadataStoreOutput
}
func (*MetadataStore) ElementType() reflect.Type {
return reflect.TypeOf((**MetadataStore)(nil)).Elem()
}
func (i *MetadataStore) ToMetadataStoreOutput() MetadataStoreOutput {
return i.ToMetadataStoreOutputWithContext(context.Background())
}
func (i *MetadataStore) ToMetadataStoreOutputWithContext(ctx context.Context) MetadataStoreOutput {
return pulumi.ToOutputWithContext(ctx, i).(MetadataStoreOutput)
}
type MetadataStoreOutput struct{ *pulumi.OutputState }
func (MetadataStoreOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MetadataStore)(nil)).Elem()
}
func (o MetadataStoreOutput) ToMetadataStoreOutput() MetadataStoreOutput {
return o
}
func (o MetadataStoreOutput) ToMetadataStoreOutputWithContext(ctx context.Context) MetadataStoreOutput {
return o
}
// Timestamp when this MetadataStore was created.
func (o MetadataStoreOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *MetadataStore) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// Description of the MetadataStore.
func (o MetadataStoreOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *MetadataStore) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// Customer-managed encryption key spec for a Metadata Store. If set, this Metadata Store and all sub-resources of this Metadata Store are secured using this key.
func (o MetadataStoreOutput) EncryptionSpec() GoogleCloudAiplatformV1beta1EncryptionSpecResponseOutput {
return o.ApplyT(func(v *MetadataStore) GoogleCloudAiplatformV1beta1EncryptionSpecResponseOutput {
return v.EncryptionSpec
}).(GoogleCloudAiplatformV1beta1EncryptionSpecResponseOutput)
}
func (o MetadataStoreOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *MetadataStore) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The {metadatastore} portion of the resource name with the format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If not provided, the MetadataStore's ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are `/a-z-/`. Must be unique across all MetadataStores in the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting MetadataStore.)
func (o MetadataStoreOutput) MetadataStoreId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MetadataStore) pulumi.StringPtrOutput { return v.MetadataStoreId }).(pulumi.StringPtrOutput)
}
// The resource name of the MetadataStore instance.
func (o MetadataStoreOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MetadataStore) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o MetadataStoreOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *MetadataStore) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// State information of the MetadataStore.
func (o MetadataStoreOutput) State() GoogleCloudAiplatformV1beta1MetadataStoreMetadataStoreStateResponseOutput {
return o.ApplyT(func(v *MetadataStore) GoogleCloudAiplatformV1beta1MetadataStoreMetadataStoreStateResponseOutput {
return v.State
}).(GoogleCloudAiplatformV1beta1MetadataStoreMetadataStoreStateResponseOutput)
}
// Timestamp when this MetadataStore was last updated.
func (o MetadataStoreOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v *MetadataStore) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MetadataStoreInput)(nil)).Elem(), &MetadataStore{})
pulumi.RegisterOutputType(MetadataStoreOutput{})
}