@azure/arm-computelimit 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/README.md +1 -1
- package/dist/browser/api/computeLimitContext.d.ts +3 -3
- package/dist/browser/api/computeLimitContext.js +4 -23
- package/dist/browser/api/computeLimitContext.js.map +1 -1
- package/dist/browser/api/features/index.d.ts +3 -0
- package/dist/browser/api/features/index.js +4 -0
- package/dist/browser/api/features/index.js.map +1 -0
- package/dist/browser/api/features/operations.d.ts +19 -0
- package/dist/browser/api/features/operations.js +95 -0
- package/dist/browser/api/features/operations.js.map +1 -0
- package/dist/browser/api/features/options.d.ts +13 -0
- package/dist/browser/api/features/options.js +4 -0
- package/dist/browser/api/features/options.js.map +1 -0
- package/dist/browser/api/guestSubscriptions/index.d.ts +1 -1
- package/dist/browser/api/guestSubscriptions/index.js.map +1 -1
- package/dist/browser/api/guestSubscriptions/operations.js +8 -17
- package/dist/browser/api/guestSubscriptions/operations.js.map +1 -1
- package/dist/browser/api/guestSubscriptions/options.js.map +1 -1
- package/dist/browser/api/index.d.ts +2 -1
- package/dist/browser/api/index.js +1 -1
- package/dist/browser/api/index.js.map +1 -1
- package/dist/browser/api/operations/index.d.ts +1 -1
- package/dist/browser/api/operations/index.js.map +1 -1
- package/dist/browser/api/operations/operations.js +3 -6
- package/dist/browser/api/operations/operations.js.map +1 -1
- package/dist/browser/api/sharedLimits/index.d.ts +1 -1
- package/dist/browser/api/sharedLimits/index.js.map +1 -1
- package/dist/browser/api/sharedLimits/operations.js +10 -23
- package/dist/browser/api/sharedLimits/operations.js.map +1 -1
- package/dist/browser/api/sharedLimits/options.js.map +1 -1
- package/dist/browser/classic/features/index.d.ts +16 -0
- package/dist/browser/classic/features/index.js +16 -0
- package/dist/browser/classic/features/index.js.map +1 -0
- package/dist/browser/classic/index.d.ts +4 -3
- package/dist/browser/classic/index.js.map +1 -1
- package/dist/browser/computeLimitClient.d.ts +4 -1
- package/dist/browser/computeLimitClient.js +4 -0
- package/dist/browser/computeLimitClient.js.map +1 -1
- package/dist/browser/index.d.ts +16 -10
- package/dist/browser/index.js +2 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models/index.d.ts +2 -1
- package/dist/browser/models/index.js +1 -1
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/models.d.ts +72 -8
- package/dist/browser/models/models.js +68 -8
- package/dist/browser/models/models.js.map +1 -1
- package/dist/browser/restorePollerHelpers.d.ts +21 -0
- package/dist/browser/restorePollerHelpers.js +94 -0
- package/dist/browser/restorePollerHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts +2 -0
- package/dist/browser/static-helpers/pagingHelpers.js +28 -3
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/browser/static-helpers/pollingHelpers.d.ts +34 -0
- package/dist/browser/static-helpers/pollingHelpers.js +95 -0
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/urlTemplate.js +20 -5
- package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
- package/dist/commonjs/api/computeLimitContext.d.ts +3 -3
- package/dist/commonjs/api/computeLimitContext.js +43 -44
- package/dist/commonjs/api/computeLimitContext.js.map +7 -1
- package/dist/commonjs/api/features/index.d.ts +3 -0
- package/dist/commonjs/api/features/index.js +32 -0
- package/dist/commonjs/api/features/index.js.map +7 -0
- package/dist/commonjs/api/features/operations.d.ts +19 -0
- package/dist/commonjs/api/features/operations.js +150 -0
- package/dist/commonjs/api/features/operations.js.map +7 -0
- package/dist/commonjs/api/features/options.d.ts +13 -0
- package/dist/commonjs/api/features/options.js +16 -0
- package/dist/commonjs/api/features/options.js.map +7 -0
- package/dist/commonjs/api/guestSubscriptions/index.d.ts +1 -1
- package/dist/commonjs/api/guestSubscriptions/index.js +34 -11
- package/dist/commonjs/api/guestSubscriptions/index.js.map +7 -1
- package/dist/commonjs/api/guestSubscriptions/operations.js +158 -122
- package/dist/commonjs/api/guestSubscriptions/operations.js.map +7 -1
- package/dist/commonjs/api/guestSubscriptions/options.js +16 -5
- package/dist/commonjs/api/guestSubscriptions/options.js.map +7 -1
- package/dist/commonjs/api/index.d.ts +2 -1
- package/dist/commonjs/api/index.js +28 -8
- package/dist/commonjs/api/index.js.map +7 -1
- package/dist/commonjs/api/operations/index.d.ts +1 -1
- package/dist/commonjs/api/operations/index.js +28 -8
- package/dist/commonjs/api/operations/index.js.map +7 -1
- package/dist/commonjs/api/operations/operations.js +62 -33
- package/dist/commonjs/api/operations/operations.js.map +7 -1
- package/dist/commonjs/api/operations/options.js +16 -5
- package/dist/commonjs/api/operations/options.js.map +7 -1
- package/dist/commonjs/api/sharedLimits/index.d.ts +1 -1
- package/dist/commonjs/api/sharedLimits/index.js +34 -11
- package/dist/commonjs/api/sharedLimits/index.js.map +7 -1
- package/dist/commonjs/api/sharedLimits/operations.js +158 -126
- package/dist/commonjs/api/sharedLimits/operations.js.map +7 -1
- package/dist/commonjs/api/sharedLimits/options.js +16 -5
- package/dist/commonjs/api/sharedLimits/options.js.map +7 -1
- package/dist/commonjs/classic/features/index.d.ts +16 -0
- package/dist/commonjs/classic/features/index.js +40 -0
- package/dist/commonjs/classic/features/index.js.map +7 -0
- package/dist/commonjs/classic/guestSubscriptions/index.js +37 -16
- package/dist/commonjs/classic/guestSubscriptions/index.js.map +7 -1
- package/dist/commonjs/classic/index.d.ts +4 -3
- package/dist/commonjs/classic/index.js +16 -5
- package/dist/commonjs/classic/index.js.map +7 -1
- package/dist/commonjs/classic/operations/index.js +34 -13
- package/dist/commonjs/classic/operations/index.js.map +7 -1
- package/dist/commonjs/classic/sharedLimits/index.js +37 -16
- package/dist/commonjs/classic/sharedLimits/index.js.map +7 -1
- package/dist/commonjs/computeLimitClient.d.ts +4 -1
- package/dist/commonjs/computeLimitClient.js +57 -35
- package/dist/commonjs/computeLimitClient.js.map +7 -1
- package/dist/commonjs/index.d.ts +16 -10
- package/dist/commonjs/index.js +47 -16
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/logger.js +29 -8
- package/dist/commonjs/logger.js.map +7 -1
- package/dist/commonjs/models/index.d.ts +2 -1
- package/dist/commonjs/models/index.js +38 -12
- package/dist/commonjs/models/index.js.map +7 -1
- package/dist/commonjs/models/models.d.ts +72 -8
- package/dist/commonjs/models/models.js +312 -229
- package/dist/commonjs/models/models.js.map +7 -1
- package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
- package/dist/commonjs/restorePollerHelpers.js +107 -0
- package/dist/commonjs/restorePollerHelpers.js.map +7 -0
- package/dist/commonjs/static-helpers/cloudSettingHelpers.js +50 -40
- package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +7 -1
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts +2 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js +125 -103
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +7 -1
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts +34 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js +101 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +7 -0
- package/dist/commonjs/static-helpers/urlTemplate.js +167 -158
- package/dist/commonjs/static-helpers/urlTemplate.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/api/computeLimitContext.d.ts +3 -3
- package/dist/esm/api/computeLimitContext.js +4 -23
- package/dist/esm/api/computeLimitContext.js.map +1 -1
- package/dist/esm/api/features/index.d.ts +3 -0
- package/dist/esm/api/features/index.js +4 -0
- package/dist/esm/api/features/index.js.map +1 -0
- package/dist/esm/api/features/operations.d.ts +19 -0
- package/dist/esm/api/features/operations.js +95 -0
- package/dist/esm/api/features/operations.js.map +1 -0
- package/dist/esm/api/features/options.d.ts +13 -0
- package/dist/esm/api/features/options.js +4 -0
- package/dist/esm/api/features/options.js.map +1 -0
- package/dist/esm/api/guestSubscriptions/index.d.ts +1 -1
- package/dist/esm/api/guestSubscriptions/index.js.map +1 -1
- package/dist/esm/api/guestSubscriptions/operations.js +8 -17
- package/dist/esm/api/guestSubscriptions/operations.js.map +1 -1
- package/dist/esm/api/guestSubscriptions/options.js.map +1 -1
- package/dist/esm/api/index.d.ts +2 -1
- package/dist/esm/api/index.js +1 -1
- package/dist/esm/api/index.js.map +1 -1
- package/dist/esm/api/operations/index.d.ts +1 -1
- package/dist/esm/api/operations/index.js.map +1 -1
- package/dist/esm/api/operations/operations.js +3 -6
- package/dist/esm/api/operations/operations.js.map +1 -1
- package/dist/esm/api/sharedLimits/index.d.ts +1 -1
- package/dist/esm/api/sharedLimits/index.js.map +1 -1
- package/dist/esm/api/sharedLimits/operations.js +10 -23
- package/dist/esm/api/sharedLimits/operations.js.map +1 -1
- package/dist/esm/api/sharedLimits/options.js.map +1 -1
- package/dist/esm/classic/features/index.d.ts +16 -0
- package/dist/esm/classic/features/index.js +16 -0
- package/dist/esm/classic/features/index.js.map +1 -0
- package/dist/esm/classic/index.d.ts +4 -3
- package/dist/esm/classic/index.js.map +1 -1
- package/dist/esm/computeLimitClient.d.ts +4 -1
- package/dist/esm/computeLimitClient.js +4 -0
- package/dist/esm/computeLimitClient.js.map +1 -1
- package/dist/esm/index.d.ts +16 -10
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +2 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/models.d.ts +72 -8
- package/dist/esm/models/models.js +68 -8
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/restorePollerHelpers.d.ts +21 -0
- package/dist/esm/restorePollerHelpers.js +94 -0
- package/dist/esm/restorePollerHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts +2 -0
- package/dist/esm/static-helpers/pagingHelpers.js +28 -3
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/esm/static-helpers/pollingHelpers.d.ts +34 -0
- package/dist/esm/static-helpers/pollingHelpers.js +95 -0
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/urlTemplate.js +20 -5
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -1
- package/dist/react-native/api/computeLimitContext.d.ts +3 -3
- package/dist/react-native/api/computeLimitContext.js +4 -23
- package/dist/react-native/api/computeLimitContext.js.map +1 -1
- package/dist/react-native/api/features/index.d.ts +3 -0
- package/dist/react-native/api/features/index.js +4 -0
- package/dist/react-native/api/features/index.js.map +1 -0
- package/dist/react-native/api/features/operations.d.ts +19 -0
- package/dist/react-native/api/features/operations.js +95 -0
- package/dist/react-native/api/features/operations.js.map +1 -0
- package/dist/react-native/api/features/options.d.ts +13 -0
- package/dist/react-native/api/features/options.js +4 -0
- package/dist/react-native/api/features/options.js.map +1 -0
- package/dist/react-native/api/guestSubscriptions/index.d.ts +1 -1
- package/dist/react-native/api/guestSubscriptions/index.js.map +1 -1
- package/dist/react-native/api/guestSubscriptions/operations.js +8 -17
- package/dist/react-native/api/guestSubscriptions/operations.js.map +1 -1
- package/dist/react-native/api/guestSubscriptions/options.js.map +1 -1
- package/dist/react-native/api/index.d.ts +2 -1
- package/dist/react-native/api/index.js +1 -1
- package/dist/react-native/api/index.js.map +1 -1
- package/dist/react-native/api/operations/index.d.ts +1 -1
- package/dist/react-native/api/operations/index.js.map +1 -1
- package/dist/react-native/api/operations/operations.js +3 -6
- package/dist/react-native/api/operations/operations.js.map +1 -1
- package/dist/react-native/api/sharedLimits/index.d.ts +1 -1
- package/dist/react-native/api/sharedLimits/index.js.map +1 -1
- package/dist/react-native/api/sharedLimits/operations.js +10 -23
- package/dist/react-native/api/sharedLimits/operations.js.map +1 -1
- package/dist/react-native/api/sharedLimits/options.js.map +1 -1
- package/dist/react-native/classic/features/index.d.ts +16 -0
- package/dist/react-native/classic/features/index.js +16 -0
- package/dist/react-native/classic/features/index.js.map +1 -0
- package/dist/react-native/classic/index.d.ts +4 -3
- package/dist/react-native/classic/index.js.map +1 -1
- package/dist/react-native/computeLimitClient.d.ts +4 -1
- package/dist/react-native/computeLimitClient.js +4 -0
- package/dist/react-native/computeLimitClient.js.map +1 -1
- package/dist/react-native/index.d.ts +16 -10
- package/dist/react-native/index.js +2 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models/index.d.ts +2 -1
- package/dist/react-native/models/index.js +1 -1
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/models.d.ts +72 -8
- package/dist/react-native/models/models.js +68 -8
- package/dist/react-native/models/models.js.map +1 -1
- package/dist/react-native/restorePollerHelpers.d.ts +21 -0
- package/dist/react-native/restorePollerHelpers.js +94 -0
- package/dist/react-native/restorePollerHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pagingHelpers.d.ts +2 -0
- package/dist/react-native/static-helpers/pagingHelpers.js +28 -3
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/pollingHelpers.d.ts +34 -0
- package/dist/react-native/static-helpers/pollingHelpers.js +95 -0
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/urlTemplate.js +20 -5
- package/dist/react-native/static-helpers/urlTemplate.js.map +1 -1
- package/package.json +33 -35
|
@@ -1,148 +1,184 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var operations_exports = {};
|
|
19
|
+
__export(operations_exports, {
|
|
20
|
+
$delete: () => $delete,
|
|
21
|
+
_$deleteDeserialize: () => _$deleteDeserialize,
|
|
22
|
+
_$deleteSend: () => _$deleteSend,
|
|
23
|
+
_createDeserialize: () => _createDeserialize,
|
|
24
|
+
_createSend: () => _createSend,
|
|
25
|
+
_getDeserialize: () => _getDeserialize,
|
|
26
|
+
_getSend: () => _getSend,
|
|
27
|
+
_listBySubscriptionLocationResourceDeserialize: () => _listBySubscriptionLocationResourceDeserialize,
|
|
28
|
+
_listBySubscriptionLocationResourceSend: () => _listBySubscriptionLocationResourceSend,
|
|
29
|
+
create: () => create,
|
|
30
|
+
get: () => get,
|
|
31
|
+
listBySubscriptionLocationResource: () => listBySubscriptionLocationResource
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(operations_exports);
|
|
34
|
+
var import_models = require("../../models/models.js");
|
|
35
|
+
var import_pagingHelpers = require("../../static-helpers/pagingHelpers.js");
|
|
36
|
+
var import_urlTemplate = require("../../static-helpers/urlTemplate.js");
|
|
37
|
+
var import_core_client = require("@azure-rest/core-client");
|
|
21
38
|
function _listBySubscriptionLocationResourceSend(context, location, options = {
|
|
22
|
-
|
|
39
|
+
requestOptions: {}
|
|
23
40
|
}) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
41
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
42
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions{?api%2Dversion}",
|
|
43
|
+
{
|
|
44
|
+
subscriptionId: context.subscriptionId,
|
|
45
|
+
location,
|
|
46
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
return context.path(path).get({
|
|
53
|
+
...(0, import_core_client.operationOptionsToRequestParameters)(options),
|
|
54
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers }
|
|
55
|
+
});
|
|
38
56
|
}
|
|
39
57
|
async function _listBySubscriptionLocationResourceDeserialize(result) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
const expectedStatuses = ["200"];
|
|
59
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
60
|
+
const error = (0, import_core_client.createRestError)(result);
|
|
61
|
+
error.details = (0, import_models.errorResponseDeserializer)(result.body);
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
return (0, import_models._guestSubscriptionListResultDeserializer)(result.body);
|
|
47
65
|
}
|
|
48
|
-
/** Lists all guest subscriptions in a location. */
|
|
49
66
|
function listBySubscriptionLocationResource(context, location, options = {
|
|
50
|
-
|
|
67
|
+
requestOptions: {}
|
|
51
68
|
}) {
|
|
52
|
-
|
|
69
|
+
return (0, import_pagingHelpers.buildPagedAsyncIterator)(
|
|
70
|
+
context,
|
|
71
|
+
() => _listBySubscriptionLocationResourceSend(context, location, options),
|
|
72
|
+
_listBySubscriptionLocationResourceDeserialize,
|
|
73
|
+
["200"],
|
|
74
|
+
{ itemName: "value", nextLinkName: "nextLink", apiVersion: context.apiVersion ?? "2026-03-20" }
|
|
75
|
+
);
|
|
53
76
|
}
|
|
54
77
|
function _$deleteSend(context, location, guestSubscriptionId, options = { requestOptions: {} }) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
78
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
79
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}",
|
|
80
|
+
{
|
|
81
|
+
subscriptionId: context.subscriptionId,
|
|
82
|
+
location,
|
|
83
|
+
guestSubscriptionId,
|
|
84
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
return context.path(path).delete({ ...(0, import_core_client.operationOptionsToRequestParameters)(options) });
|
|
64
91
|
}
|
|
65
92
|
async function _$deleteDeserialize(result) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
93
|
+
const expectedStatuses = ["200", "204"];
|
|
94
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
95
|
+
const error = (0, import_core_client.createRestError)(result);
|
|
96
|
+
error.details = (0, import_models.errorResponseDeserializer)(result.body);
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
99
|
+
return;
|
|
73
100
|
}
|
|
74
|
-
/** Deletes a subscription as a guest to stop consuming the compute limits shared by the host subscription. */
|
|
75
|
-
/**
|
|
76
|
-
* @fixme delete is a reserved word that cannot be used as an operation name.
|
|
77
|
-
* Please add @clientName("clientName") or @clientName("<JS-Specific-Name>", "javascript")
|
|
78
|
-
* to the operation to override the generated name.
|
|
79
|
-
*/
|
|
80
101
|
async function $delete(context, location, guestSubscriptionId, options = { requestOptions: {} }) {
|
|
81
|
-
|
|
82
|
-
|
|
102
|
+
const result = await _$deleteSend(context, location, guestSubscriptionId, options);
|
|
103
|
+
return _$deleteDeserialize(result);
|
|
83
104
|
}
|
|
84
105
|
function _createSend(context, location, guestSubscriptionId, resource, options = { requestOptions: {} }) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
107
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}",
|
|
108
|
+
{
|
|
109
|
+
subscriptionId: context.subscriptionId,
|
|
110
|
+
location,
|
|
111
|
+
guestSubscriptionId,
|
|
112
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
return context.path(path).put({
|
|
119
|
+
...(0, import_core_client.operationOptionsToRequestParameters)(options),
|
|
120
|
+
contentType: "application/json",
|
|
121
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers },
|
|
122
|
+
body: (0, import_models.guestSubscriptionSerializer)(resource)
|
|
123
|
+
});
|
|
102
124
|
}
|
|
103
125
|
async function _createDeserialize(result) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
126
|
+
const expectedStatuses = ["200", "201"];
|
|
127
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
128
|
+
const error = (0, import_core_client.createRestError)(result);
|
|
129
|
+
error.details = (0, import_models.errorResponseDeserializer)(result.body);
|
|
130
|
+
throw error;
|
|
131
|
+
}
|
|
132
|
+
return (0, import_models.guestSubscriptionDeserializer)(result.body);
|
|
111
133
|
}
|
|
112
|
-
/** Adds a subscription as a guest to consume the compute limits shared by the host subscription. */
|
|
113
134
|
async function create(context, location, guestSubscriptionId, resource, options = { requestOptions: {} }) {
|
|
114
|
-
|
|
115
|
-
|
|
135
|
+
const result = await _createSend(context, location, guestSubscriptionId, resource, options);
|
|
136
|
+
return _createDeserialize(result);
|
|
116
137
|
}
|
|
117
138
|
function _getSend(context, location, guestSubscriptionId, options = { requestOptions: {} }) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
139
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
140
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}",
|
|
141
|
+
{
|
|
142
|
+
subscriptionId: context.subscriptionId,
|
|
143
|
+
location,
|
|
144
|
+
guestSubscriptionId,
|
|
145
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
return context.path(path).get({
|
|
152
|
+
...(0, import_core_client.operationOptionsToRequestParameters)(options),
|
|
153
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers }
|
|
154
|
+
});
|
|
133
155
|
}
|
|
134
156
|
async function _getDeserialize(result) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
157
|
+
const expectedStatuses = ["200"];
|
|
158
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
159
|
+
const error = (0, import_core_client.createRestError)(result);
|
|
160
|
+
error.details = (0, import_models.errorResponseDeserializer)(result.body);
|
|
161
|
+
throw error;
|
|
162
|
+
}
|
|
163
|
+
return (0, import_models.guestSubscriptionDeserializer)(result.body);
|
|
142
164
|
}
|
|
143
|
-
/** Gets the properties of a guest subscription. */
|
|
144
165
|
async function get(context, location, guestSubscriptionId, options = { requestOptions: {} }) {
|
|
145
|
-
|
|
146
|
-
|
|
166
|
+
const result = await _getSend(context, location, guestSubscriptionId, options);
|
|
167
|
+
return _getDeserialize(result);
|
|
147
168
|
}
|
|
148
|
-
|
|
169
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
170
|
+
0 && (module.exports = {
|
|
171
|
+
$delete,
|
|
172
|
+
_$deleteDeserialize,
|
|
173
|
+
_$deleteSend,
|
|
174
|
+
_createDeserialize,
|
|
175
|
+
_createSend,
|
|
176
|
+
_getDeserialize,
|
|
177
|
+
_getSend,
|
|
178
|
+
_listBySubscriptionLocationResourceDeserialize,
|
|
179
|
+
_listBySubscriptionLocationResourceSend,
|
|
180
|
+
create,
|
|
181
|
+
get,
|
|
182
|
+
listBySubscriptionLocationResource
|
|
183
|
+
});
|
|
184
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/guestSubscriptions/operations.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAsBlC,0FAyBC;AAED,wGAWC;AAGD,gFAcC;AAED,oCAmBC;AAED,kDASC;AAQD,0BAQC;AAED,kCA4BC;AAED,gDAW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,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAA,yCAA6B,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACpD,CAAC;AAED,mDAAmD;AAC5C,KAAK,UAAU,GAAG,CACvB,OAAe,EACf,QAAgB,EAChB,mBAA2B,EAC3B,UAA+C,EAAE,cAAc,EAAE,EAAE,EAAE;IAErE,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAC/E,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ComputeLimitContext as Client } from \"../index.js\";\nimport type { GuestSubscription, _GuestSubscriptionListResult } from \"../../models/models.js\";\nimport {\n errorResponseDeserializer,\n guestSubscriptionSerializer,\n guestSubscriptionDeserializer,\n _guestSubscriptionListResultDeserializer,\n} from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type {\n GuestSubscriptionsListBySubscriptionLocationResourceOptionalParams,\n GuestSubscriptionsDeleteOptionalParams,\n GuestSubscriptionsCreateOptionalParams,\n GuestSubscriptionsGetOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _listBySubscriptionLocationResourceSend(\n context: Client,\n location: string,\n options: GuestSubscriptionsListBySubscriptionLocationResourceOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listBySubscriptionLocationResourceDeserialize(\n result: PathUncheckedResponse,\n): Promise<_GuestSubscriptionListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return _guestSubscriptionListResultDeserializer(result.body);\n}\n\n/** Lists all guest subscriptions in a location. */\nexport function listBySubscriptionLocationResource(\n context: Client,\n location: string,\n options: GuestSubscriptionsListBySubscriptionLocationResourceOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<GuestSubscription> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionLocationResourceSend(context, location, options),\n _listBySubscriptionLocationResourceDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n options: GuestSubscriptionsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n guestSubscriptionId: guestSubscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"200\", \"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return;\n}\n\n/** Deletes a subscription as a guest to stop consuming the compute limits shared by the host subscription. */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport async function $delete(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n options: GuestSubscriptionsDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(context, location, guestSubscriptionId, options);\n return _$deleteDeserialize(result);\n}\n\nexport function _createSend(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n resource: GuestSubscription,\n options: GuestSubscriptionsCreateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n guestSubscriptionId: guestSubscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: guestSubscriptionSerializer(resource),\n });\n}\n\nexport async function _createDeserialize(\n result: PathUncheckedResponse,\n): Promise<GuestSubscription> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return guestSubscriptionDeserializer(result.body);\n}\n\n/** Adds a subscription as a guest to consume the compute limits shared by the host subscription. */\nexport async function create(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n resource: GuestSubscription,\n options: GuestSubscriptionsCreateOptionalParams = { requestOptions: {} },\n): Promise<GuestSubscription> {\n const result = await _createSend(context, location, guestSubscriptionId, resource, options);\n return _createDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n options: GuestSubscriptionsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n guestSubscriptionId: guestSubscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<GuestSubscription> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return guestSubscriptionDeserializer(result.body);\n}\n\n/** Gets the properties of a guest subscription. */\nexport async function get(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n options: GuestSubscriptionsGetOptionalParams = { requestOptions: {} },\n): Promise<GuestSubscription> {\n const result = await _getSend(context, location, guestSubscriptionId, options);\n return _getDeserialize(result);\n}\n"]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/guestSubscriptions/operations.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ComputeLimitContext as Client } from \"../index.js\";\nimport type { GuestSubscription, _GuestSubscriptionListResult } from \"../../models/models.js\";\nimport {\n errorResponseDeserializer,\n guestSubscriptionSerializer,\n guestSubscriptionDeserializer,\n _guestSubscriptionListResultDeserializer,\n} from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type {\n GuestSubscriptionsListBySubscriptionLocationResourceOptionalParams,\n GuestSubscriptionsDeleteOptionalParams,\n GuestSubscriptionsCreateOptionalParams,\n GuestSubscriptionsGetOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _listBySubscriptionLocationResourceSend(\n context: Client,\n location: string,\n options: GuestSubscriptionsListBySubscriptionLocationResourceOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n \"api%2Dversion\": context.apiVersion ?? \"2026-03-20\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _listBySubscriptionLocationResourceDeserialize(\n result: PathUncheckedResponse,\n): Promise<_GuestSubscriptionListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n\n throw error;\n }\n\n return _guestSubscriptionListResultDeserializer(result.body);\n}\n\n/** Lists all guest subscriptions in a location. */\nexport function listBySubscriptionLocationResource(\n context: Client,\n location: string,\n options: GuestSubscriptionsListBySubscriptionLocationResourceOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<GuestSubscription> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionLocationResourceSend(context, location, options),\n _listBySubscriptionLocationResourceDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: context.apiVersion ?? \"2026-03-20\" },\n );\n}\n\nexport function _$deleteSend(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n options: GuestSubscriptionsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n guestSubscriptionId: guestSubscriptionId,\n \"api%2Dversion\": context.apiVersion ?? \"2026-03-20\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"200\", \"204\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n\n throw error;\n }\n\n return;\n}\n\n/** Deletes a subscription as a guest to stop consuming the compute limits shared by the host subscription. */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport async function $delete(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n options: GuestSubscriptionsDeleteOptionalParams = { requestOptions: {} },\n): Promise<void> {\n const result = await _$deleteSend(context, location, guestSubscriptionId, options);\n return _$deleteDeserialize(result);\n}\n\nexport function _createSend(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n resource: GuestSubscription,\n options: GuestSubscriptionsCreateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n guestSubscriptionId: guestSubscriptionId,\n \"api%2Dversion\": context.apiVersion ?? \"2026-03-20\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).put({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: guestSubscriptionSerializer(resource),\n });\n}\n\nexport async function _createDeserialize(\n result: PathUncheckedResponse,\n): Promise<GuestSubscription> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n\n throw error;\n }\n\n return guestSubscriptionDeserializer(result.body);\n}\n\n/** Adds a subscription as a guest to consume the compute limits shared by the host subscription. */\nexport async function create(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n resource: GuestSubscription,\n options: GuestSubscriptionsCreateOptionalParams = { requestOptions: {} },\n): Promise<GuestSubscription> {\n const result = await _createSend(context, location, guestSubscriptionId, resource, options);\n return _createDeserialize(result);\n}\n\nexport function _getSend(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n options: GuestSubscriptionsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n guestSubscriptionId: guestSubscriptionId,\n \"api%2Dversion\": context.apiVersion ?? \"2026-03-20\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<GuestSubscription> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n\n throw error;\n }\n\n return guestSubscriptionDeserializer(result.body);\n}\n\n/** Gets the properties of a guest subscription. */\nexport async function get(\n context: Client,\n location: string,\n guestSubscriptionId: string,\n options: GuestSubscriptionsGetOptionalParams = { requestOptions: {} },\n): Promise<GuestSubscription> {\n const result = await _getSend(context, location, guestSubscriptionId, options);\n return _getDeserialize(result);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,oBAKO;AAEP,2BAAwC;AACxC,yBAAkC;AAQlC,yBAAqE;AAE9D,SAAS,wCACd,SACA,UACA,UAA8E;AAAA,EAC5E,gBAAgB,CAAC;AACnB,GACkB;AAClB,QAAM,WAAO;AAAA,IACX;AAAA,IACA;AAAA,MACE,gBAAgB,QAAQ;AAAA,MACxB;AAAA,MACA,iBAAiB,QAAQ,cAAc;AAAA,IACzC;AAAA,IACA;AAAA,MACE,eAAe,SAAS,gBAAgB;AAAA,IAC1C;AAAA,EACF;AACA,SAAO,QAAQ,KAAK,IAAI,EAAE,IAAI;AAAA,IAC5B,OAAG,wDAAoC,OAAO;AAAA,IAC9C,SAAS,EAAE,QAAQ,oBAAoB,GAAG,QAAQ,gBAAgB,QAAQ;AAAA,EAC5E,CAAC;AACH;AAEA,eAAsB,+CACpB,QACuC;AACvC,QAAM,mBAAmB,CAAC,KAAK;AAC/B,MAAI,CAAC,iBAAiB,SAAS,OAAO,MAAM,GAAG;AAC7C,UAAM,YAAQ,oCAAgB,MAAM;AACpC,UAAM,cAAU,yCAA0B,OAAO,IAAI;AAErD,UAAM;AAAA,EACR;AAEA,aAAO,wDAAyC,OAAO,IAAI;AAC7D;AAGO,SAAS,mCACd,SACA,UACA,UAA8E;AAAA,EAC5E,gBAAgB,CAAC;AACnB,GAC+C;AAC/C,aAAO;AAAA,IACL;AAAA,IACA,MAAM,wCAAwC,SAAS,UAAU,OAAO;AAAA,IACxE;AAAA,IACA,CAAC,KAAK;AAAA,IACN,EAAE,UAAU,SAAS,cAAc,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AAgB,CAAC,EAAE,GACxC;AAC5B,QAAM,SAAS,MAAM,SAAS,SAAS,UAAU,qBAAqB,OAAO;AAC7E,SAAO,gBAAgB,MAAM;AAC/B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var options_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(options_exports);
|
|
16
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/guestSubscriptions/options.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface GuestSubscriptionsListBySubscriptionLocationResourceOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GuestSubscriptionsDeleteOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GuestSubscriptionsCreateOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface GuestSubscriptionsGetOptionalParams extends OperationOptions {}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { ComputeLimitContext, ComputeLimitClientOptionalParams, } from "./computeLimitContext.js";
|
|
2
|
+
export { createComputeLimit } from "./computeLimitContext.js";
|
|
2
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var api_exports = {};
|
|
19
|
+
__export(api_exports, {
|
|
20
|
+
createComputeLimit: () => import_computeLimitContext.createComputeLimit
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(api_exports);
|
|
23
|
+
var import_computeLimitContext = require("./computeLimitContext.js");
|
|
24
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
+
0 && (module.exports = {
|
|
26
|
+
createComputeLimit
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/api/index.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type {\n ComputeLimitContext,\n ComputeLimitClientOptionalParams,\n} from \"./computeLimitContext.js\";\nexport { createComputeLimit } from \"./computeLimitContext.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,iCAAmC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var operations_exports = {};
|
|
19
|
+
__export(operations_exports, {
|
|
20
|
+
list: () => import_operations.list
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(operations_exports);
|
|
23
|
+
var import_operations = require("./operations.js");
|
|
24
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
+
0 && (module.exports = {
|
|
26
|
+
list
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/api/operations/index.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { list } from \"./operations.js\";\nexport type { OperationsListOptionalParams } from \"./options.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAqB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,39 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var operations_exports = {};
|
|
19
|
+
__export(operations_exports, {
|
|
20
|
+
_listDeserialize: () => _listDeserialize,
|
|
21
|
+
_listSend: () => _listSend,
|
|
22
|
+
list: () => list
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(operations_exports);
|
|
25
|
+
var import_models = require("../../models/models.js");
|
|
26
|
+
var import_pagingHelpers = require("../../static-helpers/pagingHelpers.js");
|
|
27
|
+
var import_urlTemplate = require("../../static-helpers/urlTemplate.js");
|
|
28
|
+
var import_core_client = require("@azure-rest/core-client");
|
|
12
29
|
function _listSend(context, options = { requestOptions: {} }) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
30
|
+
const path = (0, import_urlTemplate.expandUrlTemplate)(
|
|
31
|
+
"/providers/Microsoft.ComputeLimit/operations{?api%2Dversion}",
|
|
32
|
+
{
|
|
33
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
return context.path(path).get({
|
|
40
|
+
...(0, import_core_client.operationOptionsToRequestParameters)(options),
|
|
41
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers }
|
|
42
|
+
});
|
|
25
43
|
}
|
|
26
44
|
async function _listDeserialize(result) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
45
|
+
const expectedStatuses = ["200"];
|
|
46
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
47
|
+
const error = (0, import_core_client.createRestError)(result);
|
|
48
|
+
error.details = (0, import_models.errorResponseDeserializer)(result.body);
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
return (0, import_models._operationListResultDeserializer)(result.body);
|
|
34
52
|
}
|
|
35
|
-
/** List the operations for the provider */
|
|
36
53
|
function list(context, options = { requestOptions: {} }) {
|
|
37
|
-
|
|
54
|
+
return (0, import_pagingHelpers.buildPagedAsyncIterator)(
|
|
55
|
+
context,
|
|
56
|
+
() => _listSend(context, options),
|
|
57
|
+
_listDeserialize,
|
|
58
|
+
["200"],
|
|
59
|
+
{ itemName: "value", nextLinkName: "nextLink", apiVersion: context.apiVersion ?? "2026-03-20" }
|
|
60
|
+
);
|
|
38
61
|
}
|
|
39
|
-
|
|
62
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
+
0 && (module.exports = {
|
|
64
|
+
_listDeserialize,
|
|
65
|
+
_listSend,
|
|
66
|
+
list
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=operations.js.map
|