Menampilkan resource yang Anda bagikan dengan akun lain atau resource yang dibagikan oleh akun lain kepada Anda.
Deskripsi operasi
Contoh ini menunjukkan cara menampilkan resource yang Anda bagikan di wilayah cn-hangzhou. Respons menunjukkan bahwa Anda hanya membagikan satu resource, yaitu VSwitch dengan ID vsw-bp1upw03qyz8n7us9**** dalam bagian sumber daya rs-6GRmdD3X****.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
resourcesharing:ListSharedResources |
list |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceOwner |
string |
Yes |
Pemilik bagian sumber daya. Nilai yang valid:
|
Self |
| ResourceType |
string |
No |
Jenis resource yang dibagikan. Untuk informasi selengkapnya mengenai jenis resource yang dapat dibagikan, lihat Services that work with Resource Sharing. |
VSwitch |
| Target |
string |
No |
ID pihak yang berwenang atau pemilik resource.
|
172050525300**** |
| MaxResults |
integer |
No |
Jumlah maksimum entri yang dikembalikan dalam satu permintaan. Nilai yang valid: 1 hingga 100. Nilai default: 20. |
20 |
| NextToken |
string |
No |
Token paginasi yang digunakan dalam permintaan berikutnya untuk mengambil halaman hasil baru. Jika respons terpotong, Anda dapat menggunakan token ini untuk menginisiasi permintaan lain dan mengambil entri yang tersisa. |
TGlzdFJlc291cm**** |
| ResourceShareIds |
array |
No |
ID bagian sumber daya. Nilai N berkisar dari 1 hingga 5. Anda dapat menentukan hingga 5 ID bagian sumber daya. |
rs-6GRmdD3X**** |
|
string |
No |
ID bagian sumber daya. |
rs-6GRmdD3X**** |
|
| ResourceIds |
array |
No |
ID resource yang dibagikan. Nilai N berkisar dari 1 hingga 5. Anda dapat menentukan hingga 5 ID resource yang dibagikan. |
vsw-bp1upw03qyz8n7us9**** |
|
string |
No |
ID resource yang dibagikan. |
vsw-bp1upw03qyz8n7us9**** |
|
| ResourceArns |
array |
No |
Daftar Nama Sumber Daya Alibaba Cloud (ARN) dari resource yang dibagikan. Nilai N berkisar dari 1 hingga 5. Anda dapat menentukan hingga 5 resource yang dibagikan. |
|
|
string |
No |
ARN dari resource yang dibagikan. Catatan Untuk informasi selengkapnya mengenai format ARN resource, lihat Services that work with Resource Sharing. |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter respons. |
||
| NextToken |
string |
Token paginasi yang digunakan dalam permintaan berikutnya untuk mengambil halaman hasil baru. Jika respons terpotong, Anda dapat menggunakan token ini untuk menginisiasi permintaan lain dan mengambil entri yang tersisa. |
TGlzdFJlc291cm**** |
| RequestId |
string |
ID permintaan. |
04677DCA-7C33-464B-8811-1B1DA3C3D197 |
| SharedResources |
array<object> |
Informasi mengenai resource yang dibagikan. |
|
|
object |
Informasi mengenai resource yang dibagikan. |
||
| UpdateTime |
string |
Waktu saat resource yang dibagikan diperbarui. |
2020-12-07T07:39:02.921Z |
| ResourceType |
string |
Jenis resource yang dibagikan. Untuk informasi selengkapnya mengenai jenis resource yang dapat dibagikan, lihat Services that work with Resource Sharing. |
VSwitch |
| CreateTime |
string |
Waktu saat resource dikaitkan dengan bagian sumber daya. |
2020-12-07T07:39:02.921Z |
| ResourceShareId |
string |
ID bagian sumber daya. |
rs-6GRmdD3X**** |
| ResourceArn |
string |
ARN dari resource yang dibagikan. |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
| ResourceStatus |
string |
Status resource yang dibagikan. Parameter ini hanya dikembalikan saat Anda menanyakan resource yang dibagikan kepada Anda. Parameter ini tidak dikembalikan saat Anda menanyakan resource yang Anda bagikan. Nilai yang valid:
|
Available |
| ResourceStatusMessage |
string |
Alasan kegagalan asosiasi. |
The reason for the association failure. |
| ResourceId |
string |
ID resource yang dibagikan. |
vsw-bp1upw03qyz8n7us9**** |
Contoh
Respons sukses
JSONformat
{
"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****"
}
]
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter.ResourceOwner | You must specify ResourceOwner. | You must specify ResourceOwner. |
| 400 | InvalidParameter.ResourceOwner | The ResourceOwner is invalid. | The ResourceOwner parameter is invalid. |
| 400 | InvalidParameter.ResourceType | The ResourceType is invalid. | The specified ResourceType parameter is invalid. |
| 400 | InvalidParameter.MaxResults | The MaxResults is invalid. | The MaxResults parameter is invalid. |
| 400 | InvalidParameter.NextToken | The NextToken is invalid. | The NextToken parameter is invalid. |
| 400 | InvalidParameter.NextToken.Length | The maximum length of NextToken exceeds 256 characters. | The length of NextToken cannot exceed 256 characters. |
| 400 | InvalidParameter.ResourceShareIds | The ResourceShareIds is invalid. | The ResourceShareIds parameter is invalid. |
| 400 | InvalidParameter.ResourceShareIds.Duplicate | The ResourceShareIds contains duplicate values. | The ResourceShareIds parameter contains duplicate values. |
| 400 | InvalidParameter.ResourceShareIds.Length | The maximum length of ResourceShareIds exceeds 5 characters. | The number of ResourceShareIds values cannot exceed 5. |
| 400 | InvalidParameter.ResourceIds | The ResourceIds is invalid. | The specified ResourceIds parameter is invalid. |
| 400 | InvalidParameter.ResourceIds.Duplicate | The specified ResourceId contains duplicate values. | The specified ResourceIds parameter contains duplicate values. |
| 400 | InvalidParameter.ResourceIds.Length | The maximum number of ResourceIds (5) is exceeded. | The number of specified ResourceIds values cannot exceed 5. |
| 400 | InvalidParameter.Target | The Target is invalid. | The Target parameter is invalid. |
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | InvalidParameter.ResourceArns | The ResourceArns is invalid. | The ResourceArns parameter is invalid. |
| 400 | InvalidParameter.ResourceArns.Duplicate | The ResourceArns contains duplicate values. | The ResourceArns contains duplicate values. |
| 400 | InvalidParameter.ResourceArns.Length | The ResourceArns beyond the length limit. | The maximum number of ResourceArns exceeds 5. |
| 400 | NotSupport.ResourceType.ResourcesParameter | The Resources parameter does not support this resource type. Please use ResourceArns instead. | 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. | Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.