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

# POST /getresourceshareinvitations

`POST /getresourceshareinvitations`

Retrieves details about invitations that you have received for resource shares.

## Query parameters

- `maxResults` string
- `nextToken` string

## Request body

- object
  - `resourceShareInvitationArns` String[] — Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share invitations you want information about.
  - `resourceShareArns` String[] — Specifies that you want details about invitations only for the resource shares described by this list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>
  - `nextToken` string — Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.
  - `maxResults` integer — Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.

## Response `200`

Success

- GetResourceShareInvitationsResponse
  - `resourceShareInvitations` ResourceShareInvitation[] — An array of objects that contain the details about the invitations.
    - `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.
  - `nextToken` string — If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.

## Other responses

- `480` — ResourceShareInvitationArnNotFoundException
- `481` — InvalidMaxResultsException
- `482` — MalformedArnException
- `483` — UnknownResourceException
- `484` — InvalidNextTokenException
- `485` — InvalidParameterException
- `486` — ServerInternalException
- `487` — ServiceUnavailableException

---

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