Function
This API is used to search for distinct resources that you share or are shared with you.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
| Action | Access Level | Resource Type (*: required) | Condition Key | Alias | Dependencies |
| ram:sharedResources:searchDistinctResource | List | - | - | - | - |
URI
POST /v1/shared-resources/search-distinct-resource
Request Parameters
Table 2 Request body parameters | Parameter | Mandatory | Type | Description |
| limit | No | Integer | Maximum number of results on a page. If the limit parameter is not specified, the default value is 2000. |
| marker | No | String | Page marker. |
| resource_ids | No | Array of strings | Resource ID. |
| principal | No | String | Principal associated with the resource share. |
| resource_region | No | String | Region where the resource is located. |
| resource_urns | No | Array of strings | List of resource URNs. |
| resource_owner | Yes | String | Resource owner (self or other-accounts) of the resource share. |
Response Parameters
Status code: 200
Table 3 Response body parameters | Parameter | Type | Description |
| distinct_shared_resources | Array of DistinctSharedResource objects | List of distinct resources. |
| page_info | PageInfo object | Pagination details. |
Table 4 DistinctSharedResource | Parameter | Type | Description |
| resource_urn | String | Uniform resource name of the resource. |
| resource_type | String | Resource type. |
| updated_at | String | Time when the resource share was last updated. |
Table 5 PageInfo | Parameter | Type | Description |
| previous_marker | String | Marker of the previous page. |
| next_marker | String | Marker of the next page. |
| current_count | Integer | Number of pages. |
Example Requests
Searching for distinct resources that you share or are shared with you
POST /v1/shared-resources/search-distinct-resource
{
"limit" : 2000,
"marker" : "0",
"resource_ids" : [ "string" ],
"principal" : "string",
"resource_region" : "string",
"resource_urns" : [ "dns::123abc:zone:123abc" ],
"resource_owner" : "self"
} Example Responses
Status code: 200
Request succeeded.
{
"distinct_shared_resources" : [ {
"resource_urn" : "string",
"resource_type" : "string",
"updated_at" : "2022-09-19T02:32:48.943Z"
} ],
"page_info" : {
"previous_marker" : "0",
"next_marker" : "2000",
"current_count" : 2000
}
} Status Codes
| Status Code | Description |
| 200 | Request succeeded. |