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

Searching for a Resource Share

Function

This API is used to search for the details about the resource share that you have created or that 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/resource-shares/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

name

No

String

Name of the resource share.

Minimum: 0

Maximum: 64

marker

No

String

Page marker.

Minimum: 1

Maximum: 64

permission_id

No

String

Permission ID.

Minimum: 0

Maximum: 36

resource_owner

Yes

String

Whether the resource share is created by you (self) or shared with you (other-accounts).

resource_share_ids

No

Array of strings

List of resource share IDs.

Minimum: 0

Maximum: 36

Array Length: 1 - 100

resource_share_status

No

String

Status of the resource share.

Minimum: 0

Maximum: 36

tag_filters

No

Array of TagFilter objects

Tags attached to the resource share.

Array Length: 0 - 20

Table 3 TagFilter

Parameter

Mandatory

Type

Description

key

Yes

String

Identifier or name of the tag key.

Minimum: 1

Maximum: 128

values

No

Array of strings

List of values for the tag key.

Minimum: 0

Maximum: 255

Array Length: 0 - 20

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

resource_shares

Array of ResourceShare objects

List of details about resource shares.

Array Length: 0 - 2000

page_info

PageInfo object

Pagination details.

Table 5 ResourceShare

Parameter

Type

Description

id

String

ID of the resource share.

Minimum: 0

Maximum: 36

name

String

Name of the resource share.

Minimum: 0

Maximum: 128

description

String

Description of the resource share.

Minimum: 1

Maximum: 1024

allow_external_principals

Boolean

Whether resources can be shared with any accounts outside the organization.

owning_account_id

String

ID of the resource owner in a resource share.

Minimum: 0

Maximum: 36

status

String

Status of the resource share.

Minimum: 0

Maximum: 36

tags

Array of Tag objects

List of tags attached to the resource share.

Array Length: 0 - 100

created_at

String

Time when the resource share was created.

updated_at

String

Time when the resource share was last updated.

Table 6 Tag

Parameter

Type

Description

key

String

Identifier or name of the tag key.

Minimum: 1

Maximum: 128

value

String

Tag value. You can set the tag value to an empty string but not to null.

Minimum: 0

Maximum: 255

Table 7 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 details about a resource share

POST https://{hostname}/v1/resource-shares/search

{
  "limit" : 2000,
  "name" : "string",
  "marker" : "string",
  "permission_id" : "string",
  "resource_owner" : "self",
  "resource_share_ids" : [ "string" ],
  "resource_share_status" : "string",
  "tag_filters" : [ {
    "key" : "string",
    "values" : [ "string" ]
  } ]
}

Example Responses

Status code: 200

Request succeeded.

{
  "resource_shares" : [ {
    "id" : "string",
    "name" : "string",
    "description" : "string",
    "allow_external_principals" : true,
    "owning_account_id" : "string",
    "status" : "string",
    "tags" : [ {
      "key" : "string",
      "value" : "string"
    } ],
    "created_at" : "2023-01-06T08:24:55.638Z",
    "updated_at" : "2023-01-06T08:24:55.638Z"
  } ],
  "page_info" : {
    "previous_marker" : "string",
    "next_marker" : "string",
    "current_count" : 2000
  }
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.