@azure/arm-imagebuilder 1.0.2-alpha.20220421.1 → 1.0.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 +3 -7
- package/README.md +11 -0
- package/dist/index.js +88 -33
- 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/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/virtualMachineImageTemplatesCancelSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesCancelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesCancelSample.js +31 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesCancelSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesCreateOrUpdateSample.js +183 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesDeleteSample.js +31 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesGetRunOutputSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesGetRunOutputSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesGetRunOutputSample.js +32 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesGetRunOutputSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesGetSample.js +31 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListRunOutputsSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListRunOutputsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListRunOutputsSample.js +45 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListRunOutputsSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListSample.js +43 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesListSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesRunSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesRunSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesRunSample.js +31 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesRunSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesUpdateSample.js +55 -0
- package/dist-esm/samples-dev/virtualMachineImageTemplatesUpdateSample.js.map +1 -0
- package/dist-esm/src/imageBuilderClient.d.ts.map +1 -1
- package/dist-esm/src/imageBuilderClient.js +20 -2
- package/dist-esm/src/imageBuilderClient.js.map +1 -1
- package/dist-esm/src/operations/virtualMachineImageTemplates.d.ts.map +1 -1
- package/dist-esm/src/operations/virtualMachineImageTemplates.js +15 -5
- package/dist-esm/src/operations/virtualMachineImageTemplates.js.map +1 -1
- package/package.json +26 -10
- package/rollup.config.js +6 -72
- package/src/imageBuilderClient.ts +27 -2
- package/src/operations/virtualMachineImageTemplates.ts +15 -5
- package/tsconfig.json +19 -5
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ Azure Virtual Machine Image Builder Client
|
|
|
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 { ImageBuilderClient } = require("@azure/arm-imagebuilder");
|
|
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 ImageBuilderClient(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 ImageBuilderClient(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 ProvisioningErrorCode} that the service accepts. */
|
|
39
|
+
exports.KnownProvisioningErrorCode = void 0;
|
|
16
40
|
(function (KnownProvisioningErrorCode) {
|
|
17
41
|
KnownProvisioningErrorCode["BadSourceType"] = "BadSourceType";
|
|
18
42
|
KnownProvisioningErrorCode["BadPIRSource"] = "BadPIRSource";
|
|
@@ -26,12 +50,16 @@ var coreLro = require('@azure/core-lro');
|
|
|
26
50
|
KnownProvisioningErrorCode["ServerError"] = "ServerError";
|
|
27
51
|
KnownProvisioningErrorCode["Other"] = "Other";
|
|
28
52
|
})(exports.KnownProvisioningErrorCode || (exports.KnownProvisioningErrorCode = {}));
|
|
53
|
+
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
54
|
+
exports.KnownCreatedByType = void 0;
|
|
29
55
|
(function (KnownCreatedByType) {
|
|
30
56
|
KnownCreatedByType["User"] = "User";
|
|
31
57
|
KnownCreatedByType["Application"] = "Application";
|
|
32
58
|
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
33
59
|
KnownCreatedByType["Key"] = "Key";
|
|
34
60
|
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
61
|
+
/** Known values of {@link SharedImageStorageAccountType} that the service accepts. */
|
|
62
|
+
exports.KnownSharedImageStorageAccountType = void 0;
|
|
35
63
|
(function (KnownSharedImageStorageAccountType) {
|
|
36
64
|
KnownSharedImageStorageAccountType["StandardLRS"] = "Standard_LRS";
|
|
37
65
|
KnownSharedImageStorageAccountType["StandardZRS"] = "Standard_ZRS";
|
|
@@ -1483,7 +1511,7 @@ class VirtualMachineImageTemplatesImpl {
|
|
|
1483
1511
|
* @param options The options parameters.
|
|
1484
1512
|
*/
|
|
1485
1513
|
_list(options) {
|
|
1486
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
1514
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$1);
|
|
1487
1515
|
}
|
|
1488
1516
|
/**
|
|
1489
1517
|
* Gets information about the VM image templates associated with the specified resource group.
|
|
@@ -1525,11 +1553,13 @@ class VirtualMachineImageTemplatesImpl {
|
|
|
1525
1553
|
};
|
|
1526
1554
|
});
|
|
1527
1555
|
const lro = new LroImpl(sendOperation, { resourceGroupName, imageTemplateName, parameters, options }, createOrUpdateOperationSpec);
|
|
1528
|
-
|
|
1556
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1529
1557
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1530
1558
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1531
1559
|
lroResourceLocationConfig: "azure-async-operation"
|
|
1532
1560
|
});
|
|
1561
|
+
yield poller.poll();
|
|
1562
|
+
return poller;
|
|
1533
1563
|
});
|
|
1534
1564
|
}
|
|
1535
1565
|
/**
|
|
@@ -1577,11 +1607,13 @@ class VirtualMachineImageTemplatesImpl {
|
|
|
1577
1607
|
};
|
|
1578
1608
|
});
|
|
1579
1609
|
const lro = new LroImpl(sendOperation, { resourceGroupName, imageTemplateName, parameters, options }, updateOperationSpec);
|
|
1580
|
-
|
|
1610
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1581
1611
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1582
1612
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1583
1613
|
lroResourceLocationConfig: "azure-async-operation"
|
|
1584
1614
|
});
|
|
1615
|
+
yield poller.poll();
|
|
1616
|
+
return poller;
|
|
1585
1617
|
});
|
|
1586
1618
|
}
|
|
1587
1619
|
/**
|
|
@@ -1637,11 +1669,13 @@ class VirtualMachineImageTemplatesImpl {
|
|
|
1637
1669
|
};
|
|
1638
1670
|
});
|
|
1639
1671
|
const lro = new LroImpl(sendOperation, { resourceGroupName, imageTemplateName, options }, deleteOperationSpec);
|
|
1640
|
-
|
|
1672
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1641
1673
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1642
1674
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1643
1675
|
lroResourceLocationConfig: "azure-async-operation"
|
|
1644
1676
|
});
|
|
1677
|
+
yield poller.poll();
|
|
1678
|
+
return poller;
|
|
1645
1679
|
});
|
|
1646
1680
|
}
|
|
1647
1681
|
/**
|
|
@@ -1687,11 +1721,13 @@ class VirtualMachineImageTemplatesImpl {
|
|
|
1687
1721
|
};
|
|
1688
1722
|
});
|
|
1689
1723
|
const lro = new LroImpl(sendOperation, { resourceGroupName, imageTemplateName, options }, runOperationSpec);
|
|
1690
|
-
|
|
1724
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1691
1725
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1692
1726
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1693
1727
|
lroResourceLocationConfig: "azure-async-operation"
|
|
1694
1728
|
});
|
|
1729
|
+
yield poller.poll();
|
|
1730
|
+
return poller;
|
|
1695
1731
|
});
|
|
1696
1732
|
}
|
|
1697
1733
|
/**
|
|
@@ -1737,11 +1773,13 @@ class VirtualMachineImageTemplatesImpl {
|
|
|
1737
1773
|
};
|
|
1738
1774
|
});
|
|
1739
1775
|
const lro = new LroImpl(sendOperation, { resourceGroupName, imageTemplateName, options }, cancelOperationSpec);
|
|
1740
|
-
|
|
1776
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1741
1777
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1742
1778
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1743
1779
|
lroResourceLocationConfig: "azure-async-operation"
|
|
1744
1780
|
});
|
|
1781
|
+
yield poller.poll();
|
|
1782
|
+
return poller;
|
|
1745
1783
|
});
|
|
1746
1784
|
}
|
|
1747
1785
|
/**
|
|
@@ -1781,7 +1819,7 @@ class VirtualMachineImageTemplatesImpl {
|
|
|
1781
1819
|
* @param options The options parameters.
|
|
1782
1820
|
*/
|
|
1783
1821
|
_listNext(nextLink, options) {
|
|
1784
|
-
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
1822
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
|
|
1785
1823
|
}
|
|
1786
1824
|
/**
|
|
1787
1825
|
* ListByResourceGroupNext
|
|
@@ -1804,8 +1842,8 @@ class VirtualMachineImageTemplatesImpl {
|
|
|
1804
1842
|
}
|
|
1805
1843
|
}
|
|
1806
1844
|
// Operation Specifications
|
|
1807
|
-
const serializer =
|
|
1808
|
-
const listOperationSpec = {
|
|
1845
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1846
|
+
const listOperationSpec$1 = {
|
|
1809
1847
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.VirtualMachineImages/imageTemplates",
|
|
1810
1848
|
httpMethod: "GET",
|
|
1811
1849
|
responses: {
|
|
@@ -1819,7 +1857,7 @@ const listOperationSpec = {
|
|
|
1819
1857
|
queryParameters: [apiVersion],
|
|
1820
1858
|
urlParameters: [$host, subscriptionId],
|
|
1821
1859
|
headerParameters: [accept],
|
|
1822
|
-
serializer
|
|
1860
|
+
serializer: serializer$1
|
|
1823
1861
|
};
|
|
1824
1862
|
const listByResourceGroupOperationSpec = {
|
|
1825
1863
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates",
|
|
@@ -1839,7 +1877,7 @@ const listByResourceGroupOperationSpec = {
|
|
|
1839
1877
|
resourceGroupName
|
|
1840
1878
|
],
|
|
1841
1879
|
headerParameters: [accept],
|
|
1842
|
-
serializer
|
|
1880
|
+
serializer: serializer$1
|
|
1843
1881
|
};
|
|
1844
1882
|
const createOrUpdateOperationSpec = {
|
|
1845
1883
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
|
|
@@ -1871,7 +1909,7 @@ const createOrUpdateOperationSpec = {
|
|
|
1871
1909
|
],
|
|
1872
1910
|
headerParameters: [accept, contentType],
|
|
1873
1911
|
mediaType: "json",
|
|
1874
|
-
serializer
|
|
1912
|
+
serializer: serializer$1
|
|
1875
1913
|
};
|
|
1876
1914
|
const updateOperationSpec = {
|
|
1877
1915
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
|
|
@@ -1903,7 +1941,7 @@ const updateOperationSpec = {
|
|
|
1903
1941
|
],
|
|
1904
1942
|
headerParameters: [accept, contentType],
|
|
1905
1943
|
mediaType: "json",
|
|
1906
|
-
serializer
|
|
1944
|
+
serializer: serializer$1
|
|
1907
1945
|
};
|
|
1908
1946
|
const getOperationSpec = {
|
|
1909
1947
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
|
|
@@ -1924,7 +1962,7 @@ const getOperationSpec = {
|
|
|
1924
1962
|
imageTemplateName
|
|
1925
1963
|
],
|
|
1926
1964
|
headerParameters: [accept],
|
|
1927
|
-
serializer
|
|
1965
|
+
serializer: serializer$1
|
|
1928
1966
|
};
|
|
1929
1967
|
const deleteOperationSpec = {
|
|
1930
1968
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
|
|
@@ -1946,7 +1984,7 @@ const deleteOperationSpec = {
|
|
|
1946
1984
|
imageTemplateName
|
|
1947
1985
|
],
|
|
1948
1986
|
headerParameters: [accept],
|
|
1949
|
-
serializer
|
|
1987
|
+
serializer: serializer$1
|
|
1950
1988
|
};
|
|
1951
1989
|
const runOperationSpec = {
|
|
1952
1990
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/run",
|
|
@@ -1968,7 +2006,7 @@ const runOperationSpec = {
|
|
|
1968
2006
|
imageTemplateName
|
|
1969
2007
|
],
|
|
1970
2008
|
headerParameters: [accept],
|
|
1971
|
-
serializer
|
|
2009
|
+
serializer: serializer$1
|
|
1972
2010
|
};
|
|
1973
2011
|
const cancelOperationSpec = {
|
|
1974
2012
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/cancel",
|
|
@@ -1990,7 +2028,7 @@ const cancelOperationSpec = {
|
|
|
1990
2028
|
imageTemplateName
|
|
1991
2029
|
],
|
|
1992
2030
|
headerParameters: [accept],
|
|
1993
|
-
serializer
|
|
2031
|
+
serializer: serializer$1
|
|
1994
2032
|
};
|
|
1995
2033
|
const listRunOutputsOperationSpec = {
|
|
1996
2034
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs",
|
|
@@ -2011,7 +2049,7 @@ const listRunOutputsOperationSpec = {
|
|
|
2011
2049
|
imageTemplateName
|
|
2012
2050
|
],
|
|
2013
2051
|
headerParameters: [accept],
|
|
2014
|
-
serializer
|
|
2052
|
+
serializer: serializer$1
|
|
2015
2053
|
};
|
|
2016
2054
|
const getRunOutputOperationSpec = {
|
|
2017
2055
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs/{runOutputName}",
|
|
@@ -2033,9 +2071,9 @@ const getRunOutputOperationSpec = {
|
|
|
2033
2071
|
runOutputName
|
|
2034
2072
|
],
|
|
2035
2073
|
headerParameters: [accept],
|
|
2036
|
-
serializer
|
|
2074
|
+
serializer: serializer$1
|
|
2037
2075
|
};
|
|
2038
|
-
const listNextOperationSpec = {
|
|
2076
|
+
const listNextOperationSpec$1 = {
|
|
2039
2077
|
path: "{nextLink}",
|
|
2040
2078
|
httpMethod: "GET",
|
|
2041
2079
|
responses: {
|
|
@@ -2053,7 +2091,7 @@ const listNextOperationSpec = {
|
|
|
2053
2091
|
nextLink
|
|
2054
2092
|
],
|
|
2055
2093
|
headerParameters: [accept],
|
|
2056
|
-
serializer
|
|
2094
|
+
serializer: serializer$1
|
|
2057
2095
|
};
|
|
2058
2096
|
const listByResourceGroupNextOperationSpec = {
|
|
2059
2097
|
path: "{nextLink}",
|
|
@@ -2074,7 +2112,7 @@ const listByResourceGroupNextOperationSpec = {
|
|
|
2074
2112
|
nextLink
|
|
2075
2113
|
],
|
|
2076
2114
|
headerParameters: [accept],
|
|
2077
|
-
serializer
|
|
2115
|
+
serializer: serializer$1
|
|
2078
2116
|
};
|
|
2079
2117
|
const listRunOutputsNextOperationSpec = {
|
|
2080
2118
|
path: "{nextLink}",
|
|
@@ -2096,7 +2134,7 @@ const listRunOutputsNextOperationSpec = {
|
|
|
2096
2134
|
nextLink
|
|
2097
2135
|
],
|
|
2098
2136
|
headerParameters: [accept],
|
|
2099
|
-
serializer
|
|
2137
|
+
serializer: serializer$1
|
|
2100
2138
|
};
|
|
2101
2139
|
|
|
2102
2140
|
/*
|
|
@@ -2169,7 +2207,7 @@ class OperationsImpl {
|
|
|
2169
2207
|
* @param options The options parameters.
|
|
2170
2208
|
*/
|
|
2171
2209
|
_list(options) {
|
|
2172
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec
|
|
2210
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
2173
2211
|
}
|
|
2174
2212
|
/**
|
|
2175
2213
|
* ListNext
|
|
@@ -2177,12 +2215,12 @@ class OperationsImpl {
|
|
|
2177
2215
|
* @param options The options parameters.
|
|
2178
2216
|
*/
|
|
2179
2217
|
_listNext(nextLink, options) {
|
|
2180
|
-
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec
|
|
2218
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
2181
2219
|
}
|
|
2182
2220
|
}
|
|
2183
2221
|
// Operation Specifications
|
|
2184
|
-
const serializer
|
|
2185
|
-
const listOperationSpec
|
|
2222
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
2223
|
+
const listOperationSpec = {
|
|
2186
2224
|
path: "/providers/Microsoft.VirtualMachineImages/operations",
|
|
2187
2225
|
httpMethod: "GET",
|
|
2188
2226
|
responses: {
|
|
@@ -2196,9 +2234,9 @@ const listOperationSpec$1 = {
|
|
|
2196
2234
|
queryParameters: [apiVersion],
|
|
2197
2235
|
urlParameters: [$host],
|
|
2198
2236
|
headerParameters: [accept],
|
|
2199
|
-
serializer
|
|
2237
|
+
serializer
|
|
2200
2238
|
};
|
|
2201
|
-
const listNextOperationSpec
|
|
2239
|
+
const listNextOperationSpec = {
|
|
2202
2240
|
path: "{nextLink}",
|
|
2203
2241
|
httpMethod: "GET",
|
|
2204
2242
|
responses: {
|
|
@@ -2212,7 +2250,7 @@ const listNextOperationSpec$1 = {
|
|
|
2212
2250
|
queryParameters: [apiVersion],
|
|
2213
2251
|
urlParameters: [$host, nextLink],
|
|
2214
2252
|
headerParameters: [accept],
|
|
2215
|
-
serializer
|
|
2253
|
+
serializer
|
|
2216
2254
|
};
|
|
2217
2255
|
|
|
2218
2256
|
/*
|
|
@@ -2222,7 +2260,7 @@ const listNextOperationSpec$1 = {
|
|
|
2222
2260
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
2223
2261
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
2224
2262
|
*/
|
|
2225
|
-
class ImageBuilderClient extends
|
|
2263
|
+
class ImageBuilderClient extends coreClient__namespace.ServiceClient {
|
|
2226
2264
|
/**
|
|
2227
2265
|
* Initializes a new instance of the ImageBuilderClient class.
|
|
2228
2266
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -2231,6 +2269,7 @@ class ImageBuilderClient extends coreClient.ServiceClient {
|
|
|
2231
2269
|
* @param options The parameter options
|
|
2232
2270
|
*/
|
|
2233
2271
|
constructor(credentials, subscriptionId, options) {
|
|
2272
|
+
var _a, _b;
|
|
2234
2273
|
if (credentials === undefined) {
|
|
2235
2274
|
throw new Error("'credentials' cannot be null");
|
|
2236
2275
|
}
|
|
@@ -2245,7 +2284,7 @@ class ImageBuilderClient extends coreClient.ServiceClient {
|
|
|
2245
2284
|
requestContentType: "application/json; charset=utf-8",
|
|
2246
2285
|
credential: credentials
|
|
2247
2286
|
};
|
|
2248
|
-
const packageDetails = `azsdk-js-arm-imagebuilder/1.0.
|
|
2287
|
+
const packageDetails = `azsdk-js-arm-imagebuilder/1.0.2`;
|
|
2249
2288
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2250
2289
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2251
2290
|
: `${packageDetails}`;
|
|
@@ -2254,8 +2293,24 @@ class ImageBuilderClient extends coreClient.ServiceClient {
|
|
|
2254
2293
|
}
|
|
2255
2294
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
2256
2295
|
userAgentPrefix
|
|
2257
|
-
}, baseUri: options.endpoint
|
|
2296
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
2258
2297
|
super(optionsWithDefaults);
|
|
2298
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
2299
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
2300
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
2301
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
2302
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
2303
|
+
this.pipeline.removePolicy({
|
|
2304
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
2305
|
+
});
|
|
2306
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
2307
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
2308
|
+
challengeCallbacks: {
|
|
2309
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
2310
|
+
}
|
|
2311
|
+
}));
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2259
2314
|
// Parameter assignments
|
|
2260
2315
|
this.subscriptionId = subscriptionId;
|
|
2261
2316
|
// Assigning values to Constant parameters
|