Help Center/ Resource Access Manager/ API Reference/ APIs/ Associated Principals and Resources/ Searching for Associated Principals and Resources
Updated on 2025-10-30 GMT+08:00

Searching for Associated Principals and Resources

Function

This API is used to search for the principals and resources associated with a resource share you created.

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:searchResourceShareAssociations

    Read

    -

    -

    -

    -

URI

POST /v1/resource-share-associations/search

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Security-Token

No

String

Security token (session token) for temporary security credentials. This parameter is mandatory when you make an API call using temporary security credentials.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

association_status

No

String

Status of the association.

association_type

Yes

String

Association type (principal or resource).

limit

No

Integer

Maximum number of results on a page. If the limit parameter is not specified, the default value is 2,000.

marker

No

String

Page marker.

principal

No

String

Principal associated with the resource share.

resource_urn

No

String

URN of the resource associated with the resource share.

resource_share_ids

No

Array of strings

List of resource share IDs.

resource_ids

No

Array of strings

List of resource IDs.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

resource_share_associations

Array of ResourceShareAssociation objects

List of association details.

page_info

PageInfo object

Pagination details.

Table 4 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 principle 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

Status of the association.

status_message

String

Description of the status to the association.

Table 5 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 the principals and resources associated with a resource share

POST /v1/resource-share-associations/search

{
  "association_status" : "string",
  "association_type" : "principal",
  "limit" : 2000,
  "marker" : "string",
  "principal" : "string",
  "resource_urn" : "string",
  "resource_share_ids" : [ "string" ],
  "resource_ids" : [ "string" ]
}

Example Responses

Status code: 200

Request succeeded.

{
  "resource_share_associations" : [ {
    "associated_entity" : "string",
    "association_type" : "string",
    "created_at" : "2022-09-19T02:10:16.960Z",
    "updated_at" : "2022-09-19T02:10:16.960Z",
    "external" : true,
    "resource_share_id" : "string",
    "resource_share_name" : "string",
    "status" : "string",
    "status_message" : "string"
  } ],
  "page_info" : {
    "previous_marker" : "string",
    "next_marker" : "string",
    "current_count" : 2000
  }
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.