@azure/arm-computelimit 1.0.0-alpha.20260311.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/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/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 +5 -21
- package/dist/commonjs/api/computeLimitContext.js.map +3 -3
- 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 +1 -0
- package/dist/commonjs/api/guestSubscriptions/index.js.map +2 -2
- package/dist/commonjs/api/guestSubscriptions/operations.js +9 -17
- package/dist/commonjs/api/guestSubscriptions/operations.js.map +3 -3
- package/dist/commonjs/api/guestSubscriptions/options.js +1 -0
- package/dist/commonjs/api/guestSubscriptions/options.js.map +1 -1
- package/dist/commonjs/api/index.d.ts +2 -1
- package/dist/commonjs/api/index.js +1 -0
- package/dist/commonjs/api/index.js.map +3 -3
- package/dist/commonjs/api/operations/index.d.ts +1 -1
- package/dist/commonjs/api/operations/index.js +1 -0
- package/dist/commonjs/api/operations/index.js.map +2 -2
- package/dist/commonjs/api/operations/operations.js +4 -6
- package/dist/commonjs/api/operations/operations.js.map +3 -3
- package/dist/commonjs/api/operations/options.js +1 -0
- package/dist/commonjs/api/operations/options.js.map +1 -1
- package/dist/commonjs/api/sharedLimits/index.d.ts +1 -1
- package/dist/commonjs/api/sharedLimits/index.js +1 -0
- package/dist/commonjs/api/sharedLimits/index.js.map +2 -2
- package/dist/commonjs/api/sharedLimits/operations.js +11 -23
- package/dist/commonjs/api/sharedLimits/operations.js.map +3 -3
- package/dist/commonjs/api/sharedLimits/options.js +1 -0
- package/dist/commonjs/api/sharedLimits/options.js.map +1 -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 +1 -0
- package/dist/commonjs/classic/guestSubscriptions/index.js.map +1 -1
- package/dist/commonjs/classic/index.d.ts +4 -3
- package/dist/commonjs/classic/index.js +1 -0
- package/dist/commonjs/classic/index.js.map +2 -2
- package/dist/commonjs/classic/operations/index.js +1 -0
- package/dist/commonjs/classic/operations/index.js.map +1 -1
- package/dist/commonjs/classic/sharedLimits/index.js +1 -0
- package/dist/commonjs/classic/sharedLimits/index.js.map +1 -1
- package/dist/commonjs/computeLimitClient.d.ts +4 -1
- package/dist/commonjs/computeLimitClient.js +5 -0
- package/dist/commonjs/computeLimitClient.js.map +3 -3
- package/dist/commonjs/index.d.ts +16 -10
- package/dist/commonjs/index.js +8 -2
- package/dist/commonjs/index.js.map +3 -3
- package/dist/commonjs/logger.js +1 -0
- package/dist/commonjs/logger.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +2 -1
- package/dist/commonjs/models/index.js +3 -0
- package/dist/commonjs/models/index.js.map +3 -3
- package/dist/commonjs/models/models.d.ts +72 -8
- package/dist/commonjs/models/models.js +73 -8
- package/dist/commonjs/models/models.js.map +4 -4
- 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 +1 -0
- package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts +2 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js +17 -1
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +3 -3
- 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 +16 -5
- package/dist/commonjs/static-helpers/urlTemplate.js.map +3 -3
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/api/computeLimitContext.d.ts +3 -3
- package/dist/esm/api/computeLimitContext.js +20 -34
- package/dist/esm/api/computeLimitContext.js.map +1 -7
- 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 +4 -7
- package/dist/esm/api/guestSubscriptions/index.js.map +1 -7
- package/dist/esm/api/guestSubscriptions/operations.js +106 -144
- package/dist/esm/api/guestSubscriptions/operations.js.map +1 -7
- package/dist/esm/api/guestSubscriptions/options.js +4 -0
- package/dist/esm/api/guestSubscriptions/options.js.map +1 -7
- package/dist/esm/api/index.d.ts +2 -1
- package/dist/esm/api/index.js +4 -6
- package/dist/esm/api/index.js.map +1 -7
- package/dist/esm/api/operations/index.d.ts +1 -1
- package/dist/esm/api/operations/index.js +4 -4
- package/dist/esm/api/operations/index.js.map +1 -7
- package/dist/esm/api/operations/operations.js +25 -42
- package/dist/esm/api/operations/operations.js.map +1 -7
- package/dist/esm/api/operations/options.js +4 -0
- package/dist/esm/api/operations/options.js.map +1 -7
- package/dist/esm/api/sharedLimits/index.d.ts +1 -1
- package/dist/esm/api/sharedLimits/index.js +4 -7
- package/dist/esm/api/sharedLimits/index.js.map +1 -7
- package/dist/esm/api/sharedLimits/operations.js +103 -145
- package/dist/esm/api/sharedLimits/operations.js.map +1 -7
- package/dist/esm/api/sharedLimits/options.js +4 -0
- package/dist/esm/api/sharedLimits/options.js.map +1 -7
- 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/guestSubscriptions/index.js +14 -19
- package/dist/esm/classic/guestSubscriptions/index.js.map +1 -7
- package/dist/esm/classic/index.d.ts +4 -3
- package/dist/esm/classic/index.js +4 -0
- package/dist/esm/classic/index.js.map +1 -7
- package/dist/esm/classic/operations/index.js +10 -10
- package/dist/esm/classic/operations/index.js.map +1 -7
- package/dist/esm/classic/sharedLimits/index.js +14 -19
- package/dist/esm/classic/sharedLimits/index.js.map +1 -7
- package/dist/esm/computeLimitClient.d.ts +4 -1
- package/dist/esm/computeLimitClient.js +32 -26
- package/dist/esm/computeLimitClient.js.map +1 -7
- package/dist/esm/index.d.ts +16 -10
- package/dist/esm/index.js +7 -17
- package/dist/esm/index.js.map +1 -7
- package/dist/esm/logger.js +4 -4
- package/dist/esm/logger.js.map +1 -7
- package/dist/esm/models/index.d.ts +2 -1
- package/dist/esm/models/index.js +4 -14
- package/dist/esm/models/index.js.map +1 -7
- package/dist/esm/models/models.d.ts +72 -8
- package/dist/esm/models/models.js +304 -238
- package/dist/esm/models/models.js.map +1 -7
- 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/cloudSettingHelpers.js +37 -26
- package/dist/esm/static-helpers/cloudSettingHelpers.js.map +1 -7
- package/dist/esm/static-helpers/pagingHelpers.d.ts +2 -0
- package/dist/esm/static-helpers/pagingHelpers.js +124 -85
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -7
- 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 +171 -134
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -7
- 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/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/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 +34 -14
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Key links:
|
|
|
8
8
|
|
|
9
9
|
- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/computelimit/arm-computelimit)
|
|
10
10
|
- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-computelimit)
|
|
11
|
-
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-computelimit
|
|
11
|
+
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-computelimit)
|
|
12
12
|
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/computelimit/arm-computelimit/samples)
|
|
13
13
|
|
|
14
14
|
## Getting started
|
|
@@ -3,11 +3,11 @@ import type { Client, ClientOptions } from "@azure-rest/core-client";
|
|
|
3
3
|
import type { TokenCredential } from "@azure/core-auth";
|
|
4
4
|
/** Microsoft Azure Compute Limit Resource Provider. */
|
|
5
5
|
export interface ComputeLimitContext extends Client {
|
|
6
|
-
/** The API version to use for this operation. */
|
|
7
|
-
/** Known values of {@link KnownVersions} that the service accepts. */
|
|
8
|
-
apiVersion: string;
|
|
9
6
|
/** The ID of the target subscription. The value must be an UUID. */
|
|
10
7
|
subscriptionId: string;
|
|
8
|
+
/** The API version to use for this operation. */
|
|
9
|
+
/** Known values of {@link KnownVersions} that the service accepts. */
|
|
10
|
+
apiVersion?: string;
|
|
11
11
|
}
|
|
12
12
|
/** Optional parameters for the client. */
|
|
13
13
|
export interface ComputeLimitClientOptionalParams extends ClientOptions {
|
|
@@ -7,7 +7,7 @@ import { getClient } from "@azure-rest/core-client";
|
|
|
7
7
|
export function createComputeLimit(credential, subscriptionId, options = {}) {
|
|
8
8
|
const endpointUrl = options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com";
|
|
9
9
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
10
|
-
const userAgentInfo = `azsdk-js-arm-computelimit/1.0.0
|
|
10
|
+
const userAgentInfo = `azsdk-js-arm-computelimit/1.0.0`;
|
|
11
11
|
const userAgentPrefix = prefixFromOptions
|
|
12
12
|
? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
|
|
13
13
|
: `azsdk-js-api ${userAgentInfo}`;
|
|
@@ -15,29 +15,10 @@ export function createComputeLimit(credential, subscriptionId, options = {}) {
|
|
|
15
15
|
...options,
|
|
16
16
|
userAgentOptions: { userAgentPrefix },
|
|
17
17
|
loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },
|
|
18
|
-
credentials: {
|
|
19
|
-
scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],
|
|
20
|
-
},
|
|
18
|
+
credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },
|
|
21
19
|
};
|
|
22
20
|
const clientContext = getClient(endpointUrl, credential, updatedOptions);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
clientContext.pipeline.addPolicy({
|
|
26
|
-
name: "ClientApiVersionPolicy",
|
|
27
|
-
sendRequest: (req, next) => {
|
|
28
|
-
// Use the apiVersion defined in request url directly
|
|
29
|
-
// Append one if there is no apiVersion and we have one at client options
|
|
30
|
-
const url = new URL(req.url);
|
|
31
|
-
if (!url.searchParams.get("api-version")) {
|
|
32
|
-
req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
|
|
33
|
-
}
|
|
34
|
-
return next(req);
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
return {
|
|
38
|
-
...clientContext,
|
|
39
|
-
apiVersion,
|
|
40
|
-
subscriptionId,
|
|
41
|
-
};
|
|
21
|
+
const apiVersion = options.apiVersion;
|
|
22
|
+
return { ...clientContext, apiVersion, subscriptionId };
|
|
42
23
|
}
|
|
43
24
|
//# sourceMappingURL=computeLimitContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeLimitContext.js","sourceRoot":"","sources":["../../../src/api/computeLimitContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;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AgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,GAAG,WAAW,WAAW,CAAC,EAAE;KACpF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE,cAAc,EAAyB,CAAC;AACjF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { AzureSupportedClouds } from \"../static-helpers/cloudSettingHelpers.js\";\nimport { getArmEndpoint } from \"../static-helpers/cloudSettingHelpers.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/** Microsoft Azure Compute Limit Resource Provider. */\nexport interface ComputeLimitContext extends Client {\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Optional parameters for the client. */\nexport interface ComputeLimitClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n /** Specifies the Azure cloud environment for the client. */\n cloudSetting?: AzureSupportedClouds;\n}\n\n/** Microsoft Azure Compute Limit Resource Provider. */\nexport function createComputeLimit(\n credential: TokenCredential,\n subscriptionId: string,\n options: ComputeLimitClientOptionalParams = {},\n): ComputeLimitContext {\n const endpointUrl =\n options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-computelimit/1.0.0`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n const apiVersion = options.apiVersion;\n return { ...clientContext, apiVersion, subscriptionId } as ComputeLimitContext;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/features/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,kCAAkC,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { enable, listBySubscriptionLocationResource, get } from \"./operations.js\";\nexport type {\n FeaturesEnableOptionalParams,\n FeaturesListBySubscriptionLocationResourceOptionalParams,\n FeaturesGetOptionalParams,\n} from \"./options.js\";\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComputeLimitContext as Client } from "../index.js";
|
|
2
|
+
import type { Feature, _FeatureListResult, OperationStatusResult } from "../../models/models.js";
|
|
3
|
+
import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
4
|
+
import type { FeaturesEnableOptionalParams, FeaturesListBySubscriptionLocationResourceOptionalParams, FeaturesGetOptionalParams } from "./options.js";
|
|
5
|
+
import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
6
|
+
import type { PollerLike, OperationState } from "@azure/core-lro";
|
|
7
|
+
export declare function _enableSend(context: Client, location: string, featureName: string, options?: FeaturesEnableOptionalParams): StreamableMethod;
|
|
8
|
+
export declare function _enableDeserialize(result: PathUncheckedResponse): Promise<OperationStatusResult>;
|
|
9
|
+
/** Enables a compute limit feature for the subscription at the specified location. */
|
|
10
|
+
export declare function enable(context: Client, location: string, featureName: string, options?: FeaturesEnableOptionalParams): PollerLike<OperationState<OperationStatusResult>, OperationStatusResult>;
|
|
11
|
+
export declare function _listBySubscriptionLocationResourceSend(context: Client, location: string, options?: FeaturesListBySubscriptionLocationResourceOptionalParams): StreamableMethod;
|
|
12
|
+
export declare function _listBySubscriptionLocationResourceDeserialize(result: PathUncheckedResponse): Promise<_FeatureListResult>;
|
|
13
|
+
/** Lists all compute limit features for the subscription at the specified location. */
|
|
14
|
+
export declare function listBySubscriptionLocationResource(context: Client, location: string, options?: FeaturesListBySubscriptionLocationResourceOptionalParams): PagedAsyncIterableIterator<Feature>;
|
|
15
|
+
export declare function _getSend(context: Client, location: string, featureName: string, options?: FeaturesGetOptionalParams): StreamableMethod;
|
|
16
|
+
export declare function _getDeserialize(result: PathUncheckedResponse): Promise<Feature>;
|
|
17
|
+
/** Gets the properties of a compute limit feature. */
|
|
18
|
+
export declare function get(context: Client, location: string, featureName: string, options?: FeaturesGetOptionalParams): Promise<Feature>;
|
|
19
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { errorResponseDeserializer, featureDeserializer, _featureListResultDeserializer, operationStatusResultDeserializer, } from "../../models/models.js";
|
|
4
|
+
import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
|
+
import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js";
|
|
6
|
+
import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
|
|
7
|
+
import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client";
|
|
8
|
+
export function _enableSend(context, location, featureName, options = { requestOptions: {} }) {
|
|
9
|
+
const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features/{featureName}/enable{?api%2Dversion}", {
|
|
10
|
+
subscriptionId: context.subscriptionId,
|
|
11
|
+
location: location,
|
|
12
|
+
featureName: featureName,
|
|
13
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20",
|
|
14
|
+
}, {
|
|
15
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
16
|
+
});
|
|
17
|
+
return context.path(path).post({
|
|
18
|
+
...operationOptionsToRequestParameters(options),
|
|
19
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers },
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export async function _enableDeserialize(result) {
|
|
23
|
+
const expectedStatuses = ["202", "200", "201"];
|
|
24
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
25
|
+
const error = createRestError(result);
|
|
26
|
+
error.details = errorResponseDeserializer(result.body);
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
return operationStatusResultDeserializer(result.body);
|
|
30
|
+
}
|
|
31
|
+
/** Enables a compute limit feature for the subscription at the specified location. */
|
|
32
|
+
export function enable(context, location, featureName, options = { requestOptions: {} }) {
|
|
33
|
+
return getLongRunningPoller(context, _enableDeserialize, ["202", "200", "201"], {
|
|
34
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
35
|
+
abortSignal: options?.abortSignal,
|
|
36
|
+
getInitialResponse: () => _enableSend(context, location, featureName, options),
|
|
37
|
+
resourceLocationConfig: "location",
|
|
38
|
+
apiVersion: context.apiVersion ?? "2026-03-20",
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export function _listBySubscriptionLocationResourceSend(context, location, options = { requestOptions: {} }) {
|
|
42
|
+
const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features{?api%2Dversion}", {
|
|
43
|
+
subscriptionId: context.subscriptionId,
|
|
44
|
+
location: location,
|
|
45
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20",
|
|
46
|
+
}, {
|
|
47
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
48
|
+
});
|
|
49
|
+
return context.path(path).get({
|
|
50
|
+
...operationOptionsToRequestParameters(options),
|
|
51
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers },
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export async function _listBySubscriptionLocationResourceDeserialize(result) {
|
|
55
|
+
const expectedStatuses = ["200"];
|
|
56
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
57
|
+
const error = createRestError(result);
|
|
58
|
+
error.details = errorResponseDeserializer(result.body);
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
return _featureListResultDeserializer(result.body);
|
|
62
|
+
}
|
|
63
|
+
/** Lists all compute limit features for the subscription at the specified location. */
|
|
64
|
+
export function listBySubscriptionLocationResource(context, location, options = { requestOptions: {} }) {
|
|
65
|
+
return buildPagedAsyncIterator(context, () => _listBySubscriptionLocationResourceSend(context, location, options), _listBySubscriptionLocationResourceDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink", apiVersion: context.apiVersion ?? "2026-03-20" });
|
|
66
|
+
}
|
|
67
|
+
export function _getSend(context, location, featureName, options = { requestOptions: {} }) {
|
|
68
|
+
const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features/{featureName}{?api%2Dversion}", {
|
|
69
|
+
subscriptionId: context.subscriptionId,
|
|
70
|
+
location: location,
|
|
71
|
+
featureName: featureName,
|
|
72
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20",
|
|
73
|
+
}, {
|
|
74
|
+
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
75
|
+
});
|
|
76
|
+
return context.path(path).get({
|
|
77
|
+
...operationOptionsToRequestParameters(options),
|
|
78
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers },
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export async function _getDeserialize(result) {
|
|
82
|
+
const expectedStatuses = ["200"];
|
|
83
|
+
if (!expectedStatuses.includes(result.status)) {
|
|
84
|
+
const error = createRestError(result);
|
|
85
|
+
error.details = errorResponseDeserializer(result.body);
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
return featureDeserializer(result.body);
|
|
89
|
+
}
|
|
90
|
+
/** Gets the properties of a compute limit feature. */
|
|
91
|
+
export async function get(context, location, featureName, options = { requestOptions: {} }) {
|
|
92
|
+
const result = await _getSend(context, location, featureName, options);
|
|
93
|
+
return _getDeserialize(result);
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/features/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAOxE,OAAO,EAAE,eAAe,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAG/F,MAAM,UAAU,WAAW,CACzB,OAAe,EACf,QAAgB,EAChB,WAAmB,EACnB,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,qIAAqI,EACrI;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,WAAW;QACxB,eAAe,EAAE,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AAK,UAAU,GAAG,CACvB,OAAe,EACf,QAAgB,EAChB,WAAmB,EACnB,UAAqC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE3D,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACvE,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 { Feature, _FeatureListResult, OperationStatusResult } from \"../../models/models.js\";\nimport {\n errorResponseDeserializer,\n featureDeserializer,\n _featureListResultDeserializer,\n operationStatusResultDeserializer,\n} from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type {\n FeaturesEnableOptionalParams,\n FeaturesListBySubscriptionLocationResourceOptionalParams,\n FeaturesGetOptionalParams,\n} from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type { PollerLike, OperationState } from \"@azure/core-lro\";\n\nexport function _enableSend(\n context: Client,\n location: string,\n featureName: string,\n options: FeaturesEnableOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features/{featureName}/enable{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n featureName: featureName,\n \"api%2Dversion\": context.apiVersion ?? \"2026-03-20\",\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _enableDeserialize(\n result: PathUncheckedResponse,\n): Promise<OperationStatusResult> {\n const expectedStatuses = [\"202\", \"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 operationStatusResultDeserializer(result.body);\n}\n\n/** Enables a compute limit feature for the subscription at the specified location. */\nexport function enable(\n context: Client,\n location: string,\n featureName: string,\n options: FeaturesEnableOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<OperationStatusResult>, OperationStatusResult> {\n return getLongRunningPoller(context, _enableDeserialize, [\"202\", \"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () => _enableSend(context, location, featureName, options),\n resourceLocationConfig: \"location\",\n apiVersion: context.apiVersion ?? \"2026-03-20\",\n }) as PollerLike<OperationState<OperationStatusResult>, OperationStatusResult>;\n}\n\nexport function _listBySubscriptionLocationResourceSend(\n context: Client,\n location: string,\n options: FeaturesListBySubscriptionLocationResourceOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features{?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<_FeatureListResult> {\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 _featureListResultDeserializer(result.body);\n}\n\n/** Lists all compute limit features for the subscription at the specified location. */\nexport function listBySubscriptionLocationResource(\n context: Client,\n location: string,\n options: FeaturesListBySubscriptionLocationResourceOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Feature> {\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 _getSend(\n context: Client,\n location: string,\n featureName: string,\n options: FeaturesGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/features/{featureName}{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n location: location,\n featureName: featureName,\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<Feature> {\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 featureDeserializer(result.body);\n}\n\n/** Gets the properties of a compute limit feature. */\nexport async function get(\n context: Client,\n location: string,\n featureName: string,\n options: FeaturesGetOptionalParams = { requestOptions: {} },\n): Promise<Feature> {\n const result = await _getSend(context, location, featureName, options);\n return _getDeserialize(result);\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OperationOptions } from "@azure-rest/core-client";
|
|
2
|
+
/** Optional parameters. */
|
|
3
|
+
export interface FeaturesEnableOptionalParams extends OperationOptions {
|
|
4
|
+
/** Delay to wait until next poll, in milliseconds. */
|
|
5
|
+
updateIntervalInMs?: number;
|
|
6
|
+
}
|
|
7
|
+
/** Optional parameters. */
|
|
8
|
+
export interface FeaturesListBySubscriptionLocationResourceOptionalParams extends OperationOptions {
|
|
9
|
+
}
|
|
10
|
+
/** Optional parameters. */
|
|
11
|
+
export interface FeaturesGetOptionalParams extends OperationOptions {
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/features/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","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 FeaturesEnableOptionalParams extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n}\n\n/** Optional parameters. */\nexport interface FeaturesListBySubscriptionLocationResourceOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface FeaturesGetOptionalParams extends OperationOptions {}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { listBySubscriptionLocationResource, $delete, create, get } from "./operations.js";
|
|
2
|
-
export {
|
|
2
|
+
export type { GuestSubscriptionsListBySubscriptionLocationResourceOptionalParams, GuestSubscriptionsDeleteOptionalParams, GuestSubscriptionsCreateOptionalParams, GuestSubscriptionsGetOptionalParams, } from "./options.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/guestSubscriptions/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kCAAkC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { listBySubscriptionLocationResource, $delete, create, get } from \"./operations.js\";\nexport {\n
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/guestSubscriptions/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kCAAkC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { listBySubscriptionLocationResource, $delete, create, get } from \"./operations.js\";\nexport type {\n GuestSubscriptionsListBySubscriptionLocationResourceOptionalParams,\n GuestSubscriptionsDeleteOptionalParams,\n GuestSubscriptionsCreateOptionalParams,\n GuestSubscriptionsGetOptionalParams,\n} from \"./options.js\";\n"]}
|
|
@@ -10,16 +10,13 @@ export function _listBySubscriptionLocationResourceSend(context, location, optio
|
|
|
10
10
|
const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions{?api%2Dversion}", {
|
|
11
11
|
subscriptionId: context.subscriptionId,
|
|
12
12
|
location: location,
|
|
13
|
-
"api%2Dversion": context.apiVersion,
|
|
13
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20",
|
|
14
14
|
}, {
|
|
15
15
|
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
16
16
|
});
|
|
17
17
|
return context.path(path).get({
|
|
18
18
|
...operationOptionsToRequestParameters(options),
|
|
19
|
-
headers: {
|
|
20
|
-
accept: "application/json",
|
|
21
|
-
...options.requestOptions?.headers,
|
|
22
|
-
},
|
|
19
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers },
|
|
23
20
|
});
|
|
24
21
|
}
|
|
25
22
|
export async function _listBySubscriptionLocationResourceDeserialize(result) {
|
|
@@ -35,14 +32,14 @@ export async function _listBySubscriptionLocationResourceDeserialize(result) {
|
|
|
35
32
|
export function listBySubscriptionLocationResource(context, location, options = {
|
|
36
33
|
requestOptions: {},
|
|
37
34
|
}) {
|
|
38
|
-
return buildPagedAsyncIterator(context, () => _listBySubscriptionLocationResourceSend(context, location, options), _listBySubscriptionLocationResourceDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
35
|
+
return buildPagedAsyncIterator(context, () => _listBySubscriptionLocationResourceSend(context, location, options), _listBySubscriptionLocationResourceDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink", apiVersion: context.apiVersion ?? "2026-03-20" });
|
|
39
36
|
}
|
|
40
37
|
export function _$deleteSend(context, location, guestSubscriptionId, options = { requestOptions: {} }) {
|
|
41
38
|
const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}{?api%2Dversion}", {
|
|
42
39
|
subscriptionId: context.subscriptionId,
|
|
43
40
|
location: location,
|
|
44
41
|
guestSubscriptionId: guestSubscriptionId,
|
|
45
|
-
"api%2Dversion": context.apiVersion,
|
|
42
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20",
|
|
46
43
|
}, {
|
|
47
44
|
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
48
45
|
});
|
|
@@ -72,17 +69,14 @@ export function _createSend(context, location, guestSubscriptionId, resource, op
|
|
|
72
69
|
subscriptionId: context.subscriptionId,
|
|
73
70
|
location: location,
|
|
74
71
|
guestSubscriptionId: guestSubscriptionId,
|
|
75
|
-
"api%2Dversion": context.apiVersion,
|
|
72
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20",
|
|
76
73
|
}, {
|
|
77
74
|
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
78
75
|
});
|
|
79
76
|
return context.path(path).put({
|
|
80
77
|
...operationOptionsToRequestParameters(options),
|
|
81
78
|
contentType: "application/json",
|
|
82
|
-
headers: {
|
|
83
|
-
accept: "application/json",
|
|
84
|
-
...options.requestOptions?.headers,
|
|
85
|
-
},
|
|
79
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers },
|
|
86
80
|
body: guestSubscriptionSerializer(resource),
|
|
87
81
|
});
|
|
88
82
|
}
|
|
@@ -105,16 +99,13 @@ export function _getSend(context, location, guestSubscriptionId, options = { req
|
|
|
105
99
|
subscriptionId: context.subscriptionId,
|
|
106
100
|
location: location,
|
|
107
101
|
guestSubscriptionId: guestSubscriptionId,
|
|
108
|
-
"api%2Dversion": context.apiVersion,
|
|
102
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20",
|
|
109
103
|
}, {
|
|
110
104
|
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
111
105
|
});
|
|
112
106
|
return context.path(path).get({
|
|
113
107
|
...operationOptionsToRequestParameters(options),
|
|
114
|
-
headers: {
|
|
115
|
-
accept: "application/json",
|
|
116
|
-
...options.requestOptions?.headers,
|
|
117
|
-
},
|
|
108
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers },
|
|
118
109
|
});
|
|
119
110
|
}
|
|
120
111
|
export async function _getDeserialize(result) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/guestSubscriptions/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAC7B,wCAAwC,GACzC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAQxE,OAAO,EAAE,eAAe,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE/F,MAAM,UAAU,uCAAuC,CACrD,OAAe,EACf,QAAgB,EAChB,UAA8E;IAC5E,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,IAAI,GAAG,iBAAiB,CAC5B,0HAA0H,EAC1H;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,QAAQ,EA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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
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/guestSubscriptions/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAC7B,wCAAwC,GACzC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAQxE,OAAO,EAAE,eAAe,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE/F,MAAM,UAAU,uCAAuC,CACrD,OAAe,EACf,QAAgB,EAChB,UAA8E;IAC5E,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,IAAI,GAAG,iBAAiB,CAC5B,0HAA0H,EAC1H;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,QAAQ,EAAE,QAAQ;QAClB,eAAe,EAAE,OAAO,CAAC,UAAU,IAAI,YAAY;KACpD,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAA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AC;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 ?? \"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"]}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC","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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { list } from \"./operations.js\";\nexport {
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { list } from \"./operations.js\";\nexport type { OperationsListOptionalParams } from \"./options.js\";\n"]}
|
|
@@ -6,16 +6,13 @@ import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
|
|
|
6
6
|
import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client";
|
|
7
7
|
export function _listSend(context, options = { requestOptions: {} }) {
|
|
8
8
|
const path = expandUrlTemplate("/providers/Microsoft.ComputeLimit/operations{?api%2Dversion}", {
|
|
9
|
-
"api%2Dversion": context.apiVersion,
|
|
9
|
+
"api%2Dversion": context.apiVersion ?? "2026-03-20",
|
|
10
10
|
}, {
|
|
11
11
|
allowReserved: options?.requestOptions?.skipUrlEncoding,
|
|
12
12
|
});
|
|
13
13
|
return context.path(path).get({
|
|
14
14
|
...operationOptionsToRequestParameters(options),
|
|
15
|
-
headers: {
|
|
16
|
-
accept: "application/json",
|
|
17
|
-
...options.requestOptions?.headers,
|
|
18
|
-
},
|
|
15
|
+
headers: { accept: "application/json", ...options.requestOptions?.headers },
|
|
19
16
|
});
|
|
20
17
|
}
|
|
21
18
|
export async function _listDeserialize(result) {
|
|
@@ -29,6 +26,6 @@ export async function _listDeserialize(result) {
|
|
|
29
26
|
}
|
|
30
27
|
/** List the operations for the provider */
|
|
31
28
|
export function list(context, options = { requestOptions: {} }) {
|
|
32
|
-
return buildPagedAsyncIterator(context, () => _listSend(context, options), _listDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink" });
|
|
29
|
+
return buildPagedAsyncIterator(context, () => _listSend(context, options), _listDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink", apiVersion: context.apiVersion ?? "2026-03-20" });
|
|
33
30
|
}
|
|
34
31
|
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/operations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EACL,gCAAgC,EAChC,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAGxE,OAAO,EAAE,eAAe,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE/F,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,8DAA8D,EAC9D;QACE,eAAe,EAAE,OAAO,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/operations/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EACL,gCAAgC,EAChC,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAGxE,OAAO,EAAE,eAAe,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE/F,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,8DAA8D,EAC9D;QACE,eAAe,EAAE,OAAO,CAAC,UAAU,IAAI,YAAY;KACpD,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,GAAG,mCAAmC,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO,EAAE;KAC5E,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAEvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,gCAAgC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EACjC,gBAAgB,EAChB,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,YAAY,EAAE,CAChG,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ComputeLimitContext as Client } from \"../index.js\";\nimport type { _OperationListResult, Operation } from \"../../models/models.js\";\nimport {\n _operationListResultDeserializer,\n errorResponseDeserializer,\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 { OperationsListOptionalParams } from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/providers/Microsoft.ComputeLimit/operations{?api%2Dversion}\",\n {\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 _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OperationListResult> {\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 _operationListResultDeserializer(result.body);\n}\n\n/** List the operations for the provider */\nexport function list(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Operation> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\", apiVersion: context.apiVersion ?? \"2026-03-20\" },\n );\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { listBySubscriptionLocationResource, $delete, create, get } from "./operations.js";
|
|
2
|
-
export {
|
|
2
|
+
export type { SharedLimitsListBySubscriptionLocationResourceOptionalParams, SharedLimitsDeleteOptionalParams, SharedLimitsCreateOptionalParams, SharedLimitsGetOptionalParams, } from "./options.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/sharedLimits/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kCAAkC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { listBySubscriptionLocationResource, $delete, create, get } from \"./operations.js\";\nexport {\n
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/sharedLimits/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kCAAkC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { listBySubscriptionLocationResource, $delete, create, get } from \"./operations.js\";\nexport type {\n SharedLimitsListBySubscriptionLocationResourceOptionalParams,\n SharedLimitsDeleteOptionalParams,\n SharedLimitsCreateOptionalParams,\n SharedLimitsGetOptionalParams,\n} from \"./options.js\";\n"]}
|