/
nasDatastore.ts
378 lines (369 loc) · 15.4 KB
/
nasDatastore.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
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
372
373
374
375
376
377
378
// *** 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 inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";
export class NasDatastore extends pulumi.CustomResource {
/**
* Get an existing NasDatastore 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?: NasDatastoreState, opts?: pulumi.CustomResourceOptions): NasDatastore {
return new NasDatastore(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'vsphere:index/nasDatastore:NasDatastore';
/**
* Returns true if the given object is an instance of NasDatastore. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is NasDatastore {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === NasDatastore.__pulumiType;
}
/**
* Access mode for the mount point. Can be one of
* `readOnly` or `readWrite`. Note that `readWrite` does not necessarily mean
* that the datastore will be read-write depending on the permissions of the
* actual share. Default: `readWrite`. Forces a new resource if changed.
*/
public readonly accessMode!: pulumi.Output<string | undefined>;
/**
* The connectivity status of the datastore. If this is `false`,
* some other computed attributes may be out of date.
*/
public /*out*/ readonly accessible!: pulumi.Output<boolean>;
/**
* Maximum capacity of the datastore, in megabytes.
*/
public /*out*/ readonly capacity!: pulumi.Output<number>;
/**
* Map of custom attribute ids to attribute
* value strings to set on datasource resource. See
* [here][docs-setting-custom-attributes] for a reference on how to set values
* for custom attributes.
*/
public readonly customAttributes!: pulumi.Output<{[key: string]: string} | undefined>;
/**
* The [managed object
* ID][docs-about-morefs] of a datastore cluster to put this datastore in.
* Conflicts with `folder`.
*/
public readonly datastoreClusterId!: pulumi.Output<string | undefined>;
/**
* The path to the datastore folder to put the datastore in.
*/
public readonly folder!: pulumi.Output<string | undefined>;
/**
* Available space of this datastore, in megabytes.
*/
public /*out*/ readonly freeSpace!: pulumi.Output<number>;
/**
* The [managed object IDs][docs-about-morefs] of
* the hosts to mount the datastore on.
*/
public readonly hostSystemIds!: pulumi.Output<string[]>;
/**
* The current maintenance mode state of the datastore.
*/
public /*out*/ readonly maintenanceMode!: pulumi.Output<string>;
/**
* If `true`, more than one host in the datacenter has
* been configured with access to the datastore.
*/
public /*out*/ readonly multipleHostAccess!: pulumi.Output<boolean>;
/**
* The name of the datastore. Forces a new resource if
* changed.
*/
public readonly name!: pulumi.Output<string>;
/**
* Indicates that this NAS volume is a protocol endpoint.
* This field is only populated if the host supports virtual datastores.
*/
public /*out*/ readonly protocolEndpoint!: pulumi.Output<string>;
/**
* The hostnames or IP addresses of the remote
* server or servers. Only one element should be present for NFS v3 but multiple
* can be present for NFS v4.1. Forces a new resource if changed.
*/
public readonly remoteHosts!: pulumi.Output<string[]>;
/**
* The remote path of the mount point. Forces a new
* resource if changed.
*/
public readonly remotePath!: pulumi.Output<string>;
/**
* The security type to use when using NFS v4.1.
* Can be one of `AUTH_SYS`, `SEC_KRB5`, or `SEC_KRB5I`. Forces a new resource
* if changed.
*/
public readonly securityType!: pulumi.Output<string | undefined>;
/**
* The IDs of any tags to attach to this resource. See
* [here][docs-applying-tags] for a reference on how to apply tags.
*/
public readonly tags!: pulumi.Output<string[] | undefined>;
/**
* The type of NAS volume. Can be one of `NFS` (to denote
* v3) or `NFS41` (to denote NFS v4.1). Default: `NFS`. Forces a new resource if
* changed.
*/
public readonly type!: pulumi.Output<string | undefined>;
/**
* Total additional storage space, in megabytes,
* potentially used by all virtual machines on this datastore.
*/
public /*out*/ readonly uncommittedSpace!: pulumi.Output<number>;
/**
* The unique locator for the datastore.
*/
public /*out*/ readonly url!: pulumi.Output<string>;
/**
* Create a NasDatastore 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: NasDatastoreArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: NasDatastoreArgs | NasDatastoreState, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
if (opts && opts.id) {
const state = argsOrState as NasDatastoreState | undefined;
inputs["accessMode"] = state ? state.accessMode : undefined;
inputs["accessible"] = state ? state.accessible : undefined;
inputs["capacity"] = state ? state.capacity : undefined;
inputs["customAttributes"] = state ? state.customAttributes : undefined;
inputs["datastoreClusterId"] = state ? state.datastoreClusterId : undefined;
inputs["folder"] = state ? state.folder : undefined;
inputs["freeSpace"] = state ? state.freeSpace : undefined;
inputs["hostSystemIds"] = state ? state.hostSystemIds : undefined;
inputs["maintenanceMode"] = state ? state.maintenanceMode : undefined;
inputs["multipleHostAccess"] = state ? state.multipleHostAccess : undefined;
inputs["name"] = state ? state.name : undefined;
inputs["protocolEndpoint"] = state ? state.protocolEndpoint : undefined;
inputs["remoteHosts"] = state ? state.remoteHosts : undefined;
inputs["remotePath"] = state ? state.remotePath : undefined;
inputs["securityType"] = state ? state.securityType : undefined;
inputs["tags"] = state ? state.tags : undefined;
inputs["type"] = state ? state.type : undefined;
inputs["uncommittedSpace"] = state ? state.uncommittedSpace : undefined;
inputs["url"] = state ? state.url : undefined;
} else {
const args = argsOrState as NasDatastoreArgs | undefined;
if (!args || args.hostSystemIds === undefined) {
throw new Error("Missing required property 'hostSystemIds'");
}
if (!args || args.remoteHosts === undefined) {
throw new Error("Missing required property 'remoteHosts'");
}
if (!args || args.remotePath === undefined) {
throw new Error("Missing required property 'remotePath'");
}
inputs["accessMode"] = args ? args.accessMode : undefined;
inputs["customAttributes"] = args ? args.customAttributes : undefined;
inputs["datastoreClusterId"] = args ? args.datastoreClusterId : undefined;
inputs["folder"] = args ? args.folder : undefined;
inputs["hostSystemIds"] = args ? args.hostSystemIds : undefined;
inputs["name"] = args ? args.name : undefined;
inputs["remoteHosts"] = args ? args.remoteHosts : undefined;
inputs["remotePath"] = args ? args.remotePath : undefined;
inputs["securityType"] = args ? args.securityType : undefined;
inputs["tags"] = args ? args.tags : undefined;
inputs["type"] = args ? args.type : undefined;
inputs["accessible"] = undefined /*out*/;
inputs["capacity"] = undefined /*out*/;
inputs["freeSpace"] = undefined /*out*/;
inputs["maintenanceMode"] = undefined /*out*/;
inputs["multipleHostAccess"] = undefined /*out*/;
inputs["protocolEndpoint"] = undefined /*out*/;
inputs["uncommittedSpace"] = undefined /*out*/;
inputs["url"] = undefined /*out*/;
}
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
super(NasDatastore.__pulumiType, name, inputs, opts);
}
}
/**
* Input properties used for looking up and filtering NasDatastore resources.
*/
export interface NasDatastoreState {
/**
* Access mode for the mount point. Can be one of
* `readOnly` or `readWrite`. Note that `readWrite` does not necessarily mean
* that the datastore will be read-write depending on the permissions of the
* actual share. Default: `readWrite`. Forces a new resource if changed.
*/
readonly accessMode?: pulumi.Input<string>;
/**
* The connectivity status of the datastore. If this is `false`,
* some other computed attributes may be out of date.
*/
readonly accessible?: pulumi.Input<boolean>;
/**
* Maximum capacity of the datastore, in megabytes.
*/
readonly capacity?: pulumi.Input<number>;
/**
* Map of custom attribute ids to attribute
* value strings to set on datasource resource. See
* [here][docs-setting-custom-attributes] for a reference on how to set values
* for custom attributes.
*/
readonly customAttributes?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
/**
* The [managed object
* ID][docs-about-morefs] of a datastore cluster to put this datastore in.
* Conflicts with `folder`.
*/
readonly datastoreClusterId?: pulumi.Input<string>;
/**
* The path to the datastore folder to put the datastore in.
*/
readonly folder?: pulumi.Input<string>;
/**
* Available space of this datastore, in megabytes.
*/
readonly freeSpace?: pulumi.Input<number>;
/**
* The [managed object IDs][docs-about-morefs] of
* the hosts to mount the datastore on.
*/
readonly hostSystemIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The current maintenance mode state of the datastore.
*/
readonly maintenanceMode?: pulumi.Input<string>;
/**
* If `true`, more than one host in the datacenter has
* been configured with access to the datastore.
*/
readonly multipleHostAccess?: pulumi.Input<boolean>;
/**
* The name of the datastore. Forces a new resource if
* changed.
*/
readonly name?: pulumi.Input<string>;
/**
* Indicates that this NAS volume is a protocol endpoint.
* This field is only populated if the host supports virtual datastores.
*/
readonly protocolEndpoint?: pulumi.Input<string>;
/**
* The hostnames or IP addresses of the remote
* server or servers. Only one element should be present for NFS v3 but multiple
* can be present for NFS v4.1. Forces a new resource if changed.
*/
readonly remoteHosts?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The remote path of the mount point. Forces a new
* resource if changed.
*/
readonly remotePath?: pulumi.Input<string>;
/**
* The security type to use when using NFS v4.1.
* Can be one of `AUTH_SYS`, `SEC_KRB5`, or `SEC_KRB5I`. Forces a new resource
* if changed.
*/
readonly securityType?: pulumi.Input<string>;
/**
* The IDs of any tags to attach to this resource. See
* [here][docs-applying-tags] for a reference on how to apply tags.
*/
readonly tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The type of NAS volume. Can be one of `NFS` (to denote
* v3) or `NFS41` (to denote NFS v4.1). Default: `NFS`. Forces a new resource if
* changed.
*/
readonly type?: pulumi.Input<string>;
/**
* Total additional storage space, in megabytes,
* potentially used by all virtual machines on this datastore.
*/
readonly uncommittedSpace?: pulumi.Input<number>;
/**
* The unique locator for the datastore.
*/
readonly url?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a NasDatastore resource.
*/
export interface NasDatastoreArgs {
/**
* Access mode for the mount point. Can be one of
* `readOnly` or `readWrite`. Note that `readWrite` does not necessarily mean
* that the datastore will be read-write depending on the permissions of the
* actual share. Default: `readWrite`. Forces a new resource if changed.
*/
readonly accessMode?: pulumi.Input<string>;
/**
* Map of custom attribute ids to attribute
* value strings to set on datasource resource. See
* [here][docs-setting-custom-attributes] for a reference on how to set values
* for custom attributes.
*/
readonly customAttributes?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
/**
* The [managed object
* ID][docs-about-morefs] of a datastore cluster to put this datastore in.
* Conflicts with `folder`.
*/
readonly datastoreClusterId?: pulumi.Input<string>;
/**
* The path to the datastore folder to put the datastore in.
*/
readonly folder?: pulumi.Input<string>;
/**
* The [managed object IDs][docs-about-morefs] of
* the hosts to mount the datastore on.
*/
readonly hostSystemIds: pulumi.Input<pulumi.Input<string>[]>;
/**
* The name of the datastore. Forces a new resource if
* changed.
*/
readonly name?: pulumi.Input<string>;
/**
* The hostnames or IP addresses of the remote
* server or servers. Only one element should be present for NFS v3 but multiple
* can be present for NFS v4.1. Forces a new resource if changed.
*/
readonly remoteHosts: pulumi.Input<pulumi.Input<string>[]>;
/**
* The remote path of the mount point. Forces a new
* resource if changed.
*/
readonly remotePath: pulumi.Input<string>;
/**
* The security type to use when using NFS v4.1.
* Can be one of `AUTH_SYS`, `SEC_KRB5`, or `SEC_KRB5I`. Forces a new resource
* if changed.
*/
readonly securityType?: pulumi.Input<string>;
/**
* The IDs of any tags to attach to this resource. See
* [here][docs-applying-tags] for a reference on how to apply tags.
*/
readonly tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The type of NAS volume. Can be one of `NFS` (to denote
* v3) or `NFS41` (to denote NFS v4.1). Default: `NFS`. Forces a new resource if
* changed.
*/
readonly type?: pulumi.Input<string>;
}