Function
This API is used to disassociate a specified resource user or shared resource from a specified resource share instance. Resource users can also leave a specified resource share instance.
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:disassociate | Write | resourceShare * | | - | - |
| - | |
URI
POST /v1/resource-shares/{resource_share_id}/disassociate
Table 1 Path Parameters | Parameter | Mandatory | Type | Description |
| resource_share_id | Yes | String | ID of the resource share. |
Request Parameters
Table 3 Request body parameters | Parameter | Mandatory | Type | Description |
| principals | No | Array of strings | List of one or more principals associated with the resource share. |
| resource_urns | No | Array of strings | List of URNs of one or more resources associated with the resource share. |
Response Parameters
Status code: 200
Table 4 Response body parameters | Parameter | Type | Description |
| resource_share_associations | Array of ResourceShareAssociation objects | Details about the principals or resources associated with a resource share. |
Table 5 ResourceShareAssociation | Parameter | Type | Description |
| associated_entity | String | Associated entity. It can be the resource URN, account ID, URN of the root OU, or URN of another OU. |
| association_type | String | Entity type in the association. |
| created_at | String | Time when the association was created. |
| updated_at | String | Time when the association was last updated. |
| external | Boolean | Whether the principal is in the same organization as the resource owner. |
| resource_share_id | String | ID of the resource share. |
| resource_share_name | String | Name of the resource share. |
| status | String | Association status. |
| status_message | String | Description of the association status. |
Example Requests
Disassociating specified principals or resources from a resource share
POST /v1/resource-shares/{resource_share_id}/disassociate
{
"principals" : [ "string" ],
"resource_urns" : [ "dns::123abc:zone:123abc" ]
} Example Responses
Status code: 200
Request succeeded.
{
"resource_share_associations" : [ {
"associated_entity" : "string",
"association_type" : "string",
"created_at" : "2022-08-22T11:53:04.912Z",
"updated_at" : "2022-08-22T11:53:04.912Z",
"external" : true,
"resource_share_id" : "string",
"resource_share_name" : "string",
"status" : "string",
"status_message" : "string"
} ]
} Status Codes
| Status Code | Description |
| 200 | Request succeeded. |