diff options
| author | Zhineng Li <im@zhineng.li> | 2026-07-12 17:11:17 +0800 |
|---|---|---|
| committer | Zhineng Li <im@zhineng.li> | 2026-07-12 17:11:17 +0800 |
| commit | 1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 (patch) | |
| tree | 5f0857666365b7e40cdaa3733ebe1f3ba9e13c67 /data/zh_cn/openanalytics-open | |
| parent | 7347bac4ab7e136157fc94777e6cf87ef9e08599 (diff) | |
| download | afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.tar.gz afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.zip | |
update APIs 20260712
Diffstat (limited to 'data/zh_cn/openanalytics-open')
| -rw-r--r-- | data/zh_cn/openanalytics-open/2018-06-19/api-docs.php | 2278 | ||||
| -rw-r--r-- | data/zh_cn/openanalytics-open/2020-09-28/api-docs.php | 1041 |
2 files changed, 894 insertions, 2425 deletions
diff --git a/data/zh_cn/openanalytics-open/2018-06-19/api-docs.php b/data/zh_cn/openanalytics-open/2018-06-19/api-docs.php index 5aeb684..4a02349 100644 --- a/data/zh_cn/openanalytics-open/2018-06-19/api-docs.php +++ b/data/zh_cn/openanalytics-open/2018-06-19/api-docs.php @@ -1,95 +1,50 @@ <?php return [ 'version' => '1.0', - 'info' => [ - 'style' => 'RPC', - 'product' => 'openanalytics-open', - 'version' => '2018-06-19', - ], + 'info' => ['style' => 'RPC', 'product' => 'openanalytics-open', 'version' => '2018-06-19'], 'directories' => [ [ - 'id' => 66483, - 'title' => 'Serverless Spark', + 'children' => ['GetJobDetail', 'GetJobLog', 'ListSparkJob', 'SubmitSparkJob', 'KillSparkJob'], 'type' => 'directory', - 'children' => [ - 'GetJobStatus', - 'GetJobDetail', - 'GetJobLog', - 'ListSparkJob', - 'SubmitSparkJob', - 'KillSparkJob', - ], + 'title' => 'Serverless Spark', + 'id' => 25894, ], [ - 'id' => 66490, - 'title' => '服务管理', + 'children' => ['ValidateVirtualClusterName'], 'type' => 'directory', - 'children' => [ - 'CreateInstance', - 'ReleaseInstance', - 'ValidateVirtualClusterName', - ], + 'title' => '服务管理', + 'id' => 25901, ], [ - 'id' => 362601, - 'title' => '其他', + 'children' => ['SubmitSparkSQL', 'CancelSparkStatement', 'ExecuteSparkStatement', 'GetSparkSessionState', 'GetSparkStatement', 'ListSparkStatements', 'GetJobAttemptLog', 'ListSparkJobAttempt', 'CreateInstance', 'GetJobStatus', 'ReleaseInstance'], 'type' => 'directory', - 'children' => [ - 'SubmitSparkSQL', - 'CancelSparkStatement', - 'ExecuteSparkStatement', - 'GetSparkSessionState', - 'GetSparkStatement', - 'ListSparkStatements', - 'GetJobAttemptLog', - 'ListSparkJobAttempt', - ], + 'title' => '其他', + 'id' => 335262, ], ], 'components' => [ 'schemas' => [], ], 'apis' => [ - 'GetJobStatus' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'CancelSparkStatement' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - ], + 'operationType' => 'readAndWrite', + 'systemTags' => [], 'parameters' => [ [ - 'name' => 'JobId', + 'name' => 'StatementId', 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业的ID。您可以登录[DLA控制台](https://datalakeanalytics.console.aliyun.com/),在作业任务列表中获取作业任务ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202011031935hangzhouf742a4330003667', - ], + 'schema' => ['description' => 'Spark作业中代码块的唯一ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '2026****'], ], [ - 'name' => 'VcName', + 'name' => 'JobId', 'in' => 'formData', - 'schema' => [ - 'description' => '执行作业的虚拟集群名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'MyCluster', - ], + 'schema' => ['description' => 'Spark作业的唯一ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202106071620hangzhou****'], ], ], 'responses' => [ @@ -97,77 +52,64 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Status' => [ - 'description' => '作业执行状态码。', - 'type' => 'string', - 'example' => 'success', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '5C3F9ADD-2350-4C21-A3A1-A906F8DF8016', - ], + 'Data' => ['description' => '是否终止成功,取值说明:'."\n" + ."\n" + .'- **true**:终止成功。'."\n" + .'- **false**:终止失败。', 'type' => 'string', 'example' => 'true'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '341ADFA1-4A68-4707-9CA7-FA86523A5F14'], ], ], ], ], 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Status\\": \\"success\\",\\n \\"RequestId\\": \\"5C3F9ADD-2350-4C21-A3A1-A906F8DF8016\\"\\n}","errorExample":""},{"type":"xml","example":"<Status>success</Status>\\n<RequestId>5C3F9ADD-2350-4C21-A3A1-A906F8DF8016</RequestId>","errorExample":""}]', - 'title' => '获取Spark作业的执行状态', - 'summary' => '获取Spark作业的执行状态。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"true\\",\\n \\"RequestId\\": \\"341ADFA1-4A68-4707-9CA7-FA86523A5F14\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>341ADFA1-4A68-4707-9CA7-FA86523A5F14</RequestId>\\n<Data>true</Data>","errorExample":""}]', + 'title' => '终止一个代码块的执行', + 'summary' => '终止一个代码块的执行。', 'requestParamsDescription' => ' ', - 'responseParamsDescription' => '**作业的状态码如下表**'."\n" - .'| 状态码 | 语义 |'."\n" - .'|----------|--------------------------------------|'."\n" - .'| starting | 启动中,作业尚未执行。 |'."\n" - .'| running | 作业在执行中。 |'."\n" - .'| error | 作业中的程序执行失败,抛出Exception。 |'."\n" - .'| dead | 作业因为资源问题等执行失败。 |'."\n" - .'| killed | 执行中的作业被取消。 |'."\n" - .'| success | 作业执行成功。 |', - 'extraInfo' => ' ', - ], - 'GetJobDetail' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'responseParamsDescription' => ' ', + 'extraInfo' => '此操作为异步操作, 当返回`true`时代表Spark作业收到了终止命令, 开始尝试终止代码块, 但最终能否成功依赖实际运行情况. '."\n" + .'后续应当通过`GetSparkStatement`接口来查看最终是否终止成功.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'CreateInstance' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - ], + 'systemTags' => ['operationType' => 'create'], 'parameters' => [ [ - 'name' => 'JobId', + 'name' => 'RegionId', 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202010271622hangzhouf742a4330000923', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'cn-beijing'], ], [ - 'name' => 'VcName', + 'name' => 'ChargeType', 'in' => 'formData', - 'schema' => [ - 'description' => '执行Spark作业的虚拟集群名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'MyCluster', - ], + 'schema' => ['description' => '固定为**POSTPAY**。暂只支持创建后付费实例。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'POSTPAY'], + ], + [ + 'name' => 'InstanceType', + 'in' => 'formData', + 'schema' => ['description' => '实例类型,取值说明:'."\n" + ."\n" + .'- **CU_SPARK**:云原生Spark引擎。'."\n" + ."\n" + .'- **CU_PRESTO**:兼容开源Presto语法。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'CU_PRESTO'], + ], + [ + 'name' => 'Component', + 'in' => 'formData', + 'schema' => ['description' => 'component模块的JSON序列化。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '"{\\"operable\\":\\"false\\",\\"max_cu\\":\\"8\\",\\"instance_name\\":\\"api-test-9\\",\\"min_cu\\":\\"0\\",\\"engine\\":\\"spark\\",\\"region\\":\\"cn-hangzhou\\",\\"app_name\\":\\"xx\\",\\"app_version_name\\":\\"xx\\"}"'], ], ], 'responses' => [ @@ -175,174 +117,66 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求的唯一ID。', - 'type' => 'string', - 'example' => '5F10AB6E-8984-4E32-B821-4E1512711B8C', - ], - 'JobDetail' => [ - 'description' => 'Spark作业的详细信息。', - 'type' => 'object', - 'properties' => [ - 'Status' => [ - 'description' => 'Spark作业的状态码。', - 'type' => 'string', - 'example' => 'success', - ], - 'UpdateTime' => [ - 'description' => '最后一次更新Spark作业状态的时间,时区为执行作业区域的时区。', - 'type' => 'string', - 'example' => '2020-10-27 16:23:16', - ], - 'ExecutorResourceSpec' => [ - 'description' => 'Executor计算资源规格。取值范围:'."\n" - ."\n" - .'- **small**:1Core 4GB'."\n" - ."\n" - .'- **medium**:2Core 8GB'."\n" - ."\n" - .'- **large**:4Core 16GB'."\n" - ."\n" - .'- **xlarge**:8Core 32GB', - 'type' => 'string', - 'example' => 'small', - ], - 'CreateTime' => [ - 'description' => 'Spark作业开始执行的时间,时区为执行区域的时区。', - 'type' => 'string', - 'example' => '2020-10-27 16:23:16', - ], - 'DriverResourceSpec' => [ - 'description' => 'Driver计算资源规格。取值范围:'."\n" - ."\n" - .'- **small**:1Core 4GB'."\n" - ."\n" - .'- **medium**:2Core 8GB'."\n" - ."\n" - .'- **large**:4Core 16GB'."\n" - ."\n" - .'- **xlarge**:8Core 32GB', - 'type' => 'string', - 'example' => 'small', - ], - 'CreateTimeValue' => [ - 'description' => 'Spark作业开始执行的毫秒级时间戳。', - 'type' => 'string', - 'example' => '1603786996000', - ], - 'UpdateTimeValue' => [ - 'description' => '最后一次更新Spark作业状态的毫秒级时间戳。', - 'type' => 'string', - 'example' => '1603786996000', - ], - 'SparkUI' => [ - 'description' => 'Spark作业的UI,具体请参考[配置Spark UI](~~163470~~)。', - 'type' => 'string', - 'example' => 'https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx', - ], - 'LastJobAttemptId' => [ - 'description' => '最近一次尝试执行的Spark作业ID。', - 'type' => 'string', - 'example' => '202105251618hzslot9906b0b40000005-0001', - ], - 'SubmitTimeValue' => [ - 'description' => '提交Spark作业的毫秒级时间戳。', - 'type' => 'string', - 'example' => '1603786996000', - ], - 'JobName' => [ - 'description' => 'Spark作业的名称。', - 'type' => 'string', - 'example' => 'SparkPi', - ], - 'JobId' => [ - 'description' => 'Spark作业的ID。', - 'type' => 'string', - 'example' => 'j202010271622hangzhouf742a4330000923', - ], - 'ExecutorInstances' => [ - 'description' => 'Spark作业Executor数量。', - 'type' => 'string', - 'example' => '1', - ], - 'VcName' => [ - 'description' => '执行Spark作业的虚拟集群名称。', - 'type' => 'string', - 'example' => 'MyCluster', - ], - 'SubmitTime' => [ - 'description' => '提交Spark作业的时间,时区为执行区域的时区。', - 'type' => 'string', - 'example' => '2020-10-27 16:23:16', - ], - 'Detail' => [ - 'description' => '定义Spark作业的JSON字符串。', - 'type' => 'string', - 'example' => '{\\"args\\":[\\"100\\"],\\"name\\":\\"SparkPi\\",\\"className\\":\\"org.apache.spark.examples.SparkPi\\",\\"conf\\":{\\"spark.driver.resourceSpec\\":\\"medium\\",\\"spark.executor.instances\\":5,\\"spark.executor.resourceSpec\\":\\"medium\\"},\\"file\\":\\"local:///tmp/spark-examples.jar\\"}', - ], - ], - ], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '312F48C7-AFA0-46AA-B8F6-1B16B8808045'], + 'ErrorInfo' => ['description' => '错误信息。', 'type' => 'string', 'example' => 'An internal error occurred'], + 'Result' => ['description' => '返回的创建实例的结果。', 'type' => 'string', 'example' => 'true'], + 'ErrorCode' => ['description' => '错误码。', 'type' => 'string', 'example' => '600'], + 'Success' => ['description' => '请求是否调用成功。', 'type' => 'boolean', 'example' => 'true'], ], ], ], ], - 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"5F10AB6E-8984-4E32-B821-4E1512711B8C\\",\\n \\"JobDetail\\": {\\n \\"Status\\": \\"success\\",\\n \\"UpdateTime\\": \\"2020-10-27 16:23:16\\",\\n \\"ExecutorResourceSpec\\": \\"small\\",\\n \\"CreateTime\\": \\"2020-10-27 16:23:16\\",\\n \\"DriverResourceSpec\\": \\"small\\",\\n \\"CreateTimeValue\\": \\"1603786996000\\",\\n \\"UpdateTimeValue\\": \\"1603786996000\\",\\n \\"SparkUI\\": \\"https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx\\",\\n \\"LastJobAttemptId\\": \\"202105251618hzslot9906b0b40000005-0001\\",\\n \\"SubmitTimeValue\\": \\"1603786996000\\",\\n \\"JobName\\": \\"SparkPi\\",\\n \\"JobId\\": \\"j202010271622hangzhouf742a4330000923\\",\\n \\"ExecutorInstances\\": \\"1\\",\\n \\"VcName\\": \\"MyCluster\\",\\n \\"SubmitTime\\": \\"2020-10-27 16:23:16\\",\\n \\"Detail\\": \\"{\\\\\\\\\\\\\\"args\\\\\\\\\\\\\\":[\\\\\\\\\\\\\\"100\\\\\\\\\\\\\\"],\\\\\\\\\\\\\\"name\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"SparkPi\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"className\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"org.apache.spark.examples.SparkPi\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"conf\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"spark.driver.resourceSpec\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"medium\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"spark.executor.instances\\\\\\\\\\\\\\":5,\\\\\\\\\\\\\\"spark.executor.resourceSpec\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"medium\\\\\\\\\\\\\\"},\\\\\\\\\\\\\\"file\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"local:///tmp/spark-examples.jar\\\\\\\\\\\\\\"}\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<JobDetail>\\n <Status>success</Status>\\n <VcName>MyCluser</VcName>\\n <ExecutorInstances>5</ExecutorInstances>\\n <LastJobAttemptId>j202010271622hangzhouf742a4330000923-0001</LastJobAttemptId>\\n <SparkUI>https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx</SparkUI>\\n <DriverResourceSpec>medium</DriverResourceSpec>\\n <CreateTime>2020-10-27 16:23:16</CreateTime>\\n <JobName>SparkPi</JobName>\\n <ExecutorResourceSpec>medium</ExecutorResourceSpec>\\n <SubmitTime>2020-10-27 16:22:52</SubmitTime>\\n <CreateTimeValue>1603786996000</CreateTimeValue>\\n <UpdateTimeValue>1603787047000</UpdateTimeValue>\\n <SubmitTimeValue>1603786972000</SubmitTimeValue>\\n <UpdateTime>2020-10-27 16:24:07</UpdateTime>\\n <JobId>j202010271622hangzhouf742a4330000923</JobId>\\n <Detail>{\\"args\\":[\\"100\\"],\\"name\\":\\"SparkPi\\",\\"className\\":\\"org.apache.spark.examples.SparkPi\\",\\"conf\\":{\\"spark.driver.resourceSpec\\":\\"medium\\",\\"spark.executor.instances\\":5,\\"spark.executor.resourceSpec\\":\\"medium\\"},\\"file\\":\\"local:///tmp/spark-examples.jar\\"}</Detail>\\n</JobDetail>\\n<RequestId>5F10AB6E-8984-4E32-B821-4E1512711B8C</RequestId>","errorExample":""}]', - 'title' => '获取一个 Spark作业的详细信息', - 'summary' => '调用GetJobDetail获取Spark作业的详细信息。', + 'errorCodes' => [ + 401 => [ + ['errorCode' => 'Openanalytics.Unauthorized.Exception', 'errorMessage' => 'You do not have permission to perform the operation.', 'description' => '您没有权限操作'], + ], + 404 => [ + ['errorCode' => 'Openanalytics.NotFound.Exception', 'errorMessage' => 'The specified instance does not exist.', 'description' => '实例不存在'], + ], + 600 => [ + ['errorCode' => 'Openanalytics.Internal.Exception', 'errorMessage' => 'An internal error occurred.', 'description' => '内部错误'], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"312F48C7-AFA0-46AA-B8F6-1B16B8808045\\",\\n \\"ErrorInfo\\": \\"An internal error occurred\\",\\n \\"Result\\": \\"true\\",\\n \\"ErrorCode\\": \\"600\\",\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"<RequestId>312F48C7-AFA0-46AA-B8F6-1B16B8808045</RequestId>\\n<ErrorInfo>An internal error occurred</ErrorInfo>\\n<ErrorCode>600</ErrorCode>\\n<Success>true</Success>\\n<Result>true</Result>","errorExample":""}]', + 'title' => '创建实例', + 'summary' => '调用CreateInstance创建实例。', 'requestParamsDescription' => ' ', - 'responseParamsDescription' => '**作业的状态码如下表**'."\n" - .'| 状态码 | 语义 |'."\n" - .'|----------|--------------------------------------|'."\n" - .'| starting | 启动中,作业尚未执行。 |'."\n" - .'| running | 作业在执行中。 |'."\n" - .'| error | 作业中的程序执行失败,抛出了Exception。 |'."\n" - .'| dead | 作业因为资源不足等问题失败。 |'."\n" - .'| killed | 作业在执行中被取消。 |'."\n" - .'| success | 作业执行成功。 |', + 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'GetJobLog' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'ExecuteSparkStatement' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - ], + 'operationType' => 'write', + 'systemTags' => [], 'parameters' => [ [ + 'name' => 'Code', + 'in' => 'formData', + 'schema' => ['description' => '一段代码块,使用Linux系统的 \'\\n\' 来代表切到新的一行。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'print(2+2)\\n'], + ], + [ 'name' => 'JobId', 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业的ID。您可以登录[DLA控制台](https://datalakeanalytics.console.aliyun.com/),在作业任务列表中获取作业任务ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202010271622hangzhouf742a4330000923', - ], + 'schema' => ['description' => 'Spark作业的ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202106071620hangzhou****'], ], [ - 'name' => 'VcName', + 'name' => 'Kind', 'in' => 'formData', - 'schema' => [ - 'description' => '执行作业的虚拟集群名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'MyCluster', - ], + 'schema' => ['description' => '执行代码的语言是什么, 取值:'."\n" + .'- **scala**'."\n" + .'- **python**'."\n" + .'- **sql**', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'sql'], ], ], 'responses' => [ @@ -350,37 +184,28 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Data' => [ - 'description' => '作业的日志内容。', - 'type' => 'string', - 'example' => 'INFO SparkContext: Running Spark version 2.x', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'EC031B4B-3E07-40D2-9BC5-xxxx', - ], + 'Data' => ['description' => '代码块提交成功后在此Spark作业中的唯一ID。', 'type' => 'string', 'example' => '2'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '0DC5B6F080E8-0DC5B6F080E8-0DC5B'], ], ], ], ], 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"INFO SparkContext: Running Spark version 2.x\\",\\n \\"RequestId\\": \\"EC031B4B-3E07-40D2-9BC5-xxxx\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>3970ACB5-3E30-4A3A-B63A-xxxx</RequestId>\\n<Data>Running Spark version 2.x</Data>","errorExample":""}]', - 'title' => '获取Spark作业的日志', - 'summary' => '获取Spark作业的日志。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"2\\",\\n \\"RequestId\\": \\"0DC5B6F080E8-0DC5B6F080E8-0DC5B\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>0DC5B6F080E8-0DC5B6F080E8-0DC5B</RequestId>\\n<Data>2</Data>","errorExample":""}]', + 'title' => '执行Spark代码块作业', + 'summary' => '提交一段代码块给Spark作业执行。', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'ListSparkJob' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'GetJobAttemptLog' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -388,55 +213,22 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - ], + 'systemTags' => [], 'parameters' => [ [ - 'name' => 'VcName', - 'in' => 'query', - 'schema' => [ - 'description' => '执行Spark作业的虚拟集群名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'MySparkCluster', - ], - ], - [ - 'name' => 'PageNumber', - 'in' => 'query', - 'schema' => [ - 'description' => '指定需要查询的页码号,用于遍历全部数据,页码的编码从1开始。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'example' => '1', - ], + 'name' => 'JobId', + 'in' => 'formData', + 'schema' => ['description' => 'Spark作业ID。您可以在作业管理页面查看作业。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202105272322hangzhou5d64f1560000128'], ], [ - 'name' => 'PageSize', - 'in' => 'query', - 'schema' => [ - 'description' => '每页返回的作业的个数。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'example' => '10', - ], + 'name' => 'VcName', + 'in' => 'formData', + 'schema' => ['description' => '执行Spark作业的虚拟集群名称。您可以在虚拟集群管理页面查看虚拟集群名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'release-test'], ], [ - 'name' => 'Condition', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '提取Spark虚拟集群的历史作业详情信息的过滤条件,不填写表示没有过滤条件。'."\n", - 'type' => 'object', - 'required' => false, - 'example' => '{ "createTime":"2020-12-28 09:00:00", "jobName":"SparkPi" }', - ], + 'name' => 'JobAttemptId', + 'in' => 'formData', + 'schema' => ['description' => 'Spark作业尝试ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202105272322hangzhou5d64f1560000128-0001'], ], ], 'responses' => [ @@ -444,187 +236,46 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '本次请求的唯一编码。', - 'type' => 'string', - 'example' => 'E18B0634-F003-486A-90B9-4AA6932DA3AA', - ], - 'DataResult' => [ - 'description' => '虚拟集群的历史作业结果列表。', - 'type' => 'object', - 'properties' => [ - 'PageNumber' => [ - 'description' => '当前请求返回的页码。', - 'type' => 'string', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => '当前请求返回的每页作业数量。', - 'type' => 'string', - 'example' => '10', - ], - 'TotalCount' => [ - 'description' => '当前可查询的历史作业的总数。', - 'type' => 'string', - 'example' => '4998', - ], - 'JobList' => [ - 'description' => '历史作业详情数组。', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Status' => [ - 'description' => '作业的状态码。', - 'type' => 'string', - 'example' => 'running', - ], - 'UpdateTime' => [ - 'description' => '最后一次更新作业状态的时间,时区为该集群所在的地域的时区。', - 'type' => 'string', - 'example' => '2020-10-27 17:51:05', - ], - 'ExecutorResourceSpec' => [ - 'description' => '作业所申请的Executor的规格。', - 'type' => 'string', - 'example' => 'small', - ], - 'CreateTime' => [ - 'description' => '创建Spark作业的时间点,时区为该集群所在的地域的时区。', - 'type' => 'string', - 'example' => '2020-10-27 17:51:05', - ], - 'CreateTimeValue' => [ - 'description' => '创建Spark作业的毫秒级时间戳。', - 'type' => 'string', - 'example' => '1603792267000', - ], - 'DriverResourceSpec' => [ - 'description' => '作业所申请的Driver的实例规格。', - 'type' => 'string', - 'example' => 'small', - ], - 'UpdateTimeValue' => [ - 'description' => '最后一次更新作业状态的毫秒级时间戳。', - 'type' => 'string', - 'example' => '1603792267000', - ], - 'SparkUI' => [ - 'description' => 'Spark作业的UI,具体请参考文档[Spark UI](~~163470~~)。', - 'type' => 'string', - 'example' => 'https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx', - ], - 'SubmitTimeValue' => [ - 'description' => '提交作业的毫秒级时间戳。', - 'type' => 'string', - 'example' => '1603792267000', - ], - 'JobName' => [ - 'description' => 'Spark作业的名称。', - 'type' => 'string', - 'example' => 'SparkPi', - ], - 'JobId' => [ - 'description' => 'Spark作业的ID。', - 'type' => 'string', - 'example' => 'j202010271750hangzhouf742a4330000950', - ], - 'VcName' => [ - 'description' => '执行作业的虚拟集群名称。', - 'type' => 'string', - 'example' => 'MyCluster', - ], - 'ExecutorInstances' => [ - 'description' => '作业所申请的Executor的数量。', - 'type' => 'string', - 'example' => '100', - ], - 'SubmitTime' => [ - 'description' => '提交作业的时间,时区为该集群所在的地域的时区。', - 'type' => 'string', - 'example' => '2020-10-27 17:51:05', - ], - 'Detail' => [ - 'description' => '描述此作业的JSON格式的字符串。', - 'type' => 'string', - 'example' => '{"args":["100"],"name":...}', - ], - ], - ], - ], - ], - ], + 'Data' => ['description' => '返回的日志。', 'type' => 'string', 'example' => 'local:///opt/spark/jars/offline-sql.jar, main_file\\n+ exec /usr/bin/tini -s -- /jdk/jdk8/bin/java -cp \'/opt/tools/exec-wrapper.jar:.:::/opt/spark/jars/*\' com.aliyun.dla.spark.SparkJobWrapper /opt/spark/bin/spark-submit --conf spark.driver.host=172.16.6.205 --conf spark.ui.port=4040 --conf \'spark.driver.extraJavaOptions=-Dlog4j.configuration=file:///opt/spark/log-conf/log4j.properties -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/dump.hprof -XX:OnOutOfMemoryError=\\"bash /opt/tools/oss-cp.sh /tmp/dump.hprof oss://dla-test-cn-hangzhou/spark-logs/release-test/j202105272322hangzhou5d64f1560000128-0001/driver/dump.hprof; bash /opt/tools/job-stop.sh\\" \''], + 'RequestId' => ['description' => '请求的唯一ID。', 'type' => 'string', 'example' => '9CE8F271-F918-43B6-8F58-F9F1C2DCFDB8'], ], ], ], ], 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E18B0634-F003-486A-90B9-4AA6932DA3AA\\",\\n \\"DataResult\\": {\\n \\"PageNumber\\": \\"1\\",\\n \\"PageSize\\": \\"10\\",\\n \\"TotalCount\\": \\"4998\\",\\n \\"JobList\\": [\\n {\\n \\"Status\\": \\"running\\",\\n \\"UpdateTime\\": \\"2020-10-27 17:51:05\\",\\n \\"ExecutorResourceSpec\\": \\"small\\",\\n \\"CreateTime\\": \\"2020-10-27 17:51:05\\",\\n \\"CreateTimeValue\\": \\"1603792267000\\",\\n \\"DriverResourceSpec\\": \\"small\\",\\n \\"UpdateTimeValue\\": \\"1603792267000\\",\\n \\"SparkUI\\": \\"https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx\\",\\n \\"SubmitTimeValue\\": \\"1603792267000\\",\\n \\"JobName\\": \\"SparkPi\\",\\n \\"JobId\\": \\"j202010271750hangzhouf742a4330000950\\",\\n \\"VcName\\": \\"MyCluster\\",\\n \\"ExecutorInstances\\": \\"100\\",\\n \\"SubmitTime\\": \\"2020-10-27 17:51:05\\",\\n \\"Detail\\": \\"{\\\\\\"args\\\\\\":[\\\\\\"100\\\\\\"],\\\\\\"name\\\\\\":...}\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<DataResult>\\n <TotalCount>4998</TotalCount>\\n <PageSize>2</PageSize>\\n <PageNumber>1</PageNumber>\\n <JobList>\\n <ExecutorInstances>2</ExecutorInstances>\\n <Status>success</Status>\\n <VcName>MyCluster</VcName>\\n <SparkUI>https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx</SparkUI>\\n <DriverResourceSpec>small</DriverResourceSpec>\\n <CreateTime>2020-10-27 17:51:07</CreateTime>\\n <JobName>localFile</JobName>\\n <ExecutorResourceSpec>small</ExecutorResourceSpec>\\n <SubmitTime>2020-10-27 17:50:43</SubmitTime>\\n <CreateTimeValue>1603792267000</CreateTimeValue>\\n <UpdateTimeValue>1603792302000</UpdateTimeValue>\\n <SubmitTimeValue>1603792243000</SubmitTimeValue>\\n <UpdateTime>2020-10-27 17:51:42</UpdateTime>\\n <Detail>{\\"args\\":[\\"100\\"],\\"name\\"f}</Detail>\\n <JobId>j202010271750hangzhouf742a4330000950</JobId>\\n </JobList>\\n <JobList>\\n <ExecutorInstances>2</ExecutorInstances>\\n <Status>error</Status>\\n <VcName>MyCluster</VcName>\\n <SparkUI>https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx</SparkUI>\\n <DriverResourceSpec>small</DriverResourceSpec>\\n <CreateTime>2020-10-27 17:51:05</CreateTime>\\n <JobName>localFile</JobName>\\n <ExecutorResourceSpec>small</ExecutorResourceSpec>\\n <SubmitTime>2020-10-27 17:50:39</SubmitTime>\\n <CreateTimeValue>1603792265000</CreateTimeValue>\\n <UpdateTimeValue>1603792300000</UpdateTimeValue>\\n <SubmitTimeValue>1603792239000</SubmitTimeValue>\\n <UpdateTime>2020-10-27 17:51:40</UpdateTime>\\n <Detail>{\\"args\\":[\\"100\\"],\\"name\\"f}</Detail>\\n <JobId>j202010271750hangzhouf742a4330000949</JobId>\\n </JobList>\\n</DataResult>\\n<RequestId>E18B0634-F003-486A-90B9-4AA6932DA3AA</RequestId>","errorExample":""}]', - 'title' => '提取数据湖分析Spark虚拟集群历史作业信息', - 'summary' => '分页提取某个数据湖分析Spark虚拟集群的历史作业详情信息。', - 'requestParamsDescription' => ' Condition是一个JSON格式的字符串,目前支持如下参数。'."\n" - .'- status:Spark作业的状态,取值如下。'."\n" - .' - starting:提交中。'."\n" - .' - running:运行中。'."\n" - .' - success:成功。'."\n" - .' - error:运行失败。'."\n" - .' - killed:被取消。'."\n" - .' - unknown:未知状态。'."\n" - .' - dead:启动失败。'."\n" - .'- createTime:代表筛选指定时间之后提交的作业,格式为yyyy-mm-dd HH:mm:ss,指定该参数的时候,同时需要指定timeZone。'."\n" - .'- timeZone:createTime时间串所在的时区,例如 Asia/Shanghai。'."\n" - .'- jobId:Spark作业的ID。'."\n" - .'- jobName:Spark作业的名称,支持局部匹配。', - 'responseParamsDescription' => '**作业的状态码如下表**'."\n" - .'| 状态码 | 语义 |'."\n" - .'|----------|--------------------------------------|'."\n" - .'| starting | 启动中,作业尚未执行。 |'."\n" - .'| running | 作业在执行中。 |'."\n" - .'| error | 作业中的程序执行失败,抛出了Exception。 |'."\n" - .'| dead | 作业因为资源问题等问题失败。 |'."\n" - .'| killed | 作业在执行中被取消。 |'."\n" - .'| success | 作业执行成功。 |', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"local:///opt/spark/jars/offline-sql.jar, main_file\\\\\\\\n+ exec /usr/bin/tini -s -- /jdk/jdk8/bin/java -cp \'/opt/tools/exec-wrapper.jar:.:::/opt/spark/jars/*\' com.aliyun.dla.spark.SparkJobWrapper /opt/spark/bin/spark-submit --conf spark.driver.host=172.16.6.205 --conf spark.ui.port=4040 --conf \'spark.driver.extraJavaOptions=-Dlog4j.configuration=file:///opt/spark/log-conf/log4j.properties -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/dump.hprof -XX:OnOutOfMemoryError=\\\\\\\\\\\\\\"bash /opt/tools/oss-cp.sh /tmp/dump.hprof oss://dla-test-cn-hangzhou/spark-logs/release-test/j202105272322hangzhou5d64f1560000128-0001/driver/dump.hprof; bash /opt/tools/job-stop.sh\\\\\\\\\\\\\\" \'\\",\\n \\"RequestId\\": \\"9CE8F271-F918-43B6-8F58-F9F1C2DCFDB8\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>9CE8F271-F918-43B6-8F58-F9F1C2DCFDB8</RequestId>\\n<Data>local:///opt/spark/jars/offline-sql.jar, main_file\\\\n+ exec /usr/bin/tini -s -- /jdk/jdk8/bin/java -cp \'/opt/tools/exec-wrapper.jar:.:::/opt/spark/jars/*\' com.aliyun.dla.spark.SparkJobWrapper /opt/spark/bin/spark-submit --conf spark.driver.host=172.16.6.205 --conf spark.ui.port=4040 --conf \'spark.driver.extraJavaOptions=-Dlog4j.configuration=file:///opt/spark/log-conf/log4j.properties -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/dump.hprof -XX:OnOutOfMemoryError=\\\\\\"bash /opt/tools/oss-cp.sh /tmp/dump.hprof oss://dla-test-cn-hangzhou/spark-logs/release-test/j202105272322hangzhou5d64f1560000128-0001/driver/dump.hprof; bash /opt/tools/job-stop.sh\\\\\\" \'</Data>","errorExample":""}]', + 'title' => '获取作业日志', + 'summary' => '获取对应JobAttempt的日志。', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'SubmitSparkJob' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'GetJobDetail' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [], + 'systemTags' => ['operationType' => 'get'], 'parameters' => [ [ - 'name' => 'VcName', + 'name' => 'JobId', 'in' => 'formData', - 'schema' => [ - 'description' => '执行作业的虚拟集群名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'MyCluster', - ], + 'schema' => ['description' => 'Spark作业ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202010271622hangzhouf742a4330000923'], ], [ - 'name' => 'ConfigJson', + 'name' => 'VcName', 'in' => 'formData', - 'schema' => [ - 'description' => '定义Spark作业的JSON字符串。JSON字符串的作业参数说明请参见[作业配置指南](~~185924~~)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '{ "name": "SparkPi", "file": "local:///tmp/spark-examples.jar", "className": "org.apache.spark.examples.SparkPi", "args": [ "100" ], "conf": { "spark.driver.resourceSpec": "medium", "spark.executor.instances": 5, "spark.executor.resourceSpec": "medium" } }', - ], + 'schema' => ['description' => '执行Spark作业的虚拟集群名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MyCluster'], ], ], 'responses' => [ @@ -632,66 +283,91 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'JobId' => [ - 'description' => 'Spark作业的ID。', - 'type' => 'string', - 'example' => 'j202011032013hangzhouf742a4330003679', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'C039FD4D-2F3C-4556-AF09-864D3A6485B2', + 'RequestId' => ['description' => '请求的唯一ID。', 'type' => 'string', 'example' => '5F10AB6E-8984-4E32-B821-4E1512711B8C'], + 'JobDetail' => [ + 'description' => 'Spark作业的详细信息。', + 'type' => 'object', + 'properties' => [ + 'Status' => ['description' => 'Spark作业的状态码。', 'type' => 'string', 'example' => 'success'], + 'UpdateTime' => ['description' => '最后一次更新Spark作业状态的时间,时区为执行作业区域的时区。', 'type' => 'string', 'example' => '2020-10-27 16:23:16'], + 'ExecutorResourceSpec' => ['description' => 'Executor计算资源规格。取值范围:'."\n" + ."\n" + .'- **small**:1Core 4GB'."\n" + ."\n" + .'- **medium**:2Core 8GB'."\n" + ."\n" + .'- **large**:4Core 16GB'."\n" + ."\n" + .'- **xlarge**:8Core 32GB', 'type' => 'string', 'example' => 'small'], + 'CreateTime' => ['description' => 'Spark作业开始执行的时间,时区为执行区域的时区。', 'type' => 'string', 'example' => '2020-10-27 16:23:16'], + 'DriverResourceSpec' => ['description' => 'Driver计算资源规格。取值范围:'."\n" + ."\n" + .'- **small**:1Core 4GB'."\n" + ."\n" + .'- **medium**:2Core 8GB'."\n" + ."\n" + .'- **large**:4Core 16GB'."\n" + ."\n" + .'- **xlarge**:8Core 32GB', 'type' => 'string', 'example' => 'small'], + 'CreateTimeValue' => ['description' => 'Spark作业开始执行的毫秒级时间戳。', 'type' => 'string', 'example' => '1603786996000'], + 'UpdateTimeValue' => ['description' => '最后一次更新Spark作业状态的毫秒级时间戳。', 'type' => 'string', 'example' => '1603786996000'], + 'SparkUI' => ['description' => 'Spark作业的UI,具体请参考[配置Spark UI](~~163470~~)。', 'type' => 'string', 'example' => 'https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx'], + 'LastJobAttemptId' => ['description' => '最近一次尝试执行的Spark作业ID。', 'type' => 'string', 'example' => '202105251618hzslot9906b0b40000005-0001'], + 'SubmitTimeValue' => ['description' => '提交Spark作业的毫秒级时间戳。', 'type' => 'string', 'example' => '1603786996000'], + 'JobName' => ['description' => 'Spark作业的名称。', 'type' => 'string', 'example' => 'SparkPi'], + 'JobId' => ['description' => 'Spark作业的ID。', 'type' => 'string', 'example' => 'j202010271622hangzhouf742a4330000923'], + 'ExecutorInstances' => ['description' => 'Spark作业Executor数量。', 'type' => 'string', 'example' => '1'], + 'VcName' => ['description' => '执行Spark作业的虚拟集群名称。', 'type' => 'string', 'example' => 'MyCluster'], + 'SubmitTime' => ['description' => '提交Spark作业的时间,时区为执行区域的时区。', 'type' => 'string', 'example' => '2020-10-27 16:23:16'], + 'Detail' => ['description' => '定义Spark作业的JSON字符串。', 'type' => 'string', 'example' => '{\\"args\\":[\\"100\\"],\\"name\\":\\"SparkPi\\",\\"className\\":\\"org.apache.spark.examples.SparkPi\\",\\"conf\\":{\\"spark.driver.resourceSpec\\":\\"medium\\",\\"spark.executor.instances\\":5,\\"spark.executor.resourceSpec\\":\\"medium\\"},\\"file\\":\\"local:///tmp/spark-examples.jar\\"}'], + ], ], ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"JobId\\": \\"j202011032013hangzhouf742a4330003679\\",\\n \\"RequestId\\": \\"C039FD4D-2F3C-4556-AF09-864D3A6485B2\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>C039FD4D-2F3C-4556-AF09-864D3A6485B2</RequestId>\\n<JobId>j202011032013hangzhouf742a4330003679</JobId>","errorExample":""}]', - 'title' => '提交一个Spark作业', - 'summary' => '提交Spark作业。', + 'errorCodes' => [], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"5F10AB6E-8984-4E32-B821-4E1512711B8C\\",\\n \\"JobDetail\\": {\\n \\"Status\\": \\"success\\",\\n \\"UpdateTime\\": \\"2020-10-27 16:23:16\\",\\n \\"ExecutorResourceSpec\\": \\"small\\",\\n \\"CreateTime\\": \\"2020-10-27 16:23:16\\",\\n \\"DriverResourceSpec\\": \\"small\\",\\n \\"CreateTimeValue\\": \\"1603786996000\\",\\n \\"UpdateTimeValue\\": \\"1603786996000\\",\\n \\"SparkUI\\": \\"https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx\\",\\n \\"LastJobAttemptId\\": \\"202105251618hzslot9906b0b40000005-0001\\",\\n \\"SubmitTimeValue\\": \\"1603786996000\\",\\n \\"JobName\\": \\"SparkPi\\",\\n \\"JobId\\": \\"j202010271622hangzhouf742a4330000923\\",\\n \\"ExecutorInstances\\": \\"1\\",\\n \\"VcName\\": \\"MyCluster\\",\\n \\"SubmitTime\\": \\"2020-10-27 16:23:16\\",\\n \\"Detail\\": \\"{\\\\\\\\\\\\\\"args\\\\\\\\\\\\\\":[\\\\\\\\\\\\\\"100\\\\\\\\\\\\\\"],\\\\\\\\\\\\\\"name\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"SparkPi\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"className\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"org.apache.spark.examples.SparkPi\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"conf\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"spark.driver.resourceSpec\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"medium\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"spark.executor.instances\\\\\\\\\\\\\\":5,\\\\\\\\\\\\\\"spark.executor.resourceSpec\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"medium\\\\\\\\\\\\\\"},\\\\\\\\\\\\\\"file\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"local:///tmp/spark-examples.jar\\\\\\\\\\\\\\"}\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<JobDetail>\\n <Status>success</Status>\\n <VcName>MyCluser</VcName>\\n <ExecutorInstances>5</ExecutorInstances>\\n <LastJobAttemptId>j202010271622hangzhouf742a4330000923-0001</LastJobAttemptId>\\n <SparkUI>https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx</SparkUI>\\n <DriverResourceSpec>medium</DriverResourceSpec>\\n <CreateTime>2020-10-27 16:23:16</CreateTime>\\n <JobName>SparkPi</JobName>\\n <ExecutorResourceSpec>medium</ExecutorResourceSpec>\\n <SubmitTime>2020-10-27 16:22:52</SubmitTime>\\n <CreateTimeValue>1603786996000</CreateTimeValue>\\n <UpdateTimeValue>1603787047000</UpdateTimeValue>\\n <SubmitTimeValue>1603786972000</SubmitTimeValue>\\n <UpdateTime>2020-10-27 16:24:07</UpdateTime>\\n <JobId>j202010271622hangzhouf742a4330000923</JobId>\\n <Detail>{\\"args\\":[\\"100\\"],\\"name\\":\\"SparkPi\\",\\"className\\":\\"org.apache.spark.examples.SparkPi\\",\\"conf\\":{\\"spark.driver.resourceSpec\\":\\"medium\\",\\"spark.executor.instances\\":5,\\"spark.executor.resourceSpec\\":\\"medium\\"},\\"file\\":\\"local:///tmp/spark-examples.jar\\"}</Detail>\\n</JobDetail>\\n<RequestId>5F10AB6E-8984-4E32-B821-4E1512711B8C</RequestId>","errorExample":""}]', + 'title' => '获取一个 Spark作业的详细信息', + 'summary' => '调用GetJobDetail获取Spark作业的详细信息。', 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', + 'responseParamsDescription' => '**作业的状态码如下表**'."\n" + .'| 状态码 | 语义 |'."\n" + .'|----------|--------------------------------------|'."\n" + .'| starting | 启动中,作业尚未执行。 |'."\n" + .'| running | 作业在执行中。 |'."\n" + .'| error | 作业中的程序执行失败,抛出了Exception。 |'."\n" + .'| dead | 作业因为资源不足等问题失败。 |'."\n" + .'| killed | 作业在执行中被取消。 |'."\n" + .'| success | 作业执行成功。 |', 'extraInfo' => ' ', - ], - 'KillSparkJob' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'GetJobLog' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [], + 'systemTags' => ['operationType' => 'get'], 'parameters' => [ [ - 'name' => 'VcName', + 'name' => 'JobId', 'in' => 'formData', - 'schema' => [ - 'description' => '执行Spark作业的虚拟集群名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'MyCluster', - ], + 'schema' => ['description' => 'Spark作业的ID。您可以登录[DLA控制台](https://datalakeanalytics.console.aliyun.com/),在作业任务列表中获取作业任务ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202010271622hangzhouf742a4330000923'], ], [ - 'name' => 'JobId', + 'name' => 'VcName', 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业的ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202011031935hangzhouf742a4330003667', - ], + 'schema' => ['description' => '执行作业的虚拟集群名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MyCluster'], ], ], 'responses' => [ @@ -699,95 +375,46 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Data' => [ - 'description' => '执行结果,`deleted`代表执行成功。', - 'type' => 'string', - 'example' => 'deleted', - ], - 'RequestId' => [ - 'description' => '请求的唯一ID。', - 'type' => 'string', - 'example' => '3970ACB5-3E30-4A3A-B63A-1790FCC261F4', - ], + 'Data' => ['description' => '作业的日志内容。', 'type' => 'string', 'example' => 'INFO SparkContext: Running Spark version 2.x'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'EC031B4B-3E07-40D2-9BC5-xxxx'], ], ], ], ], 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"deleted\\",\\n \\"RequestId\\": \\"3970ACB5-3E30-4A3A-B63A-1790FCC261F4\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>3970ACB5-3E30-4A3A-B63A-1790FCC261F4</RequestId>\\n<Data>deleted</Data>","errorExample":""}]', - 'title' => '强行停止一个运行中的Spark作业', - 'summary' => '调用KillSparkJob强行停止一个运行中的Spark作业。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"INFO SparkContext: Running Spark version 2.x\\",\\n \\"RequestId\\": \\"EC031B4B-3E07-40D2-9BC5-xxxx\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>3970ACB5-3E30-4A3A-B63A-xxxx</RequestId>\\n<Data>Running Spark version 2.x</Data>","errorExample":""}]', + 'title' => '获取Spark作业的日志', + 'summary' => '获取Spark作业的日志。', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'CreateInstance' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'GetJobStatus' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - ], + 'systemTags' => ['operationType' => 'get'], 'parameters' => [ [ - 'name' => 'RegionId', - 'in' => 'formData', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => 'cn-beijing', - ], - ], - [ - 'name' => 'ChargeType', - 'in' => 'formData', - 'schema' => [ - 'description' => '固定为**POSTPAY**。暂只支持创建后付费实例。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'POSTPAY', - ], - ], - [ - 'name' => 'InstanceType', + 'name' => 'JobId', 'in' => 'formData', - 'schema' => [ - 'description' => '实例类型,取值说明:'."\n" - ."\n" - .'- **CU_SPARK**:云原生Spark引擎。'."\n" - ."\n" - .'- **CU_PRESTO**:兼容开源Presto语法。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'CU_PRESTO', - ], + 'schema' => ['description' => 'Spark作业的ID。您可以登录[DLA控制台](https://datalakeanalytics.console.aliyun.com/),在作业任务列表中获取作业任务ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202011031935hangzhouf742a4330003667'], ], [ - 'name' => 'Component', + 'name' => 'VcName', 'in' => 'formData', - 'schema' => [ - 'description' => 'component模块的JSON序列化。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '"{\\"operable\\":\\"false\\",\\"max_cu\\":\\"8\\",\\"instance_name\\":\\"api-test-9\\",\\"min_cu\\":\\"0\\",\\"engine\\":\\"spark\\",\\"region\\":\\"cn-hangzhou\\",\\"app_name\\":\\"xx\\",\\"app_version_name\\":\\"xx\\"}"', - ], + 'schema' => ['description' => '执行作业的虚拟集群名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MyCluster'], ], ], 'responses' => [ @@ -795,101 +422,48 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '312F48C7-AFA0-46AA-B8F6-1B16B8808045', - ], - 'ErrorInfo' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => 'An internal error occurred', - ], - 'Result' => [ - 'description' => '返回的创建实例的结果。', - 'type' => 'string', - 'example' => 'true', - ], - 'ErrorCode' => [ - 'description' => '错误码。', - 'type' => 'string', - 'example' => '600', - ], - 'Success' => [ - 'description' => '请求是否调用成功。', - 'type' => 'boolean', - 'example' => 'true', - ], + 'Status' => ['description' => '作业执行状态码。', 'type' => 'string', 'example' => 'success'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '5C3F9ADD-2350-4C21-A3A1-A906F8DF8016'], ], ], ], ], - 'errorCodes' => [ - 401 => [ - [ - 'errorCode' => 'Openanalytics.Unauthorized.Exception', - 'errorMessage' => 'You do not have permission to perform the operation.', - ], - ], - 404 => [ - [ - 'errorCode' => 'Openanalytics.NotFound.Exception', - 'errorMessage' => 'The specified instance does not exist.', - ], - ], - 600 => [ - [ - 'errorCode' => 'Openanalytics.Internal.Exception', - 'errorMessage' => 'An internal error occurred.', - ], - ], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"312F48C7-AFA0-46AA-B8F6-1B16B8808045\\",\\n \\"ErrorInfo\\": \\"An internal error occurred\\",\\n \\"Result\\": \\"true\\",\\n \\"ErrorCode\\": \\"600\\",\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"<RequestId>312F48C7-AFA0-46AA-B8F6-1B16B8808045</RequestId>\\n<ErrorInfo>An internal error occurred</ErrorInfo>\\n<ErrorCode>600</ErrorCode>\\n<Success>true</Success>\\n<Result>true</Result>","errorExample":""}]', - 'title' => '创建实例', - 'summary' => '调用CreateInstance创建实例。', + 'errorCodes' => [], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Status\\": \\"success\\",\\n \\"RequestId\\": \\"5C3F9ADD-2350-4C21-A3A1-A906F8DF8016\\"\\n}","errorExample":""},{"type":"xml","example":"<Status>success</Status>\\n<RequestId>5C3F9ADD-2350-4C21-A3A1-A906F8DF8016</RequestId>","errorExample":""}]', + 'title' => '获取Spark作业的执行状态', + 'summary' => '获取Spark作业的执行状态。', 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', + 'responseParamsDescription' => '**作业的状态码如下表**'."\n" + .'| 状态码 | 语义 |'."\n" + .'|----------|--------------------------------------|'."\n" + .'| starting | 启动中,作业尚未执行。 |'."\n" + .'| running | 作业在执行中。 |'."\n" + .'| error | 作业中的程序执行失败,抛出Exception。 |'."\n" + .'| dead | 作业因为资源问题等执行失败。 |'."\n" + .'| killed | 执行中的作业被取消。 |'."\n" + .'| success | 作业执行成功。 |', 'extraInfo' => ' ', - ], - 'ReleaseInstance' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'GetSparkSessionState' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'readAndWrite', - 'deprecated' => false, 'systemTags' => [], 'parameters' => [ [ - 'name' => 'RegionId', - 'in' => 'formData', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => 'cn-beijing', - ], - ], - [ - 'name' => 'InstanceId', + 'name' => 'JobId', 'in' => 'formData', - 'schema' => [ - 'description' => '实例ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'dla-3qntmdtbqklsbsmceu****', - ], + 'schema' => ['description' => 'Spark作业的ID。您可以登录[DLA控制台](https://datalakeanalytics.console.aliyun.com/),在作业任务列表中获取作业任务ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202104171040zjkb4cc449d0000000'], ], ], 'responses' => [ @@ -897,93 +471,43 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '312F48C7-AFA0-46AA-B8F6-1B16B8808045', - ], - 'ErrorInfo' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => 'An internal error occurred', - ], - 'Result' => [ - 'description' => '返回的释放实例的结果。', - 'type' => 'string', - 'example' => 'true', - ], - 'ErrorCode' => [ - 'description' => '错误码。', - 'type' => 'string', - 'example' => '600', - ], - 'Success' => [ - 'description' => '请求是否调用成功。', - 'type' => 'boolean', - 'example' => 'true', - ], + 'State' => ['description' => 'Spark作业的各种内部状态,如running、success、starting、killing、failed,等等', 'type' => 'string', 'example' => 'killed'], + 'RequestId' => ['description' => '阿里云为该请求生成的唯一标识符。', 'type' => 'string', 'example' => '9AD49396-8F80-5511-9268-A6360B205136'], ], ], ], ], - 'errorCodes' => [ - 401 => [ - [ - 'errorCode' => 'Openanalytics.Unauthorized.Exception', - 'errorMessage' => 'You do not have permission to perform the operation.', - ], - ], - 404 => [ - [ - 'errorCode' => 'Openanalytics.NotFound.Exception', - 'errorMessage' => 'The specified instance does not exist.', - ], - ], - 600 => [ - [ - 'errorCode' => 'Openanalytics.Internal.Exception', - 'errorMessage' => 'An internal error occurred.', - ], - ], + 'errorCodes' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"State\\": \\"killed\\",\\n \\"RequestId\\": \\"9AD49396-8F80-5511-9268-A6360B205136\\"\\n}","type":"json"}]', + 'title' => '获取可交互Spark作业的状态', + 'summary' => '获取可交互Spark作业的状态。', + 'description' => '获取当前Session的状态', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"312F48C7-AFA0-46AA-B8F6-1B16B8808045\\",\\n \\"ErrorInfo\\": \\"An internal error occurred\\",\\n \\"Result\\": \\"true\\",\\n \\"ErrorCode\\": \\"600\\",\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"<requestId>312F48C7-AFA0-46AA-B8F6-1B16B8808045</requestId>\\n<result>true</result>\\n<success>true</success>","errorExample":""}]', - 'title' => '释放实例', - 'summary' => '调用ReleaseInstance释放实例。', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', + 'ramActions' => [], ], - 'ValidateVirtualClusterName' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetSparkStatement' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'operationType' => 'readAndWrite', + 'systemTags' => [], 'parameters' => [ [ - 'name' => 'VcName', + 'name' => 'StatementId', 'in' => 'formData', - 'schema' => [ - 'description' => '需要校验的虚拟集群的名称。', - 'type' => 'string', - 'required' => false, - 'example' => 'abc123', - ], + 'schema' => ['description' => '此Spark作业中代码块的唯一id', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'minimum' => '0', 'example' => '1'], + ], + [ + 'name' => 'JobId', + 'in' => 'formData', + 'schema' => ['description' => 'Spark作业的唯一id', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202106071620hangzhou00000000001'], ], ], 'responses' => [ @@ -991,59 +515,51 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'C039FD4D-2F3C-4556-AF09-864D3A6485B2', - ], + 'RequestId' => ['description' => '请求的唯一id', 'type' => 'string', 'example' => 'C5DB60E0-6EB3-493C-8956-DA0D3A2EE656'], 'Data' => [ - 'description' => '校验返回的数据。', + 'description' => '描述了此段代码块的执行状态', 'type' => 'object', 'properties' => [ - 'Message' => [ - 'description' => '如果虚拟集群名称不合法,上报的错误信息。', - 'type' => 'string', - 'example' => 'null', - ], - 'Legal' => [ - 'description' => '校验返回值,是否合法。取值:'."\n" - ."\n" - .'- **true**:合法'."\n" - ."\n" - .'- **false**:不合法', - 'type' => 'string', - 'example' => 'true', - ], + 'Process' => ['description' => '代码当前执行进度, 为浮点数,`1`代表100%执行完成, `0.5` 代表执行了50%', 'type' => 'number', 'format' => 'float', 'example' => '0.5'], + 'CompletedTime' => ['description' => '代码执行结束的毫秒级时间戳', 'type' => 'integer', 'format' => 'int64', 'example' => '1623033200754'], + 'State' => ['description' => '代码块的执行状态, 可能的状态有'."\n" + ."\n" + .'- waiting 等待执行'."\n" + .'- running 正在还行'."\n" + .'- available 执行完成'."\n" + .'- error 执行失败'."\n" + .'- cancelling 在尝试终止'."\n" + .'- cancelled 已经终止执行', 'type' => 'string', 'example' => 'running'], + 'StartedTime' => ['description' => '代码开始执行的毫秒级时间戳', 'type' => 'integer', 'format' => 'int64', 'example' => '1623033200750'], + 'Code' => ['description' => '提交的代码块', 'type' => 'string', 'example' => 'print(2+2)'], + 'Output' => ['description' => '代码块的执行结果, 执行结果是一个JSON格式的字符串, 其结构如下'."\n" + ."\n" + .'- status 执行状态'."\n" + .'- execution_count 当前执行到此代码块的哪一行'."\n" + .'- data 代码执行结果', 'type' => 'string', 'example' => '"{\\"status\\":\\"ok\\",\\"execution_count\\":1,\\"data\\":{\\"text/plain\\":\\"4\\"}}"'], + 'Id' => ['description' => '代码块在此Spark作业中的唯一递增id', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], ], ], ], ], ], ], - 'errorCodes' => [ - 404 => [ - [ - 'errorCode' => 'EmptyResult', - 'errorMessage' => 'The result is empty.', - ], - ], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C039FD4D-2F3C-4556-AF09-864D3A6485B2\\",\\n \\"Data\\": {\\n \\"Message\\": \\"null\\",\\n \\"Legal\\": \\"true\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>C039FD4D-2F3C-4556-AF09-864D3A6485B2</RequestId>\\n<Data>\\n <Message>null</Message>\\n <Legal>true</Legal>\\n</Data>","errorExample":""}]', - 'title' => '校验虚拟集群的名字是否合法', - 'summary' => '调用ValidateVirtualClusterName校验虚拟集群的名字是否合法。', + 'errorCodes' => [], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C5DB60E0-6EB3-493C-8956-DA0D3A2EE656\\",\\n \\"Data\\": {\\n \\"Process\\": 0.5,\\n \\"CompletedTime\\": 1623033200754,\\n \\"State\\": \\"running\\",\\n \\"StartedTime\\": 1623033200750,\\n \\"Code\\": \\"print(2+2)\\",\\n \\"Output\\": \\"\\\\\\"{\\\\\\\\\\\\\\"status\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"ok\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"execution_count\\\\\\\\\\\\\\":1,\\\\\\\\\\\\\\"data\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"text/plain\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"4\\\\\\\\\\\\\\"}}\\\\\\"\\",\\n \\"Id\\": 1\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>C5DB60E0-6EB3-493C-8956-DA0D3A2EE656</RequestId>\\n<Data>\\n <CompletedTime>1623033200754</CompletedTime>\\n <State>available</State>\\n <Output>{\\"status\\":\\"ok\\",\\"execution_count\\":1,\\"data\\":{\\"text/plain\\":\\"4\\"}}</Output>\\n <StartedTime>1623033200753</StartedTime>\\n <Process>1</Process>\\n <Id>1</Id>\\n <Code>print(2 + 2)\\n</Code>\\n</Data>","errorExample":""}]', + 'title' => '获取代码块的执行状态', + 'summary' => '获取指定代码块的执行状态。', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'SubmitSparkSQL' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'KillSparkJob' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1056,24 +572,12 @@ [ 'name' => 'VcName', 'in' => 'formData', - 'schema' => [ - 'description' => '执行SparkSQL作业的虚拟集群名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'MySparkCluster', - ], + 'schema' => ['description' => '执行Spark作业的虚拟集群名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MyCluster'], ], [ - 'name' => 'Sql', + 'name' => 'JobId', 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark SQL内容。具体请参考[Spark SQL](~~185724~~)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'set spark.driver.resourceSpec=medium;set spark.executor.instances=5; set spark.executor.resourceSpec=medium; set spark.app.name=sparksqltest; show databases;', - ], + 'schema' => ['description' => 'Spark作业的ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202011031935hangzhouf742a4330003667'], ], ], 'responses' => [ @@ -1081,65 +585,57 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'JobId' => [ - 'description' => 'Spark作业的ID。', - 'type' => 'string', - 'example' => 'j202104261729hangzhou224ee5230000930', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'B570310A-8A49-461B-B81D-AE0B58D63DA4', - ], + 'Data' => ['description' => '执行结果,`deleted`代表执行成功。', 'type' => 'string', 'example' => 'deleted'], + 'RequestId' => ['description' => '请求的唯一ID。', 'type' => 'string', 'example' => '3970ACB5-3E30-4A3A-B63A-1790FCC261F4'], ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"JobId\\": \\"j202104261729hangzhou224ee5230000930\\",\\n \\"RequestId\\": \\"B570310A-8A49-461B-B81D-AE0B58D63DA4\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>B570310A-8A49-461B-B81D-AE0B58D63DA4</RequestId>\\n<JobId>j202104261729hangzhou224ee5230000930</JobId>","errorExample":""}]', - 'title' => '提交 Spark SQL 作业', - 'summary' => '提交SubmitSQL作业。', + 'errorCodes' => [], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"deleted\\",\\n \\"RequestId\\": \\"3970ACB5-3E30-4A3A-B63A-1790FCC261F4\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>3970ACB5-3E30-4A3A-B63A-1790FCC261F4</RequestId>\\n<Data>deleted</Data>","errorExample":""}]', + 'title' => '强行停止一个运行中的Spark作业', + 'summary' => '调用KillSparkJob强行停止一个运行中的Spark作业。', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'CancelSparkStatement' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'ListSparkJob' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', - 'systemTags' => [], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get'], 'parameters' => [ [ - 'name' => 'StatementId', - 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业中代码块的唯一ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '2026****', - ], + 'name' => 'VcName', + 'in' => 'query', + 'schema' => ['description' => '执行Spark作业的虚拟集群名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MySparkCluster'], ], [ - 'name' => 'JobId', - 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业的唯一ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202106071620hangzhou****', - ], + 'name' => 'PageNumber', + 'in' => 'query', + 'schema' => ['description' => '指定需要查询的页码号,用于遍历全部数据,页码的编码从1开始。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '1'], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => '每页返回的作业的个数。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '10'], + ], + [ + 'name' => 'Condition', + 'in' => 'query', + 'style' => 'json', + 'schema' => ['description' => '提取Spark虚拟集群的历史作业详情信息的过滤条件,不填写表示没有过滤条件。'."\n", 'type' => 'object', 'required' => false, 'example' => '{ "createTime":"2020-12-28 09:00:00", "jobName":"SparkPi" }'], ], ], 'responses' => [ @@ -1147,83 +643,114 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Data' => [ - 'description' => '是否终止成功,取值说明:'."\n" - ."\n" - .'- **true**:终止成功。'."\n" - .'- **false**:终止失败。', - 'type' => 'string', - 'example' => 'true', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '341ADFA1-4A68-4707-9CA7-FA86523A5F14', + 'RequestId' => ['description' => '本次请求的唯一编码。', 'type' => 'string', 'example' => 'E18B0634-F003-486A-90B9-4AA6932DA3AA'], + 'DataResult' => [ + 'description' => '虚拟集群的历史作业结果列表。', + 'type' => 'object', + 'properties' => [ + 'PageNumber' => ['description' => '当前请求返回的页码。', 'type' => 'string', 'example' => '1'], + 'PageSize' => ['description' => '当前请求返回的每页作业数量。', 'type' => 'string', 'example' => '10'], + 'TotalCount' => ['description' => '当前可查询的历史作业的总数。', 'type' => 'string', 'example' => '4998'], + 'JobList' => [ + 'description' => '历史作业详情数组。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Status' => ['description' => '作业的状态码。', 'type' => 'string', 'example' => 'running'], + 'UpdateTime' => ['description' => '最后一次更新作业状态的时间,时区为该集群所在的地域的时区。', 'type' => 'string', 'example' => '2020-10-27 17:51:05'], + 'ExecutorResourceSpec' => ['description' => '作业所申请的Executor的规格。', 'type' => 'string', 'example' => 'small'], + 'CreateTime' => ['description' => '创建Spark作业的时间点,时区为该集群所在的地域的时区。', 'type' => 'string', 'example' => '2020-10-27 17:51:05'], + 'CreateTimeValue' => ['description' => '创建Spark作业的毫秒级时间戳。', 'type' => 'string', 'example' => '1603792267000'], + 'DriverResourceSpec' => ['description' => '作业所申请的Driver的实例规格。', 'type' => 'string', 'example' => 'small'], + 'UpdateTimeValue' => ['description' => '最后一次更新作业状态的毫秒级时间戳。', 'type' => 'string', 'example' => '1603792267000'], + 'SparkUI' => ['description' => 'Spark作业的UI,具体请参考文档[Spark UI](~~163470~~)。', 'type' => 'string', 'example' => 'https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx'], + 'SubmitTimeValue' => ['description' => '提交作业的毫秒级时间戳。', 'type' => 'string', 'example' => '1603792267000'], + 'JobName' => ['description' => 'Spark作业的名称。', 'type' => 'string', 'example' => 'SparkPi'], + 'JobId' => ['description' => 'Spark作业的ID。', 'type' => 'string', 'example' => 'j202010271750hangzhouf742a4330000950'], + 'VcName' => ['description' => '执行作业的虚拟集群名称。', 'type' => 'string', 'example' => 'MyCluster'], + 'ExecutorInstances' => ['description' => '作业所申请的Executor的数量。', 'type' => 'string', 'example' => '100'], + 'SubmitTime' => ['description' => '提交作业的时间,时区为该集群所在的地域的时区。', 'type' => 'string', 'example' => '2020-10-27 17:51:05'], + 'Detail' => ['description' => '描述此作业的JSON格式的字符串。', 'type' => 'string', 'example' => '{"args":["100"],"name":...}'], + ], + ], + ], + ], ], ], ], ], ], 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"true\\",\\n \\"RequestId\\": \\"341ADFA1-4A68-4707-9CA7-FA86523A5F14\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>341ADFA1-4A68-4707-9CA7-FA86523A5F14</RequestId>\\n<Data>true</Data>","errorExample":""}]', - 'title' => '终止一个代码块的执行', - 'summary' => '终止一个代码块的执行。', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => '此操作为异步操作, 当返回`true`时代表Spark作业收到了终止命令, 开始尝试终止代码块, 但最终能否成功依赖实际运行情况. '."\n" - .'后续应当通过`GetSparkStatement`接口来查看最终是否终止成功.', - ], - 'ExecuteSparkStatement' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E18B0634-F003-486A-90B9-4AA6932DA3AA\\",\\n \\"DataResult\\": {\\n \\"PageNumber\\": \\"1\\",\\n \\"PageSize\\": \\"10\\",\\n \\"TotalCount\\": \\"4998\\",\\n \\"JobList\\": [\\n {\\n \\"Status\\": \\"running\\",\\n \\"UpdateTime\\": \\"2020-10-27 17:51:05\\",\\n \\"ExecutorResourceSpec\\": \\"small\\",\\n \\"CreateTime\\": \\"2020-10-27 17:51:05\\",\\n \\"CreateTimeValue\\": \\"1603792267000\\",\\n \\"DriverResourceSpec\\": \\"small\\",\\n \\"UpdateTimeValue\\": \\"1603792267000\\",\\n \\"SparkUI\\": \\"https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx\\",\\n \\"SubmitTimeValue\\": \\"1603792267000\\",\\n \\"JobName\\": \\"SparkPi\\",\\n \\"JobId\\": \\"j202010271750hangzhouf742a4330000950\\",\\n \\"VcName\\": \\"MyCluster\\",\\n \\"ExecutorInstances\\": \\"100\\",\\n \\"SubmitTime\\": \\"2020-10-27 17:51:05\\",\\n \\"Detail\\": \\"{\\\\\\"args\\\\\\":[\\\\\\"100\\\\\\"],\\\\\\"name\\\\\\":...}\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<DataResult>\\n <TotalCount>4998</TotalCount>\\n <PageSize>2</PageSize>\\n <PageNumber>1</PageNumber>\\n <JobList>\\n <ExecutorInstances>2</ExecutorInstances>\\n <Status>success</Status>\\n <VcName>MyCluster</VcName>\\n <SparkUI>https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx</SparkUI>\\n <DriverResourceSpec>small</DriverResourceSpec>\\n <CreateTime>2020-10-27 17:51:07</CreateTime>\\n <JobName>localFile</JobName>\\n <ExecutorResourceSpec>small</ExecutorResourceSpec>\\n <SubmitTime>2020-10-27 17:50:43</SubmitTime>\\n <CreateTimeValue>1603792267000</CreateTimeValue>\\n <UpdateTimeValue>1603792302000</UpdateTimeValue>\\n <SubmitTimeValue>1603792243000</SubmitTimeValue>\\n <UpdateTime>2020-10-27 17:51:42</UpdateTime>\\n <Detail>{\\"args\\":[\\"100\\"],\\"name\\"f}</Detail>\\n <JobId>j202010271750hangzhouf742a4330000950</JobId>\\n </JobList>\\n <JobList>\\n <ExecutorInstances>2</ExecutorInstances>\\n <Status>error</Status>\\n <VcName>MyCluster</VcName>\\n <SparkUI>https://dlaui-cn-hangzhou.aliyuncs.com/?token=xxx</SparkUI>\\n <DriverResourceSpec>small</DriverResourceSpec>\\n <CreateTime>2020-10-27 17:51:05</CreateTime>\\n <JobName>localFile</JobName>\\n <ExecutorResourceSpec>small</ExecutorResourceSpec>\\n <SubmitTime>2020-10-27 17:50:39</SubmitTime>\\n <CreateTimeValue>1603792265000</CreateTimeValue>\\n <UpdateTimeValue>1603792300000</UpdateTimeValue>\\n <SubmitTimeValue>1603792239000</SubmitTimeValue>\\n <UpdateTime>2020-10-27 17:51:40</UpdateTime>\\n <Detail>{\\"args\\":[\\"100\\"],\\"name\\"f}</Detail>\\n <JobId>j202010271750hangzhouf742a4330000949</JobId>\\n </JobList>\\n</DataResult>\\n<RequestId>E18B0634-F003-486A-90B9-4AA6932DA3AA</RequestId>","errorExample":""}]', + 'title' => '提取数据湖分析Spark虚拟集群历史作业信息', + 'summary' => '分页提取某个数据湖分析Spark虚拟集群的历史作业详情信息。', + 'requestParamsDescription' => ' Condition是一个JSON格式的字符串,目前支持如下参数。'."\n" + .'- status:Spark作业的状态,取值如下。'."\n" + .' - starting:提交中。'."\n" + .' - running:运行中。'."\n" + .' - success:成功。'."\n" + .' - error:运行失败。'."\n" + .' - killed:被取消。'."\n" + .' - unknown:未知状态。'."\n" + .' - dead:启动失败。'."\n" + .'- createTime:代表筛选指定时间之后提交的作业,格式为yyyy-mm-dd HH:mm:ss,指定该参数的时候,同时需要指定timeZone。'."\n" + .'- timeZone:createTime时间串所在的时区,例如 Asia/Shanghai。'."\n" + .'- jobId:Spark作业的ID。'."\n" + .'- jobName:Spark作业的名称,支持局部匹配。', + 'responseParamsDescription' => '**作业的状态码如下表**'."\n" + .'| 状态码 | 语义 |'."\n" + .'|----------|--------------------------------------|'."\n" + .'| starting | 启动中,作业尚未执行。 |'."\n" + .'| running | 作业在执行中。 |'."\n" + .'| error | 作业中的程序执行失败,抛出了Exception。 |'."\n" + .'| dead | 作业因为资源问题等问题失败。 |'."\n" + .'| killed | 作业在执行中被取消。 |'."\n" + .'| success | 作业执行成功。 |', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'ListSparkJobAttempt' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'read', + 'deprecated' => false, 'systemTags' => [], 'parameters' => [ [ - 'name' => 'Code', - 'in' => 'formData', - 'schema' => [ - 'description' => '一段代码块,使用Linux系统的 \'\\n\' 来代表切到新的一行。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'print(2+2)\\n', - ], + 'name' => 'VcName', + 'in' => 'query', + 'schema' => ['description' => '执行Spark作业的虚拟集群名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'release-test'], ], [ - 'name' => 'JobId', - 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业的ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202106071620hangzhou****', - ], + 'name' => 'PageNumber', + 'in' => 'query', + 'schema' => ['description' => '需要查询的页码号,用于遍历全部数据,页码的编码从1开始。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'maximum' => '1000', 'minimum' => '1', 'example' => '1'], ], [ - 'name' => 'Kind', - 'in' => 'formData', - 'schema' => [ - 'description' => '执行代码的语言是什么, 取值:'."\n" - .'- **scala**'."\n" - .'- **python**'."\n" - .'- **sql**', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => 'sql', - ], + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => '每页返回的作业的个数。', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'maximum' => '100', 'minimum' => '1', 'example' => '10'], + ], + [ + 'name' => 'Condition', + 'in' => 'query', + 'style' => 'json', + 'schema' => ['description' => 'JobAttempt过滤条件,JSON格式。'."\n", 'type' => 'object', 'required' => false, 'example' => '{"status":"success", "createTime":"2021-05-27 11:00:00", "timeZone":"Asia/Shanghai"}'], + ], + [ + 'name' => 'JobId', + 'in' => 'query', + 'schema' => ['description' => 'Spark作业ID。您可以在作业管理页面查看作业ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202105272322hangzhou5d64f1560000128'], ], ], 'responses' => [ @@ -1231,55 +758,75 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Data' => [ - 'description' => '代码块提交成功后在此Spark作业中的唯一ID。', - 'type' => 'string', - 'example' => '2', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '0DC5B6F080E8-0DC5B6F080E8-0DC5B', + 'RequestId' => ['description' => '请求的唯一ID。', 'type' => 'string', 'example' => '4A839055-70C7-423D-A6F2-E714EA4502DB'], + 'DataResult' => [ + 'description' => '返回结果。', + 'type' => 'object', + 'properties' => [ + 'PageNumber' => ['description' => '页数', 'type' => 'string', 'example' => '1'], + 'PageSize' => ['description' => '页大小', 'type' => 'string', 'example' => '10'], + 'TotalCount' => ['description' => 'JobAttempt总数', 'type' => 'string', 'example' => '1'], + 'JobAttemptList' => [ + 'description' => 'JobAttempt列表', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Status' => ['description' => 'JobAttempt状态', 'type' => 'string', 'example' => 'success'], + 'DurationTime' => ['description' => 'JobAttempt持续时间', 'type' => 'string', 'example' => '00:01:12'], + 'TerminatedTime' => ['description' => '终止时间', 'type' => 'string', 'example' => '2021-05-27 23:23:20'], + 'DurationTimeValue' => ['description' => '持续时间戳', 'type' => 'string', 'example' => '72000'], + 'CreateTime' => ['description' => 'JobAttempt创建时间', 'type' => 'string', 'example' => '2021-05-27 23:22:08'], + 'CreateTimeValue' => ['description' => 'JobAttempt创建时间戳', 'type' => 'string', 'example' => '1622128928000'], + 'SparkUI' => ['description' => 'SparkUI地址', 'type' => 'string', 'example' => 'xxx'], + 'JobAttemptId' => ['description' => '作业尝试ID', 'type' => 'string', 'example' => 'j202105272322hangzhou5d64f1560000128-0001'], + 'JobName' => ['description' => '作业名称', 'type' => 'string', 'example' => 'xxx'], + 'JobId' => ['description' => '作业ID', 'type' => 'string', 'example' => 'j202105272322hangzhou5d64f1560000128'], + 'TerminatedTimeValue' => ['description' => '终止时间戳', 'type' => 'string', 'example' => '1622129000000'], + 'VcName' => ['description' => '虚拟集群名称', 'type' => 'string', 'example' => 'release-test'], + 'Detail' => ['description' => '作业配置', 'type' => 'string', 'example' => '{"xxx":"xxx"}'], + ], + ], + ], + ], ], ], ], ], ], 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"2\\",\\n \\"RequestId\\": \\"0DC5B6F080E8-0DC5B6F080E8-0DC5B\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>0DC5B6F080E8-0DC5B6F080E8-0DC5B</RequestId>\\n<Data>2</Data>","errorExample":""}]', - 'title' => '执行Spark代码块作业', - 'summary' => '提交一段代码块给Spark作业执行。', - 'requestParamsDescription' => ' ', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4A839055-70C7-423D-A6F2-E714EA4502DB\\",\\n \\"DataResult\\": {\\n \\"PageNumber\\": \\"1\\",\\n \\"PageSize\\": \\"10\\",\\n \\"TotalCount\\": \\"1\\",\\n \\"JobAttemptList\\": [\\n {\\n \\"Status\\": \\"success\\",\\n \\"DurationTime\\": \\"00:01:12\\",\\n \\"TerminatedTime\\": \\"2021-05-27 23:23:20\\",\\n \\"DurationTimeValue\\": \\"72000\\",\\n \\"CreateTime\\": \\"2021-05-27 23:22:08\\",\\n \\"CreateTimeValue\\": \\"1622128928000\\",\\n \\"SparkUI\\": \\"xxx\\",\\n \\"JobAttemptId\\": \\"j202105272322hangzhou5d64f1560000128-0001\\",\\n \\"JobName\\": \\"xxx\\",\\n \\"JobId\\": \\"j202105272322hangzhou5d64f1560000128\\",\\n \\"TerminatedTimeValue\\": \\"1622129000000\\",\\n \\"VcName\\": \\"release-test\\",\\n \\"Detail\\": \\"{\\\\\\"xxx\\\\\\":\\\\\\"xxx\\\\\\"}\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<DataResult>\\n <TotalCount>1</TotalCount>\\n <PageSize>10</PageSize>\\n <PageNumber>1</PageNumber>\\n <JobAttemptList>\\n <VcName>release-test</VcName>\\n <Status>success</Status>\\n <JobAttemptId>j202105272322hangzhou5d64f1560000128-0001</JobAttemptId>\\n <TerminatedTime>2021-05-27 23:23:20</TerminatedTime>\\n <SparkUI>xxx</SparkUI>\\n <DurationTimeValue>72000</DurationTimeValue>\\n <CreateTime>2021-05-27 23:22:08</CreateTime>\\n <JobName>xxx</JobName>\\n <TerminatedTimeValue>1622129000000</TerminatedTimeValue>\\n <JobId>j202105272322hangzhou5d64f1560000128</JobId>\\n <Detail>{\\"xxx\\":\\"xxx\\"}</Detail>\\n <CreateTimeValue>1622128928000</CreateTimeValue>\\n <DurationTime>00:01:12</DurationTime>\\n </JobAttemptList>\\n</DataResult>\\n<RequestId>4A839055-70C7-423D-A6F2-E714EA4502DB</RequestId>","errorExample":""}]', + 'title' => '获取 Spark 作业记录列表', + 'summary' => '获取一个Job对应的所有JobAttempt信息。', + 'requestParamsDescription' => ' Condition目前支持下列两个参数'."\n" + ."\n" + .'- status: starting、running、unknown、success、dead、killed'."\n" + .'- createTime: 格式为 yyyy-mm-dd HH:mm:ss,代表筛选指定时间之后提交的作业,指定该参数的时候,同时需要指定timeZone'."\n" + .'- timeZone: 例如 Asia/Shanghai', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'GetSparkSessionState' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'ListSparkStatements' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'readAndWrite', + 'deprecated' => false, 'systemTags' => [], 'parameters' => [ [ 'name' => 'JobId', 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业的ID。您可以登录[DLA控制台](https://datalakeanalytics.console.aliyun.com/),在作业任务列表中获取作业任务ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202104171040zjkb4cc449d0000000', - ], + 'schema' => ['description' => 'Spark作业的ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'j202106071620hangzhou00000000001'], ], ], 'responses' => [ @@ -1287,66 +834,72 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'State' => [ - 'description' => 'Spark作业的各种内部状态,如running、success、starting、killing、failed,等等', - 'type' => 'string', - 'example' => 'killed', - ], - 'RequestId' => [ - 'description' => '阿里云为该请求生成的唯一标识符。', - 'type' => 'string', - 'example' => '9AD49396-8F80-5511-9268-A6360B205136', + 'RequestId' => ['description' => '请求的唯一标识ID。', 'type' => 'string', 'example' => 'C2AB7692-B9EF-4A50-BCFF-0DC5B6F080E8'], + 'Statements' => [ + 'description' => '代码块执行结果的列表。', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Progress' => ['description' => '当前执行进度,是一个浮点数,代表执行的百分比,‘1’代表100%执行完成。', 'type' => 'number', 'format' => 'float', 'example' => '1'], + 'CompletedTime' => ['description' => '执行完成的毫秒级时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1623033200754'], + 'State' => ['description' => '代码块的执行状态,可能的状态有:'."\n" + ."\n" + .'- waiting:等待执行。'."\n" + .'- running:正在执行。'."\n" + .'- available:执行完成。'."\n" + .'- error:执行失败。'."\n" + .'- cancelling:尝试终止。'."\n" + .'- cancelled:已经终止执行。', 'type' => 'string', 'example' => 'running'], + 'StartedTime' => ['description' => '代码块开始执行的毫秒级时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1623033200750'], + 'Code' => ['description' => '提交执行的代码块。', 'type' => 'string', 'example' => 'print(2 + 2)'], + 'Output' => ['description' => '代码块的执行结果,执行结果是一个JSON格式的字符串,其结构如下。'."\n" + ."\n" + .'- status:执行状态。'."\n" + .'- execution_count:当前执行到此代码块的哪一行。'."\n" + .'- data:代码执行结果。', 'type' => 'string', 'example' => '{\\"status\\":\\"ok\\",\\"execution_count\\":1,\\"data\\":{\\"text/plain\\":\\"4\\"}}'], + 'Id' => ['description' => '代码块的唯一ID。', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + ], + ], ], ], ], ], ], 'errorCodes' => [], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"State\\": \\"killed\\",\\n \\"RequestId\\": \\"9AD49396-8F80-5511-9268-A6360B205136\\"\\n}","type":"json"}]', - 'title' => '获取可交互Spark作业的状态', - 'summary' => '获取可交互Spark作业的状态。', - 'description' => '获取当前Session的状态', - ], - 'GetSparkStatement' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C2AB7692-B9EF-4A50-BCFF-0DC5B6F080E8\\",\\n \\"Statements\\": [\\n {\\n \\"Progress\\": 1,\\n \\"CompletedTime\\": 1623033200754,\\n \\"State\\": \\"running\\",\\n \\"StartedTime\\": 1623033200750,\\n \\"Code\\": \\"print(2 + 2)\\",\\n \\"Output\\": \\"{\\\\\\\\\\\\\\"status\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"ok\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"execution_count\\\\\\\\\\\\\\":1,\\\\\\\\\\\\\\"data\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"text/plain\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"4\\\\\\\\\\\\\\"}}\\",\\n \\"Id\\": 2\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<RequestId>C2AB7692-B9EF-4A50-BCFF-0DC5B6F080E8</RequestId>\\n<Statements>\\n <Progress>1</Progress>\\n <CompletedTime>1623033200078</CompletedTime>\\n <State>available</State>\\n <Output>{\\"status\\":\\"ok\\",\\"execution_count\\":0,\\"data\\":{\\"text/plain\\":\\"<pyspark.sql.session.SparkSession object at 0x7f5e4a550390>\\"}}</Output>\\n <StartedTime>1623033200077</StartedTime>\\n <Id>0</Id>\\n <Code>spark</Code>\\n</Statements>\\n<Statements>\\n <Progress>1</Progress>\\n <CompletedTime>1623033200754</CompletedTime>\\n <State>available</State>\\n <Output>{\\"status\\":\\"ok\\",\\"execution_count\\":1,\\"data\\":{\\"text/plain\\":\\"4\\"}}</Output>\\n <StartedTime>1623033200753</StartedTime>\\n <Id>1</Id>\\n <Code>print(2 + 2)\\n</Code>\\n</Statements>","errorExample":""}]', + 'title' => '获取 Spark 代码块列表', + 'summary' => '获取Spark Session的所有代码块的执行状态。', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'ReleaseInstance' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'readAndWrite', + 'deprecated' => false, 'systemTags' => [], 'parameters' => [ [ - 'name' => 'StatementId', + 'name' => 'RegionId', 'in' => 'formData', - 'schema' => [ - 'description' => '此Spark作业中代码块的唯一id', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'minimum' => '0', - 'example' => '1', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'cn-beijing'], ], [ - 'name' => 'JobId', + 'name' => 'InstanceId', 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业的唯一id', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202106071620hangzhou00000000001', - ], + 'schema' => ['description' => '实例ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'dla-3qntmdtbqklsbsmceu****'], ], ], 'responses' => [ @@ -1354,88 +907,41 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求的唯一id', - 'type' => 'string', - 'example' => 'C5DB60E0-6EB3-493C-8956-DA0D3A2EE656', - ], - 'Data' => [ - 'description' => '描述了此段代码块的执行状态', - 'type' => 'object', - 'properties' => [ - 'Process' => [ - 'description' => '代码当前执行进度, 为浮点数,`1`代表100%执行完成, `0.5` 代表执行了50%', - 'type' => 'number', - 'format' => 'float', - 'example' => '0.5', - ], - 'CompletedTime' => [ - 'description' => '代码执行结束的毫秒级时间戳', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1623033200754', - ], - 'State' => [ - 'description' => '代码块的执行状态, 可能的状态有'."\n" - ."\n" - .'- waiting 等待执行'."\n" - .'- running 正在还行'."\n" - .'- available 执行完成'."\n" - .'- error 执行失败'."\n" - .'- cancelling 在尝试终止'."\n" - .'- cancelled 已经终止执行', - 'type' => 'string', - 'example' => 'running', - ], - 'StartedTime' => [ - 'description' => '代码开始执行的毫秒级时间戳', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1623033200750', - ], - 'Code' => [ - 'description' => '提交的代码块', - 'type' => 'string', - 'example' => 'print(2+2)', - ], - 'Output' => [ - 'description' => '代码块的执行结果, 执行结果是一个JSON格式的字符串, 其结构如下'."\n" - ."\n" - .'- status 执行状态'."\n" - .'- execution_count 当前执行到此代码块的哪一行'."\n" - .'- data 代码执行结果', - 'type' => 'string', - 'example' => '"{\\"status\\":\\"ok\\",\\"execution_count\\":1,\\"data\\":{\\"text/plain\\":\\"4\\"}}"', - ], - 'Id' => [ - 'description' => '代码块在此Spark作业中的唯一递增id', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - ], - ], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '312F48C7-AFA0-46AA-B8F6-1B16B8808045'], + 'ErrorInfo' => ['description' => '错误信息。', 'type' => 'string', 'example' => 'An internal error occurred'], + 'Result' => ['description' => '返回的释放实例的结果。', 'type' => 'string', 'example' => 'true'], + 'ErrorCode' => ['description' => '错误码。', 'type' => 'string', 'example' => '600'], + 'Success' => ['description' => '请求是否调用成功。', 'type' => 'boolean', 'example' => 'true'], ], ], ], ], - 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C5DB60E0-6EB3-493C-8956-DA0D3A2EE656\\",\\n \\"Data\\": {\\n \\"Process\\": 0.5,\\n \\"CompletedTime\\": 1623033200754,\\n \\"State\\": \\"running\\",\\n \\"StartedTime\\": 1623033200750,\\n \\"Code\\": \\"print(2+2)\\",\\n \\"Output\\": \\"\\\\\\"{\\\\\\\\\\\\\\"status\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"ok\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"execution_count\\\\\\\\\\\\\\":1,\\\\\\\\\\\\\\"data\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"text/plain\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"4\\\\\\\\\\\\\\"}}\\\\\\"\\",\\n \\"Id\\": 1\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>C5DB60E0-6EB3-493C-8956-DA0D3A2EE656</RequestId>\\n<Data>\\n <CompletedTime>1623033200754</CompletedTime>\\n <State>available</State>\\n <Output>{\\"status\\":\\"ok\\",\\"execution_count\\":1,\\"data\\":{\\"text/plain\\":\\"4\\"}}</Output>\\n <StartedTime>1623033200753</StartedTime>\\n <Process>1</Process>\\n <Id>1</Id>\\n <Code>print(2 + 2)\\n</Code>\\n</Data>","errorExample":""}]', - 'title' => '获取代码块的执行状态', - 'summary' => '获取指定代码块的执行状态。', + 'errorCodes' => [ + 401 => [ + ['errorCode' => 'Openanalytics.Unauthorized.Exception', 'errorMessage' => 'You do not have permission to perform the operation.', 'description' => '您没有权限操作'], + ], + 404 => [ + ['errorCode' => 'Openanalytics.NotFound.Exception', 'errorMessage' => 'The specified instance does not exist.', 'description' => '实例不存在'], + ], + 600 => [ + ['errorCode' => 'Openanalytics.Internal.Exception', 'errorMessage' => 'An internal error occurred.', 'description' => '内部错误'], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"312F48C7-AFA0-46AA-B8F6-1B16B8808045\\",\\n \\"ErrorInfo\\": \\"An internal error occurred\\",\\n \\"Result\\": \\"true\\",\\n \\"ErrorCode\\": \\"600\\",\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"<requestId>312F48C7-AFA0-46AA-B8F6-1B16B8808045</requestId>\\n<result>true</result>\\n<success>true</success>","errorExample":""}]', + 'title' => '释放实例', + 'summary' => '调用ReleaseInstance释放实例。', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'ListSparkStatements' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'SubmitSparkJob' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1446,15 +952,14 @@ 'systemTags' => [], 'parameters' => [ [ - 'name' => 'JobId', + 'name' => 'VcName', 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业的ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202106071620hangzhou00000000001', - ], + 'schema' => ['description' => '执行作业的虚拟集群名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MyCluster'], + ], + [ + 'name' => 'ConfigJson', + 'in' => 'formData', + 'schema' => ['description' => '定义Spark作业的JSON字符串。JSON字符串的作业参数说明请参见[作业配置指南](~~185924~~)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '{ "name": "SparkPi", "file": "local:///tmp/spark-examples.jar", "className": "org.apache.spark.examples.SparkPi", "args": [ "100" ], "conf": { "spark.driver.resourceSpec": "medium", "spark.executor.instances": 5, "spark.executor.resourceSpec": "medium" } }'], ], ], 'responses' => [ @@ -1462,132 +967,45 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求的唯一标识ID。', - 'type' => 'string', - 'example' => 'C2AB7692-B9EF-4A50-BCFF-0DC5B6F080E8', - ], - 'Statements' => [ - 'description' => '代码块执行结果的列表。', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Progress' => [ - 'description' => '当前执行进度,是一个浮点数,代表执行的百分比,‘1’代表100%执行完成。', - 'type' => 'number', - 'format' => 'float', - 'example' => '1', - ], - 'CompletedTime' => [ - 'description' => '执行完成的毫秒级时间戳。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1623033200754', - ], - 'State' => [ - 'description' => '代码块的执行状态,可能的状态有:'."\n" - ."\n" - .'- waiting:等待执行。'."\n" - .'- running:正在执行。'."\n" - .'- available:执行完成。'."\n" - .'- error:执行失败。'."\n" - .'- cancelling:尝试终止。'."\n" - .'- cancelled:已经终止执行。', - 'type' => 'string', - 'example' => 'running', - ], - 'StartedTime' => [ - 'description' => '代码块开始执行的毫秒级时间戳。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1623033200750', - ], - 'Code' => [ - 'description' => '提交执行的代码块。', - 'type' => 'string', - 'example' => 'print(2 + 2)', - ], - 'Output' => [ - 'description' => '代码块的执行结果,执行结果是一个JSON格式的字符串,其结构如下。'."\n" - ."\n" - .'- status:执行状态。'."\n" - .'- execution_count:当前执行到此代码块的哪一行。'."\n" - .'- data:代码执行结果。', - 'type' => 'string', - 'example' => '{\\"status\\":\\"ok\\",\\"execution_count\\":1,\\"data\\":{\\"text/plain\\":\\"4\\"}}', - ], - 'Id' => [ - 'description' => '代码块的唯一ID。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - ], - ], - ], + 'JobId' => ['description' => 'Spark作业的ID。', 'type' => 'string', 'example' => 'j202011032013hangzhouf742a4330003679'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'C039FD4D-2F3C-4556-AF09-864D3A6485B2'], ], ], ], ], - 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C2AB7692-B9EF-4A50-BCFF-0DC5B6F080E8\\",\\n \\"Statements\\": [\\n {\\n \\"Progress\\": 1,\\n \\"CompletedTime\\": 1623033200754,\\n \\"State\\": \\"running\\",\\n \\"StartedTime\\": 1623033200750,\\n \\"Code\\": \\"print(2 + 2)\\",\\n \\"Output\\": \\"{\\\\\\\\\\\\\\"status\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"ok\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"execution_count\\\\\\\\\\\\\\":1,\\\\\\\\\\\\\\"data\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\"text/plain\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"4\\\\\\\\\\\\\\"}}\\",\\n \\"Id\\": 2\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<RequestId>C2AB7692-B9EF-4A50-BCFF-0DC5B6F080E8</RequestId>\\n<Statements>\\n <Progress>1</Progress>\\n <CompletedTime>1623033200078</CompletedTime>\\n <State>available</State>\\n <Output>{\\"status\\":\\"ok\\",\\"execution_count\\":0,\\"data\\":{\\"text/plain\\":\\"<pyspark.sql.session.SparkSession object at 0x7f5e4a550390>\\"}}</Output>\\n <StartedTime>1623033200077</StartedTime>\\n <Id>0</Id>\\n <Code>spark</Code>\\n</Statements>\\n<Statements>\\n <Progress>1</Progress>\\n <CompletedTime>1623033200754</CompletedTime>\\n <State>available</State>\\n <Output>{\\"status\\":\\"ok\\",\\"execution_count\\":1,\\"data\\":{\\"text/plain\\":\\"4\\"}}</Output>\\n <StartedTime>1623033200753</StartedTime>\\n <Id>1</Id>\\n <Code>print(2 + 2)\\n</Code>\\n</Statements>","errorExample":""}]', - 'title' => '获取 Spark 代码块列表', - 'summary' => '获取Spark Session的所有代码块的执行状态。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"JobId\\": \\"j202011032013hangzhouf742a4330003679\\",\\n \\"RequestId\\": \\"C039FD4D-2F3C-4556-AF09-864D3A6485B2\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>C039FD4D-2F3C-4556-AF09-864D3A6485B2</RequestId>\\n<JobId>j202011032013hangzhouf742a4330003679</JobId>","errorExample":""}]', + 'title' => '提交一个Spark作业', + 'summary' => '提交Spark作业。', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'GetJobAttemptLog' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'SubmitSparkSQL' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [], 'parameters' => [ [ - 'name' => 'JobId', - 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业ID。您可以在作业管理页面查看作业。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202105272322hangzhou5d64f1560000128', - ], - ], - [ 'name' => 'VcName', 'in' => 'formData', - 'schema' => [ - 'description' => '执行Spark作业的虚拟集群名称。您可以在虚拟集群管理页面查看虚拟集群名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'release-test', - ], + 'schema' => ['description' => '执行SparkSQL作业的虚拟集群名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'MySparkCluster'], ], [ - 'name' => 'JobAttemptId', + 'name' => 'Sql', 'in' => 'formData', - 'schema' => [ - 'description' => 'Spark作业尝试ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202105272322hangzhou5d64f1560000128-0001', - ], + 'schema' => ['description' => 'Spark SQL内容。具体请参考[Spark SQL](~~185724~~)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'set spark.driver.resourceSpec=medium;set spark.executor.instances=5; set spark.executor.resourceSpec=medium; set spark.app.name=sparksqltest; show databases;'], ], ], 'responses' => [ @@ -1595,37 +1013,27 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Data' => [ - 'description' => '返回的日志。', - 'type' => 'string', - 'example' => 'local:///opt/spark/jars/offline-sql.jar, main_file\\n+ exec /usr/bin/tini -s -- /jdk/jdk8/bin/java -cp \'/opt/tools/exec-wrapper.jar:.:::/opt/spark/jars/*\' com.aliyun.dla.spark.SparkJobWrapper /opt/spark/bin/spark-submit --conf spark.driver.host=172.16.6.205 --conf spark.ui.port=4040 --conf \'spark.driver.extraJavaOptions=-Dlog4j.configuration=file:///opt/spark/log-conf/log4j.properties -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/dump.hprof -XX:OnOutOfMemoryError=\\"bash /opt/tools/oss-cp.sh /tmp/dump.hprof oss://dla-test-cn-hangzhou/spark-logs/release-test/j202105272322hangzhou5d64f1560000128-0001/driver/dump.hprof; bash /opt/tools/job-stop.sh\\" \'', - ], - 'RequestId' => [ - 'description' => '请求的唯一ID。', - 'type' => 'string', - 'example' => '9CE8F271-F918-43B6-8F58-F9F1C2DCFDB8', - ], + 'JobId' => ['description' => 'Spark作业的ID。', 'type' => 'string', 'example' => 'j202104261729hangzhou224ee5230000930'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'B570310A-8A49-461B-B81D-AE0B58D63DA4'], ], ], ], ], - 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Data\\": \\"local:///opt/spark/jars/offline-sql.jar, main_file\\\\\\\\n+ exec /usr/bin/tini -s -- /jdk/jdk8/bin/java -cp \'/opt/tools/exec-wrapper.jar:.:::/opt/spark/jars/*\' com.aliyun.dla.spark.SparkJobWrapper /opt/spark/bin/spark-submit --conf spark.driver.host=172.16.6.205 --conf spark.ui.port=4040 --conf \'spark.driver.extraJavaOptions=-Dlog4j.configuration=file:///opt/spark/log-conf/log4j.properties -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/dump.hprof -XX:OnOutOfMemoryError=\\\\\\\\\\\\\\"bash /opt/tools/oss-cp.sh /tmp/dump.hprof oss://dla-test-cn-hangzhou/spark-logs/release-test/j202105272322hangzhou5d64f1560000128-0001/driver/dump.hprof; bash /opt/tools/job-stop.sh\\\\\\\\\\\\\\" \'\\",\\n \\"RequestId\\": \\"9CE8F271-F918-43B6-8F58-F9F1C2DCFDB8\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>9CE8F271-F918-43B6-8F58-F9F1C2DCFDB8</RequestId>\\n<Data>local:///opt/spark/jars/offline-sql.jar, main_file\\\\n+ exec /usr/bin/tini -s -- /jdk/jdk8/bin/java -cp \'/opt/tools/exec-wrapper.jar:.:::/opt/spark/jars/*\' com.aliyun.dla.spark.SparkJobWrapper /opt/spark/bin/spark-submit --conf spark.driver.host=172.16.6.205 --conf spark.ui.port=4040 --conf \'spark.driver.extraJavaOptions=-Dlog4j.configuration=file:///opt/spark/log-conf/log4j.properties -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/dump.hprof -XX:OnOutOfMemoryError=\\\\\\"bash /opt/tools/oss-cp.sh /tmp/dump.hprof oss://dla-test-cn-hangzhou/spark-logs/release-test/j202105272322hangzhou5d64f1560000128-0001/driver/dump.hprof; bash /opt/tools/job-stop.sh\\\\\\" \'</Data>","errorExample":""}]', - 'title' => '获取作业日志', - 'summary' => '获取对应JobAttempt的日志。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"JobId\\": \\"j202104261729hangzhou224ee5230000930\\",\\n \\"RequestId\\": \\"B570310A-8A49-461B-B81D-AE0B58D63DA4\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>B570310A-8A49-461B-B81D-AE0B58D63DA4</RequestId>\\n<JobId>j202104261729hangzhou224ee5230000930</JobId>","errorExample":""}]', + 'title' => '提交 Spark SQL 作业', + 'summary' => '提交SubmitSQL作业。', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'ListSparkJobAttempt' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], + 'ramActions' => [], + ], + 'ValidateVirtualClusterName' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1633,68 +1041,12 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'VcName', - 'in' => 'query', - 'schema' => [ - 'description' => '执行Spark作业的虚拟集群名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'release-test', - ], - ], - [ - 'name' => 'PageNumber', - 'in' => 'query', - 'schema' => [ - 'description' => '需要查询的页码号,用于遍历全部数据,页码的编码从1开始。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'maximum' => '1000', - 'minimum' => '1', - 'example' => '1', - ], - ], - [ - 'name' => 'PageSize', - 'in' => 'query', - 'schema' => [ - 'description' => '每页返回的作业的个数。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => true, - 'docRequired' => true, - 'maximum' => '100', - 'minimum' => '1', - 'example' => '10', - ], - ], - [ - 'name' => 'Condition', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => 'JobAttempt过滤条件,JSON格式。'."\n", - 'type' => 'object', - 'required' => false, - 'example' => '{"status":"success", "createTime":"2021-05-27 11:00:00", "timeZone":"Asia/Shanghai"}', - ], - ], - [ - 'name' => 'JobId', - 'in' => 'query', - 'schema' => [ - 'description' => 'Spark作业ID。您可以在作业管理页面查看作业ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'j202105272322hangzhou5d64f1560000128', - ], + 'in' => 'formData', + 'schema' => ['description' => '需要校验的虚拟集群的名称。', 'type' => 'string', 'required' => false, 'example' => 'abc123'], ], ], 'responses' => [ @@ -1702,339 +1054,139 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求的唯一ID。', - 'type' => 'string', - 'example' => '4A839055-70C7-423D-A6F2-E714EA4502DB', - ], - 'DataResult' => [ - 'description' => '返回结果。', + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'C039FD4D-2F3C-4556-AF09-864D3A6485B2'], + 'Data' => [ + 'description' => '校验返回的数据。', 'type' => 'object', 'properties' => [ - 'PageNumber' => [ - 'description' => '页数', - 'type' => 'string', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => '页大小', - 'type' => 'string', - 'example' => '10', - ], - 'TotalCount' => [ - 'description' => 'JobAttempt总数', - 'type' => 'string', - 'example' => '1', - ], - 'JobAttemptList' => [ - 'description' => 'JobAttempt列表', - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Status' => [ - 'description' => 'JobAttempt状态', - 'type' => 'string', - 'example' => 'success', - ], - 'DurationTime' => [ - 'description' => 'JobAttempt持续时间', - 'type' => 'string', - 'example' => '00:01:12', - ], - 'TerminatedTime' => [ - 'description' => '终止时间', - 'type' => 'string', - 'example' => '2021-05-27 23:23:20', - ], - 'DurationTimeValue' => [ - 'description' => '持续时间戳', - 'type' => 'string', - 'example' => '72000', - ], - 'CreateTime' => [ - 'description' => 'JobAttempt创建时间', - 'type' => 'string', - 'example' => '2021-05-27 23:22:08', - ], - 'CreateTimeValue' => [ - 'description' => 'JobAttempt创建时间戳', - 'type' => 'string', - 'example' => '1622128928000', - ], - 'SparkUI' => [ - 'description' => 'SparkUI地址', - 'type' => 'string', - 'example' => 'xxx', - ], - 'JobAttemptId' => [ - 'description' => '作业尝试ID', - 'type' => 'string', - 'example' => 'j202105272322hangzhou5d64f1560000128-0001', - ], - 'JobName' => [ - 'description' => '作业名称', - 'type' => 'string', - 'example' => 'xxx', - ], - 'JobId' => [ - 'description' => '作业ID', - 'type' => 'string', - 'example' => 'j202105272322hangzhou5d64f1560000128', - ], - 'TerminatedTimeValue' => [ - 'description' => '终止时间戳', - 'type' => 'string', - 'example' => '1622129000000', - ], - 'VcName' => [ - 'description' => '虚拟集群名称', - 'type' => 'string', - 'example' => 'release-test', - ], - 'Detail' => [ - 'description' => '作业配置', - 'type' => 'string', - 'example' => '{"xxx":"xxx"}', - ], - ], - ], - ], + 'Message' => ['description' => '如果虚拟集群名称不合法,上报的错误信息。', 'type' => 'string', 'example' => 'null'], + 'Legal' => ['description' => '校验返回值,是否合法。取值:'."\n" + ."\n" + .'- **true**:合法'."\n" + ."\n" + .'- **false**:不合法', 'type' => 'string', 'example' => 'true'], ], ], ], ], ], ], - 'errorCodes' => [], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4A839055-70C7-423D-A6F2-E714EA4502DB\\",\\n \\"DataResult\\": {\\n \\"PageNumber\\": \\"1\\",\\n \\"PageSize\\": \\"10\\",\\n \\"TotalCount\\": \\"1\\",\\n \\"JobAttemptList\\": [\\n {\\n \\"Status\\": \\"success\\",\\n \\"DurationTime\\": \\"00:01:12\\",\\n \\"TerminatedTime\\": \\"2021-05-27 23:23:20\\",\\n \\"DurationTimeValue\\": \\"72000\\",\\n \\"CreateTime\\": \\"2021-05-27 23:22:08\\",\\n \\"CreateTimeValue\\": \\"1622128928000\\",\\n \\"SparkUI\\": \\"xxx\\",\\n \\"JobAttemptId\\": \\"j202105272322hangzhou5d64f1560000128-0001\\",\\n \\"JobName\\": \\"xxx\\",\\n \\"JobId\\": \\"j202105272322hangzhou5d64f1560000128\\",\\n \\"TerminatedTimeValue\\": \\"1622129000000\\",\\n \\"VcName\\": \\"release-test\\",\\n \\"Detail\\": \\"{\\\\\\"xxx\\\\\\":\\\\\\"xxx\\\\\\"}\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<DataResult>\\n <TotalCount>1</TotalCount>\\n <PageSize>10</PageSize>\\n <PageNumber>1</PageNumber>\\n <JobAttemptList>\\n <VcName>release-test</VcName>\\n <Status>success</Status>\\n <JobAttemptId>j202105272322hangzhou5d64f1560000128-0001</JobAttemptId>\\n <TerminatedTime>2021-05-27 23:23:20</TerminatedTime>\\n <SparkUI>xxx</SparkUI>\\n <DurationTimeValue>72000</DurationTimeValue>\\n <CreateTime>2021-05-27 23:22:08</CreateTime>\\n <JobName>xxx</JobName>\\n <TerminatedTimeValue>1622129000000</TerminatedTimeValue>\\n <JobId>j202105272322hangzhou5d64f1560000128</JobId>\\n <Detail>{\\"xxx\\":\\"xxx\\"}</Detail>\\n <CreateTimeValue>1622128928000</CreateTimeValue>\\n <DurationTime>00:01:12</DurationTime>\\n </JobAttemptList>\\n</DataResult>\\n<RequestId>4A839055-70C7-423D-A6F2-E714EA4502DB</RequestId>","errorExample":""}]', - 'title' => '获取 Spark 作业记录列表', - 'summary' => '获取一个Job对应的所有JobAttempt信息。', - 'requestParamsDescription' => ' Condition目前支持下列两个参数'."\n" - ."\n" - .'- status: starting、running、unknown、success、dead、killed'."\n" - .'- createTime: 格式为 yyyy-mm-dd HH:mm:ss,代表筛选指定时间之后提交的作业,指定该参数的时候,同时需要指定timeZone'."\n" - .'- timeZone: 例如 Asia/Shanghai', + 'errorCodes' => [ + 404 => [ + ['errorCode' => 'EmptyResult', 'errorMessage' => 'The result is empty.', 'description' => '空结果。'], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C039FD4D-2F3C-4556-AF09-864D3A6485B2\\",\\n \\"Data\\": {\\n \\"Message\\": \\"null\\",\\n \\"Legal\\": \\"true\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>C039FD4D-2F3C-4556-AF09-864D3A6485B2</RequestId>\\n<Data>\\n <Message>null</Message>\\n <Legal>true</Legal>\\n</Data>","errorExample":""}]', + 'title' => '校验虚拟集群的名字是否合法', + 'summary' => '调用ValidateVirtualClusterName校验虚拟集群的名字是否合法。', + 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [], ], ], 'endpoints' => [ - [ - 'regionId' => 'cn-beijing', - 'endpoint' => 'openanalytics.cn-beijing.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangjiakou', - 'endpoint' => 'openanalytics.cn-zhangjiakou.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou', - 'endpoint' => 'openanalytics.cn-hangzhou.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai', - 'endpoint' => 'openanalytics.cn-shanghai.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen', - 'endpoint' => 'openanalytics.cn-shenzhen.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hongkong', - 'endpoint' => 'openanalytics.cn-hongkong.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-1', - 'endpoint' => 'openanalytics.ap-southeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-2', - 'endpoint' => 'datalakeanalytics.ap-southeast-2.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-3', - 'endpoint' => 'openanalytics.ap-southeast-3.aliyuncs.com', - ], - [ - 'regionId' => 'ap-northeast-1', - 'endpoint' => 'datalakeanalytics.ap-northeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'eu-west-1', - 'endpoint' => 'openanalytics.eu-west-1.aliyuncs.com', - ], - [ - 'regionId' => 'us-west-1', - 'endpoint' => 'openanalytics.us-west-1.aliyuncs.com', - ], - [ - 'regionId' => 'us-east-1', - 'endpoint' => 'datalakeanalytics.us-east-1.aliyuncs.com', - ], - [ - 'regionId' => 'eu-central-1', - 'endpoint' => 'datalakeanalytics.eu-central-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-south-1', - 'endpoint' => 'openanalytics.ap-south-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-northeast-2-pop', - 'endpoint' => 'openanalytics.ap-northeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-5', - 'endpoint' => 'openanalytics.ap-southeast-5.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-finance-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-finance-pop', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-gov-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-nu16-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-chengdu', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-edge-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-fujian', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-haidian-cm12-c01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-bj-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-finance', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-prod-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-test-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-test-2', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-test-3', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-test-306', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hongkong-finance-pop', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-huhehaote', - 'endpoint' => 'openanalytics.cn-huhehaote.aliyuncs.com', - ], - [ - 'regionId' => 'cn-north-2-gov-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-qingdao', - 'endpoint' => 'openanalytics.cn-qingdao.aliyuncs.com', - ], - [ - 'regionId' => 'cn-qingdao-nebula', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-et15-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-et2-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-finance-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-inner', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-internal-test-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-finance-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-inner', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-st4-d01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-su18-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-wuhan', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-yushanfang', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangbei-na61-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangjiakou-na62-a01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhengzhou-nebula-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'eu-west-1-oxs', - 'endpoint' => 'openanalytics.ap-northeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'me-east-1', - 'endpoint' => 'openanalytics.me-east-1.aliyuncs.com', - ], - [ - 'regionId' => 'rus-west-1-pop', - 'endpoint' => 'openanalytics.ap-northeast-1.aliyuncs.com', + ['regionId' => 'cn-qingdao', 'regionName' => '华北1(青岛)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.cn-qingdao.aliyuncs.com', 'endpoint' => 'openanalytics.cn-qingdao.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-huhehaote', 'regionName' => '华北5(呼和浩特)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.cn-huhehaote.aliyuncs.com', 'endpoint' => 'openanalytics.cn-huhehaote.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-chengdu', 'regionName' => '西南1(成都)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.aliyuncs.com', 'endpoint' => 'openanalytics.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'ap-southeast-3', 'regionName' => '马来西亚(吉隆坡)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.ap-southeast-3.aliyuncs.com', 'endpoint' => 'openanalytics.ap-southeast-3.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'ap-southeast-2', 'regionName' => '澳大利亚(悉尼)已关停', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'datalakeanalytics.ap-southeast-2.aliyuncs.com', 'endpoint' => 'datalakeanalytics.ap-southeast-2.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-shenzhen', 'regionName' => '华南1(深圳)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.cn-shenzhen.aliyuncs.com', 'endpoint' => 'openanalytics.cn-shenzhen.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-shenzhen.aliyuncs.com'], + ['regionId' => 'cn-beijing', 'regionName' => '华北2(北京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.cn-beijing.aliyuncs.com', 'endpoint' => 'openanalytics.cn-beijing.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-beijing.aliyuncs.com'], + ['regionId' => 'ap-northeast-1', 'regionName' => '日本(东京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'datalakeanalytics.ap-northeast-1.aliyuncs.com', 'endpoint' => 'datalakeanalytics.ap-northeast-1.aliyuncs.com', 'vpc' => 'openanalytics-vpc.ap-northeast-1.aliyuncs.com'], + ['regionId' => 'cn-shanghai', 'regionName' => '华东2(上海)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.cn-shanghai.aliyuncs.com', 'endpoint' => 'openanalytics.cn-shanghai.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-shanghai.aliyuncs.com'], + ['regionId' => 'cn-hongkong', 'regionName' => '中国香港', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.cn-hongkong.aliyuncs.com', 'endpoint' => 'openanalytics.cn-hongkong.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-hongkong.aliyuncs.com'], + ['regionId' => 'ap-southeast-1', 'regionName' => '新加坡', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.ap-southeast-1.aliyuncs.com', 'endpoint' => 'openanalytics.ap-southeast-1.aliyuncs.com', 'vpc' => 'openanalytics-vpc.ap-southeast-1.aliyuncs.com'], + ['regionId' => 'ap-southeast-5', 'regionName' => '印度尼西亚(雅加达)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.ap-southeast-5.aliyuncs.com', 'endpoint' => 'openanalytics.ap-southeast-5.aliyuncs.com', 'vpc' => 'openanalytics-vpc.ap-southeast-5.aliyuncs.com'], + ['regionId' => 'cn-zhangjiakou', 'regionName' => '华北3(张家口)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.cn-zhangjiakou.aliyuncs.com', 'endpoint' => 'openanalytics.cn-zhangjiakou.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-zhangjiakou.aliyuncs.com'], + ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'openanalytics.cn-hangzhou.aliyuncs.com', 'endpoint' => 'openanalytics.cn-hangzhou.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-hangzhou.aliyuncs.com'], + ['regionId' => 'us-west-1', 'regionName' => '美国(硅谷)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'openanalytics.us-west-1.aliyuncs.com', 'endpoint' => 'openanalytics.us-west-1.aliyuncs.com', 'vpc' => 'openanalytics-vpc.us-west-1.aliyuncs.com'], + ['regionId' => 'us-east-1', 'regionName' => '美国(弗吉尼亚)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'datalakeanalytics.us-east-1.aliyuncs.com', 'endpoint' => 'datalakeanalytics.us-east-1.aliyuncs.com', 'vpc' => 'openanalytics-vpc.us-east-1.aliyuncs.com'], + ['regionId' => 'eu-central-1', 'regionName' => '德国(法兰克福)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'datalakeanalytics.eu-central-1.aliyuncs.com', 'endpoint' => 'datalakeanalytics.eu-central-1.aliyuncs.com', 'vpc' => 'openanalytics-vpc.eu-central-1.aliyuncs.com'], + ['regionId' => 'eu-west-1', 'regionName' => '英国(伦敦)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'openanalytics.eu-west-1.aliyuncs.com', 'endpoint' => 'openanalytics.eu-west-1.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'ap-south-1', 'regionName' => '印度(孟买)已关停', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'openanalytics.ap-south-1.aliyuncs.com', 'endpoint' => 'openanalytics.ap-south-1.aliyuncs.com', 'vpc' => 'openanalytics-vpc.ap-south-1.aliyuncs.com'], + ['regionId' => 'me-east-1', 'regionName' => '阿联酋(迪拜)', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'openanalytics.me-east-1.aliyuncs.com', 'endpoint' => 'openanalytics.me-east-1.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-hangzhou-finance', 'regionName' => '华东1 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'openanalytics.aliyuncs.com', 'endpoint' => 'openanalytics.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-hangzhou-finance.aliyuncs.com'], + ['regionId' => 'cn-shanghai-finance-1', 'regionName' => '华东2 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'openanalytics.aliyuncs.com', 'endpoint' => 'openanalytics.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-shanghai-finance-1.aliyuncs.com'], + ['regionId' => 'cn-north-2-gov-1', 'regionName' => '北京政务云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'openanalytics.aliyuncs.com', 'endpoint' => 'openanalytics.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-north-2-gov-1.aliyuncs.com'], + ['regionId' => 'cn-shenzhen-finance-1', 'regionName' => '华南1 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'openanalytics.aliyuncs.com', 'endpoint' => 'openanalytics.aliyuncs.com', 'vpc' => 'openanalytics-vpc.cn-shenzhen-finance-1.aliyuncs.com'], + ['regionId' => 'cn-beijing-finance-1', 'regionName' => '华北2 金融云(邀测)', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'openanalytics.aliyuncs.com', 'endpoint' => 'openanalytics.aliyuncs.com', 'vpc' => ''], + ], + 'errorCodes' => [ + ['code' => 'AlreadyExists', 'message' => 'The formation task already exists.', 'http_code' => 409, 'description' => 'formation task 已经存在'], + ['code' => 'AlreadyRunning', 'message' => 'The crawler instance is already running.', 'http_code' => 400, 'description' => 'crawler已经在运行'], + ['code' => 'Business.Not.Register', 'message' => 'Your application is not registered in DLA', 'http_code' => 403, 'description' => '您的应用在 DLA 未注册'], + ['code' => 'EmptyResult', 'message' => 'The result is empty.', 'http_code' => 404, 'description' => '空结果。'], + ['code' => 'Endpoint.Exist', 'message' => 'The specified endpoint already exists.', 'http_code' => 409, 'description' => 'Endpoint已经存在。'], + ['code' => 'Endpoint.Lock', 'message' => 'The specified endpoint is locked and you are not authorized to perform the operation.You can delete it and try again.', 'http_code' => 410, 'description' => 'Endpoint目前被锁定,不允许执行该操作。您可以删除它在执行。'], + ['code' => 'Endpoint.NotFound', 'message' => 'The specified endpoint does not exist.', 'http_code' => 404, 'description' => 'Endpoint不存在。'], + ['code' => 'InvalidInput', 'message' => 'The specified parameter is invalid.', 'http_code' => 400, 'description' => '输入参数不准确'], + ['code' => 'InvalidTaskStatus', 'message' => 'The formation task status is invalid.', 'http_code' => 406, 'description' => 'formation task的状态非法'], + ['code' => 'MetaInfo.Discount.AddFailed', 'message' => 'An error occurred while adding discount information.', 'http_code' => 430, 'description' => '折扣信息添加失败。'], + ['code' => 'MetaInfo.GuidTable.Execute', 'message' => 'An SQL execution error occurred.', 'http_code' => 430, 'description' => 'SQL 执行错误。'], + ['code' => 'MetaInfo.GuidTable.Finish', 'message' => 'The table has been created.', 'http_code' => 430, 'description' => '表已经完结。'], + ['code' => 'MetaInfo.GuidTable.GeneraterDDL', 'message' => 'An error occurred while generating DDL.', 'http_code' => 430, 'description' => '生成建表语句错误。'], + ['code' => 'MetaInfo.GuidTable.InitFailed', 'message' => 'An error occurred while initializing the table.', 'http_code' => 430, 'description' => '表初始化失败。'], + ['code' => 'MetaInfo.GuidTable.MissingLocation', 'message' => 'You must specify table location.', 'http_code' => 400, 'description' => '表 Location 信息缺失。'], + ['code' => 'MetaInfo.GuidTable.MissingTableName', 'message' => 'You must specify table name.', 'http_code' => 400, 'description' => '表名缺失。'], + ['code' => 'MetaInfo.GuidTable.NotFound', 'message' => 'The table does not exist.', 'http_code' => 404, 'description' => '表不存在。'], + ['code' => 'MetaInfo.GuidTable.NotReady', 'message' => 'The table is not ready.', 'http_code' => 430, 'description' => '表尚未准备好。'], + ['code' => 'MetaInfo.GuidTable.NotSupport', 'message' => 'The specified data source type is invalid.', 'http_code' => 430, 'description' => '数据源类型不支持'], + ['code' => 'MetaInfo.GuidTable.OnlySupportCreate', 'message' => 'An SQL parsing error occurred. Only create statement is supported.', 'http_code' => 430, 'description' => 'SQL 解析错误,只支持 create 语句。'], + ['code' => 'MetaInfo.GuidTable.Parser', 'message' => 'An SQL parsing error occurred.', 'http_code' => 430, 'description' => 'SQL 解析错误。'], + ['code' => 'MetaInfo.GuidTable.TaskFailed', 'message' => 'An error occurred while scheduling a job. Please try again.', 'http_code' => 430, 'description' => '调度执行任务失败,请重试。'], + ['code' => 'MetaInfo.GuidTable.Unauthorized', 'message' => 'You are not authorized to access the specified table.', 'http_code' => 403, 'description' => '无权限访问这张表。'], + ['code' => 'MissingParameter', 'message' => 'Some required parameters are missing or invalid. Please check the SDK documentation and complete the parameters.', 'http_code' => 400, 'description' => '必要参数缺失或错误,请参考SDK入参补全参数。'], + ['code' => 'NotExists', 'message' => 'The formation task does not exist.', 'http_code' => 400, 'description' => 'formation任务不存在'], + ['code' => 'NotExists', 'message' => 'The crawler task does not exist.', 'http_code' => 400, 'description' => 'crawler task不存在'], + ['code' => 'NotFound', 'message' => 'The formation task does not exist.', 'http_code' => 404, 'description' => 'formation task 不存在'], + ['code' => 'NotRunning', 'message' => 'The instance is not running.', 'http_code' => 400, 'description' => '实例没有运行'], + ['code' => 'Openanalytics.Internal.Exception', 'message' => 'An internal error occurred.', 'http_code' => 600, 'description' => '内部错误'], + ['code' => 'Openanalytics.NotFound.Exception', 'message' => 'The specified instance does not exist.', 'http_code' => 404, 'description' => '实例不存在'], + ['code' => 'Openanalytics.Unauthorized.Exception', 'message' => 'You do not have permission to perform the operation.', 'http_code' => 401, 'description' => '您没有权限操作'], + ['code' => 'Parameter.Account.Format', 'message' => 'The account name must only contain letters (a-z, A-Z) and numbers (0-9).', 'http_code' => 400, 'description' => '帐号必须是字母 a-z , A-Z 或者数字 0-9 组成。'], + ['code' => 'Parameter.Account.Length', 'message' => 'The account name can be 1 to 64 characters in length, and the password can be 1 to 32 characters in length.', 'http_code' => 400, 'description' => '帐号名最长64个字符,密码最长 32个字符。'], + ['code' => 'Parameter.Account.Password', 'message' => 'The password must contain at least three types of the following characters: upper case letters, lower case letters, numbers, and special characters ( `~!@#$%^&*()_+-=[]|;\':,./<>? ).', 'http_code' => 400, 'description' => '输入密码至少满足其中三种条件:大写字母、小写字母、数字、特殊字符(`~!@#$%^&*()_+-=[]|;\':,./<>?)'], + ['code' => 'Parameter.Account.RamUid.ALREADY.BINGING', 'message' => 'The specified RamUid is already used by another account.', 'http_code' => 400, 'description' => '传入的 ramUid 已经被其他账号绑定'], + ['code' => 'Parameter.Account.RamUid.ALREADY.BINGING.other.ramUid', 'message' => 'The current user has already bound another RamUid.', 'http_code' => 400, 'description' => '当前用户已经绑定了其他 ramUid'], + ['code' => 'Parameter.Account.RamUid.is.not.belong.to.current.uid', 'message' => 'The RamUid does not belong to the current user.', 'http_code' => 400, 'description' => '需要绑定的 ramuid 不属于当前用户'], + ['code' => 'Parameter.InputError', 'message' => 'The specified parameter is invalid.', 'http_code' => 400, 'description' => '参数输入错误。'], + ['code' => 'Parameter.NetworkType', 'message' => 'The specified network type is invalid.', 'http_code' => 400, 'description' => '错误的网络类型。'], + ['code' => 'RamUid.is.empty', 'message' => 'You must specify RamUid.', 'http_code' => 400, 'description' => '输入的 RamUid 为空。'], + ['code' => 'ServerError.Check', 'message' => 'An internal error has occurred, resulting in the failure of status check.', 'http_code' => 401, 'description' => '内部错误,状态校验失败。'], + ['code' => 'ServerError.Inner', 'message' => 'An internal error occurred.', 'http_code' => 430, 'description' => '系统内部错误'], + ['code' => 'ServerError.Internal', 'message' => 'An internal error has occurred.', 'http_code' => 402, 'description' => '内部错误。'], + ['code' => 'ServerError.Store', 'message' => 'An internal error has occurred, resulting in the failure of status check.', 'http_code' => 430, 'description' => '内部错误,状态持久化操作失败。'], + ['code' => 'ServerStoreError', 'message' => 'A server storage error occurred.', 'http_code' => 400, 'description' => '内部存储有问题'], + ['code' => 'Service.Forbidden', 'message' => 'The user service has been disabled. Certain user actions may have triggered the banning of using any Alibaba Cloud service. For more information, submit a service ticket.', 'http_code' => 403, 'description' => '用户服务被禁用。有可能是由于用户触发了禁用整个阿里云服务。详细细节请联系技术人员。'], + ['code' => 'Service.HasMoreResource', 'message' => 'Delete all tables, schema and endpoints before you disable the DLA service in the specified region.', 'http_code' => 403, 'description' => '请先删除所有 Table、Schema、Endpoint。'], + ['code' => 'Service.Initialized', 'message' => 'The service has been initialized.', 'http_code' => 304, 'description' => '服务已经初始化。'], + ['code' => 'Service.Invalid', 'message' => 'The specified service for the user has not been activated.', 'http_code' => 403, 'description' => '用户的服务未开通。'], + ['code' => 'Service.NotFound', 'message' => 'The service has not been initialized.', 'http_code' => 404, 'description' => '服务尚未初始化。'], + ['code' => 'User.Exist', 'message' => 'The specified user already exists.', 'http_code' => 409, 'description' => '用户已经存在。'], + ['code' => 'User.Invalid', 'message' => 'The user status is invalid or the user has unsubscribed from the DLA service.', 'http_code' => 403, 'description' => '用户状态无效或已经退订DLA服务。'], + ['code' => 'User.MaxCount', 'message' => 'The number of accounts has reached the maximum.', 'http_code' => 403, 'description' => '创建的帐号数量达到最大值。'], + ['code' => 'User.MetaInfo.Invalid', 'message' => 'You need to activate MetaInfo service.', 'http_code' => 403, 'description' => '需要开通用户元信息服务。'], + ['code' => 'User.NotFound', 'message' => 'The specified user does not exist.', 'http_code' => 404, 'description' => '用户不存在。'], + ['code' => 'User.Unauthorized', 'message' => 'You are not authorized to perform the operation.', 'http_code' => 401, 'description' => '无权限。'], + ], + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '-1', 'countWindow' => 1, 'regionId' => '*'], ], ], + 'ram' => [ + 'productCode' => 'DataLakeAnalytics', + 'productName' => '云原生数据湖分析', + 'ramCodes' => ['openanalytics'], + 'ramLevel' => '资源级', + 'ramConditions' => [], + 'ramActions' => [], + 'resourceTypes' => [], + ], ]; diff --git a/data/zh_cn/openanalytics-open/2020-09-28/api-docs.php b/data/zh_cn/openanalytics-open/2020-09-28/api-docs.php index d1ce0e7..c05ca3e 100644 --- a/data/zh_cn/openanalytics-open/2020-09-28/api-docs.php +++ b/data/zh_cn/openanalytics-open/2020-09-28/api-docs.php @@ -1,10 +1,6 @@ <?php return [ 'version' => '1.0', - 'info' => [ - 'style' => 'RPC', - 'product' => 'openanalytics-open', - 'version' => '2020-09-28', - ], + 'info' => ['style' => 'RPC', 'product' => 'openanalytics-open', 'version' => '2020-09-28'], 'directories' => [ [ 'id' => 66508, @@ -15,28 +11,19 @@ 'id' => 66512, 'title' => '数据库管理', 'type' => 'directory', - 'children' => [ - 'CreateDatabase', - 'GetAllDatabases', - ], + 'children' => ['CreateDatabase', 'GetAllDatabases'], ], [ 'id' => 66518, 'title' => '分区管理', 'type' => 'directory', - 'children' => [ - 'AddPartitions', - ], + 'children' => ['AddPartitions'], ], [ 'id' => 66523, 'title' => '表管理', 'type' => 'directory', - 'children' => [ - 'GetTable', - 'GetAllTables', - 'DropTable', - ], + 'children' => ['GetTable', 'GetAllTables', 'DropTable'], ], ], ], @@ -48,45 +35,19 @@ 'description' => ' 数据库数据结构', 'type' => 'object', 'properties' => [ - 'DBId' => [ - 'title' => '数据库 ID', - 'type' => 'string', - ], - 'TenantId' => [ - 'title' => '数据库所属的阿里云UID ', - 'type' => 'string', - ], - 'Name' => [ - 'title' => '数据库名称', - 'type' => 'string', - ], - 'LocationURI ' => [ - 'title' => '数据库地址', - 'type' => 'string', - ], - 'Description' => [ - 'title' => '数据库描述 ', - 'type' => 'string', - ], + 'DBId' => ['title' => '数据库 ID', 'type' => 'string'], + 'TenantId' => ['title' => '数据库所属的阿里云UID ', 'type' => 'string'], + 'Name' => ['title' => '数据库名称', 'type' => 'string'], + 'LocationURI ' => ['title' => '数据库地址', 'type' => 'string'], + 'Description' => ['title' => '数据库描述 ', 'type' => 'string'], 'Parameters' => [ 'title' => '数据库参数 ', 'type' => 'object', - 'additionalProperties' => [ - 'type' => 'string', - ], - ], - 'OwnerName' => [ - 'title' => '数据库所属 DLA userName ', - 'type' => 'string', - ], - 'OwnerType' => [ - 'title' => '数据库所属用户类型', - 'type' => 'string', - ], - 'CatalogType' => [ - 'title' => '数据库类型', - 'type' => 'string', + 'additionalProperties' => ['type' => 'string'], ], + 'OwnerName' => ['title' => '数据库所属 DLA userName ', 'type' => 'string'], + 'OwnerType' => ['title' => '数据库所属用户类型', 'type' => 'string'], + 'CatalogType' => ['title' => '数据库类型', 'type' => 'string'], ], ], 'FieldSchemaModel' => [ @@ -94,57 +55,18 @@ 'description' => '列 数据结构', 'type' => 'object', 'properties' => [ - 'Name' => [ - 'title' => '列名', - 'type' => 'string', - ], - 'Type' => [ - 'title' => '列的数据类型', - 'type' => 'string', - ], - 'Comment' => [ - 'title' => '列的描述信息', - 'type' => 'string', - ], - 'SchemaName' => [ - 'title' => '对应的数据库名', - 'type' => 'string', - ], - 'TableName' => [ - 'title' => '对应的表名', - 'type' => 'string', - ], - 'MappedName' => [ - 'title' => '映射名称', - 'type' => 'string', - ], - 'DataType' => [ - 'title' => '数据的类型', - 'type' => 'string', - ], - 'IsPrimaryKey' => [ - 'title' => '是否为主键', - 'type' => 'boolean', - ], - 'CreateTime' => [ - 'title' => '创建时间', - 'type' => 'integer', - 'format' => 'int64', - ], - 'UpdateTime' => [ - 'title' => '更新时间', - 'type' => 'integer', - 'format' => 'int64', - ], - ' PkPosition' => [ - 'title' => '主键位置', - 'type' => 'integer', - 'format' => 'int32', - ], - 'IsPartitionKey' => [ - 'title' => '是否为分区字段', - 'type' => 'boolean', - ], + 'Name' => ['title' => '列名', 'type' => 'string'], + 'Type' => ['title' => '列的数据类型', 'type' => 'string'], + 'Comment' => ['title' => '列的描述信息', 'type' => 'string'], + 'SchemaName' => ['title' => '对应的数据库名', 'type' => 'string'], + 'TableName' => ['title' => '对应的表名', 'type' => 'string'], + 'MappedName' => ['title' => '映射名称', 'type' => 'string'], + 'DataType' => ['title' => '数据的类型', 'type' => 'string'], + 'IsPrimaryKey' => ['title' => '是否为主键', 'type' => 'boolean'], + 'CreateTime' => ['title' => '创建时间', 'type' => 'integer', 'format' => 'int64'], + 'UpdateTime' => ['title' => '更新时间', 'type' => 'integer', 'format' => 'int64'], + ' PkPosition' => ['title' => '主键位置', 'type' => 'integer', 'format' => 'int32'], + 'IsPartitionKey' => ['title' => '是否为分区字段', 'type' => 'boolean'], ], ], ], @@ -152,13 +74,8 @@ 'apis' => [ 'CreateDatabase' => [ 'summary' => '创建数据库。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -166,44 +83,22 @@ ], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'Name', 'in' => 'query', - 'schema' => [ - 'title' => '创建数据库的名字', - 'description' => '数据库的名称。', - 'type' => 'string', - 'required' => true, - 'example' => 'db001', - ], + 'schema' => ['title' => '创建数据库的名字', 'description' => '数据库的名称。', 'type' => 'string', 'required' => true, 'example' => 'db001'], ], [ 'name' => 'Description', 'in' => 'query', - 'schema' => [ - 'title' => '数据库描述', - 'description' => '数据库的描述。', - 'type' => 'string', - 'required' => true, - 'example' => 'this is db description', - ], + 'schema' => ['title' => '数据库描述', 'description' => '数据库的描述。', 'type' => 'string', 'required' => true, 'example' => 'this is db description'], ], [ 'name' => 'LocationUri', 'in' => 'query', - 'schema' => [ - 'title' => '数据库的 location', - 'description' => '数据库的OSS地址。', - 'type' => 'string', - 'required' => true, - 'example' => 'oss://data/xxx', - ], + 'schema' => ['title' => '数据库的 location', 'description' => '数据库的OSS地址。', 'type' => 'string', 'required' => true, 'example' => 'oss://data/xxx'], ], [ 'name' => 'Parameters', @@ -214,11 +109,7 @@ 'description' => '数据库的属性。', 'type' => 'object', 'required' => false, - 'additionalProperties' => [ - 'type' => 'string', - 'description' => '数据库的属性。', - 'example' => 'key001=value001', - ], + 'additionalProperties' => ['type' => 'string', 'description' => '数据库的属性。', 'example' => 'key001=value001'], ], ], ], @@ -229,37 +120,11 @@ 'description' => '返回对象。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'title' => '如果后端处理出现错误,则表示错误的类型', - 'description' => '标记错误的Code。', - 'type' => 'string', - 'example' => 'ALREADY_EXISTS', - ], - 'Data' => [ - 'title' => '成功创建库的库ID', - 'description' => '表示创建成功时数据库的id。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '6666', - ], - 'Message' => [ - 'title' => '如果后端处理出现错误,则表示错误的信息', - 'description' => '如果有异常,返回异常的信息。', - 'type' => 'string', - 'example' => 'Database db001 already exists', - ], - 'RequestId' => [ - 'title' => '请求的 ID', - 'description' => '本次请求的RequestId。', - 'type' => 'string', - 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23', - ], - 'Success' => [ - 'title' => '标识本次请求是否成功', - 'description' => '标记本次请求是否成功。', - 'type' => 'boolean', - 'example' => 'false', - ], + 'Code' => ['title' => '如果后端处理出现错误,则表示错误的类型', 'description' => '标记错误的Code。', 'type' => 'string', 'example' => 'ALREADY_EXISTS'], + 'Data' => ['title' => '成功创建库的库ID', 'description' => '表示创建成功时数据库的id。', 'type' => 'integer', 'format' => 'int64', 'example' => '6666'], + 'Message' => ['title' => '如果后端处理出现错误,则表示错误的信息', 'description' => '如果有异常,返回异常的信息。', 'type' => 'string', 'example' => 'Database db001 already exists'], + 'RequestId' => ['title' => '请求的 ID', 'description' => '本次请求的RequestId。', 'type' => 'string', 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23'], + 'Success' => ['title' => '标识本次请求是否成功', 'description' => '标记本次请求是否成功。', 'type' => 'boolean', 'example' => 'false'], ], ], ], @@ -269,13 +134,8 @@ ], 'GetAllDatabases' => [ 'summary' => '调用GetAllDatabases获取当前用户所有有权限的数据库。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -283,11 +143,7 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [], 'responses' => [ 200 => [ @@ -296,40 +152,16 @@ 'description' => '返回对象。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'title' => '如果后端处理出现错误,则表示错误的类型', - 'description' => '如果有错误,则返回错误的类型。此API不会有异常。', - 'type' => 'string', - 'example' => 'ok', - ], + 'Code' => ['title' => '如果后端处理出现错误,则表示错误的类型', 'description' => '如果有错误,则返回错误的类型。此API不会有异常。', 'type' => 'string', 'example' => 'ok'], 'Data' => [ 'title' => '返回的数据库列表', 'description' => '有权限的数据库名称列表。', 'type' => 'array', - 'items' => [ - 'description' => '有权限的数据库名称列表。', - 'type' => 'string', - 'example' => 'db001', - ], - ], - 'Message' => [ - 'title' => '如果后端处理出现错误,则表示错误的信息', - 'description' => '如果有异常,则返回异常详细信息。', - 'type' => 'string', - 'example' => 'ok', - ], - 'RequestId' => [ - 'title' => '请求的 ID', - 'description' => '本次请求的RequestId。', - 'type' => 'string', - 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23', - ], - 'Success' => [ - 'title' => '标识本次请求是否成功', - 'description' => '本次请求是否成功。', - 'type' => 'boolean', - 'example' => 'true', + 'items' => ['description' => '有权限的数据库名称列表。', 'type' => 'string', 'example' => 'db001'], ], + 'Message' => ['title' => '如果后端处理出现错误,则表示错误的信息', 'description' => '如果有异常,则返回异常详细信息。', 'type' => 'string', 'example' => 'ok'], + 'RequestId' => ['title' => '请求的 ID', 'description' => '本次请求的RequestId。', 'type' => 'string', 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23'], + 'Success' => ['title' => '标识本次请求是否成功', 'description' => '本次请求是否成功。', 'type' => 'boolean', 'example' => 'true'], ], ], ], @@ -340,13 +172,8 @@ ], 'AddPartitions' => [ 'summary' => '向 DLA 元数据系统里面添加分区信息。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -354,11 +181,7 @@ ], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'Partition', @@ -373,23 +196,13 @@ 'description' => '分区数组的内容。', 'type' => 'object', 'properties' => [ - 'DbName' => [ - 'title' => '数据库名称', - 'description' => '数据库名称。', - 'type' => 'string', - 'required' => true, - 'example' => 'db001', - ], + 'DbName' => ['title' => '数据库名称', 'description' => '数据库名称。', 'type' => 'string', 'required' => true, 'example' => 'db001'], 'Parameters' => [ 'title' => '分区属性', 'description' => '分区参数。', 'type' => 'object', 'required' => false, - 'additionalProperties' => [ - 'type' => 'string', - 'description' => '分区参数。', - 'example' => 'key001=value002', - ], + 'additionalProperties' => ['type' => 'string', 'description' => '分区参数。', 'example' => 'key001=value002'], ], 'StorageDescriptor' => [ 'title' => '分区的 StorageDescriptor ', @@ -404,117 +217,50 @@ 'description' => '表的列信息。', 'type' => 'object', 'properties' => [ - 'Comment' => [ - 'title' => '列注释', - 'description' => '列注释。', - 'type' => 'string', - 'required' => false, - 'example' => 'this is comment', - ], - 'Name' => [ - 'title' => '列名', - 'description' => '列名。', - 'type' => 'string', - 'required' => false, - 'example' => 'col1', - ], - 'Type' => [ - 'title' => '列类型', - 'description' => '列类型。', - 'type' => 'string', - 'required' => false, - 'example' => 'string', - ], + 'Comment' => ['title' => '列注释', 'description' => '列注释。', 'type' => 'string', 'required' => false, 'example' => 'this is comment'], + 'Name' => ['title' => '列名', 'description' => '列名。', 'type' => 'string', 'required' => false, 'example' => 'col1'], + 'Type' => ['title' => '列类型', 'description' => '列类型。', 'type' => 'string', 'required' => false, 'example' => 'string'], ], 'required' => false, ], 'required' => true, ], - 'InputFormat' => [ - 'title' => '表的 inputFormat', - 'description' => '表的InputFormat。', - 'type' => 'string', - 'required' => true, - 'example' => 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat', - ], - 'Location' => [ - 'title' => '表路径', - 'description' => '表的路径。', - 'type' => 'string', - 'required' => false, - 'example' => 'oss://data/xxxx', - ], - 'OutputFormat' => [ - 'title' => '表的 outputFormat', - 'description' => '表的OutputFormat。', - 'type' => 'string', - 'required' => true, - 'example' => 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat', - ], + 'InputFormat' => ['title' => '表的 inputFormat', 'description' => '表的InputFormat。', 'type' => 'string', 'required' => true, 'example' => 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'], + 'Location' => ['title' => '表路径', 'description' => '表的路径。', 'type' => 'string', 'required' => false, 'example' => 'oss://data/xxxx'], + 'OutputFormat' => ['title' => '表的 outputFormat', 'description' => '表的OutputFormat。', 'type' => 'string', 'required' => true, 'example' => 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'], 'Parameters' => [ 'title' => 'StorageDescriptor 的属性', 'description' => 'SD的属性。', 'type' => 'object', 'required' => false, - 'additionalProperties' => [ - 'type' => 'string', - 'example' => 'key001=value002', - 'description' => 'SD的属性。', - ], + 'additionalProperties' => ['type' => 'string', 'example' => 'key001=value002', 'description' => 'SD的属性。'], ], 'SerDeInfo' => [ 'title' => '表的 serDeInfo', 'description' => '表的SerDe信息。', 'type' => 'object', 'properties' => [ - 'Name' => [ - 'title' => 'SerDe 的名字', - 'description' => 'SerDe的名称。', - 'type' => 'string', - 'required' => false, - 'example' => 'serDeName', - ], + 'Name' => ['title' => 'SerDe 的名字', 'description' => 'SerDe的名称。', 'type' => 'string', 'required' => false, 'example' => 'serDeName'], 'Parameters' => [ 'title' => 'SerDe 的', 'description' => 'SerDe的属性。', 'type' => 'object', 'required' => false, - 'additionalProperties' => [ - 'type' => 'string', - 'example' => 'key001=value002', - 'description' => 'SerDe的属性。', - ], - ], - 'SerializationLib' => [ - 'title' => 'SerDe 的 serializationLib 信息', - 'description' => '处理serDe的类库。', - 'type' => 'string', - 'required' => true, - 'example' => 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe', + 'additionalProperties' => ['type' => 'string', 'example' => 'key001=value002', 'description' => 'SerDe的属性。'], ], + 'SerializationLib' => ['title' => 'SerDe 的 serializationLib 信息', 'description' => '处理serDe的类库。', 'type' => 'string', 'required' => true, 'example' => 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'], ], 'required' => true, ], ], 'required' => true, ], - 'TableName' => [ - 'title' => '表名', - 'description' => '表的名称。', - 'type' => 'string', - 'required' => true, - 'example' => 'tbl001', - ], + 'TableName' => ['title' => '表名', 'description' => '表的名称。', 'type' => 'string', 'required' => true, 'example' => 'tbl001'], 'Values' => [ 'title' => '需要添加的分区', 'description' => '分区的值。', 'type' => 'array', - 'items' => [ - 'description' => '分区的值。', - 'type' => 'string', - 'required' => true, - 'example' => 'p001', - ], + 'items' => ['description' => '分区的值。', 'type' => 'string', 'required' => true, 'example' => 'p001'], 'required' => true, ], ], @@ -531,47 +277,18 @@ 'description' => '返回对象。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'title' => '如果后端处理出现错误,则表示错误的类型', - 'description' => '标记成功错误的CODE。', - 'type' => 'string', - 'example' => 'INVALID_OPERATION', - ], - 'Data' => [ - 'title' => '成功添加的分区个数', - 'description' => '成功添加的分区数。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '2', - ], - 'Message' => [ - 'title' => '如果后端处理出现错误,则表示错误的信息', - 'description' => '如果有错误,则返回错误的信息。', - 'type' => 'string', - 'example' => 'Too many partitions, exceed max partition number', - ], - 'RequestId' => [ - 'title' => '请求的 ID', - 'description' => '请求RequestId。', - 'type' => 'string', - 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23', - ], - 'Success' => [ - 'title' => '标识本次请求是否成功', - 'description' => '修改数据库是否成功。', - 'type' => 'boolean', - 'example' => 'true', - ], + 'Code' => ['title' => '如果后端处理出现错误,则表示错误的类型', 'description' => '标记成功错误的CODE。', 'type' => 'string', 'example' => 'INVALID_OPERATION'], + 'Data' => ['title' => '成功添加的分区个数', 'description' => '成功添加的分区数。', 'type' => 'integer', 'format' => 'int64', 'example' => '2'], + 'Message' => ['title' => '如果后端处理出现错误,则表示错误的信息', 'description' => '如果有错误,则返回错误的信息。', 'type' => 'string', 'example' => 'Too many partitions, exceed max partition number'], + 'RequestId' => ['title' => '请求的 ID', 'description' => '请求RequestId。', 'type' => 'string', 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23'], + 'Success' => ['title' => '标识本次请求是否成功', 'description' => '修改数据库是否成功。', 'type' => 'boolean', 'example' => 'true'], ], ], ], ], 'errorCodes' => [ 430 => [ - [ - 'errorCode' => 'ServerError.Inner', - 'errorMessage' => 'An internal error occurred.', - ], + ['errorCode' => 'ServerError.Inner', 'errorMessage' => 'An internal error occurred.'], ], ], 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"INVALID_OPERATION\\",\\n \\"Data\\": 2,\\n \\"Message\\": \\"Too many partitions, exceed max partition number\\",\\n \\"RequestId\\": \\"9BEAC206-0795-4DE3-B1FD-964BEF432B23\\",\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"<Message>Too many partitions, exceed max partition number</Message>\\n<RequestId>9BEAC206-0795-4DE3-B1FD-964BEF432B23</RequestId>\\n<Data>2</Data>\\n<Code>INVALID_OPERATION</Code>\\n<Success>true</Success>","errorExample":""}]', @@ -579,13 +296,8 @@ ], 'GetTable' => [ 'summary' => '调用GetTable获取给定表的详细信息。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -593,33 +305,17 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'DbName', 'in' => 'query', - 'schema' => [ - 'title' => '数据库名称', - 'description' => '数据库名称。', - 'type' => 'string', - 'required' => true, - 'example' => 'db001', - ], + 'schema' => ['title' => '数据库名称', 'description' => '数据库名称。', 'type' => 'string', 'required' => true, 'example' => 'db001'], ], [ 'name' => 'TableName', 'in' => 'query', - 'schema' => [ - 'title' => '表名称', - 'description' => '表名称。', - 'type' => 'string', - 'required' => true, - 'example' => 'tbl001', - ], + 'schema' => ['title' => '表名称', 'description' => '表名称。', 'type' => 'string', 'required' => true, 'example' => 'tbl001'], ], ], 'responses' => [ @@ -629,73 +325,27 @@ 'description' => '返回对象。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'title' => '如果后端处理出现错误,则表示错误的类型', - 'description' => '如果失败,则返回失败的代码。'."\n" - ."\n", - 'type' => 'string', - 'example' => 'NO_SUCH_OBJECT', - ], - 'Message' => [ - 'title' => '如果后端处理出现错误,则表示错误的信息', - 'description' => '如果请求失败,则返回失败的详细信息。'."\n" - ."\n", - 'type' => 'string', - 'example' => 'No such table: db001.tbl001', - ], - 'RequestId' => [ - 'title' => '请求的 ID', - 'description' => '本次请求的RequestId。'."\n" - ."\n", - 'type' => 'string', - 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23', - ], - 'Success' => [ - 'title' => '标识本次请求是否成功', - 'description' => '本次请求是否成功。'."\n", - 'type' => 'boolean', - 'example' => 'false', - ], + 'Code' => ['title' => '如果后端处理出现错误,则表示错误的类型', 'description' => '如果失败,则返回失败的代码。'."\n" + ."\n", 'type' => 'string', 'example' => 'NO_SUCH_OBJECT'], + 'Message' => ['title' => '如果后端处理出现错误,则表示错误的信息', 'description' => '如果请求失败,则返回失败的详细信息。'."\n" + ."\n", 'type' => 'string', 'example' => 'No such table: db001.tbl001'], + 'RequestId' => ['title' => '请求的 ID', 'description' => '本次请求的RequestId。'."\n" + ."\n", 'type' => 'string', 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23'], + 'Success' => ['title' => '标识本次请求是否成功', 'description' => '本次请求是否成功。'."\n", 'type' => 'boolean', 'example' => 'false'], 'Table' => [ 'title' => '获取的表信息', 'description' => '获取的表信息。', 'type' => 'object', 'properties' => [ - 'CreateTime' => [ - 'title' => '表的创建时间', - 'description' => '表的创建时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '20190813', - ], - 'DbName' => [ - 'title' => '数据库名称', - 'description' => '数据库名称。', - 'type' => 'string', - 'example' => 'db001', - ], - 'LastAccessTime' => [ - 'title' => '最后一次访问时间', - 'description' => '表的最后访问时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '20190814', - ], - 'Owner' => [ - 'title' => '表的所属用户', - 'description' => '创建表的DLA username。', - 'type' => 'string', - 'example' => 'user001', - ], + 'CreateTime' => ['title' => '表的创建时间', 'description' => '表的创建时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '20190813'], + 'DbName' => ['title' => '数据库名称', 'description' => '数据库名称。', 'type' => 'string', 'example' => 'db001'], + 'LastAccessTime' => ['title' => '最后一次访问时间', 'description' => '表的最后访问时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '20190814'], + 'Owner' => ['title' => '表的所属用户', 'description' => '创建表的DLA username。', 'type' => 'string', 'example' => 'user001'], 'Parameters' => [ 'title' => '表属性', 'description' => '表的属性。', 'type' => 'object', - 'additionalProperties' => [ - 'type' => 'string', - 'description' => '表的属性。', - 'example' => 'key001=value001', - ], + 'additionalProperties' => ['type' => 'string', 'description' => '表的属性。', 'example' => 'key001=value001'], ], 'PartitionKeys' => [ 'title' => '分区信息', @@ -705,24 +355,9 @@ 'description' => '表的分区信息。', 'type' => 'object', 'properties' => [ - 'Comment' => [ - 'title' => '分区注释', - 'description' => '分区注释。', - 'type' => 'string', - 'example' => 'this is partition comment', - ], - 'Name' => [ - 'title' => '分区名称', - 'description' => '分区字段名称。', - 'type' => 'string', - 'example' => 'part001', - ], - 'Type' => [ - 'title' => '分区类型', - 'description' => '分区列类型。', - 'type' => 'string', - 'example' => 'int', - ], + 'Comment' => ['title' => '分区注释', 'description' => '分区注释。', 'type' => 'string', 'example' => 'this is partition comment'], + 'Name' => ['title' => '分区名称', 'description' => '分区字段名称。', 'type' => 'string', 'example' => 'part001'], + 'Type' => ['title' => '分区类型', 'description' => '分区列类型。', 'type' => 'string', 'example' => 'int'], ], ], ], @@ -739,108 +374,40 @@ 'description' => '表的列信息。', 'type' => 'object', 'properties' => [ - 'Comment' => [ - 'title' => '列注释', - 'description' => '列注释。', - 'type' => 'string', - 'example' => 'this is column comment', - ], - 'Name' => [ - 'title' => '列名称', - 'description' => '列名称。', - 'type' => 'string', - 'example' => 'col1', - ], - 'Type' => [ - 'title' => '列类型', - 'description' => '列类型。', - 'type' => 'string', - 'example' => 'string', - ], + 'Comment' => ['title' => '列注释', 'description' => '列注释。', 'type' => 'string', 'example' => 'this is column comment'], + 'Name' => ['title' => '列名称', 'description' => '列名称。', 'type' => 'string', 'example' => 'col1'], + 'Type' => ['title' => '列类型', 'description' => '列类型。', 'type' => 'string', 'example' => 'string'], ], ], ], - 'InputFormat' => [ - 'title' => '表的 inputFormat', - 'description' => '表的InputFormat。'."\n" - ."\n", - 'type' => 'string', - 'example' => 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat', - ], - 'Location' => [ - 'title' => '表路径', - 'description' => '表的路径。', - 'type' => 'string', - 'example' => 'oss://data/xxxx', - ], - 'OutputFormat' => [ - 'title' => '表的 outputFormat', - 'description' => '表的OutputFormat。'."\n" - ."\n", - 'type' => 'string', - 'example' => 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat', - ], - 'Parameters' => [ - 'title' => 'SD 的属性', - 'description' => 'SD属性。', - 'type' => 'object', - ], + 'InputFormat' => ['title' => '表的 inputFormat', 'description' => '表的InputFormat。'."\n" + ."\n", 'type' => 'string', 'example' => 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'], + 'Location' => ['title' => '表路径', 'description' => '表的路径。', 'type' => 'string', 'example' => 'oss://data/xxxx'], + 'OutputFormat' => ['title' => '表的 outputFormat', 'description' => '表的OutputFormat。'."\n" + ."\n", 'type' => 'string', 'example' => 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'], + 'Parameters' => ['title' => 'SD 的属性', 'description' => 'SD属性。', 'type' => 'object'], 'SerDeInfo' => [ 'title' => '表的 SerDe 信息', 'description' => 'SerDe信息。', 'type' => 'object', 'properties' => [ - 'Name' => [ - 'title' => 'SerDe 的名称', - 'description' => 'SerDe名字。', - 'type' => 'string', - 'example' => 'SerDeName', - ], + 'Name' => ['title' => 'SerDe 的名称', 'description' => 'SerDe名字。', 'type' => 'string', 'example' => 'SerDeName'], 'Parameters' => [ 'title' => 'SerDe 的属性', 'description' => 'SerDe属性。', 'type' => 'object', - 'additionalProperties' => [ - 'type' => 'string', - 'description' => 'SerDe属性。', - 'example' => 'key001=value001', - ], - ], - 'SerializationLib' => [ - 'title' => 'SerDe 的 serializationLib', - 'description' => '处理serDe的类库。'."\n" - ."\n", - 'type' => 'string', - 'example' => 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe', + 'additionalProperties' => ['type' => 'string', 'description' => 'SerDe属性。', 'example' => 'key001=value001'], ], + 'SerializationLib' => ['title' => 'SerDe 的 serializationLib', 'description' => '处理serDe的类库。'."\n" + ."\n", 'type' => 'string', 'example' => 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'], ], ], ], ], - 'TableName' => [ - 'title' => '表的名称', - 'description' => '表名称。', - 'type' => 'string', - 'example' => 'tbl001', - ], - 'TableType' => [ - 'title' => '表的类型', - 'description' => '表类型,支持VIEW、MANAGED_TABLE、EXTERNAL_TABLE、VIRTUAL_VIEW。', - 'type' => 'string', - 'example' => 'VIEW', - ], - 'ViewExpandedText' => [ - 'title' => '如果表是视图,则存储扩展视图SQL', - 'description' => '如果表是视图,则代表视图的扩展SQL。', - 'type' => 'string', - 'example' => 'select count(*) from tbl002', - ], - 'ViewOriginalText' => [ - 'title' => '如果表是视图,则存储原生视图SQL', - 'description' => '如果表是视图,则代表视图的原始SQL。', - 'type' => 'string', - 'example' => 'select count(*) from tbl002', - ], + 'TableName' => ['title' => '表的名称', 'description' => '表名称。', 'type' => 'string', 'example' => 'tbl001'], + 'TableType' => ['title' => '表的类型', 'description' => '表类型,支持VIEW、MANAGED_TABLE、EXTERNAL_TABLE、VIRTUAL_VIEW。', 'type' => 'string', 'example' => 'VIEW'], + 'ViewExpandedText' => ['title' => '如果表是视图,则存储扩展视图SQL', 'description' => '如果表是视图,则代表视图的扩展SQL。', 'type' => 'string', 'example' => 'select count(*) from tbl002'], + 'ViewOriginalText' => ['title' => '如果表是视图,则存储原生视图SQL', 'description' => '如果表是视图,则代表视图的原始SQL。', 'type' => 'string', 'example' => 'select count(*) from tbl002'], ], ], ], @@ -853,13 +420,8 @@ ], 'GetAllTables' => [ 'summary' => '调用GetAllTables获取数据库下面的所有有权限的表。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -867,22 +429,12 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'DbName', 'in' => 'query', - 'schema' => [ - 'title' => '数据库名称', - 'description' => '需要获取数据库的名称。', - 'type' => 'string', - 'required' => true, - 'example' => 'db001', - ], + 'schema' => ['title' => '数据库名称', 'description' => '需要获取数据库的名称。', 'type' => 'string', 'required' => true, 'example' => 'db001'], ], ], 'responses' => [ @@ -892,40 +444,16 @@ 'description' => '返回对象。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'title' => '如果后端处理出现错误,则表示错误的类型', - 'description' => '如果请求有异常,则返回异常编码。', - 'type' => 'string', - 'example' => 'NO_SUCH_OBJECT', - ], + 'Code' => ['title' => '如果后端处理出现错误,则表示错误的类型', 'description' => '如果请求有异常,则返回异常编码。', 'type' => 'string', 'example' => 'NO_SUCH_OBJECT'], 'Data' => [ 'title' => '请求数据库低下的所有表', 'description' => '如果请求成功,则返回db001下面的所有有权限的表。', 'type' => 'array', - 'items' => [ - 'description' => '如果请求成功,则返回db001下面的所有有权限的表。', - 'type' => 'string', - 'example' => 'tbl001', - ], - ], - 'Message' => [ - 'title' => '如果后端处理出现错误,则表示错误的信息', - 'description' => '如果出现异常,则返回错误的信息。', - 'type' => 'string', - 'example' => 'The database db001 does not exist', - ], - 'RequestId' => [ - 'title' => '请求的 ID', - 'description' => '本次请求的RequestId。', - 'type' => 'string', - 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23', - ], - 'Success' => [ - 'title' => '标识本次请求是否成功', - 'description' => '本次请求是否成功。', - 'type' => 'boolean', - 'example' => 'false', + 'items' => ['description' => '如果请求成功,则返回db001下面的所有有权限的表。', 'type' => 'string', 'example' => 'tbl001'], ], + 'Message' => ['title' => '如果后端处理出现错误,则表示错误的信息', 'description' => '如果出现异常,则返回错误的信息。', 'type' => 'string', 'example' => 'The database db001 does not exist'], + 'RequestId' => ['title' => '请求的 ID', 'description' => '本次请求的RequestId。', 'type' => 'string', 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23'], + 'Success' => ['title' => '标识本次请求是否成功', 'description' => '本次请求是否成功。', 'type' => 'boolean', 'example' => 'false'], ], ], ], @@ -936,13 +464,8 @@ ], 'DropTable' => [ 'summary' => '将给定表删除。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -950,33 +473,17 @@ ], 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'delete', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'DbName', 'in' => 'query', - 'schema' => [ - 'title' => '数据库名称', - 'description' => '需要删除表所在的数据库', - 'type' => 'string', - 'required' => true, - 'example' => 'db001', - ], + 'schema' => ['title' => '数据库名称', 'description' => '需要删除表所在的数据库', 'type' => 'string', 'required' => true, 'example' => 'db001'], ], [ 'name' => 'TableName', 'in' => 'query', - 'schema' => [ - 'title' => '表名称', - 'description' => '需要删除的表', - 'type' => 'string', - 'required' => true, - 'example' => 'tbl001', - ], + 'schema' => ['title' => '表名称', 'description' => '需要删除的表', 'type' => 'string', 'required' => true, 'example' => 'tbl001'], ], ], 'responses' => [ @@ -986,46 +493,18 @@ 'description' => '返回对象', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'title' => '如果后端处理出现错误,则表示错误的类型', - 'description' => '标记成功错误的 CODE', - 'type' => 'string', - 'example' => 'NO_SUCH_OBJECT', - ], - 'Data' => [ - 'title' => '标记表是否删除成功', - 'description' => '标记是否删除成功', - 'type' => 'boolean', - 'example' => 'false', - ], - 'Message' => [ - 'title' => '如果后端处理出现错误,则表示错误的信息', - 'description' => '如果删除表失败,返回失败的原因。', - 'type' => 'string', - 'example' => 'No such table: db001.tbl001', - ], - 'RequestId' => [ - 'title' => '请求的 ID', - 'description' => '请求的 RequestId', - 'type' => 'string', - 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23', - ], - 'Success' => [ - 'title' => '标识本次请求是否成功', - 'description' => '标记本次请求是否成功', - 'type' => 'boolean', - 'example' => 'false', - ], + 'Code' => ['title' => '如果后端处理出现错误,则表示错误的类型', 'description' => '标记成功错误的 CODE', 'type' => 'string', 'example' => 'NO_SUCH_OBJECT'], + 'Data' => ['title' => '标记表是否删除成功', 'description' => '标记是否删除成功', 'type' => 'boolean', 'example' => 'false'], + 'Message' => ['title' => '如果后端处理出现错误,则表示错误的信息', 'description' => '如果删除表失败,返回失败的原因。', 'type' => 'string', 'example' => 'No such table: db001.tbl001'], + 'RequestId' => ['title' => '请求的 ID', 'description' => '请求的 RequestId', 'type' => 'string', 'example' => '9BEAC206-0795-4DE3-B1FD-964BEF432B23'], + 'Success' => ['title' => '标识本次请求是否成功', 'description' => '标记本次请求是否成功', 'type' => 'boolean', 'example' => 'false'], ], ], ], ], 'errorCodes' => [ 430 => [ - [ - 'errorCode' => 'ServerError.Inner', - 'errorMessage' => 'An internal error occurred.', - ], + ['errorCode' => 'ServerError.Inner', 'errorMessage' => 'An internal error occurred.'], ], ], 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"NO_SUCH_OBJECT\\",\\n \\"Data\\": false,\\n \\"Message\\": \\"No such table: db001.tbl001\\",\\n \\"RequestId\\": \\"9BEAC206-0795-4DE3-B1FD-964BEF432B23\\",\\n \\"Success\\": false\\n}","errorExample":""},{"type":"xml","example":"<Message>No such table: db001.tbl001</Message>\\n<RequestId>9BEAC206-0795-4DE3-B1FD-964BEF432B23</RequestId>\\n<Data>false</Data>\\n<Code>NO_SUCH_OBJECT</Code>\\n<Success>false</Success>","errorExample":""}]', @@ -1033,221 +512,59 @@ ], ], 'endpoints' => [ - [ - 'regionId' => 'cn-beijing', - 'endpoint' => 'openanalytics.cn-beijing.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangjiakou', - 'endpoint' => 'openanalytics.cn-zhangjiakou.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou', - 'endpoint' => 'openanalytics.cn-hangzhou.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai', - 'endpoint' => 'openanalytics.cn-shanghai.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen', - 'endpoint' => 'openanalytics.cn-shenzhen.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hongkong', - 'endpoint' => 'openanalytics.cn-hongkong.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-1', - 'endpoint' => 'openanalytics.ap-southeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-2', - 'endpoint' => 'datalakeanalytics.ap-southeast-2.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-3', - 'endpoint' => 'openanalytics.ap-southeast-3.aliyuncs.com', - ], - [ - 'regionId' => 'ap-northeast-1', - 'endpoint' => 'datalakeanalytics.ap-northeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'eu-west-1', - 'endpoint' => 'openanalytics.eu-west-1.aliyuncs.com', - ], - [ - 'regionId' => 'us-west-1', - 'endpoint' => 'openanalytics.us-west-1.aliyuncs.com', - ], - [ - 'regionId' => 'us-east-1', - 'endpoint' => 'datalakeanalytics.us-east-1.aliyuncs.com', - ], - [ - 'regionId' => 'eu-central-1', - 'endpoint' => 'datalakeanalytics.eu-central-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-south-1', - 'endpoint' => 'openanalytics.ap-south-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-northeast-2-pop', - 'endpoint' => 'openanalytics.ap-northeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-5', - 'endpoint' => 'openanalytics.ap-southeast-5.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-finance-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-finance-pop', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-gov-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-nu16-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-chengdu', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-edge-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-fujian', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-haidian-cm12-c01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-bj-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-finance', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-prod-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-test-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-test-2', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-test-3', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-test-306', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hongkong-finance-pop', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-huhehaote', - 'endpoint' => 'openanalytics.cn-huhehaote.aliyuncs.com', - ], - [ - 'regionId' => 'cn-north-2-gov-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-qingdao', - 'endpoint' => 'openanalytics.cn-qingdao.aliyuncs.com', - ], - [ - 'regionId' => 'cn-qingdao-nebula', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-et15-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-et2-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-finance-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-inner', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-internal-test-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-finance-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-inner', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-st4-d01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-su18-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-wuhan', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-yushanfang', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangbei-na61-b01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangjiakou-na62-a01', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhengzhou-nebula-1', - 'endpoint' => 'openanalytics.aliyuncs.com', - ], - [ - 'regionId' => 'eu-west-1-oxs', - 'endpoint' => 'openanalytics.ap-northeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'me-east-1', - 'endpoint' => 'openanalytics.me-east-1.aliyuncs.com', - ], - [ - 'regionId' => 'rus-west-1-pop', - 'endpoint' => 'openanalytics.ap-northeast-1.aliyuncs.com', - ], + ['regionId' => 'cn-beijing', 'endpoint' => 'openanalytics.cn-beijing.aliyuncs.com'], + ['regionId' => 'cn-zhangjiakou', 'endpoint' => 'openanalytics.cn-zhangjiakou.aliyuncs.com'], + ['regionId' => 'cn-hangzhou', 'endpoint' => 'openanalytics.cn-hangzhou.aliyuncs.com'], + ['regionId' => 'cn-shanghai', 'endpoint' => 'openanalytics.cn-shanghai.aliyuncs.com'], + ['regionId' => 'cn-shenzhen', 'endpoint' => 'openanalytics.cn-shenzhen.aliyuncs.com'], + ['regionId' => 'cn-hongkong', 'endpoint' => 'openanalytics.cn-hongkong.aliyuncs.com'], + ['regionId' => 'ap-southeast-1', 'endpoint' => 'openanalytics.ap-southeast-1.aliyuncs.com'], + ['regionId' => 'ap-southeast-2', 'endpoint' => 'datalakeanalytics.ap-southeast-2.aliyuncs.com'], + ['regionId' => 'ap-southeast-3', 'endpoint' => 'openanalytics.ap-southeast-3.aliyuncs.com'], + ['regionId' => 'ap-northeast-1', 'endpoint' => 'datalakeanalytics.ap-northeast-1.aliyuncs.com'], + ['regionId' => 'eu-west-1', 'endpoint' => 'openanalytics.eu-west-1.aliyuncs.com'], + ['regionId' => 'us-west-1', 'endpoint' => 'openanalytics.us-west-1.aliyuncs.com'], + ['regionId' => 'us-east-1', 'endpoint' => 'datalakeanalytics.us-east-1.aliyuncs.com'], + ['regionId' => 'eu-central-1', 'endpoint' => 'datalakeanalytics.eu-central-1.aliyuncs.com'], + ['regionId' => 'ap-south-1', 'endpoint' => 'openanalytics.ap-south-1.aliyuncs.com'], + ['regionId' => 'ap-northeast-2-pop', 'endpoint' => 'openanalytics.ap-northeast-1.aliyuncs.com'], + ['regionId' => 'ap-southeast-5', 'endpoint' => 'openanalytics.ap-southeast-5.aliyuncs.com'], + ['regionId' => 'cn-beijing-finance-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-beijing-finance-pop', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-beijing-gov-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-beijing-nu16-b01', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-chengdu', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-edge-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-fujian', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-haidian-cm12-c01', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-hangzhou-bj-b01', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-hangzhou-finance', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-hangzhou-internal-prod-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-hangzhou-internal-test-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-hangzhou-internal-test-2', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-hangzhou-internal-test-3', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-hangzhou-test-306', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-hongkong-finance-pop', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-huhehaote', 'endpoint' => 'openanalytics.cn-huhehaote.aliyuncs.com'], + ['regionId' => 'cn-north-2-gov-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-qingdao', 'endpoint' => 'openanalytics.cn-qingdao.aliyuncs.com'], + ['regionId' => 'cn-qingdao-nebula', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-shanghai-et15-b01', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-shanghai-et2-b01', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-shanghai-finance-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-shanghai-inner', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-shanghai-internal-test-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-shenzhen-finance-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-shenzhen-inner', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-shenzhen-st4-d01', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-shenzhen-su18-b01', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-wuhan', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-yushanfang', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-zhangbei-na61-b01', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-zhangjiakou-na62-a01', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'cn-zhengzhou-nebula-1', 'endpoint' => 'openanalytics.aliyuncs.com'], + ['regionId' => 'eu-west-1-oxs', 'endpoint' => 'openanalytics.ap-northeast-1.aliyuncs.com'], + ['regionId' => 'me-east-1', 'endpoint' => 'openanalytics.me-east-1.aliyuncs.com'], + ['regionId' => 'rus-west-1-pop', 'endpoint' => 'openanalytics.ap-northeast-1.aliyuncs.com'], ], ]; |
