@azure/arm-hybridcompute 4.0.1-alpha.20241114.1 → 4.1.0-beta.1
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 +79 -9
- package/README.md +1 -1
- package/dist/index.js +4477 -2438
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/extensionMetadataGetSample.js +1 -1
- package/dist-esm/samples-dev/extensionMetadataListSample.js +1 -1
- package/dist-esm/samples-dev/gatewaysCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/gatewaysCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/gatewaysCreateOrUpdateSample.js +44 -0
- package/dist-esm/samples-dev/gatewaysCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/gatewaysDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/gatewaysDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/gatewaysDeleteSample.js +39 -0
- package/dist-esm/samples-dev/gatewaysDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/gatewaysGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/gatewaysGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/gatewaysGetSample.js +39 -0
- package/dist-esm/samples-dev/gatewaysGetSample.js.map +1 -0
- package/dist-esm/samples-dev/gatewaysListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/gatewaysListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/gatewaysListByResourceGroupSample.js +54 -0
- package/dist-esm/samples-dev/gatewaysListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/gatewaysListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/gatewaysListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/gatewaysListBySubscriptionSample.js +53 -0
- package/dist-esm/samples-dev/gatewaysListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/gatewaysUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/gatewaysUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/gatewaysUpdateSample.js +40 -0
- package/dist-esm/samples-dev/gatewaysUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/licenseProfilesCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/licenseProfilesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/licenseProfilesGetSample.js +1 -1
- package/dist-esm/samples-dev/licenseProfilesListSample.js +1 -1
- package/dist-esm/samples-dev/licenseProfilesUpdateSample.js +1 -1
- package/dist-esm/samples-dev/licensesCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/licensesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/licensesGetSample.js +1 -1
- package/dist-esm/samples-dev/licensesListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/licensesListBySubscriptionSample.js +1 -1
- package/dist-esm/samples-dev/licensesUpdateSample.js +1 -1
- package/dist-esm/samples-dev/licensesValidateLicenseSample.js +1 -1
- package/dist-esm/samples-dev/machineExtensionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/machineExtensionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/machineExtensionsGetSample.js +1 -1
- package/dist-esm/samples-dev/machineExtensionsListSample.js +1 -1
- package/dist-esm/samples-dev/machineExtensionsUpdateSample.js +3 -3
- package/dist-esm/samples-dev/machineRunCommandsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/machineRunCommandsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/machineRunCommandsCreateOrUpdateSample.js +53 -0
- package/dist-esm/samples-dev/machineRunCommandsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/machineRunCommandsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/machineRunCommandsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/machineRunCommandsDeleteSample.js +39 -0
- package/dist-esm/samples-dev/machineRunCommandsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/machineRunCommandsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/machineRunCommandsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/machineRunCommandsGetSample.js +39 -0
- package/dist-esm/samples-dev/machineRunCommandsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/machineRunCommandsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/machineRunCommandsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/machineRunCommandsListSample.js +54 -0
- package/dist-esm/samples-dev/machineRunCommandsListSample.js.map +1 -0
- package/dist-esm/samples-dev/machinesAssessPatchesSample.js +1 -1
- package/dist-esm/samples-dev/machinesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/machinesGetSample.js +2 -2
- package/dist-esm/samples-dev/machinesInstallPatchesSample.js +1 -1
- package/dist-esm/samples-dev/machinesListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/machinesListBySubscriptionSample.js +1 -1
- package/dist-esm/samples-dev/networkProfileGetSample.js +1 -1
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSample.js +1 -1
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsListByPrivateLinkScopeSample.js +1 -1
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSample.js +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkScopesCreateOrUpdateSample.js +2 -2
- package/dist-esm/samples-dev/privateLinkScopesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkScopesGetSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkScopesGetValidationDetailsForMachineSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkScopesGetValidationDetailsSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkScopesListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkScopesListSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkScopesUpdateTagsSample.js +1 -1
- package/dist-esm/samples-dev/settingsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/settingsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/settingsGetSample.js +42 -0
- package/dist-esm/samples-dev/settingsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/settingsPatchSample.d.ts +2 -0
- package/dist-esm/samples-dev/settingsPatchSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/settingsPatchSample.js +45 -0
- package/dist-esm/samples-dev/settingsPatchSample.js.map +1 -0
- package/dist-esm/samples-dev/settingsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/settingsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/settingsUpdateSample.js +45 -0
- package/dist-esm/samples-dev/settingsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/upgradeExtensionsSample.js +1 -1
- package/dist-esm/src/hybridComputeManagementClient.d.ts +4 -1
- package/dist-esm/src/hybridComputeManagementClient.d.ts.map +1 -1
- package/dist-esm/src/hybridComputeManagementClient.js +6 -3
- package/dist-esm/src/hybridComputeManagementClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +506 -14
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +24 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +29 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +987 -111
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +12 -2
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +99 -4
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/gateways.d.ts +99 -0
- package/dist-esm/src/operations/gateways.d.ts.map +1 -0
- package/dist-esm/src/operations/gateways.js +495 -0
- package/dist-esm/src/operations/gateways.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +3 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +3 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/machineExtensions.d.ts +2 -2
- package/dist-esm/src/operations/machineExtensions.js +2 -2
- package/dist-esm/src/operations/machineRunCommands.d.ts +81 -0
- package/dist-esm/src/operations/machineRunCommands.d.ts.map +1 -0
- package/dist-esm/src/operations/machineRunCommands.js +372 -0
- package/dist-esm/src/operations/machineRunCommands.js.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +1 -1
- package/dist-esm/src/operations/privateLinkScopes.js +1 -1
- package/dist-esm/src/operations/settingsOperations.d.ts +45 -0
- package/dist-esm/src/operations/settingsOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/settingsOperations.js +163 -0
- package/dist-esm/src/operations/settingsOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/gateways.d.ts +63 -0
- package/dist-esm/src/operationsInterfaces/gateways.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/gateways.js +9 -0
- package/dist-esm/src/operationsInterfaces/gateways.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +3 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/machineExtensions.d.ts +2 -2
- package/dist-esm/src/operationsInterfaces/machineRunCommands.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/machineRunCommands.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/machineRunCommands.js +9 -0
- package/dist-esm/src/operationsInterfaces/machineRunCommands.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/settingsOperations.d.ts +37 -0
- package/dist-esm/src/operationsInterfaces/settingsOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/settingsOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/settingsOperations.js.map +1 -0
- package/package.json +5 -3
- package/review/arm-hybridcompute.api.md +389 -0
- package/src/hybridComputeManagementClient.ts +14 -2
- package/src/models/index.ts +572 -14
- package/src/models/mappers.ts +1105 -150
- package/src/models/parameters.ts +112 -3
- package/src/operations/gateways.ts +641 -0
- package/src/operations/index.ts +3 -0
- package/src/operations/machineExtensions.ts +2 -2
- package/src/operations/machineRunCommands.ts +511 -0
- package/src/operations/privateEndpointConnections.ts +1 -1
- package/src/operations/privateLinkScopes.ts +1 -1
- package/src/operations/settingsOperations.ts +213 -0
- package/src/operationsInterfaces/gateways.ts +127 -0
- package/src/operationsInterfaces/index.ts +3 -0
- package/src/operationsInterfaces/machineExtensions.ts +2 -2
- package/src/operationsInterfaces/machineRunCommands.ts +115 -0
- package/src/operationsInterfaces/settingsOperations.ts +76 -0
- package/tsconfig.json +2 -2
- package/types/arm-hybridcompute.d.ts +712 -4
@@ -0,0 +1,641 @@
|
|
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
|
+
*/
|
8
|
+
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
11
|
+
import { Gateways } from "../operationsInterfaces";
|
12
|
+
import * as coreClient from "@azure/core-client";
|
13
|
+
import * as Mappers from "../models/mappers";
|
14
|
+
import * as Parameters from "../models/parameters";
|
15
|
+
import { HybridComputeManagementClient } from "../hybridComputeManagementClient";
|
16
|
+
import {
|
17
|
+
SimplePollerLike,
|
18
|
+
OperationState,
|
19
|
+
createHttpPoller,
|
20
|
+
} from "@azure/core-lro";
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
22
|
+
import {
|
23
|
+
Gateway,
|
24
|
+
GatewaysListByResourceGroupNextOptionalParams,
|
25
|
+
GatewaysListByResourceGroupOptionalParams,
|
26
|
+
GatewaysListByResourceGroupResponse,
|
27
|
+
GatewaysListBySubscriptionNextOptionalParams,
|
28
|
+
GatewaysListBySubscriptionOptionalParams,
|
29
|
+
GatewaysListBySubscriptionResponse,
|
30
|
+
GatewaysCreateOrUpdateOptionalParams,
|
31
|
+
GatewaysCreateOrUpdateResponse,
|
32
|
+
GatewayUpdate,
|
33
|
+
GatewaysUpdateOptionalParams,
|
34
|
+
GatewaysUpdateResponse,
|
35
|
+
GatewaysGetOptionalParams,
|
36
|
+
GatewaysGetResponse,
|
37
|
+
GatewaysDeleteOptionalParams,
|
38
|
+
GatewaysDeleteResponse,
|
39
|
+
GatewaysListByResourceGroupNextResponse,
|
40
|
+
GatewaysListBySubscriptionNextResponse,
|
41
|
+
} from "../models";
|
42
|
+
|
43
|
+
/// <reference lib="esnext.asynciterable" />
|
44
|
+
/** Class containing Gateways operations. */
|
45
|
+
export class GatewaysImpl implements Gateways {
|
46
|
+
private readonly client: HybridComputeManagementClient;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Initialize a new instance of the class Gateways class.
|
50
|
+
* @param client Reference to the service client
|
51
|
+
*/
|
52
|
+
constructor(client: HybridComputeManagementClient) {
|
53
|
+
this.client = client;
|
54
|
+
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* The operation to get all gateways of a non-Azure machine
|
58
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
59
|
+
* @param options The options parameters.
|
60
|
+
*/
|
61
|
+
public listByResourceGroup(
|
62
|
+
resourceGroupName: string,
|
63
|
+
options?: GatewaysListByResourceGroupOptionalParams,
|
64
|
+
): PagedAsyncIterableIterator<Gateway> {
|
65
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
66
|
+
return {
|
67
|
+
next() {
|
68
|
+
return iter.next();
|
69
|
+
},
|
70
|
+
[Symbol.asyncIterator]() {
|
71
|
+
return this;
|
72
|
+
},
|
73
|
+
byPage: (settings?: PageSettings) => {
|
74
|
+
if (settings?.maxPageSize) {
|
75
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
76
|
+
}
|
77
|
+
return this.listByResourceGroupPagingPage(
|
78
|
+
resourceGroupName,
|
79
|
+
options,
|
80
|
+
settings,
|
81
|
+
);
|
82
|
+
},
|
83
|
+
};
|
84
|
+
}
|
85
|
+
|
86
|
+
private async *listByResourceGroupPagingPage(
|
87
|
+
resourceGroupName: string,
|
88
|
+
options?: GatewaysListByResourceGroupOptionalParams,
|
89
|
+
settings?: PageSettings,
|
90
|
+
): AsyncIterableIterator<Gateway[]> {
|
91
|
+
let result: GatewaysListByResourceGroupResponse;
|
92
|
+
let continuationToken = settings?.continuationToken;
|
93
|
+
if (!continuationToken) {
|
94
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
95
|
+
let page = result.value || [];
|
96
|
+
continuationToken = result.nextLink;
|
97
|
+
setContinuationToken(page, continuationToken);
|
98
|
+
yield page;
|
99
|
+
}
|
100
|
+
while (continuationToken) {
|
101
|
+
result = await this._listByResourceGroupNext(
|
102
|
+
resourceGroupName,
|
103
|
+
continuationToken,
|
104
|
+
options,
|
105
|
+
);
|
106
|
+
continuationToken = result.nextLink;
|
107
|
+
let page = result.value || [];
|
108
|
+
setContinuationToken(page, continuationToken);
|
109
|
+
yield page;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
private async *listByResourceGroupPagingAll(
|
114
|
+
resourceGroupName: string,
|
115
|
+
options?: GatewaysListByResourceGroupOptionalParams,
|
116
|
+
): AsyncIterableIterator<Gateway> {
|
117
|
+
for await (const page of this.listByResourceGroupPagingPage(
|
118
|
+
resourceGroupName,
|
119
|
+
options,
|
120
|
+
)) {
|
121
|
+
yield* page;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
/**
|
126
|
+
* The operation to get all gateways of a non-Azure machine
|
127
|
+
* @param options The options parameters.
|
128
|
+
*/
|
129
|
+
public listBySubscription(
|
130
|
+
options?: GatewaysListBySubscriptionOptionalParams,
|
131
|
+
): PagedAsyncIterableIterator<Gateway> {
|
132
|
+
const iter = this.listBySubscriptionPagingAll(options);
|
133
|
+
return {
|
134
|
+
next() {
|
135
|
+
return iter.next();
|
136
|
+
},
|
137
|
+
[Symbol.asyncIterator]() {
|
138
|
+
return this;
|
139
|
+
},
|
140
|
+
byPage: (settings?: PageSettings) => {
|
141
|
+
if (settings?.maxPageSize) {
|
142
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
143
|
+
}
|
144
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
145
|
+
},
|
146
|
+
};
|
147
|
+
}
|
148
|
+
|
149
|
+
private async *listBySubscriptionPagingPage(
|
150
|
+
options?: GatewaysListBySubscriptionOptionalParams,
|
151
|
+
settings?: PageSettings,
|
152
|
+
): AsyncIterableIterator<Gateway[]> {
|
153
|
+
let result: GatewaysListBySubscriptionResponse;
|
154
|
+
let continuationToken = settings?.continuationToken;
|
155
|
+
if (!continuationToken) {
|
156
|
+
result = await this._listBySubscription(options);
|
157
|
+
let page = result.value || [];
|
158
|
+
continuationToken = result.nextLink;
|
159
|
+
setContinuationToken(page, continuationToken);
|
160
|
+
yield page;
|
161
|
+
}
|
162
|
+
while (continuationToken) {
|
163
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
164
|
+
continuationToken = result.nextLink;
|
165
|
+
let page = result.value || [];
|
166
|
+
setContinuationToken(page, continuationToken);
|
167
|
+
yield page;
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
private async *listBySubscriptionPagingAll(
|
172
|
+
options?: GatewaysListBySubscriptionOptionalParams,
|
173
|
+
): AsyncIterableIterator<Gateway> {
|
174
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
175
|
+
yield* page;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
/**
|
180
|
+
* The operation to create or update a gateway.
|
181
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
182
|
+
* @param gatewayName The name of the Gateway.
|
183
|
+
* @param parameters Parameters supplied to the Create gateway operation.
|
184
|
+
* @param options The options parameters.
|
185
|
+
*/
|
186
|
+
async beginCreateOrUpdate(
|
187
|
+
resourceGroupName: string,
|
188
|
+
gatewayName: string,
|
189
|
+
parameters: Gateway,
|
190
|
+
options?: GatewaysCreateOrUpdateOptionalParams,
|
191
|
+
): Promise<
|
192
|
+
SimplePollerLike<
|
193
|
+
OperationState<GatewaysCreateOrUpdateResponse>,
|
194
|
+
GatewaysCreateOrUpdateResponse
|
195
|
+
>
|
196
|
+
> {
|
197
|
+
const directSendOperation = async (
|
198
|
+
args: coreClient.OperationArguments,
|
199
|
+
spec: coreClient.OperationSpec,
|
200
|
+
): Promise<GatewaysCreateOrUpdateResponse> => {
|
201
|
+
return this.client.sendOperationRequest(args, spec);
|
202
|
+
};
|
203
|
+
const sendOperationFn = async (
|
204
|
+
args: coreClient.OperationArguments,
|
205
|
+
spec: coreClient.OperationSpec,
|
206
|
+
) => {
|
207
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
208
|
+
undefined;
|
209
|
+
const providedCallback = args.options?.onResponse;
|
210
|
+
const callback: coreClient.RawResponseCallback = (
|
211
|
+
rawResponse: coreClient.FullOperationResponse,
|
212
|
+
flatResponse: unknown,
|
213
|
+
) => {
|
214
|
+
currentRawResponse = rawResponse;
|
215
|
+
providedCallback?.(rawResponse, flatResponse);
|
216
|
+
};
|
217
|
+
const updatedArgs = {
|
218
|
+
...args,
|
219
|
+
options: {
|
220
|
+
...args.options,
|
221
|
+
onResponse: callback,
|
222
|
+
},
|
223
|
+
};
|
224
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
225
|
+
return {
|
226
|
+
flatResponse,
|
227
|
+
rawResponse: {
|
228
|
+
statusCode: currentRawResponse!.status,
|
229
|
+
body: currentRawResponse!.parsedBody,
|
230
|
+
headers: currentRawResponse!.headers.toJSON(),
|
231
|
+
},
|
232
|
+
};
|
233
|
+
};
|
234
|
+
|
235
|
+
const lro = createLroSpec({
|
236
|
+
sendOperationFn,
|
237
|
+
args: { resourceGroupName, gatewayName, parameters, options },
|
238
|
+
spec: createOrUpdateOperationSpec,
|
239
|
+
});
|
240
|
+
const poller = await createHttpPoller<
|
241
|
+
GatewaysCreateOrUpdateResponse,
|
242
|
+
OperationState<GatewaysCreateOrUpdateResponse>
|
243
|
+
>(lro, {
|
244
|
+
restoreFrom: options?.resumeFrom,
|
245
|
+
intervalInMs: options?.updateIntervalInMs,
|
246
|
+
});
|
247
|
+
await poller.poll();
|
248
|
+
return poller;
|
249
|
+
}
|
250
|
+
|
251
|
+
/**
|
252
|
+
* The operation to create or update a gateway.
|
253
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
254
|
+
* @param gatewayName The name of the Gateway.
|
255
|
+
* @param parameters Parameters supplied to the Create gateway operation.
|
256
|
+
* @param options The options parameters.
|
257
|
+
*/
|
258
|
+
async beginCreateOrUpdateAndWait(
|
259
|
+
resourceGroupName: string,
|
260
|
+
gatewayName: string,
|
261
|
+
parameters: Gateway,
|
262
|
+
options?: GatewaysCreateOrUpdateOptionalParams,
|
263
|
+
): Promise<GatewaysCreateOrUpdateResponse> {
|
264
|
+
const poller = await this.beginCreateOrUpdate(
|
265
|
+
resourceGroupName,
|
266
|
+
gatewayName,
|
267
|
+
parameters,
|
268
|
+
options,
|
269
|
+
);
|
270
|
+
return poller.pollUntilDone();
|
271
|
+
}
|
272
|
+
|
273
|
+
/**
|
274
|
+
* The operation to update a gateway.
|
275
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
276
|
+
* @param gatewayName The name of the Gateway.
|
277
|
+
* @param parameters Parameters supplied to the Update gateway operation.
|
278
|
+
* @param options The options parameters.
|
279
|
+
*/
|
280
|
+
update(
|
281
|
+
resourceGroupName: string,
|
282
|
+
gatewayName: string,
|
283
|
+
parameters: GatewayUpdate,
|
284
|
+
options?: GatewaysUpdateOptionalParams,
|
285
|
+
): Promise<GatewaysUpdateResponse> {
|
286
|
+
return this.client.sendOperationRequest(
|
287
|
+
{ resourceGroupName, gatewayName, parameters, options },
|
288
|
+
updateOperationSpec,
|
289
|
+
);
|
290
|
+
}
|
291
|
+
|
292
|
+
/**
|
293
|
+
* Retrieves information about the view of a gateway.
|
294
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
295
|
+
* @param gatewayName The name of the Gateway.
|
296
|
+
* @param options The options parameters.
|
297
|
+
*/
|
298
|
+
get(
|
299
|
+
resourceGroupName: string,
|
300
|
+
gatewayName: string,
|
301
|
+
options?: GatewaysGetOptionalParams,
|
302
|
+
): Promise<GatewaysGetResponse> {
|
303
|
+
return this.client.sendOperationRequest(
|
304
|
+
{ resourceGroupName, gatewayName, options },
|
305
|
+
getOperationSpec,
|
306
|
+
);
|
307
|
+
}
|
308
|
+
|
309
|
+
/**
|
310
|
+
* The operation to delete a gateway.
|
311
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
312
|
+
* @param gatewayName The name of the Gateway.
|
313
|
+
* @param options The options parameters.
|
314
|
+
*/
|
315
|
+
async beginDelete(
|
316
|
+
resourceGroupName: string,
|
317
|
+
gatewayName: string,
|
318
|
+
options?: GatewaysDeleteOptionalParams,
|
319
|
+
): Promise<
|
320
|
+
SimplePollerLike<
|
321
|
+
OperationState<GatewaysDeleteResponse>,
|
322
|
+
GatewaysDeleteResponse
|
323
|
+
>
|
324
|
+
> {
|
325
|
+
const directSendOperation = async (
|
326
|
+
args: coreClient.OperationArguments,
|
327
|
+
spec: coreClient.OperationSpec,
|
328
|
+
): Promise<GatewaysDeleteResponse> => {
|
329
|
+
return this.client.sendOperationRequest(args, spec);
|
330
|
+
};
|
331
|
+
const sendOperationFn = async (
|
332
|
+
args: coreClient.OperationArguments,
|
333
|
+
spec: coreClient.OperationSpec,
|
334
|
+
) => {
|
335
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
336
|
+
undefined;
|
337
|
+
const providedCallback = args.options?.onResponse;
|
338
|
+
const callback: coreClient.RawResponseCallback = (
|
339
|
+
rawResponse: coreClient.FullOperationResponse,
|
340
|
+
flatResponse: unknown,
|
341
|
+
) => {
|
342
|
+
currentRawResponse = rawResponse;
|
343
|
+
providedCallback?.(rawResponse, flatResponse);
|
344
|
+
};
|
345
|
+
const updatedArgs = {
|
346
|
+
...args,
|
347
|
+
options: {
|
348
|
+
...args.options,
|
349
|
+
onResponse: callback,
|
350
|
+
},
|
351
|
+
};
|
352
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
353
|
+
return {
|
354
|
+
flatResponse,
|
355
|
+
rawResponse: {
|
356
|
+
statusCode: currentRawResponse!.status,
|
357
|
+
body: currentRawResponse!.parsedBody,
|
358
|
+
headers: currentRawResponse!.headers.toJSON(),
|
359
|
+
},
|
360
|
+
};
|
361
|
+
};
|
362
|
+
|
363
|
+
const lro = createLroSpec({
|
364
|
+
sendOperationFn,
|
365
|
+
args: { resourceGroupName, gatewayName, options },
|
366
|
+
spec: deleteOperationSpec,
|
367
|
+
});
|
368
|
+
const poller = await createHttpPoller<
|
369
|
+
GatewaysDeleteResponse,
|
370
|
+
OperationState<GatewaysDeleteResponse>
|
371
|
+
>(lro, {
|
372
|
+
restoreFrom: options?.resumeFrom,
|
373
|
+
intervalInMs: options?.updateIntervalInMs,
|
374
|
+
});
|
375
|
+
await poller.poll();
|
376
|
+
return poller;
|
377
|
+
}
|
378
|
+
|
379
|
+
/**
|
380
|
+
* The operation to delete a gateway.
|
381
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
382
|
+
* @param gatewayName The name of the Gateway.
|
383
|
+
* @param options The options parameters.
|
384
|
+
*/
|
385
|
+
async beginDeleteAndWait(
|
386
|
+
resourceGroupName: string,
|
387
|
+
gatewayName: string,
|
388
|
+
options?: GatewaysDeleteOptionalParams,
|
389
|
+
): Promise<GatewaysDeleteResponse> {
|
390
|
+
const poller = await this.beginDelete(
|
391
|
+
resourceGroupName,
|
392
|
+
gatewayName,
|
393
|
+
options,
|
394
|
+
);
|
395
|
+
return poller.pollUntilDone();
|
396
|
+
}
|
397
|
+
|
398
|
+
/**
|
399
|
+
* The operation to get all gateways of a non-Azure machine
|
400
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
401
|
+
* @param options The options parameters.
|
402
|
+
*/
|
403
|
+
private _listByResourceGroup(
|
404
|
+
resourceGroupName: string,
|
405
|
+
options?: GatewaysListByResourceGroupOptionalParams,
|
406
|
+
): Promise<GatewaysListByResourceGroupResponse> {
|
407
|
+
return this.client.sendOperationRequest(
|
408
|
+
{ resourceGroupName, options },
|
409
|
+
listByResourceGroupOperationSpec,
|
410
|
+
);
|
411
|
+
}
|
412
|
+
|
413
|
+
/**
|
414
|
+
* The operation to get all gateways of a non-Azure machine
|
415
|
+
* @param options The options parameters.
|
416
|
+
*/
|
417
|
+
private _listBySubscription(
|
418
|
+
options?: GatewaysListBySubscriptionOptionalParams,
|
419
|
+
): Promise<GatewaysListBySubscriptionResponse> {
|
420
|
+
return this.client.sendOperationRequest(
|
421
|
+
{ options },
|
422
|
+
listBySubscriptionOperationSpec,
|
423
|
+
);
|
424
|
+
}
|
425
|
+
|
426
|
+
/**
|
427
|
+
* ListByResourceGroupNext
|
428
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
429
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
430
|
+
* @param options The options parameters.
|
431
|
+
*/
|
432
|
+
private _listByResourceGroupNext(
|
433
|
+
resourceGroupName: string,
|
434
|
+
nextLink: string,
|
435
|
+
options?: GatewaysListByResourceGroupNextOptionalParams,
|
436
|
+
): Promise<GatewaysListByResourceGroupNextResponse> {
|
437
|
+
return this.client.sendOperationRequest(
|
438
|
+
{ resourceGroupName, nextLink, options },
|
439
|
+
listByResourceGroupNextOperationSpec,
|
440
|
+
);
|
441
|
+
}
|
442
|
+
|
443
|
+
/**
|
444
|
+
* ListBySubscriptionNext
|
445
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
446
|
+
* @param options The options parameters.
|
447
|
+
*/
|
448
|
+
private _listBySubscriptionNext(
|
449
|
+
nextLink: string,
|
450
|
+
options?: GatewaysListBySubscriptionNextOptionalParams,
|
451
|
+
): Promise<GatewaysListBySubscriptionNextResponse> {
|
452
|
+
return this.client.sendOperationRequest(
|
453
|
+
{ nextLink, options },
|
454
|
+
listBySubscriptionNextOperationSpec,
|
455
|
+
);
|
456
|
+
}
|
457
|
+
}
|
458
|
+
// Operation Specifications
|
459
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
460
|
+
|
461
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
462
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}",
|
463
|
+
httpMethod: "PUT",
|
464
|
+
responses: {
|
465
|
+
200: {
|
466
|
+
bodyMapper: Mappers.Gateway,
|
467
|
+
},
|
468
|
+
201: {
|
469
|
+
bodyMapper: Mappers.Gateway,
|
470
|
+
},
|
471
|
+
202: {
|
472
|
+
bodyMapper: Mappers.Gateway,
|
473
|
+
},
|
474
|
+
204: {
|
475
|
+
bodyMapper: Mappers.Gateway,
|
476
|
+
},
|
477
|
+
default: {
|
478
|
+
bodyMapper: Mappers.ErrorResponseAutoGenerated,
|
479
|
+
},
|
480
|
+
},
|
481
|
+
requestBody: Parameters.parameters4,
|
482
|
+
queryParameters: [Parameters.apiVersion],
|
483
|
+
urlParameters: [
|
484
|
+
Parameters.$host,
|
485
|
+
Parameters.subscriptionId,
|
486
|
+
Parameters.resourceGroupName,
|
487
|
+
Parameters.gatewayName,
|
488
|
+
],
|
489
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
490
|
+
mediaType: "json",
|
491
|
+
serializer,
|
492
|
+
};
|
493
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
494
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}",
|
495
|
+
httpMethod: "PATCH",
|
496
|
+
responses: {
|
497
|
+
200: {
|
498
|
+
bodyMapper: Mappers.Gateway,
|
499
|
+
},
|
500
|
+
default: {
|
501
|
+
bodyMapper: Mappers.ErrorResponseAutoGenerated,
|
502
|
+
},
|
503
|
+
},
|
504
|
+
requestBody: Parameters.parameters5,
|
505
|
+
queryParameters: [Parameters.apiVersion],
|
506
|
+
urlParameters: [
|
507
|
+
Parameters.$host,
|
508
|
+
Parameters.subscriptionId,
|
509
|
+
Parameters.resourceGroupName,
|
510
|
+
Parameters.gatewayName,
|
511
|
+
],
|
512
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
513
|
+
mediaType: "json",
|
514
|
+
serializer,
|
515
|
+
};
|
516
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
517
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}",
|
518
|
+
httpMethod: "GET",
|
519
|
+
responses: {
|
520
|
+
200: {
|
521
|
+
bodyMapper: Mappers.Gateway,
|
522
|
+
},
|
523
|
+
default: {
|
524
|
+
bodyMapper: Mappers.ErrorResponseAutoGenerated,
|
525
|
+
},
|
526
|
+
},
|
527
|
+
queryParameters: [Parameters.apiVersion],
|
528
|
+
urlParameters: [
|
529
|
+
Parameters.$host,
|
530
|
+
Parameters.subscriptionId,
|
531
|
+
Parameters.resourceGroupName,
|
532
|
+
Parameters.gatewayName,
|
533
|
+
],
|
534
|
+
headerParameters: [Parameters.accept],
|
535
|
+
serializer,
|
536
|
+
};
|
537
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
538
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}",
|
539
|
+
httpMethod: "DELETE",
|
540
|
+
responses: {
|
541
|
+
200: {
|
542
|
+
headersMapper: Mappers.GatewaysDeleteHeaders,
|
543
|
+
},
|
544
|
+
201: {
|
545
|
+
headersMapper: Mappers.GatewaysDeleteHeaders,
|
546
|
+
},
|
547
|
+
202: {
|
548
|
+
headersMapper: Mappers.GatewaysDeleteHeaders,
|
549
|
+
},
|
550
|
+
204: {
|
551
|
+
headersMapper: Mappers.GatewaysDeleteHeaders,
|
552
|
+
},
|
553
|
+
default: {
|
554
|
+
bodyMapper: Mappers.ErrorResponseAutoGenerated,
|
555
|
+
},
|
556
|
+
},
|
557
|
+
queryParameters: [Parameters.apiVersion],
|
558
|
+
urlParameters: [
|
559
|
+
Parameters.$host,
|
560
|
+
Parameters.subscriptionId,
|
561
|
+
Parameters.resourceGroupName,
|
562
|
+
Parameters.gatewayName,
|
563
|
+
],
|
564
|
+
headerParameters: [Parameters.accept],
|
565
|
+
serializer,
|
566
|
+
};
|
567
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
568
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways",
|
569
|
+
httpMethod: "GET",
|
570
|
+
responses: {
|
571
|
+
200: {
|
572
|
+
bodyMapper: Mappers.GatewaysListResult,
|
573
|
+
},
|
574
|
+
default: {
|
575
|
+
bodyMapper: Mappers.ErrorResponseAutoGenerated,
|
576
|
+
},
|
577
|
+
},
|
578
|
+
queryParameters: [Parameters.apiVersion],
|
579
|
+
urlParameters: [
|
580
|
+
Parameters.$host,
|
581
|
+
Parameters.subscriptionId,
|
582
|
+
Parameters.resourceGroupName,
|
583
|
+
],
|
584
|
+
headerParameters: [Parameters.accept],
|
585
|
+
serializer,
|
586
|
+
};
|
587
|
+
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
588
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways",
|
589
|
+
httpMethod: "GET",
|
590
|
+
responses: {
|
591
|
+
200: {
|
592
|
+
bodyMapper: Mappers.GatewaysListResult,
|
593
|
+
},
|
594
|
+
default: {
|
595
|
+
bodyMapper: Mappers.ErrorResponseAutoGenerated,
|
596
|
+
},
|
597
|
+
},
|
598
|
+
queryParameters: [Parameters.apiVersion],
|
599
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
600
|
+
headerParameters: [Parameters.accept],
|
601
|
+
serializer,
|
602
|
+
};
|
603
|
+
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
604
|
+
path: "{nextLink}",
|
605
|
+
httpMethod: "GET",
|
606
|
+
responses: {
|
607
|
+
200: {
|
608
|
+
bodyMapper: Mappers.GatewaysListResult,
|
609
|
+
},
|
610
|
+
default: {
|
611
|
+
bodyMapper: Mappers.ErrorResponseAutoGenerated,
|
612
|
+
},
|
613
|
+
},
|
614
|
+
urlParameters: [
|
615
|
+
Parameters.$host,
|
616
|
+
Parameters.subscriptionId,
|
617
|
+
Parameters.resourceGroupName,
|
618
|
+
Parameters.nextLink,
|
619
|
+
],
|
620
|
+
headerParameters: [Parameters.accept],
|
621
|
+
serializer,
|
622
|
+
};
|
623
|
+
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
624
|
+
path: "{nextLink}",
|
625
|
+
httpMethod: "GET",
|
626
|
+
responses: {
|
627
|
+
200: {
|
628
|
+
bodyMapper: Mappers.GatewaysListResult,
|
629
|
+
},
|
630
|
+
default: {
|
631
|
+
bodyMapper: Mappers.ErrorResponseAutoGenerated,
|
632
|
+
},
|
633
|
+
},
|
634
|
+
urlParameters: [
|
635
|
+
Parameters.$host,
|
636
|
+
Parameters.subscriptionId,
|
637
|
+
Parameters.nextLink,
|
638
|
+
],
|
639
|
+
headerParameters: [Parameters.accept],
|
640
|
+
serializer,
|
641
|
+
};
|
package/src/operations/index.ts
CHANGED
@@ -13,6 +13,9 @@ export * from "./machineExtensions";
|
|
13
13
|
export * from "./extensionMetadata";
|
14
14
|
export * from "./operations";
|
15
15
|
export * from "./networkProfileOperations";
|
16
|
+
export * from "./machineRunCommands";
|
17
|
+
export * from "./gateways";
|
18
|
+
export * from "./settingsOperations";
|
16
19
|
export * from "./privateLinkScopes";
|
17
20
|
export * from "./privateLinkResources";
|
18
21
|
export * from "./privateEndpointConnections";
|
@@ -230,7 +230,7 @@ export class MachineExtensionsImpl implements MachineExtensions {
|
|
230
230
|
}
|
231
231
|
|
232
232
|
/**
|
233
|
-
* The operation to update the extension.
|
233
|
+
* The operation to create or update the extension.
|
234
234
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
235
235
|
* @param machineName The name of the machine where the extension should be created or updated.
|
236
236
|
* @param extensionName The name of the machine extension.
|
@@ -310,7 +310,7 @@ export class MachineExtensionsImpl implements MachineExtensions {
|
|
310
310
|
}
|
311
311
|
|
312
312
|
/**
|
313
|
-
* The operation to update the extension.
|
313
|
+
* The operation to create or update the extension.
|
314
314
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
315
315
|
* @param machineName The name of the machine where the extension should be created or updated.
|
316
316
|
* @param extensionName The name of the machine extension.
|