@azure/arm-storagecache 8.1.0 → 8.2.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 +2 -2
- package/dist/browser/models/index.d.ts +185 -2
- package/dist/browser/models/index.d.ts.map +1 -1
- package/dist/browser/models/index.js +32 -0
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/mappers.d.ts +6 -0
- package/dist/browser/models/mappers.d.ts.map +1 -1
- package/dist/browser/models/mappers.js +183 -0
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/models/parameters.d.ts +3 -0
- package/dist/browser/models/parameters.d.ts.map +1 -1
- package/dist/browser/models/parameters.js +25 -2
- package/dist/browser/models/parameters.js.map +1 -1
- package/dist/browser/operations/expansionJobs.d.ts +120 -0
- package/dist/browser/operations/expansionJobs.d.ts.map +1 -0
- package/dist/browser/operations/expansionJobs.js +473 -0
- package/dist/browser/operations/expansionJobs.js.map +1 -0
- package/dist/browser/operations/index.d.ts +1 -0
- package/dist/browser/operations/index.d.ts.map +1 -1
- package/dist/browser/operations/index.js +1 -0
- package/dist/browser/operations/index.js.map +1 -1
- package/dist/browser/operationsInterfaces/expansionJobs.d.ts +93 -0
- package/dist/browser/operationsInterfaces/expansionJobs.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/expansionJobs.js +4 -0
- package/dist/browser/operationsInterfaces/expansionJobs.js.map +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/browser/operationsInterfaces/index.js +1 -0
- package/dist/browser/operationsInterfaces/index.js.map +1 -1
- package/dist/browser/storageCacheManagementClient.d.ts +2 -1
- package/dist/browser/storageCacheManagementClient.d.ts.map +1 -1
- package/dist/browser/storageCacheManagementClient.js +5 -3
- package/dist/browser/storageCacheManagementClient.js.map +1 -1
- package/dist/commonjs/index.js +35 -16
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/lroImpl.js +41 -21
- package/dist/commonjs/lroImpl.js.map +7 -1
- package/dist/commonjs/models/index.d.ts +185 -2
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +326 -386
- package/dist/commonjs/models/index.js.map +7 -1
- package/dist/commonjs/models/mappers.d.ts +6 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/models/mappers.js +4573 -4116
- package/dist/commonjs/models/mappers.js.map +7 -1
- package/dist/commonjs/models/parameters.d.ts +3 -0
- package/dist/commonjs/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/models/parameters.js +402 -287
- package/dist/commonjs/models/parameters.js.map +7 -1
- package/dist/commonjs/operations/amlFilesystems.js +594 -540
- package/dist/commonjs/operations/amlFilesystems.js.map +7 -1
- package/dist/commonjs/operations/ascOperations.js +79 -49
- package/dist/commonjs/operations/ascOperations.js.map +7 -1
- package/dist/commonjs/operations/ascUsages.js +141 -112
- package/dist/commonjs/operations/ascUsages.js.map +7 -1
- package/dist/commonjs/operations/autoExportJobs.js +527 -458
- package/dist/commonjs/operations/autoExportJobs.js.map +7 -1
- package/dist/commonjs/operations/autoImportJobs.js +527 -458
- package/dist/commonjs/operations/autoImportJobs.js.map +7 -1
- package/dist/commonjs/operations/caches.js +1353 -1315
- package/dist/commonjs/operations/caches.js.map +7 -1
- package/dist/commonjs/operations/expansionJobs.d.ts +120 -0
- package/dist/commonjs/operations/expansionJobs.d.ts.map +1 -0
- package/dist/commonjs/operations/expansionJobs.js +547 -0
- package/dist/commonjs/operations/expansionJobs.js.map +7 -0
- package/dist/commonjs/operations/importJobs.js +522 -453
- package/dist/commonjs/operations/importJobs.js.map +7 -1
- package/dist/commonjs/operations/index.d.ts +1 -0
- package/dist/commonjs/operations/index.d.ts.map +1 -1
- package/dist/commonjs/operations/index.js +45 -20
- package/dist/commonjs/operations/index.js.map +7 -1
- package/dist/commonjs/operations/operations.js +133 -104
- package/dist/commonjs/operations/operations.js.map +7 -1
- package/dist/commonjs/operations/skus.js +133 -104
- package/dist/commonjs/operations/skus.js.map +7 -1
- package/dist/commonjs/operations/storageTargetOperations.js +396 -356
- package/dist/commonjs/operations/storageTargetOperations.js.map +7 -1
- package/dist/commonjs/operations/storageTargets.js +567 -508
- package/dist/commonjs/operations/storageTargets.js.map +7 -1
- package/dist/commonjs/operations/usageModels.js +133 -104
- package/dist/commonjs/operations/usageModels.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/amlFilesystems.js +15 -5
- package/dist/commonjs/operationsInterfaces/amlFilesystems.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/ascOperations.js +15 -5
- package/dist/commonjs/operationsInterfaces/ascOperations.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/ascUsages.js +15 -5
- package/dist/commonjs/operationsInterfaces/ascUsages.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/autoExportJobs.js +15 -5
- package/dist/commonjs/operationsInterfaces/autoExportJobs.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/autoImportJobs.js +15 -5
- package/dist/commonjs/operationsInterfaces/autoImportJobs.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/caches.js +15 -5
- package/dist/commonjs/operationsInterfaces/caches.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/expansionJobs.d.ts +93 -0
- package/dist/commonjs/operationsInterfaces/expansionJobs.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/expansionJobs.js +15 -0
- package/dist/commonjs/operationsInterfaces/expansionJobs.js.map +7 -0
- package/dist/commonjs/operationsInterfaces/importJobs.js +15 -5
- package/dist/commonjs/operationsInterfaces/importJobs.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/index.d.ts +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/index.js +45 -20
- package/dist/commonjs/operationsInterfaces/index.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/operations.js +15 -5
- package/dist/commonjs/operationsInterfaces/operations.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/skus.js +15 -5
- package/dist/commonjs/operationsInterfaces/skus.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/storageTargetOperations.js +15 -5
- package/dist/commonjs/operationsInterfaces/storageTargetOperations.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/storageTargets.js +15 -5
- package/dist/commonjs/operationsInterfaces/storageTargets.js.map +7 -1
- package/dist/commonjs/operationsInterfaces/usageModels.js +15 -5
- package/dist/commonjs/operationsInterfaces/usageModels.js.map +7 -1
- package/dist/commonjs/pagingHelper.js +39 -25
- package/dist/commonjs/pagingHelper.js.map +7 -1
- package/dist/commonjs/storageCacheManagementClient.d.ts +2 -1
- package/dist/commonjs/storageCacheManagementClient.d.ts.map +1 -1
- package/dist/commonjs/storageCacheManagementClient.js +198 -172
- package/dist/commonjs/storageCacheManagementClient.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/index.js +6 -8
- package/dist/esm/index.js.map +7 -1
- package/dist/esm/lroImpl.js +19 -19
- package/dist/esm/lroImpl.js.map +7 -1
- package/dist/esm/models/index.d.ts +185 -2
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +272 -383
- package/dist/esm/models/index.js.map +7 -1
- package/dist/esm/models/mappers.d.ts +6 -0
- package/dist/esm/models/mappers.d.ts.map +1 -1
- package/dist/esm/models/mappers.js +4422 -4111
- package/dist/esm/models/mappers.js.map +7 -1
- package/dist/esm/models/parameters.d.ts +3 -0
- package/dist/esm/models/parameters.d.ts.map +1 -1
- package/dist/esm/models/parameters.js +360 -283
- package/dist/esm/models/parameters.js.map +7 -1
- package/dist/esm/operations/amlFilesystems.js +556 -530
- package/dist/esm/operations/amlFilesystems.js.map +7 -1
- package/dist/esm/operations/ascOperations.js +44 -42
- package/dist/esm/operations/ascOperations.js.map +7 -1
- package/dist/esm/operations/ascUsages.js +105 -104
- package/dist/esm/operations/ascUsages.js.map +7 -1
- package/dist/esm/operations/autoExportJobs.js +489 -448
- package/dist/esm/operations/autoExportJobs.js.map +7 -1
- package/dist/esm/operations/autoImportJobs.js +489 -448
- package/dist/esm/operations/autoImportJobs.js.map +7 -1
- package/dist/esm/operations/caches.js +1315 -1305
- package/dist/esm/operations/caches.js.map +7 -1
- package/dist/esm/operations/expansionJobs.d.ts +120 -0
- package/dist/esm/operations/expansionJobs.d.ts.map +1 -0
- package/dist/esm/operations/expansionJobs.js +514 -0
- package/dist/esm/operations/expansionJobs.js.map +7 -0
- package/dist/esm/operations/importJobs.js +484 -443
- package/dist/esm/operations/importJobs.js.map +7 -1
- package/dist/esm/operations/index.d.ts +1 -0
- package/dist/esm/operations/index.d.ts.map +1 -1
- package/dist/esm/operations/index.js +1 -5
- package/dist/esm/operations/index.js.map +7 -1
- package/dist/esm/operations/operations.js +97 -96
- package/dist/esm/operations/operations.js.map +7 -1
- package/dist/esm/operations/skus.js +97 -96
- package/dist/esm/operations/skus.js.map +7 -1
- package/dist/esm/operations/storageTargetOperations.js +359 -347
- package/dist/esm/operations/storageTargetOperations.js.map +7 -1
- package/dist/esm/operations/storageTargets.js +529 -498
- package/dist/esm/operations/storageTargets.js.map +7 -1
- package/dist/esm/operations/usageModels.js +97 -96
- package/dist/esm/operations/usageModels.js.map +7 -1
- package/dist/esm/operationsInterfaces/amlFilesystems.js +0 -4
- package/dist/esm/operationsInterfaces/amlFilesystems.js.map +7 -1
- package/dist/esm/operationsInterfaces/ascOperations.js +0 -4
- package/dist/esm/operationsInterfaces/ascOperations.js.map +7 -1
- package/dist/esm/operationsInterfaces/ascUsages.js +0 -4
- package/dist/esm/operationsInterfaces/ascUsages.js.map +7 -1
- package/dist/esm/operationsInterfaces/autoExportJobs.js +0 -4
- package/dist/esm/operationsInterfaces/autoExportJobs.js.map +7 -1
- package/dist/esm/operationsInterfaces/autoImportJobs.js +0 -4
- package/dist/esm/operationsInterfaces/autoImportJobs.js.map +7 -1
- package/dist/esm/operationsInterfaces/caches.js +0 -4
- package/dist/esm/operationsInterfaces/caches.js.map +7 -1
- package/dist/esm/operationsInterfaces/expansionJobs.d.ts +93 -0
- package/dist/esm/operationsInterfaces/expansionJobs.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/expansionJobs.js +0 -0
- package/dist/esm/operationsInterfaces/expansionJobs.js.map +7 -0
- package/dist/esm/operationsInterfaces/importJobs.js +0 -4
- package/dist/esm/operationsInterfaces/importJobs.js.map +7 -1
- package/dist/esm/operationsInterfaces/index.d.ts +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/esm/operationsInterfaces/index.js +1 -5
- package/dist/esm/operationsInterfaces/index.js.map +7 -1
- package/dist/esm/operationsInterfaces/operations.js +0 -4
- package/dist/esm/operationsInterfaces/operations.js.map +7 -1
- package/dist/esm/operationsInterfaces/skus.js +0 -4
- package/dist/esm/operationsInterfaces/skus.js.map +7 -1
- package/dist/esm/operationsInterfaces/storageTargetOperations.js +0 -4
- package/dist/esm/operationsInterfaces/storageTargetOperations.js.map +7 -1
- package/dist/esm/operationsInterfaces/storageTargets.js +0 -4
- package/dist/esm/operationsInterfaces/storageTargets.js.map +7 -1
- package/dist/esm/operationsInterfaces/usageModels.js +0 -4
- package/dist/esm/operationsInterfaces/usageModels.js.map +7 -1
- package/dist/esm/pagingHelper.js +17 -23
- package/dist/esm/pagingHelper.js.map +7 -1
- package/dist/esm/storageCacheManagementClient.d.ts +2 -1
- package/dist/esm/storageCacheManagementClient.d.ts.map +1 -1
- package/dist/esm/storageCacheManagementClient.js +176 -164
- package/dist/esm/storageCacheManagementClient.js.map +7 -1
- package/dist/react-native/models/index.d.ts +185 -2
- package/dist/react-native/models/index.d.ts.map +1 -1
- package/dist/react-native/models/index.js +32 -0
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/mappers.d.ts +6 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -1
- package/dist/react-native/models/mappers.js +183 -0
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/models/parameters.d.ts +3 -0
- package/dist/react-native/models/parameters.d.ts.map +1 -1
- package/dist/react-native/models/parameters.js +25 -2
- package/dist/react-native/models/parameters.js.map +1 -1
- package/dist/react-native/operations/expansionJobs.d.ts +120 -0
- package/dist/react-native/operations/expansionJobs.d.ts.map +1 -0
- package/dist/react-native/operations/expansionJobs.js +473 -0
- package/dist/react-native/operations/expansionJobs.js.map +1 -0
- package/dist/react-native/operations/index.d.ts +1 -0
- package/dist/react-native/operations/index.d.ts.map +1 -1
- package/dist/react-native/operations/index.js +1 -0
- package/dist/react-native/operations/index.js.map +1 -1
- package/dist/react-native/operationsInterfaces/expansionJobs.d.ts +93 -0
- package/dist/react-native/operationsInterfaces/expansionJobs.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/expansionJobs.js +4 -0
- package/dist/react-native/operationsInterfaces/expansionJobs.js.map +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/react-native/operationsInterfaces/index.js +1 -0
- package/dist/react-native/operationsInterfaces/index.js.map +1 -1
- package/dist/react-native/storageCacheManagementClient.d.ts +2 -1
- package/dist/react-native/storageCacheManagementClient.d.ts.map +1 -1
- package/dist/react-native/storageCacheManagementClient.js +5 -3
- package/dist/react-native/storageCacheManagementClient.js.map +1 -1
- package/package.json +26 -38
|
@@ -1,184 +1,210 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var storageCacheManagementClient_exports = {};
|
|
29
|
+
__export(storageCacheManagementClient_exports, {
|
|
30
|
+
StorageCacheManagementClient: () => StorageCacheManagementClient
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(storageCacheManagementClient_exports);
|
|
33
|
+
var coreClient = __toESM(require("@azure/core-client"));
|
|
34
|
+
var coreRestPipeline = __toESM(require("@azure/core-rest-pipeline"));
|
|
35
|
+
var import_operations = require("./operations/index.js");
|
|
36
|
+
var Parameters = __toESM(require("./models/parameters.js"));
|
|
37
|
+
var Mappers = __toESM(require("./models/mappers.js"));
|
|
14
38
|
class StorageCacheManagementClient extends coreClient.ServiceClient {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
if (subscriptionId === undefined) {
|
|
29
|
-
throw new Error("'subscriptionId' cannot be null");
|
|
30
|
-
}
|
|
31
|
-
// Initializing default values for options
|
|
32
|
-
if (!options) {
|
|
33
|
-
options = {};
|
|
34
|
-
}
|
|
35
|
-
const defaults = {
|
|
36
|
-
requestContentType: "application/json; charset=utf-8",
|
|
37
|
-
credential: credentials,
|
|
38
|
-
};
|
|
39
|
-
const packageDetails = `azsdk-js-arm-storagecache/8.1.0`;
|
|
40
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
41
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
42
|
-
: `${packageDetails}`;
|
|
43
|
-
const optionsWithDefaults = {
|
|
44
|
-
...defaults,
|
|
45
|
-
...options,
|
|
46
|
-
userAgentOptions: {
|
|
47
|
-
userAgentPrefix,
|
|
48
|
-
},
|
|
49
|
-
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
50
|
-
};
|
|
51
|
-
super(optionsWithDefaults);
|
|
52
|
-
let bearerTokenAuthenticationPolicyFound = false;
|
|
53
|
-
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
54
|
-
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
55
|
-
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
56
|
-
}
|
|
57
|
-
if (!options ||
|
|
58
|
-
!options.pipeline ||
|
|
59
|
-
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
60
|
-
!bearerTokenAuthenticationPolicyFound) {
|
|
61
|
-
this.pipeline.removePolicy({
|
|
62
|
-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
63
|
-
});
|
|
64
|
-
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
65
|
-
credential: credentials,
|
|
66
|
-
scopes: optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,
|
|
67
|
-
challengeCallbacks: {
|
|
68
|
-
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
69
|
-
},
|
|
70
|
-
}));
|
|
71
|
-
}
|
|
72
|
-
// Parameter assignments
|
|
73
|
-
this.subscriptionId = subscriptionId;
|
|
74
|
-
// Assigning values to Constant parameters
|
|
75
|
-
this.$host = options.$host || "https://management.azure.com";
|
|
76
|
-
this.apiVersion = options.apiVersion || "2025-07-01";
|
|
77
|
-
this.amlFilesystems = new index_js_1.AmlFilesystemsImpl(this);
|
|
78
|
-
this.autoExportJobs = new index_js_1.AutoExportJobsImpl(this);
|
|
79
|
-
this.importJobs = new index_js_1.ImportJobsImpl(this);
|
|
80
|
-
this.autoImportJobs = new index_js_1.AutoImportJobsImpl(this);
|
|
81
|
-
this.operations = new index_js_1.OperationsImpl(this);
|
|
82
|
-
this.skus = new index_js_1.SkusImpl(this);
|
|
83
|
-
this.usageModels = new index_js_1.UsageModelsImpl(this);
|
|
84
|
-
this.ascOperations = new index_js_1.AscOperationsImpl(this);
|
|
85
|
-
this.ascUsages = new index_js_1.AscUsagesImpl(this);
|
|
86
|
-
this.caches = new index_js_1.CachesImpl(this);
|
|
87
|
-
this.storageTargets = new index_js_1.StorageTargetsImpl(this);
|
|
88
|
-
this.storageTargetOperations = new index_js_1.StorageTargetOperationsImpl(this);
|
|
89
|
-
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
39
|
+
$host;
|
|
40
|
+
apiVersion;
|
|
41
|
+
subscriptionId;
|
|
42
|
+
/**
|
|
43
|
+
* Initializes a new instance of the StorageCacheManagementClient class.
|
|
44
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
45
|
+
* @param subscriptionId The ID of the target subscription.
|
|
46
|
+
* @param options The parameter options
|
|
47
|
+
*/
|
|
48
|
+
constructor(credentials, subscriptionId, options) {
|
|
49
|
+
if (credentials === void 0) {
|
|
50
|
+
throw new Error("'credentials' cannot be null");
|
|
90
51
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
52
|
+
if (subscriptionId === void 0) {
|
|
53
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
54
|
+
}
|
|
55
|
+
if (!options) {
|
|
56
|
+
options = {};
|
|
57
|
+
}
|
|
58
|
+
const defaults = {
|
|
59
|
+
requestContentType: "application/json; charset=utf-8",
|
|
60
|
+
credential: credentials
|
|
61
|
+
};
|
|
62
|
+
const packageDetails = `azsdk-js-arm-storagecache/8.2.0`;
|
|
63
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`;
|
|
64
|
+
const optionsWithDefaults = {
|
|
65
|
+
...defaults,
|
|
66
|
+
...options,
|
|
67
|
+
userAgentOptions: {
|
|
68
|
+
userAgentPrefix
|
|
69
|
+
},
|
|
70
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
71
|
+
};
|
|
72
|
+
super(optionsWithDefaults);
|
|
73
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
74
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
75
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
76
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
77
|
+
(pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
78
|
+
);
|
|
115
79
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
80
|
+
if (!options || !options.pipeline || options.pipeline.getOrderedPolicies().length == 0 || !bearerTokenAuthenticationPolicyFound) {
|
|
81
|
+
this.pipeline.removePolicy({
|
|
82
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
83
|
+
});
|
|
84
|
+
this.pipeline.addPolicy(
|
|
85
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
86
|
+
credential: credentials,
|
|
87
|
+
scopes: optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,
|
|
88
|
+
challengeCallbacks: {
|
|
89
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
);
|
|
122
93
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
94
|
+
this.subscriptionId = subscriptionId;
|
|
95
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
96
|
+
this.apiVersion = options.apiVersion || "2026-01-01";
|
|
97
|
+
this.amlFilesystems = new import_operations.AmlFilesystemsImpl(this);
|
|
98
|
+
this.autoExportJobs = new import_operations.AutoExportJobsImpl(this);
|
|
99
|
+
this.importJobs = new import_operations.ImportJobsImpl(this);
|
|
100
|
+
this.autoImportJobs = new import_operations.AutoImportJobsImpl(this);
|
|
101
|
+
this.expansionJobs = new import_operations.ExpansionJobsImpl(this);
|
|
102
|
+
this.operations = new import_operations.OperationsImpl(this);
|
|
103
|
+
this.skus = new import_operations.SkusImpl(this);
|
|
104
|
+
this.usageModels = new import_operations.UsageModelsImpl(this);
|
|
105
|
+
this.ascOperations = new import_operations.AscOperationsImpl(this);
|
|
106
|
+
this.ascUsages = new import_operations.AscUsagesImpl(this);
|
|
107
|
+
this.caches = new import_operations.CachesImpl(this);
|
|
108
|
+
this.storageTargets = new import_operations.StorageTargetsImpl(this);
|
|
109
|
+
this.storageTargetOperations = new import_operations.StorageTargetOperationsImpl(this);
|
|
110
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
111
|
+
}
|
|
112
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
113
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
114
|
+
if (!apiVersion) {
|
|
115
|
+
return;
|
|
129
116
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
117
|
+
const apiVersionPolicy = {
|
|
118
|
+
name: "CustomApiVersionPolicy",
|
|
119
|
+
async sendRequest(request, next) {
|
|
120
|
+
const param = request.url.split("?");
|
|
121
|
+
if (param.length > 1) {
|
|
122
|
+
const newParams = param[1].split("&").map((item) => {
|
|
123
|
+
if (item.indexOf("api-version") > -1) {
|
|
124
|
+
return "api-version=" + apiVersion;
|
|
125
|
+
} else {
|
|
126
|
+
return item;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
130
|
+
}
|
|
131
|
+
return next(request);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Check that subnets will be valid for AML file system create calls.
|
|
138
|
+
* @param options The options parameters.
|
|
139
|
+
*/
|
|
140
|
+
checkAmlFSSubnets(options) {
|
|
141
|
+
return this.sendOperationRequest({ options }, checkAmlFSSubnetsOperationSpec);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Get the number of available IP addresses needed for the AML file system information provided.
|
|
145
|
+
* @param options The options parameters.
|
|
146
|
+
*/
|
|
147
|
+
getRequiredAmlFSSubnetsSize(options) {
|
|
148
|
+
return this.sendOperationRequest({ options }, getRequiredAmlFSSubnetsSizeOperationSpec);
|
|
149
|
+
}
|
|
150
|
+
amlFilesystems;
|
|
151
|
+
autoExportJobs;
|
|
152
|
+
importJobs;
|
|
153
|
+
autoImportJobs;
|
|
154
|
+
expansionJobs;
|
|
155
|
+
operations;
|
|
156
|
+
skus;
|
|
157
|
+
usageModels;
|
|
158
|
+
ascOperations;
|
|
159
|
+
ascUsages;
|
|
160
|
+
caches;
|
|
161
|
+
storageTargets;
|
|
162
|
+
storageTargetOperations;
|
|
142
163
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
164
|
+
const serializer = coreClient.createSerializer(
|
|
165
|
+
Mappers,
|
|
166
|
+
/* isXml */
|
|
167
|
+
false
|
|
168
|
+
);
|
|
146
169
|
const checkAmlFSSubnetsOperationSpec = {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
default: {
|
|
156
|
-
bodyMapper: Mappers.CloudError,
|
|
157
|
-
},
|
|
170
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/checkAmlFSSubnets",
|
|
171
|
+
httpMethod: "POST",
|
|
172
|
+
responses: {
|
|
173
|
+
200: {},
|
|
174
|
+
400: {
|
|
175
|
+
bodyMapper: Mappers.AmlFilesystemCheckSubnetError,
|
|
176
|
+
isError: true
|
|
158
177
|
},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
178
|
+
default: {
|
|
179
|
+
bodyMapper: Mappers.CloudError
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
requestBody: Parameters.amlFilesystemSubnetInfo,
|
|
183
|
+
queryParameters: [Parameters.apiVersion],
|
|
184
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
185
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
186
|
+
mediaType: "json",
|
|
187
|
+
serializer
|
|
165
188
|
};
|
|
166
189
|
const getRequiredAmlFSSubnetsSizeOperationSpec = {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
default: {
|
|
174
|
-
bodyMapper: Mappers.CloudError,
|
|
175
|
-
},
|
|
190
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/getRequiredAmlFSSubnetsSize",
|
|
191
|
+
httpMethod: "POST",
|
|
192
|
+
responses: {
|
|
193
|
+
200: {
|
|
194
|
+
bodyMapper: Mappers.RequiredAmlFilesystemSubnetsSize
|
|
176
195
|
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
196
|
+
default: {
|
|
197
|
+
bodyMapper: Mappers.CloudError
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
requestBody: Parameters.requiredAMLFilesystemSubnetsSizeInfo,
|
|
201
|
+
queryParameters: [Parameters.apiVersion],
|
|
202
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
203
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
204
|
+
mediaType: "json",
|
|
205
|
+
serializer
|
|
183
206
|
};
|
|
184
|
-
|
|
207
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
208
|
+
0 && (module.exports = {
|
|
209
|
+
StorageCacheManagementClient
|
|
210
|
+
});
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"storageCacheManagementClient.js","sourceRoot":"","sources":["../../src/storageCacheManagementClient.ts"],"names":[],"mappings":";AAAA,uC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AAE,IAAI;SACd;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,WAAW,EAAE,UAAU,CAAC,uBAAuB;IAC/C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,wCAAwC,GAA6B;IACzE,IAAI,EAAE,8FAA8F;IACpG,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,WAAW,EAAE,UAAU,CAAC,oCAAoC;IAC5D,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is regenerated.\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AmlFilesystemsImpl,\n AutoExportJobsImpl,\n ImportJobsImpl,\n AutoImportJobsImpl,\n OperationsImpl,\n SkusImpl,\n UsageModelsImpl,\n AscOperationsImpl,\n AscUsagesImpl,\n CachesImpl,\n StorageTargetsImpl,\n StorageTargetOperationsImpl,\n} from \"./operations/index.js\";\nimport {\n AmlFilesystems,\n AutoExportJobs,\n ImportJobs,\n AutoImportJobs,\n Operations,\n Skus,\n UsageModels,\n AscOperations,\n AscUsages,\n Caches,\n StorageTargets,\n StorageTargetOperations,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n StorageCacheManagementClientOptionalParams,\n CheckAmlFSSubnetsOptionalParams,\n GetRequiredAmlFSSubnetsSizeOptionalParams,\n GetRequiredAmlFSSubnetsSizeResponse,\n} from \"./models/index.js\";\n\nexport class StorageCacheManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the StorageCacheManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: StorageCacheManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: StorageCacheManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-storagecache/8.1.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2025-07-01\";\n this.amlFilesystems = new AmlFilesystemsImpl(this);\n this.autoExportJobs = new AutoExportJobsImpl(this);\n this.importJobs = new ImportJobsImpl(this);\n this.autoImportJobs = new AutoImportJobsImpl(this);\n this.operations = new OperationsImpl(this);\n this.skus = new SkusImpl(this);\n this.usageModels = new UsageModelsImpl(this);\n this.ascOperations = new AscOperationsImpl(this);\n this.ascUsages = new AscUsagesImpl(this);\n this.caches = new CachesImpl(this);\n this.storageTargets = new StorageTargetsImpl(this);\n this.storageTargetOperations = new StorageTargetOperationsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Check that subnets will be valid for AML file system create calls.\n * @param options The options parameters.\n */\n checkAmlFSSubnets(options?: CheckAmlFSSubnetsOptionalParams): Promise<void> {\n return this.sendOperationRequest({ options }, checkAmlFSSubnetsOperationSpec);\n }\n\n /**\n * Get the number of available IP addresses needed for the AML file system information provided.\n * @param options The options parameters.\n */\n getRequiredAmlFSSubnetsSize(\n options?: GetRequiredAmlFSSubnetsSizeOptionalParams,\n ): Promise<GetRequiredAmlFSSubnetsSizeResponse> {\n return this.sendOperationRequest({ options }, getRequiredAmlFSSubnetsSizeOperationSpec);\n }\n\n amlFilesystems: AmlFilesystems;\n autoExportJobs: AutoExportJobs;\n importJobs: ImportJobs;\n autoImportJobs: AutoImportJobs;\n operations: Operations;\n skus: Skus;\n usageModels: UsageModels;\n ascOperations: AscOperations;\n ascUsages: AscUsages;\n caches: Caches;\n storageTargets: StorageTargets;\n storageTargetOperations: StorageTargetOperations;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkAmlFSSubnetsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/checkAmlFSSubnets\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 400: {\n bodyMapper: Mappers.AmlFilesystemCheckSubnetError,\n isError: true,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n requestBody: Parameters.amlFilesystemSubnetInfo,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getRequiredAmlFSSubnetsSizeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/getRequiredAmlFSSubnetsSize\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.RequiredAmlFilesystemSubnetsSize,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n requestBody: Parameters.requiredAMLFilesystemSubnetsSizeInfo,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is regenerated.\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport { PipelineRequest, PipelineResponse, SendRequest } from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n AmlFilesystemsImpl,\n AutoExportJobsImpl,\n ImportJobsImpl,\n AutoImportJobsImpl,\n ExpansionJobsImpl,\n OperationsImpl,\n SkusImpl,\n UsageModelsImpl,\n AscOperationsImpl,\n AscUsagesImpl,\n CachesImpl,\n StorageTargetsImpl,\n StorageTargetOperationsImpl,\n} from \"./operations/index.js\";\nimport {\n AmlFilesystems,\n AutoExportJobs,\n ImportJobs,\n AutoImportJobs,\n ExpansionJobs,\n Operations,\n Skus,\n UsageModels,\n AscOperations,\n AscUsages,\n Caches,\n StorageTargets,\n StorageTargetOperations,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n StorageCacheManagementClientOptionalParams,\n CheckAmlFSSubnetsOptionalParams,\n GetRequiredAmlFSSubnetsSizeOptionalParams,\n GetRequiredAmlFSSubnetsSizeResponse,\n} from \"./models/index.js\";\n\nexport class StorageCacheManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the StorageCacheManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: StorageCacheManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: StorageCacheManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-storagecache/8.2.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2026-01-01\";\n this.amlFilesystems = new AmlFilesystemsImpl(this);\n this.autoExportJobs = new AutoExportJobsImpl(this);\n this.importJobs = new ImportJobsImpl(this);\n this.autoImportJobs = new AutoImportJobsImpl(this);\n this.expansionJobs = new ExpansionJobsImpl(this);\n this.operations = new OperationsImpl(this);\n this.skus = new SkusImpl(this);\n this.usageModels = new UsageModelsImpl(this);\n this.ascOperations = new AscOperationsImpl(this);\n this.ascUsages = new AscUsagesImpl(this);\n this.caches = new CachesImpl(this);\n this.storageTargets = new StorageTargetsImpl(this);\n this.storageTargetOperations = new StorageTargetOperationsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Check that subnets will be valid for AML file system create calls.\n * @param options The options parameters.\n */\n checkAmlFSSubnets(options?: CheckAmlFSSubnetsOptionalParams): Promise<void> {\n return this.sendOperationRequest({ options }, checkAmlFSSubnetsOperationSpec);\n }\n\n /**\n * Get the number of available IP addresses needed for the AML file system information provided.\n * @param options The options parameters.\n */\n getRequiredAmlFSSubnetsSize(\n options?: GetRequiredAmlFSSubnetsSizeOptionalParams,\n ): Promise<GetRequiredAmlFSSubnetsSizeResponse> {\n return this.sendOperationRequest({ options }, getRequiredAmlFSSubnetsSizeOperationSpec);\n }\n\n amlFilesystems: AmlFilesystems;\n autoExportJobs: AutoExportJobs;\n importJobs: ImportJobs;\n autoImportJobs: AutoImportJobs;\n expansionJobs: ExpansionJobs;\n operations: Operations;\n skus: Skus;\n usageModels: UsageModels;\n ascOperations: AscOperations;\n ascUsages: AscUsages;\n caches: Caches;\n storageTargets: StorageTargets;\n storageTargetOperations: StorageTargetOperations;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkAmlFSSubnetsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/checkAmlFSSubnets\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 400: {\n bodyMapper: Mappers.AmlFilesystemCheckSubnetError,\n isError: true,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n requestBody: Parameters.amlFilesystemSubnetInfo,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst getRequiredAmlFSSubnetsSizeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/getRequiredAmlFSSubnetsSize\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.RequiredAmlFilesystemSubnetsSize,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n requestBody: Parameters.requiredAMLFilesystemSubnetsSizeInfo,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,iBAA4B;AAC5B,uBAAkC;AAGlC,wBAcO;AAgBP,iBAA4B;AAC5B,cAAyB;AAQlB,MAAM,qCAAqC,WAAW,cAAc;AAAA,EACzE;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,YACE,aACA,gBACA,SACA;AACA,QAAI,gBAAgB,QAAW;AAC7B,YAAM,IAAI,MAAM,8BAA8B;AAAA,IAChD;AACA,QAAI,mBAAmB,QAAW;AAChC,YAAM,IAAI,MAAM,iCAAiC;AAAA,IACnD;AAGA,QAAI,CAAC,SAAS;AACZ,gBAAU,CAAC;AAAA,IACb;AACA,UAAM,WAAuD;AAAA,MAC3D,oBAAoB;AAAA,MACpB,YAAY;AAAA,IACd;AAEA,UAAM,iBAAiB;AACvB,UAAM,kBACJ,QAAQ,oBAAoB,QAAQ,iBAAiB,kBACjD,GAAG,QAAQ,iBAAiB,eAAe,IAAI,cAAc,KAC7D,GAAG,cAAc;AAEvB,UAAM,sBAAsB;AAAA,MAC1B,GAAG;AAAA,MACH,GAAG;AAAA,MACH,kBAAkB;AAAA,QAChB;AAAA,MACF;AAAA,MACA,UAAU,QAAQ,YAAY,QAAQ,WAAW;AAAA,IACnD;AACA,UAAM,mBAAmB;AAEzB,QAAI,uCAAgD;AACpD,QAAI,SAAS,YAAY,QAAQ,SAAS,mBAAmB,EAAE,SAAS,GAAG;AACzE,YAAM,mBACJ,QAAQ,SAAS,mBAAmB;AACtC,6CAAuC,iBAAiB;AAAA,QACtD,CAAC,mBACC,eAAe,SAAS,iBAAiB;AAAA,MAC7C;AAAA,IACF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D,WAAW;AAAA,EACX;AACF;AACA,MAAM,2CAAqE;AAAA,EACzE,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,WAAW;AAAA,IACT,KAAK;AAAA,MACH,YAAY,QAAQ;AAAA,IACtB;AAAA,IACA,SAAS;AAAA,MACP,YAAY,QAAQ;AAAA,IACtB;AAAA,EACF;AAAA,EACA,aAAa,WAAW;AAAA,EACxB,iBAAiB,CAAC,WAAW,UAAU;AAAA,EACvC,eAAe,CAAC,WAAW,OAAO,WAAW,cAAc;AAAA,EAC3D,kBAAkB,CAAC,WAAW,QAAQ,WAAW,WAAW;AAAA,EAC5D,WAAW;AAAA,EACX;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
// Code generated by Microsoft (R) AutoRest Code Generator.
|
|
4
|
-
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
5
|
-
/// <reference lib="esnext.asynciterable" />
|
|
6
|
-
export { getContinuationToken } from "./pagingHelper.js";
|
|
1
|
+
import { getContinuationToken } from "./pagingHelper.js";
|
|
7
2
|
export * from "./models/index.js";
|
|
8
|
-
|
|
3
|
+
import { StorageCacheManagementClient } from "./storageCacheManagementClient.js";
|
|
9
4
|
export * from "./operationsInterfaces/index.js";
|
|
10
|
-
|
|
5
|
+
export {
|
|
6
|
+
StorageCacheManagementClient,
|
|
7
|
+
getContinuationToken
|
|
8
|
+
};
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/storagecache/arm-storagecache/src/index.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is regenerated.\n\n/// <reference lib=\"esnext.asynciterable\" />\nexport { getContinuationToken } from \"./pagingHelper.js\";\nexport * from \"./models/index.js\";\nexport { StorageCacheManagementClient } from \"./storageCacheManagementClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"],
|
|
5
|
+
"mappings": "AAOA,SAAS,4BAA4B;AACrC,cAAc;AACd,SAAS,oCAAoC;AAC7C,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/lroImpl.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
};
|
|
1
|
+
function createLroSpec(inputs) {
|
|
2
|
+
const { args, spec, sendOperationFn } = inputs;
|
|
3
|
+
return {
|
|
4
|
+
requestMethod: spec.httpMethod,
|
|
5
|
+
requestPath: spec.path,
|
|
6
|
+
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
7
|
+
sendPollRequest: (path, options) => {
|
|
8
|
+
const { requestBody, ...restSpec } = spec;
|
|
9
|
+
return sendOperationFn(args, {
|
|
10
|
+
...restSpec,
|
|
11
|
+
httpMethod: "GET",
|
|
12
|
+
path,
|
|
13
|
+
abortSignal: options?.abortSignal
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
};
|
|
19
17
|
}
|
|
20
|
-
|
|
18
|
+
export {
|
|
19
|
+
createLroSpec
|
|
20
|
+
};
|
package/dist/esm/lroImpl.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["/mnt/vss/_work/1/s/sdk/storagecache/arm-storagecache/src/lroImpl.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// Code generated by Microsoft (R) AutoRest Code Generator.\n// Changes may cause incorrect behavior and will be lost if the code is regenerated.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (path: string, options?: { abortSignal?: AbortSignalLike }) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"],
|
|
5
|
+
"mappings": "AASO,SAAS,cAAiB,QAQL;AAC1B,QAAM,EAAE,MAAM,MAAM,gBAAgB,IAAI;AACxC,SAAO;AAAA,IACL,eAAe,KAAK;AAAA,IACpB,aAAa,KAAK;AAAA,IAClB,oBAAoB,MAAM,gBAAgB,MAAM,IAAI;AAAA,IACpD,iBAAiB,CAAC,MAAc,YAAgD;AAC9E,YAAM,EAAE,aAAa,GAAG,SAAS,IAAI;AACrC,aAAO,gBAAgB,MAAM;AAAA,QAC3B,GAAG;AAAA,QACH,YAAY;AAAA,QACZ;AAAA,QACA,aAAa,SAAS;AAAA,MACxB,CAAC;AAAA,IACH;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|