@azure/arm-databox 5.0.0-beta.1 → 5.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/README.md +11 -0
- package/dist/index.js +93 -40
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/jobsBookShipmentPickUpSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsBookShipmentPickUpSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsBookShipmentPickUpSample.js +36 -0
- package/dist-esm/samples-dev/jobsBookShipmentPickUpSample.js.map +1 -0
- package/dist-esm/samples-dev/jobsCancelSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsCancelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsCancelSample.js +32 -0
- package/dist-esm/samples-dev/jobsCancelSample.js.map +1 -0
- package/dist-esm/samples-dev/jobsCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsCreateSample.js +282 -0
- package/dist-esm/samples-dev/jobsCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/jobsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/jobsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/jobsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsGetSample.js +113 -0
- package/dist-esm/samples-dev/jobsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/jobsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/jobsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/jobsListCredentialsSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsListCredentialsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsListCredentialsSample.js +45 -0
- package/dist-esm/samples-dev/jobsListCredentialsSample.js.map +1 -0
- package/dist-esm/samples-dev/jobsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsListSample.js +43 -0
- package/dist-esm/samples-dev/jobsListSample.js.map +1 -0
- package/dist-esm/samples-dev/jobsMarkDevicesShippedSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsMarkDevicesShippedSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsMarkDevicesShippedSample.js +34 -0
- package/dist-esm/samples-dev/jobsMarkDevicesShippedSample.js.map +1 -0
- package/dist-esm/samples-dev/jobsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/jobsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/jobsUpdateSample.js +117 -0
- package/dist-esm/samples-dev/jobsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/mitigateSample.d.ts +2 -0
- package/dist-esm/samples-dev/mitigateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/mitigateSample.js +34 -0
- package/dist-esm/samples-dev/mitigateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +43 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/serviceListAvailableSkusByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/serviceListAvailableSkusByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/serviceListAvailableSkusByResourceGroupSample.js +50 -0
- package/dist-esm/samples-dev/serviceListAvailableSkusByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/serviceRegionConfigurationByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/serviceRegionConfigurationByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/serviceRegionConfigurationByResourceGroupSample.js +37 -0
- package/dist-esm/samples-dev/serviceRegionConfigurationByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/serviceRegionConfigurationSample.d.ts +2 -0
- package/dist-esm/samples-dev/serviceRegionConfigurationSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/serviceRegionConfigurationSample.js +36 -0
- package/dist-esm/samples-dev/serviceRegionConfigurationSample.js.map +1 -0
- package/dist-esm/samples-dev/serviceValidateAddressSample.d.ts +2 -0
- package/dist-esm/samples-dev/serviceValidateAddressSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/serviceValidateAddressSample.js +44 -0
- package/dist-esm/samples-dev/serviceValidateAddressSample.js.map +1 -0
- package/dist-esm/samples-dev/serviceValidateInputsByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/serviceValidateInputsByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/serviceValidateInputsByResourceGroupSample.js +80 -0
- package/dist-esm/samples-dev/serviceValidateInputsByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/serviceValidateInputsSample.d.ts +2 -0
- package/dist-esm/samples-dev/serviceValidateInputsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/serviceValidateInputsSample.js +79 -0
- package/dist-esm/samples-dev/serviceValidateInputsSample.js.map +1 -0
- package/dist-esm/src/dataBoxManagementClient.d.ts.map +1 -1
- package/dist-esm/src/dataBoxManagementClient.js +20 -2
- package/dist-esm/src/dataBoxManagementClient.js.map +1 -1
- package/dist-esm/src/operations/jobs.d.ts.map +1 -1
- package/dist-esm/src/operations/jobs.js +9 -3
- package/dist-esm/src/operations/jobs.js.map +1 -1
- package/package.json +40 -14
- package/rollup.config.js +6 -72
- package/src/dataBoxManagementClient.ts +27 -2
- package/src/operations/jobs.ts +9 -3
- package/tsconfig.json +19 -5
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 5.0.0-beta.
|
|
3
|
+
## 5.0.0-beta.2 (2022-04-15)
|
|
4
4
|
|
|
5
|
-
The package of @azure/arm-databox is using our next generation design principles since version 5.0.0-beta.
|
|
5
|
+
The package of @azure/arm-databox is using our next generation design principles since version 5.0.0-beta.2, which contains breaking changes.
|
|
6
6
|
|
|
7
7
|
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
|
|
8
8
|
|
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
|
|
|
16
16
|
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
|
17
17
|
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
18
|
|
|
19
|
+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
|
20
|
+
|
|
19
21
|
### Prerequisites
|
|
20
22
|
|
|
21
23
|
- An [Azure subscription][azure_sub].
|
|
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|
|
49
51
|
```javascript
|
|
50
52
|
const { DataBoxManagementClient } = require("@azure/arm-databox");
|
|
51
53
|
const { DefaultAzureCredential } = require("@azure/identity");
|
|
54
|
+
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
|
55
|
+
|
|
52
56
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
53
57
|
const client = new DataBoxManagementClient(new DefaultAzureCredential(), subscriptionId);
|
|
58
|
+
|
|
59
|
+
// For client-side applications running in the browser, use this code instead:
|
|
60
|
+
// const credential = new InteractiveBrowserCredential({
|
|
61
|
+
// tenantId: "<YOUR_TENANT_ID>",
|
|
62
|
+
// clientId: "<YOUR_CLIENT_ID>"
|
|
63
|
+
// });
|
|
64
|
+
// const client = new DataBoxManagementClient(credential, subscriptionId);
|
|
54
65
|
```
|
|
55
66
|
|
|
56
67
|
|
package/dist/index.js
CHANGED
|
@@ -3,9 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var coreClient = require('@azure/core-client');
|
|
6
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
6
7
|
var tslib = require('tslib');
|
|
7
8
|
var coreLro = require('@azure/core-lro');
|
|
8
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
30
|
+
|
|
9
31
|
/*
|
|
10
32
|
* Copyright (c) Microsoft Corporation.
|
|
11
33
|
* Licensed under the MIT License.
|
|
@@ -13,6 +35,8 @@ var coreLro = require('@azure/core-lro');
|
|
|
13
35
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
14
36
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
15
37
|
*/
|
|
38
|
+
/** Known values of {@link StageName} that the service accepts. */
|
|
39
|
+
exports.KnownStageName = void 0;
|
|
16
40
|
(function (KnownStageName) {
|
|
17
41
|
/** An order has been created. */
|
|
18
42
|
KnownStageName["DeviceOrdered"] = "DeviceOrdered";
|
|
@@ -57,6 +81,8 @@ var coreLro = require('@azure/core-lro');
|
|
|
57
81
|
/** Shipped the device to customer. */
|
|
58
82
|
KnownStageName["ShippedToCustomer"] = "ShippedToCustomer";
|
|
59
83
|
})(exports.KnownStageName || (exports.KnownStageName = {}));
|
|
84
|
+
/** Known values of {@link NotificationStageName} that the service accepts. */
|
|
85
|
+
exports.KnownNotificationStageName = void 0;
|
|
60
86
|
(function (KnownNotificationStageName) {
|
|
61
87
|
/** Notification at device prepared stage. */
|
|
62
88
|
KnownNotificationStageName["DevicePrepared"] = "DevicePrepared";
|
|
@@ -75,6 +101,8 @@ var coreLro = require('@azure/core-lro');
|
|
|
75
101
|
/** Notification at shipped devices to customer stage. */
|
|
76
102
|
KnownNotificationStageName["ShippedToCustomer"] = "ShippedToCustomer";
|
|
77
103
|
})(exports.KnownNotificationStageName || (exports.KnownNotificationStageName = {}));
|
|
104
|
+
/** Known values of {@link DataCenterCode} that the service accepts. */
|
|
105
|
+
exports.KnownDataCenterCode = void 0;
|
|
78
106
|
(function (KnownDataCenterCode) {
|
|
79
107
|
KnownDataCenterCode["Invalid"] = "Invalid";
|
|
80
108
|
KnownDataCenterCode["BY2"] = "BY2";
|
|
@@ -127,6 +155,8 @@ var coreLro = require('@azure/core-lro');
|
|
|
127
155
|
KnownDataCenterCode["CH1"] = "CH1";
|
|
128
156
|
KnownDataCenterCode["DSM05"] = "DSM05";
|
|
129
157
|
})(exports.KnownDataCenterCode || (exports.KnownDataCenterCode = {}));
|
|
158
|
+
/** Known values of {@link CopyStatus} that the service accepts. */
|
|
159
|
+
exports.KnownCopyStatus = void 0;
|
|
130
160
|
(function (KnownCopyStatus) {
|
|
131
161
|
/** Data copy hasn't started yet. */
|
|
132
162
|
KnownCopyStatus["NotStarted"] = "NotStarted";
|
|
@@ -4445,7 +4475,7 @@ class OperationsImpl {
|
|
|
4445
4475
|
* @param options The options parameters.
|
|
4446
4476
|
*/
|
|
4447
4477
|
_list(options) {
|
|
4448
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
4478
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$1);
|
|
4449
4479
|
}
|
|
4450
4480
|
/**
|
|
4451
4481
|
* ListNext
|
|
@@ -4453,12 +4483,12 @@ class OperationsImpl {
|
|
|
4453
4483
|
* @param options The options parameters.
|
|
4454
4484
|
*/
|
|
4455
4485
|
_listNext(nextLink, options) {
|
|
4456
|
-
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
4486
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
|
|
4457
4487
|
}
|
|
4458
4488
|
}
|
|
4459
4489
|
// Operation Specifications
|
|
4460
|
-
const serializer =
|
|
4461
|
-
const listOperationSpec = {
|
|
4490
|
+
const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
4491
|
+
const listOperationSpec$1 = {
|
|
4462
4492
|
path: "/providers/Microsoft.DataBox/operations",
|
|
4463
4493
|
httpMethod: "GET",
|
|
4464
4494
|
responses: {
|
|
@@ -4472,9 +4502,9 @@ const listOperationSpec = {
|
|
|
4472
4502
|
queryParameters: [apiVersion],
|
|
4473
4503
|
urlParameters: [$host],
|
|
4474
4504
|
headerParameters: [accept],
|
|
4475
|
-
serializer
|
|
4505
|
+
serializer: serializer$3
|
|
4476
4506
|
};
|
|
4477
|
-
const listNextOperationSpec = {
|
|
4507
|
+
const listNextOperationSpec$1 = {
|
|
4478
4508
|
path: "{nextLink}",
|
|
4479
4509
|
httpMethod: "GET",
|
|
4480
4510
|
responses: {
|
|
@@ -4488,7 +4518,7 @@ const listNextOperationSpec = {
|
|
|
4488
4518
|
queryParameters: [apiVersion],
|
|
4489
4519
|
urlParameters: [$host, nextLink],
|
|
4490
4520
|
headerParameters: [accept],
|
|
4491
|
-
serializer
|
|
4521
|
+
serializer: serializer$3
|
|
4492
4522
|
};
|
|
4493
4523
|
|
|
4494
4524
|
/*
|
|
@@ -4683,7 +4713,7 @@ class JobsImpl {
|
|
|
4683
4713
|
* @param options The options parameters.
|
|
4684
4714
|
*/
|
|
4685
4715
|
_list(options) {
|
|
4686
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec
|
|
4716
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
4687
4717
|
}
|
|
4688
4718
|
/**
|
|
4689
4719
|
* Request to mark devices for a given job as shipped
|
|
@@ -4748,10 +4778,12 @@ class JobsImpl {
|
|
|
4748
4778
|
};
|
|
4749
4779
|
});
|
|
4750
4780
|
const lro = new LroImpl(sendOperation, { resourceGroupName, jobName, jobResource, options }, createOperationSpec);
|
|
4751
|
-
|
|
4781
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
4752
4782
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
4753
4783
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
4754
4784
|
});
|
|
4785
|
+
yield poller.poll();
|
|
4786
|
+
return poller;
|
|
4755
4787
|
});
|
|
4756
4788
|
}
|
|
4757
4789
|
/**
|
|
@@ -4801,10 +4833,12 @@ class JobsImpl {
|
|
|
4801
4833
|
};
|
|
4802
4834
|
});
|
|
4803
4835
|
const lro = new LroImpl(sendOperation, { resourceGroupName, jobName, options }, deleteOperationSpec);
|
|
4804
|
-
|
|
4836
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
4805
4837
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
4806
4838
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
4807
4839
|
});
|
|
4840
|
+
yield poller.poll();
|
|
4841
|
+
return poller;
|
|
4808
4842
|
});
|
|
4809
4843
|
}
|
|
4810
4844
|
/**
|
|
@@ -4853,10 +4887,12 @@ class JobsImpl {
|
|
|
4853
4887
|
};
|
|
4854
4888
|
});
|
|
4855
4889
|
const lro = new LroImpl(sendOperation, { resourceGroupName, jobName, jobResourceUpdateParameter, options }, updateOperationSpec);
|
|
4856
|
-
|
|
4890
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
4857
4891
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
4858
4892
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
4859
4893
|
});
|
|
4894
|
+
yield poller.poll();
|
|
4895
|
+
return poller;
|
|
4860
4896
|
});
|
|
4861
4897
|
}
|
|
4862
4898
|
/**
|
|
@@ -4911,7 +4947,7 @@ class JobsImpl {
|
|
|
4911
4947
|
* @param options The options parameters.
|
|
4912
4948
|
*/
|
|
4913
4949
|
_listNext(nextLink, options) {
|
|
4914
|
-
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec
|
|
4950
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
4915
4951
|
}
|
|
4916
4952
|
/**
|
|
4917
4953
|
* ListByResourceGroupNext
|
|
@@ -4924,8 +4960,8 @@ class JobsImpl {
|
|
|
4924
4960
|
}
|
|
4925
4961
|
}
|
|
4926
4962
|
// Operation Specifications
|
|
4927
|
-
const serializer$
|
|
4928
|
-
const listOperationSpec
|
|
4963
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
4964
|
+
const listOperationSpec = {
|
|
4929
4965
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs",
|
|
4930
4966
|
httpMethod: "GET",
|
|
4931
4967
|
responses: {
|
|
@@ -4939,7 +4975,7 @@ const listOperationSpec$1 = {
|
|
|
4939
4975
|
queryParameters: [apiVersion, skipToken],
|
|
4940
4976
|
urlParameters: [$host, subscriptionId],
|
|
4941
4977
|
headerParameters: [accept],
|
|
4942
|
-
serializer: serializer$
|
|
4978
|
+
serializer: serializer$2
|
|
4943
4979
|
};
|
|
4944
4980
|
const markDevicesShippedOperationSpec = {
|
|
4945
4981
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/markDevicesShipped",
|
|
@@ -4960,7 +4996,7 @@ const markDevicesShippedOperationSpec = {
|
|
|
4960
4996
|
],
|
|
4961
4997
|
headerParameters: [accept, contentType],
|
|
4962
4998
|
mediaType: "json",
|
|
4963
|
-
serializer: serializer$
|
|
4999
|
+
serializer: serializer$2
|
|
4964
5000
|
};
|
|
4965
5001
|
const listByResourceGroupOperationSpec = {
|
|
4966
5002
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs",
|
|
@@ -4980,7 +5016,7 @@ const listByResourceGroupOperationSpec = {
|
|
|
4980
5016
|
resourceGroupName
|
|
4981
5017
|
],
|
|
4982
5018
|
headerParameters: [accept],
|
|
4983
|
-
serializer: serializer$
|
|
5019
|
+
serializer: serializer$2
|
|
4984
5020
|
};
|
|
4985
5021
|
const getOperationSpec = {
|
|
4986
5022
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}",
|
|
@@ -5001,7 +5037,7 @@ const getOperationSpec = {
|
|
|
5001
5037
|
resourceGroupName
|
|
5002
5038
|
],
|
|
5003
5039
|
headerParameters: [accept],
|
|
5004
|
-
serializer: serializer$
|
|
5040
|
+
serializer: serializer$2
|
|
5005
5041
|
};
|
|
5006
5042
|
const createOperationSpec = {
|
|
5007
5043
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}",
|
|
@@ -5033,7 +5069,7 @@ const createOperationSpec = {
|
|
|
5033
5069
|
],
|
|
5034
5070
|
headerParameters: [accept, contentType],
|
|
5035
5071
|
mediaType: "json",
|
|
5036
|
-
serializer: serializer$
|
|
5072
|
+
serializer: serializer$2
|
|
5037
5073
|
};
|
|
5038
5074
|
const deleteOperationSpec = {
|
|
5039
5075
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}",
|
|
@@ -5055,7 +5091,7 @@ const deleteOperationSpec = {
|
|
|
5055
5091
|
resourceGroupName
|
|
5056
5092
|
],
|
|
5057
5093
|
headerParameters: [accept],
|
|
5058
|
-
serializer: serializer$
|
|
5094
|
+
serializer: serializer$2
|
|
5059
5095
|
};
|
|
5060
5096
|
const updateOperationSpec = {
|
|
5061
5097
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}",
|
|
@@ -5091,7 +5127,7 @@ const updateOperationSpec = {
|
|
|
5091
5127
|
ifMatch
|
|
5092
5128
|
],
|
|
5093
5129
|
mediaType: "json",
|
|
5094
|
-
serializer: serializer$
|
|
5130
|
+
serializer: serializer$2
|
|
5095
5131
|
};
|
|
5096
5132
|
const bookShipmentPickUpOperationSpec = {
|
|
5097
5133
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp",
|
|
@@ -5114,7 +5150,7 @@ const bookShipmentPickUpOperationSpec = {
|
|
|
5114
5150
|
],
|
|
5115
5151
|
headerParameters: [accept, contentType],
|
|
5116
5152
|
mediaType: "json",
|
|
5117
|
-
serializer: serializer$
|
|
5153
|
+
serializer: serializer$2
|
|
5118
5154
|
};
|
|
5119
5155
|
const cancelOperationSpec = {
|
|
5120
5156
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel",
|
|
@@ -5135,7 +5171,7 @@ const cancelOperationSpec = {
|
|
|
5135
5171
|
],
|
|
5136
5172
|
headerParameters: [accept, contentType],
|
|
5137
5173
|
mediaType: "json",
|
|
5138
|
-
serializer: serializer$
|
|
5174
|
+
serializer: serializer$2
|
|
5139
5175
|
};
|
|
5140
5176
|
const listCredentialsOperationSpec = {
|
|
5141
5177
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials",
|
|
@@ -5156,9 +5192,9 @@ const listCredentialsOperationSpec = {
|
|
|
5156
5192
|
resourceGroupName
|
|
5157
5193
|
],
|
|
5158
5194
|
headerParameters: [accept],
|
|
5159
|
-
serializer: serializer$
|
|
5195
|
+
serializer: serializer$2
|
|
5160
5196
|
};
|
|
5161
|
-
const listNextOperationSpec
|
|
5197
|
+
const listNextOperationSpec = {
|
|
5162
5198
|
path: "{nextLink}",
|
|
5163
5199
|
httpMethod: "GET",
|
|
5164
5200
|
responses: {
|
|
@@ -5176,7 +5212,7 @@ const listNextOperationSpec$1 = {
|
|
|
5176
5212
|
subscriptionId
|
|
5177
5213
|
],
|
|
5178
5214
|
headerParameters: [accept],
|
|
5179
|
-
serializer: serializer$
|
|
5215
|
+
serializer: serializer$2
|
|
5180
5216
|
};
|
|
5181
5217
|
const listByResourceGroupNextOperationSpec = {
|
|
5182
5218
|
path: "{nextLink}",
|
|
@@ -5197,7 +5233,7 @@ const listByResourceGroupNextOperationSpec = {
|
|
|
5197
5233
|
resourceGroupName
|
|
5198
5234
|
],
|
|
5199
5235
|
headerParameters: [accept],
|
|
5200
|
-
serializer: serializer$
|
|
5236
|
+
serializer: serializer$2
|
|
5201
5237
|
};
|
|
5202
5238
|
|
|
5203
5239
|
/*
|
|
@@ -5343,7 +5379,7 @@ class ServiceImpl {
|
|
|
5343
5379
|
}
|
|
5344
5380
|
}
|
|
5345
5381
|
// Operation Specifications
|
|
5346
|
-
const serializer$
|
|
5382
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
5347
5383
|
const listAvailableSkusByResourceGroupOperationSpec = {
|
|
5348
5384
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus",
|
|
5349
5385
|
httpMethod: "POST",
|
|
@@ -5365,7 +5401,7 @@ const listAvailableSkusByResourceGroupOperationSpec = {
|
|
|
5365
5401
|
],
|
|
5366
5402
|
headerParameters: [accept, contentType],
|
|
5367
5403
|
mediaType: "json",
|
|
5368
|
-
serializer: serializer$
|
|
5404
|
+
serializer: serializer$1
|
|
5369
5405
|
};
|
|
5370
5406
|
const validateAddressOperationSpec = {
|
|
5371
5407
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress",
|
|
@@ -5387,7 +5423,7 @@ const validateAddressOperationSpec = {
|
|
|
5387
5423
|
],
|
|
5388
5424
|
headerParameters: [accept, contentType],
|
|
5389
5425
|
mediaType: "json",
|
|
5390
|
-
serializer: serializer$
|
|
5426
|
+
serializer: serializer$1
|
|
5391
5427
|
};
|
|
5392
5428
|
const validateInputsByResourceGroupOperationSpec = {
|
|
5393
5429
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs",
|
|
@@ -5410,7 +5446,7 @@ const validateInputsByResourceGroupOperationSpec = {
|
|
|
5410
5446
|
],
|
|
5411
5447
|
headerParameters: [accept, contentType],
|
|
5412
5448
|
mediaType: "json",
|
|
5413
|
-
serializer: serializer$
|
|
5449
|
+
serializer: serializer$1
|
|
5414
5450
|
};
|
|
5415
5451
|
const validateInputsOperationSpec = {
|
|
5416
5452
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs",
|
|
@@ -5432,7 +5468,7 @@ const validateInputsOperationSpec = {
|
|
|
5432
5468
|
],
|
|
5433
5469
|
headerParameters: [accept, contentType],
|
|
5434
5470
|
mediaType: "json",
|
|
5435
|
-
serializer: serializer$
|
|
5471
|
+
serializer: serializer$1
|
|
5436
5472
|
};
|
|
5437
5473
|
const regionConfigurationOperationSpec = {
|
|
5438
5474
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration",
|
|
@@ -5454,7 +5490,7 @@ const regionConfigurationOperationSpec = {
|
|
|
5454
5490
|
],
|
|
5455
5491
|
headerParameters: [accept, contentType],
|
|
5456
5492
|
mediaType: "json",
|
|
5457
|
-
serializer: serializer$
|
|
5493
|
+
serializer: serializer$1
|
|
5458
5494
|
};
|
|
5459
5495
|
const regionConfigurationByResourceGroupOperationSpec = {
|
|
5460
5496
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration",
|
|
@@ -5477,7 +5513,7 @@ const regionConfigurationByResourceGroupOperationSpec = {
|
|
|
5477
5513
|
],
|
|
5478
5514
|
headerParameters: [accept, contentType],
|
|
5479
5515
|
mediaType: "json",
|
|
5480
|
-
serializer: serializer$
|
|
5516
|
+
serializer: serializer$1
|
|
5481
5517
|
};
|
|
5482
5518
|
const listAvailableSkusByResourceGroupNextOperationSpec = {
|
|
5483
5519
|
path: "{nextLink}",
|
|
@@ -5500,7 +5536,7 @@ const listAvailableSkusByResourceGroupNextOperationSpec = {
|
|
|
5500
5536
|
],
|
|
5501
5537
|
headerParameters: [accept, contentType],
|
|
5502
5538
|
mediaType: "json",
|
|
5503
|
-
serializer: serializer$
|
|
5539
|
+
serializer: serializer$1
|
|
5504
5540
|
};
|
|
5505
5541
|
|
|
5506
5542
|
/*
|
|
@@ -5510,7 +5546,7 @@ const listAvailableSkusByResourceGroupNextOperationSpec = {
|
|
|
5510
5546
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
5511
5547
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
5512
5548
|
*/
|
|
5513
|
-
class DataBoxManagementClient extends
|
|
5549
|
+
class DataBoxManagementClient extends coreClient__namespace.ServiceClient {
|
|
5514
5550
|
/**
|
|
5515
5551
|
* Initializes a new instance of the DataBoxManagementClient class.
|
|
5516
5552
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -5518,6 +5554,7 @@ class DataBoxManagementClient extends coreClient.ServiceClient {
|
|
|
5518
5554
|
* @param options The parameter options
|
|
5519
5555
|
*/
|
|
5520
5556
|
constructor(credentials, subscriptionId, options) {
|
|
5557
|
+
var _a, _b;
|
|
5521
5558
|
if (credentials === undefined) {
|
|
5522
5559
|
throw new Error("'credentials' cannot be null");
|
|
5523
5560
|
}
|
|
@@ -5532,7 +5569,7 @@ class DataBoxManagementClient extends coreClient.ServiceClient {
|
|
|
5532
5569
|
requestContentType: "application/json; charset=utf-8",
|
|
5533
5570
|
credential: credentials
|
|
5534
5571
|
};
|
|
5535
|
-
const packageDetails = `azsdk-js-arm-databox/5.0.0-beta.
|
|
5572
|
+
const packageDetails = `azsdk-js-arm-databox/5.0.0-beta.2`;
|
|
5536
5573
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
5537
5574
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
5538
5575
|
: `${packageDetails}`;
|
|
@@ -5541,8 +5578,24 @@ class DataBoxManagementClient extends coreClient.ServiceClient {
|
|
|
5541
5578
|
}
|
|
5542
5579
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
5543
5580
|
userAgentPrefix
|
|
5544
|
-
}, baseUri: options.endpoint
|
|
5581
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
5545
5582
|
super(optionsWithDefaults);
|
|
5583
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
5584
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
5585
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
5586
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
5587
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
5588
|
+
this.pipeline.removePolicy({
|
|
5589
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
5590
|
+
});
|
|
5591
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
5592
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
5593
|
+
challengeCallbacks: {
|
|
5594
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
5595
|
+
}
|
|
5596
|
+
}));
|
|
5597
|
+
}
|
|
5598
|
+
}
|
|
5546
5599
|
// Parameter assignments
|
|
5547
5600
|
this.subscriptionId = subscriptionId;
|
|
5548
5601
|
// Assigning values to Constant parameters
|
|
@@ -5565,7 +5618,7 @@ class DataBoxManagementClient extends coreClient.ServiceClient {
|
|
|
5565
5618
|
}
|
|
5566
5619
|
}
|
|
5567
5620
|
// Operation Specifications
|
|
5568
|
-
const serializer
|
|
5621
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
5569
5622
|
const mitigateOperationSpec = {
|
|
5570
5623
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate",
|
|
5571
5624
|
httpMethod: "POST",
|
|
@@ -5585,7 +5638,7 @@ const mitigateOperationSpec = {
|
|
|
5585
5638
|
],
|
|
5586
5639
|
headerParameters: [accept, contentType],
|
|
5587
5640
|
mediaType: "json",
|
|
5588
|
-
serializer
|
|
5641
|
+
serializer
|
|
5589
5642
|
};
|
|
5590
5643
|
|
|
5591
5644
|
exports.DataBoxManagementClient = DataBoxManagementClient;
|