华为云用户手册

  • 响应示例 状态码: 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个字符。
  • 响应示例 状态码: 200 规格列表 { "total" : 1, "spec_codes" : [ { "spec_code" : "hws.resource.type.lakeformation.qps", "resource_type" : "hws.resource.type.lakeformation.metadata", "stride" : 2000, "unit" : "qps", "min_stride_num" : 1, "max_stride_num" : 100, "usage_measure_id" : 6, "usage_factor" : "Duration", "usage_value" : 1, "free_usage_value" : 1, "stride_num_whitelist" : [ 1, 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}/specs 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 spec_code 否 String 规格编码。由系统自动生成,例如lakeformation.unit.basic.qps。 offset 否 Integer 偏移量。取值在0-100之间,默认值为0。 limit 否 Integer 单次查询个数。取值在1-100之间,默认值为10。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 total Integer 总数。 spec_codes Array of Spec objects 规格编码列表。 表4 Spec 参数 参数类型 描述 spec_code String 规格编码。lakeformation.unit.basic.qps:每秒查询率(QPS)产品。 resource_type String 资源编码。 stride Integer 步长。 unit String 单位。 min_stride_num Integer 最小步数。 max_stride_num Integer 最大步数。 usage_measure_id Integer 使用量单位标识。 usage_factor String 使用量因子。 usage_value Integer 使用量,包含免费额度和单位额度,例如api调用次数,单位是次,前100万次调用免费,计费标准是5元每100万次,这里返回200万,元数据个数,单位是万个,前100万个免费,计费标准是5元每10万个,这里返回110。 free_usage_value Integer 免费使用额度,例如api调用次数,单位是次,前100万次调用免费,这里返回100万,元数据个数,单位是万个,前100万个免费,这里返回100。 stride_num_whitelist Array of integers 步数白名单,返回时,步数必须是白名单中的值。 状态码: 204 表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 解决方案描述。
  • 响应示例 状态码: 200 OK { "databases" : [ { "catalog_name" : "hive", "database_name" : "policy_test", "owner" : "lakeformation", "owner_type" : "USER", "owner_auth_source_type" : "IAM", "description" : "", "location" : "obs://lakeformation/test", "parameters" : { }, "table_location_list" : null, "function_location_list" : null } ], "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 GET /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 catalog_name 是 String catalog名称。只能包含字母、数字和下划线,且长度为1~256个字符。 表2 Query参数 参数 是否必选 参数类型 描述 database_name_pattern 否 String 数据库名称通配符。只能包含中文、字母、数字和_|*.-特殊字符,且长度为1~128个字符。 limit 否 Integer 查询返回条数。默认值为1000。最小值为0,最大值为1000。 marker 否 String 查询的起始记录ID。最小长度为0,最大长度为256。 reverse_page 否 Boolean 是否查询上一页。默认为false。 external_database_id 否 String 用户端数据库id,创建时指定,不可修改。 deleted 否 Boolean 是否查询被删除元数据。
  • 响应示例 状态码: 200 OK { "page_info" : { "current_count" : 1, "next_marker" : "000000001225efff0000000000000001" }, "policies" : [ { "allow_exceptions" : [ ], "data_mask_policy_items" : [ ], "deny_exceptions" : [ ], "deny_policy_items" : [ ], "id" : 61, "is_audit_enabled" : true, "is_default_policy" : false, "is_deny_all_else" : false, "is_enabled" : true, "name" : "test_database_name-database", "options" : { }, "policy_items" : [ { "accesses" : [ { "is_allowed" : true, "type" : "read" }, { "is_allowed" : true, "type" : "index" }, { "is_allowed" : true, "type" : "select" }, { "is_allowed" : true, "type" : "drop" }, { "is_allowed" : true, "type" : "alter" }, { "is_allowed" : true, "type" : "all" } ], "conditions" : [ { "type" : "ip-range", "values" : [ "127.0.0.1" ] } ], "delegate_admin" : true, "groups" : [ "testGroupName1" ], "roles" : [ ], "users" : [ ] }, { "accesses" : [ { "is_allowed" : true, "type" : "alter" } ], "conditions" : [ ], "delegate_admin" : false, "groups" : [ "testGroupName2" ], "roles" : [ ], "users" : [ ] } ], "policy_labels" : [ ], "policy_priority" : 0, "policy_type" : 0, "resources" : { "database" : { "is_excludes" : false, "is_recursive" : false, "values" : [ "test_database_name" ] } }, "row_filter_policy_items" : [ ], "service" : "Hive", "service_type" : "hive", "validity_schedules" : [ ] } ] } 状态码: 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 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 查询返回条数。默认值为5000。最小值为1,最大值为10000。 marker 否 String 查询的起始记录ID。最小长度为0,最大长度为1024。 reverse_page 否 Boolean 是否查询上一页。默认为false。 catalog_name 否 String catalog名称。只能包含字母、数字和下划线,且长度为1~256个字符。
  • URI GET /v1/{project_id}/instances/{instance_id}/roles/{role_name}/principals 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 role_name 是 String 角色名称。只能包含字母、数字、下划线、中划线,且长度为1~255个字符。 表2 Query参数 参数 是否必选 参数类型 描述 principal_pattern 否 String 模糊匹配主体名称。只能包含中文、字母、数字和_|*.-特殊字符,且长度为1~49个字符。 limit 否 Integer 查询返回条数。默认值为100。最小值为1,最大值为1000。 marker 否 String 查询的起始记录ID。最小长度为0,最大长度为1024。 reverse_page 否 Boolean 是否查询上一页。默认为false。
  • 响应示例 状态码: 200 OK { "principals" : [ { "principal_type" : "USER", "principal_source" : "IAM", "principal_name" : "user1" } ], "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" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 principals Array of Principal objects 主体列表。 page_info PagedInfo object 分页信息。 表5 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个字符。 表6 PagedInfo 参数 参数类型 描述 current_count Integer 本次返回的对象个数。最小值为0,最大值为2000。 next_marker String 下一页查询地址。当不存在下一页,则值为null,当值为null时,响应Body无该参数。 previous_marker String 上一页查询地址。当不存在上一页,则值为null,当值为null时,响应Body无该参数。 状态码: 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 解决方案描述。
  • 支持的授权项 策略包含系统策略和自定义策略,如果系统策略不满足授权要求,管理员可以创建自定义策略,并通过给用户组授予自定义策略来进行精细的访问控制。策略支持的操作与API相对应,授权项列表说明如下: 权限:允许或拒绝某项操作。 对应API接口:自定义策略实际调用的API接口。 授权项:自定义策略中支持的Action,在自定义策略中的Action中写入授权项,可以实现授权项对应的权限功能。 依赖的授权项:部分Action存在对其他Action的依赖,需要将依赖的Action同时写入授权项,才能实现对应的权限功能。 IAM项目(Project)/企业项目(Enterprise Project):自定义策略的授权范围,包括IAM项目与企业项目。授权范围如果同时支持IAM项目和企业项目,表示此授权项对应的自定义策略,可以在IAM和企业管理两个服务中给用户组授权并生效。如果仅支持IAM项目,不支持企业项目,表示仅能在IAM中给用户组授权并生效,如果在企业管理中授权,则该自定义策略不生效。关于IAM项目与企业项目的区别,详情请参见:IAM与企业管理的区别。
  • 响应参数 状态码: 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} 表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。
  • 响应示例 状态码: 200 OK { "user_group" : [ { "group_name" : "group-name", "group_source" : "IAM" } ], "page_info" : { "current_count" : 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" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 user_group Array of UserGroup objects 用户组。 page_info PagedInfo object 分页信息。 表5 UserGroup 参数 参数类型 描述 group_name String 用户组名称。 group_source String 用户组类型:IAM-云、SAML-联邦、LDAP-权限策略、LOCAL-本地、AGENTTENANT-委托、OTHER-其它。 枚举值: IAM SAML LDAP LOCAL AGENTTENANT OTHER group_id String 用户组ID。 表6 PagedInfo 参数 参数类型 描述 current_count Integer 本次返回的对象个数。最小值为0,最大值为2000。 next_marker String 下一页查询地址。当不存在下一页,则值为null,当值为null时,响应Body无该参数。 previous_marker String 上一页查询地址。当不存在上一页,则值为null,当值为null时,响应Body无该参数。 状态码: 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 解决方案描述。
  • URI GET /v1/{project_id}/instances/{instance_id}/groups 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 表2 Query参数 参数 是否必选 参数类型 描述 group_source 否 String 查询的用户组来源:IAM-云用户、SAML-联邦、LDAP-ld用户、LOCAL-本地用户。 枚举值: IAM SAML LDAP LOCAL limit 否 Integer 查询返回条数。默认值为1000。最小值为1,最大值为2000。 marker 否 String 查询的起始记录ID。最小长度为0,最大长度为256。 reverse_page 否 Boolean 是否查询上一页。默认为false。
  • 响应参数 状态码: 200 表6 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 状态码: 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 解决方案描述。
  • 响应示例 状态码: 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参数 参数 是否必选 参数类型 描述 specs 否 Array of CreateSpec objects 规格列表。 charge_mode 否 String 支付类型:postPaid为按需期、prePaid为包周期。 枚举值: postPaid prePaid change_classify 否 String 变更类型,UPGRADE:升配;RENEW_CHANGE:续费变更;其中RENEW_CHANGE只有包周期实例才能生效,按需实例默认且必须为SCALE_UP。 枚举值: UPGRADE RENEW_CHANGE charge_info 否 ChargeInfo object 计费信息,charge_mode为prePaid时不能为空。 表4 CreateSpec 参数 是否必选 参数类型 描述 product_id 否 String 商品ID。由系统自动生成,如OFFI8XXXXXXXXXXXXXXXX4。 spec_code 是 String 规格编码。由系统自动生成,例如lakeformation.unit.basic.qps。 stride_num 是 Integer 步数。QPS为每秒最大请求数步长,最小为5,步长为1。 表5 ChargeInfo 参数 是否必选 参数类型 描述 period_type 否 String charge_mode为prePaid时生效,且为必选值,订购周期类型。取值范围:MONTH:包月;YEAR:包年。 枚举值: MONTH YEAR period_num 否 Integer charge_mode为prePaid时生效,且为必选值,指定订购的时间。取值范围:当period_type为month时,取值为1~9。当period_type为year时,取值为1~3。当传入浮点型时,会自动截取为整型。 is_auto_renew 否 Boolean charge_mode为prePaid时生效,且为必选值,表示是否自动续订,续订时会自动支付。 按月订购时续订周期默认为1个月,按年订购时续订周期默认为1年,续订周期可自定义修改。true:为自动续订。false:为不自动续订,默认该方式。 is_auto_pay 否 Boolean charge_mode为prePaid时生效,且为必选值,表示是否自动从客户的账户中支付,此字段不影响自动续订的支付方式。true:为自动支付。false:为手动支付,默认该方式。
  • URI POST /v1/{project_id}/instances/{instance_id}/scale 表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,定位辅助信息。 状态码: 404 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 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}/users/{user_name}/update-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 OK { "page_info" : { "current_count" : 2, "next_marker" : null, "previous_marker" : null }, "functions" : [ { "catalog_name" : "catalog_1", "database_name" : "database", "function_name" : "123kk", "function_type" : "JAVA", "owner" : "owner_1", "owner_type" : "USER", "owner_auth_source_type" : "IAM", "class_name" : "lxy", "create_time" : "2022-12-08T08:18:54.000+00:00", "resource_uris" : [ { "type" : "FILE", "uri" : "obs://lakeformation-test/test2/6/" } ] }, { "catalog_name" : "catalog_2", "database_name" : "database", "function_name" : "1456", "function_type" : "JAVA", "owner" : "owner_2", "owner_type" : "USER", "owner_auth_source_type" : "IAM", "class_name" : "34", "create_time" : "2022-12-09T01:50:56.000+00:00", "resource_uris" : [ { "type" : "JAR", "uri" : "obs://lakeformation-test/" }, { "type" : "FILE", "uri" : "obs://lakeformation-test/test3/" } ] } ] } 状态码: 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}/databases/{database_name}/functions 表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参数 参数 是否必选 参数类型 描述 function_name_pattern 否 String 函数名称通配符。只能包含字母、数字和_|*.特殊字符,且最大长度为256个字符。 limit 否 Integer 查询返回条数。默认值为1000。最小值为1,最大值为2000。 marker 否 String 查询的起始记录ID。最小长度为0,最大长度为256。 reverse_page 否 Boolean 是否查询上一页。默认为false。 deleted 否 Boolean 是否查询被删除元数据。
共100000条