Menampilkan daftar principal.
Deskripsi operasi
Jika Anda adalah Pemilik resource, Anda dapat menampilkan principal yang menjadi penerima resource yang Anda bagikan. Jika Anda adalah principal, Anda dapat menampilkan resource share yang Anda ikuti.
Topik ini memberikan contoh cara menampilkan daftar principal untuk resource share yang Anda buat di wilayah cn-hangzhou. Respons menunjukkan bahwa Anda membagikan resource kepada principal 114240524784**** dan 172050525300****.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
resourcesharing:ListSharedTargets |
list |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceOwner |
string |
Yes |
Pemilik resource share.
|
Self |
| ResourceType |
string |
No |
Tipe resource yang dibagikan. Untuk informasi selengkapnya mengenai tipe resource yang dapat dibagikan, lihat Layanan yang kompatibel dengan Resource Sharing. |
VSwitch |
| ResourceId |
string |
No |
ID resource yang dibagikan. |
vsw-bp1upw03qyz8n7us9**** |
| ResourceArn |
string |
No |
Alibaba Cloud Resource Name (ARN) dari resource yang dibagikan. |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
| MaxResults |
integer |
No |
Jumlah maksimum entri yang dikembalikan dalam satu permintaan. Nilai 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 mengirim permintaan lain dan mengambil entri yang tersisa. |
TGlzdFJlc291cm**** |
| ResourceShareIds |
array |
No |
ID resource share. Nilai N berkisar dari 1 hingga 5. Anda dapat menentukan hingga 5 ID resource share. |
rs-6GRmdD3X**** |
|
string |
No |
ID resource share. Nilai N berkisar dari 1 hingga 5. Anda dapat menentukan hingga 5 ID resource share. |
rs-6GRmdD3X**** |
|
| Targets |
array |
No |
Pihak yang berwenang. |
114240524784**** |
|
string |
No |
Principal. Nilai valid:
Untuk informasi selengkapnya, lihat Metode berbagi sumber daya, Melihat ID direktori sumber daya, Melihat ID folder, atau Melihat ID anggota. Nilai N berkisar dari 1 hingga 5. Anda dapat menambahkan hingga 5 principal sekaligus. |
114240524784**** |
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 mengirim permintaan lain dan mengambil entri yang tersisa. |
TGlzdFJlc291cm**** |
| RequestId |
string |
ID permintaan. |
04677DCA-7C33-464B-8811-1B1DA3C3D197 |
| SharedTargets |
array<object> |
Informasi mengenai principal. |
|
|
object |
Informasi mengenai principal. |
||
| TargetId |
string |
ID principal atau Pemilik resource. Nilai valid:
|
114240524784**** |
| UpdateTime |
string |
Waktu saat asosiasi dengan principal diperbarui. |
2020-12-07T09:16:59.905Z |
| CreateTime |
string |
Waktu saat principal diasosiasikan dengan resource share. |
2020-12-07T09:16:59.905Z |
| ResourceShareId |
string |
ID resource share. |
rs-6GRmdD3X**** |
| External |
boolean |
Menunjukkan apakah principal merupakan akun di luar direktori sumber daya. Nilai valid:
|
false |
| TargetProperty |
string |
Properti principal. Misalnya, periode berbagi resource. Catatan Parameter ini hanya dikembalikan ketika principal adalah layanan Alibaba Cloud. |
{ "timeRange":{ "timeRangeType":"timeRange", "beginAtTime":"00:00", "timezone":"UTC+8", "endAtTime":"19:59" } } |
Contoh
Respons sukses
JSONformat
{
"NextToken": "TGlzdFJlc291cm****",
"RequestId": "04677DCA-7C33-464B-8811-1B1DA3C3D197",
"SharedTargets": [
{
"TargetId": "114240524784****",
"UpdateTime": "2020-12-07T09:16:59.905Z",
"CreateTime": "2020-12-07T09:16:59.905Z",
"ResourceShareId": "rs-6GRmdD3X****",
"External": false,
"TargetProperty": "{\n \"timeRange\":{\n \"timeRangeType\":\"timeRange\",\n \"beginAtTime\":\"00:00\",\n \"timezone\":\"UTC+8\",\n \"endAtTime\":\"19:59\"\n }\n}"
}
]
}
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.Targets | The Targets is invalid. | The specified Targets parameter is invalid. |
| 400 | InvalidParameter.Targets.Duplicate | The Targets contains duplicate values. | The specified Targets parameter contains duplicate values. |
| 400 | InvalidParameter.Targets.Length | The maximum number of Targets exceeds 5. | The number of Targets values cannot exceed 5. |
| 400 | InvalidParameter.ResourceId | The ResourceId is invalid. | The ResourceId parameter is invalid. |
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | InvalidParameter.ResourceArn | The ResourceArn is invalid. | The ResourceArn is invalid. |
| 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.