@azure/arm-vmwarecloudsimple 3.0.0-alpha.20220511.3 → 3.0.2-alpha.20220707.1
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 +18 -0
- package/README.md +7 -7
- package/dist/index.js +46 -2
- 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 +16 -0
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +16 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/vMwareCloudSimple.d.ts +2 -0
- package/dist-esm/src/vMwareCloudSimple.d.ts.map +1 -1
- package/dist-esm/src/vMwareCloudSimple.js +30 -1
- package/dist-esm/src/vMwareCloudSimple.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +9 -6
- package/review/arm-vmwarecloudsimple.api.md +0 -16
- package/src/models/index.ts +16 -0
- package/src/vMwareCloudSimple.ts +35 -1
- package/types/arm-vmwarecloudsimple.d.ts +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
# Release History
|
|
2
|
+
|
|
3
|
+
## 3.0.2 (Unreleased)
|
|
4
|
+
|
|
5
|
+
### Features Added
|
|
6
|
+
|
|
7
|
+
### Breaking Changes
|
|
8
|
+
|
|
9
|
+
### Bugs Fixed
|
|
10
|
+
|
|
11
|
+
### Other Changes
|
|
12
|
+
|
|
13
|
+
## 3.0.1 (2022-07-06)
|
|
14
|
+
|
|
15
|
+
**Features**
|
|
16
|
+
|
|
17
|
+
- Bugs Fixed
|
|
18
|
+
|
|
19
|
+
|
|
2
20
|
|
|
3
21
|
## 3.0.0 (2022-05-05)
|
|
4
22
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Azure
|
|
1
|
+
# Azure VMwareCloudSimple 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 VMwareCloudSimple client.
|
|
4
4
|
|
|
5
5
|
Description of the new service
|
|
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-vmwarecloudsimple` package
|
|
26
26
|
|
|
27
|
-
Install the Azure
|
|
27
|
+
Install the Azure VMwareCloudSimple client library for JavaScript with `npm`:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
npm install @azure/arm-vmwarecloudsimple
|
|
@@ -32,8 +32,8 @@ npm install @azure/arm-vmwarecloudsimple
|
|
|
32
32
|
|
|
33
33
|
### Create and authenticate a `VMwareCloudSimple`
|
|
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 VMwareCloudSimple API, you will need the `endpoint` of your Azure VMwareCloudSimple resource and a `credential`. The Azure VMwareCloudSimple client can use Azure Active Directory credentials to authenticate.
|
|
36
|
+
You can find the endpoint for your Azure VMwareCloudSimple 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 VMwareCloudSimple** 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
|
### VMwareCloudSimple
|
|
74
74
|
|
|
75
|
-
`VMwareCloudSimple` is the primary interface for developers using the Azure
|
|
75
|
+
`VMwareCloudSimple` is the primary interface for developers using the Azure VMwareCloudSimple client library. Explore the methods on this client object to understand the different features of the Azure VMwareCloudSimple 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,37 +38,53 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
|
|
|
38
38
|
/** Known values of {@link GuestOsnicCustomizationAllocation} that the service accepts. */
|
|
39
39
|
exports.KnownGuestOsnicCustomizationAllocation = void 0;
|
|
40
40
|
(function (KnownGuestOsnicCustomizationAllocation) {
|
|
41
|
+
/** Static */
|
|
41
42
|
KnownGuestOsnicCustomizationAllocation["Static"] = "static";
|
|
43
|
+
/** Dynamic */
|
|
42
44
|
KnownGuestOsnicCustomizationAllocation["Dynamic"] = "dynamic";
|
|
43
45
|
})(exports.KnownGuestOsnicCustomizationAllocation || (exports.KnownGuestOsnicCustomizationAllocation = {}));
|
|
44
46
|
/** Known values of {@link CustomizationHostNameType} that the service accepts. */
|
|
45
47
|
exports.KnownCustomizationHostNameType = void 0;
|
|
46
48
|
(function (KnownCustomizationHostNameType) {
|
|
49
|
+
/** UserDefined */
|
|
47
50
|
KnownCustomizationHostNameType["UserDefined"] = "USER_DEFINED";
|
|
51
|
+
/** PrefixBased */
|
|
48
52
|
KnownCustomizationHostNameType["PrefixBased"] = "PREFIX_BASED";
|
|
53
|
+
/** Fixed */
|
|
49
54
|
KnownCustomizationHostNameType["Fixed"] = "FIXED";
|
|
55
|
+
/** VirtualMachineName */
|
|
50
56
|
KnownCustomizationHostNameType["VirtualMachineName"] = "VIRTUAL_MACHINE_NAME";
|
|
57
|
+
/** CustomName */
|
|
51
58
|
KnownCustomizationHostNameType["CustomName"] = "CUSTOM_NAME";
|
|
52
59
|
})(exports.KnownCustomizationHostNameType || (exports.KnownCustomizationHostNameType = {}));
|
|
53
60
|
/** Known values of {@link CustomizationIdentityType} that the service accepts. */
|
|
54
61
|
exports.KnownCustomizationIdentityType = void 0;
|
|
55
62
|
(function (KnownCustomizationIdentityType) {
|
|
63
|
+
/** WindowsText */
|
|
56
64
|
KnownCustomizationIdentityType["WindowsText"] = "WINDOWS_TEXT";
|
|
65
|
+
/** Windows */
|
|
57
66
|
KnownCustomizationIdentityType["Windows"] = "WINDOWS";
|
|
67
|
+
/** Linux */
|
|
58
68
|
KnownCustomizationIdentityType["Linux"] = "LINUX";
|
|
59
69
|
})(exports.KnownCustomizationIdentityType || (exports.KnownCustomizationIdentityType = {}));
|
|
60
70
|
/** Known values of {@link CustomizationIPAddressType} that the service accepts. */
|
|
61
71
|
exports.KnownCustomizationIPAddressType = void 0;
|
|
62
72
|
(function (KnownCustomizationIPAddressType) {
|
|
73
|
+
/** Custom */
|
|
63
74
|
KnownCustomizationIPAddressType["Custom"] = "CUSTOM";
|
|
75
|
+
/** DhcpIP */
|
|
64
76
|
KnownCustomizationIPAddressType["DhcpIP"] = "DHCP_IP";
|
|
77
|
+
/** FixedIP */
|
|
65
78
|
KnownCustomizationIPAddressType["FixedIP"] = "FIXED_IP";
|
|
79
|
+
/** UserDefined */
|
|
66
80
|
KnownCustomizationIPAddressType["UserDefined"] = "USER_DEFINED";
|
|
67
81
|
})(exports.KnownCustomizationIPAddressType || (exports.KnownCustomizationIPAddressType = {}));
|
|
68
82
|
/** Known values of {@link CustomizationPolicyPropertiesType} that the service accepts. */
|
|
69
83
|
exports.KnownCustomizationPolicyPropertiesType = void 0;
|
|
70
84
|
(function (KnownCustomizationPolicyPropertiesType) {
|
|
85
|
+
/** Linux */
|
|
71
86
|
KnownCustomizationPolicyPropertiesType["Linux"] = "LINUX";
|
|
87
|
+
/** Windows */
|
|
72
88
|
KnownCustomizationPolicyPropertiesType["Windows"] = "WINDOWS";
|
|
73
89
|
})(exports.KnownCustomizationPolicyPropertiesType || (exports.KnownCustomizationPolicyPropertiesType = {}));
|
|
74
90
|
|
|
@@ -5709,7 +5725,7 @@ class VMwareCloudSimple extends coreClient__namespace.ServiceClient {
|
|
|
5709
5725
|
requestContentType: "application/json; charset=utf-8",
|
|
5710
5726
|
credential: credentials
|
|
5711
5727
|
};
|
|
5712
|
-
const packageDetails = `azsdk-js-arm-vmwarecloudsimple/3.0.
|
|
5728
|
+
const packageDetails = `azsdk-js-arm-vmwarecloudsimple/3.0.2`;
|
|
5713
5729
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
5714
5730
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
5715
5731
|
: `${packageDetails}`;
|
|
@@ -5752,6 +5768,34 @@ class VMwareCloudSimple extends coreClient__namespace.ServiceClient {
|
|
|
5752
5768
|
this.virtualNetworks = new VirtualNetworksImpl(this);
|
|
5753
5769
|
this.usages = new UsagesImpl(this);
|
|
5754
5770
|
this.virtualMachines = new VirtualMachinesImpl(this);
|
|
5771
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
5772
|
+
}
|
|
5773
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
5774
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
5775
|
+
if (!apiVersion) {
|
|
5776
|
+
return;
|
|
5777
|
+
}
|
|
5778
|
+
const apiVersionPolicy = {
|
|
5779
|
+
name: "CustomApiVersionPolicy",
|
|
5780
|
+
sendRequest(request, next) {
|
|
5781
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5782
|
+
const param = request.url.split("?");
|
|
5783
|
+
if (param.length > 1) {
|
|
5784
|
+
const newParams = param[1].split("&").map((item) => {
|
|
5785
|
+
if (item.indexOf("api-version") > -1) {
|
|
5786
|
+
return "api-version=" + apiVersion;
|
|
5787
|
+
}
|
|
5788
|
+
else {
|
|
5789
|
+
return item;
|
|
5790
|
+
}
|
|
5791
|
+
});
|
|
5792
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
5793
|
+
}
|
|
5794
|
+
return next(request);
|
|
5795
|
+
});
|
|
5796
|
+
}
|
|
5797
|
+
};
|
|
5798
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
5755
5799
|
}
|
|
5756
5800
|
}
|
|
5757
5801
|
|