共有ユニットに関連付けられているリソースまたはプリンシパルを一覧表示します。
操作説明
この例では、現在のアカウントによって `中国 (杭州)` リージョンに作成された共有ユニット内の共有リソースの関連付けレコードをクエリする方法を示します。レスポンスには、次の 2 つの共有リソースのレコードが表示されます。
VSwitch共有リソースvsw-bp1upw03qyz8n7us9****は、共有ユニットrs-6GRmdD3X****に関連付けられました。リソースはAssociated状態であり、アクティブに共有されていることを意味します。VSwitch共有リソースvsw-bp183p93qs667muql****は、共有ユニットrs-6GRmdD3X****から関連付けが解除されました。リソースはDisassociated状態であり、共有されなくなったことを意味します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
resourcesharing:ListResourceShareAssociations |
list |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ResourceId |
string |
任意 |
リソースの ID です。 説明
このパラメーターは、 |
vsw-bp183p93qs667muql**** |
| ResourceArn |
string |
任意 |
リソースの Alibaba Cloud リソースネーム (ARN) です。 説明
このパラメーターは、 |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
| Target |
string |
任意 |
プリンシパルの ID です。 説明
このパラメーターは、 |
172050525300**** |
| AssociationType |
string |
必須 |
関連付けのタイプ。有効な値:
|
Resource |
| AssociationStatus |
string |
任意 |
関連付けのステータス。有効な値:
説明
システムは、 |
Associated |
| MaxResults |
integer |
任意 |
1 ページあたりに返すエントリの最大数。 有効な値:1〜100。デフォルト値:20。 |
20 |
| NextToken |
string |
任意 |
次のページの結果を取得するためのトークンです。前のレスポンスが切り捨てられた場合は、この |
TGlzdFJlc291cm**** |
| ResourceShareIds |
array |
任意 |
共有ユニットの ID です。 最大 5 つの共有ユニット ID を指定できます。 |
rs-6GRmdD3X**** |
|
string |
任意 |
共有ユニット ID。 |
rs-6GRmdD3X**** |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
レスポンスパラメーター。 |
||
| NextToken |
string |
次のページの結果を取得するためのトークンです。 |
TGlzdFJlc291cm**** |
| RequestId |
string |
リクエストの ID です。 |
11BA57B5-7301-4E2F-BBA5-2AE4C2F4FCDB |
| ResourceShareAssociations |
array<object> |
関連付けのリストです。 |
|
|
array<object> |
関連付けの詳細。 |
||
| UpdateTime |
string |
関連付けが最後に更新された時刻。
|
2020-12-07T07:39:02.920Z |
| EntityId |
string |
関連付けられたエンティティの ID です。
|
vsw-bp1upw03qyz8n7us9**** |
| ResourceArn |
string |
関連付けられたリソースの Alibaba Cloud リソースネーム (ARN) です。 説明
|
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
| ResourceShareName |
string |
共有ユニットの名前です。 |
example |
| CreateTime |
string |
関連付けが作成された時刻。
|
2020-12-07T07:39:01.818Z |
| EntityType |
string |
関連付けられたエンティティのタイプ。
|
VSwitch |
| ResourceShareId |
string |
共有ユニットの ID です。 |
rs-6GRmdD3X**** |
| AssociationStatusMessage |
string |
関連付けが失敗した理由です。 |
The reason for the association failure. |
| AssociationType |
string |
関連付けのタイプ。有効な値:
|
Resource |
| AssociationStatus |
string |
関連付けのステータス。有効な値:
説明
システムは、 |
Failed |
| External |
boolean |
プリンシパルが、ご利用のリソースディレクトリのメンバーではない Alibaba Cloud アカウントであるかどうかを示します。有効な値:
|
false |
| AssociationFailedDetails |
array<object> |
失敗した関連付けまたは関連付け解除の詳細です。 |
|
|
object |
失敗した操作の詳細。 |
||
| Status |
string |
このパラメーターは非推奨です。代わりに |
无 |
| StatusMessage |
string |
このパラメーターは非推奨です。代わりに |
无 |
| AssociateType |
string |
このパラメーターは非推奨です。代わりに |
无 |
| ResourceArn |
string |
関連付けられたリソースの ARN。 説明
|
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
| EntityType |
string |
エンティティのタイプ。
|
Account |
| FailureReason |
string |
関連付けまたは関連付け解除が失敗した理由。有効な値:
|
Unavailable |
| FailureDescription |
string |
関連付けまたは関連付け解除の失敗に関する詳細な説明です。 |
You cannot access the specified resource at this time. |
| OperationType |
string |
失敗した操作のタイプ。有効な値:
|
Associate |
| EntityId |
string |
失敗した関連付けにおけるエンティティの ID です。
|
172050525300**** |
| TargetProperty |
string |
プリンシパルのプロパティ (リソース共有の期間など) です。
説明
プリンシパルが Alibaba Cloud サービスの場合にのみ返されます。 |
{ "timeRange":{ "timeRangeType":"timeRange", "beginAtTime":"00:00", "timezone":"UTC+8", "endAtTime":"19:59" } } |
| ResourceProperty |
string |
リソースの共有関連プロパティです。 |
{"sharePrincipals":true,"shareTagOptions":false} |
例
成功レスポンス
JSONJSON
{
"NextToken": "TGlzdFJlc291cm****",
"RequestId": "11BA57B5-7301-4E2F-BBA5-2AE4C2F4FCDB",
"ResourceShareAssociations": [
{
"UpdateTime": "2020-12-07T07:39:02.920Z",
"EntityId": "vsw-bp1upw03qyz8n7us9****",
"ResourceArn": "acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****",
"ResourceShareName": "example",
"CreateTime": "2020-12-07T07:39:01.818Z",
"EntityType": "VSwitch",
"ResourceShareId": "rs-6GRmdD3X****",
"AssociationStatusMessage": "The reason for the association failure. ",
"AssociationType": "Resource",
"AssociationStatus": "Failed",
"External": false,
"AssociationFailedDetails": [
{
"Status": "无",
"StatusMessage": "无",
"AssociateType": "无",
"ResourceArn": "acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****",
"EntityType": "Account",
"FailureReason": "Unavailable",
"FailureDescription": "You cannot access the specified resource at this time.",
"OperationType": "Associate",
"EntityId": "172050525300****"
}
],
"TargetProperty": "{\n \"timeRange\":{\n \"timeRangeType\":\"timeRange\",\n \"beginAtTime\":\"00:00\",\n \"timezone\":\"UTC+8\",\n \"endAtTime\":\"19:59\"\n }\n}",
"ResourceProperty": "{\"sharePrincipals\":true,\"shareTagOptions\":false}"
}
]
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | MissingParameter.AssociationType | You must specify AssociationType. | You must specify AssociationType. |
| 400 | InvalidParameter.AssociationType | The AssociationType is invalid. | The AssociationType is invalid. |
| 400 | InvalidParameter.AssociationStatus | The AssociationStatus is invalid. | The AssociationStatus is invalid. |
| 400 | InvalidParameter.MaxResults | The MaxResults is invalid. | The MaxResults is invalid. |
| 400 | InvalidParameter.NextToken | The NextToken is invalid. | The NextToken is invalid. |
| 400 | InvalidParameter.NextToken.Length | The maximum length of NextToken exceeds 256 characters. | The maximum length of NextToken exceeds 256 characters. |
| 400 | InvalidParameter.ResourceShareIds | The ResourceShareIds is invalid. | The ResourceShareIds is invalid. |
| 400 | InvalidParameter.ResourceShareIds.Duplicate | The ResourceShareIds contains duplicate values. | The ResourceShareIds contains duplicate values. |
| 400 | InvalidParameter.ResourceShareIds.Length | The maximum length of ResourceShareIds exceeds 5 characters. | The maximum length of ResourceShareIds exceeds 5 characters. |
| 400 | InvalidParameter.Target | The Target is invalid. | The Target is invalid. |
| 400 | InvalidParameter.ResourceId | The ResourceId is invalid. | The ResourceId is invalid. |
| 400 | ConflictedAssociationType | The specified ResourceId or Target conflicts with AssociationType. | The specified ResourceId or Target conflicts with AssociationType. |
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | InvalidParameter.ResourceArn | The ResourceArn is invalid. | |
| 400 | InvalidParameter.ResourceConflict | Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。