/
index.ts
3408 lines (3265 loc) · 98.7 KB
/
index.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
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
import * as msRest from "@azure/ms-rest-js";
export { BaseResource, CloudError };
/**
* @interface
* An interface representing UsageName.
* The Usage Names.
*
*/
export interface UsageName {
/**
* @member {string} [value] The name of the resource.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly value?: string;
/**
* @member {string} [localizedValue] The localized name of the resource.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly localizedValue?: string;
}
/**
* @interface
* An interface representing Usage.
* Describes Batch AI Resource Usage.
*
*/
export interface Usage {
/**
* @member {UsageUnit} [unit] An enum describing the unit of usage
* measurement. Possible values include: 'Count'
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly unit?: UsageUnit;
/**
* @member {number} [currentValue] The current usage of the resource.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly currentValue?: number;
/**
* @member {number} [limit] The maximum permitted usage of the resource.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly limit?: number;
/**
* @member {UsageName} [name] The name of the type of usage.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly name?: UsageName;
}
/**
* @interface
* An interface representing UserAccountSettings.
* Settings for user account that gets created on each on the nodes of a
* cluster.
*
*/
export interface UserAccountSettings {
/**
* @member {string} adminUserName User name. Name of the administrator user
* account which can be used to SSH to nodes.
*/
adminUserName: string;
/**
* @member {string} [adminUserSshPublicKey] SSH public key. SSH public key of
* the administrator user account.
*/
adminUserSshPublicKey?: string;
/**
* @member {string} [adminUserPassword] Password. Password of the
* administrator user account.
*/
adminUserPassword?: string;
}
/**
* @interface
* An interface representing SshConfiguration.
* SSH configuration.
*
*/
export interface SshConfiguration {
/**
* @member {string[]} [publicIPsToAllow] Allowed public IPs. List of source
* IP ranges to allow SSH connection from. The default value is '*' (all
* source IPs are allowed). Maximum number of IP ranges that can be specified
* is 400.
*/
publicIPsToAllow?: string[];
/**
* @member {UserAccountSettings} userAccountSettings User account settings.
* Settings for administrator user account to be created on a node. The
* account can be used to establish SSH connection to the node.
*/
userAccountSettings: UserAccountSettings;
}
/**
* @interface
* An interface representing DataDisks.
* Data disks settings.
*
*/
export interface DataDisks {
/**
* @member {number} diskSizeInGB Disk size in GB. Disk size in GB for the
* blank data disks.
*/
diskSizeInGB: number;
/**
* @member {CachingType} [cachingType] Caching type. Caching type for the
* disks. Available values are none (default), readonly, readwrite. Caching
* type can be set only for VM sizes supporting premium storage. Possible
* values include: 'none', 'readonly', 'readwrite'. Default value: 'none' .
*/
cachingType?: CachingType;
/**
* @member {number} diskCount Number of data disks. Number of data disks
* attached to the File Server. If multiple disks attached, they will be
* configured in RAID level 0.
*/
diskCount: number;
/**
* @member {StorageAccountType} storageAccountType Storage account type. Type
* of storage account to be used on the disk. Possible values are:
* Standard_LRS or Premium_LRS. Premium storage account type can only be used
* with VM sizes supporting premium storage. Possible values include:
* 'Standard_LRS', 'Premium_LRS'
*/
storageAccountType: StorageAccountType;
}
/**
* @interface
* An interface representing ResourceId.
* Represents a resource ID. For example, for a subnet, it is the resource URL
* for the subnet.
*
* @extends BaseResource
*/
export interface ResourceId extends BaseResource {
/**
* @member {string} id The ID of the resource
*/
id: string;
}
/**
* @interface
* An interface representing MountSettings.
* File Server mount Information.
*
*/
export interface MountSettings {
/**
* @member {string} [mountPoint] Mount Point. Path where the data disks are
* mounted on the File Server.
*/
mountPoint?: string;
/**
* @member {string} [fileServerPublicIP] Public IP. Public IP address of the
* File Server which can be used to SSH to the node from outside of the
* subnet.
*/
fileServerPublicIP?: string;
/**
* @member {string} [fileServerInternalIP] Internal IP. Internal IP address
* of the File Server which can be used to access the File Server from within
* the subnet.
*/
fileServerInternalIP?: string;
}
/**
* @interface
* An interface representing ProxyResource.
* A definition of an Azure proxy resource.
*
* @extends BaseResource
*/
export interface ProxyResource extends BaseResource {
/**
* @member {string} [id] The ID of the resource.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly id?: string;
/**
* @member {string} [name] The name of the resource.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly name?: string;
/**
* @member {string} [type] The type of the resource.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly type?: string;
}
/**
* @interface
* An interface representing FileServer.
* File Server information.
*
* @extends ProxyResource
*/
export interface FileServer extends ProxyResource {
/**
* @member {string} [vmSize] VM size. VM size of the File Server.
*/
vmSize?: string;
/**
* @member {SshConfiguration} [sshConfiguration] SSH configuration. SSH
* configuration for accessing the File Server node.
*/
sshConfiguration?: SshConfiguration;
/**
* @member {DataDisks} [dataDisks] Data disks configuration. Information
* about disks attached to File Server VM.
*/
dataDisks?: DataDisks;
/**
* @member {ResourceId} [subnet] Subnet. File Server virtual network subnet
* resource ID.
*/
subnet?: ResourceId;
/**
* @member {MountSettings} [mountSettings] Mount settings. File Server mount
* settings.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly mountSettings?: MountSettings;
/**
* @member {Date} [provisioningStateTransitionTime] Provisioning State
* Transition time. Time when the provisioning state was changed.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly provisioningStateTransitionTime?: Date;
/**
* @member {Date} [creationTime] Creation time. Time when the FileServer was
* created.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly creationTime?: Date;
/**
* @member {FileServerProvisioningState} [provisioningState] Provisioning
* state. Provisioning state of the File Server. Possible values: creating -
* The File Server is getting created; updating - The File Server creation
* has been accepted and it is getting updated; deleting - The user has
* requested that the File Server be deleted, and it is in the process of
* being deleted; failed - The File Server creation has failed with the
* specified error code. Details about the error code are specified in the
* message field; succeeded - The File Server creation has succeeded.
* Possible values include: 'creating', 'updating', 'deleting', 'succeeded',
* 'failed'
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly provisioningState?: FileServerProvisioningState;
}
/**
* @interface
* An interface representing KeyVaultSecretReference.
* Key Vault Secret reference.
*
*/
export interface KeyVaultSecretReference {
/**
* @member {ResourceId} sourceVault Key Vault resource identifier. Fully
* qualified resource indentifier of the Key Vault.
*/
sourceVault: ResourceId;
/**
* @member {string} secretUrl Secret URL. The URL referencing a secret in the
* Key Vault.
*/
secretUrl: string;
}
/**
* @interface
* An interface representing FileServerCreateParameters.
* File Server creation parameters.
*
*/
export interface FileServerCreateParameters {
/**
* @member {string} vmSize VM size. The size of the virtual machine for the
* File Server. For information about available VM sizes from the Virtual
* Machines Marketplace, see Sizes for Virtual Machines (Linux).
*/
vmSize: string;
/**
* @member {SshConfiguration} sshConfiguration SSH configuration. SSH
* configuration for the File Server node.
*/
sshConfiguration: SshConfiguration;
/**
* @member {DataDisks} dataDisks Data disks. Settings for the data disks
* which will be created for the File Server.
*/
dataDisks: DataDisks;
/**
* @member {ResourceId} [subnet] Subnet identifier. Identifier of an existing
* virtual network subnet to put the File Server in. If not provided, a new
* virtual network and subnet will be created.
*/
subnet?: ResourceId;
}
/**
* @interface
* An interface representing ManualScaleSettings.
* Manual scale settings for the cluster.
*
*/
export interface ManualScaleSettings {
/**
* @member {number} targetNodeCount Target node count. The desired number of
* compute nodes in the Cluster. Default is 0. Default value: 0 .
*/
targetNodeCount: number;
/**
* @member {DeallocationOption} [nodeDeallocationOption] Node deallocation
* options. An action to be performed when the cluster size is decreasing.
* The default value is requeue. Possible values include: 'requeue',
* 'terminate', 'waitforjobcompletion'. Default value: 'requeue' .
*/
nodeDeallocationOption?: DeallocationOption;
}
/**
* @interface
* An interface representing AutoScaleSettings.
* Auto-scale settings for the cluster. The system automatically scales the
* cluster up and down (within minimumNodeCount and maximumNodeCount) based on
* the number of queued and running jobs assigned to the cluster.
*
*/
export interface AutoScaleSettings {
/**
* @member {number} minimumNodeCount Minimum node count. The minimum number
* of compute nodes the Batch AI service will try to allocate for the
* cluster. Note, the actual number of nodes can be less than the specified
* value if the subscription has not enough quota to fulfill the request.
*/
minimumNodeCount: number;
/**
* @member {number} maximumNodeCount Maximum node count. The maximum number
* of compute nodes the cluster can have.
*/
maximumNodeCount: number;
/**
* @member {number} [initialNodeCount] Initial node count. The number of
* compute nodes to allocate on cluster creation. Note that this value is
* used only during cluster creation. Default: 0. Default value: 0 .
*/
initialNodeCount?: number;
}
/**
* @interface
* An interface representing ScaleSettings.
* At least one of manual or autoScale settings must be specified. Only one of
* manual or autoScale settings can be specified. If autoScale settings are
* specified, the system automatically scales the cluster up and down (within
* the supplied limits) based on the pending jobs on the cluster.
*
*/
export interface ScaleSettings {
/**
* @member {ManualScaleSettings} [manual] Manual scale settings. Manual scale
* settings for the cluster.
*/
manual?: ManualScaleSettings;
/**
* @member {AutoScaleSettings} [autoScale] Auto-scale settings. Auto-scale
* settings for the cluster.
*/
autoScale?: AutoScaleSettings;
}
/**
* @interface
* An interface representing ImageReference.
* The OS image reference.
*
*/
export interface ImageReference {
/**
* @member {string} publisher Publisher. Publisher of the image.
*/
publisher: string;
/**
* @member {string} offer Offer. Offer of the image.
*/
offer: string;
/**
* @member {string} sku SKU. SKU of the image.
*/
sku: string;
/**
* @member {string} [version] Version. Version of the image.
*/
version?: string;
/**
* @member {string} [virtualMachineImageId] Custom VM image resource ID. The
* ARM resource identifier of the virtual machine image for the compute
* nodes. This is of the form
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}.
* The virtual machine image must be in the same region and subscription as
* the cluster. For information about the firewall settings for the Batch
* node agent to communicate with the Batch service see
* https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
* Note, you need to provide publisher, offer and sku of the base OS image of
* which the custom image has been derived from.
*/
virtualMachineImageId?: string;
}
/**
* @interface
* An interface representing VirtualMachineConfiguration.
* VM configuration.
*
*/
export interface VirtualMachineConfiguration {
/**
* @member {ImageReference} [imageReference] Image reference. OS image
* reference for cluster nodes.
*/
imageReference?: ImageReference;
}
/**
* @interface
* An interface representing EnvironmentVariable.
* An environment variable definition.
*
*/
export interface EnvironmentVariable {
/**
* @member {string} name Name. The name of the environment variable.
*/
name: string;
/**
* @member {string} value Value. The value of the environment variable.
*/
value: string;
}
/**
* @interface
* An interface representing EnvironmentVariableWithSecretValue.
* An environment variable with secret value definition.
*
*/
export interface EnvironmentVariableWithSecretValue {
/**
* @member {string} name Name. The name of the environment variable to store
* the secret value.
*/
name: string;
/**
* @member {string} [value] Value. The value of the environment variable.
* This value will never be reported back by Batch AI.
*/
value?: string;
/**
* @member {KeyVaultSecretReference} [valueSecretReference] KeyVault secret
* reference. KeyVault store and secret which contains the value for the
* environment variable. One of value or valueSecretReference must be
* provided.
*/
valueSecretReference?: KeyVaultSecretReference;
}
/**
* @interface
* An interface representing SetupTask.
* Specifies a setup task which can be used to customize the compute nodes of
* the cluster.
*
*/
export interface SetupTask {
/**
* @member {string} commandLine Command line. The command line to be executed
* on each cluster's node after it being allocated or rebooted. The command
* is executed in a bash subshell as a root.
*/
commandLine: string;
/**
* @member {EnvironmentVariable[]} [environmentVariables] Environment
* variables. A collection of user defined environment variables to be set
* for setup task.
*/
environmentVariables?: EnvironmentVariable[];
/**
* @member {EnvironmentVariableWithSecretValue[]} [secrets] Secrets. A
* collection of user defined environment variables with secret values to be
* set for the setup task. Server will never report values of these variables
* back.
*/
secrets?: EnvironmentVariableWithSecretValue[];
/**
* @member {string} stdOutErrPathPrefix Output path prefix. The prefix of a
* path where the Batch AI service will upload the stdout, stderr and
* execution log of the setup task.
*/
stdOutErrPathPrefix: string;
/**
* @member {string} [stdOutErrPathSuffix] Output path suffix. A path segment
* appended by Batch AI to stdOutErrPathPrefix to form a path where stdout,
* stderr and execution log of the setup task will be uploaded. Batch AI
* creates the setup task output directories under an unique path to avoid
* conflicts between different clusters. The full path can be obtained by
* concatenation of stdOutErrPathPrefix and stdOutErrPathSuffix.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly stdOutErrPathSuffix?: string;
}
/**
* @interface
* An interface representing AzureStorageCredentialsInfo.
* Azure storage account credentials.
*
*/
export interface AzureStorageCredentialsInfo {
/**
* @member {string} [accountKey] Account key. Storage account key. One of
* accountKey or accountKeySecretReference must be specified.
*/
accountKey?: string;
/**
* @member {KeyVaultSecretReference} [accountKeySecretReference] Account key
* secret reference. Information about KeyVault secret storing the storage
* account key. One of accountKey or accountKeySecretReference must be
* specified.
*/
accountKeySecretReference?: KeyVaultSecretReference;
}
/**
* @interface
* An interface representing AzureFileShareReference.
* Azure File Share mounting configuration.
*
*/
export interface AzureFileShareReference {
/**
* @member {string} accountName Account name. Name of the Azure storage
* account.
*/
accountName: string;
/**
* @member {string} azureFileUrl Azure File URL. URL to access the Azure
* File.
*/
azureFileUrl: string;
/**
* @member {AzureStorageCredentialsInfo} credentials Credentials. Information
* about the Azure storage credentials.
*/
credentials: AzureStorageCredentialsInfo;
/**
* @member {string} relativeMountPath Relative mount path. The relative path
* on the compute node where the Azure File share will be mounted. Note that
* all cluster level file shares will be mounted under $AZ_BATCHAI_MOUNT_ROOT
* location and all job level file shares will be mounted under
* $AZ_BATCHAI_JOB_MOUNT_ROOT.
*/
relativeMountPath: string;
/**
* @member {string} [fileMode] File mode. File mode for files on the mounted
* file share. Default value: 0777. Default value: '0777' .
*/
fileMode?: string;
/**
* @member {string} [directoryMode] Directory mode. File mode for directories
* on the mounted file share. Default value: 0777. Default value: '0777' .
*/
directoryMode?: string;
}
/**
* @interface
* An interface representing AzureBlobFileSystemReference.
* Azure Blob Storage Container mounting configuration.
*
*/
export interface AzureBlobFileSystemReference {
/**
* @member {string} accountName Account name. Name of the Azure storage
* account.
*/
accountName: string;
/**
* @member {string} containerName Container name. Name of the Azure Blob
* Storage container to mount on the cluster.
*/
containerName: string;
/**
* @member {AzureStorageCredentialsInfo} credentials Credentials. Information
* about the Azure storage credentials.
*/
credentials: AzureStorageCredentialsInfo;
/**
* @member {string} relativeMountPath Relative mount path. The relative path
* on the compute node where the Azure File container will be mounted. Note
* that all cluster level containers will be mounted under
* $AZ_BATCHAI_MOUNT_ROOT location and all job level containers will be
* mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT.
*/
relativeMountPath: string;
/**
* @member {string} [mountOptions] Mount options. Mount options for mounting
* blobfuse file system.
*/
mountOptions?: string;
}
/**
* @interface
* An interface representing FileServerReference.
* File Server mounting configuration.
*
*/
export interface FileServerReference {
/**
* @member {ResourceId} fileServer File server. Resource ID of the existing
* File Server to be mounted.
*/
fileServer: ResourceId;
/**
* @member {string} [sourceDirectory] Source directory. File Server directory
* that needs to be mounted. If this property is not specified, the entire
* File Server will be mounted.
*/
sourceDirectory?: string;
/**
* @member {string} relativeMountPath Relative mount path. The relative path
* on the compute node where the File Server will be mounted. Note that all
* cluster level file servers will be mounted under $AZ_BATCHAI_MOUNT_ROOT
* location and all job level file servers will be mounted under
* $AZ_BATCHAI_JOB_MOUNT_ROOT.
*/
relativeMountPath: string;
/**
* @member {string} [mountOptions] Mount options. Mount options to be passed
* to mount command.
*/
mountOptions?: string;
}
/**
* @interface
* An interface representing UnmanagedFileSystemReference.
* Unmananged file system mounting configuration.
*
*/
export interface UnmanagedFileSystemReference {
/**
* @member {string} mountCommand Mount command. Mount command line. Note,
* Batch AI will append mount path to the command on its own.
*/
mountCommand: string;
/**
* @member {string} relativeMountPath Relative mount path. The relative path
* on the compute node where the unmanaged file system will be mounted. Note
* that all cluster level unmanaged file systems will be mounted under
* $AZ_BATCHAI_MOUNT_ROOT location and all job level unmanaged file systems
* will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT.
*/
relativeMountPath: string;
}
/**
* @interface
* An interface representing MountVolumes.
* Details of volumes to mount on the cluster.
*
*/
export interface MountVolumes {
/**
* @member {AzureFileShareReference[]} [azureFileShares] Azure File Shares. A
* collection of Azure File Shares that are to be mounted to the cluster
* nodes.
*/
azureFileShares?: AzureFileShareReference[];
/**
* @member {AzureBlobFileSystemReference[]} [azureBlobFileSystems] Azure Blob
* file systems. A collection of Azure Blob Containers that are to be mounted
* to the cluster nodes.
*/
azureBlobFileSystems?: AzureBlobFileSystemReference[];
/**
* @member {FileServerReference[]} [fileServers] File Servers. A collection
* of Batch AI File Servers that are to be mounted to the cluster nodes.
*/
fileServers?: FileServerReference[];
/**
* @member {UnmanagedFileSystemReference[]} [unmanagedFileSystems] Unmanaged
* file systems. A collection of unmanaged file systems that are to be
* mounted to the cluster nodes.
*/
unmanagedFileSystems?: UnmanagedFileSystemReference[];
}
/**
* @interface
* An interface representing AppInsightsReference.
* Azure Application Insights information for performance counters reporting.
*
*/
export interface AppInsightsReference {
/**
* @member {ResourceId} component Component ID. Azure Application Insights
* component resource ID.
*/
component: ResourceId;
/**
* @member {string} [instrumentationKey] Instrumentation Key. Value of the
* Azure Application Insights instrumentation key.
*/
instrumentationKey?: string;
/**
* @member {KeyVaultSecretReference} [instrumentationKeySecretReference]
* Instrumentation key KeyVault Secret reference. KeyVault Store and Secret
* which contains Azure Application Insights instrumentation key. One of
* instrumentationKey or instrumentationKeySecretReference must be specified.
*/
instrumentationKeySecretReference?: KeyVaultSecretReference;
}
/**
* @interface
* An interface representing PerformanceCountersSettings.
* Performance counters reporting settings.
*
*/
export interface PerformanceCountersSettings {
/**
* @member {AppInsightsReference} appInsightsReference Azure Application
* Insights reference. Azure Application Insights information for performance
* counters reporting. If provided, Batch AI will upload node performance
* counters to the corresponding Azure Application Insights account.
*/
appInsightsReference: AppInsightsReference;
}
/**
* @interface
* An interface representing NodeSetup.
* Node setup settings.
*
*/
export interface NodeSetup {
/**
* @member {SetupTask} [setupTask] Setup task. Setup task to run on cluster
* nodes when nodes got created or rebooted. The setup task code needs to be
* idempotent. Generally the setup task is used to download static data that
* is required for all jobs that run on the cluster VMs and/or to
* download/install software.
*/
setupTask?: SetupTask;
/**
* @member {MountVolumes} [mountVolumes] Mount volumes. Mount volumes to be
* available to setup task and all jobs executing on the cluster. The volumes
* will be mounted at location specified by $AZ_BATCHAI_MOUNT_ROOT
* environment variable.
*/
mountVolumes?: MountVolumes;
/**
* @member {PerformanceCountersSettings} [performanceCountersSettings]
* Performance counters settings. Settings for performance counters
* collecting and uploading.
*/
performanceCountersSettings?: PerformanceCountersSettings;
}
/**
* @interface
* An interface representing NodeStateCounts.
* Counts of various compute node states on the cluster.
*
*/
export interface NodeStateCounts {
/**
* @member {number} [idleNodeCount] Idle node count. Number of compute nodes
* in idle state.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly idleNodeCount?: number;
/**
* @member {number} [runningNodeCount] Running node count. Number of compute
* nodes which are running jobs.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly runningNodeCount?: number;
/**
* @member {number} [preparingNodeCount] Preparing node count. Number of
* compute nodes which are being prepared.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly preparingNodeCount?: number;
/**
* @member {number} [unusableNodeCount] Unusable node count. Number of
* compute nodes which are in unusable state.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly unusableNodeCount?: number;
/**
* @member {number} [leavingNodeCount] Leaving node count. Number of compute
* nodes which are leaving the cluster.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly leavingNodeCount?: number;
}
/**
* @interface
* An interface representing ClusterCreateParameters.
* Cluster creation operation.
*
*/
export interface ClusterCreateParameters {
/**
* @member {string} vmSize VM size. The size of the virtual machines in the
* cluster. All nodes in a cluster have the same VM size. For information
* about available VM sizes for clusters using images from the Virtual
* Machines Marketplace see Sizes for Virtual Machines (Linux). Batch AI
* service supports all Azure VM sizes except STANDARD_A0 and those with
* premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
*/
vmSize: string;
/**
* @member {VmPriority} [vmPriority] VM priority. VM priority. Allowed values
* are: dedicated (default) and lowpriority. Possible values include:
* 'dedicated', 'lowpriority'. Default value: 'dedicated' .
*/
vmPriority?: VmPriority;
/**
* @member {ScaleSettings} [scaleSettings] Scale settings. Scale settings for
* the cluster. Batch AI service supports manual and auto scale clusters.
*/
scaleSettings?: ScaleSettings;
/**
* @member {VirtualMachineConfiguration} [virtualMachineConfiguration] VM
* configuration. OS image configuration for cluster nodes. All nodes in a
* cluster have the same OS image.
*/
virtualMachineConfiguration?: VirtualMachineConfiguration;
/**
* @member {NodeSetup} [nodeSetup] Node setup. Setup to be performed on each
* compute node in the cluster.
*/
nodeSetup?: NodeSetup;
/**
* @member {UserAccountSettings} userAccountSettings User account settings.
* Settings for an administrator user account that will be created on each
* compute node in the cluster.
*/
userAccountSettings: UserAccountSettings;
/**
* @member {ResourceId} [subnet] Subnet. Existing virtual network subnet to
* put the cluster nodes in. Note, if a File Server mount configured in node
* setup, the File Server's subnet will be used automatically.
*/
subnet?: ResourceId;
}
/**
* @interface
* An interface representing ClusterUpdateParameters.
* Cluster update parameters.
*
*/
export interface ClusterUpdateParameters {
/**
* @member {ScaleSettings} [scaleSettings] Scale settings. Desired scale
* settings for the cluster. Batch AI service supports manual and auto scale
* clusters.
*/
scaleSettings?: ScaleSettings;
}
/**
* @interface
* An interface representing NameValuePair.
* Name-value pair.
*
*/
export interface NameValuePair {
/**
* @member {string} [name] Name. The name in the name-value pair.
*/
name?: string;
/**
* @member {string} [value] Value. The value in the name-value pair.
*/
value?: string;
}
/**
* @interface
* An interface representing BatchAIError.
* An error response from the Batch AI service.
*
*/
export interface BatchAIError {
/**
* @member {string} [code] An identifier of the error. Codes are invariant
* and are intended to be consumed programmatically.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly code?: string;
/**
* @member {string} [message] A message describing the error, intended to be
* suitable for display in a user interface.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly message?: string;
/**
* @member {NameValuePair[]} [details] A list of additional details about the
* error.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly details?: NameValuePair[];
}
/**
* @interface
* An interface representing Cluster.
* Information about a Cluster.
*
* @extends ProxyResource
*/
export interface Cluster extends ProxyResource {
/**
* @member {string} [vmSize] VM size. The size of the virtual machines in the
* cluster. All nodes in a cluster have the same VM size.
*/
vmSize?: string;
/**
* @member {VmPriority} [vmPriority] VM priority. VM priority of cluster
* nodes. Possible values include: 'dedicated', 'lowpriority'. Default value:
* 'dedicated' .
*/
vmPriority?: VmPriority;
/**
* @member {ScaleSettings} [scaleSettings] Scale settings. Scale settings of
* the cluster.
*/
scaleSettings?: ScaleSettings;
/**
* @member {VirtualMachineConfiguration} [virtualMachineConfiguration] VM
* configuration. Virtual machine configuration (OS image) of the compute
* nodes. All nodes in a cluster have the same OS image configuration.
*/
virtualMachineConfiguration?: VirtualMachineConfiguration;
/**
* @member {NodeSetup} [nodeSetup] Node setup. Setup (mount file systems,
* performance counters settings and custom setup task) to be performed on