华为云用户手册

  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 id String 客户端ID。 name String 客户端名称。 access_mode String 接入模式:SYSTEM、CUSTOM、AUTO。 枚举值: SYSTEM CUSTOM AUTO status String 客户端状态:CREATING、RUNNING、DELETING、DELETED、CREATE_FAIL、DELETE_FAIL。 枚举值: CREATING RUNNING DELETING DELETED CREATE_FAIL DELETE_FAIL vpc_id String VPC ID。 subnet_id String 子网ID。 subnet_ids Array of strings 多个子网ID集合。 access_connections Array of AccessConnectionInfo objects 接入连接列表。 create_time String 实例创建时间戳。 表4 AccessConnectionInfo 参数 参数类型 描述 vpcep_id String 虚拟私有云终端节点ID。在接入管理-创建客户端-前往VPC创建- VPC终端节点 创建和查看。 subnet_id String 子网ID。 ip String 接入IP。 owner String 拥有者。 domain String 接入 域名 ,通过IP接入访问Lakeformation API时,需在请求头中添加HOST参数并传入该域名。
  • 响应示例 状态码: 200 OK { "id" : "gs23xxxxxxxxxxxxxxxxxxxxxxxxxxxxfgs2", "name" : "lakeformation_client", "access_mode" : "SYSTEM", "status" : "RUNNING", "vpc_id" : "d3fcxxxxxxxxxxxxxxxxxxxxxxxxxxxx8f1e", "subnet_id" : "d3fcxxxxxxxxxxxxxxxxxxxxxxxxxxxx8f1e", "access_connections" : [ { "vpcep_id" : "0612xxxxxxxxxxxxxxxxxxxxxxxxxxxxa8fb" } ], "create_time" : "2023-05-30T01:22:44.100Z"}
  • 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。创建客户端时自动生成。
  • 响应示例 状态码: 200 OK { "partitions" : [ { "catalog_name" : "cat97bc31536be24f2cae8ecddf34a6d53a", "database_name" : "dbe062bd53192249d7a0258062ed122683", "table_name" : "tble25e30cecd1a4ab58ab3eba7c70b7dc2", "partition_values" : [ "0e3af7a7552d4aa7b75f271505495590", "936b465a11b64e28aa2d047e92908707" ], "create_time" : "2023-05-30T12:24:30.401+00:00", "last_access_time" : "2023-05-30T12:24:30.000+00:00", "parameters" : { "key1" : "value1", "transient_lastDdlTime" : "120", "classification" : "other" }, "storage_descriptor" : { "columns" : [ { "column_type" : "string", "column_name" : "column_prefix0", "comment" : "b2489a84845b436d8557b2a7ae44082b" }, { "column_type" : "string", "column_name" : "column_prefix1", "comment" : "f6b3ce66332e475f99aaba1c5ba8a080" }, { "column_type" : "string", "column_name" : "column_prefix2", "comment" : "9cd48faa87e04cf0b64416d9491a0131" }, { "column_type" : "string", "column_name" : "column_prefix3", "comment" : "73b0ebce76fe4b5fa97ba29e93f69093" }, { "column_type" : "string", "column_name" : "column_prefix4", "comment" : "9339b5d828314da09900d647a4dcafe2" }, { "column_type" : "string", "column_name" : "column_prefix5", "comment" : "006d9b8151ca4816bc47ba3e53428b7b" }, { "column_type" : "string", "column_name" : "column_prefix6", "comment" : "116e112b2e8c447e942ec14995bcf659" }, { "column_type" : "string", "column_name" : "column_prefix7", "comment" : "d388b4d142834eaab7e55137f4b8089d" }, { "column_type" : "string", "column_name" : "column_prefix8", "comment" : "216f8d15eb044463b2e22a31f3bd40e9" }, { "column_type" : "string", "column_name" : "column_prefix9", "comment" : "7f8565e9381e4070b3faab51badfa035" } ], "location" : "obs://location/test/database/de0eef7ef86a4940a266c03bc7c5a548", "compressed" : false, "input_format" : "0a376351bf9c4966b9258301ba0473f7", "output_format" : "1297b151c9544f368f7c9a1708deb067", "number_of_buckets" : 0, "bucket_columns" : [ ], "sort_columns" : [ ], "serde_info" : { "name" : "b277e0cefeaf4f78aacffbe6bd714ca4", "serialization_library" : "8c348e0841524ce9ba0ab29cf30483cb", "parameters" : { "0804f29205a546efabd6c6934badfa81" : "4e4d5a8d807e4150af0df5cb967810dd" } }, "parameters" : { "27976ea945ed4486a938e6336e7b4923" : "679081deb759451cbc3ccacdcd4e4940", "08f5c45c202b4572b1b3c2255205a2a6" : "7cd4dab5553f4c20b3d08d2a59b8eeca" }, "skewed_info" : { "skewed_column_names" : [ ], "skewed_column_value_location_maps" : { }, "skewed_column_values" : [ ] }, "stored_as_sub_directories" : false } } ], "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"}
  • URI GET /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/tables/{table_name}/partitions 表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参数 参数 是否必选 参数类型 描述 filter 否 String 分区过滤条件。最小长度为0,最大长度为256。 partition_values 否 Array 分区的值列表。最小元素数为0,最大元素数为1000。 limit 否 Integer 查询返回条数。默认值为500。最小值为1,最大值为1000。 marker 否 String 查询的起始记录ID。最小长度为0,最大长度为256。 reverse_page 否 Boolean 是否倒序查询。
  • 响应示例 状态码: 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 是否倒序查询。 external_database_id 否 String 用户端数据库id,创建时指定,不可修改。 deleted 否 Boolean 是否查询被删除元数据。
  • 响应示例 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException"} 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed'} 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden"} 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404"} 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred"} 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error"}
  • 响应示例 状态码: 400 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}/roles/{role_name} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。 role_name 是 String 角色名称。只能包含字母、数字、下划线、中划线,且长度为1~255个字符。
  • 响应参数 状态码: 200 表3 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 状态码: 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 表3 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 状态码: 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 解决方案描述。
  • URI DELETE /v1/{project_id}/instances/{instance_id}/catalogs/{catalog_name}/databases/{database_name}/functions/{function_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个字符。 function_name 是 String 函数名称。只能包含字母、数字和下划线,且长度为1~256个字符。
  • 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个字符。
  • 响应参数 状态码: 200 表3 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 状态码: 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 解决方案描述。
  • 响应示例 状态码: 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{ "name" : "lakeformation-instance", "charge_mode" : "postPaid", "shared" : "true", "description" : "", "tags" : [ { "key" : "key1" } ], "enterprise_project_id" : "0"}
  • 响应示例 状态码: 202 创建实例请求下成功 { "instance_id" : "2aeb1789-1b04-4bad-92bf-486a399b9a3e", "name" : "lakeformation-instance", "description" : "", "enterprise_project_id" : "0", "shared" : false, "default_instance" : false, "create_time" : "2023-08-03T11:50:02.000+00:00", "update_time" : "2023-08-03T11:50:04.000+00:00", "status" : "RUNNING", "in_recycle_bin" : false, "tags" : [ ], "specs" : [ { "spec_code" : "lakeformation.unit.basic.metadata", "stride_num" : 0 }, { "spec_code" : "lakeformation.unit.basic.apiinvoke", "stride_num" : 0 } ], "charge_mode" : "postPaid"} 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException"} 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed'} 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden"} 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404"} 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred"} 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error"}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 否 String 租户token。 表3 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 实例名称。只能包含字母、数字、下划线和中划线,且长度为4到32个字符。 charge_mode 是 String 支付类型:postPaid为按需期、prePaid为包周期。 枚举值: postPaid prePaid enterprise_project_id 否 String 企业项目ID,只有对接了企业项目才可以填写。只能包含字母、数字和中划线,且长度为1到64个字符。 description 否 String 实例描述。用户输入的描述,最长为255个字符。 shared 是 Boolean false为独享型;true为共享型。默认为true。 order_id 否 String 订单ID。已废弃,无需填写 specs 否 Array of CreateSpec objects 规格列表。 tags 否 Array of ResourceTag objects 标签列表,最多添加20个标签。 charge_info 否 ChargeInfo object 计费信息,购买包周期产品时,也就是charge_mode为prePaid时不能为空。 表4 CreateSpec 参数 是否必选 参数类型 描述 product_id 否 String 商品ID。已废弃,无需填写 spec_code 是 String 规格编码。 stride_num 是 Integer QPS规格步数,QPS为每秒最大请求数,最小为5,步长为1。只有在创建独享型实例(字段shared为false)时生效。 表5 ResourceTag 参数 是否必选 参数类型 描述 key 是 String 键。 value 否 String 值。 表6 ChargeInfo 参数 是否必选 参数类型 描述 period_type 否 String 购买包周期产品时,也就是charge_mode为prePaid时生效,且为必选值,订购周期类型。取值范围:MONTH:包月;YEAR:包年。 枚举值: MONTH YEAR period_num 否 Integer 购买包周期产品时,也就是charge_mode为prePaid时生效,且为必选值,指定订购的时间。取值范围:当period_type为month时,取值为1~9。当period_type为year时,取值为1~3。当传入浮点型时,会自动截取为整型。 is_auto_renew 否 Boolean 购买包周期产品时,也就是charge_mode为prePaid时生效,且为必选值,表示是否自动续订,续订时会自动支付。 按月订购时续订周期默认为1个月,按年订购时续订周期默认为1年,续订周期可自定义修改。true:为自动续订。false:为不自动续订,默认该方式。 is_auto_pay 否 Boolean 购买包周期产品时,也就是charge_mode为prePaid时生效,且为必选值,表示是否自动从客户的账户中支付,此字段不影响自动续订的支付方式。true:为自动支付。false:为手动支付,默认该方式。
  • 响应参数 状态码: 202 表7 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 表8 响应Body参数 参数 参数类型 描述 instance_id String LakeFormation实例ID。 name String 实例名称。 description String 描述。 enterprise_project_id String 企业项目ID。 shared Boolean 逻辑多租和物理多租的判断。false为物理多租;true为逻辑多租。 default_instance Boolean 是否为默认实例。 create_time String 实例创建时间戳。 update_time String 实例更新时间戳。 status String 实例状态:RESOURCE_PREPARATION-实例资源准备中、RUNNING-实例运行中、RESOURCE_RELEASE-实例资源释放中、DELETED-实例已释放、RESOURCE_PREPARATION_FAIL-实例资源准备失败、FROZEN_RELEASABLE-可恢复冻结、FROZEN_UNRELEASABLE-不可恢复冻结、RECOVERING-恢复中、DELETING-删除中、SCALING-扩容中、SCALE_FAIL-扩容失败。 枚举值: RESOURCE_PREPARATION RUNNING RESOURCE_RELEASE DELETED RESOURCE_PREPARATION_FAIL FROZEN_RELEASABLE FROZEN_UNRELEASABLE RECOVERING DELETING SCALING SCALE_FAIL resource_progress Integer 资源准备进度百分比,只有当实例处于资源准备中状态时才会计算并返回该值。 resource_expected_duration Integer 资源准备预计时长,单位分钟。 scale_progress Integer 规格变更进度百分比,只有当实例处于规格变更中状态时才会计算并返回该值。 scale_expected_duration Integer 规格变更预计时长,单位分钟。 in_recycle_bin Boolean 是否在回收站。 tags Array of ResourceTag objects 标签列表。 specs Array of CreateSpec objects 规格信息。 charge_mode String 计费模式,postPaid=按需计费,prePaid=包周期计费。 枚举值: prePaid postPaid 表9 ResourceTag 参数 参数类型 描述 key String 键。 value String 值。 表10 CreateSpec 参数 参数类型 描述 product_id String 商品ID。已废弃,无需填写 spec_code String 规格编码。 stride_num Integer QPS规格步数,QPS为每秒最大请求数,最小为5,步长为1。只有在创建独享型实例(字段shared为false)时生效。 状态码: 400 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 404 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。
  • 响应示例 状态码: 201 Created { "role_name" : "admin", "principal_source" : " LOCAL ", "description" : "role from lakeformation"} 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException"} 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed'} 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden"} 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404"} 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred"} 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error"}
  • 响应示例 状态码: 400 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 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目编号。获取方法,请参见获取项目ID。 instance_id 是 String LakeFormation实例ID。创建实例时自动生成。例如:2180518f-42b8-4947-b20b-adfc53981a25。
  • 请求示例 POST https://{endpoint}/v1/{project_id}/agreement{ "agreements" : [ { "agreement_name" : "agreement AAA", "agreement_version" : "v1" }, { "agreement_name" : "agreement BBB", "agreement_version" : "v1" } ]}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 租户token。 表3 请求Body参数 参数 是否必选 参数类型 描述 agreements 否 Array of TenantAgreement objects 租户协议列表。 表4 TenantAgreement 参数 是否必选 参数类型 描述 agreement_name 否 String 协议名称。只能包含字母、数字、下划线和中划线,且长度为1到64个字符。 agreement_version 否 String 协议版本号。只能包含字母和数字,且长度为1到32个字符。
  • 响应参数 状态码: 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 解决方案描述。
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 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 解决方案描述。
  • 响应示例 状态码: 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} 表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参数 参数 是否必选 参数类型 描述 version_id 否 String 版本ID,默认为最新版本
  • 响应示例 状态码: 200 OK { "catalog_name" : "hive", "database_name" : "policy_test", "owner" : "lakeformation", "owner_type" : "USER", "owner_auth_source_type" : "IAM", "description" : "", "location" : "obs://lakeformation/test", "parameters" : { "transient_lastDdlTime" : "120", "comment" : "comment message", "classification" : "other" }, "table_location_list" : [ ], "function_location_list" : [ ]} 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException"} 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed'} 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden"} 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404"} 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred"} 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error"}
共100000条