This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
bigDataPool.go
338 lines (314 loc) · 13.4 KB
/
bigDataPool.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
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20190601preview
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// A Big Data pool
type BigDataPool struct {
pulumi.CustomResourceState
// Auto-pausing properties
AutoPause AutoPausePropertiesResponsePtrOutput `pulumi:"autoPause"`
// Auto-scaling properties
AutoScale AutoScalePropertiesResponsePtrOutput `pulumi:"autoScale"`
// The cache size
CacheSize pulumi.IntPtrOutput `pulumi:"cacheSize"`
// The time when the Big Data pool was created.
CreationDate pulumi.StringPtrOutput `pulumi:"creationDate"`
// List of custom libraries/packages associated with the spark pool.
CustomLibraries LibraryResourcePropertiesResponseArrayOutput `pulumi:"customLibraries"`
// The default folder where Spark logs will be written.
DefaultSparkLogFolder pulumi.StringPtrOutput `pulumi:"defaultSparkLogFolder"`
// Dynamic Executor Allocation
DynamicExecutorAllocation DynamicExecutorAllocationResponsePtrOutput `pulumi:"dynamicExecutorAllocation"`
// Whether compute isolation is required or not.
IsComputeIsolationEnabled pulumi.BoolPtrOutput `pulumi:"isComputeIsolationEnabled"`
// Library version requirements
LibraryRequirements LibraryRequirementsResponsePtrOutput `pulumi:"libraryRequirements"`
// The geo-location where the resource lives
Location pulumi.StringOutput `pulumi:"location"`
// The name of the resource
Name pulumi.StringOutput `pulumi:"name"`
// The number of nodes in the Big Data pool.
NodeCount pulumi.IntPtrOutput `pulumi:"nodeCount"`
// The level of compute power that each node in the Big Data pool has.
NodeSize pulumi.StringPtrOutput `pulumi:"nodeSize"`
// The kind of nodes that the Big Data pool provides.
NodeSizeFamily pulumi.StringPtrOutput `pulumi:"nodeSizeFamily"`
// The state of the Big Data pool.
ProvisioningState pulumi.StringPtrOutput `pulumi:"provisioningState"`
// Whether session level packages enabled.
SessionLevelPackagesEnabled pulumi.BoolPtrOutput `pulumi:"sessionLevelPackagesEnabled"`
// Spark configuration file to specify additional properties
SparkConfigProperties LibraryRequirementsResponsePtrOutput `pulumi:"sparkConfigProperties"`
// The Spark events folder
SparkEventsFolder pulumi.StringPtrOutput `pulumi:"sparkEventsFolder"`
// The Apache Spark version.
SparkVersion pulumi.StringPtrOutput `pulumi:"sparkVersion"`
// Resource tags.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type pulumi.StringOutput `pulumi:"type"`
}
// NewBigDataPool registers a new resource with the given unique name, arguments, and options.
func NewBigDataPool(ctx *pulumi.Context,
name string, args *BigDataPoolArgs, opts ...pulumi.ResourceOption) (*BigDataPool, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BigDataPoolName == nil {
return nil, errors.New("invalid value for required argument 'BigDataPoolName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.WorkspaceName == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:synapse/latest:BigDataPool"),
},
{
Type: pulumi.String("azure-nextgen:synapse/v20201201:BigDataPool"),
},
})
opts = append(opts, aliases)
var resource BigDataPool
err := ctx.RegisterResource("azure-nextgen:synapse/v20190601preview:BigDataPool", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBigDataPool gets an existing BigDataPool 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 GetBigDataPool(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BigDataPoolState, opts ...pulumi.ResourceOption) (*BigDataPool, error) {
var resource BigDataPool
err := ctx.ReadResource("azure-nextgen:synapse/v20190601preview:BigDataPool", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BigDataPool resources.
type bigDataPoolState struct {
// Auto-pausing properties
AutoPause *AutoPausePropertiesResponse `pulumi:"autoPause"`
// Auto-scaling properties
AutoScale *AutoScalePropertiesResponse `pulumi:"autoScale"`
// The cache size
CacheSize *int `pulumi:"cacheSize"`
// The time when the Big Data pool was created.
CreationDate *string `pulumi:"creationDate"`
// List of custom libraries/packages associated with the spark pool.
CustomLibraries []LibraryResourcePropertiesResponse `pulumi:"customLibraries"`
// The default folder where Spark logs will be written.
DefaultSparkLogFolder *string `pulumi:"defaultSparkLogFolder"`
// Dynamic Executor Allocation
DynamicExecutorAllocation *DynamicExecutorAllocationResponse `pulumi:"dynamicExecutorAllocation"`
// Whether compute isolation is required or not.
IsComputeIsolationEnabled *bool `pulumi:"isComputeIsolationEnabled"`
// Library version requirements
LibraryRequirements *LibraryRequirementsResponse `pulumi:"libraryRequirements"`
// The geo-location where the resource lives
Location *string `pulumi:"location"`
// The name of the resource
Name *string `pulumi:"name"`
// The number of nodes in the Big Data pool.
NodeCount *int `pulumi:"nodeCount"`
// The level of compute power that each node in the Big Data pool has.
NodeSize *string `pulumi:"nodeSize"`
// The kind of nodes that the Big Data pool provides.
NodeSizeFamily *string `pulumi:"nodeSizeFamily"`
// The state of the Big Data pool.
ProvisioningState *string `pulumi:"provisioningState"`
// Whether session level packages enabled.
SessionLevelPackagesEnabled *bool `pulumi:"sessionLevelPackagesEnabled"`
// Spark configuration file to specify additional properties
SparkConfigProperties *LibraryRequirementsResponse `pulumi:"sparkConfigProperties"`
// The Spark events folder
SparkEventsFolder *string `pulumi:"sparkEventsFolder"`
// The Apache Spark version.
SparkVersion *string `pulumi:"sparkVersion"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `pulumi:"type"`
}
type BigDataPoolState struct {
// Auto-pausing properties
AutoPause AutoPausePropertiesResponsePtrInput
// Auto-scaling properties
AutoScale AutoScalePropertiesResponsePtrInput
// The cache size
CacheSize pulumi.IntPtrInput
// The time when the Big Data pool was created.
CreationDate pulumi.StringPtrInput
// List of custom libraries/packages associated with the spark pool.
CustomLibraries LibraryResourcePropertiesResponseArrayInput
// The default folder where Spark logs will be written.
DefaultSparkLogFolder pulumi.StringPtrInput
// Dynamic Executor Allocation
DynamicExecutorAllocation DynamicExecutorAllocationResponsePtrInput
// Whether compute isolation is required or not.
IsComputeIsolationEnabled pulumi.BoolPtrInput
// Library version requirements
LibraryRequirements LibraryRequirementsResponsePtrInput
// The geo-location where the resource lives
Location pulumi.StringPtrInput
// The name of the resource
Name pulumi.StringPtrInput
// The number of nodes in the Big Data pool.
NodeCount pulumi.IntPtrInput
// The level of compute power that each node in the Big Data pool has.
NodeSize pulumi.StringPtrInput
// The kind of nodes that the Big Data pool provides.
NodeSizeFamily pulumi.StringPtrInput
// The state of the Big Data pool.
ProvisioningState pulumi.StringPtrInput
// Whether session level packages enabled.
SessionLevelPackagesEnabled pulumi.BoolPtrInput
// Spark configuration file to specify additional properties
SparkConfigProperties LibraryRequirementsResponsePtrInput
// The Spark events folder
SparkEventsFolder pulumi.StringPtrInput
// The Apache Spark version.
SparkVersion pulumi.StringPtrInput
// Resource tags.
Tags pulumi.StringMapInput
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type pulumi.StringPtrInput
}
func (BigDataPoolState) ElementType() reflect.Type {
return reflect.TypeOf((*bigDataPoolState)(nil)).Elem()
}
type bigDataPoolArgs struct {
// Auto-pausing properties
AutoPause *AutoPauseProperties `pulumi:"autoPause"`
// Auto-scaling properties
AutoScale *AutoScaleProperties `pulumi:"autoScale"`
// Big Data pool name
BigDataPoolName string `pulumi:"bigDataPoolName"`
// The cache size
CacheSize *int `pulumi:"cacheSize"`
// The time when the Big Data pool was created.
CreationDate *string `pulumi:"creationDate"`
// The default folder where Spark logs will be written.
DefaultSparkLogFolder *string `pulumi:"defaultSparkLogFolder"`
// Dynamic Executor Allocation
DynamicExecutorAllocation *DynamicExecutorAllocation `pulumi:"dynamicExecutorAllocation"`
// Whether to stop any running jobs in the Big Data pool
Force *bool `pulumi:"force"`
// Whether compute isolation is required or not.
IsComputeIsolationEnabled *bool `pulumi:"isComputeIsolationEnabled"`
// Library version requirements
LibraryRequirements *LibraryRequirements `pulumi:"libraryRequirements"`
// The geo-location where the resource lives
Location *string `pulumi:"location"`
// The number of nodes in the Big Data pool.
NodeCount *int `pulumi:"nodeCount"`
// The level of compute power that each node in the Big Data pool has.
NodeSize *string `pulumi:"nodeSize"`
// The kind of nodes that the Big Data pool provides.
NodeSizeFamily *string `pulumi:"nodeSizeFamily"`
// The state of the Big Data pool.
ProvisioningState *string `pulumi:"provisioningState"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Whether session level packages enabled.
SessionLevelPackagesEnabled *bool `pulumi:"sessionLevelPackagesEnabled"`
// Spark configuration file to specify additional properties
SparkConfigProperties *LibraryRequirements `pulumi:"sparkConfigProperties"`
// The Spark events folder
SparkEventsFolder *string `pulumi:"sparkEventsFolder"`
// The Apache Spark version.
SparkVersion *string `pulumi:"sparkVersion"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// The name of the workspace
WorkspaceName string `pulumi:"workspaceName"`
}
// The set of arguments for constructing a BigDataPool resource.
type BigDataPoolArgs struct {
// Auto-pausing properties
AutoPause AutoPausePropertiesPtrInput
// Auto-scaling properties
AutoScale AutoScalePropertiesPtrInput
// Big Data pool name
BigDataPoolName pulumi.StringInput
// The cache size
CacheSize pulumi.IntPtrInput
// The time when the Big Data pool was created.
CreationDate pulumi.StringPtrInput
// The default folder where Spark logs will be written.
DefaultSparkLogFolder pulumi.StringPtrInput
// Dynamic Executor Allocation
DynamicExecutorAllocation DynamicExecutorAllocationPtrInput
// Whether to stop any running jobs in the Big Data pool
Force pulumi.BoolPtrInput
// Whether compute isolation is required or not.
IsComputeIsolationEnabled pulumi.BoolPtrInput
// Library version requirements
LibraryRequirements LibraryRequirementsPtrInput
// The geo-location where the resource lives
Location pulumi.StringPtrInput
// The number of nodes in the Big Data pool.
NodeCount pulumi.IntPtrInput
// The level of compute power that each node in the Big Data pool has.
NodeSize pulumi.StringPtrInput
// The kind of nodes that the Big Data pool provides.
NodeSizeFamily pulumi.StringPtrInput
// The state of the Big Data pool.
ProvisioningState pulumi.StringPtrInput
// The name of the resource group. The name is case insensitive.
ResourceGroupName pulumi.StringInput
// Whether session level packages enabled.
SessionLevelPackagesEnabled pulumi.BoolPtrInput
// Spark configuration file to specify additional properties
SparkConfigProperties LibraryRequirementsPtrInput
// The Spark events folder
SparkEventsFolder pulumi.StringPtrInput
// The Apache Spark version.
SparkVersion pulumi.StringPtrInput
// Resource tags.
Tags pulumi.StringMapInput
// The name of the workspace
WorkspaceName pulumi.StringInput
}
func (BigDataPoolArgs) ElementType() reflect.Type {
return reflect.TypeOf((*bigDataPoolArgs)(nil)).Elem()
}
type BigDataPoolInput interface {
pulumi.Input
ToBigDataPoolOutput() BigDataPoolOutput
ToBigDataPoolOutputWithContext(ctx context.Context) BigDataPoolOutput
}
func (*BigDataPool) ElementType() reflect.Type {
return reflect.TypeOf((*BigDataPool)(nil))
}
func (i *BigDataPool) ToBigDataPoolOutput() BigDataPoolOutput {
return i.ToBigDataPoolOutputWithContext(context.Background())
}
func (i *BigDataPool) ToBigDataPoolOutputWithContext(ctx context.Context) BigDataPoolOutput {
return pulumi.ToOutputWithContext(ctx, i).(BigDataPoolOutput)
}
type BigDataPoolOutput struct {
*pulumi.OutputState
}
func (BigDataPoolOutput) ElementType() reflect.Type {
return reflect.TypeOf((*BigDataPool)(nil))
}
func (o BigDataPoolOutput) ToBigDataPoolOutput() BigDataPoolOutput {
return o
}
func (o BigDataPoolOutput) ToBigDataPoolOutputWithContext(ctx context.Context) BigDataPoolOutput {
return o
}
func init() {
pulumi.RegisterOutputType(BigDataPoolOutput{})
}