@azure/arm-hybridcompute 4.1.0-alpha.20250619.1 → 5.0.0-alpha.20250624.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +127 -0
- package/LICENSE +1 -1
- package/README.md +1 -2
- package/dist/browser/hybridComputeManagementClient.d.ts +23 -3
- package/dist/browser/hybridComputeManagementClient.d.ts.map +1 -1
- package/dist/browser/hybridComputeManagementClient.js +98 -12
- package/dist/browser/hybridComputeManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.d.ts.map +1 -1
- package/dist/browser/lroImpl.js +7 -0
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/index.d.ts +255 -69
- package/dist/browser/models/index.d.ts.map +1 -1
- package/dist/browser/models/index.js +10 -0
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/mappers.d.ts +16 -8
- package/dist/browser/models/mappers.d.ts.map +1 -1
- package/dist/browser/models/mappers.js +394 -114
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/models/parameters.d.ts +2 -1
- package/dist/browser/models/parameters.d.ts.map +1 -1
- package/dist/browser/models/parameters.js +19 -15
- package/dist/browser/models/parameters.js.map +1 -1
- package/dist/browser/operations/extensionMetadataV2.d.ts +50 -0
- package/dist/browser/operations/extensionMetadataV2.d.ts.map +1 -0
- package/dist/browser/operations/extensionMetadataV2.js +186 -0
- package/dist/browser/operations/extensionMetadataV2.js.map +1 -0
- package/dist/browser/operations/extensionPublisherOperations.d.ts +35 -0
- package/dist/browser/operations/extensionPublisherOperations.d.ts.map +1 -0
- package/dist/browser/operations/extensionPublisherOperations.js +136 -0
- package/dist/browser/operations/extensionPublisherOperations.js.map +1 -0
- package/dist/browser/operations/extensionTypeOperations.d.ts +38 -0
- package/dist/browser/operations/extensionTypeOperations.d.ts.map +1 -0
- package/dist/browser/operations/extensionTypeOperations.js +144 -0
- package/dist/browser/operations/extensionTypeOperations.js.map +1 -0
- package/dist/browser/operations/gateways.js +8 -8
- package/dist/browser/operations/gateways.js.map +1 -1
- package/dist/browser/operations/index.d.ts +3 -0
- package/dist/browser/operations/index.d.ts.map +1 -1
- package/dist/browser/operations/index.js +3 -0
- package/dist/browser/operations/index.js.map +1 -1
- package/dist/browser/operations/machines.d.ts +9 -2
- package/dist/browser/operations/machines.d.ts.map +1 -1
- package/dist/browser/operations/machines.js +56 -4
- package/dist/browser/operations/machines.js.map +1 -1
- package/dist/browser/operationsInterfaces/extensionMetadataV2.d.ts +23 -0
- package/dist/browser/operationsInterfaces/extensionMetadataV2.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/extensionMetadataV2.js +9 -0
- package/dist/browser/operationsInterfaces/extensionMetadataV2.js.map +1 -0
- package/dist/browser/operationsInterfaces/extensionPublisherOperations.d.ts +12 -0
- package/dist/browser/operationsInterfaces/extensionPublisherOperations.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/extensionPublisherOperations.js +9 -0
- package/dist/browser/operationsInterfaces/extensionPublisherOperations.js.map +1 -0
- package/dist/browser/operationsInterfaces/extensionTypeOperations.d.ts +13 -0
- package/dist/browser/operationsInterfaces/extensionTypeOperations.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/extensionTypeOperations.js +9 -0
- package/dist/browser/operationsInterfaces/extensionTypeOperations.js.map +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts +3 -0
- package/dist/browser/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/browser/operationsInterfaces/index.js +3 -0
- package/dist/browser/operationsInterfaces/index.js.map +1 -1
- package/dist/browser/operationsInterfaces/machines.d.ts +9 -2
- package/dist/browser/operationsInterfaces/machines.d.ts.map +1 -1
- package/dist/browser/operationsInterfaces/machines.js.map +1 -1
- package/dist/browser/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/browser/operationsInterfaces/operations.js.map +1 -1
- package/dist/commonjs/hybridComputeManagementClient.d.ts +23 -3
- package/dist/commonjs/hybridComputeManagementClient.d.ts.map +1 -1
- package/dist/commonjs/hybridComputeManagementClient.js +97 -11
- package/dist/commonjs/hybridComputeManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.d.ts.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -0
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +255 -69
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +11 -1
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/mappers.d.ts +16 -8
- package/dist/commonjs/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/models/mappers.js +397 -117
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/models/parameters.d.ts +2 -1
- package/dist/commonjs/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/models/parameters.js +19 -15
- package/dist/commonjs/models/parameters.js.map +1 -1
- package/dist/commonjs/operations/extensionMetadataV2.d.ts +50 -0
- package/dist/commonjs/operations/extensionMetadataV2.d.ts.map +1 -0
- package/dist/commonjs/operations/extensionMetadataV2.js +190 -0
- package/dist/commonjs/operations/extensionMetadataV2.js.map +1 -0
- package/dist/commonjs/operations/extensionPublisherOperations.d.ts +35 -0
- package/dist/commonjs/operations/extensionPublisherOperations.d.ts.map +1 -0
- package/dist/commonjs/operations/extensionPublisherOperations.js +140 -0
- package/dist/commonjs/operations/extensionPublisherOperations.js.map +1 -0
- package/dist/commonjs/operations/extensionTypeOperations.d.ts +38 -0
- package/dist/commonjs/operations/extensionTypeOperations.d.ts.map +1 -0
- package/dist/commonjs/operations/extensionTypeOperations.js +148 -0
- package/dist/commonjs/operations/extensionTypeOperations.js.map +1 -0
- package/dist/commonjs/operations/gateways.js +8 -8
- package/dist/commonjs/operations/gateways.js.map +1 -1
- package/dist/commonjs/operations/index.d.ts +3 -0
- package/dist/commonjs/operations/index.d.ts.map +1 -1
- package/dist/commonjs/operations/index.js +3 -0
- package/dist/commonjs/operations/index.js.map +1 -1
- package/dist/commonjs/operations/machines.d.ts +9 -2
- package/dist/commonjs/operations/machines.d.ts.map +1 -1
- package/dist/commonjs/operations/machines.js +56 -4
- package/dist/commonjs/operations/machines.js.map +1 -1
- package/dist/commonjs/operationsInterfaces/extensionMetadataV2.d.ts +23 -0
- package/dist/commonjs/operationsInterfaces/extensionMetadataV2.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/extensionMetadataV2.js +10 -0
- package/dist/commonjs/operationsInterfaces/extensionMetadataV2.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/extensionPublisherOperations.d.ts +12 -0
- package/dist/commonjs/operationsInterfaces/extensionPublisherOperations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/extensionPublisherOperations.js +10 -0
- package/dist/commonjs/operationsInterfaces/extensionPublisherOperations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/extensionTypeOperations.d.ts +13 -0
- package/dist/commonjs/operationsInterfaces/extensionTypeOperations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/extensionTypeOperations.js +10 -0
- package/dist/commonjs/operationsInterfaces/extensionTypeOperations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/index.js +3 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -1
- package/dist/commonjs/operationsInterfaces/machines.d.ts +9 -2
- package/dist/commonjs/operationsInterfaces/machines.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/machines.js.map +1 -1
- package/dist/commonjs/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/commonjs/operationsInterfaces/operations.js.map +1 -1
- package/dist/esm/hybridComputeManagementClient.d.ts +23 -3
- package/dist/esm/hybridComputeManagementClient.d.ts.map +1 -1
- package/dist/esm/hybridComputeManagementClient.js +98 -12
- package/dist/esm/hybridComputeManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.d.ts.map +1 -1
- package/dist/esm/lroImpl.js +7 -0
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/index.d.ts +255 -69
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +10 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/mappers.d.ts +16 -8
- package/dist/esm/models/mappers.d.ts.map +1 -1
- package/dist/esm/models/mappers.js +394 -114
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/models/parameters.d.ts +2 -1
- package/dist/esm/models/parameters.d.ts.map +1 -1
- package/dist/esm/models/parameters.js +19 -15
- package/dist/esm/models/parameters.js.map +1 -1
- package/dist/esm/operations/extensionMetadataV2.d.ts +50 -0
- package/dist/esm/operations/extensionMetadataV2.d.ts.map +1 -0
- package/dist/esm/operations/extensionMetadataV2.js +186 -0
- package/dist/esm/operations/extensionMetadataV2.js.map +1 -0
- package/dist/esm/operations/extensionPublisherOperations.d.ts +35 -0
- package/dist/esm/operations/extensionPublisherOperations.d.ts.map +1 -0
- package/dist/esm/operations/extensionPublisherOperations.js +136 -0
- package/dist/esm/operations/extensionPublisherOperations.js.map +1 -0
- package/dist/esm/operations/extensionTypeOperations.d.ts +38 -0
- package/dist/esm/operations/extensionTypeOperations.d.ts.map +1 -0
- package/dist/esm/operations/extensionTypeOperations.js +144 -0
- package/dist/esm/operations/extensionTypeOperations.js.map +1 -0
- package/dist/esm/operations/gateways.js +8 -8
- package/dist/esm/operations/gateways.js.map +1 -1
- package/dist/esm/operations/index.d.ts +3 -0
- package/dist/esm/operations/index.d.ts.map +1 -1
- package/dist/esm/operations/index.js +3 -0
- package/dist/esm/operations/index.js.map +1 -1
- package/dist/esm/operations/machines.d.ts +9 -2
- package/dist/esm/operations/machines.d.ts.map +1 -1
- package/dist/esm/operations/machines.js +56 -4
- package/dist/esm/operations/machines.js.map +1 -1
- package/dist/esm/operationsInterfaces/extensionMetadataV2.d.ts +23 -0
- package/dist/esm/operationsInterfaces/extensionMetadataV2.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/extensionMetadataV2.js +9 -0
- package/dist/esm/operationsInterfaces/extensionMetadataV2.js.map +1 -0
- package/dist/esm/operationsInterfaces/extensionPublisherOperations.d.ts +12 -0
- package/dist/esm/operationsInterfaces/extensionPublisherOperations.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/extensionPublisherOperations.js +9 -0
- package/dist/esm/operationsInterfaces/extensionPublisherOperations.js.map +1 -0
- package/dist/esm/operationsInterfaces/extensionTypeOperations.d.ts +13 -0
- package/dist/esm/operationsInterfaces/extensionTypeOperations.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/extensionTypeOperations.js +9 -0
- package/dist/esm/operationsInterfaces/extensionTypeOperations.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +3 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/esm/operationsInterfaces/index.js +3 -0
- package/dist/esm/operationsInterfaces/index.js.map +1 -1
- package/dist/esm/operationsInterfaces/machines.d.ts +9 -2
- package/dist/esm/operationsInterfaces/machines.d.ts.map +1 -1
- package/dist/esm/operationsInterfaces/machines.js.map +1 -1
- package/dist/esm/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/esm/operationsInterfaces/operations.js.map +1 -1
- package/dist/react-native/hybridComputeManagementClient.d.ts +23 -3
- package/dist/react-native/hybridComputeManagementClient.d.ts.map +1 -1
- package/dist/react-native/hybridComputeManagementClient.js +98 -12
- package/dist/react-native/hybridComputeManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.d.ts.map +1 -1
- package/dist/react-native/lroImpl.js +7 -0
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/index.d.ts +255 -69
- package/dist/react-native/models/index.d.ts.map +1 -1
- package/dist/react-native/models/index.js +10 -0
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/mappers.d.ts +16 -8
- package/dist/react-native/models/mappers.d.ts.map +1 -1
- package/dist/react-native/models/mappers.js +394 -114
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/models/parameters.d.ts +2 -1
- package/dist/react-native/models/parameters.d.ts.map +1 -1
- package/dist/react-native/models/parameters.js +19 -15
- package/dist/react-native/models/parameters.js.map +1 -1
- package/dist/react-native/operations/extensionMetadataV2.d.ts +50 -0
- package/dist/react-native/operations/extensionMetadataV2.d.ts.map +1 -0
- package/dist/react-native/operations/extensionMetadataV2.js +186 -0
- package/dist/react-native/operations/extensionMetadataV2.js.map +1 -0
- package/dist/react-native/operations/extensionPublisherOperations.d.ts +35 -0
- package/dist/react-native/operations/extensionPublisherOperations.d.ts.map +1 -0
- package/dist/react-native/operations/extensionPublisherOperations.js +136 -0
- package/dist/react-native/operations/extensionPublisherOperations.js.map +1 -0
- package/dist/react-native/operations/extensionTypeOperations.d.ts +38 -0
- package/dist/react-native/operations/extensionTypeOperations.d.ts.map +1 -0
- package/dist/react-native/operations/extensionTypeOperations.js +144 -0
- package/dist/react-native/operations/extensionTypeOperations.js.map +1 -0
- package/dist/react-native/operations/gateways.js +8 -8
- package/dist/react-native/operations/gateways.js.map +1 -1
- package/dist/react-native/operations/index.d.ts +3 -0
- package/dist/react-native/operations/index.d.ts.map +1 -1
- package/dist/react-native/operations/index.js +3 -0
- package/dist/react-native/operations/index.js.map +1 -1
- package/dist/react-native/operations/machines.d.ts +9 -2
- package/dist/react-native/operations/machines.d.ts.map +1 -1
- package/dist/react-native/operations/machines.js +56 -4
- package/dist/react-native/operations/machines.js.map +1 -1
- package/dist/react-native/operationsInterfaces/extensionMetadataV2.d.ts +23 -0
- package/dist/react-native/operationsInterfaces/extensionMetadataV2.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/extensionMetadataV2.js +9 -0
- package/dist/react-native/operationsInterfaces/extensionMetadataV2.js.map +1 -0
- package/dist/react-native/operationsInterfaces/extensionPublisherOperations.d.ts +12 -0
- package/dist/react-native/operationsInterfaces/extensionPublisherOperations.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/extensionPublisherOperations.js +9 -0
- package/dist/react-native/operationsInterfaces/extensionPublisherOperations.js.map +1 -0
- package/dist/react-native/operationsInterfaces/extensionTypeOperations.d.ts +13 -0
- package/dist/react-native/operationsInterfaces/extensionTypeOperations.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/extensionTypeOperations.js +9 -0
- package/dist/react-native/operationsInterfaces/extensionTypeOperations.js.map +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
- package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/react-native/operationsInterfaces/index.js +3 -0
- package/dist/react-native/operationsInterfaces/index.js.map +1 -1
- package/dist/react-native/operationsInterfaces/machines.d.ts +9 -2
- package/dist/react-native/operationsInterfaces/machines.d.ts.map +1 -1
- package/dist/react-native/operationsInterfaces/machines.js.map +1 -1
- package/dist/react-native/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/react-native/operationsInterfaces/operations.js.map +1 -1
- package/package.json +22 -22
- package/review/arm-hybridcompute.api.md +191 -32
@@ -17,19 +17,17 @@ const index_js_1 = require("./operations/index.js");
|
|
17
17
|
const Parameters = tslib_1.__importStar(require("./models/parameters.js"));
|
18
18
|
const Mappers = tslib_1.__importStar(require("./models/mappers.js"));
|
19
19
|
class HybridComputeManagementClient extends coreClient.ServiceClient {
|
20
|
-
|
21
|
-
* Initializes a new instance of the HybridComputeManagementClient class.
|
22
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
23
|
-
* @param subscriptionId The ID of the target subscription.
|
24
|
-
* @param options The parameter options
|
25
|
-
*/
|
26
|
-
constructor(credentials, subscriptionId, options) {
|
20
|
+
constructor(credentials, subscriptionIdOrOptions, options) {
|
27
21
|
var _a, _b, _c;
|
28
22
|
if (credentials === undefined) {
|
29
23
|
throw new Error("'credentials' cannot be null");
|
30
24
|
}
|
31
|
-
|
32
|
-
|
25
|
+
let subscriptionId;
|
26
|
+
if (typeof subscriptionIdOrOptions === "string") {
|
27
|
+
subscriptionId = subscriptionIdOrOptions;
|
28
|
+
}
|
29
|
+
else if (typeof subscriptionIdOrOptions === "object") {
|
30
|
+
options = subscriptionIdOrOptions;
|
33
31
|
}
|
34
32
|
// Initializing default values for options
|
35
33
|
if (!options) {
|
@@ -39,7 +37,7 @@ class HybridComputeManagementClient extends coreClient.ServiceClient {
|
|
39
37
|
requestContentType: "application/json; charset=utf-8",
|
40
38
|
credential: credentials,
|
41
39
|
};
|
42
|
-
const packageDetails = `azsdk-js-arm-hybridcompute/
|
40
|
+
const packageDetails = `azsdk-js-arm-hybridcompute/5.0.0-beta.1`;
|
43
41
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
44
42
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
45
43
|
: `${packageDetails}`;
|
@@ -72,12 +70,15 @@ class HybridComputeManagementClient extends coreClient.ServiceClient {
|
|
72
70
|
this.subscriptionId = subscriptionId;
|
73
71
|
// Assigning values to Constant parameters
|
74
72
|
this.$host = options.$host || "https://management.azure.com";
|
75
|
-
this.apiVersion = options.apiVersion || "
|
73
|
+
this.apiVersion = options.apiVersion || "2025-02-19-preview";
|
76
74
|
this.licenses = new index_js_1.LicensesImpl(this);
|
77
75
|
this.machines = new index_js_1.MachinesImpl(this);
|
78
76
|
this.licenseProfiles = new index_js_1.LicenseProfilesImpl(this);
|
79
77
|
this.machineExtensions = new index_js_1.MachineExtensionsImpl(this);
|
80
78
|
this.extensionMetadata = new index_js_1.ExtensionMetadataImpl(this);
|
79
|
+
this.extensionMetadataV2 = new index_js_1.ExtensionMetadataV2Impl(this);
|
80
|
+
this.extensionTypeOperations = new index_js_1.ExtensionTypeOperationsImpl(this);
|
81
|
+
this.extensionPublisherOperations = new index_js_1.ExtensionPublisherOperationsImpl(this);
|
81
82
|
this.operations = new index_js_1.OperationsImpl(this);
|
82
83
|
this.networkProfileOperations = new index_js_1.NetworkProfileOperationsImpl(this);
|
83
84
|
this.machineRunCommands = new index_js_1.MachineRunCommandsImpl(this);
|
@@ -173,6 +174,59 @@ class HybridComputeManagementClient extends coreClient.ServiceClient {
|
|
173
174
|
const poller = await this.beginUpgradeExtensions(resourceGroupName, machineName, extensionUpgradeParameters, options);
|
174
175
|
return poller.pollUntilDone();
|
175
176
|
}
|
177
|
+
/**
|
178
|
+
* The operation to Setup Machine Extensions.
|
179
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
180
|
+
* @param machineName The name of the hybrid machine.
|
181
|
+
* @param extensions Parameters supplied to the Setup Extensions operation.
|
182
|
+
* @param options The options parameters.
|
183
|
+
*/
|
184
|
+
async beginSetupExtensions(resourceGroupName, machineName, extensions, options) {
|
185
|
+
const directSendOperation = async (args, spec) => {
|
186
|
+
return this.sendOperationRequest(args, spec);
|
187
|
+
};
|
188
|
+
const sendOperationFn = async (args, spec) => {
|
189
|
+
var _a;
|
190
|
+
let currentRawResponse = undefined;
|
191
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
192
|
+
const callback = (rawResponse, flatResponse) => {
|
193
|
+
currentRawResponse = rawResponse;
|
194
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
195
|
+
};
|
196
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
197
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
198
|
+
return {
|
199
|
+
flatResponse,
|
200
|
+
rawResponse: {
|
201
|
+
statusCode: currentRawResponse.status,
|
202
|
+
body: currentRawResponse.parsedBody,
|
203
|
+
headers: currentRawResponse.headers.toJSON(),
|
204
|
+
},
|
205
|
+
};
|
206
|
+
};
|
207
|
+
const lro = (0, lroImpl_js_1.createLroSpec)({
|
208
|
+
sendOperationFn,
|
209
|
+
args: { resourceGroupName, machineName, extensions, options },
|
210
|
+
spec: setupExtensionsOperationSpec,
|
211
|
+
});
|
212
|
+
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
213
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
214
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
215
|
+
});
|
216
|
+
await poller.poll();
|
217
|
+
return poller;
|
218
|
+
}
|
219
|
+
/**
|
220
|
+
* The operation to Setup Machine Extensions.
|
221
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
222
|
+
* @param machineName The name of the hybrid machine.
|
223
|
+
* @param extensions Parameters supplied to the Setup Extensions operation.
|
224
|
+
* @param options The options parameters.
|
225
|
+
*/
|
226
|
+
async beginSetupExtensionsAndWait(resourceGroupName, machineName, extensions, options) {
|
227
|
+
const poller = await this.beginSetupExtensions(resourceGroupName, machineName, extensions, options);
|
228
|
+
return poller.pollUntilDone();
|
229
|
+
}
|
176
230
|
}
|
177
231
|
exports.HybridComputeManagementClient = HybridComputeManagementClient;
|
178
232
|
// Operation Specifications
|
@@ -201,4 +255,36 @@ const upgradeExtensionsOperationSpec = {
|
|
201
255
|
mediaType: "json",
|
202
256
|
serializer,
|
203
257
|
};
|
258
|
+
const setupExtensionsOperationSpec = {
|
259
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/addExtensions",
|
260
|
+
httpMethod: "POST",
|
261
|
+
responses: {
|
262
|
+
200: {
|
263
|
+
bodyMapper: Mappers.SetupExtensionRequest,
|
264
|
+
},
|
265
|
+
201: {
|
266
|
+
bodyMapper: Mappers.SetupExtensionRequest,
|
267
|
+
},
|
268
|
+
202: {
|
269
|
+
bodyMapper: Mappers.SetupExtensionRequest,
|
270
|
+
},
|
271
|
+
204: {
|
272
|
+
bodyMapper: Mappers.SetupExtensionRequest,
|
273
|
+
},
|
274
|
+
default: {
|
275
|
+
bodyMapper: Mappers.ErrorResponse,
|
276
|
+
},
|
277
|
+
},
|
278
|
+
requestBody: Parameters.extensions,
|
279
|
+
queryParameters: [Parameters.apiVersion],
|
280
|
+
urlParameters: [
|
281
|
+
Parameters.$host,
|
282
|
+
Parameters.subscriptionId,
|
283
|
+
Parameters.resourceGroupName,
|
284
|
+
Parameters.machineName,
|
285
|
+
],
|
286
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
287
|
+
mediaType: "json",
|
288
|
+
serializer,
|
289
|
+
};
|
204
290
|
//# sourceMappingURL=hybridComputeManagementClient.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hybridComputeManagementClient.js","sourceRoot":"","sources":["../../src/hybridComputeManagementClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,8CAIyB;AACzB,6CAA6C;AAC7C,oDAe+B;AAiB/B,2EAAqD;AACrD,qEAA+C;AAO/C,MAAa,6BAA8B,SAAQ,UAAU,CAAC,aAAa;IAKzE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAqD;;QAErD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAgD;YAC5D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAA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CAAC,6BAA6B,CACjC,iBAAyB,EACzB,WAAmB,EACnB,0BAAmD,EACnD,OAAyC;QAEzC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAC9C,iBAAiB,EACjB,WAAW,EACX,0BAA0B,EAC1B,OAAO,CACR,CAAC;QACF,OAAO,MAAM,CAAC,aAAa,EAAE,CAAC;IAChC,CAAC;CAgBF;AA9OD,sEA8OC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,8BAA8B,GAA6B;IAC/D,IAAI,EAAE,+IAA+I;IACrJ,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,0BAA0B;IAClD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;KACvB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * 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\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"./lroImpl.js\";\nimport {\n LicensesImpl,\n MachinesImpl,\n LicenseProfilesImpl,\n MachineExtensionsImpl,\n ExtensionMetadataImpl,\n OperationsImpl,\n NetworkProfileOperationsImpl,\n MachineRunCommandsImpl,\n GatewaysImpl,\n SettingsOperationsImpl,\n PrivateLinkScopesImpl,\n PrivateLinkResourcesImpl,\n PrivateEndpointConnectionsImpl,\n NetworkSecurityPerimeterConfigurationsImpl,\n} from \"./operations/index.js\";\nimport {\n Licenses,\n Machines,\n LicenseProfiles,\n MachineExtensions,\n ExtensionMetadata,\n Operations,\n NetworkProfileOperations,\n MachineRunCommands,\n Gateways,\n SettingsOperations,\n PrivateLinkScopes,\n PrivateLinkResources,\n PrivateEndpointConnections,\n NetworkSecurityPerimeterConfigurations,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n HybridComputeManagementClientOptionalParams,\n MachineExtensionUpgrade,\n UpgradeExtensionsOptionalParams,\n} from \"./models/index.js\";\n\nexport class HybridComputeManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the HybridComputeManagementClient 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?: HybridComputeManagementClientOptionalParams,\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: HybridComputeManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-hybridcompute/4.1.0-beta.1`;\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:\n 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 ===\n 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 ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n 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 || \"2024-07-31-preview\";\n this.licenses = new LicensesImpl(this);\n this.machines = new MachinesImpl(this);\n this.licenseProfiles = new LicenseProfilesImpl(this);\n this.machineExtensions = new MachineExtensionsImpl(this);\n this.extensionMetadata = new ExtensionMetadataImpl(this);\n this.operations = new OperationsImpl(this);\n this.networkProfileOperations = new NetworkProfileOperationsImpl(this);\n this.machineRunCommands = new MachineRunCommandsImpl(this);\n this.gateways = new GatewaysImpl(this);\n this.settingsOperations = new SettingsOperationsImpl(this);\n this.privateLinkScopes = new PrivateLinkScopesImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.networkSecurityPerimeterConfigurations =\n new NetworkSecurityPerimeterConfigurationsImpl(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(\n request: PipelineRequest,\n next: SendRequest,\n ): 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 * The operation to Upgrade Machine Extensions.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param machineName The name of the hybrid machine.\n * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation.\n * @param options The options parameters.\n */\n async beginUpgradeExtensions(\n resourceGroupName: string,\n machineName: string,\n extensionUpgradeParameters: MachineExtensionUpgrade,\n options?: UpgradeExtensionsOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n machineName,\n extensionUpgradeParameters,\n options,\n },\n spec: upgradeExtensionsOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * The operation to Upgrade Machine Extensions.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param machineName The name of the hybrid machine.\n * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation.\n * @param options The options parameters.\n */\n async beginUpgradeExtensionsAndWait(\n resourceGroupName: string,\n machineName: string,\n extensionUpgradeParameters: MachineExtensionUpgrade,\n options?: UpgradeExtensionsOptionalParams,\n ): Promise<void> {\n const poller = await this.beginUpgradeExtensions(\n resourceGroupName,\n machineName,\n extensionUpgradeParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n licenses: Licenses;\n machines: Machines;\n licenseProfiles: LicenseProfiles;\n machineExtensions: MachineExtensions;\n extensionMetadata: ExtensionMetadata;\n operations: Operations;\n networkProfileOperations: NetworkProfileOperations;\n machineRunCommands: MachineRunCommands;\n gateways: Gateways;\n settingsOperations: SettingsOperations;\n privateLinkScopes: PrivateLinkScopes;\n privateLinkResources: PrivateLinkResources;\n privateEndpointConnections: PrivateEndpointConnections;\n networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst upgradeExtensionsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.extensionUpgradeParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.machineName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
1
|
+
{"version":3,"file":"hybridComputeManagementClient.js","sourceRoot":"","sources":["../../src/hybridComputeManagementClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,8CAIyB;AACzB,6CAA6C;AAC7C,oDAkB+B;AAoB/B,2EAAqD;AACrD,qEAA+C;AAU/C,MAAa,6BAA8B,SAAQ,UAAU,CAAC,aAAa;IAoBzE,YACE,WAAqC,EACrC,uBAEU,EACV,OAAqD;;QAErD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,cAAkC,CAAC;QAEvC,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YAChD,cAAc,GAAG,uBAAuB,CAAC;QAC3C,CAAC;aAAM,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YACvD,OAAO,GAAG,uBAAuB,CAAC;QACpC,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAgD;YAC5D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,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;QAC5B,UAAU,CAAC,WAAW;KACvB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * 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\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"./lroImpl.js\";\nimport {\n LicensesImpl,\n MachinesImpl,\n LicenseProfilesImpl,\n MachineExtensionsImpl,\n ExtensionMetadataImpl,\n ExtensionMetadataV2Impl,\n ExtensionTypeOperationsImpl,\n ExtensionPublisherOperationsImpl,\n OperationsImpl,\n NetworkProfileOperationsImpl,\n MachineRunCommandsImpl,\n GatewaysImpl,\n SettingsOperationsImpl,\n PrivateLinkScopesImpl,\n PrivateLinkResourcesImpl,\n PrivateEndpointConnectionsImpl,\n NetworkSecurityPerimeterConfigurationsImpl,\n} from \"./operations/index.js\";\nimport {\n Licenses,\n Machines,\n LicenseProfiles,\n MachineExtensions,\n ExtensionMetadata,\n ExtensionMetadataV2,\n ExtensionTypeOperations,\n ExtensionPublisherOperations,\n Operations,\n NetworkProfileOperations,\n MachineRunCommands,\n Gateways,\n SettingsOperations,\n PrivateLinkScopes,\n PrivateLinkResources,\n PrivateEndpointConnections,\n NetworkSecurityPerimeterConfigurations,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n HybridComputeManagementClientOptionalParams,\n MachineExtensionUpgrade,\n UpgradeExtensionsOptionalParams,\n SetupExtensionRequest,\n SetupExtensionsOptionalParams,\n SetupExtensionsResponse,\n} from \"./models/index.js\";\n\nexport class HybridComputeManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the HybridComputeManagementClient 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?: HybridComputeManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: HybridComputeManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?:\n | HybridComputeManagementClientOptionalParams\n | string,\n options?: HybridComputeManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: HybridComputeManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-hybridcompute/5.0.0-beta.1`;\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:\n 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 ===\n 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 ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n 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-02-19-preview\";\n this.licenses = new LicensesImpl(this);\n this.machines = new MachinesImpl(this);\n this.licenseProfiles = new LicenseProfilesImpl(this);\n this.machineExtensions = new MachineExtensionsImpl(this);\n this.extensionMetadata = new ExtensionMetadataImpl(this);\n this.extensionMetadataV2 = new ExtensionMetadataV2Impl(this);\n this.extensionTypeOperations = new ExtensionTypeOperationsImpl(this);\n this.extensionPublisherOperations = new ExtensionPublisherOperationsImpl(\n this,\n );\n this.operations = new OperationsImpl(this);\n this.networkProfileOperations = new NetworkProfileOperationsImpl(this);\n this.machineRunCommands = new MachineRunCommandsImpl(this);\n this.gateways = new GatewaysImpl(this);\n this.settingsOperations = new SettingsOperationsImpl(this);\n this.privateLinkScopes = new PrivateLinkScopesImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.networkSecurityPerimeterConfigurations =\n new NetworkSecurityPerimeterConfigurationsImpl(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(\n request: PipelineRequest,\n next: SendRequest,\n ): 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 * The operation to Upgrade Machine Extensions.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param machineName The name of the hybrid machine.\n * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation.\n * @param options The options parameters.\n */\n async beginUpgradeExtensions(\n resourceGroupName: string,\n machineName: string,\n extensionUpgradeParameters: MachineExtensionUpgrade,\n options?: UpgradeExtensionsOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n machineName,\n extensionUpgradeParameters,\n options,\n },\n spec: upgradeExtensionsOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * The operation to Upgrade Machine Extensions.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param machineName The name of the hybrid machine.\n * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation.\n * @param options The options parameters.\n */\n async beginUpgradeExtensionsAndWait(\n resourceGroupName: string,\n machineName: string,\n extensionUpgradeParameters: MachineExtensionUpgrade,\n options?: UpgradeExtensionsOptionalParams,\n ): Promise<void> {\n const poller = await this.beginUpgradeExtensions(\n resourceGroupName,\n machineName,\n extensionUpgradeParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * The operation to Setup Machine Extensions.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param machineName The name of the hybrid machine.\n * @param extensions Parameters supplied to the Setup Extensions operation.\n * @param options The options parameters.\n */\n async beginSetupExtensions(\n resourceGroupName: string,\n machineName: string,\n extensions: SetupExtensionRequest,\n options?: SetupExtensionsOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<SetupExtensionsResponse>,\n SetupExtensionsResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<SetupExtensionsResponse> => {\n return this.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, machineName, extensions, options },\n spec: setupExtensionsOperationSpec,\n });\n const poller = await createHttpPoller<\n SetupExtensionsResponse,\n OperationState<SetupExtensionsResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * The operation to Setup Machine Extensions.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param machineName The name of the hybrid machine.\n * @param extensions Parameters supplied to the Setup Extensions operation.\n * @param options The options parameters.\n */\n async beginSetupExtensionsAndWait(\n resourceGroupName: string,\n machineName: string,\n extensions: SetupExtensionRequest,\n options?: SetupExtensionsOptionalParams,\n ): Promise<SetupExtensionsResponse> {\n const poller = await this.beginSetupExtensions(\n resourceGroupName,\n machineName,\n extensions,\n options,\n );\n return poller.pollUntilDone();\n }\n\n licenses: Licenses;\n machines: Machines;\n licenseProfiles: LicenseProfiles;\n machineExtensions: MachineExtensions;\n extensionMetadata: ExtensionMetadata;\n extensionMetadataV2: ExtensionMetadataV2;\n extensionTypeOperations: ExtensionTypeOperations;\n extensionPublisherOperations: ExtensionPublisherOperations;\n operations: Operations;\n networkProfileOperations: NetworkProfileOperations;\n machineRunCommands: MachineRunCommands;\n gateways: Gateways;\n settingsOperations: SettingsOperations;\n privateLinkScopes: PrivateLinkScopes;\n privateLinkResources: PrivateLinkResources;\n privateEndpointConnections: PrivateEndpointConnections;\n networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst upgradeExtensionsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.extensionUpgradeParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.machineName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst setupExtensionsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/addExtensions\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SetupExtensionRequest,\n },\n 201: {\n bodyMapper: Mappers.SetupExtensionRequest,\n },\n 202: {\n bodyMapper: Mappers.SetupExtensionRequest,\n },\n 204: {\n bodyMapper: Mappers.SetupExtensionRequest,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.extensions,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.machineName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEpE,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE;IACvC,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,EAAE;QACJ,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACzB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAmB1B"}
|
package/dist/commonjs/lroImpl.js
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
"use strict";
|
2
|
+
/*
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
|
+
*/
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
10
|
exports.createLroSpec = createLroSpec;
|
4
11
|
const tslib_1 = require("tslib");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAKH,sCA2BC;;AA3BD,SAAgB,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,KAAkB,IAAI,EAAjB,QAAQ,kBAAK,IAAI,EAAnC,eAA4B,CAAO,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,kCACtB,QAAQ,KACX,UAAU,EAAE,KAAK,EACjB,IAAI,EACJ,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,IACjC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["/*\n * 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\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: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\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"]}
|