Memutuskan asosiasi resource yang dibagikan atau principal dari sebuah resource share.
Deskripsi operasi
Pemilik resource dapat memanggil operasi ini untuk memutuskan asosiasi resource yang dibagikan atau principal.
Jika sebuah resource dibagikan dengan principal yang tidak berada dalam resource directory Anda, principal tersebut dapat memanggil operasi ini untuk keluar dari resource share. Untuk informasi selengkapnya, lihat Exit a resource share.
Topik ini memberikan contoh penggunaan akun manajemen dari ResourceDirectory untuk memutuskan asosiasi principal 172050525300**** dari resource share rs-6GRmdD3X**** di wilayah cn-hangzhou, sehingga menghentikan pembagian resource dengan principal tersebut.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
resourcesharing:DisassociateResourceShare |
update |
*全部资源
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceShareId |
string |
Yes |
ID dari resource share. |
rs-6GRmdD3X**** |
| Resources |
array<object> |
No |
Daftar resource. |
|
|
object |
No |
Daftar resource. |
||
| ResourceType |
string |
No |
Tipe dari resource yang dibagikan. N adalah bilangan bulat dari 1 hingga 5. Anda dapat memutuskan asosiasi hingga 5 resource yang dibagikan sekaligus. Untuk informasi lebih lanjut tentang tipe resource yang dapat dibagikan, lihat Services that work with Resource Sharing. Catatan
Parameter Resources.N.ResourceId dan Resources.N.ResourceType harus ditentukan secara berpasangan. |
VSwitch |
| ResourceId |
string |
No |
ID dari resource yang dibagikan. N adalah bilangan bulat dari 1 hingga 5. Anda dapat memutuskan asosiasi hingga 5 resource yang dibagikan sekaligus. Catatan
Parameter Resources.N.ResourceId dan Resources.N.ResourceType harus ditentukan secara berpasangan. |
vsw-bp183p93qs667muql**** |
| Targets |
array |
No |
Pihak yang berwenang. |
172050525300**** |
|
string |
No |
Principal. N adalah bilangan bulat dari 1 hingga 5. Anda dapat memutuskan asosiasi hingga 5 principal sekaligus. |
172050525300**** |
|
| ResourceArns |
array |
No |
Daftar Nama Sumber Daya Alibaba Cloud (ARN) dari resource yang dibagikan. N adalah bilangan bulat dari 1 hingga 5. Anda dapat memutuskan asosiasi hingga 5 resource yang dibagikan sekaligus. |
|
|
string |
No |
ARN dari resource yang dibagikan. Catatan
Untuk informasi lebih lanjut tentang format ARN, lihat Services that work with Resource Sharing. |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
|
| ResourceOwner |
string |
No |
Pemilik dari resource share. Nilai yang valid:
|
Self |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter respons. |
||
| RequestId |
string |
ID permintaan. |
95230BC9-A8E8-4493-96BD-4F0C758E37F8 |
| ResourceShareAssociations |
array<object> |
Informasi tentang asosiasi. |
|
|
object |
Informasi tentang asosiasi. |
||
| UpdateTime |
string |
Waktu terakhir asosiasi diperbarui. Waktu ini bervariasi berdasarkan nilai AssociationType:
|
2020-12-04T09:40:45.556Z |
| ResourceArn |
string |
ARN dari resource yang diasosiasikan. Catatan
Parameter ini tidak dikembalikan jika |
acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di**** |
| ResourceShareName |
string |
Nama dari resource share. |
test |
| CreateTime |
string |
Waktu ketika pemutusan asosiasi dibuat. Waktu ini bervariasi berdasarkan nilai AssociationType:
|
2020-12-04T09:40:41.250Z |
| EntityType |
string |
Tipe entitas yang diasosiasikan. Nilai yang valid:
|
Account |
| ResourceShareId |
string |
ID dari resource share. |
rs-6GRmdD3X**** |
| AssociationStatusMessage |
string |
Alasan mengapa pemutusan asosiasi gagal. |
The Resources is invalid. |
| AssociationType |
string |
Tipe asosiasi. Nilai yang valid:
|
Target |
| AssociationStatus |
string |
Status asosiasi. Nilai yang valid:
Catatan
Sistem secara otomatis menghapus catatan yang berstatus |
Disassociating |
| TargetProperty |
string |
Properti dari principal, seperti periode pembagian resource. Catatan
Parameter ini hanya dikembalikan ketika principal adalah layanan Alibaba Cloud. |
{ "timeRange":{ "timeRangeType":"timeRange", "beginAtTime":"00:00", "timezone":"UTC+8", "endAtTime":"19:59" } } |
| EntityId |
string |
ID dari entitas yang diasosiasikan. Nilai yang valid:
|
172050525300**** |
| ResourceProperty |
string |
{"sharePrincipals":true,"shareTagOptions":false} |
Contoh
Respons sukses
JSONformat
{
"RequestId": "95230BC9-A8E8-4493-96BD-4F0C758E37F8",
"ResourceShareAssociations": [
{
"UpdateTime": "2020-12-04T09:40:45.556Z",
"ResourceArn": "acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****",
"ResourceShareName": "test",
"CreateTime": "2020-12-04T09:40:41.250Z",
"EntityType": "Account",
"ResourceShareId": "rs-6GRmdD3X****",
"AssociationStatusMessage": "The Resources is invalid.",
"AssociationType": "Target",
"AssociationStatus": "Disassociating",
"TargetProperty": "{\n \"timeRange\":{\n \"timeRangeType\":\"timeRange\",\n \"beginAtTime\":\"00:00\",\n \"timezone\":\"UTC+8\",\n \"endAtTime\":\"19:59\"\n }\n}",
"EntityId": "172050525300****",
"ResourceProperty": "{\"sharePrincipals\":true,\"shareTagOptions\":false}"
}
]
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter.ResourceShareId | You must specify ResourceShareId. | |
| 400 | InvalidParameter.ResourceShareId | The ResourceShareId is invalid. | |
| 400 | InvalidParameter.Resources | The Resources is invalid. | |
| 400 | InvalidParameter.Resources.Duplicate | The Resources contains duplicate values. | |
| 400 | InvalidParameter.Resources.Length | The maximum number of Resources exceeds 5. | |
| 400 | InvalidParameter.Targets | The Targets is invalid. | |
| 400 | InvalidParameter.Targets.Duplicate | The Targets contains duplicate values. | |
| 400 | InvalidParameter.Targets.Length | The maximum number of Targets exceeds 5. | |
| 400 | ResourceAndTargetBothEmpty | Either a resource or a shared target must be specified. | |
| 400 | DisassociateInvalid | You can not disassociate unassociated resource or target. | |
| 400 | InvalidParameter | The specified parameter is invalid. | |
| 400 | InvalidParameter.ResourceType | The ResourceType 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 | InvalidParameter.ResourceConflict | Both Resources and ResourceArns cannot be specified simultaneously. Please provide only one of these parameters. | |
| 400 | NotSupport.ResourceType.ResourcesParameter | The Resources parameter does not support this resource type. Please use ResourceArns instead. | |
| 404 | EntityNotExists.ResourceShare | The resource share does not exist in the current account. | |
| 409 | AccountNotInResourceDirectory | The account is not a master or a member of a resource directory. | |
| 409 | ResourceShareStatusMismatchAction | The status of the resource share does not allow the specified operation. | |
| 409 | DisassociateConflict | You cannot perform the operation while association is already in progress. | |
| 409 | LeavingFailed.Account | The account was added to the resource share automatically by resoucre directory. | |
| 409 | LeavingFailed.ResourceType | The resource share contains resources of the resource types that dont support this action. | |
| 409 | ExternalTargetWithdrawConflict | Existing internal association task in resource directory when disassociating with resource share. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.