华为云用户手册

  • 响应示例 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • 响应示例 状态码: 200 OK { "catalog_name" : "hive", "description" : "Default catalog, for Hive", "location" : "obs://lakeformation/test", "database_location_list" : null, "owner" : "admin", "owner_type" : "USER", "owner_source" : " IAM " } 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 catalog_name String catalog名称。 catalog_id String catalogID。 description String 描述信息。 location String 路径地址。例如obs://location/uri/。 database_location_list Array of strings 数据库路径列表。当值为null时,响应Body无该参数。 owner String catalog所有者。LakeFormation服务分为一期和二期,一期响应Body无该参数。 owner_type String 所有者类型,USER-用户,GROUP-组,ROLE-角色。LakeFormation服务分为一期和二期,一期响应Body无该参数。 枚举值: USER ROLE GROUP owner_source String 所有者来源:IAM-云用户、SAML-联邦、LDAP-ld用户、LOCAL-本地用户、AGENTTENANT-委托、OTHER-其它。LakeFormation服务分为一期和二期,一期响应Body无该参数。 枚举值: IAM SAML LDAP LOCAL AGENTTENANT OTHER type String catalog类型,可选值为DEFAULT(代表默认的元数据类型)、CLICKHOUSE(代表CH类型),不设置时默认为DEFAULT。 创建时指定,不可修改。 枚举值: DEFAULT CLICKHOUSE update_time String catalog元数据最后一次修改时间。 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。
  • URI GET /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 catalog_name 是 String catalog名称。只能包含字母、数字和下划线,且长度为1~256个字符。 表2 Query参数 参数 是否必选 参数类型 描述 branch_name 否 String 分支名称。只能包含字母、数字和下划线,且长度为1~32个字符。默认值为main。 version 否 Long 版本
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 total_count Long 总数量。 functions_count Long 函数数量。 catalogs_count Long 目录数量。 databases_count Long 数据库数量。 tables_count Long 表数量。 partitions_count Long 分区数量。 indexes_count Long 索引数量。 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 404 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 500 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。
  • 响应示例 状态码: 200 元数据数量统计信息 { "total_count" : 600, "functions_count" : 100, "catalogs_count" : 100, "databases_count" : 100, "tables_count" : 100, "partitions_count" : 100, "indexes_count" : 100 } 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • URI POST /v1/{project_id}/instances/{instance_id}/metaobj/count 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。
  • 响应示例 状态码: 200 OK { "role_name" : "admin", "description" : "string", "principal_source" : "LOCAL" } 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • URI GET /v1/{project_id}/instances/{instance_id}/roles/{role_name} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 role_name 是 String 角色名称。只能包含字母、数字、下划线、中划线,且长度为1~255个字符。
  • URI GET /v1/{project_id}/instances/{instance_id}/policies/show 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 表2 Query参数 参数 是否必选 参数类型 描述 filter 否 String 权限策略过滤表达式,暂不支持。 resource_name 否 String 元数据资源全名。长度为1~1000个字符。 resource_type 否 String 元数据资源类型:CATA LOG 、DATABASE、TABLE、FUNC、MODEL、COLUMN、URI。 枚举值: CATALOG DATABASE TABLE FUNC MODEL COLUMN URI principal_source 否 String 授权主体来源:IAM-云用户、SAML-联邦、LDAP-ld用户、LOCAL-本地用户。 枚举值: IAM SAML LDAP LOCAL principal_type 否 String 授权主体类型:USER-用户、GROUP-组、ROLE-角色、SHARE-共享、OTHER-其它。 枚举值: USER GROUP ROLE SHARE OTHER principal_name 否 String 授权主体名称。长度为1~1000个字符。 limit 否 Integer 查询返回条数。默认值为1000。最小值为1,最大值为2147483647。 marker 否 String 查询的起始记录ID。最小长度为0,最大长度为256。 reverse_page 否 Boolean 是否查询上一页。默认为false。
  • 请求示例 POST https://{endpoint}/v1/{project_id}/instances { "name" : "lakeformation-instance", "charge_mode" : "postPaid", "shared" : "true", "description" : "", "tags" : [ { "key" : "key1" } ], "enterprise_project_id" : "0" }
  • 响应示例 状态码: 202 创建实例请求下成功 { "instance_id" : "2aeb1789-1b04-4bad-92bf-486a399b9a3e", "name" : "lakeformation-instance", "description" : "", "enterprise_project_id" : "0", "shared" : false, "default_instance" : false, "create_time" : "2023-08-03T11:50:02.000+00:00", "update_time" : "2023-08-03T11:50:04.000+00:00", "status" : "RUNNING", "in_recycle_bin" : false, "tags" : [ ], "specs" : [ { "spec_code" : "lakeformation.unit.basic.metadata", "stride_num" : 0 }, { "spec_code" : "lakeformation.unit.basic.apiinvoke", "stride_num" : 0 } ], "charge_mode" : "postPaid" } 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • 响应参数 状态码: 202 表7 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 表8 响应Body参数 参数 参数类型 描述 instance_id String LakeFormation实例ID。 name String 实例名称。 description String 描述。 enterprise_project_id String 企业项目ID。 shared Boolean 共享型和独享型的判断。false为独享型;true为共享型。 default_instance Boolean 是否为默认实例。 create_time String 实例创建时间戳。 update_time String 实例更新时间戳。 status String 实例状态:RESOURCE_PREPARATION-实例资源准备中、RUNNING-实例运行中、RESOURCE_RELEASE-实例资源释放中、DELETED-实例已释放、RESOURCE_PREPARATION_FAIL-实例资源准备失败、FROZEN_RELEASABLE-可恢复冻结、FROZEN_UNRELEASABLE-不可恢复冻结、RECOVERING-恢复中、DELETING-删除中、SCALING-扩容中、SCALE_FAIL-扩容失败。 枚举值: RESOURCE_PREPARATION RUNNING RESOURCE_RELEASE DELETED RESOURCE_PREPARATION_FAIL FROZEN_RELEASABLE FROZEN_UNRELEASABLE RECOVERING DELETING SCALING SCALE_FAIL resource_progress Integer 资源准备进度百分比,只有当实例处于资源准备中状态时才会计算并返回该值。 resource_expected_duration Integer 资源准备预计时长,单位分钟。 scale_progress Integer 规格变更进度百分比,只有当实例处于规格变更中状态时才会计算并返回该值。 scale_expected_duration Integer 规格变更预计时长,单位分钟。 in_recycle_bin Boolean 是否在回收站。 tags Array of ResourceTag objects 标签列表。 specs Array of CreateSpec objects 规格信息。 charge_mode String 计费模式,postPaid=按需计费,prePaid=包周期计费。 枚举值: prePaid postPaid 表9 ResourceTag 参数 参数类型 描述 key String 键。 value String 值。 表10 CreateSpec 参数 参数类型 描述 product_id String 商品ID。由系统自动生成,如OFFI8XXXXXXXXXXXXXXXX4。 spec_code String 规格编码。由系统自动生成,例如lakeformation.unit.basic.qps。 stride_num Integer 步数。QPS为每秒最大请求数步长,最小为5,步长为1。 状态码: 400 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 404 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 租户token。 表3 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 实例名称。只能包含字母、数字、下划线和中划线,且长度为4到32个字符。 charge_mode 是 String 支付类型:postPaid为按需期、prePaid为包周期。 枚举值: postPaid prePaid enterprise_project_id 否 String 企业项目ID,只有对接了企业项目才可以填写。只能包含字母、数字和中划线,且长度为1到64个字符。 description 否 String 实例描述。用户输入的描述,最长为255个字符。 shared 是 Boolean false为独享型;true为共享型。默认为true。 order_id 否 String 包周期订购时的订单ID。 specs 否 Array of CreateSpec objects 规格列表。 tags 否 Array of ResourceTag objects 标签列表,最多添加20个标签。 charge_info 否 ChargeInfo object 计费信息,charge_mode为prePaid时不能为空。 表4 CreateSpec 参数 是否必选 参数类型 描述 product_id 否 String 商品ID。由系统自动生成,如OFFI8XXXXXXXXXXXXXXXX4。 spec_code 是 String 规格编码。由系统自动生成,例如lakeformation.unit.basic.qps。 stride_num 是 Integer 步数。QPS为每秒最大请求数步长,最小为5,步长为1。 表5 ResourceTag 参数 是否必选 参数类型 描述 key 是 String 键。 value 否 String 值。 表6 ChargeInfo 参数 是否必选 参数类型 描述 period_type 否 String charge_mode为prePaid时生效,且为必选值,订购周期类型。取值范围:MONTH:包月;YEAR:包年。 枚举值: MONTH YEAR period_num 否 Integer charge_mode为prePaid时生效,且为必选值,指定订购的时间。取值范围:当period_type为month时,取值为1~9。当period_type为year时,取值为1~3。当传入浮点型时,会自动截取为整型。 is_auto_renew 否 Boolean charge_mode为prePaid时生效,且为必选值,表示是否自动续订,续订时会自动支付。 按月订购时续订周期默认为1个月,按年订购时续订周期默认为1年,续订周期可自定义修改。true:为自动续订。false:为不自动续订,默认该方式。 is_auto_pay 否 Boolean charge_mode为prePaid时生效,且为必选值,表示是否自动从客户的账户中支付,此字段不影响自动续订的支付方式。true:为自动支付。false:为手动支付,默认该方式。
  • URI GET /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 catalog_name 是 String catalog名称。只能包含字母、数字和下划线,且长度为1~256个字符。 database_name 是 String 数据库名称。只能包含中文、字母、数字、下划线、中划线,且长度为1~128个字符。 table_name 是 String 表名称。只能包含中文、字母、数字、下划线、中划线,且长度为1~256个字符。
  • 响应示例 状态码: 200 OK { "catalog_name" : "hive", "database_name" : "dba", "table_name" : "www", "create_time" : "2022-11-19T03:10:14.000+00:00", "last_access_time" : "2022-12-31T23:59:59.000+00:00", "update_time" : null, "last_analyzed_time" : null, "owner" : "lakeformation", "owner_type" : "USER", "parameters" : { "ww" : "ww", "transient_lastDdlTime" : "1668827414", "classification" : "avro", "www" : "ww", "wwww" : "ww" }, "partition_keys" : [ ], "retention" : 0, "storage_descriptor" : { "columns" : [ { "column_type" : "tinyint", "column_name" : "ww", "comment" : null } ], "location" : "obs://lakeformation/test", "compressed" : true, "input_format" : "org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat", "output_format" : "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat", "number_of_buckets" : 0, "bucket_columns" : [ ], "sort_columns" : [ ], "serde_info" : { "name" : "name", "serialization_library" : "org.apache.hadoop.hive.serde2.avro.AvroSerDe", "parameters" : { "serialization.format" : "1" } }, "parameters" : { }, "skewed_info" : { "skewed_column_names" : [ ], "skewed_column_value_location_maps" : { }, "skewed_column_values" : [ ] }, "stored_as_sub_directories" : false }, "table_type" : "MANAGED_TABLE", "comments" : "", "view_expanded_text" : "", "view_original_text" : "" } 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • 响应参数 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 404 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。
  • 响应示例 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • 请求示例 POST https://{endpoint} /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables { "table_name" : "tbl86b03ad314fa4ea7943fb769df163a79", "table_type" : "MANAGED_TABLE", "owner" : "onebox", "owner_type" : "USER", "create_time" : "2023-05-31T01:59:54.000+00:00", "last_access_time" : "2023-05-31T01:59:54.000+00:00", "last_analyzed_time" : "2023-05-31T01:59:54.000+00:00", "partition_keys" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "5456ac36c75947eab223476dafa58ae0" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "d95d1241557e4a769bfcda42974fdf0e" } ], "retention" : 1000, "storage_descriptor" : { "columns" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "3eb10da96ec84ec6b8543b730c0660b2" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "ee5aa1f3755f425a964f045f59b2c0a0" }, { "column_type" : "string", "column_name" : "column_prefix2", "comment" : "d47884f69582432db1256e60a8e37ea6" }, { "column_type" : "string", "column_name" : "column_prefix3", "comment" : "4e26e910310648f1a97b6e17cb2b25ce" }, { "column_type" : "string", "column_name" : "column_prefix4", "comment" : "85084620943b4d36a9e5d6a856307e73" }, { "column_type" : "string", "column_name" : "column_prefix5", "comment" : "f78264b5d8ab4409a3a05ebb0434424e" }, { "column_type" : "string", "column_name" : "column_prefix6", "comment" : "45df8ef109374ac6ab9aaa371b29baa7" }, { "column_type" : "string", "column_name" : "column_prefix7", "comment" : "c006d18cc411429bacc0f0e1eb75f99e" }, { "column_type" : "string", "column_name" : "column_prefix8", "comment" : "58e1c81b2c0a4c089570106c8bb4461d" }, { "column_type" : "string", "column_name" : "column_prefix9", "comment" : "32cc797a16f348ebbf5f2e1f85969603" } ], "location" : "obs://location/test/database/5e2941387d8741afa217677361d0676f", "compressed" : false, "input_format" : "850fd4c238934dfdaa3006f388d71f9d", "output_format" : "740f42961f1146d39abe19beadc2ad89", "number_of_buckets" : 0, "bucket_columns" : [ ], "sort_columns" : [ ], "serde_info" : { "name" : "a247cc09ce74477e8c95915bb45e9878", "serialization_library" : "9dad2d1dfe944e1d83747997188ed445", "parameters" : { "347f5f03fdaf46489a39e308be3d2160" : "317b872caa5d4de7bed96f644028ed83" } }, "parameters" : { "ce43c3c8b9854b749dddabe76c487dd8" : "67393e5c0dc649479399603f6adf1432", "8805af26461e49feaf5fb67eef8da574" : "f956a8ac29514f57af9da84043b845f0" }, "skewed_info" : { "skewed_column_names" : [ ], "skewed_column_value_location_maps" : { }, "skewed_column_values" : [ ] }, "stored_as_sub_directories" : false }, "parameters" : { "key1" : "value1", "transient_lastDdlTime" : "120", "classification" : "other" }, "comments" : "comment info" }
  • URI POST /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 catalog_name 是 String catalog名称。只能包含字母、数字和下划线,且长度为1~256个字符。 database_name 是 String 数据库名称。只能包含中文、字母、数字、下划线、中划线,且长度为1~128个字符。
  • 响应示例 状态码: 201 Created { "catalog_name" : "catcd6359b2a15f42dc90fca897c15db00a", "database_name" : "dbbf565489e3d04b2d8ca03d6e3d48486f", "table_name" : "tbl1298911dffa94c449a900ec5dfc50cf8", "create_time" : "2023-05-31T02:03:44.016+00:00", "last_access_time" : "2023-05-31T02:03:43.000+00:00", "update_time" : "2023-05-31T02:03:44.016+00:00", "last_analyzed_time" : "2023-05-31T02:03:43.000+00:00", "owner" : "onebox", "owner_type" : "USER", "parameters" : { "key1" : "value1", "transient_lastDdlTime" : "120", "classification" : "other" }, "partition_keys" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "8be09e713e6b46a08b375b662f93e195" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "6874d3047a6c494696438fc64d9a0194" } ], "retention" : 1000, "storage_descriptor" : { "columns" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "5a2968f6141c4d40969c935c39b5accc" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "39ac0d5c26ce47d8948a5ea49a455742" }, { "column_type" : "string", "column_name" : "column_prefix2", "comment" : "a8d51537564a4042ab3d88a0acfccf83" }, { "column_type" : "string", "column_name" : "column_prefix3", "comment" : "d541dd8c95bf4d49853ae5563869821e" }, { "column_type" : "string", "column_name" : "column_prefix4", "comment" : "9955f7831b3b4bdc8a18c2e20b592976" }, { "column_type" : "string", "column_name" : "column_prefix5", "comment" : "32115b31e61245fd94162f566c6db966" }, { "column_type" : "string", "column_name" : "column_prefix6", "comment" : "a6d61e1ad9e14a6da94e242607369284" }, { "column_type" : "string", "column_name" : "column_prefix7", "comment" : "9dd785a2f6744fa2a8c5a64d78147961" }, { "column_type" : "string", "column_name" : "column_prefix8", "comment" : "60128f0062a949559f0c95f2656812ae" }, { "column_type" : "string", "column_name" : "column_prefix9", "comment" : "99d4d3e57af64bd1bb287b5a305b7225" } ], "location" : "obs://location/test/database/0b288717b41a411dacdd0c9fa2e1c275", "compressed" : false, "input_format" : "c28e802613a342568a667aeba4961979", "output_format" : "9bf425a38fd540c69b68366071b8bbd5", "number_of_buckets" : 0, "bucket_columns" : [ ], "sort_columns" : [ ], "serde_info" : { "name" : "e044a1458d8c4b7a871e54243d2adb93", "serialization_library" : "bb299f2201fe4da0886ecd380a1508a3", "parameters" : { "2980009b8dfd4b3bb78a96485a3728c2" : "f83395c8db5e4ac1803892b08c209799" } }, "parameters" : { "64f073b0a9bd49cb8437681f3faa1538" : "f4154f400e6e465cbc8b8b2033a24faf", "f31bf1375d4d4097b68e9816388e50a8" : "881546d1b0184048b03ad20d1218104d" }, "skewed_info" : { "skewed_column_names" : [ ], "skewed_column_value_location_maps" : { }, "skewed_column_values" : [ ] }, "stored_as_sub_directories" : false }, "table_type" : "EXTERNAL_TABLE", "comments" : "comment info" } 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • 请求示例 POST https://{endpoint} /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/partitions/column-statistics/batch-get { "aggregate_statics" : false, "column_names" : [ "column1", "column2" ], "partition_values_list" : [ [ "value1", "value2" ] ] }
  • 响应示例 状态码: 200 OK { "found_partition_number" : 1, "column_statistics" : { "part1=value1/part2=value2" : [ { "column_name" : "columnName", "column_type" : "bigint", "data_type" : "longStats", "long_statistics_data" : { "minimum_value" : 10, "maximum_value" : 1000, "number_of_null" : 30, "number_of_distinct_value" : 20 } } ] } } 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • URI POST /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/partitions/column-statistics/batch-get 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 catalog_name 是 String catalog名称。只能包含字母、数字和下划线,且长度为1~256个字符。 database_name 是 String 数据库名称。只能包含中文、字母、数字、下划线、中划线,且长度为1~128个字符。 table_name 是 String 表名称。只能包含中文、字母、数字、下划线、中划线,且长度为1~256个字符。
  • 响应参数 状态码: 400 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 404 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 500 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。
  • 响应示例 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
  • URI POST /v1/{project_id}/instances/{instance_id}/policies/revoke 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。
  • 请求示例 GET https://{endpoint}/v1/{project_id}/instances/{instance_id}/policies/check-permission { "access_request" : [ { "resource" : { "resource_type" : "DATABASE", "catalog" : "hive", "database" : "test_database_name" }, "principal" : [ { "principal_type" : "GROUP", "principal_source" : "IAM", "principal_name" : "onebox" } ], "action" : "ALL" } ] }
  • 响应参数 状态码: 200 表7 响应Body参数 参数 参数类型 描述 [数组元素] Array of CheckPermissionResult objects OK 表8 CheckPermissionResult 参数 参数类型 描述 check_result Boolean 对应输入策略的检查结果。 error_message String 错误信息。 data_filters Array of strings 行过滤条件列表。 状态码: 400 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 404 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 500 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。
  • 响应示例 状态码: 200 OK [ { "check_result" : false, "error_message" : "test error message" } ] 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }
共100000条