@azure/arm-operations 4.0.0-beta.2 → 4.0.0-beta.4
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/LICENSE +1 -1
- package/README.md +13 -2
- package/dist/index.js +190 -71
- 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/managementAssociationsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.js +40 -0
- package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/managementAssociationsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementAssociationsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementAssociationsDeleteSample.js +34 -0
- package/dist-esm/samples-dev/managementAssociationsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/managementAssociationsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementAssociationsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementAssociationsGetSample.js +34 -0
- package/dist-esm/samples-dev/managementAssociationsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.js +29 -0
- package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.js +32 -0
- package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/managementConfigurationsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementConfigurationsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementConfigurationsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/managementConfigurationsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/managementConfigurationsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementConfigurationsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementConfigurationsGetSample.js +31 -0
- package/dist-esm/samples-dev/managementConfigurationsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.js +29 -0
- package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.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/solutionsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.js +51 -0
- package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/solutionsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/solutionsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/solutionsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/solutionsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/solutionsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/solutionsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/solutionsGetSample.js +31 -0
- package/dist-esm/samples-dev/solutionsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/solutionsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/solutionsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/solutionsListByResourceGroupSample.js +30 -0
- package/dist-esm/samples-dev/solutionsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/solutionsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/solutionsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/solutionsListBySubscriptionSample.js +29 -0
- package/dist-esm/samples-dev/solutionsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/solutionsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/solutionsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/solutionsUpdateSample.js +34 -0
- package/dist-esm/samples-dev/solutionsUpdateSample.js.map +1 -0
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/operations/managementAssociations.d.ts +12 -3
- package/dist-esm/src/operations/managementAssociations.d.ts.map +1 -1
- package/dist-esm/src/operations/managementAssociations.js +37 -6
- package/dist-esm/src/operations/managementAssociations.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +8 -4
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/solutions.d.ts.map +1 -1
- package/dist-esm/src/operations/solutions.js +9 -3
- package/dist-esm/src/operations/solutions.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/managementAssociations.d.ts +12 -3
- package/dist-esm/src/operationsInterfaces/managementAssociations.d.ts.map +1 -1
- package/dist-esm/src/operationsManagementClient.d.ts +3 -7
- package/dist-esm/src/operationsManagementClient.d.ts.map +1 -1
- package/dist-esm/src/operationsManagementClient.js +55 -21
- package/dist-esm/src/operationsManagementClient.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +51 -21
- package/review/arm-operations.api.md +7 -10
- package/rollup.config.js +6 -72
- package/src/index.ts +1 -0
- package/src/operations/managementAssociations.ts +43 -3
- package/src/operations/operations.ts +10 -5
- package/src/operations/solutions.ts +9 -3
- package/src/operationsInterfaces/managementAssociations.ts +18 -0
- package/src/operationsManagementClient.ts +70 -26
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +19 -5
- package/types/arm-operations.d.ts +24 -10
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 4.0.0-beta.
|
|
3
|
+
## 4.0.0-beta.4 (2022-12-02)
|
|
4
4
|
|
|
5
|
-
The package of @azure/arm-operations is using our next generation design principles since version 4.0.0-beta.
|
|
5
|
+
The package of @azure/arm-operations is using our next generation design principles since version 4.0.0-beta.4, 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/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -6,16 +6,18 @@ Operations Management Client
|
|
|
6
6
|
|
|
7
7
|
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationsmanagement/arm-operations) |
|
|
8
8
|
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-operations) |
|
|
9
|
-
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-operations) |
|
|
9
|
+
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-operations?view=azure-node-preview) |
|
|
10
10
|
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
|
11
11
|
|
|
12
12
|
## Getting started
|
|
13
13
|
|
|
14
14
|
### Currently supported environments
|
|
15
15
|
|
|
16
|
-
- [LTS versions of Node.js](https://
|
|
16
|
+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
|
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 { OperationsManagementClient } = require("@azure/arm-operations");
|
|
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 OperationsManagementClient(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 OperationsManagementClient(credential, subscriptionId);
|
|
54
65
|
```
|
|
55
66
|
|
|
56
67
|
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var coreClient = require('@azure/core-client');
|
|
6
5
|
var tslib = require('tslib');
|
|
6
|
+
var coreClient = require('@azure/core-client');
|
|
7
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
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
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Copyright (c) Microsoft Corporation.
|
|
33
|
+
* Licensed under the MIT License.
|
|
34
|
+
*
|
|
35
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
36
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
37
|
+
*/
|
|
38
|
+
const pageMap = new WeakMap();
|
|
39
|
+
/**
|
|
40
|
+
* Given a result page from a pageable operation, returns a
|
|
41
|
+
* continuation token that can be used to begin paging from
|
|
42
|
+
* that point later.
|
|
43
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
44
|
+
* @returns The continuation token that can be passed into byPage().
|
|
45
|
+
*/
|
|
46
|
+
function getContinuationToken(page) {
|
|
47
|
+
var _a;
|
|
48
|
+
if (typeof page !== "object" || page === null) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
52
|
+
}
|
|
53
|
+
|
|
9
54
|
/*
|
|
10
55
|
* Copyright (c) Microsoft Corporation.
|
|
11
56
|
* Licensed under the MIT License.
|
|
@@ -740,11 +785,13 @@ class SolutionsImpl {
|
|
|
740
785
|
}
|
|
741
786
|
};
|
|
742
787
|
});
|
|
743
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, solutionName, parameters, options }, createOrUpdateOperationSpec);
|
|
744
|
-
|
|
788
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, solutionName, parameters, options }, createOrUpdateOperationSpec$2);
|
|
789
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
745
790
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
746
791
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
747
792
|
});
|
|
793
|
+
yield poller.poll();
|
|
794
|
+
return poller;
|
|
748
795
|
});
|
|
749
796
|
}
|
|
750
797
|
/**
|
|
@@ -792,10 +839,12 @@ class SolutionsImpl {
|
|
|
792
839
|
};
|
|
793
840
|
});
|
|
794
841
|
const lro = new LroImpl(sendOperation, { resourceGroupName, solutionName, parameters, options }, updateOperationSpec);
|
|
795
|
-
|
|
842
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
796
843
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
797
844
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
798
845
|
});
|
|
846
|
+
yield poller.poll();
|
|
847
|
+
return poller;
|
|
799
848
|
});
|
|
800
849
|
}
|
|
801
850
|
/**
|
|
@@ -841,11 +890,13 @@ class SolutionsImpl {
|
|
|
841
890
|
}
|
|
842
891
|
};
|
|
843
892
|
});
|
|
844
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, solutionName, options }, deleteOperationSpec);
|
|
845
|
-
|
|
893
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, solutionName, options }, deleteOperationSpec$2);
|
|
894
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
846
895
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
847
896
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
848
897
|
});
|
|
898
|
+
yield poller.poll();
|
|
899
|
+
return poller;
|
|
849
900
|
});
|
|
850
901
|
}
|
|
851
902
|
/**
|
|
@@ -867,7 +918,7 @@ class SolutionsImpl {
|
|
|
867
918
|
* @param options The options parameters.
|
|
868
919
|
*/
|
|
869
920
|
get(resourceGroupName, solutionName, options) {
|
|
870
|
-
return this.client.sendOperationRequest({ resourceGroupName, solutionName, options }, getOperationSpec);
|
|
921
|
+
return this.client.sendOperationRequest({ resourceGroupName, solutionName, options }, getOperationSpec$2);
|
|
871
922
|
}
|
|
872
923
|
/**
|
|
873
924
|
* Retrieves the solution list. It will retrieve both first party and third party solutions
|
|
@@ -882,12 +933,12 @@ class SolutionsImpl {
|
|
|
882
933
|
* @param options The options parameters.
|
|
883
934
|
*/
|
|
884
935
|
listBySubscription(options) {
|
|
885
|
-
return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
|
|
936
|
+
return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$2);
|
|
886
937
|
}
|
|
887
938
|
}
|
|
888
939
|
// Operation Specifications
|
|
889
|
-
const serializer =
|
|
890
|
-
const createOrUpdateOperationSpec = {
|
|
940
|
+
const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
941
|
+
const createOrUpdateOperationSpec$2 = {
|
|
891
942
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
|
|
892
943
|
httpMethod: "PUT",
|
|
893
944
|
responses: {
|
|
@@ -917,7 +968,7 @@ const createOrUpdateOperationSpec = {
|
|
|
917
968
|
],
|
|
918
969
|
headerParameters: [contentType, accept],
|
|
919
970
|
mediaType: "json",
|
|
920
|
-
serializer
|
|
971
|
+
serializer: serializer$3
|
|
921
972
|
};
|
|
922
973
|
const updateOperationSpec = {
|
|
923
974
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
|
|
@@ -949,9 +1000,9 @@ const updateOperationSpec = {
|
|
|
949
1000
|
],
|
|
950
1001
|
headerParameters: [contentType, accept],
|
|
951
1002
|
mediaType: "json",
|
|
952
|
-
serializer
|
|
1003
|
+
serializer: serializer$3
|
|
953
1004
|
};
|
|
954
|
-
const deleteOperationSpec = {
|
|
1005
|
+
const deleteOperationSpec$2 = {
|
|
955
1006
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
|
|
956
1007
|
httpMethod: "DELETE",
|
|
957
1008
|
responses: {
|
|
@@ -971,9 +1022,9 @@ const deleteOperationSpec = {
|
|
|
971
1022
|
solutionName
|
|
972
1023
|
],
|
|
973
1024
|
headerParameters: [accept],
|
|
974
|
-
serializer
|
|
1025
|
+
serializer: serializer$3
|
|
975
1026
|
};
|
|
976
|
-
const getOperationSpec = {
|
|
1027
|
+
const getOperationSpec$2 = {
|
|
977
1028
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}",
|
|
978
1029
|
httpMethod: "GET",
|
|
979
1030
|
responses: {
|
|
@@ -992,7 +1043,7 @@ const getOperationSpec = {
|
|
|
992
1043
|
solutionName
|
|
993
1044
|
],
|
|
994
1045
|
headerParameters: [accept],
|
|
995
|
-
serializer
|
|
1046
|
+
serializer: serializer$3
|
|
996
1047
|
};
|
|
997
1048
|
const listByResourceGroupOperationSpec = {
|
|
998
1049
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions",
|
|
@@ -1012,9 +1063,9 @@ const listByResourceGroupOperationSpec = {
|
|
|
1012
1063
|
resourceGroupName
|
|
1013
1064
|
],
|
|
1014
1065
|
headerParameters: [accept],
|
|
1015
|
-
serializer
|
|
1066
|
+
serializer: serializer$3
|
|
1016
1067
|
};
|
|
1017
|
-
const listBySubscriptionOperationSpec = {
|
|
1068
|
+
const listBySubscriptionOperationSpec$2 = {
|
|
1018
1069
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/solutions",
|
|
1019
1070
|
httpMethod: "GET",
|
|
1020
1071
|
responses: {
|
|
@@ -1028,7 +1079,7 @@ const listBySubscriptionOperationSpec = {
|
|
|
1028
1079
|
queryParameters: [apiVersion],
|
|
1029
1080
|
urlParameters: [$host, subscriptionId],
|
|
1030
1081
|
headerParameters: [accept],
|
|
1031
|
-
serializer
|
|
1082
|
+
serializer: serializer$3
|
|
1032
1083
|
};
|
|
1033
1084
|
|
|
1034
1085
|
/*
|
|
@@ -1057,34 +1108,65 @@ class ManagementAssociationsImpl {
|
|
|
1057
1108
|
/**
|
|
1058
1109
|
* Creates or updates the ManagementAssociation.
|
|
1059
1110
|
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
|
|
1111
|
+
* @param providerName Provider name for the parent resource.
|
|
1112
|
+
* @param resourceType Resource type for the parent resource
|
|
1113
|
+
* @param resourceName Parent resource name.
|
|
1060
1114
|
* @param managementAssociationName User ManagementAssociation Name.
|
|
1061
1115
|
* @param parameters The parameters required to create ManagementAssociation extension.
|
|
1062
1116
|
* @param options The options parameters.
|
|
1063
1117
|
*/
|
|
1064
|
-
createOrUpdate(resourceGroupName, managementAssociationName, parameters, options) {
|
|
1065
|
-
return this.client.sendOperationRequest({
|
|
1118
|
+
createOrUpdate(resourceGroupName, providerName, resourceType, resourceName, managementAssociationName, parameters, options) {
|
|
1119
|
+
return this.client.sendOperationRequest({
|
|
1120
|
+
resourceGroupName,
|
|
1121
|
+
providerName,
|
|
1122
|
+
resourceType,
|
|
1123
|
+
resourceName,
|
|
1124
|
+
managementAssociationName,
|
|
1125
|
+
parameters,
|
|
1126
|
+
options
|
|
1127
|
+
}, createOrUpdateOperationSpec$1);
|
|
1066
1128
|
}
|
|
1067
1129
|
/**
|
|
1068
1130
|
* Deletes the ManagementAssociation in the subscription.
|
|
1069
1131
|
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
|
|
1132
|
+
* @param providerName Provider name for the parent resource.
|
|
1133
|
+
* @param resourceType Resource type for the parent resource
|
|
1134
|
+
* @param resourceName Parent resource name.
|
|
1070
1135
|
* @param managementAssociationName User ManagementAssociation Name.
|
|
1071
1136
|
* @param options The options parameters.
|
|
1072
1137
|
*/
|
|
1073
|
-
delete(resourceGroupName, managementAssociationName, options) {
|
|
1074
|
-
return this.client.sendOperationRequest({
|
|
1138
|
+
delete(resourceGroupName, providerName, resourceType, resourceName, managementAssociationName, options) {
|
|
1139
|
+
return this.client.sendOperationRequest({
|
|
1140
|
+
resourceGroupName,
|
|
1141
|
+
providerName,
|
|
1142
|
+
resourceType,
|
|
1143
|
+
resourceName,
|
|
1144
|
+
managementAssociationName,
|
|
1145
|
+
options
|
|
1146
|
+
}, deleteOperationSpec$1);
|
|
1075
1147
|
}
|
|
1076
1148
|
/**
|
|
1077
1149
|
* Retrieves the user ManagementAssociation.
|
|
1078
1150
|
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
|
|
1151
|
+
* @param providerName Provider name for the parent resource.
|
|
1152
|
+
* @param resourceType Resource type for the parent resource
|
|
1153
|
+
* @param resourceName Parent resource name.
|
|
1079
1154
|
* @param managementAssociationName User ManagementAssociation Name.
|
|
1080
1155
|
* @param options The options parameters.
|
|
1081
1156
|
*/
|
|
1082
|
-
get(resourceGroupName, managementAssociationName, options) {
|
|
1083
|
-
return this.client.sendOperationRequest({
|
|
1157
|
+
get(resourceGroupName, providerName, resourceType, resourceName, managementAssociationName, options) {
|
|
1158
|
+
return this.client.sendOperationRequest({
|
|
1159
|
+
resourceGroupName,
|
|
1160
|
+
providerName,
|
|
1161
|
+
resourceType,
|
|
1162
|
+
resourceName,
|
|
1163
|
+
managementAssociationName,
|
|
1164
|
+
options
|
|
1165
|
+
}, getOperationSpec$1);
|
|
1084
1166
|
}
|
|
1085
1167
|
}
|
|
1086
1168
|
// Operation Specifications
|
|
1087
|
-
const serializer$
|
|
1169
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1088
1170
|
const listBySubscriptionOperationSpec$1 = {
|
|
1089
1171
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementAssociations",
|
|
1090
1172
|
httpMethod: "GET",
|
|
@@ -1099,7 +1181,7 @@ const listBySubscriptionOperationSpec$1 = {
|
|
|
1099
1181
|
queryParameters: [apiVersion],
|
|
1100
1182
|
urlParameters: [$host, subscriptionId],
|
|
1101
1183
|
headerParameters: [accept],
|
|
1102
|
-
serializer: serializer$
|
|
1184
|
+
serializer: serializer$2
|
|
1103
1185
|
};
|
|
1104
1186
|
const createOrUpdateOperationSpec$1 = {
|
|
1105
1187
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}",
|
|
@@ -1125,7 +1207,7 @@ const createOrUpdateOperationSpec$1 = {
|
|
|
1125
1207
|
],
|
|
1126
1208
|
headerParameters: [contentType, accept],
|
|
1127
1209
|
mediaType: "json",
|
|
1128
|
-
serializer: serializer$
|
|
1210
|
+
serializer: serializer$2
|
|
1129
1211
|
};
|
|
1130
1212
|
const deleteOperationSpec$1 = {
|
|
1131
1213
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}",
|
|
@@ -1147,7 +1229,7 @@ const deleteOperationSpec$1 = {
|
|
|
1147
1229
|
managementAssociationName
|
|
1148
1230
|
],
|
|
1149
1231
|
headerParameters: [accept],
|
|
1150
|
-
serializer: serializer$
|
|
1232
|
+
serializer: serializer$2
|
|
1151
1233
|
};
|
|
1152
1234
|
const getOperationSpec$1 = {
|
|
1153
1235
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}",
|
|
@@ -1171,7 +1253,7 @@ const getOperationSpec$1 = {
|
|
|
1171
1253
|
managementAssociationName
|
|
1172
1254
|
],
|
|
1173
1255
|
headerParameters: [accept],
|
|
1174
|
-
serializer: serializer$
|
|
1256
|
+
serializer: serializer$2
|
|
1175
1257
|
};
|
|
1176
1258
|
|
|
1177
1259
|
/*
|
|
@@ -1195,7 +1277,7 @@ class ManagementConfigurationsImpl {
|
|
|
1195
1277
|
* @param options The options parameters.
|
|
1196
1278
|
*/
|
|
1197
1279
|
listBySubscription(options) {
|
|
1198
|
-
return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec
|
|
1280
|
+
return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
|
|
1199
1281
|
}
|
|
1200
1282
|
/**
|
|
1201
1283
|
* Creates or updates the ManagementConfiguration.
|
|
@@ -1205,7 +1287,7 @@ class ManagementConfigurationsImpl {
|
|
|
1205
1287
|
* @param options The options parameters.
|
|
1206
1288
|
*/
|
|
1207
1289
|
createOrUpdate(resourceGroupName, managementConfigurationName, parameters, options) {
|
|
1208
|
-
return this.client.sendOperationRequest({ resourceGroupName, managementConfigurationName, parameters, options }, createOrUpdateOperationSpec
|
|
1290
|
+
return this.client.sendOperationRequest({ resourceGroupName, managementConfigurationName, parameters, options }, createOrUpdateOperationSpec);
|
|
1209
1291
|
}
|
|
1210
1292
|
/**
|
|
1211
1293
|
* Deletes the ManagementConfiguration in the subscription.
|
|
@@ -1214,7 +1296,7 @@ class ManagementConfigurationsImpl {
|
|
|
1214
1296
|
* @param options The options parameters.
|
|
1215
1297
|
*/
|
|
1216
1298
|
delete(resourceGroupName, managementConfigurationName, options) {
|
|
1217
|
-
return this.client.sendOperationRequest({ resourceGroupName, managementConfigurationName, options }, deleteOperationSpec
|
|
1299
|
+
return this.client.sendOperationRequest({ resourceGroupName, managementConfigurationName, options }, deleteOperationSpec);
|
|
1218
1300
|
}
|
|
1219
1301
|
/**
|
|
1220
1302
|
* Retrieves the user ManagementConfiguration.
|
|
@@ -1223,12 +1305,12 @@ class ManagementConfigurationsImpl {
|
|
|
1223
1305
|
* @param options The options parameters.
|
|
1224
1306
|
*/
|
|
1225
1307
|
get(resourceGroupName, managementConfigurationName, options) {
|
|
1226
|
-
return this.client.sendOperationRequest({ resourceGroupName, managementConfigurationName, options }, getOperationSpec
|
|
1308
|
+
return this.client.sendOperationRequest({ resourceGroupName, managementConfigurationName, options }, getOperationSpec);
|
|
1227
1309
|
}
|
|
1228
1310
|
}
|
|
1229
1311
|
// Operation Specifications
|
|
1230
|
-
const serializer$
|
|
1231
|
-
const listBySubscriptionOperationSpec
|
|
1312
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1313
|
+
const listBySubscriptionOperationSpec = {
|
|
1232
1314
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementConfigurations",
|
|
1233
1315
|
httpMethod: "GET",
|
|
1234
1316
|
responses: {
|
|
@@ -1242,9 +1324,9 @@ const listBySubscriptionOperationSpec$2 = {
|
|
|
1242
1324
|
queryParameters: [apiVersion],
|
|
1243
1325
|
urlParameters: [$host, subscriptionId],
|
|
1244
1326
|
headerParameters: [accept],
|
|
1245
|
-
serializer: serializer$
|
|
1327
|
+
serializer: serializer$1
|
|
1246
1328
|
};
|
|
1247
|
-
const createOrUpdateOperationSpec
|
|
1329
|
+
const createOrUpdateOperationSpec = {
|
|
1248
1330
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}",
|
|
1249
1331
|
httpMethod: "PUT",
|
|
1250
1332
|
responses: {
|
|
@@ -1265,9 +1347,9 @@ const createOrUpdateOperationSpec$2 = {
|
|
|
1265
1347
|
],
|
|
1266
1348
|
headerParameters: [contentType, accept],
|
|
1267
1349
|
mediaType: "json",
|
|
1268
|
-
serializer: serializer$
|
|
1350
|
+
serializer: serializer$1
|
|
1269
1351
|
};
|
|
1270
|
-
const deleteOperationSpec
|
|
1352
|
+
const deleteOperationSpec = {
|
|
1271
1353
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}",
|
|
1272
1354
|
httpMethod: "DELETE",
|
|
1273
1355
|
responses: {
|
|
@@ -1284,9 +1366,9 @@ const deleteOperationSpec$2 = {
|
|
|
1284
1366
|
managementConfigurationName
|
|
1285
1367
|
],
|
|
1286
1368
|
headerParameters: [accept],
|
|
1287
|
-
serializer: serializer$
|
|
1369
|
+
serializer: serializer$1
|
|
1288
1370
|
};
|
|
1289
|
-
const getOperationSpec
|
|
1371
|
+
const getOperationSpec = {
|
|
1290
1372
|
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}",
|
|
1291
1373
|
httpMethod: "GET",
|
|
1292
1374
|
responses: {
|
|
@@ -1305,7 +1387,7 @@ const getOperationSpec$2 = {
|
|
|
1305
1387
|
managementConfigurationName
|
|
1306
1388
|
],
|
|
1307
1389
|
headerParameters: [accept],
|
|
1308
|
-
serializer: serializer$
|
|
1390
|
+
serializer: serializer$1
|
|
1309
1391
|
};
|
|
1310
1392
|
|
|
1311
1393
|
/*
|
|
@@ -1338,14 +1420,18 @@ class OperationsImpl {
|
|
|
1338
1420
|
[Symbol.asyncIterator]() {
|
|
1339
1421
|
return this;
|
|
1340
1422
|
},
|
|
1341
|
-
byPage: () => {
|
|
1342
|
-
|
|
1423
|
+
byPage: (settings) => {
|
|
1424
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1425
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1426
|
+
}
|
|
1427
|
+
return this.listPagingPage(options, settings);
|
|
1343
1428
|
}
|
|
1344
1429
|
};
|
|
1345
1430
|
}
|
|
1346
|
-
listPagingPage(options) {
|
|
1431
|
+
listPagingPage(options, _settings) {
|
|
1347
1432
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1348
|
-
let result
|
|
1433
|
+
let result;
|
|
1434
|
+
result = yield tslib.__await(this._list(options));
|
|
1349
1435
|
yield yield tslib.__await(result.value || []);
|
|
1350
1436
|
});
|
|
1351
1437
|
}
|
|
@@ -1376,7 +1462,7 @@ class OperationsImpl {
|
|
|
1376
1462
|
}
|
|
1377
1463
|
}
|
|
1378
1464
|
// Operation Specifications
|
|
1379
|
-
const serializer
|
|
1465
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1380
1466
|
const listOperationSpec = {
|
|
1381
1467
|
path: "/providers/Microsoft.OperationsManagement/operations",
|
|
1382
1468
|
httpMethod: "GET",
|
|
@@ -1388,7 +1474,7 @@ const listOperationSpec = {
|
|
|
1388
1474
|
queryParameters: [apiVersion],
|
|
1389
1475
|
urlParameters: [$host],
|
|
1390
1476
|
headerParameters: [accept],
|
|
1391
|
-
serializer
|
|
1477
|
+
serializer
|
|
1392
1478
|
};
|
|
1393
1479
|
|
|
1394
1480
|
/*
|
|
@@ -1398,33 +1484,22 @@ const listOperationSpec = {
|
|
|
1398
1484
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1399
1485
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1400
1486
|
*/
|
|
1401
|
-
class OperationsManagementClient extends
|
|
1487
|
+
class OperationsManagementClient extends coreClient__namespace.ServiceClient {
|
|
1402
1488
|
/**
|
|
1403
1489
|
* Initializes a new instance of the OperationsManagementClient class.
|
|
1404
1490
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
1405
1491
|
* @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
|
|
1406
1492
|
* subscription. The subscription ID forms part of the URI for every service call.
|
|
1407
|
-
* @param providerName Provider name for the parent resource.
|
|
1408
|
-
* @param resourceType Resource type for the parent resource
|
|
1409
|
-
* @param resourceName Parent resource name.
|
|
1410
1493
|
* @param options The parameter options
|
|
1411
1494
|
*/
|
|
1412
|
-
constructor(credentials, subscriptionId,
|
|
1495
|
+
constructor(credentials, subscriptionId, options) {
|
|
1496
|
+
var _a, _b, _c;
|
|
1413
1497
|
if (credentials === undefined) {
|
|
1414
1498
|
throw new Error("'credentials' cannot be null");
|
|
1415
1499
|
}
|
|
1416
1500
|
if (subscriptionId === undefined) {
|
|
1417
1501
|
throw new Error("'subscriptionId' cannot be null");
|
|
1418
1502
|
}
|
|
1419
|
-
if (providerName === undefined) {
|
|
1420
|
-
throw new Error("'providerName' cannot be null");
|
|
1421
|
-
}
|
|
1422
|
-
if (resourceType === undefined) {
|
|
1423
|
-
throw new Error("'resourceType' cannot be null");
|
|
1424
|
-
}
|
|
1425
|
-
if (resourceName === undefined) {
|
|
1426
|
-
throw new Error("'resourceName' cannot be null");
|
|
1427
|
-
}
|
|
1428
1503
|
// Initializing default values for options
|
|
1429
1504
|
if (!options) {
|
|
1430
1505
|
options = {};
|
|
@@ -1433,22 +1508,37 @@ class OperationsManagementClient extends coreClient.ServiceClient {
|
|
|
1433
1508
|
requestContentType: "application/json; charset=utf-8",
|
|
1434
1509
|
credential: credentials
|
|
1435
1510
|
};
|
|
1436
|
-
const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.
|
|
1511
|
+
const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.4`;
|
|
1437
1512
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1438
1513
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1439
1514
|
: `${packageDetails}`;
|
|
1440
|
-
if (!options.credentialScopes) {
|
|
1441
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
1442
|
-
}
|
|
1443
1515
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1444
1516
|
userAgentPrefix
|
|
1445
|
-
},
|
|
1517
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1446
1518
|
super(optionsWithDefaults);
|
|
1519
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
1520
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1521
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1522
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1523
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1524
|
+
}
|
|
1525
|
+
if (!options ||
|
|
1526
|
+
!options.pipeline ||
|
|
1527
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
1528
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
1529
|
+
this.pipeline.removePolicy({
|
|
1530
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1531
|
+
});
|
|
1532
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1533
|
+
credential: credentials,
|
|
1534
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
1535
|
+
challengeCallbacks: {
|
|
1536
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1537
|
+
}
|
|
1538
|
+
}));
|
|
1539
|
+
}
|
|
1447
1540
|
// Parameter assignments
|
|
1448
1541
|
this.subscriptionId = subscriptionId;
|
|
1449
|
-
this.providerName = providerName;
|
|
1450
|
-
this.resourceType = resourceType;
|
|
1451
|
-
this.resourceName = resourceName;
|
|
1452
1542
|
// Assigning values to Constant parameters
|
|
1453
1543
|
this.$host = options.$host || "https://management.azure.com";
|
|
1454
1544
|
this.apiVersion = options.apiVersion || "2015-11-01-preview";
|
|
@@ -1456,8 +1546,37 @@ class OperationsManagementClient extends coreClient.ServiceClient {
|
|
|
1456
1546
|
this.managementAssociations = new ManagementAssociationsImpl(this);
|
|
1457
1547
|
this.managementConfigurations = new ManagementConfigurationsImpl(this);
|
|
1458
1548
|
this.operations = new OperationsImpl(this);
|
|
1549
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
1550
|
+
}
|
|
1551
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
1552
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
1553
|
+
if (!apiVersion) {
|
|
1554
|
+
return;
|
|
1555
|
+
}
|
|
1556
|
+
const apiVersionPolicy = {
|
|
1557
|
+
name: "CustomApiVersionPolicy",
|
|
1558
|
+
sendRequest(request, next) {
|
|
1559
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1560
|
+
const param = request.url.split("?");
|
|
1561
|
+
if (param.length > 1) {
|
|
1562
|
+
const newParams = param[1].split("&").map((item) => {
|
|
1563
|
+
if (item.indexOf("api-version") > -1) {
|
|
1564
|
+
return "api-version=" + apiVersion;
|
|
1565
|
+
}
|
|
1566
|
+
else {
|
|
1567
|
+
return item;
|
|
1568
|
+
}
|
|
1569
|
+
});
|
|
1570
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
1571
|
+
}
|
|
1572
|
+
return next(request);
|
|
1573
|
+
});
|
|
1574
|
+
}
|
|
1575
|
+
};
|
|
1576
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
1459
1577
|
}
|
|
1460
1578
|
}
|
|
1461
1579
|
|
|
1462
1580
|
exports.OperationsManagementClient = OperationsManagementClient;
|
|
1581
|
+
exports.getContinuationToken = getContinuationToken;
|
|
1463
1582
|
//# sourceMappingURL=index.js.map
|