@azure/arm-machinelearning 2.0.1-alpha.20221026.1 → 2.1.0-alpha.20221101.2
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 +173 -10
- package/dist/index.js +6417 -3094
- 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/batchDeploymentsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/batchDeploymentsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/batchDeploymentsGetSample.js +1 -1
- package/dist-esm/samples-dev/batchDeploymentsListSample.js +1 -1
- package/dist-esm/samples-dev/batchDeploymentsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/batchEndpointsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/batchEndpointsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/batchEndpointsGetSample.js +1 -1
- package/dist-esm/samples-dev/batchEndpointsListKeysSample.js +1 -1
- package/dist-esm/samples-dev/batchEndpointsListSample.js +1 -1
- package/dist-esm/samples-dev/batchEndpointsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/codeContainersCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/codeContainersDeleteSample.js +1 -1
- package/dist-esm/samples-dev/codeContainersGetSample.js +1 -1
- package/dist-esm/samples-dev/codeContainersListSample.js +1 -1
- package/dist-esm/samples-dev/codeVersionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/codeVersionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/codeVersionsGetSample.js +1 -1
- package/dist-esm/samples-dev/codeVersionsListSample.js +1 -1
- package/dist-esm/samples-dev/componentContainersCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/componentContainersDeleteSample.js +1 -1
- package/dist-esm/samples-dev/componentContainersGetSample.js +1 -1
- package/dist-esm/samples-dev/componentContainersListSample.js +1 -1
- package/dist-esm/samples-dev/componentVersionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/componentVersionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/componentVersionsGetSample.js +1 -1
- package/dist-esm/samples-dev/componentVersionsListSample.js +1 -1
- package/dist-esm/samples-dev/computeCreateOrUpdateSample.js +60 -8
- package/dist-esm/samples-dev/computeCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/computeDeleteSample.js +1 -1
- package/dist-esm/samples-dev/computeGetSample.js +4 -4
- package/dist-esm/samples-dev/computeListKeysSample.js +1 -1
- package/dist-esm/samples-dev/computeListNodesSample.js +1 -1
- package/dist-esm/samples-dev/computeListSample.js +1 -1
- package/dist-esm/samples-dev/computeRestartSample.js +1 -1
- package/dist-esm/samples-dev/computeStartSample.js +1 -1
- package/dist-esm/samples-dev/computeStopSample.js +1 -1
- package/dist-esm/samples-dev/computeUpdateSample.js +1 -1
- package/dist-esm/samples-dev/dataContainersCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/dataContainersDeleteSample.js +1 -1
- package/dist-esm/samples-dev/dataContainersGetSample.js +1 -1
- package/dist-esm/samples-dev/dataContainersListSample.js +1 -1
- package/dist-esm/samples-dev/dataVersionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/dataVersionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/dataVersionsGetSample.js +1 -1
- package/dist-esm/samples-dev/dataVersionsListSample.js +1 -1
- package/dist-esm/samples-dev/datastoresCreateOrUpdateSample.js +4 -4
- package/dist-esm/samples-dev/datastoresDeleteSample.js +1 -1
- package/dist-esm/samples-dev/datastoresGetSample.js +1 -1
- package/dist-esm/samples-dev/datastoresListSample.js +1 -1
- package/dist-esm/samples-dev/datastoresListSecretsSample.js +1 -1
- package/dist-esm/samples-dev/environmentContainersCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/environmentContainersDeleteSample.js +1 -1
- package/dist-esm/samples-dev/environmentContainersGetSample.js +1 -1
- package/dist-esm/samples-dev/environmentContainersListSample.js +1 -1
- package/dist-esm/samples-dev/environmentVersionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/environmentVersionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/environmentVersionsGetSample.js +1 -1
- package/dist-esm/samples-dev/environmentVersionsListSample.js +1 -1
- package/dist-esm/samples-dev/jobsCancelSample.js +1 -1
- package/dist-esm/samples-dev/jobsCreateOrUpdateSample.js +66 -3
- package/dist-esm/samples-dev/jobsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/jobsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/jobsGetSample.js +22 -3
- package/dist-esm/samples-dev/jobsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/jobsListSample.js +44 -12
- package/dist-esm/samples-dev/jobsListSample.js.map +1 -1
- package/dist-esm/samples-dev/modelContainersCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/modelContainersDeleteSample.js +1 -1
- package/dist-esm/samples-dev/modelContainersGetSample.js +1 -1
- package/dist-esm/samples-dev/modelContainersListSample.js +1 -1
- package/dist-esm/samples-dev/modelVersionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/modelVersionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/modelVersionsGetSample.js +1 -1
- package/dist-esm/samples-dev/modelVersionsListSample.js +1 -1
- package/dist-esm/samples-dev/onlineDeploymentsCreateOrUpdateSample.js +2 -2
- package/dist-esm/samples-dev/onlineDeploymentsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/onlineDeploymentsGetLogsSample.js +1 -1
- package/dist-esm/samples-dev/onlineDeploymentsGetSample.js +2 -2
- package/dist-esm/samples-dev/onlineDeploymentsListSample.js +1 -1
- package/dist-esm/samples-dev/onlineDeploymentsListSkusSample.js +2 -2
- package/dist-esm/samples-dev/onlineDeploymentsUpdateSample.js +2 -2
- package/dist-esm/samples-dev/onlineEndpointsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/onlineEndpointsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/onlineEndpointsGetSample.js +1 -1
- package/dist-esm/samples-dev/onlineEndpointsGetTokenSample.js +1 -1
- package/dist-esm/samples-dev/onlineEndpointsListKeysSample.js +1 -1
- package/dist-esm/samples-dev/onlineEndpointsListSample.js +1 -1
- package/dist-esm/samples-dev/onlineEndpointsRegenerateKeysSample.js +1 -1
- package/dist-esm/samples-dev/onlineEndpointsUpdateSample.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/privateEndpointConnectionsListSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesListSample.js +1 -1
- package/dist-esm/samples-dev/quotasListSample.js +1 -1
- package/dist-esm/samples-dev/quotasUpdateSample.js +1 -1
- package/dist-esm/samples-dev/schedulesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/schedulesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/schedulesCreateOrUpdateSample.js +54 -0
- package/dist-esm/samples-dev/schedulesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/schedulesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/schedulesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/schedulesDeleteSample.js +32 -0
- package/dist-esm/samples-dev/schedulesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/schedulesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/schedulesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/schedulesGetSample.js +32 -0
- package/dist-esm/samples-dev/schedulesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/schedulesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/schedulesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/schedulesListSample.js +45 -0
- package/dist-esm/samples-dev/schedulesListSample.js.map +1 -0
- package/dist-esm/samples-dev/usagesListSample.js +1 -1
- package/dist-esm/samples-dev/virtualMachineSizesListSample.js +1 -1
- package/dist-esm/samples-dev/workspaceConnectionsCreateSample.js +1 -1
- package/dist-esm/samples-dev/workspaceConnectionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/workspaceConnectionsGetSample.js +1 -1
- package/dist-esm/samples-dev/workspaceConnectionsListSample.js +1 -1
- package/dist-esm/samples-dev/workspaceFeaturesListSample.js +1 -1
- package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/workspacesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/workspacesDiagnoseSample.js +1 -1
- package/dist-esm/samples-dev/workspacesGetSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListKeysSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListNotebookAccessTokenSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListNotebookKeysSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListOutboundNetworkDependenciesEndpointsSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListStorageAccountKeysSample.js +1 -1
- package/dist-esm/samples-dev/workspacesPrepareNotebookSample.js +1 -1
- package/dist-esm/samples-dev/workspacesResyncKeysSample.js +1 -1
- package/dist-esm/samples-dev/workspacesUpdateSample.js +1 -1
- package/dist-esm/src/azureMachineLearningWorkspaces.d.ts +2 -1
- package/dist-esm/src/azureMachineLearningWorkspaces.d.ts.map +1 -1
- package/dist-esm/src/azureMachineLearningWorkspaces.js +4 -3
- package/dist-esm/src/azureMachineLearningWorkspaces.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +2177 -118
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +645 -42
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +107 -8
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +3218 -915
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +2 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +15 -2
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +1 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/schedules.d.ts +81 -0
- package/dist-esm/src/operations/schedules.d.ts.map +1 -0
- package/dist-esm/src/operations/schedules.js +343 -0
- package/dist-esm/src/operations/schedules.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +1 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/schedules.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/schedules.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/schedules.js +9 -0
- package/dist-esm/src/operationsInterfaces/schedules.js.map +1 -0
- package/package.json +3 -2
- package/review/arm-machinelearning.api.md +1033 -11
- package/src/azureMachineLearningWorkspaces.ts +6 -2
- package/src/models/index.ts +2662 -410
- package/src/models/mappers.ts +4026 -1470
- package/src/models/parameters.ts +18 -2
- package/src/operations/index.ts +1 -0
- package/src/operations/schedules.ts +476 -0
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/schedules.ts +109 -0
- package/types/arm-machinelearning.d.ts +2348 -80
- package/types/tsdoc-metadata.json +1 -1
package/src/models/parameters.ts
CHANGED
|
@@ -40,7 +40,8 @@ import {
|
|
|
40
40
|
RegenerateEndpointKeysRequest as RegenerateEndpointKeysRequestMapper,
|
|
41
41
|
PartialMinimalTrackedResourceWithSku as PartialMinimalTrackedResourceWithSkuMapper,
|
|
42
42
|
OnlineDeployment as OnlineDeploymentMapper,
|
|
43
|
-
DeploymentLogsRequest as DeploymentLogsRequestMapper
|
|
43
|
+
DeploymentLogsRequest as DeploymentLogsRequestMapper,
|
|
44
|
+
Schedule as ScheduleMapper
|
|
44
45
|
} from "../models/mappers";
|
|
45
46
|
|
|
46
47
|
export const accept: OperationParameter = {
|
|
@@ -70,7 +71,7 @@ export const $host: OperationURLParameter = {
|
|
|
70
71
|
export const apiVersion: OperationQueryParameter = {
|
|
71
72
|
parameterPath: "apiVersion",
|
|
72
73
|
mapper: {
|
|
73
|
-
defaultValue: "2022-
|
|
74
|
+
defaultValue: "2022-10-01",
|
|
74
75
|
isConstant: true,
|
|
75
76
|
serializedName: "api-version",
|
|
76
77
|
type: {
|
|
@@ -725,3 +726,18 @@ export const body20: OperationParameter = {
|
|
|
725
726
|
parameterPath: "body",
|
|
726
727
|
mapper: DeploymentLogsRequestMapper
|
|
727
728
|
};
|
|
729
|
+
|
|
730
|
+
export const listViewType1: OperationQueryParameter = {
|
|
731
|
+
parameterPath: ["options", "listViewType"],
|
|
732
|
+
mapper: {
|
|
733
|
+
serializedName: "listViewType",
|
|
734
|
+
type: {
|
|
735
|
+
name: "String"
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
export const body21: OperationParameter = {
|
|
741
|
+
parameterPath: "body",
|
|
742
|
+
mapper: ScheduleMapper
|
|
743
|
+
};
|
package/src/operations/index.ts
CHANGED
|
@@ -0,0 +1,476 @@
|
|
|
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 } from "@azure/core-paging";
|
|
10
|
+
import { Schedules } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { AzureMachineLearningWorkspaces } from "../azureMachineLearningWorkspaces";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
Schedule,
|
|
19
|
+
SchedulesListNextOptionalParams,
|
|
20
|
+
SchedulesListOptionalParams,
|
|
21
|
+
SchedulesListResponse,
|
|
22
|
+
SchedulesDeleteOptionalParams,
|
|
23
|
+
SchedulesGetOptionalParams,
|
|
24
|
+
SchedulesGetResponse,
|
|
25
|
+
SchedulesCreateOrUpdateOptionalParams,
|
|
26
|
+
SchedulesCreateOrUpdateResponse,
|
|
27
|
+
SchedulesListNextResponse
|
|
28
|
+
} from "../models";
|
|
29
|
+
|
|
30
|
+
/// <reference lib="esnext.asynciterable" />
|
|
31
|
+
/** Class containing Schedules operations. */
|
|
32
|
+
export class SchedulesImpl implements Schedules {
|
|
33
|
+
private readonly client: AzureMachineLearningWorkspaces;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initialize a new instance of the class Schedules class.
|
|
37
|
+
* @param client Reference to the service client
|
|
38
|
+
*/
|
|
39
|
+
constructor(client: AzureMachineLearningWorkspaces) {
|
|
40
|
+
this.client = client;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* List schedules in specified workspace.
|
|
45
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
46
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
47
|
+
* @param options The options parameters.
|
|
48
|
+
*/
|
|
49
|
+
public list(
|
|
50
|
+
resourceGroupName: string,
|
|
51
|
+
workspaceName: string,
|
|
52
|
+
options?: SchedulesListOptionalParams
|
|
53
|
+
): PagedAsyncIterableIterator<Schedule> {
|
|
54
|
+
const iter = this.listPagingAll(resourceGroupName, workspaceName, options);
|
|
55
|
+
return {
|
|
56
|
+
next() {
|
|
57
|
+
return iter.next();
|
|
58
|
+
},
|
|
59
|
+
[Symbol.asyncIterator]() {
|
|
60
|
+
return this;
|
|
61
|
+
},
|
|
62
|
+
byPage: () => {
|
|
63
|
+
return this.listPagingPage(resourceGroupName, workspaceName, options);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private async *listPagingPage(
|
|
69
|
+
resourceGroupName: string,
|
|
70
|
+
workspaceName: string,
|
|
71
|
+
options?: SchedulesListOptionalParams
|
|
72
|
+
): AsyncIterableIterator<Schedule[]> {
|
|
73
|
+
let result = await this._list(resourceGroupName, workspaceName, options);
|
|
74
|
+
yield result.value || [];
|
|
75
|
+
let continuationToken = result.nextLink;
|
|
76
|
+
while (continuationToken) {
|
|
77
|
+
result = await this._listNext(
|
|
78
|
+
resourceGroupName,
|
|
79
|
+
workspaceName,
|
|
80
|
+
continuationToken,
|
|
81
|
+
options
|
|
82
|
+
);
|
|
83
|
+
continuationToken = result.nextLink;
|
|
84
|
+
yield result.value || [];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private async *listPagingAll(
|
|
89
|
+
resourceGroupName: string,
|
|
90
|
+
workspaceName: string,
|
|
91
|
+
options?: SchedulesListOptionalParams
|
|
92
|
+
): AsyncIterableIterator<Schedule> {
|
|
93
|
+
for await (const page of this.listPagingPage(
|
|
94
|
+
resourceGroupName,
|
|
95
|
+
workspaceName,
|
|
96
|
+
options
|
|
97
|
+
)) {
|
|
98
|
+
yield* page;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* List schedules in specified workspace.
|
|
104
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
105
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
106
|
+
* @param options The options parameters.
|
|
107
|
+
*/
|
|
108
|
+
private _list(
|
|
109
|
+
resourceGroupName: string,
|
|
110
|
+
workspaceName: string,
|
|
111
|
+
options?: SchedulesListOptionalParams
|
|
112
|
+
): Promise<SchedulesListResponse> {
|
|
113
|
+
return this.client.sendOperationRequest(
|
|
114
|
+
{ resourceGroupName, workspaceName, options },
|
|
115
|
+
listOperationSpec
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Delete schedule.
|
|
121
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
122
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
123
|
+
* @param name Schedule name.
|
|
124
|
+
* @param options The options parameters.
|
|
125
|
+
*/
|
|
126
|
+
async beginDelete(
|
|
127
|
+
resourceGroupName: string,
|
|
128
|
+
workspaceName: string,
|
|
129
|
+
name: string,
|
|
130
|
+
options?: SchedulesDeleteOptionalParams
|
|
131
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
132
|
+
const directSendOperation = async (
|
|
133
|
+
args: coreClient.OperationArguments,
|
|
134
|
+
spec: coreClient.OperationSpec
|
|
135
|
+
): Promise<void> => {
|
|
136
|
+
return this.client.sendOperationRequest(args, spec);
|
|
137
|
+
};
|
|
138
|
+
const sendOperation = async (
|
|
139
|
+
args: coreClient.OperationArguments,
|
|
140
|
+
spec: coreClient.OperationSpec
|
|
141
|
+
) => {
|
|
142
|
+
let currentRawResponse:
|
|
143
|
+
| coreClient.FullOperationResponse
|
|
144
|
+
| undefined = undefined;
|
|
145
|
+
const providedCallback = args.options?.onResponse;
|
|
146
|
+
const callback: coreClient.RawResponseCallback = (
|
|
147
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
148
|
+
flatResponse: unknown
|
|
149
|
+
) => {
|
|
150
|
+
currentRawResponse = rawResponse;
|
|
151
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
152
|
+
};
|
|
153
|
+
const updatedArgs = {
|
|
154
|
+
...args,
|
|
155
|
+
options: {
|
|
156
|
+
...args.options,
|
|
157
|
+
onResponse: callback
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
161
|
+
return {
|
|
162
|
+
flatResponse,
|
|
163
|
+
rawResponse: {
|
|
164
|
+
statusCode: currentRawResponse!.status,
|
|
165
|
+
body: currentRawResponse!.parsedBody,
|
|
166
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const lro = new LroImpl(
|
|
172
|
+
sendOperation,
|
|
173
|
+
{ resourceGroupName, workspaceName, name, options },
|
|
174
|
+
deleteOperationSpec
|
|
175
|
+
);
|
|
176
|
+
const poller = new LroEngine(lro, {
|
|
177
|
+
resumeFrom: options?.resumeFrom,
|
|
178
|
+
intervalInMs: options?.updateIntervalInMs
|
|
179
|
+
});
|
|
180
|
+
await poller.poll();
|
|
181
|
+
return poller;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Delete schedule.
|
|
186
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
187
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
188
|
+
* @param name Schedule name.
|
|
189
|
+
* @param options The options parameters.
|
|
190
|
+
*/
|
|
191
|
+
async beginDeleteAndWait(
|
|
192
|
+
resourceGroupName: string,
|
|
193
|
+
workspaceName: string,
|
|
194
|
+
name: string,
|
|
195
|
+
options?: SchedulesDeleteOptionalParams
|
|
196
|
+
): Promise<void> {
|
|
197
|
+
const poller = await this.beginDelete(
|
|
198
|
+
resourceGroupName,
|
|
199
|
+
workspaceName,
|
|
200
|
+
name,
|
|
201
|
+
options
|
|
202
|
+
);
|
|
203
|
+
return poller.pollUntilDone();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Get schedule.
|
|
208
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
209
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
210
|
+
* @param name Schedule name.
|
|
211
|
+
* @param options The options parameters.
|
|
212
|
+
*/
|
|
213
|
+
get(
|
|
214
|
+
resourceGroupName: string,
|
|
215
|
+
workspaceName: string,
|
|
216
|
+
name: string,
|
|
217
|
+
options?: SchedulesGetOptionalParams
|
|
218
|
+
): Promise<SchedulesGetResponse> {
|
|
219
|
+
return this.client.sendOperationRequest(
|
|
220
|
+
{ resourceGroupName, workspaceName, name, options },
|
|
221
|
+
getOperationSpec
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Create or update schedule.
|
|
227
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
228
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
229
|
+
* @param name Schedule name.
|
|
230
|
+
* @param body Schedule definition.
|
|
231
|
+
* @param options The options parameters.
|
|
232
|
+
*/
|
|
233
|
+
async beginCreateOrUpdate(
|
|
234
|
+
resourceGroupName: string,
|
|
235
|
+
workspaceName: string,
|
|
236
|
+
name: string,
|
|
237
|
+
body: Schedule,
|
|
238
|
+
options?: SchedulesCreateOrUpdateOptionalParams
|
|
239
|
+
): Promise<
|
|
240
|
+
PollerLike<
|
|
241
|
+
PollOperationState<SchedulesCreateOrUpdateResponse>,
|
|
242
|
+
SchedulesCreateOrUpdateResponse
|
|
243
|
+
>
|
|
244
|
+
> {
|
|
245
|
+
const directSendOperation = async (
|
|
246
|
+
args: coreClient.OperationArguments,
|
|
247
|
+
spec: coreClient.OperationSpec
|
|
248
|
+
): Promise<SchedulesCreateOrUpdateResponse> => {
|
|
249
|
+
return this.client.sendOperationRequest(args, spec);
|
|
250
|
+
};
|
|
251
|
+
const sendOperation = async (
|
|
252
|
+
args: coreClient.OperationArguments,
|
|
253
|
+
spec: coreClient.OperationSpec
|
|
254
|
+
) => {
|
|
255
|
+
let currentRawResponse:
|
|
256
|
+
| coreClient.FullOperationResponse
|
|
257
|
+
| undefined = undefined;
|
|
258
|
+
const providedCallback = args.options?.onResponse;
|
|
259
|
+
const callback: coreClient.RawResponseCallback = (
|
|
260
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
261
|
+
flatResponse: unknown
|
|
262
|
+
) => {
|
|
263
|
+
currentRawResponse = rawResponse;
|
|
264
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
265
|
+
};
|
|
266
|
+
const updatedArgs = {
|
|
267
|
+
...args,
|
|
268
|
+
options: {
|
|
269
|
+
...args.options,
|
|
270
|
+
onResponse: callback
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
274
|
+
return {
|
|
275
|
+
flatResponse,
|
|
276
|
+
rawResponse: {
|
|
277
|
+
statusCode: currentRawResponse!.status,
|
|
278
|
+
body: currentRawResponse!.parsedBody,
|
|
279
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const lro = new LroImpl(
|
|
285
|
+
sendOperation,
|
|
286
|
+
{ resourceGroupName, workspaceName, name, body, options },
|
|
287
|
+
createOrUpdateOperationSpec
|
|
288
|
+
);
|
|
289
|
+
const poller = new LroEngine(lro, {
|
|
290
|
+
resumeFrom: options?.resumeFrom,
|
|
291
|
+
intervalInMs: options?.updateIntervalInMs
|
|
292
|
+
});
|
|
293
|
+
await poller.poll();
|
|
294
|
+
return poller;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Create or update schedule.
|
|
299
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
300
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
301
|
+
* @param name Schedule name.
|
|
302
|
+
* @param body Schedule definition.
|
|
303
|
+
* @param options The options parameters.
|
|
304
|
+
*/
|
|
305
|
+
async beginCreateOrUpdateAndWait(
|
|
306
|
+
resourceGroupName: string,
|
|
307
|
+
workspaceName: string,
|
|
308
|
+
name: string,
|
|
309
|
+
body: Schedule,
|
|
310
|
+
options?: SchedulesCreateOrUpdateOptionalParams
|
|
311
|
+
): Promise<SchedulesCreateOrUpdateResponse> {
|
|
312
|
+
const poller = await this.beginCreateOrUpdate(
|
|
313
|
+
resourceGroupName,
|
|
314
|
+
workspaceName,
|
|
315
|
+
name,
|
|
316
|
+
body,
|
|
317
|
+
options
|
|
318
|
+
);
|
|
319
|
+
return poller.pollUntilDone();
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* ListNext
|
|
324
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
325
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
326
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
327
|
+
* @param options The options parameters.
|
|
328
|
+
*/
|
|
329
|
+
private _listNext(
|
|
330
|
+
resourceGroupName: string,
|
|
331
|
+
workspaceName: string,
|
|
332
|
+
nextLink: string,
|
|
333
|
+
options?: SchedulesListNextOptionalParams
|
|
334
|
+
): Promise<SchedulesListNextResponse> {
|
|
335
|
+
return this.client.sendOperationRequest(
|
|
336
|
+
{ resourceGroupName, workspaceName, nextLink, options },
|
|
337
|
+
listNextOperationSpec
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
// Operation Specifications
|
|
342
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
343
|
+
|
|
344
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
345
|
+
path:
|
|
346
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules",
|
|
347
|
+
httpMethod: "GET",
|
|
348
|
+
responses: {
|
|
349
|
+
200: {
|
|
350
|
+
bodyMapper: Mappers.ScheduleResourceArmPaginatedResult
|
|
351
|
+
},
|
|
352
|
+
default: {
|
|
353
|
+
bodyMapper: Mappers.ErrorResponse
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
queryParameters: [
|
|
357
|
+
Parameters.apiVersion,
|
|
358
|
+
Parameters.skip,
|
|
359
|
+
Parameters.listViewType1
|
|
360
|
+
],
|
|
361
|
+
urlParameters: [
|
|
362
|
+
Parameters.$host,
|
|
363
|
+
Parameters.subscriptionId,
|
|
364
|
+
Parameters.resourceGroupName,
|
|
365
|
+
Parameters.workspaceName
|
|
366
|
+
],
|
|
367
|
+
headerParameters: [Parameters.accept],
|
|
368
|
+
serializer
|
|
369
|
+
};
|
|
370
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
371
|
+
path:
|
|
372
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}",
|
|
373
|
+
httpMethod: "DELETE",
|
|
374
|
+
responses: {
|
|
375
|
+
200: {},
|
|
376
|
+
201: {},
|
|
377
|
+
202: {},
|
|
378
|
+
204: {},
|
|
379
|
+
default: {
|
|
380
|
+
bodyMapper: Mappers.ErrorResponse
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
queryParameters: [Parameters.apiVersion],
|
|
384
|
+
urlParameters: [
|
|
385
|
+
Parameters.$host,
|
|
386
|
+
Parameters.subscriptionId,
|
|
387
|
+
Parameters.resourceGroupName,
|
|
388
|
+
Parameters.workspaceName,
|
|
389
|
+
Parameters.name
|
|
390
|
+
],
|
|
391
|
+
headerParameters: [Parameters.accept],
|
|
392
|
+
serializer
|
|
393
|
+
};
|
|
394
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
395
|
+
path:
|
|
396
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}",
|
|
397
|
+
httpMethod: "GET",
|
|
398
|
+
responses: {
|
|
399
|
+
200: {
|
|
400
|
+
bodyMapper: Mappers.Schedule
|
|
401
|
+
},
|
|
402
|
+
default: {
|
|
403
|
+
bodyMapper: Mappers.ErrorResponse
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
queryParameters: [Parameters.apiVersion],
|
|
407
|
+
urlParameters: [
|
|
408
|
+
Parameters.$host,
|
|
409
|
+
Parameters.subscriptionId,
|
|
410
|
+
Parameters.resourceGroupName,
|
|
411
|
+
Parameters.workspaceName,
|
|
412
|
+
Parameters.name
|
|
413
|
+
],
|
|
414
|
+
headerParameters: [Parameters.accept],
|
|
415
|
+
serializer
|
|
416
|
+
};
|
|
417
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
418
|
+
path:
|
|
419
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}",
|
|
420
|
+
httpMethod: "PUT",
|
|
421
|
+
responses: {
|
|
422
|
+
200: {
|
|
423
|
+
bodyMapper: Mappers.Schedule
|
|
424
|
+
},
|
|
425
|
+
201: {
|
|
426
|
+
bodyMapper: Mappers.Schedule
|
|
427
|
+
},
|
|
428
|
+
202: {
|
|
429
|
+
bodyMapper: Mappers.Schedule
|
|
430
|
+
},
|
|
431
|
+
204: {
|
|
432
|
+
bodyMapper: Mappers.Schedule
|
|
433
|
+
},
|
|
434
|
+
default: {
|
|
435
|
+
bodyMapper: Mappers.ErrorResponse
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
requestBody: Parameters.body21,
|
|
439
|
+
queryParameters: [Parameters.apiVersion],
|
|
440
|
+
urlParameters: [
|
|
441
|
+
Parameters.$host,
|
|
442
|
+
Parameters.subscriptionId,
|
|
443
|
+
Parameters.resourceGroupName,
|
|
444
|
+
Parameters.workspaceName,
|
|
445
|
+
Parameters.name1
|
|
446
|
+
],
|
|
447
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
448
|
+
mediaType: "json",
|
|
449
|
+
serializer
|
|
450
|
+
};
|
|
451
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
452
|
+
path: "{nextLink}",
|
|
453
|
+
httpMethod: "GET",
|
|
454
|
+
responses: {
|
|
455
|
+
200: {
|
|
456
|
+
bodyMapper: Mappers.ScheduleResourceArmPaginatedResult
|
|
457
|
+
},
|
|
458
|
+
default: {
|
|
459
|
+
bodyMapper: Mappers.ErrorResponse
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
queryParameters: [
|
|
463
|
+
Parameters.apiVersion,
|
|
464
|
+
Parameters.skip,
|
|
465
|
+
Parameters.listViewType1
|
|
466
|
+
],
|
|
467
|
+
urlParameters: [
|
|
468
|
+
Parameters.$host,
|
|
469
|
+
Parameters.subscriptionId,
|
|
470
|
+
Parameters.resourceGroupName,
|
|
471
|
+
Parameters.workspaceName,
|
|
472
|
+
Parameters.nextLink
|
|
473
|
+
],
|
|
474
|
+
headerParameters: [Parameters.accept],
|
|
475
|
+
serializer
|
|
476
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
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 } from "@azure/core-paging";
|
|
10
|
+
import { PollerLike, PollOperationState } from "@azure/core-lro";
|
|
11
|
+
import {
|
|
12
|
+
Schedule,
|
|
13
|
+
SchedulesListOptionalParams,
|
|
14
|
+
SchedulesDeleteOptionalParams,
|
|
15
|
+
SchedulesGetOptionalParams,
|
|
16
|
+
SchedulesGetResponse,
|
|
17
|
+
SchedulesCreateOrUpdateOptionalParams,
|
|
18
|
+
SchedulesCreateOrUpdateResponse
|
|
19
|
+
} from "../models";
|
|
20
|
+
|
|
21
|
+
/// <reference lib="esnext.asynciterable" />
|
|
22
|
+
/** Interface representing a Schedules. */
|
|
23
|
+
export interface Schedules {
|
|
24
|
+
/**
|
|
25
|
+
* List schedules in specified workspace.
|
|
26
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
27
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
28
|
+
* @param options The options parameters.
|
|
29
|
+
*/
|
|
30
|
+
list(
|
|
31
|
+
resourceGroupName: string,
|
|
32
|
+
workspaceName: string,
|
|
33
|
+
options?: SchedulesListOptionalParams
|
|
34
|
+
): PagedAsyncIterableIterator<Schedule>;
|
|
35
|
+
/**
|
|
36
|
+
* Delete schedule.
|
|
37
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
38
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
39
|
+
* @param name Schedule name.
|
|
40
|
+
* @param options The options parameters.
|
|
41
|
+
*/
|
|
42
|
+
beginDelete(
|
|
43
|
+
resourceGroupName: string,
|
|
44
|
+
workspaceName: string,
|
|
45
|
+
name: string,
|
|
46
|
+
options?: SchedulesDeleteOptionalParams
|
|
47
|
+
): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
48
|
+
/**
|
|
49
|
+
* Delete schedule.
|
|
50
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
51
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
52
|
+
* @param name Schedule name.
|
|
53
|
+
* @param options The options parameters.
|
|
54
|
+
*/
|
|
55
|
+
beginDeleteAndWait(
|
|
56
|
+
resourceGroupName: string,
|
|
57
|
+
workspaceName: string,
|
|
58
|
+
name: string,
|
|
59
|
+
options?: SchedulesDeleteOptionalParams
|
|
60
|
+
): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Get schedule.
|
|
63
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
64
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
65
|
+
* @param name Schedule name.
|
|
66
|
+
* @param options The options parameters.
|
|
67
|
+
*/
|
|
68
|
+
get(
|
|
69
|
+
resourceGroupName: string,
|
|
70
|
+
workspaceName: string,
|
|
71
|
+
name: string,
|
|
72
|
+
options?: SchedulesGetOptionalParams
|
|
73
|
+
): Promise<SchedulesGetResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* Create or update schedule.
|
|
76
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
77
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
78
|
+
* @param name Schedule name.
|
|
79
|
+
* @param body Schedule definition.
|
|
80
|
+
* @param options The options parameters.
|
|
81
|
+
*/
|
|
82
|
+
beginCreateOrUpdate(
|
|
83
|
+
resourceGroupName: string,
|
|
84
|
+
workspaceName: string,
|
|
85
|
+
name: string,
|
|
86
|
+
body: Schedule,
|
|
87
|
+
options?: SchedulesCreateOrUpdateOptionalParams
|
|
88
|
+
): Promise<
|
|
89
|
+
PollerLike<
|
|
90
|
+
PollOperationState<SchedulesCreateOrUpdateResponse>,
|
|
91
|
+
SchedulesCreateOrUpdateResponse
|
|
92
|
+
>
|
|
93
|
+
>;
|
|
94
|
+
/**
|
|
95
|
+
* Create or update schedule.
|
|
96
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
97
|
+
* @param workspaceName Name of Azure Machine Learning workspace.
|
|
98
|
+
* @param name Schedule name.
|
|
99
|
+
* @param body Schedule definition.
|
|
100
|
+
* @param options The options parameters.
|
|
101
|
+
*/
|
|
102
|
+
beginCreateOrUpdateAndWait(
|
|
103
|
+
resourceGroupName: string,
|
|
104
|
+
workspaceName: string,
|
|
105
|
+
name: string,
|
|
106
|
+
body: Schedule,
|
|
107
|
+
options?: SchedulesCreateOrUpdateOptionalParams
|
|
108
|
+
): Promise<SchedulesCreateOrUpdateResponse>;
|
|
109
|
+
}
|