@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
@@ -9,23 +9,21 @@ import * as coreClient from "@azure/core-client";
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
10
10
|
import { createHttpPoller, } from "@azure/core-lro";
|
11
11
|
import { createLroSpec } from "./lroImpl.js";
|
12
|
-
import { LicensesImpl, MachinesImpl, LicenseProfilesImpl, MachineExtensionsImpl, ExtensionMetadataImpl, OperationsImpl, NetworkProfileOperationsImpl, MachineRunCommandsImpl, GatewaysImpl, SettingsOperationsImpl, PrivateLinkScopesImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl, NetworkSecurityPerimeterConfigurationsImpl, } from "./operations/index.js";
|
12
|
+
import { LicensesImpl, MachinesImpl, LicenseProfilesImpl, MachineExtensionsImpl, ExtensionMetadataImpl, ExtensionMetadataV2Impl, ExtensionTypeOperationsImpl, ExtensionPublisherOperationsImpl, OperationsImpl, NetworkProfileOperationsImpl, MachineRunCommandsImpl, GatewaysImpl, SettingsOperationsImpl, PrivateLinkScopesImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl, NetworkSecurityPerimeterConfigurationsImpl, } from "./operations/index.js";
|
13
13
|
import * as Parameters from "./models/parameters.js";
|
14
14
|
import * as Mappers from "./models/mappers.js";
|
15
15
|
export class HybridComputeManagementClient extends coreClient.ServiceClient {
|
16
|
-
|
17
|
-
* Initializes a new instance of the HybridComputeManagementClient class.
|
18
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
19
|
-
* @param subscriptionId The ID of the target subscription.
|
20
|
-
* @param options The parameter options
|
21
|
-
*/
|
22
|
-
constructor(credentials, subscriptionId, options) {
|
16
|
+
constructor(credentials, subscriptionIdOrOptions, options) {
|
23
17
|
var _a, _b, _c;
|
24
18
|
if (credentials === undefined) {
|
25
19
|
throw new Error("'credentials' cannot be null");
|
26
20
|
}
|
27
|
-
|
28
|
-
|
21
|
+
let subscriptionId;
|
22
|
+
if (typeof subscriptionIdOrOptions === "string") {
|
23
|
+
subscriptionId = subscriptionIdOrOptions;
|
24
|
+
}
|
25
|
+
else if (typeof subscriptionIdOrOptions === "object") {
|
26
|
+
options = subscriptionIdOrOptions;
|
29
27
|
}
|
30
28
|
// Initializing default values for options
|
31
29
|
if (!options) {
|
@@ -35,7 +33,7 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient {
|
|
35
33
|
requestContentType: "application/json; charset=utf-8",
|
36
34
|
credential: credentials,
|
37
35
|
};
|
38
|
-
const packageDetails = `azsdk-js-arm-hybridcompute/
|
36
|
+
const packageDetails = `azsdk-js-arm-hybridcompute/5.0.0-beta.1`;
|
39
37
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
40
38
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
41
39
|
: `${packageDetails}`;
|
@@ -68,12 +66,15 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient {
|
|
68
66
|
this.subscriptionId = subscriptionId;
|
69
67
|
// Assigning values to Constant parameters
|
70
68
|
this.$host = options.$host || "https://management.azure.com";
|
71
|
-
this.apiVersion = options.apiVersion || "
|
69
|
+
this.apiVersion = options.apiVersion || "2025-02-19-preview";
|
72
70
|
this.licenses = new LicensesImpl(this);
|
73
71
|
this.machines = new MachinesImpl(this);
|
74
72
|
this.licenseProfiles = new LicenseProfilesImpl(this);
|
75
73
|
this.machineExtensions = new MachineExtensionsImpl(this);
|
76
74
|
this.extensionMetadata = new ExtensionMetadataImpl(this);
|
75
|
+
this.extensionMetadataV2 = new ExtensionMetadataV2Impl(this);
|
76
|
+
this.extensionTypeOperations = new ExtensionTypeOperationsImpl(this);
|
77
|
+
this.extensionPublisherOperations = new ExtensionPublisherOperationsImpl(this);
|
77
78
|
this.operations = new OperationsImpl(this);
|
78
79
|
this.networkProfileOperations = new NetworkProfileOperationsImpl(this);
|
79
80
|
this.machineRunCommands = new MachineRunCommandsImpl(this);
|
@@ -169,6 +170,59 @@ export class HybridComputeManagementClient extends coreClient.ServiceClient {
|
|
169
170
|
const poller = await this.beginUpgradeExtensions(resourceGroupName, machineName, extensionUpgradeParameters, options);
|
170
171
|
return poller.pollUntilDone();
|
171
172
|
}
|
173
|
+
/**
|
174
|
+
* The operation to Setup Machine Extensions.
|
175
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
176
|
+
* @param machineName The name of the hybrid machine.
|
177
|
+
* @param extensions Parameters supplied to the Setup Extensions operation.
|
178
|
+
* @param options The options parameters.
|
179
|
+
*/
|
180
|
+
async beginSetupExtensions(resourceGroupName, machineName, extensions, options) {
|
181
|
+
const directSendOperation = async (args, spec) => {
|
182
|
+
return this.sendOperationRequest(args, spec);
|
183
|
+
};
|
184
|
+
const sendOperationFn = async (args, spec) => {
|
185
|
+
var _a;
|
186
|
+
let currentRawResponse = undefined;
|
187
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
188
|
+
const callback = (rawResponse, flatResponse) => {
|
189
|
+
currentRawResponse = rawResponse;
|
190
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
191
|
+
};
|
192
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
193
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
194
|
+
return {
|
195
|
+
flatResponse,
|
196
|
+
rawResponse: {
|
197
|
+
statusCode: currentRawResponse.status,
|
198
|
+
body: currentRawResponse.parsedBody,
|
199
|
+
headers: currentRawResponse.headers.toJSON(),
|
200
|
+
},
|
201
|
+
};
|
202
|
+
};
|
203
|
+
const lro = createLroSpec({
|
204
|
+
sendOperationFn,
|
205
|
+
args: { resourceGroupName, machineName, extensions, options },
|
206
|
+
spec: setupExtensionsOperationSpec,
|
207
|
+
});
|
208
|
+
const poller = await createHttpPoller(lro, {
|
209
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
210
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
211
|
+
});
|
212
|
+
await poller.poll();
|
213
|
+
return poller;
|
214
|
+
}
|
215
|
+
/**
|
216
|
+
* The operation to Setup Machine Extensions.
|
217
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
218
|
+
* @param machineName The name of the hybrid machine.
|
219
|
+
* @param extensions Parameters supplied to the Setup Extensions operation.
|
220
|
+
* @param options The options parameters.
|
221
|
+
*/
|
222
|
+
async beginSetupExtensionsAndWait(resourceGroupName, machineName, extensions, options) {
|
223
|
+
const poller = await this.beginSetupExtensions(resourceGroupName, machineName, extensions, options);
|
224
|
+
return poller.pollUntilDone();
|
225
|
+
}
|
172
226
|
}
|
173
227
|
// Operation Specifications
|
174
228
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
@@ -196,4 +250,36 @@ const upgradeExtensionsOperationSpec = {
|
|
196
250
|
mediaType: "json",
|
197
251
|
serializer,
|
198
252
|
};
|
253
|
+
const setupExtensionsOperationSpec = {
|
254
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/addExtensions",
|
255
|
+
httpMethod: "POST",
|
256
|
+
responses: {
|
257
|
+
200: {
|
258
|
+
bodyMapper: Mappers.SetupExtensionRequest,
|
259
|
+
},
|
260
|
+
201: {
|
261
|
+
bodyMapper: Mappers.SetupExtensionRequest,
|
262
|
+
},
|
263
|
+
202: {
|
264
|
+
bodyMapper: Mappers.SetupExtensionRequest,
|
265
|
+
},
|
266
|
+
204: {
|
267
|
+
bodyMapper: Mappers.SetupExtensionRequest,
|
268
|
+
},
|
269
|
+
default: {
|
270
|
+
bodyMapper: Mappers.ErrorResponse,
|
271
|
+
},
|
272
|
+
},
|
273
|
+
requestBody: Parameters.extensions,
|
274
|
+
queryParameters: [Parameters.apiVersion],
|
275
|
+
urlParameters: [
|
276
|
+
Parameters.$host,
|
277
|
+
Parameters.subscriptionId,
|
278
|
+
Parameters.resourceGroupName,
|
279
|
+
Parameters.machineName,
|
280
|
+
],
|
281
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
282
|
+
mediaType: "json",
|
283
|
+
serializer,
|
284
|
+
};
|
199
285
|
//# sourceMappingURL=hybridComputeManagementClient.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hybridComputeManagementClient.js","sourceRoot":"","sources":["../../src/hybridComputeManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,4BAA4B,E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AAC,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,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,cAAc,EACd,4BAA4B,EAC5B,sBAAsB,EACtB,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,0CAA0C,GAC3C,MAAM,uBAAuB,CAAC;AAoB/B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAU/C,MAAM,OAAO,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,OA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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 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"}
|
@@ -1,3 +1,10 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
1
8
|
import { __rest } from "tslib";
|
2
9
|
export function createLroSpec(inputs) {
|
3
10
|
const { args, spec, sendOperationFn } = inputs;
|
@@ -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,MAAM,UAAU,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,UAAK,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"]}
|