全部產品
Search
文件中心

:ListResourceShareInvitations - 查詢收到的資源共用邀請資訊

更新時間:Oct 13, 2025

資源使用者調用ListResourceShareInvitations查詢自己收到的資源共用邀請資訊。

介面說明

使用說明

本文將提供一個樣本,查詢當前帳號在cn-hangzhou地區收到的資源共用邀請。返回結果顯示,共收到 1 個邀請,且處於等待確認狀態。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

resourcesharing:ListResourceShareInvitations

list

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

MaxResults

integer

單次請求返回結果的最大條數。

取值範圍:1~100。預設值:20。

20

NextToken

string

當請求的返回結果被截斷時,您可以使用NextToken再次發起請求,擷取從當前截斷位置之後的內容。

TGlzdFJlc291cm****

ResourceShareIds

array

共用單元 ID。

string

共用單元 ID。

rs-ysGRci9z****

ResourceShareInvitationIds

array

資源共用邀請 ID。

string

資源共用邀請 ID。

i-p6eRytrkjVvM****

關於公用請求參數的詳情,請參見公用參數

返回參數

名稱

類型

描述

樣本值

object

返回結果。

NextToken

string

當請求的返回結果被截斷時,您可以使用NextToken再次發起請求,擷取從當前截斷位置之後的內容。

TGlzdFJlc291cm****

RequestId

string

請求 ID。

30EC8328-1BDE-51D5-BFAB-039508BD91A1

ResourceShareInvitations

array<object>

資源共用邀請資訊。

object

資源共用邀請資訊。

Status

string

邀請狀態。取值:

  • Pending:等待確認。

  • Accepted:接受邀請成功。

  • Cancelled:已取消。

  • Rejected:已拒絕。

  • Expired:已到期。

  • AcceptFailed:接受邀請失敗。

Pending

CreateTime

string

邀請建立時間(UTC 時間)。

2022-08-18T05:36:45.024Z

ResourceShareId

string

共用單元 ID。

rs-ysGRci9z****

ResourceShareName

string

共用單元名稱。

example

SenderAccountId

string

邀請者的阿里雲帳號 ID。

151266687691****

ReceiverAccountId

string

受邀者的阿里雲帳號 ID。

134254031178****

ResourceShareInvitationId

string

資源共用邀請 ID。

i-p6eRytrkjVvM****

InvitationFailedDetails

array<object>

接受共用單元邀請或退出共用單元檢查失敗詳細原因。

object

接受共用單元邀請或退出共用單元檢查失敗詳細原因。

Status

string

已棄用。請使用 FailureReason。

None

StatusMessage

string

已棄用。請使用 FailureDescription。

None

AssociateType

string

已棄用。請使用 OperationType。

None

ResourceArn

string

共用資源 ARN。

acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****

ResourceType

string

共用資源類型。

支援共用的資源類型,請參見支援資源共用的雲端服務

Snapshot

FailureReason

string

接受或退出共用單元檢查失敗時的原因。取值:

  • Unavailable:資源不可以共用。

  • LimitExceeded:資源可共用帳號配額超限。

  • ZonalResourceInaccessible: 資源在此地區不可用。

  • InternalError:檢查過程伺服器內部出現錯誤。

  • UnsupportedOperation:不支援執行操作。

Unavailable

FailureDescription

string

接受或退出共用單元檢查失敗時的詳細原因描述。

You cannot access the specified resource at this time.

OperationType

string

操作類型。取值:

  • Associate:關聯。

  • Disassociate:解除關聯。

Associate

ResourceId

string

共用資源 ID。

s-7xvh46nx5oqlre0wv***

樣本

正常返回樣本

JSON格式

{
  "NextToken": "TGlzdFJlc291cm****",
  "RequestId": "30EC8328-1BDE-51D5-BFAB-039508BD91A1",
  "ResourceShareInvitations": [
    {
      "Status": "Pending",
      "CreateTime": "2022-08-18T05:36:45.024Z",
      "ResourceShareId": "rs-ysGRci9z****",
      "ResourceShareName": "example",
      "SenderAccountId": "151266687691****",
      "ReceiverAccountId": "134254031178****",
      "ResourceShareInvitationId": "i-p6eRytrkjVvM****",
      "InvitationFailedDetails": [
        {
          "Status": "None",
          "StatusMessage": "None",
          "AssociateType": "None",
          "ResourceArn": "acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****",
          "ResourceType": "Snapshot",
          "FailureReason": "Unavailable",
          "FailureDescription": "You cannot access the specified resource at this time.",
          "OperationType": "Associate",
          "ResourceId": "s-7xvh46nx5oqlre0wv***"
        }
      ]
    }
  ]
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidParameter.MaxResults The MaxResults is invalid. MaxResults參數錯誤。
400 InvalidParameter.NextToken The NextToken is invalid. NextToken參數錯誤。
400 InvalidParameter.NextToken.Length The maximum length of NextToken exceeds 256 characters. NextToken長度超限(最大256個字元)。
400 InvalidParameter.ResourceShareIds The ResourceShareIds is invalid. ResourceShareIds參數錯誤。
400 InvalidParameter.ResourceShareIds.Duplicate The ResourceShareIds contains duplicate values. ResourceShareIds有重複項。
400 InvalidParameter.ResourceShareIds.Length The maximum length of ResourceShareIds exceeds 5 characters. ResourceShareIds長度超限(最大5個)。
400 InvalidParameter.ResourceShareInvitationIds The ResourceShareInvitationIds is invalid. 參數ResourceShareInvitationIds非法。
400 InvalidParameter.ResourceShareInvitationIds.Duplicate The ResourceShareInvitationIds duplicate values. 參數ResourceShareInvitationIds重複。
400 InvalidParameter.ResourceShareInvitationIds.Length The maximum length of ResourceShareInvitationIds exceeds quota limit. ResourceShareInvitationIds長度超限。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情