View Share List
Description
The view share list is used to query all the share objects (share objects) under the current instance, helping users understand the data sharing situation between the current service instance and other service instances.
Syntax
Return Description
- provider: The tenant name of the share provider, indicating the source of the shared data.
- provider_instance: The service instance name of the share provider, indicating the service instance of the shared data.
- provider_workspace: The workspace to which the share belongs, indicating the workspace where the share object is located.
- scope: The sharing scope of the share, currently only supports PRIVATE—specified instance sharing. Indicates that the share object is only shared between specified service instances.
- to_instance: The names of the service instances to which the share object is specified to be shared, separated by commas (,). Indicates which service instances the current share object is shared with.
- kind: The type of share, OUTBOUND for data shared out from the current service instance, INBOUND for data shared to the current service instance from other service instances. Indicates whether the current share object is the source of the shared data or the destination for receiving data.
Example
- Query all share objects under the current service instance:
Assume the return result is as follows:
In this example, we can see that the current service instance has two sharing objects. The first object is shared by the current service instance to a service instance named other_instance, with a sharing scope of PRIVATE. The second object is a share from another service instance, with the current service instance as the recipient.
- Query the sharing objects of a specified type under the current service instance:
Assume the return result is as follows:
In this example, we query the sharing objects of the data (OUTBOUND type) shared by the current service instance. As you can see, the current service instance has shared data with a service instance named other_instance.
Through the above example, you can more easily view and manage all sharing objects under the current service instance.