forked from Azure/azure-sdk-for-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure.js
1782 lines (1639 loc) · 81.7 KB
/
azure.js
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 and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
var exports = module.exports;
/**
* Table client exports.
* @ignore
*/
var storage = require('azure-storage');
var TableService = storage.TableService;
exports.TableService = TableService;
exports.TableUtilities = storage.TableUtilities;
exports.TableQuery = storage.TableQuery;
exports.TableBatch = storage.TableBatch;
/**
* Creates a new {@link TableService} object.
* If no storageaccount or storageaccesskey are provided, the AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables will be used.
*
* @method
* @param {string} [storageAccountOrConnectionString] The storage account or the connection string.
* @param {string} [storageAccessKey] The storage access key.
* @param {string} [host] The host address.
* @param {object} [authenticationProvider] The authentication provider.
* @return {TableService} A new TableService object.
* @tutorial getting-started
*
*/
exports.createTableService = function (storageAccountOrConnectionString, storageAccessKey, host, authenticationProvider) {
return new TableService(storageAccountOrConnectionString, storageAccessKey, host, authenticationProvider);
};
/**
* Blob client exports.
* @ignore
*/
var BlobService = storage.BlobService;
exports.BlobService = BlobService;
/**
* Creates a new {@link BlobService} object.
* If no storageaccount or storageaccesskey are provided, the AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables will be used.
*
* @method
* @param {string} [storageAccountOrConnectionString] The storage account or the connection string.
* @param {string} [storageAccessKey] The storage access key.
* @param {string} [host] The host address.
* @param {object} [authenticationProvider] The authentication provider.
* @return {BlobService} A new BlobService object.
*/
exports.createBlobService = function (storageAccountOrConnectionString, storageAccessKey, host, authenticationProvider) {
return new BlobService(storageAccountOrConnectionString, storageAccessKey, host, authenticationProvider);
};
/**
* Queue client exports.
* @ignore
*/
var QueueService = storage.QueueService;
exports.QueueService = QueueService;
/**
* Creates a new {@link QueueService} object.
* If no storageAccount or storageAccessKey are provided, the AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY
* environment variables will be used.
*
* @method
* @param {string} [storageAccountOrConnectionString] The storage account or the connection string.
* @param {string} [storageAccessKey] The storage access key.
* @param {string} [host] The host address.
* @param {object} [authenticationProvider] The authentication provider.
* @return {QueueService} A new QueueService object.
*/
exports.createQueueService = function (storageAccountOrConnectionString, storageAccessKey, host, authenticationProvider) {
return new QueueService(storageAccountOrConnectionString, storageAccessKey, host, authenticationProvider);
};
/**
* Service Bus client exports.
* @ignore
*/
var azureSb = require('azure-sb');
var ServiceBusService = azureSb.ServiceBusService;
exports.ServiceBusService = ServiceBusService;
/**
* Creates a new {@link ServiceBusService} object.
*
* @method
* @param {string} [configOrNamespaceOrConnectionString] The service bus namespace or other config information.
* @param {string} [accessKey] The password.
* @param {string} [issuer] The issuer.
* @param {string} [acsNamespace] The acs namespace. Usually the same as the sb namespace with "-sb" suffix.
* @param {string} [host] The host address.
* @param {object} [authenticationProvider] The authentication provider.
* @return {ServiceBusService} A new ServiceBusService object.
*/
exports.createServiceBusService = azureSb.createServiceBusService;
/**
* Notification hub client exports.
* @ignore
*/
var NotificationHubService = azureSb.NotificationHubService;
exports.NotificationHubService = NotificationHubService;
/**
* Creates a new {@link NotificationHubService} object.
*
* @method
* @param {string} hubName The notification hub name.
* @param {string} [endpointOrConnectionString] The service bus endpoint or connection string.
* @param {string} [sharedAccessKeyName] The notification hub shared access key name.
* @param {string} [sharedAccessKeyValue] The notification hub shared access key value.
* @return {NotificationHubService} A new NotificationHubService object.
*/
exports.createNotificationHubService = azureSb.createNotificationHubService;
/**
* Wrap service exports.
* @ignore
*/
var WrapService = azureSb.WrapService;
exports.WrapService = WrapService;
/**
* Creates a new WrapService object.
*
* @method
* @param {string} acsHost The access control host.
* @param {string} [issuer] The service bus issuer.
* @param {string} [accessKey] The service bus issuer password.
*/
exports.createWrapService = azureSb.createWrapService;
/**
* Generated ManagementClient client exports.
* @ignore
*/
var azureManagement = require('azure-asm-mgmt');
exports.ManagementClient = azureManagement.ManagementClient;
/**
* Creates a new {@link ManagementClient} object.
*
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {ManagementClient} A new ManagementClient object.
*/
exports.createManagementClient = azureManagement.createManagementClient;
/**
* SqlManagementService client exports.
* @ignore
*/
var azureSqlMgmt = require('azure-asm-sql');
var SqlManagementService = azureSqlMgmt.SqlManagementService;
exports.ASMSqlManagementService = SqlManagementService;
/**
* Creates a new {@link SqlManagementService} object.
* @method
* @param {string} subscriptionId The subscription ID for the account.
* @param {object} authentication The authentication object for the client.
* You must use either keyfile/certfile or keyvalue/certvalue
* to provide a management certificate to authenticate
* service requests.
* @param {string} [authentication.keyfile] The path to a file that contains the PEM encoded key
* @param {string} [authentication.certfile] The path to a file that contains the PEM encoded certificate
* @param {string} [authentication.keyvalue] A string that contains the PEM encoded key
* @param {string} [authentication.certvalue] A string that contains the PEM encoded certificate
* @param {object} [hostOptions] The host options to override defaults.
* @param {string} [hostOptions.host='management.core.windows.net'] The management endpoint.
* @param {string} [hostOptions.apiversion='2012-03-01'] The API vesion to be used.
* @return {SqlManagementService} A new SqlManagementService object.
*/
exports.createASMSqlManagementService = azureSqlMgmt.createSqlManagementService;
/**
* SQL service exports.
* @ignore
*/
var SqlService = azureSqlMgmt.SqlService;
exports.SqlService = SqlService;
/**
*
* Creates a new SqlService object
*
* The SqlService object allows you to perform management operations against databases
* created using Microsoft Azure SQL Database.
* @method
* @param {string} serverName The SQL server name.
* @param {string} administratorLogin The SQL Server administrator login.
* @param {string} administratorLoginPassword The SQL Server administrator login password.
* @param {string} [host] The host for the service.
* @param {string} [acsHost] The acs host.
* @param {object} [authenticationProvider] The authentication provider.
*/
exports.createSqlService = azureSqlMgmt.createSqlService;
/**
* HDInsightService client exports.
* @ignore
*/
var azureHDInsight = require('azure-asm-hdinsight');
var HDInsightService = azureHDInsight.HDInsightService;
/**
* Creates a new {@link HDInsightService} object.
* @method
* @param {string} subscriptionId The subscription ID for the account.
* @param {object} authentication The authentication object for the client.
* You must use either keyfile/certfile or keyvalue/certvalue
* to provide a management certificate to authenticate
* service requests.
* @param {string} [authentication.keyfile] The path to a file that contains the PEM encoded key
* @param {string} [authentication.certfile] The path to a file that contains the PEM encoded certificate
* @param {string} [authentication.keyvalue] A string that contains the PEM encoded key
* @param {string} [authentication.certvalue] A string that contains the PEM encoded certificate
* @param {object} [hostOptions] The host options to override defaults.
* @param {string} [hostOptions.host='management.core.windows.net'] The management endpoint.
* @param {string} [hostOptions.apiversion='2012-03-01'] The API vesion to be used.
* @return {HDInsightService} A new HDInsightService object.
*/
exports.createHDInsightService = azureHDInsight.createHDInsightService;
/**
* Generated ServiceBusManagementClient client exports.
* @ignore
*/
var azureServiceBus = require('azure-asm-sb');
exports.ServiceBusManagementClient = azureServiceBus.ServiceBusManagementClient;
/**
* Creates a new {@link ServiceBusManagementClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {ServiceBusManagementClient} A new ServiceBusManagementClient object.
*/
exports.createServiceBusManagementClient = azureServiceBus.createServiceBusManagementClient;
/**
* WebsiteManagementService client exports.
* @ignore
*/
var azureWebSite = require('azure-asm-website');
var WebsiteManagementService = azureWebSite.WebsiteManagementService;
exports.ASMWebsiteManagementService = WebsiteManagementService;
/**
* Creates a new {@link WebsiteManagementService} object.
*
* @deprecated Use {@link createWebSiteManagementClient} instead.
* @method
* @param {string} subscriptionId The subscription ID for the account.
* @param {object} authentication The authentication object for the client.
* You must use either keyfile/certfile or keyvalue/certvalue
* to provide a management certificate to authenticate
* service requests.
* @param {string} [authentication.keyfile] The path to a file that contains the PEM encoded key
* @param {string} [authentication.certfile] The path to a file that contains the PEM encoded certificate
* @param {string} [authentication.keyvalue] A string that contains the PEM encoded key
* @param {string} [authentication.certvalue] A string that contains the PEM encoded certificate
* @param {object} [hostOptions] The host options to override defaults.
* @param {string} [hostOptions.host='management.core.windows.net'] The management endpoint.
* @param {string} [hostOptions.apiversion='2012-03-01'] The API vesion to be used.
* @return {WebsiteManagementService} A new WebsitemanagementService object.
*/
exports.createASMWebsiteManagementService = azureWebSite.createWebsiteManagementService;
/**
* Generated NetworkManagementClient client exports.
* @ignore
*/
var azureNetwork = require('azure-asm-network');
exports.ASMNetworkManagementClient = azureNetwork.NetworkManagementClient;
/**
* Creates a new {@link NetworkManagementClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {NetworkManagementClient} A new NetworkManagementClient object.
*/
exports.createASMNetworkManagementClient = azureNetwork.creatNetworkManagementClient;
var asmTrafficManager = require('azure-asm-trafficmanager');
exports.ASMTrafficManagerManagementClient = asmTrafficManager.TrafficManagerManagementClient;
/**
* Creates a new TrafficManagerManagementClient object.
*
* NOTE: These APIs are still in development and should not be used.
*
* @param {string} [credentials.subscriptionId] The subscription identifier.
* @param {string} [credentials.token] The access token.
* @param {string} [baseUri] The base uri.
* @param {array} [filters] Optional array of service filters
* @return {TrafficManagerManagementClient} A new TrafficManagerManagementClient object.
*/
exports.createASMTrafficManagerManagementClient = asmTrafficManager.createTrafficManagerManagementClient;
/**
* Generated SqlManagementClient client exports.
* @ignore
*/
exports.ASMSqlManagementClient = azureSqlMgmt.SqlManagementClient;
/**
* Creates a new {@link SqlClient} object.
* @method
* @param {string} [credentials.subscriptionId] The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [baseUri] The base uri.
* @return {SqlClient} A new SqlClient object.
*/
exports.createASMSqlManagementClient = azureSqlMgmt.createSqlManagementClient;
/**
* Generated StorageManagementClient client exports.
* @ignore
*/
var azureStorage = require('azure-asm-storage');
exports.ASMStorageManagementClient = azureStorage.StorageManagementClient;
/**
* Creates a new {@link StorageManagementClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {StorageManagementClient} A new StorageManagementClient object.
*/
exports.createASMStorageManagementClient = azureStorage.createStorageManagementClient;
/**
* Generated StoreClient client exports.
* @ignore
*/
var azureStore = require('azure-asm-store');
exports.ASMStoreManagementClient = azureStore.StoreManagementClient;
/**
* Creates a new {@link StoreManagementClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {StoreManagementClient} A new StoreManagementClient object.
*/
exports.createASMStoreManagementClient = azureStore.createStoreManagementClient;
/**
* Generated SubscriptionClient client exports.
* @ignore
*/
var azureASMSubscription = require('azure-asm-subscription');
exports.ASMSubscriptionClient = azureASMSubscription.SubscriptionClient;
/**
* Creates a new {@link SubscriptionClient} object.
* @method
* @param {object} credentials The credentials object (typically, a TokenCloudCredentials instance)
* @param {string} [baseUri] The base uri.
* @return {SubscriptionClient} A new SubscriptionClient object.
*/
exports.createASMSubscriptionClient = azureASMSubscription.createSubscriptionClient;
/**
* Generated WebsiteManagementService client exports.
* @ignore
*/
exports.ASMWebSiteManagementClient = azureWebSite.WebSiteManagementClient;
exports.ASMWebSiteExtensionsClient = azureWebSite.WebSiteExtensionsClient;
/**
* Creates a new {@link WebSiteManagementClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {WebSiteManagementClient} A new WebSiteManagementClient object.
*/
exports.createASMWebSiteManagementClient = azureWebSite.createWebSiteManagementClient;
/**
* Creates a new {@link WebSiteExtensionsClient} object.
* @method
* @param {string} siteName The site name.
* @param {string} credentials.username The username.
* @param {string} credentials.password The password.
* @param {string} [baseUri] The base uri.
* @return {WebSiteManagementClient} A new WebSiteManagementClient object.
*/
exports.createASMWebSiteExtensionsClient = azureWebSite.createWebSiteExtensionsClient;
/**
* ScmService client exports.
* @ignore
*/
exports.ASMScmService = azureWebSite.ScmService;
/**
* Creates a new {@link ScmService} object.
* @method
* @param {object} authentication The authentication object for the client.
* You must use a auth/pass for basic authentication.
* @param {string} [authentication.user] The basic authentication username.
* @param {string} [authentication.pass] The basic authentication password.
* @param {object} [hostOptions] The host options to override defaults.
* @param {string} [hostOptions.host] The SCM repository endpoint.
* @return {ScmService} A new WebsitemanagementService object.
*/
exports.createASMScmService = azureWebSite.createScmService;
/**
* Generated ComputeManagementClient client exports.
* @ignore
*/
var azureCompute = require('azure-asm-compute');
exports.ASMComputeManagementClient = azureCompute.ComputeManagementClient;
/**
* Creates a new {@link ComputeManagementClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {ComputeManagementClient} A new ComputeManagementClient object.
*/
exports.createASMComputeManagementClient = azureCompute.createComputeManagementClient;
/**
* Generated GalleryClient client exports.
* @ignore
*/
var gallery = require('azure-gallery');
exports.ARMGalleryClient = gallery.GalleryClient;
/**
* Creates a new {@link GalleryClient} object.
* @method
* @param {object} credentials The credentials object (typically, a TokenCloudCredentials instance)
* @param {string} [baseUri] The base uri
* @param {Array} [filters] Extra filters to attach to the client
* @return {GalleryClient} A new GalleryClient object.
*/
exports.createARMGalleryClient = gallery.createGalleryClient;
/**
* Generated SchedulerManagementClient client exports.
* @ignore
*/
var azureSchedulerManagement = require('azure-asm-scheduler');
exports.ASMSchedulerManagementClient = azureSchedulerManagement.SchedulerManagementClient;
/**
* Creates a new {@link SchedulerManagementClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {SchedulerManagementClient} A new SchedulerManagementClient object.
*/
exports.createASMSchedulerManagementClient = azureSchedulerManagement.createSchedulerManagementClient;
/**
* Generated SchedulerClient client exports.
* @ignore
*/
var azureScheduler = require('azure-scheduler');
exports.SchedulerClient = azureScheduler.SchedulerClient;
/**
* Creates a new {@link SchedulerClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {SchedulerClient} A new SchedulerClient object.
*/
exports.createSchedulerClient = azureScheduler.createSchedulerClient;
/**
* Generated monitoring client exports.
* @ignore
*/
var azureMonitoring = require('azure-monitoring');
exports.EventsClient = azureMonitoring.EventsClient;
/**
* Creates a new {@link EventsClient} object.
* @method
* @param {object} credentials The credentials, typically a TokenCloudCredential
* @param {string} [baseUri] The base uri.
* @param {array} [filters] Extra request filters to add
* @return {EventsClient} A new EventsClient object.
*/
exports.createEventsClient = azureMonitoring.createEventsClient;
exports.AlertsClient = azureMonitoring.AlertsClient;
/**
* Creates a new {@link AlertsClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {AlertsClient} A new AlertsClient object.
*/
// TODO: uncomment when monitoring is published
// exports.createAlertsClient = azureMonitoring.createAlertsClient;
/**
* Generated AutoScaleClient client exports.
* @ignore
*/
exports.AutoScaleClient = azureMonitoring.AutoScaleClient;
/**
* Creates a new {@link AutoScaleClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {AutoScaleClient} A new AutoScaleClient object.
*/
exports.createAutoScaleClient = azureMonitoring.createAutoScaleClient;
/**
* Generated MetricsClient client exports.
* @ignore
*/
exports.MetricsClient = azureMonitoring.MetricsClient;
/**
* Creates a new {@link MetricsClient} object.
* @method
* @param {object} credentials The credentials object (typically, a CertificateCloudCredentials instance)
* @param {string} credentials.subscriptionId The subscription identifier.
* @param {string} [credentials.cert] The cert value.
* @param {string} [credentials.key] The key value.
* @param {string} [credentials.pem] The PEM file data.
* @param {string} [baseUri] The base uri.
* @return {MetricsClient} A new MetricsClient object.
*/
exports.createMetricsClient = azureMonitoring.createMetricsClient;
/**
* Key Vault client exports.
* @ignore
*/
var azureKeyVault = require('azure-keyvault');
/** Identifier of the resource on which Key Vault users and service principals must authenticate.
*/
exports.KEYVAULT_RESOURCE_ID = azureKeyVault.RESOURCE_ID;
/**
* Initializes a new instance of the KeyVaultClient class.
* @constructor
*
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
exports.KeyVaultClient = azureKeyVault.KeyVaultClient;
/**
* Creates a new {@linkcode KeyVaultClient} object.
*
* @param {object} [credentials] The credentials, typically a {@linkcode KeyVaultCredentials} object. If null, an authentication filter must be provided.
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
exports.createKeyVaultClient = azureKeyVault.createKeyVaultClient;
/**
* Key Vault management client exports.
* @ignore
*/
var azureKeyVaultManagement = require('azure-arm-keyvault');
exports.KeyVaultManagementClient = azureKeyVaultManagement;
/**
* Creates a new instance of the KeyVaultManagementClient.
*
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
*
* @param {string} [baseUri] - The base URI of the service.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
exports.createKeyVaultManagementClient = function (credentials, subscriptionId, options) {
return new azureKeyVaultManagement(credentials, subscriptionId, null, options);
};
/**
* Service Runtime exports.
* @ignore
*/
exports.RoleEnvironment = require('./serviceruntime/roleenvironment');
var azureCommon = require('azure-common');
/**
* Creates a new CertificateCloudCredentials object.
* Either a pair of cert / key values need to be pass or a pem file location.
* @method
* @param {string} credentials.subscription The subscription identifier.
* @param {string} [credentials.cert] The certificate.
* @param {string} [credentials.key] The certificate key.
* @param {string} [credentials.pem] The PEM file content.
* @return {CertificateCloudCredentials}
*/
exports.createCertificateCloudCredentials = azureCommon.createCertificateCloudCredentials;
/**
* Creates a new BasicAuthenticationCloudCredentials object.
* Either a pair of cert / key values need to be pass or a pem file location.
* @method
* @param {string} credentials.username The username.
* @param {string} credentials.password The password.
* @return {BasicAuthenticationCloudCredentials}
*/
exports.createBasicAuthenticationCloudCredentials = azureWebSite.createBasicAuthenticationCloudCredentials;
exports.Constants = azureCommon.Constants;
exports.ServiceClient = azureCommon.ServiceClient;
exports.ServiceClientConstants = azureCommon.ServiceClientConstants;
exports.ConnectionStringParser = azureCommon.ConnectionStringParser;
exports.Logger = azureCommon.Logger;
exports.WebResource = azureCommon.WebResource;
exports.Validate = azureCommon.validate;
exports.date = azureCommon.date;
exports.ServiceSettings = azureCommon.ServiceSettings;
exports.ServiceBusSettings = azureCommon.ServiceBusSettings;
exports.ServiceManagementSettings = azureCommon.ServiceManagementSettings;
exports.StorageServiceSettings = azureCommon.StorageServiceSettings;
// Credentials
exports.CertificateCloudCredentials = azureCommon.CertificateCloudCredentials;
exports.TokenCloudCredentials = azureCommon.TokenCloudCredentials;
exports.AnonymousCloudCredentials = azureCommon.AnonymousCloudCredentials;
exports.SharedAccessSignature = storage.SharedAccessSignature;
exports.SharedKey = storage.SharedKey;
exports.SharedKeyLite = storage.SharedKeyLite;
exports.SharedKeyTable = storage.SharedKeyTable;
exports.SharedKeyLiteTable = storage.SharedKeyLiteTable;
// Other filters
exports.LinearRetryPolicyFilter = azureCommon.LinearRetryPolicyFilter;
exports.ExponentialRetryPolicyFilter = azureCommon.ExponentialRetryPolicyFilter;
exports.UserAgentFilter = azureCommon.UserAgentFilter;
exports.ProxyFilter = azureCommon.ProxyFilter;
exports.LogFilter = azureCommon.LogFilter;
/**
* Check if the application is running in the Microsoft Azure Emulator.
* @property {boolean} isEmulated `true` if the application is running in the emulator; otherwise, `false`.
*/
exports.isEmulated = function (host) {
return azureCommon.ServiceClient.isEmulated(host);
};
/*
* Configuration
*/
var sdkconfig = azureCommon.SdkConfig;
exports.config = sdkconfig;
exports.configure = azureCommon.configure;
exports.dumpConfig = exports.dumpConfig;
var resourceManagement = require('azure-arm-resource');
exports.ResourceManagementClient = resourceManagement.ResourceManagementClient;
/**
* Creates a new instance of the ARM ResourceManagementClient.
*
* @param {credentials} credentials - Gets Azure subscription credentials.
*
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
exports.createResourceManagementClient = function (credentials, subscriptionId, options) {
return new resourceManagement.ResourceManagementClient(credentials, subscriptionId, null, options);
};
exports.ARMFeatureClient = resourceManagement.FeatureClient;
/**
* Creates a new instance of the ARM FeatureManagementClient.
*
* @param {credentials} credentials - Gets Azure subscription credentials.
*
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
exports.createARMFeatureManagementClient = function (credentials, subscriptionId, options) {
return new resourceManagement.FeatureClient(credentials, subscriptionId, null, options);
};
exports.ARMSubscriptionClient = resourceManagement.SubscriptionClient;
/**
* Creates a new instance of the ARM SubscriptionManagementClient.
*
* @param {credentials} credentials - Gets Azure subscription credentials.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
exports.createARMSubscriptionManagementClient = function (credentials, options) {
return new resourceManagement.SubscriptionClient(credentials, null, options);
};
exports.ARMManagementLockClient = resourceManagement.ManagementLockClient;
/**
* Creates a new instance of the ARM Resource ManagementLockClient.
*
* @param {credentials} credentials - Gets Azure subscription credentials.
*
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
exports.createResourceManagementLockClient = function (credentials, subscriptionId, options) {
return new resourceManagement.ManagementLockClient(credentials, subscriptionId, null, options);
};
exports.ARMPolicyClient = resourceManagement.PolicyClient;
/**
* Creates a new instance of the PolicyClient class.
*
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
exports.createResourcePolicyClient = function (credentials, subscriptionId, options) {
return new resourceManagement.PolicyClient(credentials, subscriptionId, null, options);
};
var azureARMStorage = require('azure-arm-storage');
exports.ARMStorageManagementClient = azureARMStorage;
/**
* Creates a new instance of the ARM StorageManagementClient.
*
* @param {credentials} credentials - Gets Azure subscription credentials.
*
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
exports.createARMStorageManagementClient = function (credentials, subscriptionId, options) {
return new azureARMStorage(credentials, subscriptionId, null, options);
};
var azureARMNetwork = require('azure-arm-network');
exports.ARMNetworkManagementClient = azureARMNetwork;
/**
* Creates a new instance of the ARM NetworkManagementClient.
*
* @param {credentials} credentials - Gets Azure subscription credentials.
*
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.