华为云用户手册

  • URI POST /v1/{project_id}/instances/{instance_id}/default 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。
  • 响应示例 状态码: 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,定位辅助信息。 状态码: 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 表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}/users/{user_name}/revoke-roles 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 user_name 是 String 用户名。只能包含字母、数字、下划线和中划线,且长度为1~256个字符。
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 Array of strings 租户token。 表3 请求Body参数 参数 是否必选 参数类型 描述 [数组元素] 是 Array of RoleInfoInput objects 角色列表。 表4 RoleInfoInput 参数 是否必选 参数类型 描述 role_name 是 String 角色名称。只能包含字母、数字、下划线、中划线,且长度为1~255个字符。 principal_source 是 String 主体来源: IAM-云用户、 SAML-联邦、 LDAP ld-用户、 LOCAL-本地用户、 AGENTTENANT-委托、 OTHER-其它。 枚举值: IAM SAML LDAP LOCAL AGENTTENANT OTHER
  • 响应参数 状态码: 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 解决方案描述。
  • 响应示例 状态码: 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 DELETE /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个字符。 表2 Query参数 参数 是否必选 参数类型 描述 delete_data 否 Boolean 是否删除表中的数据。默认为false。
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 [数组元素] Array of strings OK 状态码: 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}/databases/{database_name}/tables/names 表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参数 参数 是否必选 参数类型 描述 table_pattern 否 String 表名称通配符。只能包含中文、字母、数字和_-|*.特殊字符,且长度为1到256个字符。 table_type 否 String 查询的表类型。只能包含MANAGED_TABLE、EXTERNAL_TABLE、VIRTUAL_VIEW、MATERIALIZED_VIEW、DICTIONARY_TABLE。
  • 响应示例 状态码: 200 OK [ "test" ] 状态码: 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}/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个字符。
  • 请求示例 PUT https://{endpoint}/v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name} { "alter_params" : { "CASCADE" : "TRUE" }, "table" : { "table_name" : "tbl08e39978e97b4266a7074fd92127e032", "table_type" : "EXTERNAL_TABLE", "owner" : "onebox", "owner_type" : "USER", "create_time" : "2023-05-31T02:06:58.000+00:00", "last_access_time" : "2023-05-31T02:06:58.000+00:00", "last_analyzed_time" : "2023-05-31T02:06:58.000+00:00", "partition_keys" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "372f0f259ed049f5876050dcd13df630" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "6bb9dd73db49498d9aaabd343bfad689" } ], "retention" : 1000, "storage_descriptor" : { "columns" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "4a4eca73554c4117b480fd73d8d6697b" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "5dc9df8676324e989440b0e6669d9338" }, { "column_type" : "string", "column_name" : "column_prefix2", "comment" : "b73c6fdb55594366bcd25c45ffbbee47" }, { "column_type" : "string", "column_name" : "column_prefix3", "comment" : "74fe507023414e2ba6137aaee059c3f9" }, { "column_type" : "string", "column_name" : "column_prefix4", "comment" : "4bd450c11ea24884875cd62e9d3e42dc" }, { "column_type" : "string", "column_name" : "column_prefix5", "comment" : "2457eea4a38e4ead8bbc065985279544" }, { "column_type" : "string", "column_name" : "column_prefix6", "comment" : "39b5869cea974e1488a47584acf4c313" }, { "column_type" : "string", "column_name" : "column_prefix7", "comment" : "90928727a6bb4c6ca2e3497ea9b31bf8" }, { "column_type" : "string", "column_name" : "column_prefix8", "comment" : "90d6544f85004c58a056891f7d00fbb2" }, { "column_type" : "string", "column_name" : "column_prefix9", "comment" : "8e993211dcad4adbacc360c9e5d0bbd9" } ], "location" : "obs://location/test/database/7b2fad385fd8434cbb8e759094a068cf", "compressed" : false, "input_format" : "9ea8ec4fc8dc4faaa8e5d1ed1e2db776", "output_format" : "ce56f7ea7a754a14a5c4525b296cc6f1", "number_of_buckets" : 0, "bucket_columns" : [ ], "sort_columns" : [ ], "serde_info" : { "name" : "f69aa43399ec498dbc42290d8e26ac6d", "serialization_library" : "fe216304f4f84411ba2d52b32688bfe6", "parameters" : { "f2d383124614470895a0ce2619bf3a32" : "69ee824ac98944d78f321af7a6edd538" } }, "parameters" : { "dbc72b6d947e4d6f9a4b5ec081ebd07a" : "e5f22c513e984e3cb279ba5e40a2f69a", "64eb05edecae4722befd2e3575d3cbe8" : "656c632c586940649fcc1a4e62c8c0a1" }, "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" } }
  • 响应示例 状态码: 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" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 租户token 表3 请求Body参数 参数 是否必选 参数类型 描述 access_services 是 Array of AccessServiceInfo objects 接入服务授权信息列表。 表4 AccessServiceInfo 参数 是否必选 参数类型 描述 name 是 String 接入服务名称。最大长度为20个字符。 description 否 String 接入服务描述。最大长度为500个字符。 grant 否 Boolean 是否授权。值为true或false。
  • 响应参数 状态码: 200 表5 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 状态码: 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}/access-service { "access_services" : [ { "name" : "DLI", "description" : "Data Lake Insight", "grant" : true }, { "name" : "DWS", "description" : "Data Warehouse Service", "grant" : true }, { "name" : "MA", "description" : "ModelArts", "grant" : true } ] }
  • 响应示例 状态码: 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" }
  • 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 表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 解决方案描述。
  • 响应参数 状态码: 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。
  • 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个字符。
  • 响应示例 状态码: 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}/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 元数据资源类型:CATALOG、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" }
共100000条