---
title: "POST /disassociateresourceshare"
method: POST
path: "/disassociateresourceshare"
---

# POST /disassociateresourceshare

`POST /disassociateresourceshare`

Removes the specified principals or resources from participating in the specified resource share.

## Request body

- object
  - `resourceShareArn` string, required — Specifies <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource share that you want to remove resources or principals from.
  - `resourceArns` String[] — Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> for one or more resources that you want to remove from the resource share. After the operation runs, these resources are no longer shared with principals associated with the resource share.
  - `principals` String[] — <p>Specifies a list of one or more principals that no longer are to have access to the resources in this resource share.</p> <p>You can include the following values:</p> <ul> <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li> <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li> <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li> <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li> <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li> </ul> <note> <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p> </note>
  - `clientToken` string — <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p> <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>

## Response `200`

Success

- DisassociateResourceShareResponse
  - `resourceShareAssociations` ResourceShareAssociation[] — An array of objects with information about the updated associations for this resource share.
    - `resourceShareArn` string — The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource share.
    - `resourceShareName` string — The name of the resource share.
    - `associatedEntity` string — <p>The associated entity. This can be either of the following:</p> <ul> <li> <p>For a resource association, this is the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource.</p> </li> <li> <p>For principal associations, this is one of the following:</p> <ul> <li> <p>The ID of an Amazon Web Services account</p> </li> <li> <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of an organization in Organizations</p> </li> <li> <p>The ARN of an organizational unit (OU) in Organizations</p> </li> <li> <p>The ARN of an IAM role</p> </li> <li> <p>The ARN of an IAM user</p> </li> </ul> </li> </ul>
    - `associationType` 'PRINCIPAL' | 'RESOURCE' — The type of entity included in this association.
    - `status` 'ASSOCIATING' | 'ASSOCIATED' | 'FAILED' | 'DISASSOCIATING' | 'DISASSOCIATED' — The current status of the association.
    - `statusMessage` string — A message about the status of the association.
    - `creationTime` string, date-time — The date and time when the association was created.
    - `lastUpdatedTime` string, date-time — The date and time when the association was last updated.
    - `external` boolean — Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
  - `clientToken` string — The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.

## Other responses

- `480` — IdempotentParameterMismatchException
- `481` — ResourceShareLimitExceededException
- `482` — MalformedArnException
- `483` — InvalidStateTransitionException
- `484` — InvalidClientTokenException
- `485` — InvalidParameterException
- `486` — OperationNotPermittedException
- `487` — ServerInternalException
- `488` — ServiceUnavailableException
- `489` — UnknownResourceException

---

[API](https://skmtc.net/aws/apis/ram.md) · [All operations](https://skmtc.net/aws/apis/ram/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/ram/versions/61869c19b93e/schema)
