@alicloud/emr-serverless-spark20230808 2.0.0 → 2.1.0

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/dist/client.d.ts CHANGED
@@ -296,6 +296,24 @@ export default class Client extends OpenApi {
296
296
  * @returns CreateWorkspaceResponse
297
297
  */
298
298
  createWorkspace(request: $_model.CreateWorkspaceRequest): Promise<$_model.CreateWorkspaceResponse>;
299
+ /**
300
+ * Creates a workspace queue.
301
+ *
302
+ * @param request - CreateWorkspaceQueueRequest
303
+ * @param headers - map
304
+ * @param runtime - runtime options for this request RuntimeOptions
305
+ * @returns CreateWorkspaceQueueResponse
306
+ */
307
+ createWorkspaceQueueWithOptions(request: $_model.CreateWorkspaceQueueRequest, headers: {
308
+ [key: string]: string;
309
+ }, runtime: $dara.RuntimeOptions): Promise<$_model.CreateWorkspaceQueueResponse>;
310
+ /**
311
+ * Creates a workspace queue.
312
+ *
313
+ * @param request - CreateWorkspaceQueueRequest
314
+ * @returns CreateWorkspaceQueueResponse
315
+ */
316
+ createWorkspaceQueue(request: $_model.CreateWorkspaceQueueRequest): Promise<$_model.CreateWorkspaceQueueResponse>;
299
317
  /**
300
318
  * Deletes a Kyuubi gateway.
301
319
  *
package/dist/client.js CHANGED
@@ -1059,6 +1059,77 @@ class Client extends openapi_core_1.default {
1059
1059
  let headers = {};
1060
1060
  return await this.createWorkspaceWithOptions(request, headers, runtime);
1061
1061
  }
1062
+ /**
1063
+ * Creates a workspace queue.
1064
+ *
1065
+ * @param request - CreateWorkspaceQueueRequest
1066
+ * @param headers - map
1067
+ * @param runtime - runtime options for this request RuntimeOptions
1068
+ * @returns CreateWorkspaceQueueResponse
1069
+ */
1070
+ async createWorkspaceQueueWithOptions(request, headers, runtime) {
1071
+ request.validate();
1072
+ let query = {};
1073
+ if (!$dara.isNull(request.regionId)) {
1074
+ query["regionId"] = request.regionId;
1075
+ }
1076
+ let body = {};
1077
+ if (!$dara.isNull(request.description)) {
1078
+ body["description"] = request.description;
1079
+ }
1080
+ if (!$dara.isNull(request.gpuSpec)) {
1081
+ body["gpuSpec"] = request.gpuSpec;
1082
+ }
1083
+ if (!$dara.isNull(request.instanceId)) {
1084
+ body["instanceId"] = request.instanceId;
1085
+ }
1086
+ if (!$dara.isNull(request.paymentType)) {
1087
+ body["paymentType"] = request.paymentType;
1088
+ }
1089
+ if (!$dara.isNull(request.preheat)) {
1090
+ body["preheat"] = request.preheat;
1091
+ }
1092
+ if (!$dara.isNull(request.queueCategory)) {
1093
+ body["queueCategory"] = request.queueCategory;
1094
+ }
1095
+ if (!$dara.isNull(request.resourceSpec)) {
1096
+ body["resourceSpec"] = request.resourceSpec;
1097
+ }
1098
+ if (!$dara.isNull(request.workspaceId)) {
1099
+ body["workspaceId"] = request.workspaceId;
1100
+ }
1101
+ if (!$dara.isNull(request.workspaceQueueName)) {
1102
+ body["workspaceQueueName"] = request.workspaceQueueName;
1103
+ }
1104
+ let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
1105
+ headers: headers,
1106
+ query: openapi_core_2.OpenApiUtil.query(query),
1107
+ body: openapi_core_2.OpenApiUtil.parseToMap(body),
1108
+ });
1109
+ let params = new openapi_core_2.$OpenApiUtil.Params({
1110
+ action: "CreateWorkspaceQueue",
1111
+ version: "2023-08-08",
1112
+ protocol: "HTTPS",
1113
+ pathname: `/api/v1/workspaces/queues`,
1114
+ method: "POST",
1115
+ authType: "AK",
1116
+ style: "ROA",
1117
+ reqBodyType: "json",
1118
+ bodyType: "json",
1119
+ });
1120
+ return $dara.cast(await this.callApi(params, req, runtime), new $_model.CreateWorkspaceQueueResponse({}));
1121
+ }
1122
+ /**
1123
+ * Creates a workspace queue.
1124
+ *
1125
+ * @param request - CreateWorkspaceQueueRequest
1126
+ * @returns CreateWorkspaceQueueResponse
1127
+ */
1128
+ async createWorkspaceQueue(request) {
1129
+ let runtime = new $dara.RuntimeOptions({});
1130
+ let headers = {};
1131
+ return await this.createWorkspaceQueueWithOptions(request, headers, runtime);
1132
+ }
1062
1133
  /**
1063
1134
  * Deletes a Kyuubi gateway.
1064
1135
  *