/
datasetKustoDatabase.go
310 lines (250 loc) · 13.1 KB
/
datasetKustoDatabase.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
// *** 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 datashare
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Manages a Data Share Kusto Database Dataset.
//
// ## Import
//
// Data Share Kusto Database Datasets can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:datashare/datasetKustoDatabase:DatasetKustoDatabase example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1
// ```
type DatasetKustoDatabase struct {
pulumi.CustomResourceState
// The name of the Data Share Dataset.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The location of the Kusto Cluster.
KustoClusterLocation pulumi.StringOutput `pulumi:"kustoClusterLocation"`
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId pulumi.StringOutput `pulumi:"kustoDatabaseId"`
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId pulumi.StringOutput `pulumi:"shareId"`
}
// NewDatasetKustoDatabase registers a new resource with the given unique name, arguments, and options.
func NewDatasetKustoDatabase(ctx *pulumi.Context,
name string, args *DatasetKustoDatabaseArgs, opts ...pulumi.ResourceOption) (*DatasetKustoDatabase, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.KustoDatabaseId == nil {
return nil, errors.New("invalid value for required argument 'KustoDatabaseId'")
}
if args.ShareId == nil {
return nil, errors.New("invalid value for required argument 'ShareId'")
}
var resource DatasetKustoDatabase
err := ctx.RegisterResource("azure:datashare/datasetKustoDatabase:DatasetKustoDatabase", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatasetKustoDatabase gets an existing DatasetKustoDatabase 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 GetDatasetKustoDatabase(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatasetKustoDatabaseState, opts ...pulumi.ResourceOption) (*DatasetKustoDatabase, error) {
var resource DatasetKustoDatabase
err := ctx.ReadResource("azure:datashare/datasetKustoDatabase:DatasetKustoDatabase", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatasetKustoDatabase resources.
type datasetKustoDatabaseState struct {
// The name of the Data Share Dataset.
DisplayName *string `pulumi:"displayName"`
// The location of the Kusto Cluster.
KustoClusterLocation *string `pulumi:"kustoClusterLocation"`
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId *string `pulumi:"kustoDatabaseId"`
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name *string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId *string `pulumi:"shareId"`
}
type DatasetKustoDatabaseState struct {
// The name of the Data Share Dataset.
DisplayName pulumi.StringPtrInput
// The location of the Kusto Cluster.
KustoClusterLocation pulumi.StringPtrInput
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId pulumi.StringPtrInput
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name pulumi.StringPtrInput
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId pulumi.StringPtrInput
}
func (DatasetKustoDatabaseState) ElementType() reflect.Type {
return reflect.TypeOf((*datasetKustoDatabaseState)(nil)).Elem()
}
type datasetKustoDatabaseArgs struct {
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId string `pulumi:"kustoDatabaseId"`
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name *string `pulumi:"name"`
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId string `pulumi:"shareId"`
}
// The set of arguments for constructing a DatasetKustoDatabase resource.
type DatasetKustoDatabaseArgs struct {
// The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
KustoDatabaseId pulumi.StringInput
// The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created.
Name pulumi.StringPtrInput
// The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created.
ShareId pulumi.StringInput
}
func (DatasetKustoDatabaseArgs) ElementType() reflect.Type {
return reflect.TypeOf((*datasetKustoDatabaseArgs)(nil)).Elem()
}
type DatasetKustoDatabaseInput interface {
pulumi.Input
ToDatasetKustoDatabaseOutput() DatasetKustoDatabaseOutput
ToDatasetKustoDatabaseOutputWithContext(ctx context.Context) DatasetKustoDatabaseOutput
}
func (*DatasetKustoDatabase) ElementType() reflect.Type {
return reflect.TypeOf((*DatasetKustoDatabase)(nil))
}
func (i *DatasetKustoDatabase) ToDatasetKustoDatabaseOutput() DatasetKustoDatabaseOutput {
return i.ToDatasetKustoDatabaseOutputWithContext(context.Background())
}
func (i *DatasetKustoDatabase) ToDatasetKustoDatabaseOutputWithContext(ctx context.Context) DatasetKustoDatabaseOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoDatabaseOutput)
}
func (i *DatasetKustoDatabase) ToDatasetKustoDatabasePtrOutput() DatasetKustoDatabasePtrOutput {
return i.ToDatasetKustoDatabasePtrOutputWithContext(context.Background())
}
func (i *DatasetKustoDatabase) ToDatasetKustoDatabasePtrOutputWithContext(ctx context.Context) DatasetKustoDatabasePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoDatabasePtrOutput)
}
type DatasetKustoDatabasePtrInput interface {
pulumi.Input
ToDatasetKustoDatabasePtrOutput() DatasetKustoDatabasePtrOutput
ToDatasetKustoDatabasePtrOutputWithContext(ctx context.Context) DatasetKustoDatabasePtrOutput
}
type datasetKustoDatabasePtrType DatasetKustoDatabaseArgs
func (*datasetKustoDatabasePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetKustoDatabase)(nil))
}
func (i *datasetKustoDatabasePtrType) ToDatasetKustoDatabasePtrOutput() DatasetKustoDatabasePtrOutput {
return i.ToDatasetKustoDatabasePtrOutputWithContext(context.Background())
}
func (i *datasetKustoDatabasePtrType) ToDatasetKustoDatabasePtrOutputWithContext(ctx context.Context) DatasetKustoDatabasePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoDatabasePtrOutput)
}
// DatasetKustoDatabaseArrayInput is an input type that accepts DatasetKustoDatabaseArray and DatasetKustoDatabaseArrayOutput values.
// You can construct a concrete instance of `DatasetKustoDatabaseArrayInput` via:
//
// DatasetKustoDatabaseArray{ DatasetKustoDatabaseArgs{...} }
type DatasetKustoDatabaseArrayInput interface {
pulumi.Input
ToDatasetKustoDatabaseArrayOutput() DatasetKustoDatabaseArrayOutput
ToDatasetKustoDatabaseArrayOutputWithContext(context.Context) DatasetKustoDatabaseArrayOutput
}
type DatasetKustoDatabaseArray []DatasetKustoDatabaseInput
func (DatasetKustoDatabaseArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*DatasetKustoDatabase)(nil))
}
func (i DatasetKustoDatabaseArray) ToDatasetKustoDatabaseArrayOutput() DatasetKustoDatabaseArrayOutput {
return i.ToDatasetKustoDatabaseArrayOutputWithContext(context.Background())
}
func (i DatasetKustoDatabaseArray) ToDatasetKustoDatabaseArrayOutputWithContext(ctx context.Context) DatasetKustoDatabaseArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoDatabaseArrayOutput)
}
// DatasetKustoDatabaseMapInput is an input type that accepts DatasetKustoDatabaseMap and DatasetKustoDatabaseMapOutput values.
// You can construct a concrete instance of `DatasetKustoDatabaseMapInput` via:
//
// DatasetKustoDatabaseMap{ "key": DatasetKustoDatabaseArgs{...} }
type DatasetKustoDatabaseMapInput interface {
pulumi.Input
ToDatasetKustoDatabaseMapOutput() DatasetKustoDatabaseMapOutput
ToDatasetKustoDatabaseMapOutputWithContext(context.Context) DatasetKustoDatabaseMapOutput
}
type DatasetKustoDatabaseMap map[string]DatasetKustoDatabaseInput
func (DatasetKustoDatabaseMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*DatasetKustoDatabase)(nil))
}
func (i DatasetKustoDatabaseMap) ToDatasetKustoDatabaseMapOutput() DatasetKustoDatabaseMapOutput {
return i.ToDatasetKustoDatabaseMapOutputWithContext(context.Background())
}
func (i DatasetKustoDatabaseMap) ToDatasetKustoDatabaseMapOutputWithContext(ctx context.Context) DatasetKustoDatabaseMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatasetKustoDatabaseMapOutput)
}
type DatasetKustoDatabaseOutput struct {
*pulumi.OutputState
}
func (DatasetKustoDatabaseOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DatasetKustoDatabase)(nil))
}
func (o DatasetKustoDatabaseOutput) ToDatasetKustoDatabaseOutput() DatasetKustoDatabaseOutput {
return o
}
func (o DatasetKustoDatabaseOutput) ToDatasetKustoDatabaseOutputWithContext(ctx context.Context) DatasetKustoDatabaseOutput {
return o
}
func (o DatasetKustoDatabaseOutput) ToDatasetKustoDatabasePtrOutput() DatasetKustoDatabasePtrOutput {
return o.ToDatasetKustoDatabasePtrOutputWithContext(context.Background())
}
func (o DatasetKustoDatabaseOutput) ToDatasetKustoDatabasePtrOutputWithContext(ctx context.Context) DatasetKustoDatabasePtrOutput {
return o.ApplyT(func(v DatasetKustoDatabase) *DatasetKustoDatabase {
return &v
}).(DatasetKustoDatabasePtrOutput)
}
type DatasetKustoDatabasePtrOutput struct {
*pulumi.OutputState
}
func (DatasetKustoDatabasePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatasetKustoDatabase)(nil))
}
func (o DatasetKustoDatabasePtrOutput) ToDatasetKustoDatabasePtrOutput() DatasetKustoDatabasePtrOutput {
return o
}
func (o DatasetKustoDatabasePtrOutput) ToDatasetKustoDatabasePtrOutputWithContext(ctx context.Context) DatasetKustoDatabasePtrOutput {
return o
}
type DatasetKustoDatabaseArrayOutput struct{ *pulumi.OutputState }
func (DatasetKustoDatabaseArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]DatasetKustoDatabase)(nil))
}
func (o DatasetKustoDatabaseArrayOutput) ToDatasetKustoDatabaseArrayOutput() DatasetKustoDatabaseArrayOutput {
return o
}
func (o DatasetKustoDatabaseArrayOutput) ToDatasetKustoDatabaseArrayOutputWithContext(ctx context.Context) DatasetKustoDatabaseArrayOutput {
return o
}
func (o DatasetKustoDatabaseArrayOutput) Index(i pulumi.IntInput) DatasetKustoDatabaseOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) DatasetKustoDatabase {
return vs[0].([]DatasetKustoDatabase)[vs[1].(int)]
}).(DatasetKustoDatabaseOutput)
}
type DatasetKustoDatabaseMapOutput struct{ *pulumi.OutputState }
func (DatasetKustoDatabaseMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]DatasetKustoDatabase)(nil))
}
func (o DatasetKustoDatabaseMapOutput) ToDatasetKustoDatabaseMapOutput() DatasetKustoDatabaseMapOutput {
return o
}
func (o DatasetKustoDatabaseMapOutput) ToDatasetKustoDatabaseMapOutputWithContext(ctx context.Context) DatasetKustoDatabaseMapOutput {
return o
}
func (o DatasetKustoDatabaseMapOutput) MapIndex(k pulumi.StringInput) DatasetKustoDatabaseOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) DatasetKustoDatabase {
return vs[0].(map[string]DatasetKustoDatabase)[vs[1].(string)]
}).(DatasetKustoDatabaseOutput)
}
func init() {
pulumi.RegisterOutputType(DatasetKustoDatabaseOutput{})
pulumi.RegisterOutputType(DatasetKustoDatabasePtrOutput{})
pulumi.RegisterOutputType(DatasetKustoDatabaseArrayOutput{})
pulumi.RegisterOutputType(DatasetKustoDatabaseMapOutput{})
}