@azure/synapse-artifacts 1.0.0-beta.1 → 1.0.0-beta.10
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 +60 -0
- package/README.md +6 -4
- package/dist/index.js +22546 -19192
- package/dist/index.js.map +1 -1
- package/dist-esm/src/artifactsClient.js +72 -0
- package/dist-esm/src/artifactsClient.js.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.js +25 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.js +822 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.js +22801 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.js +541 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/bigDataPools.js +100 -0
- package/dist-esm/src/operations/bigDataPools.js.map +1 -0
- package/dist-esm/src/operations/dataFlowDebugSession.js +403 -0
- package/dist-esm/src/operations/dataFlowDebugSession.js.map +1 -0
- package/dist-esm/src/operations/dataFlowOperations.js +439 -0
- package/dist-esm/src/operations/dataFlowOperations.js.map +1 -0
- package/dist-esm/src/operations/datasetOperations.js +439 -0
- package/dist-esm/src/operations/datasetOperations.js.map +1 -0
- package/dist-esm/src/operations/index.js +31 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/integrationRuntimes.js +100 -0
- package/dist-esm/src/operations/integrationRuntimes.js.map +1 -0
- package/dist-esm/src/operations/kqlScriptOperations.js +309 -0
- package/dist-esm/src/operations/kqlScriptOperations.js.map +1 -0
- package/dist-esm/src/operations/kqlScripts.js +150 -0
- package/dist-esm/src/operations/kqlScripts.js.map +1 -0
- package/dist-esm/src/operations/library.js +512 -0
- package/dist-esm/src/operations/library.js.map +1 -0
- package/dist-esm/src/operations/linkConnectionOperations.js +534 -0
- package/dist-esm/src/operations/linkConnectionOperations.js.map +1 -0
- package/dist-esm/src/operations/linkedServiceOperations.js +440 -0
- package/dist-esm/src/operations/linkedServiceOperations.js.map +1 -0
- package/dist-esm/src/operations/metastore.js +182 -0
- package/dist-esm/src/operations/metastore.js.map +1 -0
- package/dist-esm/src/operations/notebookOperationResult.js +64 -0
- package/dist-esm/src/operations/notebookOperationResult.js.map +1 -0
- package/dist-esm/src/operations/notebookOperations.js +564 -0
- package/dist-esm/src/operations/notebookOperations.js.map +1 -0
- package/dist-esm/src/operations/pipelineOperations.js +485 -0
- package/dist-esm/src/operations/pipelineOperations.js.map +1 -0
- package/dist-esm/src/operations/pipelineRunOperations.js +185 -0
- package/dist-esm/src/operations/pipelineRunOperations.js.map +1 -0
- package/dist-esm/src/operations/sparkConfigurationOperations.js +440 -0
- package/dist-esm/src/operations/sparkConfigurationOperations.js.map +1 -0
- package/dist-esm/src/operations/sparkJobDefinitionOperations.js +612 -0
- package/dist-esm/src/operations/sparkJobDefinitionOperations.js.map +1 -0
- package/dist-esm/src/operations/sqlPools.js +100 -0
- package/dist-esm/src/operations/sqlPools.js.map +1 -0
- package/dist-esm/src/operations/sqlScriptOperations.js +440 -0
- package/dist-esm/src/operations/sqlScriptOperations.js.map +1 -0
- package/dist-esm/src/operations/triggerOperations.js +717 -0
- package/dist-esm/src/operations/triggerOperations.js.map +1 -0
- package/dist-esm/src/operations/triggerRunOperations.js +147 -0
- package/dist-esm/src/operations/triggerRunOperations.js.map +1 -0
- package/dist-esm/src/operations/workspaceGitRepoManagement.js +66 -0
- package/dist-esm/src/operations/workspaceGitRepoManagement.js.map +1 -0
- package/dist-esm/src/operations/workspaceOperations.js +62 -0
- package/dist-esm/src/operations/workspaceOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/bigDataPools.js +9 -0
- package/dist-esm/src/operationsInterfaces/bigDataPools.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataFlowDebugSession.js +9 -0
- package/dist-esm/src/operationsInterfaces/dataFlowDebugSession.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataFlowOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/dataFlowOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/datasetOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/datasetOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +31 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/integrationRuntimes.js +9 -0
- package/dist-esm/src/operationsInterfaces/integrationRuntimes.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/kqlScriptOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/kqlScriptOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/kqlScripts.js +9 -0
- package/dist-esm/src/operationsInterfaces/kqlScripts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/library.js +9 -0
- package/dist-esm/src/operationsInterfaces/library.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkConnectionOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/linkConnectionOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkedServiceOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/linkedServiceOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/metastore.js +9 -0
- package/dist-esm/src/operationsInterfaces/metastore.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/notebookOperationResult.js +9 -0
- package/dist-esm/src/operationsInterfaces/notebookOperationResult.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/notebookOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/notebookOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/pipelineOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/pipelineOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/pipelineRunOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/pipelineRunOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sparkConfigurationOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/sparkConfigurationOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sparkJobDefinitionOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/sparkJobDefinitionOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sqlPools.js +9 -0
- package/dist-esm/src/operationsInterfaces/sqlPools.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sqlScriptOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/sqlScriptOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/triggerOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/triggerOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/triggerRunOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/triggerRunOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaceGitRepoManagement.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaceGitRepoManagement.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaceOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaceOperations.js.map +1 -0
- package/dist-esm/src/tracing.js +13 -0
- package/dist-esm/src/tracing.js.map +1 -0
- package/package.json +82 -34
- package/types/synapse-artifacts.d.ts +6680 -11132
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/rollup.config.js +0 -41
- package/tsconfig.json +0 -20
|
@@ -0,0 +1,185 @@
|
|
|
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
|
+
import { createSpan } from "../tracing";
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreTracing from "@azure/core-tracing";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
/** Class containing PipelineRunOperations operations. */
|
|
14
|
+
export class PipelineRunOperationsImpl {
|
|
15
|
+
/**
|
|
16
|
+
* Initialize a new instance of the class PipelineRunOperations class.
|
|
17
|
+
* @param client Reference to the service client
|
|
18
|
+
*/
|
|
19
|
+
constructor(client) {
|
|
20
|
+
this.client = client;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Query pipeline runs in the workspace based on input filter conditions.
|
|
24
|
+
* @param filterParameters Parameters to filter the pipeline run.
|
|
25
|
+
* @param options The options parameters.
|
|
26
|
+
*/
|
|
27
|
+
async queryPipelineRunsByWorkspace(filterParameters, options) {
|
|
28
|
+
const { span } = createSpan("ArtifactsClient-queryPipelineRunsByWorkspace", options || {});
|
|
29
|
+
try {
|
|
30
|
+
const result = await this.client.sendOperationRequest({ filterParameters, options }, queryPipelineRunsByWorkspaceOperationSpec);
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
span.setStatus({
|
|
35
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
36
|
+
message: error.message
|
|
37
|
+
});
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
finally {
|
|
41
|
+
span.end();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get a pipeline run by its run ID.
|
|
46
|
+
* @param runId The pipeline run identifier.
|
|
47
|
+
* @param options The options parameters.
|
|
48
|
+
*/
|
|
49
|
+
async getPipelineRun(runId, options) {
|
|
50
|
+
const { span } = createSpan("ArtifactsClient-getPipelineRun", options || {});
|
|
51
|
+
try {
|
|
52
|
+
const result = await this.client.sendOperationRequest({ runId, options }, getPipelineRunOperationSpec);
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
span.setStatus({
|
|
57
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
58
|
+
message: error.message
|
|
59
|
+
});
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
span.end();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Query activity runs based on input filter conditions.
|
|
68
|
+
* @param pipelineName The pipeline name.
|
|
69
|
+
* @param runId The pipeline run identifier.
|
|
70
|
+
* @param filterParameters Parameters to filter the activity runs.
|
|
71
|
+
* @param options The options parameters.
|
|
72
|
+
*/
|
|
73
|
+
async queryActivityRuns(pipelineName, runId, filterParameters, options) {
|
|
74
|
+
const { span } = createSpan("ArtifactsClient-queryActivityRuns", options || {});
|
|
75
|
+
try {
|
|
76
|
+
const result = await this.client.sendOperationRequest({ pipelineName, runId, filterParameters, options }, queryActivityRunsOperationSpec);
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
span.setStatus({
|
|
81
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
82
|
+
message: error.message
|
|
83
|
+
});
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
span.end();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Cancel a pipeline run by its run ID.
|
|
92
|
+
* @param runId The pipeline run identifier.
|
|
93
|
+
* @param options The options parameters.
|
|
94
|
+
*/
|
|
95
|
+
async cancelPipelineRun(runId, options) {
|
|
96
|
+
const { span } = createSpan("ArtifactsClient-cancelPipelineRun", options || {});
|
|
97
|
+
try {
|
|
98
|
+
const result = await this.client.sendOperationRequest({ runId, options }, cancelPipelineRunOperationSpec);
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
span.setStatus({
|
|
103
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
104
|
+
message: error.message
|
|
105
|
+
});
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
finally {
|
|
109
|
+
span.end();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// Operation Specifications
|
|
114
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
115
|
+
const queryPipelineRunsByWorkspaceOperationSpec = {
|
|
116
|
+
path: "/queryPipelineRuns",
|
|
117
|
+
httpMethod: "POST",
|
|
118
|
+
responses: {
|
|
119
|
+
200: {
|
|
120
|
+
bodyMapper: Mappers.PipelineRunsQueryResponse
|
|
121
|
+
},
|
|
122
|
+
default: {
|
|
123
|
+
bodyMapper: Mappers.CloudError
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
requestBody: Parameters.filterParameters,
|
|
127
|
+
queryParameters: [Parameters.apiVersion4],
|
|
128
|
+
urlParameters: [Parameters.endpoint],
|
|
129
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
130
|
+
mediaType: "json",
|
|
131
|
+
serializer
|
|
132
|
+
};
|
|
133
|
+
const getPipelineRunOperationSpec = {
|
|
134
|
+
path: "/pipelineruns/{runId}",
|
|
135
|
+
httpMethod: "GET",
|
|
136
|
+
responses: {
|
|
137
|
+
200: {
|
|
138
|
+
bodyMapper: Mappers.PipelineRun
|
|
139
|
+
},
|
|
140
|
+
default: {
|
|
141
|
+
bodyMapper: Mappers.CloudError
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
queryParameters: [Parameters.apiVersion4],
|
|
145
|
+
urlParameters: [Parameters.endpoint, Parameters.runId],
|
|
146
|
+
headerParameters: [Parameters.accept],
|
|
147
|
+
serializer
|
|
148
|
+
};
|
|
149
|
+
const queryActivityRunsOperationSpec = {
|
|
150
|
+
path: "/pipelines/{pipelineName}/pipelineruns/{runId}/queryActivityruns",
|
|
151
|
+
httpMethod: "POST",
|
|
152
|
+
responses: {
|
|
153
|
+
200: {
|
|
154
|
+
bodyMapper: Mappers.ActivityRunsQueryResponse
|
|
155
|
+
},
|
|
156
|
+
default: {
|
|
157
|
+
bodyMapper: Mappers.CloudError
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
requestBody: Parameters.filterParameters,
|
|
161
|
+
queryParameters: [Parameters.apiVersion4],
|
|
162
|
+
urlParameters: [
|
|
163
|
+
Parameters.endpoint,
|
|
164
|
+
Parameters.pipelineName,
|
|
165
|
+
Parameters.runId
|
|
166
|
+
],
|
|
167
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
168
|
+
mediaType: "json",
|
|
169
|
+
serializer
|
|
170
|
+
};
|
|
171
|
+
const cancelPipelineRunOperationSpec = {
|
|
172
|
+
path: "/pipelineruns/{runId}/cancel",
|
|
173
|
+
httpMethod: "POST",
|
|
174
|
+
responses: {
|
|
175
|
+
200: {},
|
|
176
|
+
default: {
|
|
177
|
+
bodyMapper: Mappers.CloudError
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
queryParameters: [Parameters.apiVersion4, Parameters.isRecursive],
|
|
181
|
+
urlParameters: [Parameters.endpoint, Parameters.runId],
|
|
182
|
+
headerParameters: [Parameters.accept],
|
|
183
|
+
serializer
|
|
184
|
+
};
|
|
185
|
+
//# sourceMappingURL=pipelineRunOperations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipelineRunOperations.js","sourceRoot":"","sources":["../../../src/operations/pipelineRunOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAanD,yDAAyD;AACzD,MAAM,OAAO,yBAAyB;IAGpC;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CA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AAC,YAAY;QACvB,UAAU,CAAC,KAAK;KACjB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,8BAA8B,GAA6B;IAC/D,IAAI,EAAE,8BAA8B;IACpC,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC;IACjE,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,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 { createSpan } from \"../tracing\";\nimport { PipelineRunOperations } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreTracing from \"@azure/core-tracing\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport {\n RunFilterParameters,\n PipelineRunQueryPipelineRunsByWorkspaceOptionalParams,\n PipelineRunQueryPipelineRunsByWorkspaceResponse,\n PipelineRunGetPipelineRunOptionalParams,\n PipelineRunGetPipelineRunResponse,\n PipelineRunQueryActivityRunsOptionalParams,\n PipelineRunQueryActivityRunsResponse,\n PipelineRunCancelPipelineRunOptionalParams\n} from \"../models\";\n\n/** Class containing PipelineRunOperations operations. */\nexport class PipelineRunOperationsImpl implements PipelineRunOperations {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class PipelineRunOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Query pipeline runs in the workspace based on input filter conditions.\n * @param filterParameters Parameters to filter the pipeline run.\n * @param options The options parameters.\n */\n async queryPipelineRunsByWorkspace(\n filterParameters: RunFilterParameters,\n options?: PipelineRunQueryPipelineRunsByWorkspaceOptionalParams\n ): Promise<PipelineRunQueryPipelineRunsByWorkspaceResponse> {\n const { span } = createSpan(\n \"ArtifactsClient-queryPipelineRunsByWorkspace\",\n options || {}\n );\n try {\n const result = await this.client.sendOperationRequest(\n { filterParameters, options },\n queryPipelineRunsByWorkspaceOperationSpec\n );\n return result as PipelineRunQueryPipelineRunsByWorkspaceResponse;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n\n /**\n * Get a pipeline run by its run ID.\n * @param runId The pipeline run identifier.\n * @param options The options parameters.\n */\n async getPipelineRun(\n runId: string,\n options?: PipelineRunGetPipelineRunOptionalParams\n ): Promise<PipelineRunGetPipelineRunResponse> {\n const { span } = createSpan(\n \"ArtifactsClient-getPipelineRun\",\n options || {}\n );\n try {\n const result = await this.client.sendOperationRequest(\n { runId, options },\n getPipelineRunOperationSpec\n );\n return result as PipelineRunGetPipelineRunResponse;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n\n /**\n * Query activity runs based on input filter conditions.\n * @param pipelineName The pipeline name.\n * @param runId The pipeline run identifier.\n * @param filterParameters Parameters to filter the activity runs.\n * @param options The options parameters.\n */\n async queryActivityRuns(\n pipelineName: string,\n runId: string,\n filterParameters: RunFilterParameters,\n options?: PipelineRunQueryActivityRunsOptionalParams\n ): Promise<PipelineRunQueryActivityRunsResponse> {\n const { span } = createSpan(\n \"ArtifactsClient-queryActivityRuns\",\n options || {}\n );\n try {\n const result = await this.client.sendOperationRequest(\n { pipelineName, runId, filterParameters, options },\n queryActivityRunsOperationSpec\n );\n return result as PipelineRunQueryActivityRunsResponse;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n\n /**\n * Cancel a pipeline run by its run ID.\n * @param runId The pipeline run identifier.\n * @param options The options parameters.\n */\n async cancelPipelineRun(\n runId: string,\n options?: PipelineRunCancelPipelineRunOptionalParams\n ): Promise<void> {\n const { span } = createSpan(\n \"ArtifactsClient-cancelPipelineRun\",\n options || {}\n );\n try {\n const result = await this.client.sendOperationRequest(\n { runId, options },\n cancelPipelineRunOperationSpec\n );\n return result as void;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst queryPipelineRunsByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path: \"/queryPipelineRuns\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PipelineRunsQueryResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.filterParameters,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getPipelineRunOperationSpec: coreClient.OperationSpec = {\n path: \"/pipelineruns/{runId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PipelineRun\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.endpoint, Parameters.runId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst queryActivityRunsOperationSpec: coreClient.OperationSpec = {\n path: \"/pipelines/{pipelineName}/pipelineruns/{runId}/queryActivityruns\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActivityRunsQueryResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.filterParameters,\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [\n Parameters.endpoint,\n Parameters.pipelineName,\n Parameters.runId\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst cancelPipelineRunOperationSpec: coreClient.OperationSpec = {\n path: \"/pipelineruns/{runId}/cancel\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion4, Parameters.isRecursive],\n urlParameters: [Parameters.endpoint, Parameters.runId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -0,0 +1,440 @@
|
|
|
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
|
+
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
|
+
import { createSpan } from "../tracing";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as coreTracing from "@azure/core-tracing";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { LroEngine } from "@azure/core-lro";
|
|
15
|
+
import { LroImpl } from "../lroImpl";
|
|
16
|
+
/// <reference lib="esnext.asynciterable" />
|
|
17
|
+
/** Class containing SparkConfigurationOperations operations. */
|
|
18
|
+
export class SparkConfigurationOperationsImpl {
|
|
19
|
+
/**
|
|
20
|
+
* Initialize a new instance of the class SparkConfigurationOperations class.
|
|
21
|
+
* @param client Reference to the service client
|
|
22
|
+
*/
|
|
23
|
+
constructor(client) {
|
|
24
|
+
this.client = client;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Lists sparkconfigurations.
|
|
28
|
+
* @param options The options parameters.
|
|
29
|
+
*/
|
|
30
|
+
listSparkConfigurationsByWorkspace(options) {
|
|
31
|
+
const iter = this.getSparkConfigurationsByWorkspacePagingAll(options);
|
|
32
|
+
return {
|
|
33
|
+
next() {
|
|
34
|
+
return iter.next();
|
|
35
|
+
},
|
|
36
|
+
[Symbol.asyncIterator]() {
|
|
37
|
+
return this;
|
|
38
|
+
},
|
|
39
|
+
byPage: () => {
|
|
40
|
+
return this.getSparkConfigurationsByWorkspacePagingPage(options);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
getSparkConfigurationsByWorkspacePagingPage(options) {
|
|
45
|
+
return __asyncGenerator(this, arguments, function* getSparkConfigurationsByWorkspacePagingPage_1() {
|
|
46
|
+
let result = yield __await(this._getSparkConfigurationsByWorkspace(options));
|
|
47
|
+
yield yield __await(result.value || []);
|
|
48
|
+
let continuationToken = result.nextLink;
|
|
49
|
+
while (continuationToken) {
|
|
50
|
+
result = yield __await(this._getSparkConfigurationsByWorkspaceNext(continuationToken, options));
|
|
51
|
+
continuationToken = result.nextLink;
|
|
52
|
+
yield yield __await(result.value || []);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
getSparkConfigurationsByWorkspacePagingAll(options) {
|
|
57
|
+
return __asyncGenerator(this, arguments, function* getSparkConfigurationsByWorkspacePagingAll_1() {
|
|
58
|
+
var e_1, _a;
|
|
59
|
+
try {
|
|
60
|
+
for (var _b = __asyncValues(this.getSparkConfigurationsByWorkspacePagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
61
|
+
const page = _c.value;
|
|
62
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
66
|
+
finally {
|
|
67
|
+
try {
|
|
68
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
69
|
+
}
|
|
70
|
+
finally { if (e_1) throw e_1.error; }
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Lists sparkconfigurations.
|
|
76
|
+
* @param options The options parameters.
|
|
77
|
+
*/
|
|
78
|
+
async _getSparkConfigurationsByWorkspace(options) {
|
|
79
|
+
const { span } = createSpan("ArtifactsClient-_getSparkConfigurationsByWorkspace", options || {});
|
|
80
|
+
try {
|
|
81
|
+
const result = await this.client.sendOperationRequest({ options }, getSparkConfigurationsByWorkspaceOperationSpec);
|
|
82
|
+
return result;
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
span.setStatus({
|
|
86
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
87
|
+
message: error.message
|
|
88
|
+
});
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
finally {
|
|
92
|
+
span.end();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Creates or updates a sparkconfiguration.
|
|
97
|
+
* @param sparkConfigurationName The spark Configuration name.
|
|
98
|
+
* @param sparkConfiguration SparkConfiguration resource definition.
|
|
99
|
+
* @param options The options parameters.
|
|
100
|
+
*/
|
|
101
|
+
async beginCreateOrUpdateSparkConfiguration(sparkConfigurationName, sparkConfiguration, options) {
|
|
102
|
+
const { span } = createSpan("ArtifactsClient-beginCreateOrUpdateSparkConfiguration", options || {});
|
|
103
|
+
const directSendOperation = async (args, spec) => {
|
|
104
|
+
try {
|
|
105
|
+
const result = await this.client.sendOperationRequest(args, spec);
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
span.setStatus({
|
|
110
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
111
|
+
message: error.message
|
|
112
|
+
});
|
|
113
|
+
throw error;
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
span.end();
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
const sendOperation = async (args, spec) => {
|
|
120
|
+
var _a;
|
|
121
|
+
let currentRawResponse = undefined;
|
|
122
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
123
|
+
const callback = (rawResponse, flatResponse) => {
|
|
124
|
+
currentRawResponse = rawResponse;
|
|
125
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
126
|
+
};
|
|
127
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
128
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
129
|
+
return {
|
|
130
|
+
flatResponse,
|
|
131
|
+
rawResponse: {
|
|
132
|
+
statusCode: currentRawResponse.status,
|
|
133
|
+
body: currentRawResponse.parsedBody,
|
|
134
|
+
headers: currentRawResponse.headers.toJSON()
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
const lro = new LroImpl(sendOperation, { sparkConfigurationName, sparkConfiguration, options }, createOrUpdateSparkConfigurationOperationSpec);
|
|
139
|
+
const poller = new LroEngine(lro, {
|
|
140
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
141
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
142
|
+
});
|
|
143
|
+
await poller.poll();
|
|
144
|
+
return poller;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Creates or updates a sparkconfiguration.
|
|
148
|
+
* @param sparkConfigurationName The spark Configuration name.
|
|
149
|
+
* @param sparkConfiguration SparkConfiguration resource definition.
|
|
150
|
+
* @param options The options parameters.
|
|
151
|
+
*/
|
|
152
|
+
async beginCreateOrUpdateSparkConfigurationAndWait(sparkConfigurationName, sparkConfiguration, options) {
|
|
153
|
+
const poller = await this.beginCreateOrUpdateSparkConfiguration(sparkConfigurationName, sparkConfiguration, options);
|
|
154
|
+
return poller.pollUntilDone();
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Gets a sparkConfiguration.
|
|
158
|
+
* @param sparkConfigurationName The spark Configuration name.
|
|
159
|
+
* @param options The options parameters.
|
|
160
|
+
*/
|
|
161
|
+
async getSparkConfiguration(sparkConfigurationName, options) {
|
|
162
|
+
const { span } = createSpan("ArtifactsClient-getSparkConfiguration", options || {});
|
|
163
|
+
try {
|
|
164
|
+
const result = await this.client.sendOperationRequest({ sparkConfigurationName, options }, getSparkConfigurationOperationSpec);
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
span.setStatus({
|
|
169
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
170
|
+
message: error.message
|
|
171
|
+
});
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
finally {
|
|
175
|
+
span.end();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Deletes a sparkConfiguration.
|
|
180
|
+
* @param sparkConfigurationName The spark Configuration name.
|
|
181
|
+
* @param options The options parameters.
|
|
182
|
+
*/
|
|
183
|
+
async beginDeleteSparkConfiguration(sparkConfigurationName, options) {
|
|
184
|
+
const { span } = createSpan("ArtifactsClient-beginDeleteSparkConfiguration", options || {});
|
|
185
|
+
const directSendOperation = async (args, spec) => {
|
|
186
|
+
try {
|
|
187
|
+
const result = await this.client.sendOperationRequest(args, spec);
|
|
188
|
+
return result;
|
|
189
|
+
}
|
|
190
|
+
catch (error) {
|
|
191
|
+
span.setStatus({
|
|
192
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
193
|
+
message: error.message
|
|
194
|
+
});
|
|
195
|
+
throw error;
|
|
196
|
+
}
|
|
197
|
+
finally {
|
|
198
|
+
span.end();
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
const sendOperation = async (args, spec) => {
|
|
202
|
+
var _a;
|
|
203
|
+
let currentRawResponse = undefined;
|
|
204
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
205
|
+
const callback = (rawResponse, flatResponse) => {
|
|
206
|
+
currentRawResponse = rawResponse;
|
|
207
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
208
|
+
};
|
|
209
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
210
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
211
|
+
return {
|
|
212
|
+
flatResponse,
|
|
213
|
+
rawResponse: {
|
|
214
|
+
statusCode: currentRawResponse.status,
|
|
215
|
+
body: currentRawResponse.parsedBody,
|
|
216
|
+
headers: currentRawResponse.headers.toJSON()
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
const lro = new LroImpl(sendOperation, { sparkConfigurationName, options }, deleteSparkConfigurationOperationSpec);
|
|
221
|
+
const poller = new LroEngine(lro, {
|
|
222
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
223
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
224
|
+
});
|
|
225
|
+
await poller.poll();
|
|
226
|
+
return poller;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Deletes a sparkConfiguration.
|
|
230
|
+
* @param sparkConfigurationName The spark Configuration name.
|
|
231
|
+
* @param options The options parameters.
|
|
232
|
+
*/
|
|
233
|
+
async beginDeleteSparkConfigurationAndWait(sparkConfigurationName, options) {
|
|
234
|
+
const poller = await this.beginDeleteSparkConfiguration(sparkConfigurationName, options);
|
|
235
|
+
return poller.pollUntilDone();
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Renames a sparkConfiguration.
|
|
239
|
+
* @param sparkConfigurationName The spark Configuration name.
|
|
240
|
+
* @param request proposed new name.
|
|
241
|
+
* @param options The options parameters.
|
|
242
|
+
*/
|
|
243
|
+
async beginRenameSparkConfiguration(sparkConfigurationName, request, options) {
|
|
244
|
+
const { span } = createSpan("ArtifactsClient-beginRenameSparkConfiguration", options || {});
|
|
245
|
+
const directSendOperation = async (args, spec) => {
|
|
246
|
+
try {
|
|
247
|
+
const result = await this.client.sendOperationRequest(args, spec);
|
|
248
|
+
return result;
|
|
249
|
+
}
|
|
250
|
+
catch (error) {
|
|
251
|
+
span.setStatus({
|
|
252
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
253
|
+
message: error.message
|
|
254
|
+
});
|
|
255
|
+
throw error;
|
|
256
|
+
}
|
|
257
|
+
finally {
|
|
258
|
+
span.end();
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
const sendOperation = async (args, spec) => {
|
|
262
|
+
var _a;
|
|
263
|
+
let currentRawResponse = undefined;
|
|
264
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
265
|
+
const callback = (rawResponse, flatResponse) => {
|
|
266
|
+
currentRawResponse = rawResponse;
|
|
267
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
268
|
+
};
|
|
269
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
270
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
271
|
+
return {
|
|
272
|
+
flatResponse,
|
|
273
|
+
rawResponse: {
|
|
274
|
+
statusCode: currentRawResponse.status,
|
|
275
|
+
body: currentRawResponse.parsedBody,
|
|
276
|
+
headers: currentRawResponse.headers.toJSON()
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
const lro = new LroImpl(sendOperation, { sparkConfigurationName, request, options }, renameSparkConfigurationOperationSpec);
|
|
281
|
+
const poller = new LroEngine(lro, {
|
|
282
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
283
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
284
|
+
});
|
|
285
|
+
await poller.poll();
|
|
286
|
+
return poller;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Renames a sparkConfiguration.
|
|
290
|
+
* @param sparkConfigurationName The spark Configuration name.
|
|
291
|
+
* @param request proposed new name.
|
|
292
|
+
* @param options The options parameters.
|
|
293
|
+
*/
|
|
294
|
+
async beginRenameSparkConfigurationAndWait(sparkConfigurationName, request, options) {
|
|
295
|
+
const poller = await this.beginRenameSparkConfiguration(sparkConfigurationName, request, options);
|
|
296
|
+
return poller.pollUntilDone();
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* GetSparkConfigurationsByWorkspaceNext
|
|
300
|
+
* @param nextLink The nextLink from the previous successful call to the
|
|
301
|
+
* GetSparkConfigurationsByWorkspace method.
|
|
302
|
+
* @param options The options parameters.
|
|
303
|
+
*/
|
|
304
|
+
async _getSparkConfigurationsByWorkspaceNext(nextLink, options) {
|
|
305
|
+
const { span } = createSpan("ArtifactsClient-_getSparkConfigurationsByWorkspaceNext", options || {});
|
|
306
|
+
try {
|
|
307
|
+
const result = await this.client.sendOperationRequest({ nextLink, options }, getSparkConfigurationsByWorkspaceNextOperationSpec);
|
|
308
|
+
return result;
|
|
309
|
+
}
|
|
310
|
+
catch (error) {
|
|
311
|
+
span.setStatus({
|
|
312
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
313
|
+
message: error.message
|
|
314
|
+
});
|
|
315
|
+
throw error;
|
|
316
|
+
}
|
|
317
|
+
finally {
|
|
318
|
+
span.end();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
// Operation Specifications
|
|
323
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
324
|
+
const getSparkConfigurationsByWorkspaceOperationSpec = {
|
|
325
|
+
path: "/sparkconfigurations",
|
|
326
|
+
httpMethod: "GET",
|
|
327
|
+
responses: {
|
|
328
|
+
200: {
|
|
329
|
+
bodyMapper: Mappers.SparkConfigurationListResponse
|
|
330
|
+
},
|
|
331
|
+
default: {
|
|
332
|
+
bodyMapper: Mappers.CloudError
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
queryParameters: [Parameters.apiVersion3],
|
|
336
|
+
urlParameters: [Parameters.endpoint],
|
|
337
|
+
headerParameters: [Parameters.accept],
|
|
338
|
+
serializer
|
|
339
|
+
};
|
|
340
|
+
const createOrUpdateSparkConfigurationOperationSpec = {
|
|
341
|
+
path: "/sparkconfigurations/{sparkConfigurationName}",
|
|
342
|
+
httpMethod: "PUT",
|
|
343
|
+
responses: {
|
|
344
|
+
200: {
|
|
345
|
+
bodyMapper: Mappers.SparkConfigurationResource
|
|
346
|
+
},
|
|
347
|
+
201: {
|
|
348
|
+
bodyMapper: Mappers.SparkConfigurationResource
|
|
349
|
+
},
|
|
350
|
+
202: {
|
|
351
|
+
bodyMapper: Mappers.SparkConfigurationResource
|
|
352
|
+
},
|
|
353
|
+
204: {
|
|
354
|
+
bodyMapper: Mappers.SparkConfigurationResource
|
|
355
|
+
},
|
|
356
|
+
default: {
|
|
357
|
+
bodyMapper: Mappers.CloudError
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
requestBody: Parameters.sparkConfiguration,
|
|
361
|
+
queryParameters: [Parameters.apiVersion3],
|
|
362
|
+
urlParameters: [Parameters.endpoint, Parameters.sparkConfigurationName],
|
|
363
|
+
headerParameters: [
|
|
364
|
+
Parameters.accept,
|
|
365
|
+
Parameters.contentType,
|
|
366
|
+
Parameters.ifMatch
|
|
367
|
+
],
|
|
368
|
+
mediaType: "json",
|
|
369
|
+
serializer
|
|
370
|
+
};
|
|
371
|
+
const getSparkConfigurationOperationSpec = {
|
|
372
|
+
path: "/sparkconfigurations/{sparkConfigurationName}",
|
|
373
|
+
httpMethod: "GET",
|
|
374
|
+
responses: {
|
|
375
|
+
200: {
|
|
376
|
+
bodyMapper: Mappers.SparkConfigurationResource
|
|
377
|
+
},
|
|
378
|
+
304: {},
|
|
379
|
+
default: {
|
|
380
|
+
bodyMapper: Mappers.CloudError
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
queryParameters: [Parameters.apiVersion3],
|
|
384
|
+
urlParameters: [Parameters.endpoint, Parameters.sparkConfigurationName],
|
|
385
|
+
headerParameters: [Parameters.accept, Parameters.ifNoneMatch],
|
|
386
|
+
serializer
|
|
387
|
+
};
|
|
388
|
+
const deleteSparkConfigurationOperationSpec = {
|
|
389
|
+
path: "/sparkconfigurations/{sparkConfigurationName}",
|
|
390
|
+
httpMethod: "DELETE",
|
|
391
|
+
responses: {
|
|
392
|
+
200: {},
|
|
393
|
+
201: {},
|
|
394
|
+
202: {},
|
|
395
|
+
204: {},
|
|
396
|
+
default: {
|
|
397
|
+
bodyMapper: Mappers.CloudError
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
queryParameters: [Parameters.apiVersion3],
|
|
401
|
+
urlParameters: [Parameters.endpoint, Parameters.sparkConfigurationName],
|
|
402
|
+
headerParameters: [Parameters.accept],
|
|
403
|
+
serializer
|
|
404
|
+
};
|
|
405
|
+
const renameSparkConfigurationOperationSpec = {
|
|
406
|
+
path: "/sparkconfigurations/{sparkConfigurationName}/rename",
|
|
407
|
+
httpMethod: "POST",
|
|
408
|
+
responses: {
|
|
409
|
+
200: {},
|
|
410
|
+
201: {},
|
|
411
|
+
202: {},
|
|
412
|
+
204: {},
|
|
413
|
+
default: {
|
|
414
|
+
bodyMapper: Mappers.CloudError
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
requestBody: Parameters.request,
|
|
418
|
+
queryParameters: [Parameters.apiVersion3],
|
|
419
|
+
urlParameters: [Parameters.endpoint, Parameters.sparkConfigurationName],
|
|
420
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
421
|
+
mediaType: "json",
|
|
422
|
+
serializer
|
|
423
|
+
};
|
|
424
|
+
const getSparkConfigurationsByWorkspaceNextOperationSpec = {
|
|
425
|
+
path: "{nextLink}",
|
|
426
|
+
httpMethod: "GET",
|
|
427
|
+
responses: {
|
|
428
|
+
200: {
|
|
429
|
+
bodyMapper: Mappers.SparkConfigurationListResponse
|
|
430
|
+
},
|
|
431
|
+
default: {
|
|
432
|
+
bodyMapper: Mappers.CloudError
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
queryParameters: [Parameters.apiVersion3],
|
|
436
|
+
urlParameters: [Parameters.endpoint, Parameters.nextLink],
|
|
437
|
+
headerParameters: [Parameters.accept],
|
|
438
|
+
serializer
|
|
439
|
+
};
|
|
440
|
+
//# sourceMappingURL=sparkConfigurationOperations.js.map
|