/
interactiveQueryCluster.ts
297 lines (291 loc) · 15.2 KB
/
interactiveQueryCluster.ts
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
// *** 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! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../utilities";
/**
* Manages a HDInsight Interactive Query Cluster.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
*
* const exampleResourceGroup = new azure.core.ResourceGroup("example", {
* location: "West Europe",
* name: "example-resources",
* });
* const exampleAccount = new azure.storage.Account("example", {
* accountReplicationType: "LRS",
* accountTier: "Standard",
* location: exampleResourceGroup.location,
* name: "hdinsightstor",
* resourceGroupName: exampleResourceGroup.name,
* });
* const exampleContainer = new azure.storage.Container("example", {
* containerAccessType: "private",
* name: "hdinsight",
* resourceGroupName: exampleResourceGroup.name,
* storageAccountName: exampleAccount.name,
* });
* const exampleInteractiveQueryCluster = new azure.hdinsight.InteractiveQueryCluster("example", {
* clusterVersion: "3.6",
* componentVersion: {
* interactiveHive: "2.1",
* },
* gateway: {
* enabled: true,
* password: "TerrAform123!",
* username: "acctestusrgw",
* },
* location: exampleResourceGroup.location,
* name: "example-hdicluster",
* resourceGroupName: exampleResourceGroup.name,
* roles: {
* headNode: {
* password: "AccTestvdSC4daf986!",
* username: "acctestusrvm",
* vmSize: "Standard_D13_V2",
* },
* workerNode: {
* password: "AccTestvdSC4daf986!",
* targetInstanceCount: 3,
* username: "acctestusrvm",
* vmSize: "Standard_D14_V2",
* },
* zookeeperNode: {
* password: "AccTestvdSC4daf986!",
* username: "acctestusrvm",
* vmSize: "Standard_A4_V2",
* },
* },
* storageAccounts: [{
* isDefault: true,
* storageAccountKey: exampleAccount.primaryAccessKey,
* storageContainerId: exampleContainer.id,
* }],
* tier: "Standard",
* });
* ```
*/
export class InteractiveQueryCluster extends pulumi.CustomResource {
/**
* Get an existing InteractiveQueryCluster resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InteractiveQueryClusterState, opts?: pulumi.CustomResourceOptions): InteractiveQueryCluster {
return new InteractiveQueryCluster(name, <any>state, { ...opts, id: id });
}
/**
* Specifies the Version of HDInsights which should be used for this Cluster. Changing this forces a new resource to be created.
*/
public readonly clusterVersion!: pulumi.Output<string>;
/**
* A `component_version` block as defined below.
*/
public readonly componentVersion!: pulumi.Output<{ interactiveHive: string }>;
/**
* A `gateway` block as defined below.
*/
public readonly gateway!: pulumi.Output<{ enabled: boolean, password: string, username: string }>;
/**
* The HTTPS Connectivity Endpoint for this HDInsight Interactive Query Cluster.
*/
public /*out*/ readonly httpsEndpoint!: pulumi.Output<string>;
/**
* Specifies the Azure Region which this HDInsight Interactive Query Cluster should exist. Changing this forces a new resource to be created.
*/
public readonly location!: pulumi.Output<string>;
/**
* Specifies the name for this HDInsight Interactive Query Cluster. Changing this forces a new resource to be created.
*/
public readonly name!: pulumi.Output<string>;
/**
* Specifies the name of the Resource Group in which this HDInsight Interactive Query Cluster should exist. Changing this forces a new resource to be created.
*/
public readonly resourceGroupName!: pulumi.Output<string>;
/**
* A `roles` block as defined below.
*/
public readonly roles!: pulumi.Output<{ headNode: { password?: string, sshKeys?: string[], subnetId?: string, username: string, virtualNetworkId?: string, vmSize: string }, workerNode: { minInstanceCount?: number, password?: string, sshKeys?: string[], subnetId?: string, targetInstanceCount: number, username: string, virtualNetworkId?: string, vmSize: string }, zookeeperNode: { password?: string, sshKeys?: string[], subnetId?: string, username: string, virtualNetworkId?: string, vmSize: string } }>;
/**
* The SSH Connectivity Endpoint for this HDInsight Interactive Query Cluster.
*/
public /*out*/ readonly sshEndpoint!: pulumi.Output<string>;
/**
* One or more `storage_account` block as defined below.
*/
public readonly storageAccounts!: pulumi.Output<{ isDefault: boolean, storageAccountKey: string, storageContainerId: string }[]>;
/**
* A map of Tags which should be assigned to this HDInsight Interactive Query Cluster.
*/
public readonly tags!: pulumi.Output<{[key: string]: any}>;
/**
* Specifies the Tier which should be used for this HDInsight Interactive Query Cluster. Possible values are `Standard` or `Premium`. Changing this forces a new resource to be created.
*/
public readonly tier!: pulumi.Output<string>;
/**
* Create a InteractiveQueryCluster resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: InteractiveQueryClusterArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: InteractiveQueryClusterArgs | InteractiveQueryClusterState, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
if (opts && opts.id) {
const state = argsOrState as InteractiveQueryClusterState | undefined;
inputs["clusterVersion"] = state ? state.clusterVersion : undefined;
inputs["componentVersion"] = state ? state.componentVersion : undefined;
inputs["gateway"] = state ? state.gateway : undefined;
inputs["httpsEndpoint"] = state ? state.httpsEndpoint : undefined;
inputs["location"] = state ? state.location : undefined;
inputs["name"] = state ? state.name : undefined;
inputs["resourceGroupName"] = state ? state.resourceGroupName : undefined;
inputs["roles"] = state ? state.roles : undefined;
inputs["sshEndpoint"] = state ? state.sshEndpoint : undefined;
inputs["storageAccounts"] = state ? state.storageAccounts : undefined;
inputs["tags"] = state ? state.tags : undefined;
inputs["tier"] = state ? state.tier : undefined;
} else {
const args = argsOrState as InteractiveQueryClusterArgs | undefined;
if (!args || args.clusterVersion === undefined) {
throw new Error("Missing required property 'clusterVersion'");
}
if (!args || args.componentVersion === undefined) {
throw new Error("Missing required property 'componentVersion'");
}
if (!args || args.gateway === undefined) {
throw new Error("Missing required property 'gateway'");
}
if (!args || args.resourceGroupName === undefined) {
throw new Error("Missing required property 'resourceGroupName'");
}
if (!args || args.roles === undefined) {
throw new Error("Missing required property 'roles'");
}
if (!args || args.storageAccounts === undefined) {
throw new Error("Missing required property 'storageAccounts'");
}
if (!args || args.tier === undefined) {
throw new Error("Missing required property 'tier'");
}
inputs["clusterVersion"] = args ? args.clusterVersion : undefined;
inputs["componentVersion"] = args ? args.componentVersion : undefined;
inputs["gateway"] = args ? args.gateway : undefined;
inputs["location"] = args ? args.location : undefined;
inputs["name"] = args ? args.name : undefined;
inputs["resourceGroupName"] = args ? args.resourceGroupName : undefined;
inputs["roles"] = args ? args.roles : undefined;
inputs["storageAccounts"] = args ? args.storageAccounts : undefined;
inputs["tags"] = args ? args.tags : undefined;
inputs["tier"] = args ? args.tier : undefined;
inputs["httpsEndpoint"] = undefined /*out*/;
inputs["sshEndpoint"] = undefined /*out*/;
}
super("azure:hdinsight/interactiveQueryCluster:InteractiveQueryCluster", name, inputs, opts);
}
}
/**
* Input properties used for looking up and filtering InteractiveQueryCluster resources.
*/
export interface InteractiveQueryClusterState {
/**
* Specifies the Version of HDInsights which should be used for this Cluster. Changing this forces a new resource to be created.
*/
readonly clusterVersion?: pulumi.Input<string>;
/**
* A `component_version` block as defined below.
*/
readonly componentVersion?: pulumi.Input<{ interactiveHive: pulumi.Input<string> }>;
/**
* A `gateway` block as defined below.
*/
readonly gateway?: pulumi.Input<{ enabled: pulumi.Input<boolean>, password: pulumi.Input<string>, username: pulumi.Input<string> }>;
/**
* The HTTPS Connectivity Endpoint for this HDInsight Interactive Query Cluster.
*/
readonly httpsEndpoint?: pulumi.Input<string>;
/**
* Specifies the Azure Region which this HDInsight Interactive Query Cluster should exist. Changing this forces a new resource to be created.
*/
readonly location?: pulumi.Input<string>;
/**
* Specifies the name for this HDInsight Interactive Query Cluster. Changing this forces a new resource to be created.
*/
readonly name?: pulumi.Input<string>;
/**
* Specifies the name of the Resource Group in which this HDInsight Interactive Query Cluster should exist. Changing this forces a new resource to be created.
*/
readonly resourceGroupName?: pulumi.Input<string>;
/**
* A `roles` block as defined below.
*/
readonly roles?: pulumi.Input<{ headNode: pulumi.Input<{ password?: pulumi.Input<string>, sshKeys?: pulumi.Input<pulumi.Input<string>[]>, subnetId?: pulumi.Input<string>, username: pulumi.Input<string>, virtualNetworkId?: pulumi.Input<string>, vmSize: pulumi.Input<string> }>, workerNode: pulumi.Input<{ minInstanceCount?: pulumi.Input<number>, password?: pulumi.Input<string>, sshKeys?: pulumi.Input<pulumi.Input<string>[]>, subnetId?: pulumi.Input<string>, targetInstanceCount: pulumi.Input<number>, username: pulumi.Input<string>, virtualNetworkId?: pulumi.Input<string>, vmSize: pulumi.Input<string> }>, zookeeperNode: pulumi.Input<{ password?: pulumi.Input<string>, sshKeys?: pulumi.Input<pulumi.Input<string>[]>, subnetId?: pulumi.Input<string>, username: pulumi.Input<string>, virtualNetworkId?: pulumi.Input<string>, vmSize: pulumi.Input<string> }> }>;
/**
* The SSH Connectivity Endpoint for this HDInsight Interactive Query Cluster.
*/
readonly sshEndpoint?: pulumi.Input<string>;
/**
* One or more `storage_account` block as defined below.
*/
readonly storageAccounts?: pulumi.Input<pulumi.Input<{ isDefault: pulumi.Input<boolean>, storageAccountKey: pulumi.Input<string>, storageContainerId: pulumi.Input<string> }>[]>;
/**
* A map of Tags which should be assigned to this HDInsight Interactive Query Cluster.
*/
readonly tags?: pulumi.Input<{[key: string]: any}>;
/**
* Specifies the Tier which should be used for this HDInsight Interactive Query Cluster. Possible values are `Standard` or `Premium`. Changing this forces a new resource to be created.
*/
readonly tier?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a InteractiveQueryCluster resource.
*/
export interface InteractiveQueryClusterArgs {
/**
* Specifies the Version of HDInsights which should be used for this Cluster. Changing this forces a new resource to be created.
*/
readonly clusterVersion: pulumi.Input<string>;
/**
* A `component_version` block as defined below.
*/
readonly componentVersion: pulumi.Input<{ interactiveHive: pulumi.Input<string> }>;
/**
* A `gateway` block as defined below.
*/
readonly gateway: pulumi.Input<{ enabled: pulumi.Input<boolean>, password: pulumi.Input<string>, username: pulumi.Input<string> }>;
/**
* Specifies the Azure Region which this HDInsight Interactive Query Cluster should exist. Changing this forces a new resource to be created.
*/
readonly location?: pulumi.Input<string>;
/**
* Specifies the name for this HDInsight Interactive Query Cluster. Changing this forces a new resource to be created.
*/
readonly name?: pulumi.Input<string>;
/**
* Specifies the name of the Resource Group in which this HDInsight Interactive Query Cluster should exist. Changing this forces a new resource to be created.
*/
readonly resourceGroupName: pulumi.Input<string>;
/**
* A `roles` block as defined below.
*/
readonly roles: pulumi.Input<{ headNode: pulumi.Input<{ password?: pulumi.Input<string>, sshKeys?: pulumi.Input<pulumi.Input<string>[]>, subnetId?: pulumi.Input<string>, username: pulumi.Input<string>, virtualNetworkId?: pulumi.Input<string>, vmSize: pulumi.Input<string> }>, workerNode: pulumi.Input<{ minInstanceCount?: pulumi.Input<number>, password?: pulumi.Input<string>, sshKeys?: pulumi.Input<pulumi.Input<string>[]>, subnetId?: pulumi.Input<string>, targetInstanceCount: pulumi.Input<number>, username: pulumi.Input<string>, virtualNetworkId?: pulumi.Input<string>, vmSize: pulumi.Input<string> }>, zookeeperNode: pulumi.Input<{ password?: pulumi.Input<string>, sshKeys?: pulumi.Input<pulumi.Input<string>[]>, subnetId?: pulumi.Input<string>, username: pulumi.Input<string>, virtualNetworkId?: pulumi.Input<string>, vmSize: pulumi.Input<string> }> }>;
/**
* One or more `storage_account` block as defined below.
*/
readonly storageAccounts: pulumi.Input<pulumi.Input<{ isDefault: pulumi.Input<boolean>, storageAccountKey: pulumi.Input<string>, storageContainerId: pulumi.Input<string> }>[]>;
/**
* A map of Tags which should be assigned to this HDInsight Interactive Query Cluster.
*/
readonly tags?: pulumi.Input<{[key: string]: any}>;
/**
* Specifies the Tier which should be used for this HDInsight Interactive Query Cluster. Possible values are `Standard` or `Premium`. Changing this forces a new resource to be created.
*/
readonly tier: pulumi.Input<string>;
}