Updated on 2024-03-15 GMT+08:00

Searching for Shared Resources

Function

This API is used to search for the resources that you share or are shared with you.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

POST /v1/shared-resources/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

limit

No

Integer

Maximum number of entries that can be displayed on a page.

Minimum: 1

Maximum: 2000

Default: 50

marker

No

String

Page marker.

Minimum: 1

Maximum: 64

principal

No

String

Principal associated with the resource share.

Minimum: 1

Maximum: 1500

resource_ids

No

Array of strings

List of resource IDs.

Minimum: 1

Maximum: 1500

Array Length: 1 - 100

resource_urns

No

Array of strings

List of resource URNs.

Minimum: 0

Maximum: 1500

Array Length: 1 - 100

resource_owner

Yes

String

Resource owner (self or other-accounts) of the resource share.

resource_share_ids

No

Array of strings

List of resource share IDs.

Minimum: 0

Maximum: 36

Array Length: 1 - 100

resource_region

No

String

Region where the resource is located.

Minimum: 0

Maximum: 255

resource_type

No

String

Resource type.

Minimum: 0

Maximum: 64

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

shared_resources

Array of SharedResource objects

List of shared resources.

Array Length: 0 - 2000

page_info

PageInfo object

Pagination details.

Table 4 SharedResource

Parameter

Type

Description

resource_urn

String

Uniform resource name of the resource.

Minimum: 0

Maximum: 1500

created_at

String

Time when the resource was associated with the resource share.

updated_at

String

Time when the resource share was last updated.

resource_type

String

Resource type.

Minimum: 0

Maximum: 100

resource_share_id

String

ID of the resource share associated with the resource.

Minimum: 0

Maximum: 36

status

String

Status of the association.

Minimum: 0

Maximum: 36

Table 5 PageInfo

Parameter

Type

Description

previous_marker

String

Marker of the previous page.

Minimum: 1

Maximum: 64

next_marker

String

Marker of the next page.

Minimum: 1

Maximum: 64

current_count

Integer

Page size.

Minimum: 1

Maximum: 2000

Example Requests

Searching for the resources that you share or are shared with you

POST https://{hostname}/v1/shared-resources/search

{
  "limit" : 2000,
  "marker" : "string",
  "principal" : "string",
  "resource_ids" : [ "string" ],
  "resource_urns" : [ "string" ],
  "resource_owner" : "self",
  "resource_share_ids" : [ "string" ],
  "resource_region" : "string",
  "resource_type" : "string"
}

Example Responses

Status code: 200

Request succeeded.

{
  "shared_resources" : [ {
    "resource_urn" : "string",
    "created_at" : "2022-09-19T02:32:23.735Z",
    "updated_at" : "2022-09-19T02:32:23.735Z",
    "resource_type" : "string",
    "resource_share_id" : "string",
    "status" : "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.