共有ユニットに関連付けられているリソースまたはプリンシパルのレコードをクエリします。
操作説明
このトピックでは、中国 (杭州) リージョンで現在のアカウントによって作成された共有ユニットに関連付けられている共有リソースのレコードをクエリする方法の例を示します。応答は、現在のアカウントが次の 2 つのリソースに関連付けられていることを示しています。
共有ユニット
rs-6GRmdD3X****では、ID がvsw-bp1upw03qyz8n7us9****のVSwitchタイプの共有リソースが追加されました。リソースはAssociated状態です。これはリソースが共有されていることを意味します。共有ユニット
rs-6GRmdD3X****では、ID がvsw-bp183p93qs667muql****のVSwitchタイプの共有リソースが削除されました。リソースは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> |
共有リソースまたはプリンシパルに関する情報。 |
|
|
object |
共有リソースまたはプリンシパルに関する情報。 |
||
| UpdateTime |
string |
関連付けが更新された時間。次の 2 つのケースがあります。
|
2020-12-07T07:39:02.920Z |
| EntityId |
string |
関連付けられたエンティティの ID。有効な値:
|
vsw-bp1upw03qyz8n7us9**** |
| ResourceArn |
string |
関連付けられたリソースの ARN。 説明
このパラメーターは、 |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
| ResourceShareName |
string |
共有ユニットの名前。 |
example |
| CreateTime |
string |
関連付けが作成された時間。次の 2 つのケースがあります。
|
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 |
プリンシパルがリソースディレクトリの外部にあるかどうかを示します。有効な値:
|
false |
| TargetProperty |
string |
プリンシパルのプロパティ。たとえば、リソース共有の期間などです。
説明
このパラメーターは、プリンシパルが Alibaba Cloud サービスである場合にのみ返されます。 |
{ "timeRange":{ "timeRangeType":"timeRange", "beginAtTime":"00:00", "timezone":"UTC+8", "endAtTime":"19:59" } } |
| AssociationFailedDetails |
array<object> |
リソースまたはプリンシパルの関連付けまたは関連付け解除の失敗に関する詳細。 |
|
|
object |
リソースまたはプリンシパルの関連付けまたは関連付け解除の失敗に関する詳細。 |
||
| Status |
string |
このパラメーターは非推奨です。代わりに FailureReason を使用してください。 |
无 |
| StatusMessage |
string |
このパラメーターは非推奨です。代わりに FailureDescription を使用してください。 |
无 |
| AssociateType |
string |
このパラメーターは非推奨です。代わりに OperationType を使用してください。 |
无 |
| 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**** |
例
成功レスポンス
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,
"TargetProperty": "{\n \"timeRange\":{\n \"timeRangeType\":\"timeRange\",\n \"beginAtTime\":\"00:00\",\n \"timezone\":\"UTC+8\",\n \"endAtTime\":\"19:59\"\n }\n}",
"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****"
}
]
}
]
}
エラーコード
|
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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。