@azure/arm-loadtesting 1.0.0-beta.1 → 1.0.0
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 +1 -1
- package/LICENSE +1 -1
- package/README.md +104 -1
- package/dist/index.js +5 -10
- 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/loadTestsCreateOrUpdateSample.js +11 -3
- package/dist-esm/samples-dev/loadTestsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/loadTestsDeleteSample.js +11 -3
- package/dist-esm/samples-dev/loadTestsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/loadTestsGetSample.js +11 -3
- package/dist-esm/samples-dev/loadTestsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.js +11 -3
- package/dist-esm/samples-dev/loadTestsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.js +10 -2
- package/dist-esm/samples-dev/loadTestsListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.js +11 -3
- package/dist-esm/samples-dev/loadTestsListOutboundNetworkDependenciesEndpointsSample.js.map +1 -1
- package/dist-esm/samples-dev/loadTestsUpdateSample.js +11 -3
- package/dist-esm/samples-dev/loadTestsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +10 -2
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/quotasCheckAvailabilitySample.js +10 -2
- package/dist-esm/samples-dev/quotasCheckAvailabilitySample.js.map +1 -1
- package/dist-esm/samples-dev/quotasGetSample.js +10 -2
- package/dist-esm/samples-dev/quotasGetSample.js.map +1 -1
- package/dist-esm/samples-dev/quotasListSample.js +10 -2
- package/dist-esm/samples-dev/quotasListSample.js.map +1 -1
- package/dist-esm/src/loadTestClient.js +1 -1
- package/dist-esm/src/loadTestClient.js.map +1 -1
- package/dist-esm/src/operations/loadTests.js +0 -3
- package/dist-esm/src/operations/loadTests.js.map +1 -1
- package/dist-esm/src/operations/operations.js +0 -1
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/quotas.js +0 -1
- package/dist-esm/src/operations/quotas.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +4 -4
- package/dist-esm/src/pagingHelper.js +4 -4
- package/dist-esm/test/loadtesting_quota_operations.spec.d.ts +2 -0
- package/dist-esm/test/loadtesting_quota_operations.spec.d.ts.map +1 -0
- package/dist-esm/test/loadtesting_quota_operations.spec.js +118 -0
- package/dist-esm/test/loadtesting_quota_operations.spec.js.map +1 -0
- package/dist-esm/test/loadtesting_resource_operations.spec.d.ts +2 -0
- package/dist-esm/test/loadtesting_resource_operations.spec.d.ts.map +1 -0
- package/dist-esm/test/loadtesting_resource_operations.spec.js +114 -0
- package/dist-esm/test/loadtesting_resource_operations.spec.js.map +1 -0
- package/package.json +4 -3
- package/src/loadTestClient.ts +1 -1
- package/src/operations/loadTests.ts +0 -3
- package/src/operations/operations.ts +0 -1
- package/src/operations/quotas.ts +0 -1
- package/src/pagingHelper.ts +4 -4
- package/types/arm-loadtesting.d.ts +4 -4
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/test/loadtesting_example.spec.d.ts +0 -4
- package/dist-esm/test/loadtesting_example.spec.d.ts.map +0 -1
- package/dist-esm/test/loadtesting_example.spec.js +0 -108
- package/dist-esm/test/loadtesting_example.spec.js.map +0 -1
package/CHANGELOG.md
CHANGED
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ LoadTest client provides access to LoadTest Resource and it's status operations.
|
|
|
6
6
|
|
|
7
7
|
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/arm-loadtesting) |
|
|
8
8
|
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-loadtesting) |
|
|
9
|
-
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-loadtesting
|
|
9
|
+
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-loadtesting) |
|
|
10
10
|
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
|
11
11
|
|
|
12
12
|
## Getting started
|
|
@@ -64,6 +64,109 @@ const client = new LoadTestClient(new DefaultAzureCredential(), subscriptionId);
|
|
|
64
64
|
// const client = new LoadTestClient(credential, subscriptionId);
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
### Create an Azure Load Testing resource
|
|
68
|
+
|
|
69
|
+
Create a new Azure Load Testing resource.
|
|
70
|
+
```javascript
|
|
71
|
+
loadTestResourceCreatePayload = {
|
|
72
|
+
location: "westus2"
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const resource = await client.loadTests.beginCreateOrUpdateAndWait(
|
|
76
|
+
"sample-rg",
|
|
77
|
+
"sample-loadtesting-resource",
|
|
78
|
+
loadTestResourceCreatePayload
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
console.log(resource);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Create a new Azure Load Testing resource with managed identity and customer managed key encryption.
|
|
85
|
+
```javascript
|
|
86
|
+
loadTestResourceCreatePayload = {
|
|
87
|
+
location: "westus2",
|
|
88
|
+
tags: { team: "testing" },
|
|
89
|
+
identity: {
|
|
90
|
+
type: 'SystemAssigned, UserAssigned',
|
|
91
|
+
userAssignedIdentities: {
|
|
92
|
+
'/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/identity1': {}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
encryption: {
|
|
96
|
+
identity: {
|
|
97
|
+
type: 'UserAssigned',
|
|
98
|
+
resourceId: '/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/identity1'
|
|
99
|
+
},
|
|
100
|
+
keyUrl: 'https://sample-kv.vault.azure.net/keys/cmkkey/2d1ccd5c50234ea2a0858fe148b69cde'
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const resource = await client.loadTests.beginCreateOrUpdateAndWait(
|
|
105
|
+
"sample-rg",
|
|
106
|
+
"sample-loadtesting-resource",
|
|
107
|
+
loadTestResourceCreatePayload
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
console.log(resource);
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Get an Azure Load Testing resource
|
|
114
|
+
|
|
115
|
+
```javascript
|
|
116
|
+
let resourceName = 'sample-loadtesting-resource';
|
|
117
|
+
let resourceGroupName = 'sample-rg';
|
|
118
|
+
|
|
119
|
+
const resource = await client.loadTests.get(
|
|
120
|
+
resourceGroupName,
|
|
121
|
+
resourceName
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
console.log(resource);
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Update an Azure Load Testing resource
|
|
128
|
+
|
|
129
|
+
```javascript
|
|
130
|
+
loadTestResourcePatchPayload = {
|
|
131
|
+
tags: { team: "testing-dev" },
|
|
132
|
+
identity: {
|
|
133
|
+
type: 'SystemAssigned, UserAssigned',
|
|
134
|
+
userAssignedIdentities: {
|
|
135
|
+
// removing a user-assigned managed identity by assigning the value in the payload as null
|
|
136
|
+
'/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/identity1': null,
|
|
137
|
+
'/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/identity2': {}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
encryption: {
|
|
141
|
+
// use system-assigned managed identity for CMK encryption
|
|
142
|
+
identity: {
|
|
143
|
+
type: 'SystemAssigned',
|
|
144
|
+
resourceId: null
|
|
145
|
+
},
|
|
146
|
+
keyUrl: 'https://sample-kv.vault.azure.net/keys/cmkkey/2d1ccd5c50234ea2a0858fe148b69cde'
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const resource = await client.loadTests.beginUpdateAndWait(
|
|
151
|
+
"sample-rg",
|
|
152
|
+
"sample-loadtesting-resource",
|
|
153
|
+
loadTestResourcePatchPayload
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
console.log(resource);
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Delete an Azure Load Testing resource
|
|
160
|
+
|
|
161
|
+
```javascript
|
|
162
|
+
let resourceName = 'sample-loadtesting-resource';
|
|
163
|
+
let resourceGroupName = 'sample-rg';
|
|
164
|
+
|
|
165
|
+
const result = await client.loadTests.beginDeleteAndWait(
|
|
166
|
+
resourceGroupName,
|
|
167
|
+
resourceName
|
|
168
|
+
);
|
|
169
|
+
```
|
|
67
170
|
|
|
68
171
|
### JavaScript Bundle
|
|
69
172
|
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
|
package/dist/index.js
CHANGED
|
@@ -37,11 +37,11 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
|
|
|
37
37
|
*/
|
|
38
38
|
const pageMap = new WeakMap();
|
|
39
39
|
/**
|
|
40
|
-
* Given
|
|
41
|
-
* continuation token that can be used to begin paging from
|
|
40
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
41
|
+
* returns a continuation token that can be used to begin paging from
|
|
42
42
|
* that point later.
|
|
43
|
-
* @param page
|
|
44
|
-
* @returns The continuation token that can be passed into byPage().
|
|
43
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
44
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
45
45
|
*/
|
|
46
46
|
function getContinuationToken(page) {
|
|
47
47
|
var _a;
|
|
@@ -1216,7 +1216,6 @@ const listNextOperationSpec$1 = {
|
|
|
1216
1216
|
bodyMapper: ErrorResponse
|
|
1217
1217
|
}
|
|
1218
1218
|
},
|
|
1219
|
-
queryParameters: [apiVersion],
|
|
1220
1219
|
urlParameters: [$host, nextLink],
|
|
1221
1220
|
headerParameters: [accept],
|
|
1222
1221
|
serializer: serializer$2
|
|
@@ -1413,7 +1412,6 @@ const listNextOperationSpec = {
|
|
|
1413
1412
|
bodyMapper: ErrorResponse
|
|
1414
1413
|
}
|
|
1415
1414
|
},
|
|
1416
|
-
queryParameters: [apiVersion],
|
|
1417
1415
|
urlParameters: [
|
|
1418
1416
|
$host,
|
|
1419
1417
|
nextLink,
|
|
@@ -2053,7 +2051,6 @@ const listBySubscriptionNextOperationSpec = {
|
|
|
2053
2051
|
bodyMapper: ErrorResponse
|
|
2054
2052
|
}
|
|
2055
2053
|
},
|
|
2056
|
-
queryParameters: [apiVersion],
|
|
2057
2054
|
urlParameters: [
|
|
2058
2055
|
$host,
|
|
2059
2056
|
nextLink,
|
|
@@ -2073,7 +2070,6 @@ const listByResourceGroupNextOperationSpec = {
|
|
|
2073
2070
|
bodyMapper: ErrorResponse
|
|
2074
2071
|
}
|
|
2075
2072
|
},
|
|
2076
|
-
queryParameters: [apiVersion],
|
|
2077
2073
|
urlParameters: [
|
|
2078
2074
|
$host,
|
|
2079
2075
|
nextLink,
|
|
@@ -2094,7 +2090,6 @@ const listOutboundNetworkDependenciesEndpointsNextOperationSpec = {
|
|
|
2094
2090
|
bodyMapper: ErrorResponse
|
|
2095
2091
|
}
|
|
2096
2092
|
},
|
|
2097
|
-
queryParameters: [apiVersion],
|
|
2098
2093
|
urlParameters: [
|
|
2099
2094
|
$host,
|
|
2100
2095
|
nextLink,
|
|
@@ -2136,7 +2131,7 @@ class LoadTestClient extends coreClient__namespace.ServiceClient {
|
|
|
2136
2131
|
requestContentType: "application/json; charset=utf-8",
|
|
2137
2132
|
credential: credentials
|
|
2138
2133
|
};
|
|
2139
|
-
const packageDetails = `azsdk-js-arm-loadtesting/1.0.0
|
|
2134
|
+
const packageDetails = `azsdk-js-arm-loadtesting/1.0.0`;
|
|
2140
2135
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2141
2136
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2142
2137
|
: `${packageDetails}`;
|