华为云用户手册

  • URI GET /v1/{project_id}/instances/{instance_id}/access-clients/{client_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 client_id 是 String 客户端ID。创建客户端时自动生成。
  • URI POST /v1/{project_id}/instances/{instance_id}/credential 表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参数 参数 是否必选 参数类型 描述 user_names 否 Array of strings IAM 用户。 groups 否 Array of strings 用户组。 roles 否 Array of strings 角色。
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 access String AK。Access Key,是用来标识用户身份的访问密钥。 secret String SK。Secret Key,用来对访问密钥进行加密签名,以验证身份。 security_token String security_token是将所获的AK、SK等信息进行加密后的字符串。 状态码: 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 解决方案描述。
  • 响应示例 状态码: 200 OK { "access" : "ABC***123", "secret" : "ABC***123", "security_token" : "abc***000" } 状态码: 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" }
  • 基本概念 账号 用户的账号对其所拥有的资源及云服务具有完全的访问权限,可以重置用户密码、分配用户权限等。为了确保账号安全,建议您不要直接使用账号进行日常管理工作,而是创建用户并使用用户进行日常管理工作。 用户 由账号在IAM中创建的用户,是云服务的使用人员,具有身份凭证(密码和访问密钥)。 在获取项目ID下,您可以查看账号ID和用户ID。通常在调用API的鉴权过程中,您需要用到账号、用户和密码等信息。 区域(Region) 从地理位置和网络时延维度划分,同一个Region内共享弹性计算、块存储、对象存储、VPC网络、弹性公网IP、镜像等公共服务。Region分为通用Region和专属Region,通用Region指面向公共租户提供通用云服务的Region;专属Region指只承载同一类业务或只面向特定租户提供业务服务的专用Region。 可用区(AZ,Availability Zone) 一个AZ是一个或多个物理数据中心的集合,有独立的风火水电,AZ内逻辑上再将计算、网络、存储等资源划分成多个集群。一个Region中的多个AZ间通过高速光纤相连,以满足用户跨AZ构建高可用性系统的需求。 项目 区域默认对应一个项目,这个项目由系统预置,用来隔离物理区域间的资源(计算资源、存储资源和网络资源),以默认项目为单位进行授权,用户可以访问您账号中该区域的所有资源。如果您希望进行更加精细的权限控制,可以在区域默认的项目中创建子项目,并在子项目中购买资源,然后以子项目为单位进行授权,使得用户仅能访问特定子项目中资源,使得资源的权限控制更加精确。 图1 项目隔离模型 同样在获取项目ID下,您可以查看项目ID。 企业项目 企业项目是项目的升级版,针对企业不同项目间资源的分组和管理,是逻辑隔离。企业项目中可以包含多个区域的资源,且项目中的资源可以迁入迁出 父主题: 使用前必读
  • 响应示例 状态码: 200 OK { "roles" : [ { "role_name" : "admin", "description" : "string", "principal_source" : "LOCAL" } ], "page_info" : { "current_count" : 2000, "next_marker" : "006f492b-xxxx", "previous_marker" : "003e6eba-xxxx" } } 状态码: 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}/users/{user_name}/roles 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 user_name 是 String 用户名。只能包含字母、数字、下划线和中划线,且长度为1~256个字符。 表2 Query参数 参数 是否必选 参数类型 描述 role_pattern 否 String 模糊匹配角色名称。只能包含字母、数字和_|*.-特殊字符,且长度为1~255个字符。 limit 否 Integer 查询返回条数。默认值为100。最小值为1,最大值为1000。 marker 否 String 查询的起始记录ID。最小长度为0,最大长度为1024。 reverse_page 否 Boolean 是否查询上一页。默认为false。
  • URI GET /v1/{project_id}/instances/{instance_id}/roles 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 表2 Query参数 参数 是否必选 参数类型 描述 role_pattern 否 String 模糊匹配角色名称。只能包含字母、数字和_|*.-特殊字符,且长度为1~255个字符。 limit 否 Integer 查询返回条数。默认值为100。最小值为1,最大值为1000。 marker 否 String 查询的起始记录ID。最小长度为0,最大长度为1024。 reverse_page 否 Boolean 是否查询上一页。默认为false。 external_role_id 否 String 用户端角色id,创建时指定,不可修改。
  • 响应示例 状态码: 200 OK { "roles" : [ { "role_name" : "admin", "description" : "role from lakeformation" } ], "page_info" : { "current_count" : 1, "next_marker" : null, "previous_marker" : null } } 状态码: 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-create 表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个字符。
  • 请求示例 POST https://{endpoint} /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/partitions/batch-create { "if_not_exist" : "false", "partitions" : [ { "partition_values" : [ "string" ], "create_time" : "2023-05-26T08:03:42.267Z", "last_access_time" : "2023-05-26T08:03:42.267Z", "parameters" : { "additionalProp1" : "string", "additionalProp2" : "string", "additionalProp3" : "string" }, "storage_descriptor" : { "columns" : [ { "column_type" : "string", "column_name" : "c1", "comment" : "string" } ], "location" : "string", "compressed" : false, "input_format" : "string", "output_format" : "string", "number_of_buckets" : 0, "bucket_columns" : [ "string" ], "sort_columns" : [ { "column" : "string", "sort_order" : 1 } ], "serde_info" : { "name" : "string", "serialization_library" : "string", "parameters" : { "additionalProp1" : "string", "additionalProp2" : "string", "additionalProp3" : "string" } }, "parameters" : { "additionalProp1" : "string", "additionalProp2" : "string", "additionalProp3" : "string" }, "skewed_info" : { "skewed_column_names" : [ "string" ], "skewed_column_value_location_maps" : { "additionalProp1" : "string", "additionalProp2" : "string", "additionalProp3" : "string" }, "skewed_column_values" : [ [ ] ] }, "stored_as_sub_directories" : false } } ] }
  • 响应示例 状态码: 201 新增加的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" }
  • 响应示例 状态码: 200 OBS桶列表 { "total" : 3, "buckets" : [ { "id" : "555d9e8999c94705be3d7edb70a3199a", "name" : "lakeformation", "creation_date" : "2022-06-01T09:32:01.487+00:00", "location" : "xxxxxx" }, { "id" : "555d9e8999c94705be3d7edb70a3199a", "name" : "lakeformation-test", "creation_date" : "2022-06-07T03:20:39.120+00:00", "location" : "xxxxxx" }, { "id" : "555d9e8999c94705be3d7edb70a3199a", "name" : "test-bk", "creation_date" : "2022-08-02T09:36:37.193+00:00", "location" : "xxxxxx" } ] } 状态码: 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}/obs/buckets 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 分页查询时的偏移量。默认值为0。最小值为1,最大值为1000。 limit 否 Integer 分页一页显示数。默认值为1000。最小值为1,最大值为1000。
  • 响应参数 状态码: 200 表4 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 表5 响应Body参数 参数 参数类型 描述 buckets Array of BucketDetail objects OBS桶列表。 total Integer OBS桶总数。 表6 BucketDetail 参数 参数类型 描述 id String OBS桶ID。 name String OBS桶名称。 creation_date String OBS桶创建时间。 location String 所属region。 状态码: 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 OK [ { "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" }
  • 请求示例 POST https://{endpoint}/v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/partitions/batch-alter { "partition_inputs" : [ { "partition" : { "partition_values" : [ "48e1f86dc4394a218b832d94411805fe", "5a2ab07a663c49a98cc606e6ffa0b178" ], "create_time" : "2023-05-30T09:06:41.000+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 } }, "partition_values" : [ "48e1f86dc4394a218b832d94411805fe", "5a2ab07a663c49a98cc606e6ffa0b178" ] }, { "partition" : { "partition_values" : [ "e4af64d55308403a9abf1999afbbe2be", "079f4cd2ee5b4de6922ef8f0c92c82ae" ], "create_time" : "2023-05-30T09:06:41.000+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 } }, "partition_values" : [ "e4af64d55308403a9abf1999afbbe2be", "079f4cd2ee5b4de6922ef8f0c92c82ae" ] }, { "partition" : { "partition_values" : [ "e5ade865888a4bb0a22b71505dd0989d", "788dfdb29db342f488a6155a55875f5b" ], "create_time" : "2023-05-30T09:06:41.000+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 } }, "partition_values" : [ "e5ade865888a4bb0a22b71505dd0989d", "788dfdb29db342f488a6155a55875f5b" ] } ] }
  • URI POST /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/partitions/batch-alter 表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个字符。
  • URI DELETE /v1/{project_id}/instances/{instance_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 表2 Query参数 参数 是否必选 参数类型 描述 to_recycle_bin 是 Boolean 是否放入回收站。默认为false。
  • 响应参数 状态码: 202 表4 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。
  • 响应示例 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 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" }
  • API概览 类型 子类型 说明 Console 实例管理 实例管理接口,包括LakeFormation实例的创建、删除、编辑、查询等接口。 通过这些接口,您可以创建实例、获取已创建实例的信息等。 任务管理 任务管理接口,包括创建任务、列举任务信息等接口。 通过这些可口,您可以创建并管理任务。 服务授权管理 协议授权管理接口,包括系统协议查询、已授权协议查询、协议授权等接口。 用户开通使用LakeFormation服务前,需要提前了解并接受相关的协议与授权。 OBS管理 OBS桶管理接口,包括OBS桶、对象等查询接口。 通过这些接口,您可以获取用于设置元数据的存储路径OBS相关信息。 接入管理 服务接入管理接口,包括获取接入信息,申请接入等接口。 开通服务并创建实例以后,LakeFormation即可对外提供元数据管理相关能力,但周边服务需要通过该接口完成对接后,才能调用元数据管理相关接口,从而使用LakeFormation提供的能力。 规格管理 规格管理接口,包括查询规格列表等接口。 配额管理服务 配额管理接口,包括查询用户的配额信息等接口。 标签管理服务 标签管理接口,包括查询资源标签集合、批量更新标签等接口。 委托管理 委托管理接口,包括创建、查询、删除委托等接口。 LakeCat 函数管理 函数管理接口,包括创建、删除函数等接口。 通过这些接口,您可以创建函数、获取已创建函数的信息等。 目录管理 目录管理接口,包括创建、删除目录等接口。 通过这些接口,您可以创建目录、删除目录等。 数据库管理 数据库管理接口,包括创建、删除数据库等接口。 通过这些接口,您可以创建数据库、删除数据库等。 数据表管理 数据表管理接口,包括创建、删除数据表等接口。 通过这些接口,您可以创建数据表、删除数据表等。 数据表统计 数据表统计接口,包括获取数据表的列统计信息、删除指定列统计信息等接口。 通过这些接口,您可以获取数据表的列统计信息、删除指定列统计信息等。 分区管理 分区管理接口,包括创建、删除分区的等接口。 通过这些接口,您可以创建分区、删除分区等。 分区统计信息 分区统计信息接口,包括获取分区列统计信息、删除分区列统计信息等接口。 通过这些接口,您可以获取分区列统计信息、删除分区列统计信息等。 授权管理 授权管理接口,包括查询授权策略、批量授权等接口。 通过这些接口,您可以查询授权策略、批量授权等。 用户组管理 用户组管理接口,包括获取租户的用户组等接口。 通过这些接口,您可以获取租户的用户组等。 元数据统计 元数据统计接口,包括元数据数量统计等接口。 角色管理 角色管理接口,包括创建 、获取、修改、删除角色等接口。 凭证管理 凭证管理接口,包括获取临时密钥和securityToken等接口。 配置管理 配置管理接口,包括获取所有用户可见的租户面配置等接口。 User 用户管理管理接口,包括获取用户列表、将多个角色授予用户、将一个或者多个角色从用户移除、更新用户中的角色、查询用户的角色列表等接口。 元数据事件管理 元数据事件管理接口,包括获取元数据事件等接口。
  • 请求示例 PUT https://{endpoint}/v1/{project_id}/instances/{instance_id}/roles/{role_name}/update-principals [ { "principal_name" : "user1", "principal_source" : "IAM", "principal_type" : "USER" } ]
  • 响应示例 状态码: 200 OK [ { "principal_name" : "user1", "principal_source" : "IAM", "principal_type" : "USER" } ] 状态码: 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 PUT /v1/{project_id}/instances/{instance_id}/roles/{role_name}/update-principals 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 role_name 是 String 角色名称。只能包含字母、数字、下划线、中划线,且长度为1~255个字符。
  • 请求参数 表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个字符。
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 [数组元素] Array of Principal objects OK 表6 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 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 solution_msg String 解决方案描述。
  • 响应示例 状态码: 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 PUT /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个字符。
共100000条