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

# POST /rejectresourceshareinvitation

`POST /rejectresourceshareinvitation`

Rejects an invitation to a resource share from another Amazon Web Services account.

## Request body

- object
  - `resourceShareInvitationArn` string, required — Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the invitation that you want to reject.
  - `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

- RejectResourceShareInvitationResponse
  - `resourceShareInvitation` object — An object that contains the details about the rejected invitation.
    - `resourceShareInvitationArn` string — The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the invitation.
    - `resourceShareName` string — The name of the 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
    - `senderAccountId` string — The ID of the Amazon Web Services account that sent the invitation.
    - `receiverAccountId` string — The ID of the Amazon Web Services account that received the invitation.
    - `invitationTimestamp` string, date-time — The date and time when the invitation was sent.
    - `status` 'PENDING' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED' — The current status of the invitation.
    - `resourceShareAssociations` ResourceShareAssociation[] — To view the resources associated with a pending resource share invitation, use <a>ListPendingInvitationResources</a>.This member has been deprecated. Use ListPendingInvitationResources.
      - `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.
    - `receiverArn` string — The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the IAM user or role that received the invitation.
  - `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` — MalformedArnException
- `481` — OperationNotPermittedException
- `482` — ResourceShareInvitationArnNotFoundException
- `483` — ResourceShareInvitationAlreadyAcceptedException
- `484` — ResourceShareInvitationAlreadyRejectedException
- `485` — ResourceShareInvitationExpiredException
- `486` — ServerInternalException
- `487` — ServiceUnavailableException
- `488` — InvalidClientTokenException
- `489` — IdempotentParameterMismatchException

---

[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)
