自分が共有したリソース、または自分と共有されているリソースをクエリします。
操作説明
この例では、cn-hangzhou リージョンで共有したリソースをクエリする方法を示します。レスポンスは、共有ユニット rs-6GRmdD3X**** 内で ID が vsw-bp1upw03qyz8n7us9**** の VSwitch であるリソースを 1 つだけ共有したことを示しています。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
resourcesharing:ListSharedResources |
list |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ResourceOwner |
string |
必須 |
共有ユニットの所有者。有効な値:
|
Self |
| ResourceType |
string |
任意 |
共有リソースのリソースタイプ。 共有可能なリソースタイプの詳細については、「リソース共有をサポートする Alibaba Cloud サービス」をご参照ください。 |
VSwitch |
| Target |
string |
任意 |
プリンシパルまたはリソース所有者の ID。
|
172050525300**** |
| MaxResults |
integer |
任意 |
1 回のリクエストで返すエントリの最大数。 有効な値: 1~100。デフォルト値: 20。 |
20 |
| NextToken |
string |
任意 |
次のリクエストで結果の新しいページを取得するために使用されるページネーショントークン。応答が切り捨てられた場合、このトークンを使用して別のリクエストを開始し、残りのエントリを取得できます。 |
TGlzdFJlc291cm**** |
| ResourceShareIds |
array |
任意 |
共有ユニットの ID。 N の値の範囲は 1~5 です。最大 5 つの共有ユニット ID を指定できます。 |
rs-6GRmdD3X**** |
|
string |
任意 |
共有ユニットの ID。 |
rs-6GRmdD3X**** |
|
| ResourceIds |
array |
任意 |
共有リソースの ID。 N の値の範囲は 1~5 です。最大 5 つの共有リソース ID を指定できます。 |
vsw-bp1upw03qyz8n7us9**** |
|
string |
任意 |
共有リソースの ID。 |
vsw-bp1upw03qyz8n7us9**** |
|
| ResourceArns |
array |
任意 |
共有リソースの Alibaba Cloud リソースネーム (ARN) のリスト。 N の値の範囲は 1~5 です。最大 5 つの共有リソースを指定できます。 |
|
|
string |
任意 |
共有リソースの ARN。 説明
リソース ARN のフォーマットの詳細については、「リソース共有をサポートする Alibaba Cloud サービス」をご参照ください。 |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
レスポンスパラメーター。 |
||
| NextToken |
string |
ページネーショントークン。応答が切り捨てられた場合、このトークンが返されます。このトークンを後続のリクエストで使用して、結果の次のページを取得できます。 |
TGlzdFJlc291cm**** |
| RequestId |
string |
リクエスト ID。 |
04677DCA-7C33-464B-8811-1B1DA3C3D197 |
| SharedResources |
array<object> |
共有リソースに関する情報。 |
|
|
object |
共有リソースに関する情報。 |
||
| UpdateTime |
string |
共有リソースが更新された時間。 |
2020-12-07T07:39:02.921Z |
| ResourceType |
string |
共有リソースのリソースタイプ。 共有可能なリソースタイプの詳細については、「リソース共有をサポートする Alibaba Cloud サービス」をご参照ください。 |
VSwitch |
| CreateTime |
string |
リソースが共有ユニットに関連付けられた時間。 |
2020-12-07T07:39:02.921Z |
| ResourceShareId |
string |
共有ユニットの ID。 |
rs-6GRmdD3X**** |
| ResourceArn |
string |
共有リソースの Alibaba Cloud リソースネーム (ARN)。 |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
| ResourceStatus |
string |
共有リソースのステータス。このパラメーターは、自分と共有されているリソースをクエリする場合にのみ返されます。自分が共有するリソースをクエリする場合には返されません。 有効な値:
|
Available |
| ResourceStatusMessage |
string |
関連付けが失敗した理由。 |
The reason for the association failure. |
| ResourceId |
string |
共有リソースの ID。 |
vsw-bp1upw03qyz8n7us9**** |
例
成功レスポンス
JSONJSON
{
"NextToken": "TGlzdFJlc291cm****",
"RequestId": "04677DCA-7C33-464B-8811-1B1DA3C3D197",
"SharedResources": [
{
"UpdateTime": "2020-12-07T07:39:02.921Z",
"ResourceType": "VSwitch",
"CreateTime": "2020-12-07T07:39:02.921Z",
"ResourceShareId": "rs-6GRmdD3X****",
"ResourceArn": "acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****",
"ResourceStatus": "Available",
"ResourceStatusMessage": "The reason for the association failure. ",
"ResourceId": "vsw-bp1upw03qyz8n7us9****"
}
]
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | MissingParameter.ResourceOwner | You must specify ResourceOwner. | You must specify ResourceOwner. |
| 400 | InvalidParameter.ResourceOwner | The ResourceOwner is invalid. | The ResourceOwner is invalid. |
| 400 | InvalidParameter.ResourceType | The ResourceType is invalid. | The ResourceType 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.ResourceIds | The ResourceIds is invalid. | The specified ResourceIds is invalid. |
| 400 | InvalidParameter.ResourceIds.Duplicate | The specified ResourceId contains duplicate values. | The specified ResourceId contains duplicate values. |
| 400 | InvalidParameter.ResourceIds.Length | The maximum number of ResourceIds (5) is exceeded. | The maximum number of ResourceIds exceeds 5. |
| 400 | InvalidParameter.Target | The Target is invalid. | The Target is invalid. |
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | InvalidParameter.ResourceArns | The ResourceArns is invalid. | |
| 400 | InvalidParameter.ResourceArns.Duplicate | The ResourceArns contains duplicate values. | |
| 400 | InvalidParameter.ResourceArns.Length | The ResourceArns beyond the length limit. | |
| 400 | NotSupport.ResourceType.ResourcesParameter | The Resources parameter does not support this resource type. Please use ResourceArns instead. | |
| 400 | InvalidParameter.ResourceConflict | Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。