プリンシパルは AcceptResourceShareInvitation 操作を呼び出して、共有招待を承諾します。
操作説明
使用上の注意
共有招待の承諾または拒否が必要なのは、リソースがリソースディレクトリの外部から共有されている場合のみです。リソースがリソースディレクトリ内で共有されている場合、システムはデフォルトで共有招待を承諾するため、プリンシパルは何も操作を行う必要はありません。
共有招待は 7 日間有効です。プリンシパルはこの期間内に招待を承諾する必要があります。
このトピックでは、cn-hangzhou リージョンで ID が i-pMnItMX19fBJ**** の共有招待を承諾する方法の例を示します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
resourcesharing:AcceptResourceShareInvitation |
update |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ResourceShareInvitationId |
string |
必須 |
共有招待の ID。 ListResourceShareInvitations 操作を呼び出して、共有招待の ID を取得します。 |
i-pMnItMX19fBJ**** |
共通リクエストパラメーターの詳細については、「共通パラメーター」をご参照ください。
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
レスポンスパラメーター。 |
||
| RequestId |
string |
リクエスト ID。 |
08F18B04-47CB-5C0E-A6D2-37DEF5C2A961 |
| ResourceShareInvitation |
object |
共有招待に関する情報。 |
|
| ResourceShareInvitationId |
string |
共有招待の ID。 |
i-pMnItMX19fBJ**** |
| ResourceShareId |
string |
共有ユニットの ID。 |
rs-ysGRci9z**** |
| ResourceShareName |
string |
共有ユニットの名前。 |
example |
| SenderAccountId |
string |
招待を送信した Alibaba Cloud アカウントの ID。 |
151266687691**** |
| ReceiverAccountId |
string |
招待を受信した Alibaba Cloud アカウントの ID。 |
134254031178**** |
| CreateTime |
string |
招待が作成された時刻。時刻は UTC で表示されます。 |
2022-09-02T06:43:12.353Z |
| Status |
string |
招待のステータス。有効な値:
|
AcceptFailed |
| AcceptInvitationFailedDetails |
array<object> |
共有ユニットへの招待の承諾に失敗した詳細。 |
|
|
object |
共有ユニットへの招待の承諾に失敗した詳細。 |
||
| Status |
string |
このパラメーターは非推奨です。代わりに FailureReason を使用してください。 |
None |
| StatusMessage |
string |
このパラメーターは非推奨です。代わりに FailureDescription を使用してください。 |
None |
| AssociateType |
string |
このパラメーターは非推奨です。代わりに OperationType を使用してください。 |
None |
| ResourceArn |
string |
共有リソースの Alibaba Cloud リソースネーム (ARN)。 |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
| ResourceType |
string |
共有リソースのリソースタイプ。 詳細については、「リソース共有をサポートする Alibaba Cloud サービス」をご参照ください。 |
Snapshot |
| FailureReason |
string |
共有ユニットへの招待の承諾チェックが失敗した理由。有効な値:
|
Unavailable |
| FailureDescription |
string |
共有ユニットへの招待の承諾に失敗したことの説明。 |
You cannot access the specified resource at this time. |
| OperationType |
string |
操作のタイプ。有効な値:
|
Associate |
| ResourceId |
string |
共有リソースの ID。 |
s-7xvh46nx5oqlre0wv*** |
例
成功レスポンス
JSONJSON
{
"RequestId": "08F18B04-47CB-5C0E-A6D2-37DEF5C2A961",
"ResourceShareInvitation": {
"ResourceShareInvitationId": "i-pMnItMX19fBJ****",
"ResourceShareId": "rs-ysGRci9z****",
"ResourceShareName": "example",
"SenderAccountId": "151266687691****",
"ReceiverAccountId": "134254031178****",
"CreateTime": "2022-09-02T06:43:12.353Z",
"Status": "AcceptFailed",
"AcceptInvitationFailedDetails": [
{
"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 ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidParameter.ResourceShareInvitationId | The ResourceShareInvitationId is invalid. | |
| 400 | MissingParameter.ResourceShareInvitationId | You must specify ResourceShareInvitationId. | |
| 409 | InvitationStatus.Expired | The resource share invitation status is expired. | |
| 409 | EntityNotExists.ResourceShareInvitation | The resource share invitation does not exist in the current account. | |
| 409 | InvitationStatus.AlreadyRejected | The resource share invitation status is rejected. | |
| 409 | InvitationStatus.AlreadyAccepted | The resource share invitation status is alredy accepted. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。