Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying a Policy

Updated on 2025-02-14 GMT+08:00

Function

Querying APIs by filter criterion.

URI

GET /v1/{project_id}/instances/{instance_id}/policies/show

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For how to obtain the project ID, see Obtaining a Project ID.

instance_id

Yes

String

LakeFormation instance ID. The value is automatically generated when the instance is created, for example, 2180518f-42b8-4947-b20b-adfc53981a25.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

filter

No

String

Permission policy filter expression, which is not supported currently.

obs_authorized_location

No

String

This API is used to query all metadata permissions that contain the OBS path with the OBS path permission policy being used as a search criterion.

resource_name

No

String

Full name of a metadata resource. The value can contain 1 to 1,000 characters.

resource_type

No

String

Metadata resource type. The options are CATALOG, DATABASE, TABLE, FUNC, MODEL, COLUMN, and URI.

Enumeration values:

  • CATALOG

  • DATABASE

  • TABLE

  • FUNC

  • MODEL

  • DATASET

  • COLUMN

  • URI

principal_source

No

String

Authorization subject source: IAM-cloud user, SAML-federation, LDAP-ld user, LOCAL-local user, and AGENTTENANT-delegated user.

Enumeration values:

  • IAM

  • SAML

  • LDAP

  • LOCAL

  • AGENTTENANT

principal_type

No

String

Authorization entity type. The options are USER (user), GROUP (group), ROLE (role), SHARE (shared), and OTHER (others).

Enumeration values:

  • USER

  • GROUP

  • ROLE

  • SHARE

  • OTHER

principal_name

No

String

Name of the authorization entity. The value can contain 1 to 1,000 characters.

limit

No

Integer

Number of returned records. The default value is 1000. The value ranges from 1 to 2147483647.

marker

No

String

ID of the record where the query starts. The value consists of 0 to 256 characters.

reverse_page

No

Boolean

Whether to query the previous page. The default value is false.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

Array of strings

Tenant token.

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-request-id

String

Request ID, which is used to locate auxiliary information.

Table 5 Response body parameters

Parameter

Type

Description

policies

Array of LakeFormationPolicy objects

LakeCat policies.

page_info

PagedInfo object

Pagination information.

Table 6 LakeFormationPolicy

Parameter

Type

Description

project_id

String

Project ID.

instance_id

String

Instance ID.

principal_type

String

Entity type. The options are USER (user), GROUP (group), ROLE (role), SHARE (shared), and OTHER (others).

Enumeration values:

  • USER

  • GROUP

  • ROLE

  • SHARE

  • OTHER

principal_source

String

Entity source. The options are IAM (cloud user), SAML (SAML-based federation), LDAP (permission policy), LOCAL (local user), AGENT (agency), AGENTTENANT (agency), and OTHER (others).

Enumeration values:

  • IAM

  • SAML

  • LDAP

  • LOCAL

  • AGENTTENANT

  • OTHER

principal_name

String

Entity name.

resource

ResourceInfo object

Resource information.

resource_name

String

Require to perform splitting in dotted format.

permissions

Array of strings

Permission list: ALL, CREATE, ALTER, DROP, DESCRIBE, EXEC, CREATE_DATABASE, LIST_DATABASE, CREATE_TABLE, LIST_TABLE, CREATE_FUNC, LIST_FUNC, REGISTER_MODEL, LIST_MODEL, CREATE_MODEL, CREATE_DATASET, LIST_DATASET, INSERT, UPDATE, DELETE, SELECT, READ, WRITE, OPERATE, INTROSPECTION, SOURCES, DICT GET, TRUNCATE, OPTIMIZE, CREATE TEMPORARY TABLE, CREATE DICTIONARY, CREATE VIEW, SHOW DATABASES, SHOW TABLES, SHOW DICTIONARIES, SHOW COLUMNS, DROP DATABASE, DROP VIEW, DROP DICTIONARY, DROP TABLE, ALTER TABLE, ALTER UPDATE, ALTER DELETE, ALTER COLUMN, ALTER ADD COLUMN, ALTER DROP COLUMN, ALTER MODIFY COLUMN, ALTER COMMENT COLUMN, ALTER CLEAR COLUMN, ALTER RENAME COLUMN, ALTER INDEX, ALTER ORDER BY, ALTER ADD INDEX, ALTER DROP INDEX, ALTER MATERIALIZE INDEX, ALTER CLEAR INDEX, ALTER CONSTRAINT, ALTER ADD CONSTRAINT, ALTER DROP CONSTRAINT, ALTER TTL, ALTER MATERIALIZE TTL, ALTER SETTINGS, ALTER MOVE PARTITION, ALTER FETCH PARTITION, ALTER FREEZE PARTITION, ALTER VIEW, ALTER VIEW REFRESH and ALTER VIEW MODIFY QUERY.

Enumeration values:

  • ALL

  • CREATE

  • ALTER

  • DROP

  • DESCRIBE

  • EXEC

  • CREATE_DATABASE

  • LIST_DATABASE

  • CREATE_TABLE

  • LIST_TABLE

  • CREATE_FUNC

  • LIST_FUNC

  • REGISTER_MODEL

  • LIST_MODEL

  • CREATE_MODEL

  • CREATE_DATASET

  • LIST_DATASET

  • INSERT

  • UPDATE

  • DELETE

  • SELECT

  • READ

  • WRITE

  • OPERATE

  • INTROSPECTION

  • SOURCES

  • DICT GET

  • TRUNCATE

  • OPTIMIZE

  • CREATE TEMPORARY TABLE

  • CREATE DICTIONARY

  • CREATE VIEW

  • SHOW DATABASES

  • SHOW TABLES

  • SHOW DICTIONARIES

  • SHOW COLUMNS

  • DROP DATABASE

  • DROP VIEW

  • DROP DICTIONARY

  • DROP TABLE

  • ALTER TABLE

  • ALTER UPDATE

  • ALTER DELETE

  • ALTER COLUMN

  • ALTER ADD COLUMN

  • ALTER DROP COLUMN

  • ALTER MODIFY COLUMN

  • ALTER COMMENT COLUMN

  • ALTER CLEAR COLUMN

  • ALTER RENAME COLUMN

  • ALTER INDEX

  • ALTER ORDER BY

  • ALTER ADD INDEX

  • ALTER DROP INDEX

  • ALTER MATERIALIZE INDEX

  • ALTER CLEAR INDEX

  • ALTER CONSTRAINT

  • ALTER ADD CONSTRAINT

  • ALTER DROP CONSTRAINT

  • ALTER TTL

  • ALTER MATERIALIZE TTL

  • ALTER SETTINGS

  • ALTER MOVE PARTITION

  • ALTER FETCH PARTITION

  • ALTER FREEZE PARTITION

  • ALTER VIEW

  • ALTER VIEW REFRESH

  • ALTER VIEW MODIFY QUERY

grant_able_permissions

Array of strings

Transferable permissions: ALL, CREATE, ALTER, DROP, DESCRIBE, EXEC, CREATE_DATABASE, LIST_DATABASE, CREATE_TABLE, LIST_TABLE, CREATE_FUNC, LIST_FUNC, REGISTER_MODEL, LIST_MODEL, CREATE_MODEL, CREATE_DATASET, LIST_DATASET, INSERT,UPDATE, DELETE, SELECT, READ, WRITE, OPERATE, INTROSPECTION, SOURCES, DICT GET, TRUNCATE, OPTIMIZE, CREATE TEMPORARY TABLE, CREATE DICTIONARY, CREATE VIEW, SHOW DATABASES, SHOW TABLES, SHOW DICTIONARIES, SHOW COLUMNS, DROP DATABASE, DROP VIEW, DROP DICTIONARY, DROP TABLE, ALTER TABLE, ALTER UPDATE, ALTER DELETE, ALTER COLUMN, ALTER ADD COLUMN, ALTER DROP COLUMN, ALTER MODIFY COLUMN, ALTER COMMENT COLUMN, ALTER CLEAR COLUMN, ALTER RENAME COLUMN, ALTER INDEX, ALTER ORDER BY, ALTER ADD INDEX, ALTER DROP INDEX, ALTER MATERIALIZE INDEX, ALTER CLEAR INDEX, ALTER CONSTRAINT, ALTER ADD CONSTRAINT, ALTER DROP CONSTRAINT, ALTER TTL, ALTER MATERIALIZE TTL, ALTER SETTINGS, ALTER MOVE PARTITION, ALTER FETCH PARTITION, ALTER FREEZE PARTITION, ALTER VIEW, ALTER VIEW REFRESH and ALTER VIEW MODIFY QUERY.

Enumeration values:

  • ALL

  • CREATE

  • ALTER

  • DROP

  • DESCRIBE

  • EXEC

  • CREATE_DATABASE

  • LIST_DATABASE

  • CREATE_TABLE

  • LIST_TABLE

  • CREATE_FUNC

  • LIST_FUNC

  • REGISTER_MODEL

  • LIST_MODEL

  • CREATE_MODEL

  • CREATE_DATASET

  • LIST_DATASET

  • INSERT

  • UPDATE

  • DELETE

  • SELECT

  • READ

  • WRITE

  • OPERATE

  • INTROSPECTION

  • SOURCES

  • DICT GET

  • TRUNCATE

  • OPTIMIZE

  • CREATE TEMPORARY TABLE

  • CREATE DICTIONARY

  • CREATE VIEW

  • SHOW DATABASES

  • SHOW TABLES

  • SHOW DICTIONARIES

  • SHOW COLUMNS

  • DROP DATABASE

  • DROP VIEW

  • DROP DICTIONARY

  • DROP TABLE

  • ALTER TABLE

  • ALTER UPDATE

  • ALTER DELETE

  • ALTER COLUMN

  • ALTER ADD COLUMN

  • ALTER DROP COLUMN

  • ALTER MODIFY COLUMN

  • ALTER COMMENT COLUMN

  • ALTER CLEAR COLUMN

  • ALTER RENAME COLUMN

  • ALTER INDEX

  • ALTER ORDER BY

  • ALTER ADD INDEX

  • ALTER DROP INDEX

  • ALTER MATERIALIZE INDEX

  • ALTER CLEAR INDEX

  • ALTER CONSTRAINT

  • ALTER ADD CONSTRAINT

  • ALTER DROP CONSTRAINT

  • ALTER TTL

  • ALTER MATERIALIZE TTL

  • ALTER SETTINGS

  • ALTER MOVE PARTITION

  • ALTER FETCH PARTITION

  • ALTER FREEZE PARTITION

  • ALTER VIEW

  • ALTER VIEW REFRESH

  • ALTER VIEW MODIFY QUERY

created_time

Long

Creation time.

condition

String

Conditions.

obligation

String

Obligation, including data filter and data mask.

authorization_paths

Array of strings

Authorization path list.

parameters

Map<String,String>

Parameter.

access_policy_type

String

Permission policy type. The options are DEFAULT (common policy), ROW_FILTER (row filtering), and DATA_MASK (column masking).

Enumeration values:

  • DEFAULT

  • ROW_FILTER

  • DATA_MASK

obs_access_label

String

OBS access label, which describes the LakeFormation permission.

Table 7 ResourceInfo

Parameter

Type

Description

catalogs

Array of CatalogInfo objects

Catalog information.

uris

Array of strings

URI.

type

String

Resource type. The value can be CATALOG, DATABASE, TABLE, COLUMN, FUNC, MODEL, DATASET or URI.

Enumeration values:

  • CATALOG

  • DATABASE

  • TABLE

  • COLUMN

  • FUNC

  • MODEL

  • DATASET

  • URI

Table 8 CatalogInfo

Parameter

Type

Description

databases

Array of DatabaseInfo objects

Subdatabase information.

name

String

Catalog name.

models

Array of ModelInfo objects

Submodel information.

datasets

Array of DatasetInfo objects

Subdataset information.

Table 9 DatabaseInfo

Parameter

Type

Description

name

String

Database name. The value should contain 1 to 128 characters. Only letters, numbers, hyphens (-), and underscores (_) are allowed.

tables

Array of TableInfo objects

Subtables.

functions

Array of FunctionInfo objects

Subfunctions.

Table 10 TableInfo

Parameter

Type

Description

columns

ColumnInfo object

Sub-columns.

name

String

Table name.

Table 11 ColumnInfo

Parameter

Type

Description

column_name

Array of strings

Column name. The value can contain 1 to 767 characters. Only letters, digits, and special characters (_-+*(),) are allowed.

filter

String

Whether to filter out an item. The options are Include and Exclude.

Enumeration values:

  • Include

  • Exclude

Table 12 FunctionInfo

Parameter

Type

Description

name

String

Function name.

Table 13 ModelInfo

Parameter

Type

Description

name

String

Model name. Enter 1 to 256 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Table 14 DatasetInfo

Parameter

Type

Description

name

String

Dataset name. The value is a string of 1 to 256 characters and can contain only digits, letters, and underscores (_).

Table 15 PagedInfo

Parameter

Type

Description

current_count

Integer

Number of objects returned this time. The value ranges from 0 to 2000.

next_marker

String

Query address of the next page. If the next page does not exist, the value is null. (If the value is null, the response body does not contain this parameter.)

previous_marker

String

Query address of the previous page. If the previous page does not exist, the value is null. (If the value is null, the response body does not contain this parameter.)

Status code: 400

Table 16 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

solution_msg

String

Solution.

Status code: 404

Table 17 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

solution_msg

String

Solution.

Status code: 500

Table 18 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

solution_msg

String

Solution.

Example Requests

GET https://{endpoint}/v1/{project_id}/instances/{instance_id}/policies/show

Example Responses

Status code: 200

OK

{
  "policies" : [ {
    "project_id" : "41aa75443xxxxxx2c6afaaa40cc046",
    "instance_id" : "51c51596-2e97-47bf-xxxx-0fc728c04ced",
    "principal_type" : "USER",
    "principal_source" : "IAM",
    "principal_name" : "user1",
    "resource" : {
      "catalogs" : [ {
        "databases" : [ {
          "name" : "db1",
          "tables" : [ { } ],
          "functions" : [ { } ]
        } ],
        "name" : "catalog1"
      } ],
      "uris" : [ "string" ],
      "type" : "CATALOG"
    },
    "resource_name" : "string",
    "permissions" : [ "DROP", "ALTER" ],
    "grant_able_permissions" : [ "ALTER" ],
    "created_time" : 0,
    "condition" : "ip=127.0.0.1",
    "obligation" : "DATAFILTER:c1<10;DATAMASK:PARTIAL_MASK:show last 4",
    "authorization_paths" : [ "obs://location/uri/" ]
  } ],
  "page_info" : {
    "current_count" : 2000,
    "next_marker" : "006f492b-xxxx",
    "previous_marker" : "003e6eba-xxxx"
  }
}

Status code: 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"
}

Status code: 401

Unauthorized

{
  "error_code": 'APIG.1002',
  "error_msg": 'Incorrect token or token resolution failed'
}

Status code: 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"
}

Status code: 404

Not Found

{
  "error_code" : "common.01000001",
  "error_msg" : "response status exception, code: 404"
}

Status code: 408

Request Timeout

{
  "error_code" : "common.00000408",
  "error_msg" : "timeout exception occurred"
}

Status code: 500

Internal Server Error

{
  "error_code" : "common.00000500",
  "error_msg" : "internal error"
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

408

Request Timeout

500

Internal Server Error

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback