@azure/arm-scvmm 1.0.0-alpha.20220704.1 → 1.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 +12 -10
- package/README.md +7 -7
- package/dist/index.js +50 -1
- 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/src/models/index.d.ts +33 -11
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +21 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/scvmm.d.ts +2 -0
- package/dist-esm/src/scvmm.d.ts.map +1 -1
- package/dist-esm/src/scvmm.js +29 -0
- package/dist-esm/src/scvmm.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +11 -8
- package/review/arm-scvmm.api.md +21 -41
- package/src/models/index.ts +33 -11
- package/src/scvmm.ts +34 -0
- package/types/arm-scvmm.d.ts +35 -11
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# Release History
|
|
2
|
+
|
|
3
|
+
## 1.0.0-beta.2 (2022-07-14)
|
|
4
|
+
|
|
5
|
+
**Features**
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Other Changes
|
|
12
|
-
|
|
7
|
+
- Added Interface CloudInventoryItem
|
|
8
|
+
- Added Interface InventoryItem
|
|
9
|
+
- Added Interface ProxyResource
|
|
10
|
+
- Added Interface VirtualMachineInventoryItem
|
|
11
|
+
- Added Interface VirtualMachineTemplateInventoryItem
|
|
12
|
+
- Added Interface VirtualNetworkInventoryItem
|
|
13
|
+
|
|
14
|
+
|
|
13
15
|
## 1.0.0-beta.1 (2022-04-27)
|
|
14
16
|
|
|
15
17
|
The package of @azure/arm-scvmm is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Azure
|
|
1
|
+
# Azure Scvmm client library for JavaScript
|
|
2
2
|
|
|
3
|
-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure
|
|
3
|
+
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Scvmm client.
|
|
4
4
|
|
|
5
5
|
The Microsoft.ScVmm Rest API spec.
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
|
|
|
24
24
|
|
|
25
25
|
### Install the `@azure/arm-scvmm` package
|
|
26
26
|
|
|
27
|
-
Install the Azure
|
|
27
|
+
Install the Azure Scvmm client library for JavaScript with `npm`:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
npm install @azure/arm-scvmm
|
|
@@ -32,8 +32,8 @@ npm install @azure/arm-scvmm
|
|
|
32
32
|
|
|
33
33
|
### Create and authenticate a `Scvmm`
|
|
34
34
|
|
|
35
|
-
To create a client object to access the Azure
|
|
36
|
-
You can find the endpoint for your Azure
|
|
35
|
+
To create a client object to access the Azure Scvmm API, you will need the `endpoint` of your Azure Scvmm resource and a `credential`. The Azure Scvmm client can use Azure Active Directory credentials to authenticate.
|
|
36
|
+
You can find the endpoint for your Azure Scvmm resource in the [Azure Portal][azure_portal].
|
|
37
37
|
|
|
38
38
|
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
|
|
39
39
|
|
|
@@ -43,7 +43,7 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
|
|
|
43
43
|
npm install @azure/identity
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
You will also need to **register a new AAD application and grant access to Azure
|
|
46
|
+
You will also need to **register a new AAD application and grant access to Azure Scvmm** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
|
47
47
|
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
|
|
48
48
|
|
|
49
49
|
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
|
|
@@ -72,7 +72,7 @@ To use this client library in the browser, first you need to use a bundler. For
|
|
|
72
72
|
|
|
73
73
|
### Scvmm
|
|
74
74
|
|
|
75
|
-
`Scvmm` is the primary interface for developers using the Azure
|
|
75
|
+
`Scvmm` is the primary interface for developers using the Azure Scvmm client library. Explore the methods on this client object to understand the different features of the Azure Scvmm service that you can access.
|
|
76
76
|
|
|
77
77
|
## Troubleshooting
|
|
78
78
|
|
package/dist/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var tslib = require('tslib');
|
|
5
6
|
var coreClient = require('@azure/core-client');
|
|
6
7
|
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
|
-
var tslib = require('tslib');
|
|
8
8
|
var coreLro = require('@azure/core-lro');
|
|
9
9
|
|
|
10
10
|
function _interopNamespace(e) {
|
|
@@ -38,54 +38,75 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
|
|
|
38
38
|
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
39
39
|
exports.KnownCreatedByType = void 0;
|
|
40
40
|
(function (KnownCreatedByType) {
|
|
41
|
+
/** User */
|
|
41
42
|
KnownCreatedByType["User"] = "User";
|
|
43
|
+
/** Application */
|
|
42
44
|
KnownCreatedByType["Application"] = "Application";
|
|
45
|
+
/** ManagedIdentity */
|
|
43
46
|
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
47
|
+
/** Key */
|
|
44
48
|
KnownCreatedByType["Key"] = "Key";
|
|
45
49
|
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
46
50
|
/** Known values of {@link OsType} that the service accepts. */
|
|
47
51
|
exports.KnownOsType = void 0;
|
|
48
52
|
(function (KnownOsType) {
|
|
53
|
+
/** Windows */
|
|
49
54
|
KnownOsType["Windows"] = "Windows";
|
|
55
|
+
/** Linux */
|
|
50
56
|
KnownOsType["Linux"] = "Linux";
|
|
57
|
+
/** Other */
|
|
51
58
|
KnownOsType["Other"] = "Other";
|
|
52
59
|
})(exports.KnownOsType || (exports.KnownOsType = {}));
|
|
53
60
|
/** Known values of {@link LimitCpuForMigration} that the service accepts. */
|
|
54
61
|
exports.KnownLimitCpuForMigration = void 0;
|
|
55
62
|
(function (KnownLimitCpuForMigration) {
|
|
63
|
+
/** False */
|
|
56
64
|
KnownLimitCpuForMigration["False"] = "false";
|
|
65
|
+
/** True */
|
|
57
66
|
KnownLimitCpuForMigration["True"] = "true";
|
|
58
67
|
})(exports.KnownLimitCpuForMigration || (exports.KnownLimitCpuForMigration = {}));
|
|
59
68
|
/** Known values of {@link DynamicMemoryEnabled} that the service accepts. */
|
|
60
69
|
exports.KnownDynamicMemoryEnabled = void 0;
|
|
61
70
|
(function (KnownDynamicMemoryEnabled) {
|
|
71
|
+
/** False */
|
|
62
72
|
KnownDynamicMemoryEnabled["False"] = "false";
|
|
73
|
+
/** True */
|
|
63
74
|
KnownDynamicMemoryEnabled["True"] = "true";
|
|
64
75
|
})(exports.KnownDynamicMemoryEnabled || (exports.KnownDynamicMemoryEnabled = {}));
|
|
65
76
|
/** Known values of {@link AllocationMethod} that the service accepts. */
|
|
66
77
|
exports.KnownAllocationMethod = void 0;
|
|
67
78
|
(function (KnownAllocationMethod) {
|
|
79
|
+
/** Dynamic */
|
|
68
80
|
KnownAllocationMethod["Dynamic"] = "Dynamic";
|
|
81
|
+
/** Static */
|
|
69
82
|
KnownAllocationMethod["Static"] = "Static";
|
|
70
83
|
})(exports.KnownAllocationMethod || (exports.KnownAllocationMethod = {}));
|
|
71
84
|
/** Known values of {@link CreateDiffDisk} that the service accepts. */
|
|
72
85
|
exports.KnownCreateDiffDisk = void 0;
|
|
73
86
|
(function (KnownCreateDiffDisk) {
|
|
87
|
+
/** False */
|
|
74
88
|
KnownCreateDiffDisk["False"] = "false";
|
|
89
|
+
/** True */
|
|
75
90
|
KnownCreateDiffDisk["True"] = "true";
|
|
76
91
|
})(exports.KnownCreateDiffDisk || (exports.KnownCreateDiffDisk = {}));
|
|
77
92
|
/** Known values of {@link IsCustomizable} that the service accepts. */
|
|
78
93
|
exports.KnownIsCustomizable = void 0;
|
|
79
94
|
(function (KnownIsCustomizable) {
|
|
95
|
+
/** False */
|
|
80
96
|
KnownIsCustomizable["False"] = "false";
|
|
97
|
+
/** True */
|
|
81
98
|
KnownIsCustomizable["True"] = "true";
|
|
82
99
|
})(exports.KnownIsCustomizable || (exports.KnownIsCustomizable = {}));
|
|
83
100
|
/** Known values of {@link InventoryType} that the service accepts. */
|
|
84
101
|
exports.KnownInventoryType = void 0;
|
|
85
102
|
(function (KnownInventoryType) {
|
|
103
|
+
/** Cloud */
|
|
86
104
|
KnownInventoryType["Cloud"] = "Cloud";
|
|
105
|
+
/** VirtualNetwork */
|
|
87
106
|
KnownInventoryType["VirtualNetwork"] = "VirtualNetwork";
|
|
107
|
+
/** VirtualMachineTemplate */
|
|
88
108
|
KnownInventoryType["VirtualMachineTemplate"] = "VirtualMachineTemplate";
|
|
109
|
+
/** VirtualMachine */
|
|
89
110
|
KnownInventoryType["VirtualMachine"] = "VirtualMachine";
|
|
90
111
|
})(exports.KnownInventoryType || (exports.KnownInventoryType = {}));
|
|
91
112
|
|
|
@@ -6528,6 +6549,34 @@ class Scvmm extends coreClient__namespace.ServiceClient {
|
|
|
6528
6549
|
this.virtualMachineTemplates = new VirtualMachineTemplatesImpl(this);
|
|
6529
6550
|
this.availabilitySets = new AvailabilitySetsImpl(this);
|
|
6530
6551
|
this.inventoryItems = new InventoryItemsImpl(this);
|
|
6552
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
6553
|
+
}
|
|
6554
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
6555
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
6556
|
+
if (!apiVersion) {
|
|
6557
|
+
return;
|
|
6558
|
+
}
|
|
6559
|
+
const apiVersionPolicy = {
|
|
6560
|
+
name: "CustomApiVersionPolicy",
|
|
6561
|
+
sendRequest(request, next) {
|
|
6562
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
6563
|
+
const param = request.url.split("?");
|
|
6564
|
+
if (param.length > 1) {
|
|
6565
|
+
const newParams = param[1].split("&").map((item) => {
|
|
6566
|
+
if (item.indexOf("api-version") > -1) {
|
|
6567
|
+
return "api-version=" + apiVersion;
|
|
6568
|
+
}
|
|
6569
|
+
else {
|
|
6570
|
+
return item;
|
|
6571
|
+
}
|
|
6572
|
+
});
|
|
6573
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
6574
|
+
}
|
|
6575
|
+
return next(request);
|
|
6576
|
+
});
|
|
6577
|
+
}
|
|
6578
|
+
};
|
|
6579
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
6531
6580
|
}
|
|
6532
6581
|
}
|
|
6533
6582
|
|