資源使用者調用ListResourceShareInvitations查詢自己收到的資源共用邀請資訊。
介面說明
使用說明
本文將提供一個樣本,查詢當前帳號在cn-hangzhou地區收到的資源共用邀請。返回結果顯示,共收到 1 個邀請,且處於等待確認狀態。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
resourcesharing:ListResourceShareInvitations |
list |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| MaxResults |
integer |
否 |
單次請求返回結果的最大條數。 取值範圍:1~100。預設值:20。 |
20 |
| NextToken |
string |
否 |
當請求的返回結果被截斷時,您可以使用 |
TGlzdFJlc291cm**** |
| ResourceShareIds |
array |
否 |
共用單元 ID。 |
|
|
string |
否 |
共用單元 ID。 |
rs-ysGRci9z**** |
|
| ResourceShareInvitationIds |
array |
否 |
資源共用邀請 ID。 |
|
|
string |
否 |
資源共用邀請 ID。 |
i-p6eRytrkjVvM**** |
關於公用請求參數的詳情,請參見公用參數。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| NextToken |
string |
當請求的返回結果被截斷時,您可以使用 |
TGlzdFJlc291cm**** |
| RequestId |
string |
請求 ID。 |
30EC8328-1BDE-51D5-BFAB-039508BD91A1 |
| ResourceShareInvitations |
array<object> |
資源共用邀請資訊。 |
|
|
object |
資源共用邀請資訊。 |
||
| Status |
string |
邀請狀態。取值:
|
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 |
| FailureDescription |
string |
接受或退出共用單元檢查失敗時的詳細原因描述。 |
You cannot access the specified resource at this time. |
| OperationType |
string |
操作類型。取值:
|
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長度超限。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。