华为云用户手册

  • 响应参数 状态码: 200 表3 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 表4 响应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 表5 ResourceTag 参数 参数类型 描述 key String 键。 value String 值。 表6 CreateSpec 参数 参数类型 描述 product_id String 商品ID。由系统自动生成,如OFFI8XXXXXXXXXXXXXXXX4。 spec_code String 规格编码。由系统自动生成,例如lakeformation.unit.basic.qps。 stride_num Integer 步数。QPS为每秒最大请求数步长,最小为5,步长为1。 状态码: 400 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。
  • 响应示例 状态码: 200 LakeFormation实例详情 { "instance_id" : "01049549-82cd-4b2b-9733-ddb94350c125", "name" : "LakeFormation_instance", "description" : "string", "enterprise_project_id" : 0, "shared" : false, "create_time" : "2022-10-08T12:49:19.000+00:00", "update_time" : "2022-10-08T12:49:19.000+00:00", "status" : "running", "in_recycle_bin" : false, "specs" : [ { "spec_code" : "hws.resource.type.lakeformation.qps", "stride_num" : 1 } ] } 状态码: 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} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。
  • 响应示例 状态码: 200 系统协议响应体 { "agreement_rules" : [ { "agreement_name" : "agreement AAA", "agreement_display_name" : "AAA", "agreement_version" : "v1", "agreement_url" : "https://AAA" }, { "agreement_name" : "agreement BBB", "agreement_display_name" : "BBB", "agreement_version" : "v1", "agreement_url" : "https://BBB" } ] } 状态码: 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 表3 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 表4 响应Body参数 参数 参数类型 描述 agreement_rules Array of AgreementRule objects 系统协议列表。 表5 AgreementRule 参数 参数类型 描述 agreement_name String 协议名称。 agreement_display_name String 协议展示名称。 agreement_version String 协议版本。 agreement_url String 协议链接。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。
  • 请求示例 POST https://{endpoint} /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/partitions/batch-drop { "if_exist" : true, "delete_data" : true, "partition_values" : [ [ "54fd5f39855e43e29630196af18cfb22", "ae64345374854efc819fac880541465e" ], [ "c085eeb64df04982a4c93d3a33fc8cf6", "e9c380472d974182b973f46443e8dc3b" ], [ "ca39a2137c8548d0a49842802f2dedb8", "c1d9679369494c52933c31ecd5483550" ] ] }
  • 响应示例 状态码: 200 已删除partition列表 [ { "catalog_name" : "catcd6a92bfc2c74a509dc8501b8124505c", "database_name" : "db4cfc99ac3cea421abc157c7bd49f6f16", "table_name" : "tblbb79f3733c0747adbb94981b412fe48f", "partition_values" : [ "48e1f86dc4394a218b832d94411805fe", "5a2ab07a663c49a98cc606e6ffa0b178" ], "create_time" : "2023-05-30T09:06:41.372+00:00", "last_access_time" : "2023-05-30T09:06:41.000+00:00", "parameters" : { "key1" : "value1", "transient_lastDdlTime" : "120", "classification" : "other" }, "storage_descriptor" : { "columns" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "83e99b4daff04e75b28263bf44495a3c" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "d947669d90884014b60264b2770849ae" }, { "column_type" : "string", "column_name" : "column_prefix2", "comment" : "21edd8e92f2448deb036f8e4682ec694" }, { "column_type" : "string", "column_name" : "column_prefix3", "comment" : "fc25f38e8b694aebb34a2f84ef4a62f7" }, { "column_type" : "string", "column_name" : "column_prefix4", "comment" : "3443079e616d447f8f35da2014754701" }, { "column_type" : "string", "column_name" : "column_prefix5", "comment" : "5f7dda02ac8e4813b3eb4858abb7c520" }, { "column_type" : "string", "column_name" : "column_prefix6", "comment" : "2a6ae2e5bc3f4add99133106f2cd526c" }, { "column_type" : "string", "column_name" : "column_prefix7", "comment" : "84d50424269a41fbb5528b350e9d0b13" }, { "column_type" : "string", "column_name" : "column_prefix8", "comment" : "e3f1d2fa80454554a22e8564ec9c4832" }, { "column_type" : "string", "column_name" : "column_prefix9", "comment" : "f11315794e6d40daa2cb8347c61e5a46" } ], "location" : "obs://location/test/database/b593fc09871e4c9886ed931a3e51f9e5", "compressed" : false, "input_format" : "8c470072d43344a3a3bfabd2c7f9d6ec", "output_format" : "74ee5be43fb548e7b988390df05134fa", "number_of_buckets" : 0, "bucket_columns" : [ ], "sort_columns" : [ ], "serde_info" : { "name" : "9b3ea84748854c2d86a71ae37e246293", "serialization_library" : "e9632ffbbfbe425d8eac91e765e046e1", "parameters" : { "e5ae426044054a5f8e362b9b5729dbab" : "33d8296203f94760b1e4b7db55edce0d" } }, "parameters" : { "7e27b28f439e40bea098dd65bc857334" : "ab893cac08bb4374beb8ff00a02e9a73", "c698760d6de74d0c92eee65bea283215" : "8ba9a058a5cc4ebaac6f43c9771e167a" }, "skewed_info" : { "skewed_column_names" : [ ], "skewed_column_value_location_maps" : { }, "skewed_column_values" : [ ] }, "stored_as_sub_directories" : false } }, { "catalog_name" : "catcd6a92bfc2c74a509dc8501b8124505c", "database_name" : "db4cfc99ac3cea421abc157c7bd49f6f16", "table_name" : "tblbb79f3733c0747adbb94981b412fe48f", "partition_values" : [ "e4af64d55308403a9abf1999afbbe2be", "079f4cd2ee5b4de6922ef8f0c92c82ae" ], "create_time" : "2023-05-30T09:06:41.372+00:00", "last_access_time" : "2023-05-30T09:06:41.000+00:00", "parameters" : { "key1" : "value1", "transient_lastDdlTime" : "120", "classification" : "other" }, "storage_descriptor" : { "columns" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "b40e5a6b6b3c4a538c4b7daa8bc49300" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "d7de59704feb4218ad6c3899f16f72e3" }, { "column_type" : "string", "column_name" : "column_prefix2", "comment" : "215d3961dd0c4858b884e50157da1d4b" }, { "column_type" : "string", "column_name" : "column_prefix3", "comment" : "b8e4888680ca449492be2344a81aba1d" }, { "column_type" : "string", "column_name" : "column_prefix4", "comment" : "1ac15b288c354834830062e48b04e3c8" }, { "column_type" : "string", "column_name" : "column_prefix5", "comment" : "5e65189b3f28434c8b96a56fb19b3005" }, { "column_type" : "string", "column_name" : "column_prefix6", "comment" : "7944cf9158514a96905712d686bc7c18" }, { "column_type" : "string", "column_name" : "column_prefix7", "comment" : "c6b9396476e541e9ab34a8eb5fda9953" }, { "column_type" : "string", "column_name" : "column_prefix8", "comment" : "978fe9b8a1d1437391e83553ae361bfc" }, { "column_type" : "string", "column_name" : "column_prefix9", "comment" : "4f7ed315c7c44c5683500104464f4776" } ], "location" : "obs://location/test/database/3971910eb87a41ee9d7096d538232c33", "compressed" : false, "input_format" : "620befc9b9a447fb95ecfb0d33fb636c", "output_format" : "fc943b36eaec4d1da525734e56374d32", "number_of_buckets" : 0, "bucket_columns" : [ ], "sort_columns" : [ ], "serde_info" : { "name" : "9286f98baef44841883166345635faed", "serialization_library" : "ac9cdbe5004d468798bc57b4ed10f602", "parameters" : { "cef1b8d74bdd43459793b00b4deff6ae" : "e66acd0f816047ae9e00d01a4045c340" } }, "parameters" : { "0546e622cf2042598ed4f31e0b3b3276" : "be46b5accfdc41ba93f50fbe16b782c2", "a5b63ea213ab48be8c3c361fe93f75d2" : "c0f1215c944040cfad2e69fbe7cb4b0b" }, "skewed_info" : { "skewed_column_names" : [ ], "skewed_column_value_location_maps" : { }, "skewed_column_values" : [ ] }, "stored_as_sub_directories" : false } }, { "catalog_name" : "catcd6a92bfc2c74a509dc8501b8124505c", "database_name" : "db4cfc99ac3cea421abc157c7bd49f6f16", "table_name" : "tblbb79f3733c0747adbb94981b412fe48f", "partition_values" : [ "e5ade865888a4bb0a22b71505dd0989d", "788dfdb29db342f488a6155a55875f5b" ], "create_time" : "2023-05-30T09:06:41.372+00:00", "last_access_time" : "2023-05-30T09:06:41.000+00:00", "parameters" : { "key1" : "value1", "transient_lastDdlTime" : "120", "classification" : "other" }, "storage_descriptor" : { "columns" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "a4398b0a8f404ad1a2d8d350efdcd812" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "c2d17faf55de41ddb9f098a684dd8473" }, { "column_type" : "string", "column_name" : "column_prefix2", "comment" : "5f2de67835ff49aba7b661712ef059a6" }, { "column_type" : "string", "column_name" : "column_prefix3", "comment" : "26ce9cc09f3545df80181cbed87d4da2" }, { "column_type" : "string", "column_name" : "column_prefix4", "comment" : "f5b65b8db66349b3a1f8eace0ea33334" }, { "column_type" : "string", "column_name" : "column_prefix5", "comment" : "3f9b100dbc2f45d58d6fbcfa63e0d806" }, { "column_type" : "string", "column_name" : "column_prefix6", "comment" : "22c5f279e9d04cada8bdee6ddbd38af7" }, { "column_type" : "string", "column_name" : "column_prefix7", "comment" : "7ac1468020094057bf2e1e41f3e035b8" }, { "column_type" : "string", "column_name" : "column_prefix8", "comment" : "8c8178e2fe694ace80e78d5c985f7165" }, { "column_type" : "string", "column_name" : "column_prefix9", "comment" : "3f8d23d533fe44b295067de73a8f1b68" } ], "location" : "obs://location/test/database/8c351a1aca6b426a936be4453da30c35", "compressed" : false, "input_format" : "9fb9f9d02b3044febe447a1ad4ca5297", "output_format" : "ba8acae75da24d858ebe99f4ef2fce84", "number_of_buckets" : 0, "bucket_columns" : [ ], "sort_columns" : [ ], "serde_info" : { "name" : "6e4b2479321842d191f1b540b348a4f1", "serialization_library" : "22209422df114f589b4ec28d19d86e52", "parameters" : { "a5c4f39d83d047748dcd1218764c7a1c" : "9e2256acd089474ba469d329d35ace13" } }, "parameters" : { "997ebfa4c6e343789a92d20f7961c865" : "2a1899624e084fb4b26595469cd23f32", "86887611dd7345c88f3de16538cb3587" : "ac4aab973d50429d9803cb418c9d44e1" }, "skewed_info" : { "skewed_column_names" : [ ], "skewed_column_value_location_maps" : { }, "skewed_column_values" : [ ] }, "stored_as_sub_directories" : false } } ] 状态码: 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/batch-drop 表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个字符。
  • 响应示例 状态码: 201 Created { "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" }
  • 请求示例 POST https://{endpoint}/v1/{project_id}/instances/{instance_id}/catalogs { "catalog_name" : "hive", "description" : "Default catalog, for Hive", "location" : "obs://lakeformation/test", "database_location_list" : null, "owner" : "admin", "owner_type" : "USER", "owner_source" : "IAM" }
  • URI POST /v1/{project_id}/instances/{instance_id}/catalogs 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 Array of strings 租户token。 表3 请求Body参数 参数 是否必选 参数类型 描述 catalog_name 是 String catalog名称。只能包含字母、数字和下划线,且长度为1~256个字符。 description 否 String 描述信息。最大长度为4000个字符。 location 否 String 路径地址。例如obs://location/uri/。 database_location_list 否 Array of strings 数据库路径列表。最小条目数为0,最大条目数为1000。 branch_name 否 String 分支名称。只能包含字母、数字和下划线,且长度为1~32个字符。默认值为main。 owner 否 String catalog所有者。只能包含字母、数字和下划线,且最大长度为128个字符。 owner_type 否 String 所有者类型:USER-用户、GROUP-组、ROLE-角色。 枚举值: USER ROLE GROUP owner_source 否 String 所有者来源:IAM-云用户、SAML-联邦、LDAP-ld用户、LOCAL-本地用户、AGENTTENANT-委托、OTHER-其它。 枚举值: IAM SAML LDAP LOCAL AGENTTENANT OTHER type 否 String catalog类型,可选值为DEFAULT(代表默认的元数据类型)、CLICKHOUSE(代表CH类型),不设置时默认为DEFAULT。 创建时指定,不可修改。 枚举值: DEFAULT CLICKHOUSE
  • 响应参数 状态码: 201 表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 解决方案描述。
  • 调用API获取项目ID 项目ID还用通过调用查询指定条件下的项目列表API获取。 获取项目ID的接口为“GET https://{Endpoint}/v3/projects”,其中{Endpoint}为IAM的终端节点,可以从地区和终端节点获取。接口的认证鉴权请参见认证鉴权。 响应示例如下,其中projects下的“id”即为项目ID。 { "projects": [ { "domain_id": "65382450e8f64ac0870cd180d14e684b", "is_domain": false, "parent_id": "65382450e8f64ac0870cd180d14e684b", "name": "xxx", "description": "", "links": { "next": null, "previous": null, "self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99" }, "id": "a4a5d4098fb4474fa22cd05f897d6b99", "enabled": true } ], "links": { "next": null, "previous": null, "self": "https://www.example.com/v3/projects" } }
  • 请求示例 POST https://{endpoint}/v1/{project_id}/instances/{instance_id}/roles/{role_name}/grant-principals [ { "principal_name" : "user1", "principal_source" : "IAM", "principal_type" : "USER" } ]
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 Array of strings 租户token。 表3 请求Body参数 参数 是否必选 参数类型 描述 [数组元素] 是 Array of Principal objects 主体列表。最小元素数为1,最大元素数为100。 表4 Principal 参数 是否必选 参数类型 描述 principal_type 是 String 主体类型: USER-用户、 GROUP-组、 ROLE-角色、 SHARE-共享、 OTHER-其它。 枚举值: USER GROUP ROLE SHARE OTHER principal_source 是 String 主体来源: IAM-云用户、 SAML-联邦、 LDAP ld-用户、 LOCAL-本地用户、 AGENTTENANT-委托、 OTHER-其它。 枚举值: IAM SAML LDAP LOCAL AGENTTENANT OTHER principal_name 是 String 主体名称。只能包含中文、字母、数字和_-.特殊字符,且长度为1~49个字符。
  • 响应参数 状态码: 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 解决方案描述。
  • 响应示例 状态码: 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}/roles/{role_name}/grant-principals 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 role_name 是 String 角色名称。只能包含字母、数字、下划线、中划线,且长度为1~255个字符。
  • 响应示例 状态码: 200 实例信息 { "instance_id" : "01049549-82cd-4b2b-9733-ddb94350c125", "name" : "LakeFormation_instance", "description" : "string", "enterprise_project_id" : 0, "shared" : false, "create_time" : "2022-10-08T12:49:19.000+00:00", "update_time" : "2022-10-08T12:49:19.000+00:00", "status" : "running", "in_recycle_bin" : false } 状态码: 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参数 参数 参数类型 描述 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 in_recycle_bin Boolean 是否在回收站。 tags Array of ResourceTag objects 标签列表。 表5 ResourceTag 参数 参数类型 描述 key String 键。 value String 值。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。
  • URI PUT /v1/{project_id}/instances/{instance_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。
  • 响应示例 状态码: 200 LakeFormation实例列表 { "instances" : [ { "instance_id" : "9c368079-6401-4886-991d-0b1bb11e3702", "name" : "LakeFormation_instance", "description" : "string", "enterprise_project_id" : "0", "shared" : false, "create_time" : "2022-11-08T04:08:39.000+00:00", "update_time" : "2022-11-08T04:08:40.000+00:00", "status" : "RUNNING", "in_recycle_bin" : false }, { "instance_id" : "dec259f5-c7a8-413e-91b3-67d66c512680", "name" : "LakeFormation_instance_test", "description" : "string", "enterprise_project_id" : "0", "shared" : false, "create_time" : "2022-11-08T04:07:42.000+00:00", "update_time" : "2022-11-08T04:07:42.000+00:00", "status" : "RUNNING", "in_recycle_bin" : false } ], "total" : 2 } 状态码: 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 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 in_recycle_bin 是 Boolean 是否查询回收站中的实例。默认为false。 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 offset 是 Integer 分页查询时的偏移量。默认值为0。最小值为0,最大值为1000。 limit 是 Integer 分页一页显示数。默认值为10。最小值为1,最大值为1000。 name 否 String 使用LakeFormation实例名称进行检索。只能包含字母、数字、下划线和中划线,且长度为4到32个字符。 enterprise_project_id 是 String 企业项目ID。由用户输入,只能包含字母、数字、下划线和中划线,且长度为1到36个字符。默认为all_granted_eps。 tags 否 String 标签条件列表。
  • 响应参数 状态码: 200 表4 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 表5 响应Body参数 参数 参数类型 描述 instances Array of LakeFormationInstance objects LakeFormation实例列表。 total Integer LakeFormation实例总数。 表6 LakeFormationInstance 参数 参数类型 描述 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 in_recycle_bin Boolean 是否在回收站。 tags Array of ResourceTag objects 标签列表。 表7 ResourceTag 参数 参数类型 描述 key String 键。 value String 值。 状态码: 400 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表10 响应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" }
  • 响应参数 状态码: 200 表4 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 状态码: 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 DELETE /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_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个字符。 表2 Query参数 参数 是否必选 参数类型 描述 delete_data 否 Boolean 是否删除数据库路径下的数据。默认为false。 cascade 否 Boolean 是否级联删除数据库下的表、分区以及函数。默认为false。
  • 请求示例 POST https://{endpoint} /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/partitions/batch-get { "values" : [ [ "test_partition" ] ] }
  • URI POST /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/partitions/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个字符。
共100000条