Function
This API is used to search for the details about the resource share that you have created or that 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:resourceShares:search | Read | - | g:TagKeys | - | - |
URI
POST /v1/resource-shares/search
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. |
| name | No | String | Name of the resource share. |
| marker | No | String | Page marker. |
| permission_id | No | String | Permission ID. |
| resource_owner | Yes | String | Whether the resource share is created by you (self) or shared with you (other-accounts). |
| resource_share_ids | No | Array of strings | List of resource share IDs. |
| resource_share_status | No | String | Status of the resource share. |
| tag_filters | No | Array of TagFilter objects | Tags attached to the resource share. |
Table 3 TagFilter | Parameter | Mandatory | Type | Description |
| key | Yes | String | Identifier or name of the tag key. |
| values | No | Array of strings | List of values of the tag key. |
Response Parameters
Status code: 200
Table 4 Response body parameters | Parameter | Type | Description |
| resource_shares | Array of ResourceShare objects | List of details about resource shares. |
| page_info | PageInfo object | Pagination details. |
Table 5 ResourceShare | Parameter | Type | Description |
| id | String | ID of the resource share. |
| name | String | Name of the resource share. |
| description | String | Description of the resource share. |
| allow_external_principals | Boolean | Whether resources can be shared with any accounts outside the organization. |
| owning_account_id | String | ID of the resource owner in a resource share. |
| status | String | Status of the resource share. |
| tags | Array of Tag objects | List of tags attached to the resource share. |
| created_at | String | Time when the resource share was created. |
| updated_at | String | Time when the resource share was last updated. |
Table 6 Tag | Parameter | Type | Description |
| key | String | Identifier or name of the tag key. |
| value | String | Value of the tag key. You can set the tag value to an empty string but not to null. |
Table 7 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 details about a resource share
POST /v1/resource-shares/search
{
"limit" : 2000,
"name" : "string",
"marker" : "0",
"permission_id" : "string",
"resource_owner" : "self",
"resource_share_ids" : [ "string" ],
"resource_share_status" : "string",
"tag_filters" : [ {
"key" : "string",
"values" : [ "string" ]
} ]
} Example Responses
Status code: 200
Request succeeded.
{
"resource_shares" : [ {
"id" : "string",
"name" : "string",
"description" : "string",
"allow_external_principals" : true,
"owning_account_id" : "string",
"status" : "string",
"tags" : [ {
"key" : "string",
"value" : "string"
} ],
"created_at" : "2023-01-06T08:24:55.638Z",
"updated_at" : "2023-01-06T08:24:55.638Z"
} ],
"page_info" : {
"previous_marker" : "0",
"next_marker" : "2000",
"current_count" : 2000
}
} Status Codes
| Status Code | Description |
| 200 | Request succeeded. |