diff options
| author | Zhineng Li <im@zhineng.li> | 2026-07-12 17:11:17 +0800 |
|---|---|---|
| committer | Zhineng Li <im@zhineng.li> | 2026-07-12 17:11:17 +0800 |
| commit | 1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 (patch) | |
| tree | 5f0857666365b7e40cdaa3733ebe1f3ba9e13c67 /data/zh_cn/resourcesharing | |
| parent | 7347bac4ab7e136157fc94777e6cf87ef9e08599 (diff) | |
| download | afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.tar.gz afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.zip | |
update APIs 20260712
Diffstat (limited to 'data/zh_cn/resourcesharing')
| -rw-r--r-- | data/zh_cn/resourcesharing/2020-01-10/api-docs.php | 6885 |
1 files changed, 2593 insertions, 4292 deletions
diff --git a/data/zh_cn/resourcesharing/2020-01-10/api-docs.php b/data/zh_cn/resourcesharing/2020-01-10/api-docs.php index c7b7738..97b4257 100644 --- a/data/zh_cn/resourcesharing/2020-01-10/api-docs.php +++ b/data/zh_cn/resourcesharing/2020-01-10/api-docs.php @@ -1,71 +1,34 @@ <?php return [ 'version' => '1.0', - 'info' => [ - 'style' => 'RPC', - 'product' => 'ResourceSharing', - 'version' => '2020-01-10', - ], + 'info' => ['style' => 'RPC', 'product' => 'ResourceSharing', 'version' => '2020-01-10'], 'directories' => [ [ - 'id' => 165993, - 'title' => '共享单元', + 'children' => ['EnableSharingWithResourceDirectory', 'CreateResourceShare', 'ListResourceShares', 'UpdateResourceShare', 'DeleteResourceShare', 'AssociateResourceShare', 'DisassociateResourceShare', 'ListResourceShareAssociations', 'ListSharedResources', 'ListSharedTargets', 'DescribeRegions', 'CheckSharingWithResourceDirectoryStatus', 'ChangeResourceGroup', 'TagResources', 'ListTagResources', 'UntagResources'], 'type' => 'directory', - 'children' => [ - 'EnableSharingWithResourceDirectory', - 'CreateResourceShare', - 'ListResourceShares', - 'UpdateResourceShare', - 'DeleteResourceShare', - 'AssociateResourceShare', - 'DisassociateResourceShare', - 'ListResourceShareAssociations', - 'ListSharedResources', - 'ListSharedTargets', - 'DescribeRegions', - 'CheckSharingWithResourceDirectoryStatus', - 'ChangeResourceGroup', - 'TagResources', - 'ListTagResources', - 'UntagResources', - ], + 'title' => '共享单元', + 'id' => 49771, ], [ - 'id' => 165991, - 'title' => '共享邀请', + 'children' => ['ListResourceShareInvitations', 'AcceptResourceShareInvitation', 'RejectResourceShareInvitation'], 'type' => 'directory', - 'children' => [ - 'ListResourceShareInvitations', - 'AcceptResourceShareInvitation', - 'RejectResourceShareInvitation', - ], + 'title' => '共享邀请', + 'id' => 49767, ], [ - 'id' => 166002, - 'title' => '共享权限', + 'children' => ['AssociateResourceSharePermission', 'DisassociateResourceSharePermission', 'ListResourceSharePermissions', 'GetPermission', 'ListPermissionVersions', 'ListPermissions'], 'type' => 'directory', - 'children' => [ - 'AssociateResourceSharePermission', - 'DisassociateResourceSharePermission', - 'ListResourceSharePermissions', - 'GetPermission', - 'ListPermissionVersions', - 'ListPermissions', - ], + 'title' => '共享权限', + 'id' => 49788, ], ], 'components' => [ 'schemas' => [], ], 'apis' => [ - 'EnableSharingWithResourceDirectory' => [ - 'summary' => '启用资源目录组织共享。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'AcceptResourceShareInvitation' => [ + 'summary' => '资源使用者调用AcceptResourceShareInvitation接受资源共享邀请。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -73,53 +36,119 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'ResourceShareInvitationId', + 'in' => 'query', + 'schema' => ['description' => '资源共享邀请ID。'."\n" + ."\n" + .'您可以调用[ListResourceShareInvitations](~~450564~~)获取资源共享邀请ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'i-pMnItMX19fBJ****'], + ], ], - 'parameters' => [], 'responses' => [ 200 => [ 'schema' => [ 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA', + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '08F18B04-47CB-5C0E-A6D2-37DEF5C2A961'], + 'ResourceShareInvitation' => [ + 'description' => '资源共享邀请信息。', + 'type' => 'object', + 'properties' => [ + 'ResourceShareInvitationId' => ['description' => '资源共享邀请ID。', 'type' => 'string', 'required' => true, 'example' => 'i-pMnItMX19fBJ****'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'example' => 'rs-ysGRci9z****'], + 'ResourceShareName' => ['description' => '共享单元名称。', 'type' => 'string', 'required' => true, 'example' => 'example'], + 'SenderAccountId' => ['description' => '邀请者的阿里云账号ID。', 'type' => 'string', 'required' => true, 'example' => '151266687691****'], + 'ReceiverAccountId' => ['description' => '被邀请者的阿里云账号ID。', 'type' => 'string', 'required' => true, 'example' => '134254031178****'], + 'CreateTime' => ['description' => '邀请创建时间(UTC时间)。', 'type' => 'string', 'required' => true, 'example' => '2022-09-02T06:43:12.353Z'], + 'Status' => ['description' => '邀请状态。取值:'."\n" + ."\n" + .'- Pending:等待确认。'."\n" + .'- Accepted:接受邀请成功。'."\n" + .'- Cancelled:已取消。'."\n" + .'- Rejected:已拒绝。'."\n" + .'- Expired:已过期。'."\n" + .'- AcceptFailed:接受邀请失败。', 'type' => 'string', 'required' => true, 'example' => 'AcceptFailed'], + 'AcceptInvitationFailedDetails' => [ + 'description' => '接受共享单元邀请检查失败详细原因。', + 'type' => 'array', + 'items' => [ + 'description' => '接受共享单元邀请检查失败详细原因。', + 'type' => 'object', + 'properties' => [ + 'Status' => ['description' => '已弃用。请使用FailureReason。', 'type' => 'string', 'example' => 'None'], + 'StatusMessage' => ['description' => '已弃用。请使用FailureDescription。', 'type' => 'string', 'example' => 'None'], + 'AssociateType' => ['description' => '已弃用。请使用OperationType。', 'type' => 'string', 'example' => 'None'], + 'ResourceArn' => ['description' => '共享资源ARN。', 'type' => 'string', 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'example' => 'Snapshot'], + 'FailureReason' => ['description' => '接受共享单元邀请检查失败时的原因。取值:'."\n" + ."\n" + .'- Unavailable:资源不可以共享。'."\n" + .'- LimitExceeded:资源可共享账号配额超限。'."\n" + .'- ZonalResourceInaccessible: 资源在此地域不可用。'."\n" + .'- InternalError:检查过程服务器内部出现错误。', 'type' => 'string', 'example' => 'Unavailable'], + 'FailureDescription' => ['description' => '接受共享单元邀请检查失败时的详细原因描述。', 'type' => 'string', 'example' => 'You cannot access the specified resource at this time.'], + 'OperationType' => ['description' => '操作类型。取值:'."\n" + .'- Associate:关联。', 'type' => 'string', 'example' => 'Associate'], + 'ResourceId' => ['description' => '共享资源ID。', 'type' => 'string', 'example' => 's-7xvh46nx5oqlre0wv***'], + ], + ], + ], + ], ], ], ], ], ], 'errorCodes' => [ + 400 => [ + ['errorCode' => 'InvalidParameter.ResourceShareInvitationId', 'errorMessage' => 'The ResourceShareInvitationId is invalid.', 'description' => '资源共享邀请ID无效。'], + ['errorCode' => 'MissingParameter.ResourceShareInvitationId', 'errorMessage' => 'You must specify ResourceShareInvitationId.', 'description' => '需指定共享单元邀请ID。'], + ], 409 => [ - [ - 'errorCode' => 'ActionNotPermitted', - 'errorMessage' => 'The caller must be the master account for the Resource Directory.', - ], - [ - 'errorCode' => 'AlreadyEnabled', - 'errorMessage' => 'You have already enabled sharing with the Resource Directory.', - ], + ['errorCode' => 'InvitationStatus.Expired', 'errorMessage' => 'The resource share invitation status is expired.', 'description' => '该邀请已过期。'], + ['errorCode' => 'EntityNotExists.ResourceShareInvitation', 'errorMessage' => 'The resource share invitation does not exist in the current account.', 'description' => '该邀请已不存在。'], + ['errorCode' => 'InvitationStatus.AlreadyRejected', 'errorMessage' => 'The resource share invitation status is rejected.', 'description' => '该邀请已被拒绝。'], + ['errorCode' => 'InvitationStatus.AlreadyAccepted', 'errorMessage' => 'The resource share invitation status is alredy accepted.', 'description' => '该邀请已被接受。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA\\"\\n}","errorExample":""},{"type":"xml","example":"<EnableSharingWithResourceDirectoryResponse>\\n <RequestId>2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA</RequestId>\\n</EnableSharingWithResourceDirectoryResponse>","errorExample":""}]', - 'title' => '启用资源目录组织共享', - 'description' => '启用资源目录组织共享功能后,资源所有者才能将资源共享给整个资源目录、资源夹或成员。'."\n" + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"08F18B04-47CB-5C0E-A6D2-37DEF5C2A961\\",\\n \\"ResourceShareInvitation\\": {\\n \\"ResourceShareInvitationId\\": \\"i-pMnItMX19fBJ****\\",\\n \\"ResourceShareId\\": \\"rs-ysGRci9z****\\",\\n \\"ResourceShareName\\": \\"example\\",\\n \\"SenderAccountId\\": \\"151266687691****\\",\\n \\"ReceiverAccountId\\": \\"134254031178****\\",\\n \\"CreateTime\\": \\"2022-09-02T06:43:12.353Z\\",\\n \\"Status\\": \\"AcceptFailed\\",\\n \\"AcceptInvitationFailedDetails\\": [\\n {\\n \\"Status\\": \\"None\\",\\n \\"StatusMessage\\": \\"None\\",\\n \\"AssociateType\\": \\"None\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceType\\": \\"Snapshot\\",\\n \\"FailureReason\\": \\"Unavailable\\",\\n \\"FailureDescription\\": \\"You cannot access the specified resource at this time.\\",\\n \\"OperationType\\": \\"Associate\\",\\n \\"ResourceId\\": \\"s-7xvh46nx5oqlre0wv***\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<AcceptResourceShareInvitationResponse>\\n <RequestId>08F18B04-47CB-5C0E-A6D2-37DEF5C2A961</RequestId>\\n <ResourceShareInvitation>\\n <ResourceShareId>rs-ysGRci9z****</ResourceShareId>\\n <ResourceShareName>example</ResourceShareName>\\n <Status>Accepted</Status>\\n <SenderAccountId>151266687691****</SenderAccountId>\\n <ReceiverAccountId>134254031178****</ReceiverAccountId>\\n <CreateTime>2022-09-02T06:43:12.353Z</CreateTime>\\n <ResourceShareInvitationId>i-pMnItMX19fBJ****</ResourceShareInvitationId>\\n </ResourceShareInvitation>\\n</AcceptResourceShareInvitationResponse>","errorExample":""}]', + 'title' => '接受资源共享邀请', + 'description' => '### 使用说明'."\n" ."\n" - .'本API仅限资源目录的管理账号及其下被授权的RAM用户或RAM角色调用。', + .'- 只有在资源目录外共享资源时,才需要接受或拒绝资源共享邀请。在资源目录内共享资源时,系统会默认接受共享邀请,资源使用者不需要做任何操作。'."\n" + .'- 共享邀请的有效期为7天,资源使用者需要在有效期内完成确认。'."\n" + ."\n" + .'本文将提供一个示例,在`cn-hangzhou`地域,接受ID为`i-pMnItMX19fBJ****`的共享邀请。', 'requestParamsDescription' => '关于公共请求参数的详情,请参见[公共参数](~~159973~~)。', - ], - 'CreateResourceShare' => [ - 'summary' => '创建共享单元。', - 'methods' => [ - 'post', - 'get', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AcceptResourceShareInvitation'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:AcceptResourceShareInvitation', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'AssociateResourceShare' => [ + 'summary' => '为共享单元关联共享资源或资源使用者。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -127,60 +156,36 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'ResourceShareName', + 'name' => 'ResourceShareId', 'in' => 'query', - 'schema' => [ - 'description' => '共享单元名称。'."\n" - ."\n" - .'长度范围:1~50个字符。'."\n" - ."\n" - .'格式:允许输入英文字母、数字、中文、半角句号(.)、下划线(_)或短划线(-)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'test', - ], + 'schema' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'rs-6GRmdD3X****'], ], [ 'name' => 'Resources', 'in' => 'query', 'style' => 'repeatList', 'schema' => [ - 'description' => '共享资源列表。', + 'description' => '资源列表。', 'type' => 'array', 'items' => [ - 'description' => '共享资源列表。', + 'description' => '资源列表。', 'type' => 'object', 'properties' => [ - 'ResourceId' => [ - 'description' => '共享资源ID。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多添加5个共享资源。'."\n" - ."\n" - .'> `Resources.N.ResourceId`与`Resources.N.ResourceType`成对出现,需要同时设置。', - 'type' => 'string', - 'required' => false, - 'example' => 'vsw-bp183p93qs667muql****', - ], - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多添加5个共享资源。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。'."\n" - ."\n" - .'> `Resources.N.ResourceId`与`Resources.N.ResourceType`成对出现,需要同时设置。'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'VSwitch', - ], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多添加5个共享资源。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。'."\n" + ."\n" + .'> `Resources.N.ResourceId`与`Resources.N.ResourceType`成对出现,需要同时设置。', 'type' => 'string', 'required' => false, 'example' => 'VSwitch'], + 'ResourceId' => ['description' => '共享资源ID。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多添加5个共享资源。'."\n" + ."\n" + .'> Resources.N.ResourceId与Resources.N.ResourceType成对出现,需要同时设置。', 'type' => 'string', 'required' => false, 'example' => 'vsw-bp183p93qs667muql****'], ], 'required' => false, ], @@ -195,19 +200,14 @@ 'schema' => [ 'description' => '资源使用者。', 'type' => 'array', - 'items' => [ - 'description' => '资源使用者。取值:'."\n" - ."\n" - .'- 当`AllowExternalTargets`为`false`时,资源使用者可以为资源目录ID、资源夹ID或成员ID。'."\n" - .'- 当`AllowExternalTargets`为`true`时,资源使用者可以为阿里云账号ID、资源目录ID、资源夹ID、成员ID或阿里云服务。'."\n" - ."\n" - .'更多信息,请参见[资源共享方式](~~160622~~)、[查看资源目录ID](~~111217~~)、[查看资源夹ID](~~111223~~)或[查看成员ID](~~111624~~)。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多添加5个资源使用者。', - 'type' => 'string', - 'required' => false, - 'example' => '172050525300****', - ], + 'items' => ['description' => '资源使用者。取值:'."\n" + ."\n" + .'- 当`AllowExternalTargets`为`false`时,即仅允许资源目录内共享时,资源使用者可以为资源目录ID、资源夹ID或成员ID。'."\n" + .'- 当`AllowExternalTargets`为`true`时,即允许共享给任意账号时,资源使用者可以为阿里云账号ID、资源目录ID、资源夹ID、成员ID或阿里云服务。'."\n" + ."\n" + .'更多信息,请参见[资源共享方式](~~160622~~)、[查看资源目录ID](~~111217~~)、[查看资源夹ID](~~111223~~)或[查看成员ID](~~111624~~)。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多添加5个资源使用者。', 'type' => 'string', 'required' => false, 'example' => '172050525300****'], 'required' => false, 'example' => '172050525300****', 'maxItems' => 20, @@ -222,13 +222,8 @@ ."\n" .'N的取值范围:1~5,即每次最多添加5个共享资源。', 'type' => 'array', - 'items' => [ - 'description' => '共享资源ARN。'."\n" - .'> 资源ARN格式请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], + 'items' => ['description' => '共享资源ARN。'."\n" + .'> 资源ARN格式请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'required' => false, 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], 'required' => false, 'maxItems' => 20, ], @@ -240,40 +235,12 @@ 'schema' => [ 'description' => '共享权限名称。为空时,系统自动绑定资源类型关联的默认权限。具体信息,请参见[权限库](~~465474~~)。', 'type' => 'array', - 'items' => [ - 'description' => '共享权限名称。为空时,系统自动绑定资源类型关联的默认权限。具体信息,请参见[权限库](~~465474~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'AliyunRSDefaultPermissionVSwitch', - ], + 'items' => ['description' => '共享权限名称。为空时,系统自动绑定资源类型关联的默认权限。具体信息,请参见[权限库](~~465474~~)。', 'type' => 'string', 'required' => false, 'example' => 'AliyunRSDefaultPermissionVSwitch'], 'required' => false, 'maxItems' => 20, ], ], [ - 'name' => 'AllowExternalTargets', - 'in' => 'query', - 'schema' => [ - 'description' => '是否允许共享给资源目录外的账号。取值:'."\n" - ."\n" - .'- false(默认值):仅允许资源目录内共享。'."\n" - .'- true:允许共享给任意账号。', - 'type' => 'boolean', - 'required' => false, - 'example' => 'false', - ], - ], - [ - 'name' => 'ResourceGroupId', - 'in' => 'query', - 'schema' => [ - 'description' => '资源组ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'rg-aekz5nlvlak****', - ], - ], - [ 'name' => 'TargetProperties', 'in' => 'query', 'style' => 'flat', @@ -286,30 +253,20 @@ .'> 仅当资源使用者为阿里云服务时可以设置该参数。', 'type' => 'object', 'properties' => [ - 'Property' => [ - 'description' => '资源使用者属性参数。例如:您可以设置资源共享的时间段。`timeRangeType`取值:'."\n" - .'- timeRange:指定时间段。'."\n" - .'- day:全天。'."\n" - .'> `TargetProperties.N.TargetId`与`TargetProperties.N.Property`成对出现,需要同时设置。', - 'type' => 'string', - 'required' => false, - 'example' => '{'."\n" - .' "timeRange":{'."\n" - .' "timeRangeType":"timeRange",'."\n" - .' "beginAtTime":"00:00",'."\n" - .' "timezone":"UTC+8",'."\n" - .' "endAtTime":"19:59"'."\n" - .' }'."\n" - .'}', - ], - 'TargetId' => [ - 'description' => '资源使用者ID。'."\n" - ."\n" - .'> `TargetProperties.N.TargetId`与`TargetProperties.N.Property`成对出现,需要同时设置。', - 'type' => 'string', - 'required' => false, - 'example' => '172050525300****', - ], + 'TargetId' => ['description' => '资源使用者ID。'."\n" + ."\n" + .'> `TargetProperties.N.TargetId`与`TargetProperties.N.Property`成对出现,需要同时设置。', 'type' => 'string', 'required' => false, 'example' => '172050525300****'], + 'Property' => ['description' => '资源使用者属性参数。例如:您可以设置资源共享的时间段。`timeRangeType`取值:'."\n" + .'- timeRange:指定时间段。'."\n" + .'- day:全天。'."\n" + .'> `TargetProperties.N.TargetId`与`TargetProperties.N.Property`成对出现,需要同时设置。', 'type' => 'string', 'required' => false, 'example' => '{'."\n" + .' "timeRange":{'."\n" + .' "timeRangeType":"timeRange",'."\n" + .' "beginAtTime":"00:00",'."\n" + .' "timezone":"UTC+8",'."\n" + .' "endAtTime":"19:59"'."\n" + .' }'."\n" + .'}'], ], 'required' => false, ], @@ -329,52 +286,8 @@ 'description' => '资源属性列表。', 'type' => 'object', 'properties' => [ - 'Property' => [ - 'title' => '资源属性。', - 'description' => '资源属性。', - 'type' => 'string', - 'required' => false, - 'example' => '{"sharePrincipals":true,"shareTagOptions":false}', - ], - 'ResourceArn' => [ - 'title' => '资源ARN。', - 'description' => '资源ARN。', - 'type' => 'string', - 'required' => false, - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - ], - 'required' => false, - ], - 'required' => false, - 'maxItems' => 20, - ], - ], - [ - 'name' => 'Tag', - 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '标签列表。最多可以绑定 20 个标签。', - 'type' => 'array', - 'items' => [ - 'description' => '标签列表。', - 'type' => 'object', - 'properties' => [ - 'Key' => [ - 'description' => '标签键。'."\n" - .'> 最多支持 128 个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', - 'type' => 'string', - 'required' => false, - 'example' => 'k1', - ], - 'Value' => [ - 'description' => '标签值。'."\n" - .'> 最多支持 128 个字符,不能以`acs:`开头,不能包含`http://`或者`https://`。', - 'type' => 'string', - 'required' => false, - 'example' => 'v1', - ], + 'ResourceArn' => ['title' => '资源ARN。', 'description' => '资源ARN。', 'type' => 'string', 'required' => false, 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + 'Property' => ['title' => '资源属性。', 'description' => '资源属性。', 'type' => 'string', 'required' => false, 'example' => '{"sharePrincipals":true,"shareTagOptions":false}'], ], 'required' => false, ], @@ -386,62 +299,61 @@ 'responses' => [ 200 => [ 'schema' => [ - 'description' => '返回参数。', + 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '2C3FA051-61DC-4F3E-81E9-E4830524DF4B', - ], - 'ResourceShare' => [ - 'description' => '共享单元信息。', - 'type' => 'object', - 'properties' => [ - 'AllowExternalTargets' => [ - 'description' => '是否允许共享给资源目录外的账号。取值:'."\n" + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '111FB84A-60A9-403E-9067-E55D7EE95BD1'], + 'ResourceShareAssociations' => [ + 'description' => '共享单元关联的共享资源或资源使用者信息。', + 'type' => 'array', + 'items' => [ + 'description' => '共享单元关联的共享资源或资源使用者信息。', + 'type' => 'object', + 'properties' => [ + 'UpdateTime' => ['description' => '更新关联的时间。存在以下两种情况:'."\n" ."\n" - .'- false:仅允许资源目录内共享。'."\n" - .'- true:允许共享给任意账号。', - 'type' => 'boolean', - 'example' => 'false', - ], - 'CreateTime' => [ - 'description' => '共享单元创建时间。', - 'type' => 'string', - 'example' => '2020-12-03T08:02:22.413Z', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-qSkW1HBY****', - ], - 'ResourceShareName' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'example' => 'test', - ], - 'ResourceShareOwner' => [ - 'description' => '共享单元归属者。', - 'type' => 'string', - 'example' => '151266687691****', - ], - 'ResourceShareStatus' => [ - 'description' => '共享单元状态。取值:'."\n" + .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为更新资源的时间。'."\n" + .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为更新资源使用者的时间。', 'type' => 'string', 'example' => '2020-12-04T09:40:41.246Z'], + 'ResourceArn' => ['description' => '关联资源ARN。'."\n" + .'> 当关联类型`AssociationType`为资源使用者`Target`时,该参数不可用。', 'type' => 'string', 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + 'ResourceShareName' => ['description' => '共享单元名称。', 'type' => 'string', 'example' => 'test'], + 'CreateTime' => ['description' => '关联的时间。存在以下两种情况:'."\n" ."\n" - .'- Active:已启用。'."\n" - .'- Pending:待确认。'."\n" - .'- Deleting:删除中。'."\n" - .'- Deleted:已删除。'."\n" + .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为添加资源的时间。'."\n" + .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为添加资源使用者的时间。', 'type' => 'string', 'example' => '2020-12-04T09:40:41.246Z'], + 'EntityType' => ['description' => '关联实体类型。取值:'."\n" ."\n" - .'> Deleted状态的共享单元记录,会在48~96小时内被系统自动删除。', - 'type' => 'string', - 'example' => 'Active', - ], - 'UpdateTime' => [ - 'description' => '共享单元更新时间。', - 'type' => 'string', - 'example' => '2020-12-03T08:02:22.413Z', + .'- 当关联实体为资源时,该参数为资源类型。更多信息,请参见[支持资源共享的云服务](~~450526~~)。'."\n" + .'- 当关联实体为资源使用者时,该参数为`Account`。', 'type' => 'string', 'example' => 'VSwitch'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-6GRmdD3X****'], + 'AssociationStatusMessage' => ['description' => '关联失败的原因。', 'type' => 'string', 'example' => 'The reason for the association failure.'], + 'AssociationType' => ['description' => '关联类型。取值:'."\n" + ."\n" + .'- Resource:资源。'."\n" + .'- Target:资源使用者。'."\n", 'type' => 'string', 'example' => 'Resource'], + 'AssociationStatus' => ['description' => '关联状态。取值:'."\n" + ."\n" + .'- Associating:关联中。'."\n" + .'- Associated:已关联。'."\n" + .'- Failed:关联失败。'."\n" + .'- Disassociating:分离中。'."\n" + .'- Disassociated:已分离。'."\n" + ."\n" + .'> `Failed`和`Disassociated`状态的记录,会在48~96小时内被系统自动删除。', 'type' => 'string', 'example' => 'Associating'], + 'TargetProperty' => ['description' => '资源使用者属性。例如:资源共享的时间段。'."\n" + .'> 仅当资源使用者为阿里云服务时返回设置该参数。', 'type' => 'string', 'example' => '{'."\n" + .' "plan":{'."\n" + .' "timeRangeType":"timeRange",'."\n" + .' "beginAtTime":"00:00",'."\n" + .' "timezone":"UTC+8",'."\n" + .' "endAtTime":"19:59"'."\n" + .' }'."\n" + .'}'], + 'EntityId' => ['description' => '关联实体ID。取值:'."\n" + ."\n" + .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为资源ID。'."\n" + .'- 当关联类型`AssociationType`为资源使用者`Target` 时,该参数为资源使用者ID。', 'type' => 'string', 'example' => 'vsw-bp183p93qs667muql****'], + 'ResourceProperty' => ['title' => '资源属性。', 'description' => '资源属性。', 'type' => 'string', 'example' => '{"sharePrincipals":true,"shareTagOptions":false}'], ], ], ], @@ -451,784 +363,250 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InvalidParameter.ResourceShareName', - 'errorMessage' => 'The ResourceShareName is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareName.Length', - 'errorMessage' => 'The maximum length of ResourceShareName exceeds 50 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.Resources', - 'errorMessage' => 'The Resources is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.Resources.Duplicate', - 'errorMessage' => 'The Resources contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.Resources.Length', - 'errorMessage' => 'The maximum number of Resources exceeds 5.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets', - 'errorMessage' => 'The Targets is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets.Duplicate', - 'errorMessage' => 'The Targets contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets.Length', - 'errorMessage' => 'The maximum number of Targets exceeds 5.', - ], - [ - 'errorCode' => 'InvalidTarget', - 'errorMessage' => 'The shared target does not exist in the resource directory.', - ], - [ - 'errorCode' => 'InvalidParameter', - 'errorMessage' => 'The specified parameter is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceShareName', - 'errorMessage' => 'You must specify ResourceShareName.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.PermissionNames.Duplicate', - 'errorMessage' => 'The PermissionNames duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.PermissionNames.Length', - 'errorMessage' => 'The maximum length of PermissionNames exceeds quota limit.', - ], - [ - 'errorCode' => 'InvalidParameter.TargetProperties', - 'errorMessage' => 'The TargetProperties is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.TargetProperties.Duplicate', - 'errorMessage' => 'The TargetProperties contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.TargetProperties.Length', - 'errorMessage' => 'The TargetProperties beyond the length limit.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns', - 'errorMessage' => 'The ResourceArns is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns.Duplicate', - 'errorMessage' => 'The ResourceArns contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns.Length', - 'errorMessage' => 'The ResourceArns beyond the length limit.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceConflict', - 'errorMessage' => 'Both Resources and ResourceArns cannot be specified simultaneously. Please provide only one of these parameters.', - ], - [ - 'errorCode' => 'NotSupport.ResourceType.ResourcesParameter', - 'errorMessage' => 'The Resources parameter does not support this resource type. Please use ResourceArns instead.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceProperties', - 'errorMessage' => 'The ResourceProperties is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceProperties.Duplicate', - 'errorMessage' => 'The ResourceProperties contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceProperties.Length', - 'errorMessage' => 'The ResourceProperties beyond the length limit.', - ], - [ - 'errorCode' => 'NotSupport.ResourceProperty', - 'errorMessage' => 'The resource type does not support resource property.', - ], + ['errorCode' => 'MissingParameter.ResourceShareId', 'errorMessage' => 'You must specify ResourceShareId.', 'description' => 'ResourceShareId参数缺失。'], + ['errorCode' => 'InvalidParameter.ResourceShareId', 'errorMessage' => 'The ResourceShareId is invalid.', 'description' => 'ResourceShareId参数错误。'], + ['errorCode' => 'InvalidParameter.Resources', 'errorMessage' => 'The Resources is invalid.', 'description' => '选定的共享资源无效。'], + ['errorCode' => 'InvalidParameter.Resources.Duplicate', 'errorMessage' => 'The Resources contains duplicate values.', 'description' => '选定的共享资源有重复项。'], + ['errorCode' => 'InvalidParameter.Resources.Length', 'errorMessage' => 'The maximum number of Resources exceeds 5.', 'description' => '选定的共享资源数量超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.Targets', 'errorMessage' => 'The Targets is invalid.', 'description' => '资源使用者的参数不符合规则。'], + ['errorCode' => 'InvalidParameter.Targets.Duplicate', 'errorMessage' => 'The Targets contains duplicate values.', 'description' => '资源使用者有重复项。'], + ['errorCode' => 'InvalidParameter.Targets.Length', 'errorMessage' => 'The maximum number of Targets exceeds 5.', 'description' => '资源使用者数量超限(最大5个)。'], + ['errorCode' => 'InvalidTarget', 'errorMessage' => 'The shared target does not exist in the resource directory.', 'description' => '资源使用者不在资源目录内。'], + ['errorCode' => 'ResourceAndTargetBothEmpty', 'errorMessage' => 'Either a resource or a shared target must be specified.', 'description' => '必须指定一个资源或一个资源使用者。'], + ['errorCode' => 'InvalidParameter', 'errorMessage' => 'The specified parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType is invalid.', 'description' => '传入的资源类型错误。'], + ['errorCode' => 'InvalidParameter.PermissionNames.Duplicate', 'errorMessage' => 'The PermissionNames duplicate values.', 'description' => '参数PermissionNames重复。'], + ['errorCode' => 'InvalidParameter.PermissionNames.Length', 'errorMessage' => 'The maximum length of PermissionNames exceeds quota limit.', 'description' => 'PermissionNames长度超限。'], + ['errorCode' => 'InvalidParameter.TargetProperties', 'errorMessage' => 'The TargetProperties is invalid.', 'description' => 'TargetProperties参数无效。'], + ['errorCode' => 'InvalidParameter.TargetProperties.Duplicate', 'errorMessage' => 'The TargetProperties contains duplicate values.', 'description' => 'TargetProperties包含重复的参数。'], + ['errorCode' => 'InvalidParameter.TargetProperties.Length', 'errorMessage' => 'The TargetProperties beyond the length limit.', 'description' => 'TargetProperties数量超过限制。'], + ['errorCode' => 'InvalidParameter.ResourceArns', 'errorMessage' => 'The ResourceArns is invalid.', 'description' => 'ResourceArns参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceArns.Duplicate', 'errorMessage' => 'The ResourceArns contains duplicate values.', 'description' => '资源ARN参数有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceArns.Length', 'errorMessage' => 'The ResourceArns beyond the length limit.', 'description' => '资源ARN数量超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.ResourceConflict', 'errorMessage' => 'Both Resources and ResourceArns cannot be specified simultaneously. Please provide only one of these parameters.', 'description' => 'Resources 和 ResourceArns 不能同时指定。请仅提供其中一个参数。'], + ['errorCode' => 'NotSupport.ResourceType.ResourcesParameter', 'errorMessage' => 'The Resources parameter does not support this resource type. Please use ResourceArns instead.', 'description' => '当前资源类型不支持Resources参数,请使用ResourceArns参数。'], + ['errorCode' => 'InvalidParameter.ResourceProperties', 'errorMessage' => 'The ResourceProperties is invalid.', 'description' => '资源属性参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceProperties.Duplicate', 'errorMessage' => 'The ResourceProperties contains duplicate values.', 'description' => '资源属性参数有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceProperties.Length', 'errorMessage' => 'The ResourceProperties beyond the length limit.', 'description' => '资源属性数量超限(最大5个)。'], + ['errorCode' => 'NotSupport.ResourceProperty', 'errorMessage' => 'The resource type does not support resource property.', 'description' => '资源类型不支持属性。'], ], 404 => [ - [ - 'errorCode' => 'EntityNotExists.Permission', - 'errorMessage' => 'The resource share permission does not exist.', - ], + ['errorCode' => 'EntityNotExists.ResourceShare', 'errorMessage' => 'The resource share does not exist in the current account.', 'description' => '共享单元不在当前账号内。'], + ['errorCode' => 'EntityNotExists.Permission', 'errorMessage' => 'The resource share permission does not exist.', 'description' => '共享权限不存在。'], ], 409 => [ - [ - 'errorCode' => 'NotEnableSharingWithResourceDirectory', - 'errorMessage' => 'You have not enabled sharing with your Resource Directory.', - ], - [ - 'errorCode' => 'AccountNotInResourceDirectory', - 'errorMessage' => 'The account is not a master or a member of a resource directory.', - ], - [ - 'errorCode' => 'QuotaExceeded.ResourceShare.Count', - 'errorMessage' => 'The maximum number of ResourceShare exceeds the limit.', - ], - [ - 'errorCode' => 'EntityAlreadyExists.ResourceShare', - 'errorMessage' => 'The specified resource share ID already exists.', - ], - [ - 'errorCode' => 'QuotaExceeded.SharedResource.Count', - 'errorMessage' => 'The maximum number of shared resources per account exceeds the limit.', - ], - [ - 'errorCode' => 'ShareWithYourself', - 'errorMessage' => 'You cannot share resources with yourself.', - ], - [ - 'errorCode' => 'NotManagementAccount', - 'errorMessage' => 'Only the management account of the service is allowed to share such resources.', - ], - [ - 'errorCode' => 'QuotaExceeded.PendingInvitations', - 'errorMessage' => 'The maximum number of pending invitations exceeds the limit.', - ], - [ - 'errorCode' => 'InvalidTarget.LegalEntityMismatch', - 'errorMessage' => 'The target account does not have the same legal entity as the resource owner account.', - ], - [ - 'errorCode' => 'ExternalTargetsNotAllowed.ResourceType', - 'errorMessage' => 'The resource share includes resource types that cannot be shared with accounts outside the resource directory.', - ], - [ - 'errorCode' => 'InvalidTarget.SiteMismatch', - 'errorMessage' => 'Cross-site resource sharing is not supported.', - ], - [ - 'errorCode' => 'NotSupport.Service.ExistInOtherResourceShare', - 'errorMessage' => 'The resource type has been shared to the target service through other resourceShare. Please share it in the same resourceShare.', - ], - [ - 'errorCode' => 'NotSupport.Service.AssociateConflict', - 'errorMessage' => 'The same resource cannot be shared repeatedly to the target service.', + ['errorCode' => 'NotEnableSharingWithResourceDirectory', 'errorMessage' => 'You have not enabled sharing with your Resource Directory.', 'description' => '未开启与资源目录组织的共享。'], + ['errorCode' => 'AccountNotInResourceDirectory', 'errorMessage' => 'The account is not a master or a member of a resource directory.', 'description' => '资源使用者不在资源目录内。'], + ['errorCode' => 'ResourceShareStatusMismatchAction', 'errorMessage' => 'The status of the resource share does not allow the specified operation.', 'description' => '共享单元的状态不支持当前操作。'], + ['errorCode' => 'QuotaExceeded.SharedResource.Count', 'errorMessage' => 'The maximum number of shared resources per account exceeds the limit.', 'description' => '共享的资源超出单个账号最大限制。'], + ['errorCode' => 'ShareWithYourself', 'errorMessage' => 'You cannot share resources with yourself.', 'description' => '资源使用者不能是自己。'], + ['errorCode' => 'AssociateConflict', 'errorMessage' => 'You cannot perform the operation while disassociation operation is being performed.', 'description' => '取消关联中,不能操作关联。'], + ['errorCode' => 'NotManagementAccount', 'errorMessage' => 'Only the management account of the service is allowed to share such resources.', 'description' => '当前资源类型仅支持资源目录的管理账号共享资源。如仍需使用当前账号,请联系管理账号将当前账号设置为当前资源类型所属可信服务的委派管理员账号。'], + ['errorCode' => 'QuotaExceeded.PendingInvitations', 'errorMessage' => 'The maximum number of pending invitations exceeds the limit.', 'description' => '邀请数量超出限制。'], + ['errorCode' => 'InvalidTarget.LegalEntityMismatch', 'errorMessage' => 'The target account does not have the same legal entity as the resource owner account.', 'description' => '共享目标账号的企业名称与共享者不一致。'], + ['errorCode' => 'ExternalTargetsNotAllowed.ResourceType', 'errorMessage' => 'The resource share includes resource types that cannot be shared with accounts outside the resource directory.', 'description' => '共享单元中包含不支持组织外共享的资源类型。'], + ['errorCode' => 'InvalidTarget.SiteMismatch', 'errorMessage' => 'Cross-site resource sharing is not supported.', 'description' => '共享目标账号与共享者站点不一致。'], + ['errorCode' => 'NotSupport.Service.ExistInOtherResourceShare', 'errorMessage' => 'The resource type has been shared to the target service through other resourceShare. Please share it in the same resourceShare.', 'description' => '此资源类型已经通过其他共享单元共享给目标云服务,请在同一个共享单元中共享。'], + ['errorCode' => 'NotSupport.Service.AssociateConflict', 'errorMessage' => 'The same resource cannot be shared repeatedly to the target service.', 'description' => '同一个资源不允许重复共享给目标云服务。'], + ['errorCode' => 'NotSupport.ResourcePropertyConflict', 'errorMessage' => 'The ResourceProperty can not be updated until the last operation is completed.', 'description' => '资源属性关联中,暂无法更新。'], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"111FB84A-60A9-403E-9067-E55D7EE95BD1\\",\\n \\"ResourceShareAssociations\\": [\\n {\\n \\"UpdateTime\\": \\"2020-12-04T09:40:41.246Z\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceShareName\\": \\"test\\",\\n \\"CreateTime\\": \\"2020-12-04T09:40:41.246Z\\",\\n \\"EntityType\\": \\"VSwitch\\",\\n \\"ResourceShareId\\": \\"rs-6GRmdD3X****\\",\\n \\"AssociationStatusMessage\\": \\"The reason for the association failure.\\",\\n \\"AssociationType\\": \\"Resource\\",\\n \\"AssociationStatus\\": \\"Associating\\",\\n \\"TargetProperty\\": \\"{\\\\n \\\\\\"plan\\\\\\":{\\\\n \\\\\\"timeRangeType\\\\\\":\\\\\\"timeRange\\\\\\",\\\\n \\\\\\"beginAtTime\\\\\\":\\\\\\"00:00\\\\\\",\\\\n \\\\\\"timezone\\\\\\":\\\\\\"UTC+8\\\\\\",\\\\n \\\\\\"endAtTime\\\\\\":\\\\\\"19:59\\\\\\"\\\\n }\\\\n}\\",\\n \\"EntityId\\": \\"vsw-bp183p93qs667muql****\\",\\n \\"ResourceProperty\\": \\"{\\\\\\"sharePrincipals\\\\\\":true,\\\\\\"shareTagOptions\\\\\\":false}\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\" ?>\\r\\n<AssociateResourceShareResponse>\\r\\n\\t<ResourceShareAssociations>\\r\\n\\t\\t<ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\r\\n\\t\\t<EntityId>vsw-bp183p93qs667muql****</EntityId>\\r\\n\\t\\t<EntityType>VSwitch</EntityType>\\r\\n\\t\\t<AssociationStatusMessage></AssociationStatusMessage>\\r\\n\\t\\t<AssociationType>Resource</AssociationType>\\r\\n\\t\\t<CreateTime>2020-12-04T09:40:41.246Z</CreateTime>\\r\\n\\t\\t<UpdateTime>2020-12-04T09:40:41.246Z</UpdateTime>\\r\\n\\t\\t<ResourceShareName>test</ResourceShareName>\\r\\n\\t\\t<AssociationStatus>Associating</AssociationStatus>\\r\\n\\t</ResourceShareAssociations>\\r\\n\\t<ResourceShareAssociations>\\r\\n\\t\\t<ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\r\\n\\t\\t<EntityId>172050525300****</EntityId>\\r\\n\\t\\t<EntityType>Account</EntityType>\\r\\n\\t\\t<AssociationStatusMessage></AssociationStatusMessage>\\r\\n\\t\\t<AssociationType>Target</AssociationType>\\r\\n\\t\\t<CreateTime>2020-12-04T09:40:41.250Z</CreateTime>\\r\\n\\t\\t<UpdateTime>2020-12-04T09:40:41.250Z</UpdateTime>\\r\\n\\t\\t<ResourceShareName>test1</ResourceShareName>\\r\\n\\t\\t<AssociationStatus>Associating</AssociationStatus>\\r\\n\\t</ResourceShareAssociations>\\r\\n\\t<RequestId>111FB84A-60A9-403E-9067-E55D7EE95BD1</RequestId>\\r\\n</AssociateResourceShareResponse>\\t\\r\\n","errorExample":""}]', + 'title' => '关联共享资源或资源使用者', + 'description' => '本文将提供一个示例,在`cn-hangzhou`地域的共享单元`rs-6GRmdD3X****`中,添加共享资源VPC交换机`vsw-bp183p93qs667muql****`,将其共享给资源目录内的成员`172050525300****`。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssociateResourceShare'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:AssociateResourceShare', + 'authLevel' => 'operate', + 'actionConditions' => [ + ['conditionKey' => 'resourcesharing:Target', 'validationType' => 'always'], + ['conditionKey' => 'resourcesharing:RequestedResourceType'], + ['conditionKey' => 'resourcesharing:ResourceArn'], + ], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2C3FA051-61DC-4F3E-81E9-E4830524DF4B\\",\\n \\"ResourceShare\\": {\\n \\"AllowExternalTargets\\": false,\\n \\"CreateTime\\": \\"2020-12-03T08:02:22.413Z\\",\\n \\"ResourceShareId\\": \\"rs-qSkW1HBY****\\",\\n \\"ResourceShareName\\": \\"test\\",\\n \\"ResourceShareOwner\\": \\"151266687691****\\",\\n \\"ResourceShareStatus\\": \\"Active\\",\\n \\"UpdateTime\\": \\"2020-12-03T08:02:22.413Z\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<CreateResourceShareResponse>\\n <RequestId>2C3FA051-61DC-4F3E-81E9-E4830524DF4B</RequestId>\\n <ResourceShare>\\n <ResourceShareId>rs-qSkW1HBY****</ResourceShareId>\\n <ResourceShareName>test</ResourceShareName>\\n <ResourceShareStatus>Active</ResourceShareStatus>\\n <CreateTime>2020-12-03T08:02:22.413Z</CreateTime>\\n <UpdateTime>2020-12-03T08:02:22.413Z</UpdateTime>\\n <ResourceShareOwner>151266687691****</ResourceShareOwner>\\n <AllowExternalTargets>false</AllowExternalTargets>\\n </ResourceShare>\\n</CreateResourceShareResponse>","errorExample":""}]', - 'title' => '创建共享单元', - 'description' => '阿里云资源共享(Resource Sharing)支持将一个账号下的指定资源共享给一个或多个目标账号使用。更多信息,请参见[资源共享概述](~~160622~~)。'."\n" - ."\n" - .'本文将提供一个示例,在`cn-hangzhou`地域,使用资源目录管理账号创建一个名为`test`的共享单元,将VPC交换机`vsw-bp183p93qs667muql****`共享给资源目录内的成员`172050525300****`。', ], - 'ListResourceShares' => [ - 'summary' => '查询共享单元列表。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'AssociateResourceSharePermission' => [ + 'summary' => '调用AssociateResourceSharePermission为共享单元关联共享权限。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update'], 'parameters' => [ [ - 'name' => 'ResourceOwner', - 'in' => 'query', - 'schema' => [ - 'description' => '共享单元归属者。取值:'."\n" - ."\n" - .'- Self:查询当前账号的共享单元列表。'."\n" - .'- OtherAccounts:查询其他账号共享给当前账号的共享单元列表。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'Self', - ], - ], - [ - 'name' => 'ResourceShareName', - 'in' => 'query', - 'schema' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'required' => false, - 'example' => 'test', - ], - ], - [ - 'name' => 'ResourceShareStatus', - 'in' => 'query', - 'schema' => [ - 'description' => '共享单元状态。取值:'."\n" - ."\n" - .'- Active:已启用。'."\n" - .'- Pending:待确认。'."\n" - .'- Deleting:删除中。'."\n" - .'- Deleted:已删除。'."\n" - ."\n" - .'> Deleted状态的共享单元记录,会在48~96小时内被系统自动删除。', - 'type' => 'string', - 'required' => false, - 'example' => 'Active', - ], - ], - [ - 'name' => 'MaxResults', - 'in' => 'query', - 'schema' => [ - 'description' => '单次请求返回结果的最大条数。'."\n" - ."\n" - .'取值范围:1~100。默认值:20。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '20', - ], - ], - [ - 'name' => 'NextToken', - 'in' => 'query', - 'schema' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'required' => false, - 'example' => 'TGlzdFJlc291cm****', - ], - ], - [ - 'name' => 'ResourceShareIds', + 'name' => 'ResourceShareId', 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '共享单元ID。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多指定5个共享单元。', - 'type' => 'array', - 'items' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'rs-PqysnzIj****', - ], - 'required' => false, - 'example' => 'rs-PqysnzIj****', - 'maxItems' => 20, - ], + 'schema' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'rs-6GRmdD3X****'], ], [ 'name' => 'PermissionName', 'in' => 'query', - 'schema' => [ - 'description' => '共享权限名称。具体信息,请参见[权限库](~~465474~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'AliyunRSDefaultPermissionVSwitch', - ], - ], - [ - 'name' => 'ResourceGroupId', - 'in' => 'query', - 'schema' => [ - 'description' => '资源组ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'rg-aekz5nlvlak****', - ], + 'schema' => ['description' => '共享权限名称。', 'type' => 'string', 'required' => true, 'docRequired' => false, 'example' => 'AliyunRSDefaultPermissionVSwitch'], ], [ - 'name' => 'Tag', + 'name' => 'Replace', 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '标签列表。', - 'type' => 'array', - 'items' => [ - 'description' => '标签列表。', - 'type' => 'object', - 'properties' => [ - 'Key' => [ - 'description' => '标签键。'."\n" - .'> 最多支持 128 个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', - 'type' => 'string', - 'required' => false, - 'example' => 'k1', - ], - 'Value' => [ - 'description' => '标签值。'."\n" - .'> 最多支持 128 个字符,不能以`acs:`开头,不能包含`http://`或者`https://`。', - 'type' => 'string', - 'required' => false, - 'example' => 'v1', - ], - ], - 'required' => false, - ], - 'required' => false, - 'maxItems' => 20, - ], + 'schema' => ['description' => '指定的权限是否替换现有权限。取值:'."\n" + .'- false(默认值):否,不替换现有权限,适合于将当前权限添加到没有权限的共享单元。由于同一个共享单元中相同资源类型只能具有一个权限,如果共享单元中某资源类型已经有设置权限,同时您将Replace设置为fasle,此时该操作会报错。防止您误操作替换现有权限。'."\n" + ."\n" + .'- true:是,替换共享单元中相同资源类型的权限。', 'type' => 'boolean', 'required' => false, 'example' => 'false'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'description' => '返回参数。', + 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'NextToken' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'example' => 'TGlzdFJlc291cm****', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA', - ], - 'ResourceShares' => [ - 'description' => '共享单元信息。', - 'type' => 'array', - 'items' => [ - 'description' => '共享单元信息。', - 'type' => 'object', - 'properties' => [ - 'AllowExternalTargets' => [ - 'description' => '是否允许共享给资源目录外的账号。取值:'."\n" - ."\n" - .'- false:仅允许资源目录内共享。'."\n" - .'- true:允许共享给任意账号。', - 'type' => 'boolean', - 'example' => 'false', - ], - 'CreateTime' => [ - 'description' => '共享单元创建时间。', - 'type' => 'string', - 'example' => '2020-12-03T02:20:31.292Z', - ], - 'ResourceGroupId' => [ - 'description' => '资源组ID。', - 'type' => 'string', - 'example' => 'rg-aekz5nlvlak****', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-PqysnzIj****', - ], - 'ResourceShareName' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'example' => 'test', - ], - 'ResourceShareOwner' => [ - 'description' => '共享单元归属者。', - 'type' => 'string', - 'example' => '151266687691****', - ], - 'ResourceShareStatus' => [ - 'description' => '共享单元状态。取值:'."\n" - ."\n" - .'- Active:已启用。'."\n" - .'- Pending:待确认。'."\n" - .'- Deleting:删除中。'."\n" - .'- Deleted:已删除。'."\n" - ."\n" - .'> Deleted状态的共享单元记录,会在48~96小时内被系统自动删除。', - 'type' => 'string', - 'example' => 'Active', - ], - 'Tags' => [ - 'description' => '标签列表。', - 'type' => 'array', - 'items' => [ - 'description' => '标签列表。', - 'type' => 'object', - 'properties' => [ - 'Key' => [ - 'description' => '标签键。', - 'type' => 'string', - 'example' => 'k1', - ], - 'Value' => [ - 'description' => '标签值。', - 'type' => 'string', - 'example' => 'v1', - ], - ], - ], - ], - 'UpdateTime' => [ - 'description' => '共享单元更新时间。', - 'type' => 'string', - 'example' => '2020-12-03T08:01:43.638Z', - ], - ], - ], - ], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '111FB84A-60A9-403E-9067-E55D7EE95BD1'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MissingParameter.ResourceOwner', - 'errorMessage' => 'You must specify ResourceOwner.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceOwner', - 'errorMessage' => 'The ResourceOwner is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareName', - 'errorMessage' => 'The ResourceShareName is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareName.Length', - 'errorMessage' => 'The maximum length of ResourceShareName exceeds 50 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareStatus', - 'errorMessage' => 'The ResourceShareStatus is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.MaxResults', - 'errorMessage' => 'The MaxResults is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken', - 'errorMessage' => 'The NextToken is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken.Length', - 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds', - 'errorMessage' => 'The ResourceShareIds is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', - 'errorMessage' => 'The ResourceShareIds contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Length', - 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', - ], - [ - 'errorCode' => 'InvalidParameter', - 'errorMessage' => 'The specified parameter is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceOwnerAndTag', - 'errorMessage' => 'You cannot use ResourceOwner set to OtherAccounts and tags in one request.', - ], + ['errorCode' => 'InvalidParameter.ResourceShareId', 'errorMessage' => 'The ResourceShareId is invalid.', 'description' => ''], + ['errorCode' => 'MissingParameter.ResourceShareId', 'errorMessage' => 'You must specify ResourceShareId.', 'description' => ''], + ['errorCode' => 'MissingParameter.PermissionName', 'errorMessage' => 'You must specify PermissionName.', 'description' => ''], + ], + 404 => [ + ['errorCode' => 'EntityNotExists.Permission', 'errorMessage' => 'The resource share permission does not exist.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA\\",\\n \\"ResourceShares\\": [\\n {\\n \\"AllowExternalTargets\\": false,\\n \\"CreateTime\\": \\"2020-12-03T02:20:31.292Z\\",\\n \\"ResourceGroupId\\": \\"rg-aekz5nlvlak****\\",\\n \\"ResourceShareId\\": \\"rs-PqysnzIj****\\",\\n \\"ResourceShareName\\": \\"test\\",\\n \\"ResourceShareOwner\\": \\"151266687691****\\",\\n \\"ResourceShareStatus\\": \\"Active\\",\\n \\"Tags\\": [\\n {\\n \\"Key\\": \\"k1\\",\\n \\"Value\\": \\"v1\\"\\n }\\n ],\\n \\"UpdateTime\\": \\"2020-12-03T08:01:43.638Z\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListResourceSharesResponse>\\n <ResourceShares>\\n <ResourceShareId>rs-hX9wC5jO****</ResourceShareId>\\n <ResourceShareName>test1</ResourceShareName>\\n <ResourceShareStatus>Deleted</ResourceShareStatus>\\n <CreateTime>2020-12-03T02:47:14.651Z</CreateTime>\\n <UpdateTime>2020-12-03T08:01:56.696Z</UpdateTime>\\n <ResourceShareOwner>151266687691****</ResourceShareOwner>\\n <AllowExternalTargets>false</AllowExternalTargets>\\n </ResourceShares>\\n <ResourceShares>\\n <ResourceShareId>rs-PqysnzIj****</ResourceShareId>\\n <ResourceShareName>test</ResourceShareName>\\n <ResourceShareStatus>Active</ResourceShareStatus>\\n <CreateTime>2020-12-03T02:20:31.292Z</CreateTime>\\n <UpdateTime>2020-12-03T08:01:43.638Z</UpdateTime>\\n <ResourceShareOwner>151266687691****</ResourceShareOwner>\\n <AllowExternalTargets>true</AllowExternalTargets>\\n </ResourceShares>\\n <RequestId>2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA</RequestId>\\n</ListResourceSharesResponse>","errorExample":""}]', - 'title' => '查询共享单元列表', - 'description' => '本文将提供一个示例,查询当前账号在`cn-hangzhou`地域创建的共享单元列表。返回结果显示,当前账号`151266687691****`创建过以下2个共享单元:'."\n" - ."\n" - .'- 共享单元`rs-hX9wC5jO****`,处于已删除`Deleted`状态。'."\n" - .'- 共享单元`rs-PqysnzIj****`,处于已启用`Active`状态。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"111FB84A-60A9-403E-9067-E55D7EE95BD1\\"\\n}","errorExample":""},{"type":"xml","example":"<AssociateResourceSharePermissionResponse>\\n <RequestId>2C3FA051-61DC-4F3E-81E9-E4830524DF4B</RequestId>\\n</AssociateResourceSharePermissionResponse>","errorExample":""}]', + 'title' => '为共享单元关联共享权限', + 'description' => '本文将提供一个示例,在`cn-hangzhou`地域的共享单元`rs-6GRmdD3X****`中,关联共享权限`AliyunRSDefaultPermissionVSwitch`。', + 'changeSet' => [], ], - 'UpdateResourceShare' => [ - 'summary' => '修改共享单元信息。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'ChangeResourceGroup' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'ResourceShareId', + 'name' => 'ResourceId', 'in' => 'query', - 'schema' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'rs-qSkW1HBY****', - ], + 'schema' => ['title' => '资源Id', 'description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'example' => 'rs-dz3Ek1iiO***'], ], [ - 'name' => 'ResourceShareName', + 'name' => 'ResourceRegionId', 'in' => 'query', - 'schema' => [ - 'description' => '新的共享单元名称。'."\n" - ."\n" - .'长度范围:1~50个字符。'."\n" - ."\n" - .'格式:允许输入英文字母、数字、中文、英文句点(.)、下划线(_)或短划线(-)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'new', - ], + 'schema' => ['title' => '地域Id', 'description' => '共享单元所在的地域ID。', 'type' => 'string', 'required' => true, 'example' => 'cn-hangzhou'], ], [ - 'name' => 'AllowExternalTargets', + 'name' => 'ResourceGroupId', 'in' => 'query', - 'schema' => [ - 'description' => '是否允许共享给资源目录外的账号。取值:'."\n" - ."\n" - .'- false:仅允许资源目录内共享。'."\n" - .'- true:允许共享给任意账号。', - 'type' => 'boolean', - 'required' => false, - 'example' => 'false', - ], + 'schema' => ['title' => '目标资源组', 'description' => '目标资源组。', 'type' => 'string', 'required' => true, 'example' => 'rg-aek2nb47ueqk***'], ], ], 'responses' => [ 200 => [ + 'headers' => [], 'schema' => [ + 'title' => 'Schema of Response', 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '2860A3A4-D8C1-4EF4-954E-84A3945E26E5', - ], - 'ResourceShare' => [ - 'description' => '共享单元信息。', - 'type' => 'object', - 'properties' => [ - 'UpdateTime' => [ - 'description' => '共享单元更新时间。', - 'type' => 'string', - 'example' => '2020-12-04T08:55:25.382Z', - ], - 'ResourceShareName' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'example' => 'new', - ], - 'ResourceShareOwner' => [ - 'description' => '共享单元归属者。', - 'type' => 'string', - 'example' => '151266687691****', - ], - 'CreateTime' => [ - 'description' => '共享单元创建时间。', - 'type' => 'string', - 'example' => '2020-12-03T08:02:22.413Z', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-qSkW1HBY****', - ], - 'ResourceShareStatus' => [ - 'description' => '共享单元状态。取值:'."\n" - ."\n" - .'- Active:已启用。'."\n" - .'- Pending:待确认。'."\n" - .'- Deleting:删除中。'."\n" - .'- Deleted:已删除。'."\n" - ."\n" - .'> Deleted状态的共享单元记录,会在48~96小时内被系统自动删除。', - 'type' => 'string', - 'example' => 'Active', - ], - 'AllowExternalTargets' => [ - 'description' => '是否允许共享给资源目录外的账号。取值:'."\n" - ."\n" - .'- false:仅允许资源目录内共享。'."\n" - .'- true:允许共享给任意账号。', - 'type' => 'boolean', - 'example' => 'false', - ], - ], - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => '0A900114-22D3-5E9D-87A2-48E5EB5BF310'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MissingParameter.ResourceShareId', - 'errorMessage' => 'You must specify ResourceShareId.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareId', - 'errorMessage' => 'The ResourceShareId is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceShareName', - 'errorMessage' => 'You must specify ResourceShareName.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareName', - 'errorMessage' => 'The ResourceShareName is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareName.Length', - 'errorMessage' => 'The maximum length of ResourceShareName exceeds 50 characters.', - ], - [ - 'errorCode' => 'InvalidParameter', - 'errorMessage' => 'The specified parameter is invalid.', - ], + ['errorCode' => 'NoPermission.ChangeResourceGroup', 'errorMessage' => 'You are not authorized to change resourcegroup', 'description' => '无更改资源组权限。'], + ['errorCode' => 'MissingParameter.ResourceRegionId', 'errorMessage' => 'The ResourceRegionId parameters that are required for processing this request are missing', 'description' => 'ResourceRegionId参数缺失。'], + ['errorCode' => 'MissingParameter.ResourceId', 'errorMessage' => 'The ResourceId parameters that are required for processing this request are missing', 'description' => 'ResourceId参数缺失。'], + ['errorCode' => 'MissingParameter.ResourceGroupId', 'errorMessage' => 'The ResourceGroupId parameters that are required for processing this request are missing', 'description' => 'ResourceGroupId参数缺失。'], + ['errorCode' => 'InvalidResourceGroup', 'errorMessage' => 'The specified ResourceGroupId is invalid', 'description' => 'ResourceGroupId参数非法。'], + ['errorCode' => 'SystemError', 'errorMessage' => 'A system error occurred while processing your request', 'description' => '系统异常。'], + ['errorCode' => 'ResourceNotFound', 'errorMessage' => 'The specified resource is not found', 'description' => '您的账号下不存在该资源。'], ], - 404 => [ - [ - 'errorCode' => 'EntityNotExists.ResourceShare', - 'errorMessage' => 'The resource share does not exist in the current account.', - ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '共享单元转组', + 'summary' => '将共享单元从一个资源组转移到另外一个资源组。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeResourceGroup'], ], - 409 => [ - [ - 'errorCode' => 'OperationNotPermitted', - 'errorMessage' => 'You do not have permission to do this operation.', - ], - [ - 'errorCode' => 'ResourceShareStatusMismatchAction', - 'errorMessage' => 'The status of the resource share does not allow the specified operation.', - ], - [ - 'errorCode' => 'NotSupport.AllowExternalTargets', - 'errorMessage' => 'External sharing is not permitted for resource shares with unsupported configurations.', + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:ChangeResourceGroup', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => 'ResourceShare', 'arn' => 'acs:resourcesharing:{#regionId}:{#accountId}:resourceshare/{#ResourceShareId}'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2860A3A4-D8C1-4EF4-954E-84A3945E26E5\\",\\n \\"ResourceShare\\": {\\n \\"UpdateTime\\": \\"2020-12-04T08:55:25.382Z\\",\\n \\"ResourceShareName\\": \\"new\\",\\n \\"ResourceShareOwner\\": \\"151266687691****\\",\\n \\"CreateTime\\": \\"2020-12-03T08:02:22.413Z\\",\\n \\"ResourceShareId\\": \\"rs-qSkW1HBY****\\",\\n \\"ResourceShareStatus\\": \\"Active\\",\\n \\"AllowExternalTargets\\": false\\n }\\n}","errorExample":""},{"type":"xml","example":"<UpdateResourceShareResponse>\\n <RequestId>2860A3A4-D8C1-4EF4-954E-84A3945E26E5</RequestId>\\n <ResourceShare>\\n <ResourceShareId>rs-qSkW1HBY****</ResourceShareId>\\n <ResourceShareName>new</ResourceShareName>\\n <ResourceShareStatus>Active</ResourceShareStatus>\\n <CreateTime>2020-12-03T08:02:22.413Z</CreateTime>\\n <UpdateTime>2020-12-04T08:55:25.382Z</UpdateTime>\\n <ResourceShareOwner>151266687691****</ResourceShareOwner>\\n <AllowExternalTargets>false</AllowExternalTargets>\\n </ResourceShare>\\n</UpdateResourceShareResponse>","errorExample":""}]', - 'title' => '修改共享单元信息', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"0A900114-22D3-5E9D-87A2-48E5EB5BF310\\"\\n}","type":"json"}]', ], - 'DeleteResourceShare' => [ - 'summary' => '删除共享单元。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'CheckSharingWithResourceDirectoryStatus' => [ + 'summary' => '检查基于组织共享的状态。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'delete', - 'riskType' => 'none', - 'chargeType' => 'free', - ], - 'parameters' => [ - [ - 'name' => 'ResourceShareId', - 'in' => 'query', - 'schema' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'rs-qSkW1HBY****', - ], - ], - ], + 'systemTags' => ['operationType' => 'get'], + 'parameters' => [], 'responses' => [ 200 => [ 'schema' => [ - 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'A627EE2A-223D-4E1F-A954-394686AEA916', - ], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '819545D0-C97A-5DB3-BD73-A1B17E9A4BC1'], + 'EnableSharingWithRd' => ['description' => '是否启用与资源目录组织的共享。取值:'."\n" + ."\n" + .'- false:未启用。'."\n" + .'- true:已启用。', 'type' => 'boolean', 'example' => 'true'], ], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'MissingParameter.ResourceShareId', - 'errorMessage' => 'You must specify ResourceShareId.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareId', - 'errorMessage' => 'The ResourceShareId is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter', - 'errorMessage' => 'The specified parameter is invalid.', - ], - ], - 404 => [ - [ - 'errorCode' => 'EntityNotExists.ResourceShare', - 'errorMessage' => 'The resource share does not exist in the current account.', - ], - ], - 409 => [ - [ - 'errorCode' => 'ResourceShareStatusMismatchAction', - 'errorMessage' => 'The status of the resource share does not allow the specified operation.', - ], - [ - 'errorCode' => 'DeleteResourceShareConflict', - 'errorMessage' => 'You cannot delete a resource share while there are unfinished tasks.', - ], - ], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A627EE2A-223D-4E1F-A954-394686AEA916\\"\\n}","errorExample":""},{"type":"xml","example":"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\" ?>\\r\\n<DeleteResourceShareResponse>\\r\\n\\t<RequestId>A627EE2A-223D-4E1F-A954-394686AEA916</RequestId>\\r\\n</DeleteResourceShareResponse>\\t\\r\\n","errorExample":""}]', - 'title' => '删除共享单元', - 'description' => '删除共享单元后,与该共享单元关联的所有资源使用者都将失去对共享资源的访问权限。删除共享单元不会删除共享资源。'."\n" - ."\n" - .'已成功删除的共享单元,其状态为`Deleted`,该条记录会在48~96小时内被系统自动删除。'."\n" - ."\n" - .'本文将提供一个示例,删除地域`cn-hangzhou`下的共享单元`rs-qSkW1HBY****`。', - 'requestParamsDescription' => ' 关于公共请求参数的详情,请参见[公共参数](~~159973~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"819545D0-C97A-5DB3-BD73-A1B17E9A4BC1\\",\\n \\"EnableSharingWithRd\\": true\\n}","type":"json"}]', + 'title' => '检查基于组织共享的状态', + 'changeSet' => [], ], - 'AssociateResourceShare' => [ - 'summary' => '为共享单元关联共享资源或资源使用者。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'CreateResourceShare' => [ + 'summary' => '创建共享单元。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -1236,56 +614,40 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'ResourceShareId', + 'name' => 'ResourceShareName', 'in' => 'query', - 'schema' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'rs-6GRmdD3X****', - ], + 'schema' => ['description' => '共享单元名称。'."\n" + ."\n" + .'长度范围:1~50个字符。'."\n" + ."\n" + .'格式:允许输入英文字母、数字、中文、半角句号(.)、下划线(_)或短划线(-)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'test'], ], [ 'name' => 'Resources', 'in' => 'query', 'style' => 'repeatList', 'schema' => [ - 'description' => '资源列表。', + 'description' => '共享资源列表。', 'type' => 'array', 'items' => [ - 'description' => '资源列表。', + 'description' => '共享资源列表。', 'type' => 'object', 'properties' => [ - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多添加5个共享资源。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。'."\n" - ."\n" - .'> `Resources.N.ResourceId`与`Resources.N.ResourceType`成对出现,需要同时设置。', - 'type' => 'string', - 'required' => false, - 'example' => 'VSwitch', - ], - 'ResourceId' => [ - 'description' => '共享资源ID。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多添加5个共享资源。'."\n" - ."\n" - .'> Resources.N.ResourceId与Resources.N.ResourceType成对出现,需要同时设置。', - 'type' => 'string', - 'required' => false, - 'example' => 'vsw-bp183p93qs667muql****', - ], + 'ResourceId' => ['description' => '共享资源ID。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多添加5个共享资源。'."\n" + ."\n" + .'> `Resources.N.ResourceId`与`Resources.N.ResourceType`成对出现,需要同时设置。', 'type' => 'string', 'required' => false, 'example' => 'vsw-bp183p93qs667muql****'], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多添加5个共享资源。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。'."\n" + ."\n" + .'> `Resources.N.ResourceId`与`Resources.N.ResourceType`成对出现,需要同时设置。'."\n", 'type' => 'string', 'required' => false, 'example' => 'VSwitch'], ], 'required' => false, ], @@ -1300,19 +662,14 @@ 'schema' => [ 'description' => '资源使用者。', 'type' => 'array', - 'items' => [ - 'description' => '资源使用者。取值:'."\n" - ."\n" - .'- 当`AllowExternalTargets`为`false`时,即仅允许资源目录内共享时,资源使用者可以为资源目录ID、资源夹ID或成员ID。'."\n" - .'- 当`AllowExternalTargets`为`true`时,即允许共享给任意账号时,资源使用者可以为阿里云账号ID、资源目录ID、资源夹ID、成员ID或阿里云服务。'."\n" - ."\n" - .'更多信息,请参见[资源共享方式](~~160622~~)、[查看资源目录ID](~~111217~~)、[查看资源夹ID](~~111223~~)或[查看成员ID](~~111624~~)。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多添加5个资源使用者。', - 'type' => 'string', - 'required' => false, - 'example' => '172050525300****', - ], + 'items' => ['description' => '资源使用者。取值:'."\n" + ."\n" + .'- 当`AllowExternalTargets`为`false`时,资源使用者可以为资源目录ID、资源夹ID或成员ID。'."\n" + .'- 当`AllowExternalTargets`为`true`时,资源使用者可以为阿里云账号ID、资源目录ID、资源夹ID、成员ID或阿里云服务。'."\n" + ."\n" + .'更多信息,请参见[资源共享方式](~~160622~~)、[查看资源目录ID](~~111217~~)、[查看资源夹ID](~~111223~~)或[查看成员ID](~~111624~~)。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多添加5个资源使用者。', 'type' => 'string', 'required' => false, 'example' => '172050525300****'], 'required' => false, 'example' => '172050525300****', 'maxItems' => 20, @@ -1327,13 +684,8 @@ ."\n" .'N的取值范围:1~5,即每次最多添加5个共享资源。', 'type' => 'array', - 'items' => [ - 'description' => '共享资源ARN。'."\n" - .'> 资源ARN格式请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], + 'items' => ['description' => '共享资源ARN。'."\n" + .'> 资源ARN格式请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'required' => false, 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], 'required' => false, 'maxItems' => 20, ], @@ -1345,17 +697,25 @@ 'schema' => [ 'description' => '共享权限名称。为空时,系统自动绑定资源类型关联的默认权限。具体信息,请参见[权限库](~~465474~~)。', 'type' => 'array', - 'items' => [ - 'description' => '共享权限名称。为空时,系统自动绑定资源类型关联的默认权限。具体信息,请参见[权限库](~~465474~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'AliyunRSDefaultPermissionVSwitch', - ], + 'items' => ['description' => '共享权限名称。为空时,系统自动绑定资源类型关联的默认权限。具体信息,请参见[权限库](~~465474~~)。', 'type' => 'string', 'required' => false, 'example' => 'AliyunRSDefaultPermissionVSwitch'], 'required' => false, 'maxItems' => 20, ], ], [ + 'name' => 'AllowExternalTargets', + 'in' => 'query', + 'schema' => ['description' => '是否允许共享给资源目录外的账号。取值:'."\n" + ."\n" + .'- false(默认值):仅允许资源目录内共享。'."\n" + .'- true:允许共享给任意账号。', 'type' => 'boolean', 'required' => false, 'example' => 'false'], + ], + [ + 'name' => 'ResourceGroupId', + 'in' => 'query', + 'schema' => ['description' => '资源组ID。', 'type' => 'string', 'required' => false, 'example' => 'rg-aekz5nlvlak****'], + ], + [ 'name' => 'TargetProperties', 'in' => 'query', 'style' => 'flat', @@ -1368,30 +728,20 @@ .'> 仅当资源使用者为阿里云服务时可以设置该参数。', 'type' => 'object', 'properties' => [ - 'TargetId' => [ - 'description' => '资源使用者ID。'."\n" - ."\n" - .'> `TargetProperties.N.TargetId`与`TargetProperties.N.Property`成对出现,需要同时设置。', - 'type' => 'string', - 'required' => false, - 'example' => '172050525300****', - ], - 'Property' => [ - 'description' => '资源使用者属性参数。例如:您可以设置资源共享的时间段。`timeRangeType`取值:'."\n" - .'- timeRange:指定时间段。'."\n" - .'- day:全天。'."\n" - .'> `TargetProperties.N.TargetId`与`TargetProperties.N.Property`成对出现,需要同时设置。', - 'type' => 'string', - 'required' => false, - 'example' => '{'."\n" - .' "timeRange":{'."\n" - .' "timeRangeType":"timeRange",'."\n" - .' "beginAtTime":"00:00",'."\n" - .' "timezone":"UTC+8",'."\n" - .' "endAtTime":"19:59"'."\n" - .' }'."\n" - .'}', - ], + 'Property' => ['description' => '资源使用者属性参数。例如:您可以设置资源共享的时间段。`timeRangeType`取值:'."\n" + .'- timeRange:指定时间段。'."\n" + .'- day:全天。'."\n" + .'> `TargetProperties.N.TargetId`与`TargetProperties.N.Property`成对出现,需要同时设置。', 'type' => 'string', 'required' => false, 'example' => '{'."\n" + .' "timeRange":{'."\n" + .' "timeRangeType":"timeRange",'."\n" + .' "beginAtTime":"00:00",'."\n" + .' "timezone":"UTC+8",'."\n" + .' "endAtTime":"19:59"'."\n" + .' }'."\n" + .'}'], + 'TargetId' => ['description' => '资源使用者ID。'."\n" + ."\n" + .'> `TargetProperties.N.TargetId`与`TargetProperties.N.Property`成对出现,需要同时设置。', 'type' => 'string', 'required' => false, 'example' => '172050525300****'], ], 'required' => false, ], @@ -1411,20 +761,30 @@ 'description' => '资源属性列表。', 'type' => 'object', 'properties' => [ - 'ResourceArn' => [ - 'title' => '资源ARN。', - 'description' => '资源ARN。', - 'type' => 'string', - 'required' => false, - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - 'Property' => [ - 'title' => '资源属性。', - 'description' => '资源属性。', - 'type' => 'string', - 'required' => false, - 'example' => '{"sharePrincipals":true,"shareTagOptions":false}', - ], + 'Property' => ['title' => '资源属性。', 'description' => '资源属性。', 'type' => 'string', 'required' => false, 'example' => '{"sharePrincipals":true,"shareTagOptions":false}'], + 'ResourceArn' => ['title' => '资源ARN。', 'description' => '资源ARN。', 'type' => 'string', 'required' => false, 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + ], + 'required' => false, + ], + 'required' => false, + 'maxItems' => 20, + ], + ], + [ + 'name' => 'Tag', + 'in' => 'query', + 'style' => 'repeatList', + 'schema' => [ + 'description' => '标签列表。最多可以绑定 20 个标签。', + 'type' => 'array', + 'items' => [ + 'description' => '标签列表。', + 'type' => 'object', + 'properties' => [ + 'Key' => ['description' => '标签键。'."\n" + .'> 最多支持 128 个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'k1'], + 'Value' => ['description' => '标签值。'."\n" + .'> 最多支持 128 个字符,不能以`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'v1'], ], 'required' => false, ], @@ -1436,115 +796,31 @@ 'responses' => [ 200 => [ 'schema' => [ - 'description' => '返回结果。', + 'description' => '返回参数。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '111FB84A-60A9-403E-9067-E55D7EE95BD1', - ], - 'ResourceShareAssociations' => [ - 'description' => '共享单元关联的共享资源或资源使用者信息。', - 'type' => 'array', - 'items' => [ - 'description' => '共享单元关联的共享资源或资源使用者信息。', - 'type' => 'object', - 'properties' => [ - 'UpdateTime' => [ - 'description' => '更新关联的时间。存在以下两种情况:'."\n" - ."\n" - .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为更新资源的时间。'."\n" - .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为更新资源使用者的时间。', - 'type' => 'string', - 'example' => '2020-12-04T09:40:41.246Z', - ], - 'ResourceArn' => [ - 'description' => '关联资源ARN。'."\n" - .'> 当关联类型`AssociationType`为资源使用者`Target`时,该参数不可用。', - 'type' => 'string', - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - 'ResourceShareName' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'example' => 'test', - ], - 'CreateTime' => [ - 'description' => '关联的时间。存在以下两种情况:'."\n" - ."\n" - .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为添加资源的时间。'."\n" - .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为添加资源使用者的时间。', - 'type' => 'string', - 'example' => '2020-12-04T09:40:41.246Z', - ], - 'EntityType' => [ - 'description' => '关联实体类型。取值:'."\n" - ."\n" - .'- 当关联实体为资源时,该参数为资源类型。更多信息,请参见[支持资源共享的云服务](~~450526~~)。'."\n" - .'- 当关联实体为资源使用者时,该参数为`Account`。', - 'type' => 'string', - 'example' => 'VSwitch', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-6GRmdD3X****', - ], - 'AssociationStatusMessage' => [ - 'description' => '关联失败的原因。', - 'type' => 'string', - 'example' => 'The reason for the association failure.', - ], - 'AssociationType' => [ - 'description' => '关联类型。取值:'."\n" - ."\n" - .'- Resource:资源。'."\n" - .'- Target:资源使用者。'."\n", - 'type' => 'string', - 'example' => 'Resource', - ], - 'AssociationStatus' => [ - 'description' => '关联状态。取值:'."\n" - ."\n" - .'- Associating:关联中。'."\n" - .'- Associated:已关联。'."\n" - .'- Failed:关联失败。'."\n" - .'- Disassociating:分离中。'."\n" - .'- Disassociated:已分离。'."\n" - ."\n" - .'> `Failed`和`Disassociated`状态的记录,会在48~96小时内被系统自动删除。', - 'type' => 'string', - 'example' => 'Associating', - ], - 'TargetProperty' => [ - 'description' => '资源使用者属性。例如:资源共享的时间段。'."\n" - .'> 仅当资源使用者为阿里云服务时返回设置该参数。', - 'type' => 'string', - 'example' => '{'."\n" - .' "plan":{'."\n" - .' "timeRangeType":"timeRange",'."\n" - .' "beginAtTime":"00:00",'."\n" - .' "timezone":"UTC+8",'."\n" - .' "endAtTime":"19:59"'."\n" - .' }'."\n" - .'}', - ], - 'EntityId' => [ - 'description' => '关联实体ID。取值:'."\n" - ."\n" - .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为资源ID。'."\n" - .'- 当关联类型`AssociationType`为资源使用者`Target` 时,该参数为资源使用者ID。', - 'type' => 'string', - 'example' => 'vsw-bp183p93qs667muql****', - ], - 'ResourceProperty' => [ - 'title' => '资源属性。', - 'description' => '资源属性。', - 'type' => 'string', - 'example' => '{"sharePrincipals":true,"shareTagOptions":false}', - ], - ], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '2C3FA051-61DC-4F3E-81E9-E4830524DF4B'], + 'ResourceShare' => [ + 'description' => '共享单元信息。', + 'type' => 'object', + 'properties' => [ + 'AllowExternalTargets' => ['description' => '是否允许共享给资源目录外的账号。取值:'."\n" + ."\n" + .'- false:仅允许资源目录内共享。'."\n" + .'- true:允许共享给任意账号。', 'type' => 'boolean', 'example' => 'false'], + 'CreateTime' => ['description' => '共享单元创建时间。', 'type' => 'string', 'example' => '2020-12-03T08:02:22.413Z'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-qSkW1HBY****'], + 'ResourceShareName' => ['description' => '共享单元名称。', 'type' => 'string', 'example' => 'test'], + 'ResourceShareOwner' => ['description' => '共享单元归属者。', 'type' => 'string', 'example' => '151266687691****'], + 'ResourceShareStatus' => ['description' => '共享单元状态。取值:'."\n" + ."\n" + .'- Active:已启用。'."\n" + .'- Pending:待确认。'."\n" + .'- Deleting:删除中。'."\n" + .'- Deleted:已删除。'."\n" + ."\n" + .'> Deleted状态的共享单元记录,会在48~96小时内被系统自动删除。', 'type' => 'string', 'example' => 'Active'], + 'UpdateTime' => ['description' => '共享单元更新时间。', 'type' => 'string', 'example' => '2020-12-03T08:02:22.413Z'], ], ], ], @@ -1553,193 +829,200 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MissingParameter.ResourceShareId', - 'errorMessage' => 'You must specify ResourceShareId.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareId', - 'errorMessage' => 'The ResourceShareId is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.Resources', - 'errorMessage' => 'The Resources is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.Resources.Duplicate', - 'errorMessage' => 'The Resources contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.Resources.Length', - 'errorMessage' => 'The maximum number of Resources exceeds 5.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets', - 'errorMessage' => 'The Targets is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets.Duplicate', - 'errorMessage' => 'The Targets contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets.Length', - 'errorMessage' => 'The maximum number of Targets exceeds 5.', - ], - [ - 'errorCode' => 'InvalidTarget', - 'errorMessage' => 'The shared target does not exist in the resource directory.', - ], - [ - 'errorCode' => 'ResourceAndTargetBothEmpty', - 'errorMessage' => 'Either a resource or a shared target must be specified.', - ], - [ - 'errorCode' => 'InvalidParameter', - 'errorMessage' => 'The specified parameter is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.PermissionNames.Duplicate', - 'errorMessage' => 'The PermissionNames duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.PermissionNames.Length', - 'errorMessage' => 'The maximum length of PermissionNames exceeds quota limit.', - ], - [ - 'errorCode' => 'InvalidParameter.TargetProperties', - 'errorMessage' => 'The TargetProperties is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.TargetProperties.Duplicate', - 'errorMessage' => 'The TargetProperties contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.TargetProperties.Length', - 'errorMessage' => 'The TargetProperties beyond the length limit.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns', - 'errorMessage' => 'The ResourceArns is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns.Duplicate', - 'errorMessage' => 'The ResourceArns contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns.Length', - 'errorMessage' => 'The ResourceArns beyond the length limit.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceConflict', - 'errorMessage' => 'Both Resources and ResourceArns cannot be specified simultaneously. Please provide only one of these parameters.', - ], - [ - 'errorCode' => 'NotSupport.ResourceType.ResourcesParameter', - 'errorMessage' => 'The Resources parameter does not support this resource type. Please use ResourceArns instead.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceProperties', - 'errorMessage' => 'The ResourceProperties is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceProperties.Duplicate', - 'errorMessage' => 'The ResourceProperties contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceProperties.Length', - 'errorMessage' => 'The ResourceProperties beyond the length limit.', - ], - [ - 'errorCode' => 'NotSupport.ResourceProperty', - 'errorMessage' => 'The resource type does not support resource property.', - ], + ['errorCode' => 'InvalidParameter.ResourceShareName', 'errorMessage' => 'The ResourceShareName is invalid.', 'description' => '共享单元名称无效。'], + ['errorCode' => 'InvalidParameter.ResourceShareName.Length', 'errorMessage' => 'The maximum length of ResourceShareName exceeds 50 characters.', 'description' => '共享单元名称字数超长(最大50字符)。'], + ['errorCode' => 'InvalidParameter.Resources', 'errorMessage' => 'The Resources is invalid.', 'description' => '选定的共享资源无效。'], + ['errorCode' => 'InvalidParameter.Resources.Duplicate', 'errorMessage' => 'The Resources contains duplicate values.', 'description' => '选定的共享资源有重复项。'], + ['errorCode' => 'InvalidParameter.Resources.Length', 'errorMessage' => 'The maximum number of Resources exceeds 5.', 'description' => '选定的共享资源数量超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.Targets', 'errorMessage' => 'The Targets is invalid.', 'description' => '资源使用者的参数不符合规则。'], + ['errorCode' => 'InvalidParameter.Targets.Duplicate', 'errorMessage' => 'The Targets contains duplicate values.', 'description' => '资源使用者有重复项。'], + ['errorCode' => 'InvalidParameter.Targets.Length', 'errorMessage' => 'The maximum number of Targets exceeds 5.', 'description' => '资源使用者数量超限(最大5个)。'], + ['errorCode' => 'InvalidTarget', 'errorMessage' => 'The shared target does not exist in the resource directory.', 'description' => '资源使用者不在资源目录内。'], + ['errorCode' => 'InvalidParameter', 'errorMessage' => 'The specified parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => 'MissingParameter.ResourceShareName', 'errorMessage' => 'You must specify ResourceShareName.', 'description' => '共享单元名称缺失。'], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType is invalid.', 'description' => '传入的资源类型错误。'], + ['errorCode' => 'InvalidParameter.PermissionNames.Duplicate', 'errorMessage' => 'The PermissionNames duplicate values.', 'description' => '参数PermissionNames重复。'], + ['errorCode' => 'InvalidParameter.PermissionNames.Length', 'errorMessage' => 'The maximum length of PermissionNames exceeds quota limit.', 'description' => 'PermissionNames长度超限。'], + ['errorCode' => 'InvalidParameter.TargetProperties', 'errorMessage' => 'The TargetProperties is invalid.', 'description' => 'TargetProperties参数无效。'], + ['errorCode' => 'InvalidParameter.TargetProperties.Duplicate', 'errorMessage' => 'The TargetProperties contains duplicate values.', 'description' => 'TargetProperties包含重复的参数。'], + ['errorCode' => 'InvalidParameter.TargetProperties.Length', 'errorMessage' => 'The TargetProperties beyond the length limit.', 'description' => 'TargetProperties数量超过限制。'], + ['errorCode' => 'InvalidParameter.ResourceArns', 'errorMessage' => 'The ResourceArns is invalid.', 'description' => 'ResourceArns参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceArns.Duplicate', 'errorMessage' => 'The ResourceArns contains duplicate values.', 'description' => '资源ARN参数有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceArns.Length', 'errorMessage' => 'The ResourceArns beyond the length limit.', 'description' => '资源ARN数量超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.ResourceConflict', 'errorMessage' => 'Both Resources and ResourceArns cannot be specified simultaneously. Please provide only one of these parameters.', 'description' => 'Resources 和 ResourceArns 不能同时指定。请仅提供其中一个参数。'], + ['errorCode' => 'NotSupport.ResourceType.ResourcesParameter', 'errorMessage' => 'The Resources parameter does not support this resource type. Please use ResourceArns instead.', 'description' => '当前资源类型不支持Resources参数,请使用ResourceArns参数。'], + ['errorCode' => 'InvalidParameter.ResourceProperties', 'errorMessage' => 'The ResourceProperties is invalid.', 'description' => '资源属性参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceProperties.Duplicate', 'errorMessage' => 'The ResourceProperties contains duplicate values.', 'description' => '资源属性参数有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceProperties.Length', 'errorMessage' => 'The ResourceProperties beyond the length limit.', 'description' => '资源属性数量超限(最大5个)。'], + ['errorCode' => 'NotSupport.ResourceProperty', 'errorMessage' => 'The resource type does not support resource property.', 'description' => '资源类型不支持属性。'], ], 404 => [ - [ - 'errorCode' => 'EntityNotExists.ResourceShare', - 'errorMessage' => 'The resource share does not exist in the current account.', - ], - [ - 'errorCode' => 'EntityNotExists.Permission', - 'errorMessage' => 'The resource share permission does not exist.', - ], + ['errorCode' => 'EntityNotExists.Permission', 'errorMessage' => 'The resource share permission does not exist.', 'description' => '共享权限不存在。'], ], 409 => [ - [ - 'errorCode' => 'NotEnableSharingWithResourceDirectory', - 'errorMessage' => 'You have not enabled sharing with your Resource Directory.', - ], - [ - 'errorCode' => 'AccountNotInResourceDirectory', - 'errorMessage' => 'The account is not a master or a member of a resource directory.', - ], - [ - 'errorCode' => 'ResourceShareStatusMismatchAction', - 'errorMessage' => 'The status of the resource share does not allow the specified operation.', - ], - [ - 'errorCode' => 'QuotaExceeded.SharedResource.Count', - 'errorMessage' => 'The maximum number of shared resources per account exceeds the limit.', - ], - [ - 'errorCode' => 'ShareWithYourself', - 'errorMessage' => 'You cannot share resources with yourself.', - ], - [ - 'errorCode' => 'AssociateConflict', - 'errorMessage' => 'You cannot perform the operation while disassociation operation is being performed.', - ], - [ - 'errorCode' => 'NotManagementAccount', - 'errorMessage' => 'Only the management account of the service is allowed to share such resources.', - ], - [ - 'errorCode' => 'QuotaExceeded.PendingInvitations', - 'errorMessage' => 'The maximum number of pending invitations exceeds the limit.', - ], - [ - 'errorCode' => 'InvalidTarget.LegalEntityMismatch', - 'errorMessage' => 'The target account does not have the same legal entity as the resource owner account.', - ], - [ - 'errorCode' => 'ExternalTargetsNotAllowed.ResourceType', - 'errorMessage' => 'The resource share includes resource types that cannot be shared with accounts outside the resource directory.', - ], - [ - 'errorCode' => 'InvalidTarget.SiteMismatch', - 'errorMessage' => 'Cross-site resource sharing is not supported.', - ], - [ - 'errorCode' => 'NotSupport.Service.ExistInOtherResourceShare', - 'errorMessage' => 'The resource type has been shared to the target service through other resourceShare. Please share it in the same resourceShare.', + ['errorCode' => 'NotEnableSharingWithResourceDirectory', 'errorMessage' => 'You have not enabled sharing with your Resource Directory.', 'description' => '未开启与资源目录组织的共享。'], + ['errorCode' => 'AccountNotInResourceDirectory', 'errorMessage' => 'The account is not a master or a member of a resource directory.', 'description' => '资源使用者不在资源目录内。'], + ['errorCode' => 'QuotaExceeded.ResourceShare.Count', 'errorMessage' => 'The maximum number of ResourceShare exceeds the limit.', 'description' => '共享单元数量超出限制。'], + ['errorCode' => 'EntityAlreadyExists.ResourceShare', 'errorMessage' => 'The specified resource share ID already exists.', 'description' => '共享单元ID已存在。'], + ['errorCode' => 'QuotaExceeded.SharedResource.Count', 'errorMessage' => 'The maximum number of shared resources per account exceeds the limit.', 'description' => '共享的资源超出单个账号最大限制。'], + ['errorCode' => 'ShareWithYourself', 'errorMessage' => 'You cannot share resources with yourself.', 'description' => '资源使用者不能是自己。'], + ['errorCode' => 'NotManagementAccount', 'errorMessage' => 'Only the management account of the service is allowed to share such resources.', 'description' => '当前资源类型仅支持资源目录的管理账号共享资源。如仍需使用当前账号,请联系管理账号将当前账号设置为当前资源类型所属可信服务的委派管理员账号。'], + ['errorCode' => 'QuotaExceeded.PendingInvitations', 'errorMessage' => 'The maximum number of pending invitations exceeds the limit.', 'description' => '邀请数量超出限制。'], + ['errorCode' => 'InvalidTarget.LegalEntityMismatch', 'errorMessage' => 'The target account does not have the same legal entity as the resource owner account.', 'description' => '共享目标账号的企业名称与共享者不一致。'], + ['errorCode' => 'ExternalTargetsNotAllowed.ResourceType', 'errorMessage' => 'The resource share includes resource types that cannot be shared with accounts outside the resource directory.', 'description' => '共享单元中包含不支持组织外共享的资源类型。'], + ['errorCode' => 'InvalidTarget.SiteMismatch', 'errorMessage' => 'Cross-site resource sharing is not supported.', 'description' => '共享目标账号与共享者站点不一致。'], + ['errorCode' => 'NotSupport.Service.ExistInOtherResourceShare', 'errorMessage' => 'The resource type has been shared to the target service through other resourceShare. Please share it in the same resourceShare.', 'description' => '此资源类型已经通过其他共享单元共享给目标云服务,请在同一个共享单元中共享。'], + ['errorCode' => 'NotSupport.Service.AssociateConflict', 'errorMessage' => 'The same resource cannot be shared repeatedly to the target service.', 'description' => '同一个资源不允许重复共享给目标云服务。'], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2C3FA051-61DC-4F3E-81E9-E4830524DF4B\\",\\n \\"ResourceShare\\": {\\n \\"AllowExternalTargets\\": false,\\n \\"CreateTime\\": \\"2020-12-03T08:02:22.413Z\\",\\n \\"ResourceShareId\\": \\"rs-qSkW1HBY****\\",\\n \\"ResourceShareName\\": \\"test\\",\\n \\"ResourceShareOwner\\": \\"151266687691****\\",\\n \\"ResourceShareStatus\\": \\"Active\\",\\n \\"UpdateTime\\": \\"2020-12-03T08:02:22.413Z\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<CreateResourceShareResponse>\\n <RequestId>2C3FA051-61DC-4F3E-81E9-E4830524DF4B</RequestId>\\n <ResourceShare>\\n <ResourceShareId>rs-qSkW1HBY****</ResourceShareId>\\n <ResourceShareName>test</ResourceShareName>\\n <ResourceShareStatus>Active</ResourceShareStatus>\\n <CreateTime>2020-12-03T08:02:22.413Z</CreateTime>\\n <UpdateTime>2020-12-03T08:02:22.413Z</UpdateTime>\\n <ResourceShareOwner>151266687691****</ResourceShareOwner>\\n <AllowExternalTargets>false</AllowExternalTargets>\\n </ResourceShare>\\n</CreateResourceShareResponse>","errorExample":""}]', + 'title' => '创建共享单元', + 'description' => '阿里云资源共享(Resource Sharing)支持将一个账号下的指定资源共享给一个或多个目标账号使用。更多信息,请参见[资源共享概述](~~160622~~)。'."\n" + ."\n" + .'本文将提供一个示例,在`cn-hangzhou`地域,使用资源目录管理账号创建一个名为`test`的共享单元,将VPC交换机`vsw-bp183p93qs667muql****`共享给资源目录内的成员`172050525300****`。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateResourceShare'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'resourcesharing:CreateResourceShare', + 'authLevel' => 'operate', + 'actionConditions' => [ + ['conditionKey' => 'resourcesharing:RequestedAllowExternalTargets', 'validationType' => 'always'], + ['conditionKey' => 'resourcesharing:Target', 'validationType' => 'always'], + ['conditionKey' => 'resourcesharing:RequestedResourceType'], + ['conditionKey' => 'resourcesharing:ResourceArn'], + ], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], - [ - 'errorCode' => 'NotSupport.Service.AssociateConflict', - 'errorMessage' => 'The same resource cannot be shared repeatedly to the target service.', + ], + ], + ], + 'DeleteResourceShare' => [ + 'summary' => '删除共享单元。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'ResourceShareId', + 'in' => 'query', + 'schema' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'rs-qSkW1HBY****'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'description' => '返回结果。', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'A627EE2A-223D-4E1F-A954-394686AEA916'], + ], ], - [ - 'errorCode' => 'NotSupport.ResourcePropertyConflict', - 'errorMessage' => 'The ResourceProperty can not be updated until the last operation is completed.', + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'MissingParameter.ResourceShareId', 'errorMessage' => 'You must specify ResourceShareId.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceShareId', 'errorMessage' => 'The ResourceShareId is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter', 'errorMessage' => 'The specified parameter is invalid.', 'description' => ''], + ], + 404 => [ + ['errorCode' => 'EntityNotExists.ResourceShare', 'errorMessage' => 'The resource share does not exist in the current account.', 'description' => ''], + ], + 409 => [ + ['errorCode' => 'ResourceShareStatusMismatchAction', 'errorMessage' => 'The status of the resource share does not allow the specified operation.', 'description' => ''], + ['errorCode' => 'DeleteResourceShareConflict', 'errorMessage' => 'You cannot delete a resource share while there are unfinished tasks.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A627EE2A-223D-4E1F-A954-394686AEA916\\"\\n}","errorExample":""},{"type":"xml","example":"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\" ?>\\r\\n<DeleteResourceShareResponse>\\r\\n\\t<RequestId>A627EE2A-223D-4E1F-A954-394686AEA916</RequestId>\\r\\n</DeleteResourceShareResponse>\\t\\r\\n","errorExample":""}]', + 'title' => '删除共享单元', + 'description' => '删除共享单元后,与该共享单元关联的所有资源使用者都将失去对共享资源的访问权限。删除共享单元不会删除共享资源。'."\n" + ."\n" + .'已成功删除的共享单元,其状态为`Deleted`,该条记录会在48~96小时内被系统自动删除。'."\n" + ."\n" + .'本文将提供一个示例,删除地域`cn-hangzhou`下的共享单元`rs-qSkW1HBY****`。', + 'requestParamsDescription' => ' 关于公共请求参数的详情,请参见[公共参数](~~159973~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + ], + 'DescribeRegions' => [ + 'summary' => '查询支持资源共享的地域。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], + 'parameters' => [ + [ + 'name' => 'AcceptLanguage', + 'in' => 'query', + 'schema' => ['description' => '支持的语言。取值:'."\n" + .'- 中文:zh-CN。'."\n" + .'- 英文:en-US。'."\n", 'type' => 'string', 'required' => false, 'example' => 'zh-CN'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'description' => '返回结果。', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '0D64A198-5842-4570-8E26-5E540CDC84CD'], + 'Regions' => [ + 'description' => '地域信息。', + 'type' => 'array', + 'items' => [ + 'description' => '地域信息。', + 'type' => 'object', + 'properties' => [ + 'RegionEndpoint' => ['description' => '地域的接入地址。', 'type' => 'string', 'example' => 'resourcesharing.cn-hangzhou.aliyuncs.com'], + 'LocalName' => ['description' => '地域名称。', 'type' => 'string', 'example' => '华东1(杭州)'], + 'RegionId' => ['description' => '地域ID。', 'type' => 'string', 'example' => 'cn-hangzhou'], + ], + ], + ], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"111FB84A-60A9-403E-9067-E55D7EE95BD1\\",\\n \\"ResourceShareAssociations\\": [\\n {\\n \\"UpdateTime\\": \\"2020-12-04T09:40:41.246Z\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceShareName\\": \\"test\\",\\n \\"CreateTime\\": \\"2020-12-04T09:40:41.246Z\\",\\n \\"EntityType\\": \\"VSwitch\\",\\n \\"ResourceShareId\\": \\"rs-6GRmdD3X****\\",\\n \\"AssociationStatusMessage\\": \\"The reason for the association failure.\\",\\n \\"AssociationType\\": \\"Resource\\",\\n \\"AssociationStatus\\": \\"Associating\\",\\n \\"TargetProperty\\": \\"{\\\\n \\\\\\"plan\\\\\\":{\\\\n \\\\\\"timeRangeType\\\\\\":\\\\\\"timeRange\\\\\\",\\\\n \\\\\\"beginAtTime\\\\\\":\\\\\\"00:00\\\\\\",\\\\n \\\\\\"timezone\\\\\\":\\\\\\"UTC+8\\\\\\",\\\\n \\\\\\"endAtTime\\\\\\":\\\\\\"19:59\\\\\\"\\\\n }\\\\n}\\",\\n \\"EntityId\\": \\"vsw-bp183p93qs667muql****\\",\\n \\"ResourceProperty\\": \\"{\\\\\\"sharePrincipals\\\\\\":true,\\\\\\"shareTagOptions\\\\\\":false}\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\" ?>\\r\\n<AssociateResourceShareResponse>\\r\\n\\t<ResourceShareAssociations>\\r\\n\\t\\t<ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\r\\n\\t\\t<EntityId>vsw-bp183p93qs667muql****</EntityId>\\r\\n\\t\\t<EntityType>VSwitch</EntityType>\\r\\n\\t\\t<AssociationStatusMessage></AssociationStatusMessage>\\r\\n\\t\\t<AssociationType>Resource</AssociationType>\\r\\n\\t\\t<CreateTime>2020-12-04T09:40:41.246Z</CreateTime>\\r\\n\\t\\t<UpdateTime>2020-12-04T09:40:41.246Z</UpdateTime>\\r\\n\\t\\t<ResourceShareName>test</ResourceShareName>\\r\\n\\t\\t<AssociationStatus>Associating</AssociationStatus>\\r\\n\\t</ResourceShareAssociations>\\r\\n\\t<ResourceShareAssociations>\\r\\n\\t\\t<ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\r\\n\\t\\t<EntityId>172050525300****</EntityId>\\r\\n\\t\\t<EntityType>Account</EntityType>\\r\\n\\t\\t<AssociationStatusMessage></AssociationStatusMessage>\\r\\n\\t\\t<AssociationType>Target</AssociationType>\\r\\n\\t\\t<CreateTime>2020-12-04T09:40:41.250Z</CreateTime>\\r\\n\\t\\t<UpdateTime>2020-12-04T09:40:41.250Z</UpdateTime>\\r\\n\\t\\t<ResourceShareName>test1</ResourceShareName>\\r\\n\\t\\t<AssociationStatus>Associating</AssociationStatus>\\r\\n\\t</ResourceShareAssociations>\\r\\n\\t<RequestId>111FB84A-60A9-403E-9067-E55D7EE95BD1</RequestId>\\r\\n</AssociateResourceShareResponse>\\t\\r\\n","errorExample":""}]', - 'title' => '关联共享资源或资源使用者', - 'description' => '本文将提供一个示例,在`cn-hangzhou`地域的共享单元`rs-6GRmdD3X****`中,添加共享资源VPC交换机`vsw-bp183p93qs667muql****`,将其共享给资源目录内的成员`172050525300****`。', + 'title' => '查询支持资源共享的地域', + 'requestParamsDescription' => ' 关于公共请求参数的详情,请参见[公共参数](~~159973~~)。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DescribeRegions'], + ], + ], + 'ramActions' => [], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"0D64A198-5842-4570-8E26-5E540CDC84CD\\",\\n \\"Regions\\": [\\n {\\n \\"RegionEndpoint\\": \\"resourcesharing.cn-hangzhou.aliyuncs.com\\",\\n \\"LocalName\\": \\"华东1(杭州)\\",\\n \\"RegionId\\": \\"cn-hangzhou\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<DescribeRegionsResponse>\\n <RequestId>9BF57A2D-5108-58A1-BF2B-812BB4026666</RequestId>\\n <Regions>\\n <RegionId>cn-hangzhou</RegionId>\\n <RegionEndpoint>resourcesharing.cn-hangzhou.aliyuncs.com</RegionEndpoint>\\n <LocalName>华东1(杭州)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-shanghai</RegionId>\\n <RegionEndpoint>resourcesharing.cn-shanghai.aliyuncs.com</RegionEndpoint>\\n <LocalName>华东2(上海)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-qingdao</RegionId>\\n <RegionEndpoint>resourcesharing.cn-qingdao.aliyuncs.com</RegionEndpoint>\\n <LocalName>华北1(青岛)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-beijing</RegionId>\\n <RegionEndpoint>resourcesharing.cn-beijing.aliyuncs.com</RegionEndpoint>\\n <LocalName>华北2(北京)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-zhangjiakou</RegionId>\\n <RegionEndpoint>resourcesharing.cn-zhangjiakou.aliyuncs.com</RegionEndpoint>\\n <LocalName>华北3(张家口)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-huhehaote</RegionId>\\n <RegionEndpoint>resourcesharing.cn-huhehaote.aliyuncs.com</RegionEndpoint>\\n <LocalName>华北5(呼和浩特)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-shenzhen</RegionId>\\n <RegionEndpoint>resourcesharing.cn-shenzhen.aliyuncs.com</RegionEndpoint>\\n <LocalName>华南1(深圳)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-heyuan</RegionId>\\n <RegionEndpoint>resourcesharing.cn-heyuan.aliyuncs.com</RegionEndpoint>\\n <LocalName>华南2(河源)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-guangzhou</RegionId>\\n <RegionEndpoint>resourcesharing.cn-guangzhou.aliyuncs.com</RegionEndpoint>\\n <LocalName>华南3(广州)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-chengdu</RegionId>\\n <RegionEndpoint>resourcesharing.cn-chengdu.aliyuncs.com</RegionEndpoint>\\n <LocalName>西南1(成都)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-hongkong</RegionId>\\n <RegionEndpoint>resourcesharing.cn-hongkong.aliyuncs.com</RegionEndpoint>\\n <LocalName>中国(香港)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-1</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>新加坡</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-northeast-1</RegionId>\\n <RegionEndpoint>resourcesharing.ap-northeast-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>日本(东京)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-northeast-2</RegionId>\\n <RegionEndpoint>resourcesharing.ap-northeast-2.aliyuncs.com</RegionEndpoint>\\n <LocalName>韩国(首尔)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-2</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-2.aliyuncs.com</RegionEndpoint>\\n <LocalName>澳大利亚(悉尼)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-3</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-3.aliyuncs.com</RegionEndpoint>\\n <LocalName>马来西亚(吉隆坡)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-5</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-5.aliyuncs.com</RegionEndpoint>\\n <LocalName>印度尼西亚(雅加达)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-6</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-6.aliyuncs.com</RegionEndpoint>\\n <LocalName>菲律宾(马尼拉)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-7</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-7.aliyuncs.com</RegionEndpoint>\\n <LocalName>泰国(曼谷)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-south-1</RegionId>\\n <RegionEndpoint>resourcesharing.ap-south-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>印度(孟买)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>eu-central-1</RegionId>\\n <RegionEndpoint>resourcesharing.eu-central-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>德国(法兰克福)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>eu-west-1</RegionId>\\n <RegionEndpoint>resourcesharing.eu-west-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>英国(伦敦)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>us-east-1</RegionId>\\n <RegionEndpoint>resourcesharing.us-east-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>美国(弗吉尼亚)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>us-west-1</RegionId>\\n <RegionEndpoint>resourcesharing.us-west-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>美国(硅谷)</LocalName>\\n </Regions>\\n</DescribeRegionsResponse>","errorExample":""}]', ], 'DisassociateResourceShare' => [ 'summary' => '为共享单元移除共享资源或资源使用者。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -1747,22 +1030,12 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'ResourceShareId', 'in' => 'query', - 'schema' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'rs-6GRmdD3X****', - ], + 'schema' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'rs-6GRmdD3X****'], ], [ 'name' => 'Resources', @@ -1775,28 +1048,18 @@ 'description' => '资源列表。', 'type' => 'object', 'properties' => [ - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多移除5个共享资源。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。'."\n" - ."\n" - .'> Resources.N.ResourceId与Resources.N.ResourceType成对出现,需要同时设置。', - 'type' => 'string', - 'required' => false, - 'example' => 'VSwitch', - ], - 'ResourceId' => [ - 'description' => '共享资源ID。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多移除5个共享资源。'."\n" - ."\n" - .'> Resources.N.ResourceId与Resources.N.ResourceType成对出现,需要同时设置。', - 'type' => 'string', - 'required' => false, - 'example' => 'vsw-bp183p93qs667muql****', - ], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多移除5个共享资源。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。'."\n" + ."\n" + .'> Resources.N.ResourceId与Resources.N.ResourceType成对出现,需要同时设置。', 'type' => 'string', 'required' => false, 'example' => 'VSwitch'], + 'ResourceId' => ['description' => '共享资源ID。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多移除5个共享资源。'."\n" + ."\n" + .'> Resources.N.ResourceId与Resources.N.ResourceType成对出现,需要同时设置。', 'type' => 'string', 'required' => false, 'example' => 'vsw-bp183p93qs667muql****'], ], 'required' => false, ], @@ -1811,14 +1074,9 @@ 'schema' => [ 'description' => '资源使用者。', 'type' => 'array', - 'items' => [ - 'description' => '资源使用者。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多添加5个资源使用者。', - 'type' => 'string', - 'required' => false, - 'example' => '172050525300****', - ], + 'items' => ['description' => '资源使用者。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多添加5个资源使用者。', 'type' => 'string', 'required' => false, 'example' => '172050525300****'], 'required' => false, 'example' => '172050525300****', 'maxItems' => 20, @@ -1833,13 +1091,8 @@ ."\n" .'N的取值范围:1~5,即每次最多移除5个共享资源。', 'type' => 'array', - 'items' => [ - 'description' => '共享资源ARN。'."\n" - .'> 资源ARN格式请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], + 'items' => ['description' => '共享资源ARN。'."\n" + .'> 资源ARN格式请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'required' => false, 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], 'required' => false, 'maxItems' => 20, ], @@ -1847,15 +1100,10 @@ [ 'name' => 'ResourceOwner', 'in' => 'query', - 'schema' => [ - 'description' => '共享单元归属者。取值:'."\n" - ."\n" - .'- Self(默认值):共享单元归属于当前账号。适用于资源目录内共享时,资源所有者移除共享资源或资源使用者场景。'."\n" - .'- OtherAccounts:共享单元归属于其他账号。适用于资源目录外共享时,资源使用者主动退出共享单元场景。', - 'type' => 'string', - 'required' => false, - 'example' => 'Self', - ], + 'schema' => ['description' => '共享单元归属者。取值:'."\n" + ."\n" + .'- Self(默认值):共享单元归属于当前账号。适用于资源目录内共享时,资源所有者移除共享资源或资源使用者场景。'."\n" + .'- OtherAccounts:共享单元归属于其他账号。适用于资源目录外共享时,资源使用者主动退出共享单元场景。', 'type' => 'string', 'required' => false, 'example' => 'Self'], ], ], 'responses' => [ @@ -1864,11 +1112,7 @@ 'description' => '返回参数。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '95230BC9-A8E8-4493-96BD-4F0C758E37F8', - ], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '95230BC9-A8E8-4493-96BD-4F0C758E37F8'], 'ResourceShareAssociations' => [ 'description' => '共享单元关联的共享资源或资源使用者信息。', 'type' => 'array', @@ -1876,99 +1120,50 @@ 'description' => '共享单元关联的共享资源或资源使用者信息。', 'type' => 'object', 'properties' => [ - 'UpdateTime' => [ - 'description' => '取消关联的更新时间。存在以下两种情况:'."\n" - ."\n" - .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为移除资源的更新时间。'."\n" - .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为移除资源使用者的更新时间。', - 'type' => 'string', - 'example' => '2020-12-04T09:40:45.556Z', - ], - 'ResourceArn' => [ - 'description' => '关联资源ARN。'."\n" - .'> 当关联类型`AssociationType`为资源使用者`Target`时,该参数不可用。', - 'type' => 'string', - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - 'ResourceShareName' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'example' => 'test', - ], - 'CreateTime' => [ - 'description' => '取消关联的时间。存在以下两种情况:'."\n" - ."\n" - .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为移除资源的时间。'."\n" - .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为移除资源使用者的时间。', - 'type' => 'string', - 'example' => '2020-12-04T09:40:41.250Z', - ], - 'EntityType' => [ - 'description' => '关联实体类型。取值:'."\n" - ."\n" - .'- 当关联实体为资源时,该参数为资源类型。更多信息,请参见[支持资源共享的云服务](~~450526~~)。'."\n" - .'- 当关联实体为资源使用者时,该参数为Account。', - 'type' => 'string', - 'example' => 'Account', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-6GRmdD3X****', - ], - 'AssociationStatusMessage' => [ - 'description' => '取消关联失败的原因。', - 'type' => 'string', - 'example' => 'The Resources is invalid.', - ], - 'AssociationType' => [ - 'description' => '关联类型。取值:'."\n" - ."\n" - .'- Resource:资源。'."\n" - .'- Target:资源使用者。', - 'type' => 'string', - 'example' => 'Target', - ], - 'AssociationStatus' => [ - 'description' => '关联状态。取值:'."\n" - ."\n" - .'- Associating:关联中。'."\n" - .'- Associated:已关联。'."\n" - .'- Failed:关联失败。'."\n" - .'- Disassociating:分离中。'."\n" - .'- Disassociated:已分离。'."\n" - ."\n" - .'> `Failed`和`Disassociated`状态的记录,会在48~96小时内被系统自动删除。', - 'type' => 'string', - 'example' => 'Disassociating', - ], - 'TargetProperty' => [ - 'description' => '资源使用者属性。例如:资源共享的时间段。'."\n" - .'> 仅当资源使用者为阿里云服务时返回该参数。', - 'type' => 'string', - 'example' => '{'."\n" - .' "timeRange":{'."\n" - .' "timeRangeType":"timeRange",'."\n" - .' "beginAtTime":"00:00",'."\n" - .' "timezone":"UTC+8",'."\n" - .' "endAtTime":"19:59"'."\n" - .' }'."\n" - .'}', - ], - 'EntityId' => [ - 'description' => '关联实体ID。取值:'."\n" - ."\n" - .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为资源ID。'."\n" - .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为资源目录ID、资源夹ID或成员ID。', - 'type' => 'string', - 'example' => '172050525300****', - ], - 'ResourceProperty' => [ - 'title' => '资源属性。', - 'description' => '资源属性。', - 'type' => 'string', - 'example' => '{"sharePrincipals":true,"shareTagOptions":false}', - ], + 'UpdateTime' => ['description' => '取消关联的更新时间。存在以下两种情况:'."\n" + ."\n" + .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为移除资源的更新时间。'."\n" + .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为移除资源使用者的更新时间。', 'type' => 'string', 'example' => '2020-12-04T09:40:45.556Z'], + 'ResourceArn' => ['description' => '关联资源ARN。'."\n" + .'> 当关联类型`AssociationType`为资源使用者`Target`时,该参数不可用。', 'type' => 'string', 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + 'ResourceShareName' => ['description' => '共享单元名称。', 'type' => 'string', 'example' => 'test'], + 'CreateTime' => ['description' => '取消关联的时间。存在以下两种情况:'."\n" + ."\n" + .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为移除资源的时间。'."\n" + .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为移除资源使用者的时间。', 'type' => 'string', 'example' => '2020-12-04T09:40:41.250Z'], + 'EntityType' => ['description' => '关联实体类型。取值:'."\n" + ."\n" + .'- 当关联实体为资源时,该参数为资源类型。更多信息,请参见[支持资源共享的云服务](~~450526~~)。'."\n" + .'- 当关联实体为资源使用者时,该参数为Account。', 'type' => 'string', 'example' => 'Account'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-6GRmdD3X****'], + 'AssociationStatusMessage' => ['description' => '取消关联失败的原因。', 'type' => 'string', 'example' => 'The Resources is invalid.'], + 'AssociationType' => ['description' => '关联类型。取值:'."\n" + ."\n" + .'- Resource:资源。'."\n" + .'- Target:资源使用者。', 'type' => 'string', 'example' => 'Target'], + 'AssociationStatus' => ['description' => '关联状态。取值:'."\n" + ."\n" + .'- Associating:关联中。'."\n" + .'- Associated:已关联。'."\n" + .'- Failed:关联失败。'."\n" + .'- Disassociating:分离中。'."\n" + .'- Disassociated:已分离。'."\n" + ."\n" + .'> `Failed`和`Disassociated`状态的记录,会在48~96小时内被系统自动删除。', 'type' => 'string', 'example' => 'Disassociating'], + 'TargetProperty' => ['description' => '资源使用者属性。例如:资源共享的时间段。'."\n" + .'> 仅当资源使用者为阿里云服务时返回该参数。', 'type' => 'string', 'example' => '{'."\n" + .' "timeRange":{'."\n" + .' "timeRangeType":"timeRange",'."\n" + .' "beginAtTime":"00:00",'."\n" + .' "timezone":"UTC+8",'."\n" + .' "endAtTime":"19:59"'."\n" + .' }'."\n" + .'}'], + 'EntityId' => ['description' => '关联实体ID。取值:'."\n" + ."\n" + .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为资源ID。'."\n" + .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为资源目录ID、资源夹ID或成员ID。', 'type' => 'string', 'example' => '172050525300****'], + 'ResourceProperty' => ['title' => '资源属性。', 'description' => '资源属性。', 'type' => 'string', 'example' => '{"sharePrincipals":true,"shareTagOptions":false}'], ], ], ], @@ -1978,106 +1173,34 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MissingParameter.ResourceShareId', - 'errorMessage' => 'You must specify ResourceShareId.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareId', - 'errorMessage' => 'The ResourceShareId is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.Resources', - 'errorMessage' => 'The Resources is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.Resources.Duplicate', - 'errorMessage' => 'The Resources contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.Resources.Length', - 'errorMessage' => 'The maximum number of Resources exceeds 5.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets', - 'errorMessage' => 'The Targets is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets.Duplicate', - 'errorMessage' => 'The Targets contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets.Length', - 'errorMessage' => 'The maximum number of Targets exceeds 5.', - ], - [ - 'errorCode' => 'ResourceAndTargetBothEmpty', - 'errorMessage' => 'Either a resource or a shared target must be specified.', - ], - [ - 'errorCode' => 'DisassociateInvalid', - 'errorMessage' => 'You can not disassociate unassociated resource or target.', - ], - [ - 'errorCode' => 'InvalidParameter', - 'errorMessage' => 'The specified parameter is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns', - 'errorMessage' => 'The ResourceArns is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns.Duplicate', - 'errorMessage' => 'The ResourceArns contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns.Length', - 'errorMessage' => 'The ResourceArns beyond the length limit.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceConflict', - 'errorMessage' => 'Both Resources and ResourceArns cannot be specified simultaneously. Please provide only one of these parameters.', - ], - [ - 'errorCode' => 'NotSupport.ResourceType.ResourcesParameter', - 'errorMessage' => 'The Resources parameter does not support this resource type. Please use ResourceArns instead.', - ], + ['errorCode' => 'MissingParameter.ResourceShareId', 'errorMessage' => 'You must specify ResourceShareId.', 'description' => 'ResourceShareId参数缺失。'], + ['errorCode' => 'InvalidParameter.ResourceShareId', 'errorMessage' => 'The ResourceShareId is invalid.', 'description' => 'ResourceShareId参数错误。'], + ['errorCode' => 'InvalidParameter.Resources', 'errorMessage' => 'The Resources is invalid.', 'description' => '选定的共享资源无效。'], + ['errorCode' => 'InvalidParameter.Resources.Duplicate', 'errorMessage' => 'The Resources contains duplicate values.', 'description' => '选定的共享资源有重复项。'], + ['errorCode' => 'InvalidParameter.Resources.Length', 'errorMessage' => 'The maximum number of Resources exceeds 5.', 'description' => '选定的共享资源数量超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.Targets', 'errorMessage' => 'The Targets is invalid.', 'description' => '资源使用者的参数不符合规则。'], + ['errorCode' => 'InvalidParameter.Targets.Duplicate', 'errorMessage' => 'The Targets contains duplicate values.', 'description' => '资源使用者有重复项。'], + ['errorCode' => 'InvalidParameter.Targets.Length', 'errorMessage' => 'The maximum number of Targets exceeds 5.', 'description' => '资源使用者数量超限(最大5个)。'], + ['errorCode' => 'ResourceAndTargetBothEmpty', 'errorMessage' => 'Either a resource or a shared target must be specified.', 'description' => '必须指定一个资源或一个资源使用者。'], + ['errorCode' => 'DisassociateInvalid', 'errorMessage' => 'You can not disassociate unassociated resource or target.', 'description' => '对象未关联,不能取消关联。'], + ['errorCode' => 'InvalidParameter', 'errorMessage' => 'The specified parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType is invalid.', 'description' => '传入的资源类型错误。'], + ['errorCode' => 'InvalidParameter.ResourceArns', 'errorMessage' => 'The ResourceArns is invalid.', 'description' => 'ResourceArns参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceArns.Duplicate', 'errorMessage' => 'The ResourceArns contains duplicate values.', 'description' => '资源ARN参数有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceArns.Length', 'errorMessage' => 'The ResourceArns beyond the length limit.', 'description' => '资源ARN数量超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.ResourceConflict', 'errorMessage' => 'Both Resources and ResourceArns cannot be specified simultaneously. Please provide only one of these parameters.', 'description' => 'Resources 和 ResourceArns 不能同时指定。请仅提供其中一个参数。'], + ['errorCode' => 'NotSupport.ResourceType.ResourcesParameter', 'errorMessage' => 'The Resources parameter does not support this resource type. Please use ResourceArns instead.', 'description' => '当前资源类型不支持Resources参数,请使用ResourceArns参数。'], ], 404 => [ - [ - 'errorCode' => 'EntityNotExists.ResourceShare', - 'errorMessage' => 'The resource share does not exist in the current account.', - ], + ['errorCode' => 'EntityNotExists.ResourceShare', 'errorMessage' => 'The resource share does not exist in the current account.', 'description' => '共享单元不在当前账号内。'], ], 409 => [ - [ - 'errorCode' => 'AccountNotInResourceDirectory', - 'errorMessage' => 'The account is not a master or a member of a resource directory.', - ], - [ - 'errorCode' => 'ResourceShareStatusMismatchAction', - 'errorMessage' => 'The status of the resource share does not allow the specified operation.', - ], - [ - 'errorCode' => 'DisassociateConflict', - 'errorMessage' => 'You cannot perform the operation while association is already in progress.', - ], - [ - 'errorCode' => 'LeavingFailed.Account', - 'errorMessage' => 'The account was added to the resource share automatically by resoucre directory.', - ], - [ - 'errorCode' => 'LeavingFailed.ResourceType', - 'errorMessage' => 'The resource share contains resources of the resource types that dont support this action.', - ], - [ - 'errorCode' => 'ExternalTargetWithdrawConflict', - 'errorMessage' => 'Existing internal association task in resource directory when disassociating with resource share.', - ], + ['errorCode' => 'AccountNotInResourceDirectory', 'errorMessage' => 'The account is not a master or a member of a resource directory.', 'description' => '资源使用者不在资源目录内。'], + ['errorCode' => 'ResourceShareStatusMismatchAction', 'errorMessage' => 'The status of the resource share does not allow the specified operation.', 'description' => '共享单元的状态不支持当前操作。'], + ['errorCode' => 'DisassociateConflict', 'errorMessage' => 'You cannot perform the operation while association is already in progress.', 'description' => '关联中,不能操作关联。'], + ['errorCode' => 'LeavingFailed.Account', 'errorMessage' => 'The account was added to the resource share automatically by resoucre directory.', 'description' => '当前账号是通过组织内共享添加到共享单元中的账号,不能主动退出共享单元。需联系共享单元的所有者将当前账号从共享单元中移除。'], + ['errorCode' => 'LeavingFailed.ResourceType', 'errorMessage' => 'The resource share contains resources of the resource types that dont support this action.', 'description' => '共享单元中包含不支持主动退出的资源类型。需联系共享单元的所有者将当前账号从共享单元中移除。'], + ['errorCode' => 'ExternalTargetWithdrawConflict', 'errorMessage' => 'Existing internal association task in resource directory when disassociating with resource share.', 'description' => '当前账号是通过组织内共享添加到共享单元中的账号,不能主动退出共享单元。请联系共享单元的所有者将当前账号从共享单元中移除。'], ], ], 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"95230BC9-A8E8-4493-96BD-4F0C758E37F8\\",\\n \\"ResourceShareAssociations\\": [\\n {\\n \\"UpdateTime\\": \\"2020-12-04T09:40:45.556Z\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceShareName\\": \\"test\\",\\n \\"CreateTime\\": \\"2020-12-04T09:40:41.250Z\\",\\n \\"EntityType\\": \\"Account\\",\\n \\"ResourceShareId\\": \\"rs-6GRmdD3X****\\",\\n \\"AssociationStatusMessage\\": \\"The Resources is invalid.\\",\\n \\"AssociationType\\": \\"Target\\",\\n \\"AssociationStatus\\": \\"Disassociating\\",\\n \\"TargetProperty\\": \\"{\\\\n \\\\\\"timeRange\\\\\\":{\\\\n \\\\\\"timeRangeType\\\\\\":\\\\\\"timeRange\\\\\\",\\\\n \\\\\\"beginAtTime\\\\\\":\\\\\\"00:00\\\\\\",\\\\n \\\\\\"timezone\\\\\\":\\\\\\"UTC+8\\\\\\",\\\\n \\\\\\"endAtTime\\\\\\":\\\\\\"19:59\\\\\\"\\\\n }\\\\n}\\",\\n \\"EntityId\\": \\"172050525300****\\",\\n \\"ResourceProperty\\": \\"{\\\\\\"sharePrincipals\\\\\\":true,\\\\\\"shareTagOptions\\\\\\":false}\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\" ?>\\r\\n<DisassociateResourceShareResponse>\\r\\n\\t<ResourceShareAssociations>\\r\\n\\t\\t<ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\r\\n\\t\\t<EntityId>172050525300****</EntityId>\\r\\n\\t\\t<EntityType>Account</EntityType>\\r\\n\\t\\t<AssociationStatusMessage></AssociationStatusMessage>\\r\\n\\t\\t<AssociationType>Target</AssociationType>\\r\\n\\t\\t<CreateTime>2020-12-04T09:40:41.250Z</CreateTime>\\r\\n\\t\\t<UpdateTime>2020-12-04T09:40:45.556Z</UpdateTime>\\r\\n <ResourceShareName>test</ResourceShareName>\\r\\n\\t\\t<AssociationStatus>Disassociating</AssociationStatus>\\r\\n\\t</ResourceShareAssociations>\\r\\n\\t<RequestId>95230BC9-A8E8-4493-96BD-4F0C758E37F8</RequestId>\\r\\n</DisassociateResourceShareResponse>\\t\\r\\n","errorExample":""}]', @@ -2088,138 +1211,141 @@ .'本文将提供一个示例,使用资源目录管理账号,在`cn-hangzhou`地域的共享单元`rs-6GRmdD3X****`中,移除资源使用者`172050525300****`,即停止对该资源使用者的共享。', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'ListResourceShareAssociations' => [ - 'summary' => '查询共享单元中关联资源或资源使用者的记录。', - 'methods' => [ - 'post', - 'get', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DisassociateResourceShare'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:DisassociateResourceShare', + 'authLevel' => 'operate', + 'actionConditions' => [ + ['conditionKey' => 'resourcesharing:RequestedResourceType'], + ['conditionKey' => 'resourcesharing:ResourceArn'], + ], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'DisassociateResourceSharePermission' => [ + 'summary' => '调用DisassociateResourceSharePermission为共享单元解除共享权限。当共享单元下权限对应的资源类型没有关联具体资源时,才允许从共享单元中删除权限。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'update'], 'parameters' => [ [ - 'name' => 'ResourceId', + 'name' => 'ResourceShareId', 'in' => 'query', - 'schema' => [ - 'description' => '资源ID。'."\n" - .'>当`AssociationType`为`Target`时,该参数不可用。', - 'type' => 'string', - 'required' => false, - 'example' => 'vsw-bp183p93qs667muql****', - ], + 'schema' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'rs-6GRmdD3X****'], ], [ - 'name' => 'ResourceArn', + 'name' => 'PermissionName', 'in' => 'query', - 'schema' => [ - 'description' => '资源ARN。'."\n" - .'> 当`AssociationType`为`Target`时,该参数不可用。', - 'type' => 'string', - 'required' => false, - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], + 'schema' => ['description' => '共享权限名称。在[权限库](~~465474~~)文档中查看。', 'type' => 'string', 'required' => true, 'docRequired' => false, 'example' => 'AliyunRSDefaultPermissionVSwitch'], ], - [ - 'name' => 'Target', - 'in' => 'query', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '资源使用者ID。'."\n" - ."\n" - .'>当`AssociationType`为`Resource`时,该参数不可用。', - 'type' => 'string', - 'required' => false, - 'example' => '172050525300****', + 'description' => '返回结果。', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '111FB84A-60A9-403E-9067-E55D7EE95BD1'], + ], ], ], - [ - 'name' => 'AssociationType', - 'in' => 'query', - 'schema' => [ - 'description' => '关联类型:取值:'."\n" - ."\n" - .'- Resource:查询关联共享资源的记录。'."\n" - .'- Target:查询关联资源使用者的记录。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'Resource', - ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'InvalidParameter.ResourceShareId', 'errorMessage' => 'The ResourceShareId is invalid.', 'description' => ''], + ['errorCode' => 'MissingParameter.ResourceShareId', 'errorMessage' => 'You must specify ResourceShareId.', 'description' => ''], + ['errorCode' => 'MissingParameter.PermissionName', 'errorMessage' => 'You must specify PermissionName.', 'description' => ''], ], + 404 => [ + ['errorCode' => 'EntityNotExists.Permission', 'errorMessage' => 'The resource share permission does not exist.', 'description' => ''], + ], + 409 => [ + ['errorCode' => 'DisassociateConflict.Permission', 'errorMessage' => 'Existing associated resource when disassociating permission with resource share.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"111FB84A-60A9-403E-9067-E55D7EE95BD1\\"\\n}","errorExample":""},{"type":"xml","example":"<DisassociateResourceSharePermissionResponse>\\n <RequestId>111FB84A-60A9-403E-9067-E55D7EE95BD1</RequestId>\\n</DisassociateResourceSharePermissionResponse>","errorExample":""}]', + 'title' => '为共享单元解除共享权限', + 'description' => '本文将提供一个示例,在`cn-hangzhou`地域的共享单元`rs-6GRmdD3X****`中,解除共享权限`AliyunRSDefaultPermissionVSwitch`。', + 'changeSet' => [], + ], + 'EnableSharingWithResourceDirectory' => [ + 'summary' => '启用资源目录组织共享。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'AssociationStatus', - 'in' => 'query', + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update'], + 'parameters' => [], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '关联状态。取值:'."\n" - ."\n" - .'- Associating:关联中。'."\n" - .'- Associated:已关联。'."\n" - .'- Failed:关联失败。'."\n" - .'- Disassociating:分离中。'."\n" - .'- Disassociated:已分离。'."\n" - ."\n" - .'> `Failed`和`Disassociated`状态的记录,会在48~96小时内被系统自动删除。', - 'type' => 'string', - 'required' => false, - 'example' => 'Associated', + 'description' => '返回结果。', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA'], + ], ], ], + ], + 'errorCodes' => [ + 409 => [ + ['errorCode' => 'ActionNotPermitted', 'errorMessage' => 'The caller must be the master account for the Resource Directory.', 'description' => ''], + ['errorCode' => 'AlreadyEnabled', 'errorMessage' => 'You have already enabled sharing with the Resource Directory.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA\\"\\n}","errorExample":""},{"type":"xml","example":"<EnableSharingWithResourceDirectoryResponse>\\n <RequestId>2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA</RequestId>\\n</EnableSharingWithResourceDirectoryResponse>","errorExample":""}]', + 'title' => '启用资源目录组织共享', + 'description' => '启用资源目录组织共享功能后,资源所有者才能将资源共享给整个资源目录、资源夹或成员。'."\n" + ."\n" + .'本API仅限资源目录的管理账号及其下被授权的RAM用户或RAM角色调用。', + 'requestParamsDescription' => '关于公共请求参数的详情,请参见[公共参数](~~159973~~)。', + 'changeSet' => [], + ], + 'GetPermission' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'MaxResults', - 'in' => 'query', - 'schema' => [ - 'description' => '单次请求返回结果的最大条数。'."\n" - ."\n" - .'取值范围:1~100。默认值:20。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '20', - ], + 'AK' => [], ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], + 'parameters' => [ [ - 'name' => 'NextToken', + 'name' => 'PermissionName', 'in' => 'query', - 'schema' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'required' => false, - 'example' => 'TGlzdFJlc291cm****', - ], + 'schema' => ['description' => '共享权限名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'AliyunRSDefaultPermissionVSwitch'], ], [ - 'name' => 'ResourceShareIds', + 'name' => 'PermissionVersion', 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '共享单元ID。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多指定5个共享单元。', - 'type' => 'array', - 'items' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'rs-6GRmdD3X****', - ], - 'required' => false, - 'example' => 'rs-6GRmdD3X****', - 'maxItems' => 20, - ], + 'schema' => ['description' => '共享权限版本。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'v1'], ], ], 'responses' => [ @@ -2228,196 +1354,29 @@ 'description' => '返回参数。', 'type' => 'object', 'properties' => [ - 'NextToken' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'example' => 'TGlzdFJlc291cm****', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '11BA57B5-7301-4E2F-BBA5-2AE4C2F4FCDB', - ], - 'ResourceShareAssociations' => [ - 'description' => '共享资源或资源使用者信息。', - 'type' => 'array', - 'items' => [ - 'description' => '共享资源或资源使用者信息。', - 'type' => 'object', - 'properties' => [ - 'UpdateTime' => [ - 'description' => '更新关联的时间。存在以下两种情况:'."\n" - ."\n" - .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为更新资源的时间。'."\n" - .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为更新资源使用者的时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:02.920Z', - ], - 'EntityId' => [ - 'description' => '关联实体ID。取值:'."\n" - ."\n" - .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为资源ID。'."\n" - .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为资源使用者ID。', - 'type' => 'string', - 'example' => 'vsw-bp1upw03qyz8n7us9****', - ], - 'ResourceArn' => [ - 'description' => '关联资源ARN。'."\n" - .'> 当关联类型`AssociationType`为资源使用者`Target`时,该参数不可用。', - 'type' => 'string', - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - 'ResourceShareName' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'example' => 'example', - ], - 'CreateTime' => [ - 'description' => '关联的时间。存在以下两种情况:'."\n" - ."\n" - .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为添加或移除资源的时间。'."\n" - .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为添加或移除资源使用者的时间。'."\n", - 'type' => 'string', - 'example' => '2020-12-07T07:39:01.818Z', - ], - 'EntityType' => [ - 'description' => '关联实体类型。取值:'."\n" - ."\n" - .'- 当关联实体为资源时,该参数为资源类型。更多信息,请参见[支持资源共享的云服务](~~450526~~)。'."\n" - .'- 当关联实体为资源使用者时,该参数为`Account`。', - 'type' => 'string', - 'example' => 'VSwitch', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-6GRmdD3X****', - ], - 'AssociationStatusMessage' => [ - 'description' => '关联失败的原因。', - 'type' => 'string', - 'example' => 'The reason for the association failure. ', - ], - 'AssociationType' => [ - 'description' => '关联类型。取值:'."\n" - ."\n" - .'- Resource:资源。'."\n" - .'- Target:资源使用者。', - 'type' => 'string', - 'example' => 'Resource', - ], - 'AssociationStatus' => [ - 'description' => '关联状态。取值:'."\n" - ."\n" - .'- Associating:关联中。'."\n" - .'- Associated:已关联。'."\n" - .'- Failed:关联失败。'."\n" - .'- Disassociating:分离中。'."\n" - .'- Disassociated:已分离。'."\n" - ."\n" - .'> `Failed`和`Disassociated`状态的记录,会在48~96小时内被系统自动删除。', - 'type' => 'string', - 'example' => 'Failed', - ], - 'External' => [ - 'description' => '资源使用者是否为资源目录外账号。取值:'."\n" - ."\n" - .'- true:资源目录外账号。'."\n" - .'- false:资源目录内账号。', - 'type' => 'boolean', - 'example' => 'false', - ], - 'AssociationFailedDetails' => [ - 'description' => '关联或解除关联资源或者资源使用者检查失败详细原因。', - 'type' => 'array', - 'items' => [ - 'description' => '关联或解除关联资源或者资源使用者检查失败详细原因。', - 'type' => 'object', - 'properties' => [ - 'Status' => [ - 'description' => '已弃用。请使用FailureReason。', - 'type' => 'string', - 'example' => '无', - ], - 'StatusMessage' => [ - 'description' => '已弃用。请使用FailureDescription。', - 'type' => 'string', - 'example' => '无', - ], - 'AssociateType' => [ - 'description' => '已弃用。请使用OperationType。', - 'type' => 'string', - 'example' => '无', - ], - 'ResourceArn' => [ - 'description' => '关联资源ARN。'."\n" - .'> 当`AssociationType`为资源`Resource`时,该参数不可用。', - 'type' => 'string', - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - 'EntityType' => [ - 'description' => '关联实体类型。取值:'."\n" - ."\n" - .'* 当关联实体为资源时,该参数为资源类型。更多信息,请参见[支持资源共享的云服务](~~450526~~)。'."\n" - .'* 当关联实体为资源使用者时,该参数为`ResourceDirectory`、`Folder`、`Account`或`Service`。', - 'type' => 'string', - 'example' => 'Account', - ], - 'FailureReason' => [ - 'description' => '关联或解除关联失败时的原因。 取值:'."\n" - .'- Unavailable:资源不存在等情况导致共享失败。 '."\n" - .'- LimitExceeded:资源可共享的目标Quota超出上限。 '."\n" - .'- ZonalResourceInaccessible: 资源在此地域不可用。 '."\n" - .'- InternalError:服务器内部出现错误。 '."\n" - .'- UnsupportedOperation:不支持执行操作。', - 'type' => 'string', - 'example' => 'Unavailable', - ], - 'FailureDescription' => [ - 'description' => '关联或解除关联失败时的详细原因描述。', - 'type' => 'string', - 'example' => 'You cannot access the specified resource at this time.', - ], - 'OperationType' => [ - 'description' => '操作类型。取值:'."\n" - .'- Associate:关联。'."\n" - .'- Disassociate:解除关联。', - 'type' => 'string', - 'example' => 'Associate', - ], - 'EntityId' => [ - 'description' => '关联实体ID。取值:'."\n" - ."\n" - .'* 当关联类型AssociationType为资源Resource时,该参数为资源使用者ID。'."\n" - .'* 当关联类型AssociationType为资源使用者Target时,该参数为资源ID。', - 'type' => 'string', - 'example' => '172050525300****', - ], - ], - ], - ], - 'TargetProperty' => [ - 'description' => '资源使用者属性。例如:资源共享的时间段。`timeRangeType`取值:'."\n" - .'- timeRange:指定时间段。'."\n" - .'- day:全天。'."\n" - .'> 仅当资源使用者为阿里云服务时返回该参数。', - 'type' => 'string', - 'example' => '{'."\n" - .' "timeRange":{'."\n" - .' "timeRangeType":"timeRange",'."\n" - .' "beginAtTime":"00:00",'."\n" - .' "timezone":"UTC+8",'."\n" - .' "endAtTime":"19:59"'."\n" - .' }'."\n" - .'}', - ], - 'ResourceProperty' => [ - 'title' => '资源属性。', - 'description' => '资源属性。', - 'type' => 'string', - 'example' => '{"sharePrincipals":true,"shareTagOptions":false}', - ], - ], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA'], + 'Permission' => [ + 'description' => '共享权限信息。', + 'type' => 'object', + 'properties' => [ + 'PermissionName' => ['description' => '共享权限名称。', 'type' => 'string', 'example' => 'AliyunRSDefaultPermissionVSwitch'], + 'PermissionVersion' => ['description' => '共享权限版本。', 'type' => 'string', 'example' => 'v1'], + 'Permission' => ['description' => '共享权限策略定义。', 'type' => 'string', 'example' => '{"Effect":"Allow","Action":["vpc:DescribeVSwitches","vpc:DescribeVSwitchAttributes"]}'], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'example' => 'VSwitch'], + 'DefaultVersion' => ['description' => '共享权限是否为默认版本。取值:'."\n" + ."\n" + .'- false:不是默认版本。'."\n" + ."\n" + .'- true:是默认版本。', 'type' => 'boolean', 'example' => 'true'], + 'CreateTime' => ['description' => '创建时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:01.818Z'], + 'UpdateTime' => ['description' => '更新时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:01.818Z'], + 'DefaultPermission' => ['description' => '是否为默认权限。取值:'."\n" + ."\n" + .'- false:不是默认权限。'."\n" + ."\n" + .'- true:是默认权限。', 'type' => 'boolean', 'example' => 'true'], ], ], ], @@ -2426,86 +1385,40 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MissingParameter.AssociationType', - 'errorMessage' => 'You must specify AssociationType.', - ], - [ - 'errorCode' => 'InvalidParameter.AssociationType', - 'errorMessage' => 'The AssociationType is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.AssociationStatus', - 'errorMessage' => 'The AssociationStatus is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.MaxResults', - 'errorMessage' => 'The MaxResults is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken', - 'errorMessage' => 'The NextToken is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken.Length', - 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds', - 'errorMessage' => 'The ResourceShareIds is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', - 'errorMessage' => 'The ResourceShareIds contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Length', - 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.Target', - 'errorMessage' => 'The Target is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceId', - 'errorMessage' => 'The ResourceId is invalid.', - ], - [ - 'errorCode' => 'ConflictedAssociationType', - 'errorMessage' => 'The specified ResourceId or Target conflicts with AssociationType.', - ], - [ - 'errorCode' => 'InvalidParameter', - 'errorMessage' => 'The specified parameter is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArn', - 'errorMessage' => 'The ResourceArn is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceConflict', - 'errorMessage' => 'Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters.', - ], + ['errorCode' => 'InvalidParameter.PermissionVersion', 'errorMessage' => 'The PermissionVersion is invalid.', 'description' => 'PermissionVersion参数错误。'], + ['errorCode' => 'MissingParameter.PermissionName', 'errorMessage' => 'You must specify PermissionName.', 'description' => 'PermissionName参数缺失。'], + ], + 404 => [ + ['errorCode' => 'EntityNotExists.Permission', 'errorMessage' => 'The resource share permission does not exist.', 'description' => '共享权限不存在。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"11BA57B5-7301-4E2F-BBA5-2AE4C2F4FCDB\\",\\n \\"ResourceShareAssociations\\": [\\n {\\n \\"UpdateTime\\": \\"2020-12-07T07:39:02.920Z\\",\\n \\"EntityId\\": \\"vsw-bp1upw03qyz8n7us9****\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceShareName\\": \\"example\\",\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"EntityType\\": \\"VSwitch\\",\\n \\"ResourceShareId\\": \\"rs-6GRmdD3X****\\",\\n \\"AssociationStatusMessage\\": \\"The reason for the association failure. \\",\\n \\"AssociationType\\": \\"Resource\\",\\n \\"AssociationStatus\\": \\"Failed\\",\\n \\"External\\": false,\\n \\"AssociationFailedDetails\\": [\\n {\\n \\"Status\\": \\"无\\",\\n \\"StatusMessage\\": \\"无\\",\\n \\"AssociateType\\": \\"无\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"EntityType\\": \\"Account\\",\\n \\"FailureReason\\": \\"Unavailable\\",\\n \\"FailureDescription\\": \\"You cannot access the specified resource at this time.\\",\\n \\"OperationType\\": \\"Associate\\",\\n \\"EntityId\\": \\"172050525300****\\"\\n }\\n ],\\n \\"TargetProperty\\": \\"{\\\\n \\\\\\"timeRange\\\\\\":{\\\\n \\\\\\"timeRangeType\\\\\\":\\\\\\"timeRange\\\\\\",\\\\n \\\\\\"beginAtTime\\\\\\":\\\\\\"00:00\\\\\\",\\\\n \\\\\\"timezone\\\\\\":\\\\\\"UTC+8\\\\\\",\\\\n \\\\\\"endAtTime\\\\\\":\\\\\\"19:59\\\\\\"\\\\n }\\\\n}\\",\\n \\"ResourceProperty\\": \\"{\\\\\\"sharePrincipals\\\\\\":true,\\\\\\"shareTagOptions\\\\\\":false}\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListResourceShareAssociationsResponse>\\n <ResourceShareAssociations>\\n <ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\n <ResourceShareName>example</ResourceShareName>\\n <EntityId>vsw-bp1upw03qyz8n7us9****</EntityId>\\n <EntityType>VSwitch</EntityType>\\n <AssociationStatusMessage/>\\n <AssociationType>Resource</AssociationType>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:02.920Z</UpdateTime>\\n <External>false</External>\\n <AssociationStatus>Associated</AssociationStatus>\\n </ResourceShareAssociations>\\n <ResourceShareAssociations>\\n <ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\n <ResourceShareName>example</ResourceShareName>\\n <EntityId>vsw-bp183p93qs667muql****</EntityId>\\n <EntityType>VSwitch</EntityType>\\n <AssociationStatusMessage/>\\n <AssociationType>Resource</AssociationType>\\n <CreateTime>2020-12-04T09:40:41.246Z</CreateTime>\\n <UpdateTime>2020-12-07T03:17:24.067Z</UpdateTime>\\n <External>false</External>\\n <AssociationStatus>Disassociated</AssociationStatus>\\n </ResourceShareAssociations>\\n <RequestId>11BA57B5-7301-4E2F-BBA5-2AE4C2F4FCDB</RequestId>\\n</ListResourceShareAssociationsResponse>","errorExample":""}]', - 'title' => '查询关联资源或资源使用者', - 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询当前账号创建的共享单元中关联的共享资源的记录。返回结果显示,当前账号关联过以下2个资源:'."\n" - ."\n" - .'- 在共享单元`rs-6GRmdD3X****`中,添加过`VSwitch`类型的共享资源`vsw-bp1upw03qyz8n7us9****`,该资源处于关联中`Associated`状态,即该资源正常共享中。'."\n" - .'- 在共享单元`rs-6GRmdD3X****`中,移除过`VSwitch`类型的共享资源`vsw-bp183p93qs667muql****`,该资源处于已分离`Disassociated`状态,即该资源已停止共享。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'ListSharedResources' => [ - 'summary' => '查询共享的资源列表或者其他账号共享的资源列表。', - 'methods' => [ - 'post', - 'get', + 'title' => '查询共享权限信息', + 'summary' => '调用GetPermission查询共享权限信息。', + 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询共享权限名称为`AliyunRSDefaultPermissionVSwitch`,权限版本为`v1`的共享权限信息。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetPermission'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'resourcesharing:GetPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA\\",\\n \\"Permission\\": {\\n \\"PermissionName\\": \\"AliyunRSDefaultPermissionVSwitch\\",\\n \\"PermissionVersion\\": \\"v1\\",\\n \\"Permission\\": \\"{\\\\\\"Effect\\\\\\":\\\\\\"Allow\\\\\\",\\\\\\"Action\\\\\\":[\\\\\\"vpc:DescribeVSwitches\\\\\\",\\\\\\"vpc:DescribeVSwitchAttributes\\\\\\"]}\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"DefaultVersion\\": true,\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"UpdateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"DefaultPermission\\": true\\n }\\n}","errorExample":""},{"type":"xml","example":"<GetPermissionResponse>\\n <RequestId>2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA</RequestId>\\n <Permission>\\n <PermissionName>AliyunRSDefaultPermissionVSwitch</PermissionName>\\n <PermissionVersion>v1</PermissionVersion>\\n <Permission>{\\\\\\"Effect\\\\\\":\\\\\\"Allow\\\\\\",\\\\\\"Action\\\\\\":[\\\\\\"vpc:DescribeVSwitches\\\\\\",\\\\\\"vpc:DescribeVSwitchAttributes\\\\\\"]}</Permission>\\n <ResourceType>VSwitch</ResourceType>\\n <DefaultVersion>true</DefaultVersion>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:01.818Z</UpdateTime>\\n <DefaultPermission>true</DefaultPermission>\\n </Permission>\\n</GetPermissionResponse>","errorExample":""}]', + ], + 'ListPermissionVersions' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -2513,133 +1426,128 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'ResourceOwner', + 'name' => 'PermissionName', 'in' => 'query', - 'schema' => [ - 'description' => '共享单元归属者。取值:'."\n" - ."\n" - .'- Self:查询您创建的共享单元中,共享给其他账号的资源列表。'."\n" - .'- OtherAccounts:查询其他账号创建的共享单元中,共享给您的资源列表。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'Self', - ], + 'schema' => ['description' => '共享权限名称。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'AliyunRSDefaultPermissionVSwitch'], ], [ - 'name' => 'ResourceType', + 'name' => 'MaxResults', 'in' => 'query', - 'schema' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'VSwitch', - ], + 'schema' => ['description' => '单次请求返回结果的最大条数。'."\n" + ."\n" + .'取值范围:1~100。默认值:20。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], ], [ - 'name' => 'Target', + 'name' => 'NextToken', 'in' => 'query', + 'schema' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'required' => false, 'example' => 'TGlzdFJlc291cm****'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '资源使用者ID或资源所有者ID。取值:'."\n" - ."\n" - .'- 当`ResourceOwner`为`Self`时,该参数为资源使用者ID。'."\n" - .'- 当`ResourceOwner`是`OtherAccounts`时,该参数为资源所有者ID。', - 'type' => 'string', - 'required' => false, - 'example' => '172050525300****', + 'description' => '返回参数。', + 'type' => 'object', + 'properties' => [ + 'NextToken' => ['description' => '当请求的返回结果被截断时,您可以使用NextToken再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'example' => 'TGlzdFJlc291cm****'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '04677DCA-7C33-464B-8811-1B1DA3C3D197'], + 'Permissions' => [ + 'description' => '共享权限信息。', + 'type' => 'array', + 'items' => [ + 'description' => '共享权限信息。', + 'type' => 'object', + 'properties' => [ + 'PermissionName' => ['description' => '共享权限名称。', 'type' => 'string', 'example' => 'AliyunRSDefaultPermissionVSwitch'], + 'PermissionVersion' => ['description' => '共享权限版本。', 'type' => 'string', 'example' => 'v1'], + 'DefaultVersion' => ['description' => '共享权限是否为默认版本。取值:'."\n" + ."\n" + .'- false:不是默认版本。'."\n" + ."\n" + .'- true:是默认版本。', 'type' => 'boolean', 'example' => 'true'], + 'CreateTime' => ['description' => '创建时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:01.818Z'], + 'UpdateTime' => ['description' => '更新时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:01.818Z'], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'example' => 'VSwitch'], + 'DefaultPermission' => ['description' => '是否为默认权限。取值:'."\n" + ."\n" + .'- false:不是默认权限。'."\n" + ."\n" + .'- true:是默认权限。', 'type' => 'boolean', 'example' => 'true'], + ], + ], + ], + ], ], ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'MissingParameter.PermissionName', 'errorMessage' => 'You must specify PermissionName.', 'description' => 'PermissionName参数缺失。'], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType is invalid.', 'description' => '传入的资源类型错误。'], + ['errorCode' => 'InvalidParameter.MaxResults', 'errorMessage' => 'The MaxResults is invalid.', 'description' => 'MaxResults参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken', 'errorMessage' => 'The NextToken is invalid.', 'description' => 'NextToken参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken.Length', 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', 'description' => 'NextToken长度超限(最大256个字符)。'], + ], + ], + 'title' => '查询共享权限的版本信息', + 'summary' => '调用ListPermissionVersions查询指定共享权限名称的版本信息。', + 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询共享权限名称为`AliyunRSDefaultPermissionVSwitch`的版本信息。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListPermissionVersions'], + ], + ], + 'ramActions' => [ [ - 'name' => 'MaxResults', - 'in' => 'query', - 'schema' => [ - 'description' => '单次请求返回结果的最大条数。'."\n" - ."\n" - .'取值范围:1~100。默认值:20。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '20', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListPermissionVersions', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"04677DCA-7C33-464B-8811-1B1DA3C3D197\\",\\n \\"Permissions\\": [\\n {\\n \\"PermissionName\\": \\"AliyunRSDefaultPermissionVSwitch\\",\\n \\"PermissionVersion\\": \\"v1\\",\\n \\"DefaultVersion\\": true,\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"UpdateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"DefaultPermission\\": true\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListPermissionVersionsResponse>\\n <NextToken>TGlzdFJlc291cm****</NextToken>\\n <RequestId>04677DCA-7C33-464B-8811-1B1DA3C3D197</RequestId>\\n <Permissions>\\n <PermissionName>AliyunRSDefaultPermissionVSwitch</PermissionName>\\n <PermissionVersion>v1</PermissionVersion>\\n <DefaultVersion>true</DefaultVersion>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:01.818Z</UpdateTime>\\n <ResourceType>VSwitch</ResourceType>\\n <DefaultPermission>true</DefaultPermission>\\n </Permissions>\\n</ListPermissionVersionsResponse>","errorExample":""}]', + ], + 'ListPermissions' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'NextToken', - 'in' => 'query', - 'schema' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'required' => false, - 'example' => 'TGlzdFJlc291cm****', - ], + 'AK' => [], ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], + 'parameters' => [ [ - 'name' => 'ResourceShareIds', + 'name' => 'ResourceType', 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '共享单元ID。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多指定5个共享单元。', - 'type' => 'array', - 'items' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'rs-6GRmdD3X****', - ], - 'required' => false, - 'example' => 'rs-6GRmdD3X****', - 'maxItems' => 20, - ], + 'schema' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'required' => false, 'example' => 'VSwitch'], ], [ - 'name' => 'ResourceIds', + 'name' => 'MaxResults', 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '共享资源ID。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多指定5个共享资源。', - 'type' => 'array', - 'items' => [ - 'description' => '共享资源ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'vsw-bp1upw03qyz8n7us9****', - ], - 'required' => false, - 'example' => 'vsw-bp1upw03qyz8n7us9****', - 'maxItems' => 20, - ], + 'schema' => ['description' => '单次请求返回结果的最大条数。'."\n" + ."\n" + .'取值范围:1~100。默认值:20。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], ], [ - 'name' => 'ResourceArns', + 'name' => 'NextToken', 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '共享资源ARN列表。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多指定5个共享资源。', - 'type' => 'array', - 'items' => [ - 'description' => '共享资源ARN。'."\n" - .'> 资源ARN格式请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - 'required' => false, - 'maxItems' => 20, - ], + 'schema' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'required' => false, 'example' => 'TGlzdFJlc291cm****'], ], ], 'responses' => [ @@ -2648,72 +1556,32 @@ 'description' => '返回参数。', 'type' => 'object', 'properties' => [ - 'NextToken' => [ - 'description' => '当请求的返回结果被截断时,您可以使用NextToken再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'example' => 'TGlzdFJlc291cm****', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '04677DCA-7C33-464B-8811-1B1DA3C3D197', - ], - 'SharedResources' => [ - 'description' => '共享资源信息。', + 'NextToken' => ['description' => '当请求的返回结果被截断时,您可以使用NextToken再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'example' => 'TGlzdFJlc291cm****'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '04677DCA-7C33-464B-8811-1B1DA3C3D197'], + 'Permissions' => [ + 'description' => '共享权限信息。', 'type' => 'array', 'items' => [ - 'description' => '共享资源信息。', + 'description' => '共享权限信息。', 'type' => 'object', 'properties' => [ - 'UpdateTime' => [ - 'description' => '更新关联资源的时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:02.921Z', - ], - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'example' => 'VSwitch', - ], - 'CreateTime' => [ - 'description' => '关联资源的时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:02.921Z', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-6GRmdD3X****', - ], - 'ResourceArn' => [ - 'description' => '共享资源ARN。', - 'type' => 'string', - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - 'ResourceStatus' => [ - 'description' => '共享资源状态。查询您共享的资源时不返回该参数,查询共享给您的资源时返回该参数。'."\n" - ."\n" - .'取值:'."\n" - ."\n" - .'- Available:资源可用。'."\n" - .'- ZonalResourceInaccessible:在当前可用区,资源不可用。'."\n" - .'- LimitExceeded:配额超限,资源不可用。'."\n" - .'- Unavailable:资源不可用。', - 'type' => 'string', - 'example' => 'Available', - ], - 'ResourceStatusMessage' => [ - 'description' => '关联失败的原因。', - 'type' => 'string', - 'example' => 'The reason for the association failure. ', - ], - 'ResourceId' => [ - 'description' => '共享资源ID。', - 'type' => 'string', - 'example' => 'vsw-bp1upw03qyz8n7us9****', - ], + 'PermissionName' => ['description' => '共享权限名称。', 'type' => 'string', 'example' => 'AliyunRSDefaultPermissionVSwitch'], + 'PermissionVersion' => ['description' => '共享权限版本。', 'type' => 'string', 'example' => 'v1'], + 'DefaultVersion' => ['description' => '共享权限是否为默认版本。取值:'."\n" + ."\n" + .'- false:不是默认版本。'."\n" + ."\n" + .'- true:是默认版本。', 'type' => 'boolean', 'example' => 'true'], + 'CreateTime' => ['description' => '创建时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:01.818Z'], + 'UpdateTime' => ['description' => '更新时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:01.818Z'], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'example' => 'VSwitch'], + 'DefaultPermission' => ['description' => '是否为默认权限。取值:'."\n" + ."\n" + .'- false:不是默认权限。'."\n" + ."\n" + .'- true:是默认权限。', 'type' => 'boolean', 'example' => 'true'], ], ], ], @@ -2723,99 +1591,40 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MissingParameter.ResourceOwner', - 'errorMessage' => 'You must specify ResourceOwner.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceOwner', - 'errorMessage' => 'The ResourceOwner is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.MaxResults', - 'errorMessage' => 'The MaxResults is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken', - 'errorMessage' => 'The NextToken is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken.Length', - 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds', - 'errorMessage' => 'The ResourceShareIds is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', - 'errorMessage' => 'The ResourceShareIds contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Length', - 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceIds', - 'errorMessage' => 'The ResourceIds is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceIds.Duplicate', - 'errorMessage' => 'The specified ResourceId contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceIds.Length', - 'errorMessage' => 'The maximum number of ResourceIds (5) is exceeded.', - ], - [ - 'errorCode' => 'InvalidParameter.Target', - 'errorMessage' => 'The Target is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter', - 'errorMessage' => 'The specified parameter is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns', - 'errorMessage' => 'The ResourceArns is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns.Duplicate', - 'errorMessage' => 'The ResourceArns contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArns.Length', - 'errorMessage' => 'The ResourceArns beyond the length limit.', - ], - [ - 'errorCode' => 'NotSupport.ResourceType.ResourcesParameter', - 'errorMessage' => 'The Resources parameter does not support this resource type. Please use ResourceArns instead.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceConflict', - 'errorMessage' => 'Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters.', - ], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType is invalid.', 'description' => '传入的资源类型错误。'], + ['errorCode' => 'InvalidParameter.MaxResults', 'errorMessage' => 'The MaxResults is invalid.', 'description' => 'MaxResults参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken', 'errorMessage' => 'The NextToken is invalid.', 'description' => 'NextToken参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken.Length', 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', 'description' => 'NextToken长度超限(最大256个字符)。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"04677DCA-7C33-464B-8811-1B1DA3C3D197\\",\\n \\"SharedResources\\": [\\n {\\n \\"UpdateTime\\": \\"2020-12-07T07:39:02.921Z\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"CreateTime\\": \\"2020-12-07T07:39:02.921Z\\",\\n \\"ResourceShareId\\": \\"rs-6GRmdD3X****\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceStatus\\": \\"Available\\",\\n \\"ResourceStatusMessage\\": \\"The reason for the association failure. \\",\\n \\"ResourceId\\": \\"vsw-bp1upw03qyz8n7us9****\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\" ?>\\r\\n<ListSharedResourcesResponse>\\r\\n\\t<RequestId>04677DCA-7C33-464B-8811-1B1DA3C3D197</RequestId>\\r\\n\\t<SharedResources>\\r\\n\\t\\t<ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\r\\n\\t\\t<ResourceId>vsw-bp1upw03qyz8n7us9****</ResourceId>\\r\\n\\t\\t<CreateTime>2020-12-07T07:39:02.921Z</CreateTime>\\r\\n\\t\\t<UpdateTime>2020-12-07T07:39:02.921Z</UpdateTime>\\r\\n\\t\\t<ResourceType>VSwitch</ResourceType>\\r\\n\\t</SharedResources>\\r\\n</ListSharedResourcesResponse>\\t\\r\\n","errorExample":""}]', - 'title' => '查询共享或其他账号共享的资源列表', - 'description' => '本文将提供一个示例,查询您在`cn-hangzhou`地域共享的资源列表。返回结果显示,您只共享过1个资源,即在共享单元`rs-6GRmdD3X****`内共享过`VSwitch`类型的资源`vsw-bp1upw03qyz8n7us9****`。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'ListSharedTargets' => [ - 'summary' => '查询资源使用者列表。', - 'methods' => [ - 'post', - 'get', + 'title' => '查询默认共享权限信息', + 'summary' => '调用ListPermissions查询默认共享权限信息。', + 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询资源类型为`VSwitch`的默认共享权限信息。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListPermissions'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListPermissions', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"04677DCA-7C33-464B-8811-1B1DA3C3D197\\",\\n \\"Permissions\\": [\\n {\\n \\"PermissionName\\": \\"AliyunRSDefaultPermissionVSwitch\\",\\n \\"PermissionVersion\\": \\"v1\\",\\n \\"DefaultVersion\\": true,\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"UpdateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"DefaultPermission\\": true\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListPermissionsResponse>\\n <NextToken>TGlzdFJlc291cm****</NextToken>\\n <RequestId>04677DCA-7C33-464B-8811-1B1DA3C3D197</RequestId>\\n <Permissions>\\n <PermissionName>AliyunRSDefaultPermissionVSwitch</PermissionName>\\n <PermissionVersion>v1</PermissionVersion>\\n <DefaultVersion>true</DefaultVersion>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:01.818Z</UpdateTime>\\n <ResourceType>VSwitch</ResourceType>\\n <DefaultPermission>true</DefaultPermission>\\n </Permissions>\\n</ListPermissionsResponse>","errorExample":""}]', + ], + 'ListResourceShareAssociations' => [ + 'summary' => '查询共享单元中关联资源或资源使用者的记录。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -2823,80 +1632,59 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'ResourceOwner', + 'name' => 'ResourceId', 'in' => 'query', - 'schema' => [ - 'description' => '共享单元归属者。'."\n" - ."\n" - .'- Self:查询您创建的共享单元中,关联的资源使用者列表。'."\n" - .'- OtherAccounts:查询其他账号创建的共享单元中,您作为资源使用者的共享单元及共享单元拥有者列表。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'Self', - ], + 'schema' => ['description' => '资源ID。'."\n" + .'>当`AssociationType`为`Target`时,该参数不可用。', 'type' => 'string', 'required' => false, 'example' => 'vsw-bp183p93qs667muql****'], ], [ - 'name' => 'ResourceType', + 'name' => 'ResourceArn', 'in' => 'query', - 'schema' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'VSwitch', - ], + 'schema' => ['description' => '资源ARN。'."\n" + .'> 当`AssociationType`为`Target`时,该参数不可用。', 'type' => 'string', 'required' => false, 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], ], [ - 'name' => 'ResourceId', + 'name' => 'Target', 'in' => 'query', - 'schema' => [ - 'description' => '共享资源ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'vsw-bp1upw03qyz8n7us9****', - ], + 'schema' => ['description' => '资源使用者ID。'."\n" + ."\n" + .'>当`AssociationType`为`Resource`时,该参数不可用。', 'type' => 'string', 'required' => false, 'example' => '172050525300****'], ], [ - 'name' => 'ResourceArn', + 'name' => 'AssociationType', 'in' => 'query', - 'schema' => [ - 'description' => '共享资源ARN。', - 'type' => 'string', - 'required' => false, - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], + 'schema' => ['description' => '关联类型:取值:'."\n" + ."\n" + .'- Resource:查询关联共享资源的记录。'."\n" + .'- Target:查询关联资源使用者的记录。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'Resource'], + ], + [ + 'name' => 'AssociationStatus', + 'in' => 'query', + 'schema' => ['description' => '关联状态。取值:'."\n" + ."\n" + .'- Associating:关联中。'."\n" + .'- Associated:已关联。'."\n" + .'- Failed:关联失败。'."\n" + .'- Disassociating:分离中。'."\n" + .'- Disassociated:已分离。'."\n" + ."\n" + .'> `Failed`和`Disassociated`状态的记录,会在48~96小时内被系统自动删除。', 'type' => 'string', 'required' => false, 'example' => 'Associated'], ], [ 'name' => 'MaxResults', 'in' => 'query', - 'schema' => [ - 'description' => '单次请求返回结果的最大条数。'."\n" - ."\n" - .'取值范围:1~100。默认值:20。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '20', - ], + 'schema' => ['description' => '单次请求返回结果的最大条数。'."\n" + ."\n" + .'取值范围:1~100。默认值:20。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], ], [ 'name' => 'NextToken', 'in' => 'query', - 'schema' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'required' => false, - 'example' => 'TGlzdFJlc291cm****', - ], + 'schema' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'required' => false, 'example' => 'TGlzdFJlc291cm****'], ], [ 'name' => 'ResourceShareIds', @@ -2907,44 +1695,12 @@ ."\n" .'N的取值范围:1~5,即每次最多指定5个共享单元。', 'type' => 'array', - 'items' => [ - 'description' => '共享单元ID。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多指定5个共享单元。', - 'type' => 'string', - 'required' => false, - 'example' => 'rs-6GRmdD3X****', - ], + 'items' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => false, 'example' => 'rs-6GRmdD3X****'], 'required' => false, 'example' => 'rs-6GRmdD3X****', 'maxItems' => 20, ], ], - [ - 'name' => 'Targets', - 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '资源使用者。', - 'type' => 'array', - 'items' => [ - 'description' => '资源使用者。取值:'."\n" - ."\n" - .'- 当`AllowExternalTargets`为`false`时,资源使用者可以为资源目录ID、资源夹ID或成员ID。'."\n" - .'- 当`AllowExternalTargets`为`true`时,资源使用者可以为阿里云账号ID、资源目录ID、资源夹ID、成员ID或阿里云服务。'."\n" - ."\n" - .'更多信息,请参见[资源共享方式](~~160622~~)、[查看资源目录ID](~~111217~~)、[查看资源夹ID](~~111223~~)或[查看成员ID](~~111624~~)。'."\n" - ."\n" - .'N的取值范围:1~5,即每次最多添加5个资源使用者。', - 'type' => 'string', - 'required' => false, - 'example' => '114240524784****', - ], - 'required' => false, - 'example' => '114240524784****', - 'maxItems' => 20, - ], - ], ], 'responses' => [ 200 => [ @@ -2952,67 +1708,98 @@ 'description' => '返回参数。', 'type' => 'object', 'properties' => [ - 'NextToken' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'example' => 'TGlzdFJlc291cm****', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '04677DCA-7C33-464B-8811-1B1DA3C3D197', - ], - 'SharedTargets' => [ - 'description' => '资源使用者信息。'."\n", + 'NextToken' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'example' => 'TGlzdFJlc291cm****'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '11BA57B5-7301-4E2F-BBA5-2AE4C2F4FCDB'], + 'ResourceShareAssociations' => [ + 'description' => '共享资源或资源使用者信息。', 'type' => 'array', 'items' => [ - 'description' => '资源使用者信息。', + 'description' => '共享资源或资源使用者信息。', 'type' => 'object', 'properties' => [ - 'TargetId' => [ - 'description' => '资源使用者ID或资源所有者ID。取值:'."\n" - ."\n" - .'- 当`ResourceOwner`为`Self`时,该参数为资源使用者ID。'."\n" - .'- 当`ResourceOwner`为`OtherAccounts`时,该参数为资源所有者ID。', - 'type' => 'string', - 'example' => '114240524784****', - ], - 'UpdateTime' => [ - 'description' => '更新关联资源使用者的时间。', - 'type' => 'string', - 'example' => '2020-12-07T09:16:59.905Z', - ], - 'CreateTime' => [ - 'description' => '关联资源使用者的时间。', - 'type' => 'string', - 'example' => '2020-12-07T09:16:59.905Z', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-6GRmdD3X****', - ], - 'External' => [ - 'description' => '资源使用者是否为资源目录外账号。取值:'."\n" - ."\n" - .'- true:资源目录外账号。'."\n" - .'- false:资源目录内账号。', - 'type' => 'boolean', - 'example' => 'false', - ], - 'TargetProperty' => [ - 'description' => '资源使用者属性。例如:资源共享的时间段。'."\n" - .'> 仅当资源使用者为阿里云服务时返回该参数。', - 'type' => 'string', - 'example' => '{'."\n" - .' "timeRange":{'."\n" - .' "timeRangeType":"timeRange",'."\n" - .' "beginAtTime":"00:00",'."\n" - .' "timezone":"UTC+8",'."\n" - .' "endAtTime":"19:59"'."\n" - .' }'."\n" - .'}', + 'UpdateTime' => ['description' => '更新关联的时间。存在以下两种情况:'."\n" + ."\n" + .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为更新资源的时间。'."\n" + .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为更新资源使用者的时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:02.920Z'], + 'EntityId' => ['description' => '关联实体ID。取值:'."\n" + ."\n" + .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为资源ID。'."\n" + .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为资源使用者ID。', 'type' => 'string', 'example' => 'vsw-bp1upw03qyz8n7us9****'], + 'ResourceArn' => ['description' => '关联资源ARN。'."\n" + .'> 当关联类型`AssociationType`为资源使用者`Target`时,该参数不可用。', 'type' => 'string', 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + 'ResourceShareName' => ['description' => '共享单元名称。', 'type' => 'string', 'example' => 'example'], + 'CreateTime' => ['description' => '关联的时间。存在以下两种情况:'."\n" + ."\n" + .'- 当关联类型`AssociationType`为资源`Resource`时,该参数为添加或移除资源的时间。'."\n" + .'- 当关联类型`AssociationType`为资源使用者`Target`时,该参数为添加或移除资源使用者的时间。'."\n", 'type' => 'string', 'example' => '2020-12-07T07:39:01.818Z'], + 'EntityType' => ['description' => '关联实体类型。取值:'."\n" + ."\n" + .'- 当关联实体为资源时,该参数为资源类型。更多信息,请参见[支持资源共享的云服务](~~450526~~)。'."\n" + .'- 当关联实体为资源使用者时,该参数为`Account`。', 'type' => 'string', 'example' => 'VSwitch'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-6GRmdD3X****'], + 'AssociationStatusMessage' => ['description' => '关联失败的原因。', 'type' => 'string', 'example' => 'The reason for the association failure. '], + 'AssociationType' => ['description' => '关联类型。取值:'."\n" + ."\n" + .'- Resource:资源。'."\n" + .'- Target:资源使用者。', 'type' => 'string', 'example' => 'Resource'], + 'AssociationStatus' => ['description' => '关联状态。取值:'."\n" + ."\n" + .'- Associating:关联中。'."\n" + .'- Associated:已关联。'."\n" + .'- Failed:关联失败。'."\n" + .'- Disassociating:分离中。'."\n" + .'- Disassociated:已分离。'."\n" + ."\n" + .'> `Failed`和`Disassociated`状态的记录,会在48~96小时内被系统自动删除。', 'type' => 'string', 'example' => 'Failed'], + 'External' => ['description' => '资源使用者是否为资源目录外账号。取值:'."\n" + ."\n" + .'- true:资源目录外账号。'."\n" + .'- false:资源目录内账号。', 'type' => 'boolean', 'example' => 'false'], + 'AssociationFailedDetails' => [ + 'description' => '关联或解除关联资源或者资源使用者检查失败详细原因。', + 'type' => 'array', + 'items' => [ + 'description' => '关联或解除关联资源或者资源使用者检查失败详细原因。', + 'type' => 'object', + 'properties' => [ + 'Status' => ['description' => '已弃用。请使用FailureReason。', 'type' => 'string', 'example' => '无'], + 'StatusMessage' => ['description' => '已弃用。请使用FailureDescription。', 'type' => 'string', 'example' => '无'], + 'AssociateType' => ['description' => '已弃用。请使用OperationType。', 'type' => 'string', 'example' => '无'], + 'ResourceArn' => ['description' => '关联资源ARN。'."\n" + .'> 当`AssociationType`为资源`Resource`时,该参数不可用。', 'type' => 'string', 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + 'EntityType' => ['description' => '关联实体类型。取值:'."\n" + ."\n" + .'* 当关联实体为资源时,该参数为资源类型。更多信息,请参见[支持资源共享的云服务](~~450526~~)。'."\n" + .'* 当关联实体为资源使用者时,该参数为`ResourceDirectory`、`Folder`、`Account`或`Service`。', 'type' => 'string', 'example' => 'Account'], + 'FailureReason' => ['description' => '关联或解除关联失败时的原因。 取值:'."\n" + .'- Unavailable:资源不存在等情况导致共享失败。 '."\n" + .'- LimitExceeded:资源可共享的目标Quota超出上限。 '."\n" + .'- ZonalResourceInaccessible: 资源在此地域不可用。 '."\n" + .'- InternalError:服务器内部出现错误。 '."\n" + .'- UnsupportedOperation:不支持执行操作。', 'type' => 'string', 'example' => 'Unavailable'], + 'FailureDescription' => ['description' => '关联或解除关联失败时的详细原因描述。', 'type' => 'string', 'example' => 'You cannot access the specified resource at this time.'], + 'OperationType' => ['description' => '操作类型。取值:'."\n" + .'- Associate:关联。'."\n" + .'- Disassociate:解除关联。', 'type' => 'string', 'example' => 'Associate'], + 'EntityId' => ['description' => '关联实体ID。取值:'."\n" + ."\n" + .'* 当关联类型AssociationType为资源Resource时,该参数为资源使用者ID。'."\n" + .'* 当关联类型AssociationType为资源使用者Target时,该参数为资源ID。', 'type' => 'string', 'example' => '172050525300****'], + ], + ], ], + 'TargetProperty' => ['description' => '资源使用者属性。例如:资源共享的时间段。`timeRangeType`取值:'."\n" + .'- timeRange:指定时间段。'."\n" + .'- day:全天。'."\n" + .'> 仅当资源使用者为阿里云服务时返回该参数。', 'type' => 'string', 'example' => '{'."\n" + .' "timeRange":{'."\n" + .' "timeRangeType":"timeRange",'."\n" + .' "beginAtTime":"00:00",'."\n" + .' "timezone":"UTC+8",'."\n" + .' "endAtTime":"19:59"'."\n" + .' }'."\n" + .'}'], + 'ResourceProperty' => ['title' => '资源属性。', 'description' => '资源属性。', 'type' => 'string', 'example' => '{"sharePrincipals":true,"shareTagOptions":false}'], ], ], ], @@ -3022,90 +1809,55 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MissingParameter.ResourceOwner', - 'errorMessage' => 'You must specify ResourceOwner.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceOwner', - 'errorMessage' => 'The ResourceOwner is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.MaxResults', - 'errorMessage' => 'The MaxResults is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken', - 'errorMessage' => 'The NextToken is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken.Length', - 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds', - 'errorMessage' => 'The ResourceShareIds is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', - 'errorMessage' => 'The ResourceShareIds contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Length', - 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets', - 'errorMessage' => 'The Targets is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets.Duplicate', - 'errorMessage' => 'The Targets contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.Targets.Length', - 'errorMessage' => 'The maximum number of Targets exceeds 5.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceId', - 'errorMessage' => 'The ResourceId is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter', - 'errorMessage' => 'The specified parameter is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceArn', - 'errorMessage' => 'The ResourceArn is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceConflict', - 'errorMessage' => 'Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters.', - ], + ['errorCode' => 'MissingParameter.AssociationType', 'errorMessage' => 'You must specify AssociationType.', 'description' => 'AssociationType参数缺失。'], + ['errorCode' => 'InvalidParameter.AssociationType', 'errorMessage' => 'The AssociationType is invalid.', 'description' => 'AssociationType参数错误。'], + ['errorCode' => 'InvalidParameter.AssociationStatus', 'errorMessage' => 'The AssociationStatus is invalid.', 'description' => 'AssociationStatus参数错误。'], + ['errorCode' => 'InvalidParameter.MaxResults', 'errorMessage' => 'The MaxResults is invalid.', 'description' => 'MaxResults参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken', 'errorMessage' => 'The NextToken is invalid.', 'description' => 'NextToken参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken.Length', 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', 'description' => 'NextToken长度超限(最大256个字符)。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds', 'errorMessage' => 'The ResourceShareIds is invalid.', 'description' => 'ResourceShareIds参数错误。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', 'errorMessage' => 'The ResourceShareIds contains duplicate values.', 'description' => 'ResourceShareIds有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Length', 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', 'description' => 'ResourceShareIds长度超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.Target', 'errorMessage' => 'The Target is invalid.', 'description' => '资源所有者传参错误。'], + ['errorCode' => 'InvalidParameter.ResourceId', 'errorMessage' => 'The ResourceId is invalid.', 'description' => 'ResourceId参数错误。'], + ['errorCode' => 'ConflictedAssociationType', 'errorMessage' => 'The specified ResourceId or Target conflicts with AssociationType.', 'description' => '参数组合冲突:传入参数与AssociationType选定项不符。'], + ['errorCode' => 'InvalidParameter', 'errorMessage' => 'The specified parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceArn', 'errorMessage' => 'The ResourceArn is invalid.', 'description' => '资源ARN参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceConflict', 'errorMessage' => 'Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters.', 'description' => 'ResourceId 和 ResourceArn 不能同时指定。请仅提供其中一个参数。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"04677DCA-7C33-464B-8811-1B1DA3C3D197\\",\\n \\"SharedTargets\\": [\\n {\\n \\"TargetId\\": \\"114240524784****\\",\\n \\"UpdateTime\\": \\"2020-12-07T09:16:59.905Z\\",\\n \\"CreateTime\\": \\"2020-12-07T09:16:59.905Z\\",\\n \\"ResourceShareId\\": \\"rs-6GRmdD3X****\\",\\n \\"External\\": false,\\n \\"TargetProperty\\": \\"{\\\\n \\\\\\"timeRange\\\\\\":{\\\\n \\\\\\"timeRangeType\\\\\\":\\\\\\"timeRange\\\\\\",\\\\n \\\\\\"beginAtTime\\\\\\":\\\\\\"00:00\\\\\\",\\\\n \\\\\\"timezone\\\\\\":\\\\\\"UTC+8\\\\\\",\\\\n \\\\\\"endAtTime\\\\\\":\\\\\\"19:59\\\\\\"\\\\n }\\\\n}\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListSharedTargetsResponse>\\n <RequestId>445ECACB-1082-4008-ABD4-8B259EFF4855</RequestId>\\n <SharedTargets>\\n <ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\n <CreateTime>2020-12-07T09:16:59.905Z</CreateTime>\\n <UpdateTime>2020-12-07T09:16:59.905Z</UpdateTime>\\n <External>false</External>\\n <TargetId>114240524784****</TargetId>\\n </SharedTargets>\\n <SharedTargets>\\n <ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\n <CreateTime>2020-12-07T09:15:26.879Z</CreateTime>\\n <UpdateTime>2020-12-07T09:15:26.879Z</UpdateTime>\\n <External>false</External>\\n <TargetId>172050525300****</TargetId>\\n </SharedTargets>\\n</ListSharedTargetsResponse>","errorExample":""}]', - 'title' => '查询资源使用者列表', - 'description' => '如果您是资源所有者,您可以查询您把资源共享给了哪些资源使用者。'."\n" - .'如果您是资源使用者,您可以查询您参与了哪些资源共享。'."\n" + 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"11BA57B5-7301-4E2F-BBA5-2AE4C2F4FCDB\\",\\n \\"ResourceShareAssociations\\": [\\n {\\n \\"UpdateTime\\": \\"2020-12-07T07:39:02.920Z\\",\\n \\"EntityId\\": \\"vsw-bp1upw03qyz8n7us9****\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceShareName\\": \\"example\\",\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"EntityType\\": \\"VSwitch\\",\\n \\"ResourceShareId\\": \\"rs-6GRmdD3X****\\",\\n \\"AssociationStatusMessage\\": \\"The reason for the association failure. \\",\\n \\"AssociationType\\": \\"Resource\\",\\n \\"AssociationStatus\\": \\"Failed\\",\\n \\"External\\": false,\\n \\"AssociationFailedDetails\\": [\\n {\\n \\"Status\\": \\"无\\",\\n \\"StatusMessage\\": \\"无\\",\\n \\"AssociateType\\": \\"无\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"EntityType\\": \\"Account\\",\\n \\"FailureReason\\": \\"Unavailable\\",\\n \\"FailureDescription\\": \\"You cannot access the specified resource at this time.\\",\\n \\"OperationType\\": \\"Associate\\",\\n \\"EntityId\\": \\"172050525300****\\"\\n }\\n ],\\n \\"TargetProperty\\": \\"{\\\\n \\\\\\"timeRange\\\\\\":{\\\\n \\\\\\"timeRangeType\\\\\\":\\\\\\"timeRange\\\\\\",\\\\n \\\\\\"beginAtTime\\\\\\":\\\\\\"00:00\\\\\\",\\\\n \\\\\\"timezone\\\\\\":\\\\\\"UTC+8\\\\\\",\\\\n \\\\\\"endAtTime\\\\\\":\\\\\\"19:59\\\\\\"\\\\n }\\\\n}\\",\\n \\"ResourceProperty\\": \\"{\\\\\\"sharePrincipals\\\\\\":true,\\\\\\"shareTagOptions\\\\\\":false}\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListResourceShareAssociationsResponse>\\n <ResourceShareAssociations>\\n <ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\n <ResourceShareName>example</ResourceShareName>\\n <EntityId>vsw-bp1upw03qyz8n7us9****</EntityId>\\n <EntityType>VSwitch</EntityType>\\n <AssociationStatusMessage/>\\n <AssociationType>Resource</AssociationType>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:02.920Z</UpdateTime>\\n <External>false</External>\\n <AssociationStatus>Associated</AssociationStatus>\\n </ResourceShareAssociations>\\n <ResourceShareAssociations>\\n <ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\n <ResourceShareName>example</ResourceShareName>\\n <EntityId>vsw-bp183p93qs667muql****</EntityId>\\n <EntityType>VSwitch</EntityType>\\n <AssociationStatusMessage/>\\n <AssociationType>Resource</AssociationType>\\n <CreateTime>2020-12-04T09:40:41.246Z</CreateTime>\\n <UpdateTime>2020-12-07T03:17:24.067Z</UpdateTime>\\n <External>false</External>\\n <AssociationStatus>Disassociated</AssociationStatus>\\n </ResourceShareAssociations>\\n <RequestId>11BA57B5-7301-4E2F-BBA5-2AE4C2F4FCDB</RequestId>\\n</ListResourceShareAssociationsResponse>","errorExample":""}]', + 'title' => '查询关联资源或资源使用者', + 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询当前账号创建的共享单元中关联的共享资源的记录。返回结果显示,当前账号关联过以下2个资源:'."\n" ."\n" - .'本文将提供一个示例,在`cn-hangzhou`地域,查询您发起的资源共享的资源使用者列表。返回结果显示,您将资源共享给了资源使用者`114240524784****`和`172050525300****`。', + .'- 在共享单元`rs-6GRmdD3X****`中,添加过`VSwitch`类型的共享资源`vsw-bp1upw03qyz8n7us9****`,该资源处于关联中`Associated`状态,即该资源正常共享中。'."\n" + .'- 在共享单元`rs-6GRmdD3X****`中,移除过`VSwitch`类型的共享资源`vsw-bp183p93qs667muql****`,该资源处于已分离`Disassociated`状态,即该资源已停止共享。', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'DescribeRegions' => [ - 'summary' => '查询支持资源共享的地域。', - 'methods' => [ - 'post', - 'get', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListResourceShareAssociations'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListResourceShareAssociations', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'ListResourceShareInvitations' => [ + 'summary' => '资源使用者调用ListResourceShareInvitations查询自己收到的资源共享邀请信息。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -3113,23 +1865,42 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'AcceptLanguage', + 'name' => 'MaxResults', + 'in' => 'query', + 'schema' => ['description' => '单次请求返回结果的最大条数。'."\n" + ."\n" + .'取值范围:1~100。默认值:20。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], + ], + [ + 'name' => 'NextToken', 'in' => 'query', + 'schema' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'required' => false, 'example' => 'TGlzdFJlc291cm****'], + ], + [ + 'name' => 'ResourceShareIds', + 'in' => 'query', + 'style' => 'repeatList', + 'schema' => [ + 'description' => '共享单元ID。', + 'type' => 'array', + 'items' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => false, 'example' => 'rs-ysGRci9z****'], + 'required' => false, + 'maxItems' => 20, + ], + ], + [ + 'name' => 'ResourceShareInvitationIds', + 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '支持的语言。取值:'."\n" - .'- 中文:zh-CN。'."\n" - .'- 英文:en-US。'."\n", - 'type' => 'string', + 'description' => '资源共享邀请ID。', + 'type' => 'array', + 'items' => ['description' => '资源共享邀请ID。', 'type' => 'string', 'required' => false, 'example' => 'i-p6eRytrkjVvM****'], 'required' => false, - 'example' => 'zh-CN', + 'maxItems' => 20, ], ], ], @@ -3139,32 +1910,57 @@ 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '0D64A198-5842-4570-8E26-5E540CDC84CD', - ], - 'Regions' => [ - 'description' => '地域信息。', + 'NextToken' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'example' => 'TGlzdFJlc291cm****'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '30EC8328-1BDE-51D5-BFAB-039508BD91A1'], + 'ResourceShareInvitations' => [ + 'description' => '资源共享邀请信息。', 'type' => 'array', 'items' => [ - 'description' => '地域信息。', + 'description' => '资源共享邀请信息。', 'type' => 'object', 'properties' => [ - 'RegionEndpoint' => [ - 'description' => '地域的接入地址。', - 'type' => 'string', - 'example' => 'resourcesharing.cn-hangzhou.aliyuncs.com', - ], - 'LocalName' => [ - 'description' => '地域名称。', - 'type' => 'string', - 'example' => '华东1(杭州)', - ], - 'RegionId' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'example' => 'cn-hangzhou', + 'Status' => ['description' => '邀请状态。取值:'."\n" + ."\n" + .'- Pending:等待确认。'."\n" + .'- Accepted:接受邀请成功。'."\n" + .'- Cancelled:已取消。'."\n" + .'- Rejected:已拒绝。'."\n" + .'- Expired:已过期。'."\n" + .'- AcceptFailed:接受邀请失败。', 'type' => 'string', 'example' => 'Pending'], + 'CreateTime' => ['description' => '邀请创建时间(UTC时间)。', 'type' => 'string', 'example' => '2022-08-18T05:36:45.024Z'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-ysGRci9z****'], + 'ResourceShareName' => ['description' => '共享单元名称。', 'type' => 'string', 'example' => 'example'], + 'SenderAccountId' => ['description' => '邀请者的阿里云账号ID。', 'type' => 'string', 'example' => '151266687691****'], + 'ReceiverAccountId' => ['description' => '被邀请者的阿里云账号ID。', 'type' => 'string', 'example' => '134254031178****'], + 'ResourceShareInvitationId' => ['description' => '资源共享邀请ID。', 'type' => 'string', 'example' => 'i-p6eRytrkjVvM****'], + 'InvitationFailedDetails' => [ + 'description' => '接受共享单元邀请或退出共享单元检查失败详细原因。', + 'type' => 'array', + 'items' => [ + 'description' => '接受共享单元邀请或退出共享单元检查失败详细原因。', + 'type' => 'object', + 'properties' => [ + 'Status' => ['description' => '已弃用。请使用FailureReason。', 'type' => 'string', 'example' => 'None'], + 'StatusMessage' => ['description' => '已弃用。请使用FailureDescription。', 'type' => 'string', 'example' => 'None'], + 'AssociateType' => ['description' => '已弃用。请使用OperationType。', 'type' => 'string', 'example' => 'None'], + 'ResourceArn' => ['description' => '共享资源ARN。', 'type' => 'string', 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'example' => 'Snapshot'], + 'FailureReason' => ['description' => '接受或退出共享单元检查失败时的原因。取值:'."\n" + ."\n" + .'- Unavailable:资源不可以共享。'."\n" + .'- LimitExceeded:资源可共享账号配额超限。'."\n" + .'- ZonalResourceInaccessible: 资源在此地域不可用。'."\n" + .'- InternalError:检查过程服务器内部出现错误。'."\n" + .'- UnsupportedOperation:不支持执行操作。', 'type' => 'string', 'example' => 'Unavailable'], + 'FailureDescription' => ['description' => '接受或退出共享单元检查失败时的详细原因描述。', 'type' => 'string', 'example' => 'You cannot access the specified resource at this time.'], + 'OperationType' => ['description' => '操作类型。取值:'."\n" + .'- Associate:关联。'."\n" + .'- Disassociate:解除关联。', 'type' => 'string', 'example' => 'Associate'], + 'ResourceId' => ['description' => '共享资源ID。', 'type' => 'string', 'example' => 's-7xvh46nx5oqlre0wv***'], + ], + ], ], ], ], @@ -3173,127 +1969,117 @@ ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"0D64A198-5842-4570-8E26-5E540CDC84CD\\",\\n \\"Regions\\": [\\n {\\n \\"RegionEndpoint\\": \\"resourcesharing.cn-hangzhou.aliyuncs.com\\",\\n \\"LocalName\\": \\"华东1(杭州)\\",\\n \\"RegionId\\": \\"cn-hangzhou\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<DescribeRegionsResponse>\\n <RequestId>9BF57A2D-5108-58A1-BF2B-812BB4026666</RequestId>\\n <Regions>\\n <RegionId>cn-hangzhou</RegionId>\\n <RegionEndpoint>resourcesharing.cn-hangzhou.aliyuncs.com</RegionEndpoint>\\n <LocalName>华东1(杭州)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-shanghai</RegionId>\\n <RegionEndpoint>resourcesharing.cn-shanghai.aliyuncs.com</RegionEndpoint>\\n <LocalName>华东2(上海)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-qingdao</RegionId>\\n <RegionEndpoint>resourcesharing.cn-qingdao.aliyuncs.com</RegionEndpoint>\\n <LocalName>华北1(青岛)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-beijing</RegionId>\\n <RegionEndpoint>resourcesharing.cn-beijing.aliyuncs.com</RegionEndpoint>\\n <LocalName>华北2(北京)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-zhangjiakou</RegionId>\\n <RegionEndpoint>resourcesharing.cn-zhangjiakou.aliyuncs.com</RegionEndpoint>\\n <LocalName>华北3(张家口)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-huhehaote</RegionId>\\n <RegionEndpoint>resourcesharing.cn-huhehaote.aliyuncs.com</RegionEndpoint>\\n <LocalName>华北5(呼和浩特)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-shenzhen</RegionId>\\n <RegionEndpoint>resourcesharing.cn-shenzhen.aliyuncs.com</RegionEndpoint>\\n <LocalName>华南1(深圳)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-heyuan</RegionId>\\n <RegionEndpoint>resourcesharing.cn-heyuan.aliyuncs.com</RegionEndpoint>\\n <LocalName>华南2(河源)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-guangzhou</RegionId>\\n <RegionEndpoint>resourcesharing.cn-guangzhou.aliyuncs.com</RegionEndpoint>\\n <LocalName>华南3(广州)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-chengdu</RegionId>\\n <RegionEndpoint>resourcesharing.cn-chengdu.aliyuncs.com</RegionEndpoint>\\n <LocalName>西南1(成都)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>cn-hongkong</RegionId>\\n <RegionEndpoint>resourcesharing.cn-hongkong.aliyuncs.com</RegionEndpoint>\\n <LocalName>中国(香港)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-1</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>新加坡</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-northeast-1</RegionId>\\n <RegionEndpoint>resourcesharing.ap-northeast-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>日本(东京)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-northeast-2</RegionId>\\n <RegionEndpoint>resourcesharing.ap-northeast-2.aliyuncs.com</RegionEndpoint>\\n <LocalName>韩国(首尔)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-2</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-2.aliyuncs.com</RegionEndpoint>\\n <LocalName>澳大利亚(悉尼)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-3</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-3.aliyuncs.com</RegionEndpoint>\\n <LocalName>马来西亚(吉隆坡)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-5</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-5.aliyuncs.com</RegionEndpoint>\\n <LocalName>印度尼西亚(雅加达)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-6</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-6.aliyuncs.com</RegionEndpoint>\\n <LocalName>菲律宾(马尼拉)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-southeast-7</RegionId>\\n <RegionEndpoint>resourcesharing.ap-southeast-7.aliyuncs.com</RegionEndpoint>\\n <LocalName>泰国(曼谷)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>ap-south-1</RegionId>\\n <RegionEndpoint>resourcesharing.ap-south-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>印度(孟买)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>eu-central-1</RegionId>\\n <RegionEndpoint>resourcesharing.eu-central-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>德国(法兰克福)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>eu-west-1</RegionId>\\n <RegionEndpoint>resourcesharing.eu-west-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>英国(伦敦)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>us-east-1</RegionId>\\n <RegionEndpoint>resourcesharing.us-east-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>美国(弗吉尼亚)</LocalName>\\n </Regions>\\n <Regions>\\n <RegionId>us-west-1</RegionId>\\n <RegionEndpoint>resourcesharing.us-west-1.aliyuncs.com</RegionEndpoint>\\n <LocalName>美国(硅谷)</LocalName>\\n </Regions>\\n</DescribeRegionsResponse>","errorExample":""}]', - 'title' => '查询支持资源共享的地域', - 'requestParamsDescription' => ' 关于公共请求参数的详情,请参见[公共参数](~~159973~~)。', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'CheckSharingWithResourceDirectoryStatus' => [ - 'summary' => '检查基于组织共享的状态。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ - [ - 'AK' => [], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'InvalidParameter.MaxResults', 'errorMessage' => 'The MaxResults is invalid.', 'description' => 'MaxResults参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken', 'errorMessage' => 'The NextToken is invalid.', 'description' => 'NextToken参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken.Length', 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', 'description' => 'NextToken长度超限(最大256个字符)。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds', 'errorMessage' => 'The ResourceShareIds is invalid.', 'description' => 'ResourceShareIds参数错误。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', 'errorMessage' => 'The ResourceShareIds contains duplicate values.', 'description' => 'ResourceShareIds有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Length', 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', 'description' => 'ResourceShareIds长度超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.ResourceShareInvitationIds', 'errorMessage' => 'The ResourceShareInvitationIds is invalid.', 'description' => '参数ResourceShareInvitationIds非法。'], + ['errorCode' => 'InvalidParameter.ResourceShareInvitationIds.Duplicate', 'errorMessage' => 'The ResourceShareInvitationIds duplicate values.', 'description' => '参数ResourceShareInvitationIds重复。'], + ['errorCode' => 'InvalidParameter.ResourceShareInvitationIds.Length', 'errorMessage' => 'The maximum length of ResourceShareInvitationIds exceeds quota limit.', 'description' => 'ResourceShareInvitationIds长度超限。'], ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"30EC8328-1BDE-51D5-BFAB-039508BD91A1\\",\\n \\"ResourceShareInvitations\\": [\\n {\\n \\"Status\\": \\"Pending\\",\\n \\"CreateTime\\": \\"2022-08-18T05:36:45.024Z\\",\\n \\"ResourceShareId\\": \\"rs-ysGRci9z****\\",\\n \\"ResourceShareName\\": \\"example\\",\\n \\"SenderAccountId\\": \\"151266687691****\\",\\n \\"ReceiverAccountId\\": \\"134254031178****\\",\\n \\"ResourceShareInvitationId\\": \\"i-p6eRytrkjVvM****\\",\\n \\"InvitationFailedDetails\\": [\\n {\\n \\"Status\\": \\"None\\",\\n \\"StatusMessage\\": \\"None\\",\\n \\"AssociateType\\": \\"None\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceType\\": \\"Snapshot\\",\\n \\"FailureReason\\": \\"Unavailable\\",\\n \\"FailureDescription\\": \\"You cannot access the specified resource at this time.\\",\\n \\"OperationType\\": \\"Associate\\",\\n \\"ResourceId\\": \\"s-7xvh46nx5oqlre0wv***\\"\\n }\\n ]\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListResourceShareInvitationsResponse>\\n <ResourceShareInvitations>\\n <Status>Pending</Status>\\n <ResourceShareId>rs-ysGRci9z****</ResourceShareId>\\n <ResourceShareName>example</ResourceShareName>\\n <SenderAccountId>151266687691****</SenderAccountId>\\n <ReceiverAccountId>134254031178****</ReceiverAccountId>\\n <CreateTime>2022-08-18T05:36:45.024Z</CreateTime>\\n <ResourceShareInvitationId>i-p6eRytrkjVvM****</ResourceShareInvitationId>\\n </ResourceShareInvitations>\\n <RequestId>30EC8328-1BDE-51D5-BFAB-039508BD91A1</RequestId>\\n</ListResourceShareInvitationsResponse>","errorExample":""}]', + 'title' => '查询收到的资源共享邀请信息', + 'description' => '### 使用说明'."\n" + .'本文将提供一个示例,查询当前账号在`cn-hangzhou`地域收到的资源共享邀请。返回结果显示,共收到1个邀请,且处于等待确认状态。', + 'requestParamsDescription' => '关于公共请求参数的详情,请参见[公共参数](~~159973~~)。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListResourceShareInvitations'], + ], ], - 'parameters' => [], - 'responses' => [ - 200 => [ - 'schema' => [ - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '819545D0-C97A-5DB3-BD73-A1B17E9A4BC1', - ], - 'EnableSharingWithRd' => [ - 'description' => '是否启用与资源目录组织的共享。取值:'."\n" - ."\n" - .'- false:未启用。'."\n" - .'- true:已启用。', - 'type' => 'boolean', - 'example' => 'true', - ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListResourceShareInvitations', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"819545D0-C97A-5DB3-BD73-A1B17E9A4BC1\\",\\n \\"EnableSharingWithRd\\": true\\n}","type":"json"}]', - 'title' => '检查基于组织共享的状态', ], - 'ChangeResourceGroup' => [ - 'summary' => '将共享单元从一个资源组转移到另外一个资源组。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'ListResourceSharePermissions' => [ + 'summary' => '调用ListResourceSharePermissions查询共享单元中关联权限的记录。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list'], 'parameters' => [ [ - 'name' => 'ResourceId', + 'name' => 'ResourceShareId', 'in' => 'query', - 'schema' => [ - 'title' => '资源Id', - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'rs-dz3Ek1iiO***', - ], + 'schema' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'rs-6GRmdD3X****'], ], [ - 'name' => 'ResourceRegionId', + 'name' => 'MaxResults', 'in' => 'query', - 'schema' => [ - 'title' => '地域Id', - 'description' => '共享单元所在的地域ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'cn-hangzhou', - ], + 'schema' => ['description' => '单次请求返回结果的最大条数。'."\n" + ."\n" + .'取值范围:1~100。默认值:20。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], ], [ - 'name' => 'ResourceGroupId', + 'name' => 'NextToken', 'in' => 'query', - 'schema' => [ - 'title' => '目标资源组', - 'description' => '目标资源组。', - 'type' => 'string', - 'required' => true, - 'example' => 'rg-aek2nb47ueqk***', - ], + 'schema' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'required' => false, 'example' => 'TGlzdFJlc291cm****'], + ], + [ + 'name' => 'ResourceOwner', + 'in' => 'query', + 'schema' => ['description' => '共享单元归属者。取值:'."\n" + ."\n" + .'- Self:查询当前账号的共享单元列表。'."\n" + .'- OtherAccounts:查询其他账号共享给当前账号的共享单元列表。', 'type' => 'string', 'required' => true, 'example' => 'Self'], ], ], 'responses' => [ 200 => [ - 'headers' => [], 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '返回结果。', + 'description' => '返回参数。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '0A900114-22D3-5E9D-87A2-48E5EB5BF310', + 'NextToken' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'example' => 'TGlzdFJlc291cm****'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA'], + 'Permissions' => [ + 'description' => '共享权限信息。', + 'type' => 'array', + 'items' => [ + 'description' => '共享权限信息。', + 'type' => 'object', + 'properties' => [ + 'PermissionName' => ['description' => '共享权限名称。', 'type' => 'string', 'example' => 'AliyunRSDefaultPermissionVSwitch'], + 'PermissionVersion' => ['description' => '共享权限版本。', 'type' => 'string', 'example' => 'v1'], + 'DefaultVersion' => ['description' => '共享权限是否为默认版本。取值:'."\n" + ."\n" + .'- false:不是默认版本。'."\n" + ."\n" + .'- true:是默认版本。', 'type' => 'boolean', 'example' => 'true'], + 'CreateTime' => ['description' => '创建时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:01.818Z'], + 'UpdateTime' => ['description' => '更新时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:01.818Z'], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'example' => 'VSwitch'], + 'DefaultPermission' => ['description' => '是否为默认权限。取值:'."\n" + ."\n" + .'- false:不是默认权限。'."\n" + ."\n" + .'- true:是默认权限。', 'type' => 'boolean', 'example' => 'true'], + ], + ], ], ], ], @@ -3301,313 +2087,113 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'NoPermission.ChangeResourceGroup', - 'errorMessage' => 'You are not authorized to change resourcegroup', - ], - [ - 'errorCode' => 'MissingParameter.ResourceRegionId', - 'errorMessage' => 'The ResourceRegionId parameters that are required for processing this request are missing', - ], - [ - 'errorCode' => 'MissingParameter.ResourceId', - 'errorMessage' => 'The ResourceId parameters that are required for processing this request are missing', - ], - [ - 'errorCode' => 'MissingParameter.ResourceGroupId', - 'errorMessage' => 'The ResourceGroupId parameters that are required for processing this request are missing', - ], - [ - 'errorCode' => 'InvalidResourceGroup', - 'errorMessage' => 'The specified ResourceGroupId is invalid', - ], - [ - 'errorCode' => 'SystemError', - 'errorMessage' => 'A system error occurred while processing your request', - ], - [ - 'errorCode' => 'ResourceNotFound', - 'errorMessage' => 'The specified resource is not found', - ], + ['errorCode' => 'MissingParameter.ResourceShareId', 'errorMessage' => 'You must specify ResourceShareId.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceShareId', 'errorMessage' => 'The ResourceShareId is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.MaxResults', 'errorMessage' => 'The MaxResults is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.NextToken', 'errorMessage' => 'The NextToken is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.NextToken.Length', 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceOwner', 'errorMessage' => 'The ResourceOwner is invalid.', 'description' => ''], + ['errorCode' => 'MissingParameter.ResourceOwner', 'errorMessage' => 'You must specify ResourceOwner.', 'description' => ''], + ], + 404 => [ + ['errorCode' => 'EntityNotExists.ResourceShare', 'errorMessage' => 'The resource share does not exist in the current account.', 'description' => ''], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"0A900114-22D3-5E9D-87A2-48E5EB5BF310\\"\\n}","type":"json"}]', - 'title' => '共享单元转组', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA\\",\\n \\"Permissions\\": [\\n {\\n \\"PermissionName\\": \\"AliyunRSDefaultPermissionVSwitch\\",\\n \\"PermissionVersion\\": \\"v1\\",\\n \\"DefaultVersion\\": true,\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"UpdateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"DefaultPermission\\": true\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListResourceSharePermissionsResponse>\\n <NextToken>TGlzdFJlc291cm****</NextToken>\\n <RequestId>2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA</RequestId>\\n <Permissions>\\n <PermissionName>AliyunRSDefaultPermissionVSwitch</PermissionName>\\n <PermissionVersion>v1</PermissionVersion>\\n <DefaultVersion>true</DefaultVersion>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:01.818Z</UpdateTime>\\n <ResourceType>VSwitch</ResourceType>\\n <DefaultPermission>true</DefaultPermission>\\n </Permissions>\\n</ListResourceSharePermissionsResponse>","errorExample":""}]', + 'title' => '查询共享单元中关联权限的记录', + 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询当前账号创建的共享单元中关联的共享权限记录。', + 'changeSet' => [], ], - 'TagResources' => [ - 'summary' => '为共享单元绑定标签。', - 'path' => '', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'ListResourceShares' => [ + 'summary' => '查询共享单元列表。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREentconsoleT3AKMG', - ], - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'ResourceType', + 'name' => 'ResourceOwner', 'in' => 'query', - 'schema' => [ - 'title' => '资源类型', - 'description' => '资源类型。'."\n" - ."\n" - .'取值为`ResourceShare`,表示共享单元。', - 'type' => 'string', - 'required' => true, - 'example' => 'ResourceShare', - ], + 'schema' => ['description' => '共享单元归属者。取值:'."\n" + ."\n" + .'- Self:查询当前账号的共享单元列表。'."\n" + .'- OtherAccounts:查询其他账号共享给当前账号的共享单元列表。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'Self'], ], [ - 'name' => 'ResourceId', + 'name' => 'ResourceShareName', 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '共享单元ID。', - 'type' => 'array', - 'items' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'rs-PqysnzIj****', - ], - 'required' => true, - 'maxItems' => 51, - ], + 'schema' => ['description' => '共享单元名称。', 'type' => 'string', 'required' => false, 'example' => 'test'], ], [ - 'name' => 'RegionId', + 'name' => 'ResourceShareStatus', 'in' => 'query', - 'schema' => [ - 'title' => '地域Id', - 'description' => '共享单元所属的地域ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'cn-hangzhou', - ], + 'schema' => ['description' => '共享单元状态。取值:'."\n" + ."\n" + .'- Active:已启用。'."\n" + .'- Pending:待确认。'."\n" + .'- Deleting:删除中。'."\n" + .'- Deleted:已删除。'."\n" + ."\n" + .'> Deleted状态的共享单元记录,会在48~96小时内被系统自动删除。', 'type' => 'string', 'required' => false, 'example' => 'Active'], ], [ - 'name' => 'Tag', + 'name' => 'MaxResults', 'in' => 'query', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '标签列表。'."\n" - ."\n" - .'最多可以绑定20个标签。', - 'type' => 'array', - 'items' => [ - 'description' => '标签列表。', - 'type' => 'object', - 'properties' => [ - 'Key' => [ - 'description' => '标签键。'."\n" - ."\n" - .'> 如需传入该值,则不能输入空字符串。最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', - 'type' => 'string', - 'required' => false, - 'example' => 'k1', - ], - 'Value' => [ - 'description' => '标签值。'."\n" - .'> 最多支持128个字符,不能以`acs:`开头,不能包含`http://`或者`https://`。', - 'type' => 'string', - 'required' => false, - 'example' => 'v1', - ], - ], - 'required' => false, - ], - 'required' => true, - 'maxItems' => 20, - ], - ], - ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '返回结果。', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C', - ], - ], - ], - ], - ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'InvalidParameter.ResourceId', - 'errorMessage' => 'The ResourceId is invalid.', - ], - [ - 'errorCode' => 'InvalidResourceId.NotFound', - 'errorMessage' => 'The specified ResourceIds are not found in our records.', - ], - [ - 'errorCode' => 'NumberExceed.ResourceIds', - 'errorMessage' => 'The maximum number of ResourceIds is exceeded.', - ], - [ - 'errorCode' => 'InvalidParameter.RegionId', - 'errorMessage' => 'The RegionId parameter is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceIds', - 'errorMessage' => 'You must specify ResourceIds.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceType', - 'errorMessage' => 'You must specify ResourceType.', - ], - [ - 'errorCode' => 'MissingParameter.Tags', - 'errorMessage' => 'You must specify Tags.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType parameter is invalid.', - ], + 'schema' => ['description' => '单次请求返回结果的最大条数。'."\n" + ."\n" + .'取值范围:1~100。默认值:20。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], ], - 403 => [ - [ - 'errorCode' => 'NoPermission', - 'errorMessage' => 'You are not authorized to perform this action.', - ], - ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'The request processing has failed due to some unknown error.', - ], - ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C\\"\\n}","type":"json"}]', - 'title' => '为共享单元绑定标签', - ], - 'ListTagResources' => [ - 'summary' => '查询共享单元绑定的标签。', - 'path' => '', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - ], - 'operationType' => 'list', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREentconsoleNPCJ32', - 'FEATUREentconsoleI2HU3Z', - ], - ], - 'parameters' => [ [ - 'name' => 'ResourceType', + 'name' => 'NextToken', 'in' => 'query', - 'schema' => [ - 'title' => '资源类型', - 'description' => '资源类型。'."\n" - ."\n" - .'取值为`ResourceShare`,表示共享单元。', - 'type' => 'string', - 'required' => true, - 'example' => 'ResourceShare', - ], + 'schema' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'required' => false, 'example' => 'TGlzdFJlc291cm****'], ], [ - 'name' => 'ResourceId', + 'name' => 'ResourceShareIds', 'in' => 'query', 'style' => 'repeatList', 'schema' => [ 'description' => '共享单元ID。'."\n" ."\n" - .'最多可以添加20个共享单元。', + .'N的取值范围:1~5,即每次最多指定5个共享单元。', 'type' => 'array', - 'items' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'rs-PqysnzIj****', - ], + 'items' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => false, 'example' => 'rs-PqysnzIj****'], 'required' => false, - 'maxItems' => 51, + 'example' => 'rs-PqysnzIj****', + 'maxItems' => 20, ], ], [ - 'name' => 'RegionId', + 'name' => 'PermissionName', 'in' => 'query', - 'schema' => [ - 'title' => '地域Id', - 'description' => '共享单元所属的地域ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'cn-hangzhou', - ], + 'schema' => ['description' => '共享权限名称。具体信息,请参见[权限库](~~465474~~)。', 'type' => 'string', 'required' => false, 'example' => 'AliyunRSDefaultPermissionVSwitch'], + ], + [ + 'name' => 'ResourceGroupId', + 'in' => 'query', + 'schema' => ['description' => '资源组ID。', 'type' => 'string', 'required' => false, 'example' => 'rg-aekz5nlvlak****'], ], [ 'name' => 'Tag', 'in' => 'query', 'style' => 'repeatList', 'schema' => [ - 'description' => '标签列表。'."\n" - ."\n" - .'查询的过滤条件。最多可以指定20个标签。', + 'description' => '标签列表。', 'type' => 'array', 'items' => [ 'description' => '标签列表。', 'type' => 'object', 'properties' => [ - 'Key' => [ - 'description' => '标签键。'."\n" - .'> 如需传入该值,则不能输入空字符串。一个标签键最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', - 'type' => 'string', - 'required' => false, - 'example' => 'k1', - ], - 'Value' => [ - 'description' => '标签值。'."\n" - .'> 最多支持128个字符,不能以`acs:`开头,不能包含`http://`或者`https://`。', - 'type' => 'string', - 'required' => false, - 'example' => 'v1', - ], + 'Key' => ['description' => '标签键。'."\n" + .'> 最多支持 128 个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'k1'], + 'Value' => ['description' => '标签值。'."\n" + .'> 最多支持 128 个字符,不能以`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'v1'], ], 'required' => false, ], @@ -3615,255 +2201,214 @@ 'maxItems' => 20, ], ], - [ - 'name' => 'NextToken', - 'in' => 'query', - 'schema' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'required' => false, - 'example' => 'caeba0bbb2be03f84eb48b699f0a****', - ], - ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '返回结果。', + 'description' => '返回参数。', 'type' => 'object', 'properties' => [ - 'NextToken' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'example' => 'caeba0bbb2be03f84eb48b699f0a****', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '8054B059-6B36-53BF-AA45-B8C9A0ED05AB', - ], - 'TagResources' => [ - 'type' => 'object', - 'itemNode' => true, - 'properties' => [ - 'TagResource' => [ - 'description' => '标签列表。', - 'type' => 'array', - 'items' => [ + 'NextToken' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'example' => 'TGlzdFJlc291cm****'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA'], + 'ResourceShares' => [ + 'description' => '共享单元信息。', + 'type' => 'array', + 'items' => [ + 'description' => '共享单元信息。', + 'type' => 'object', + 'properties' => [ + 'AllowExternalTargets' => ['description' => '是否允许共享给资源目录外的账号。取值:'."\n" + ."\n" + .'- false:仅允许资源目录内共享。'."\n" + .'- true:允许共享给任意账号。', 'type' => 'boolean', 'example' => 'false'], + 'CreateTime' => ['description' => '共享单元创建时间。', 'type' => 'string', 'example' => '2020-12-03T02:20:31.292Z'], + 'ResourceGroupId' => ['description' => '资源组ID。', 'type' => 'string', 'example' => 'rg-aekz5nlvlak****'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-PqysnzIj****'], + 'ResourceShareName' => ['description' => '共享单元名称。', 'type' => 'string', 'example' => 'test'], + 'ResourceShareOwner' => ['description' => '共享单元归属者。', 'type' => 'string', 'example' => '151266687691****'], + 'ResourceShareStatus' => ['description' => '共享单元状态。取值:'."\n" + ."\n" + .'- Active:已启用。'."\n" + .'- Pending:待确认。'."\n" + .'- Deleting:删除中。'."\n" + .'- Deleted:已删除。'."\n" + ."\n" + .'> Deleted状态的共享单元记录,会在48~96小时内被系统自动删除。', 'type' => 'string', 'example' => 'Active'], + 'Tags' => [ 'description' => '标签列表。', - 'type' => 'object', - 'properties' => [ - 'ResourceId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-PqysnzIj****', - ], - 'ResourceType' => [ - 'description' => '资源类型。'."\n" - ."\n" - .'取值为`ResourceShare`,表示共享单元。', - 'type' => 'string', - 'example' => 'ResourceShare', - ], - 'TagKey' => [ - 'description' => '标签键。', - 'type' => 'string', - 'example' => 'k1', - ], - 'TagValue' => [ - 'description' => '标签值。', - 'type' => 'string', - 'example' => 'v1', + 'type' => 'array', + 'items' => [ + 'description' => '标签列表。', + 'type' => 'object', + 'properties' => [ + 'Key' => ['description' => '标签键。', 'type' => 'string', 'example' => 'k1'], + 'Value' => ['description' => '标签值。', 'type' => 'string', 'example' => 'v1'], ], ], ], + 'UpdateTime' => ['description' => '共享单元更新时间。', 'type' => 'string', 'example' => '2020-12-03T08:01:43.638Z'], ], ], ], ], ], ], - [ - 'schema' => [ - 'type' => 'object', - 'properties' => [], - ], - ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InvalidParameter.NextToken', - 'errorMessage' => 'The NextToken is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceIdOrTag', - 'errorMessage' => 'You must specify ResourceId or Tag.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType parameter is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceType', - 'errorMessage' => 'You must specify ResourceType.', - ], - [ - 'errorCode' => 'MissingParameter.TagKey', - 'errorMessage' => 'You must specify TagKey.', - ], - [ - 'errorCode' => 'NumberExceed.ResourceIds', - 'errorMessage' => 'The maximum number of ResourceIds is exceeded.', - ], - [ - 'errorCode' => 'NumberExceed.Tags', - 'errorMessage' => 'The maximum number of Tags is exceeded.', - ], - [ - 'errorCode' => 'Duplicate.TagKey', - 'errorMessage' => 'The TagKey contains duplicate keys.', - ], - [ - 'errorCode' => 'InvalidResourceId.NotFound', - 'errorMessage' => 'The specified ResourceIds are not found in our records.', - ], + ['errorCode' => 'MissingParameter.ResourceOwner', 'errorMessage' => 'You must specify ResourceOwner.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceOwner', 'errorMessage' => 'The ResourceOwner is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceShareName', 'errorMessage' => 'The ResourceShareName is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceShareName.Length', 'errorMessage' => 'The maximum length of ResourceShareName exceeds 50 characters.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceShareStatus', 'errorMessage' => 'The ResourceShareStatus is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.MaxResults', 'errorMessage' => 'The MaxResults is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.NextToken', 'errorMessage' => 'The NextToken is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.NextToken.Length', 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceShareIds', 'errorMessage' => 'The ResourceShareIds is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', 'errorMessage' => 'The ResourceShareIds contains duplicate values.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Length', 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', 'description' => ''], + ['errorCode' => 'InvalidParameter', 'errorMessage' => 'The specified parameter is invalid.', 'description' => ''], + ['errorCode' => 'InvalidParameter.ResourceOwnerAndTag', 'errorMessage' => 'You cannot use ResourceOwner set to OtherAccounts and tags in one request.', 'description' => ''], ], - 403 => [ - [ - 'errorCode' => 'NoPermission', - 'errorMessage' => 'You are not authorized to perform this action.', - ], - ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'The request processing has failed due to some unknown error.', - ], - ], - ], - 'staticInfo' => [ - 'returnType' => 'synchronous', ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"NextToken\\": \\"caeba0bbb2be03f84eb48b699f0a****\\",\\n \\"RequestId\\": \\"8054B059-6B36-53BF-AA45-B8C9A0ED05AB\\",\\n \\"TagResources\\": {\\n \\"TagResource\\": [\\n {\\n \\"ResourceId\\": \\"rs-PqysnzIj****\\",\\n \\"ResourceType\\": \\"ResourceShare\\",\\n \\"TagKey\\": \\"k1\\",\\n \\"TagValue\\": \\"v1\\"\\n }\\n ]\\n }\\n}","type":"json"}]', - 'title' => '查询共享单元绑定的标签', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA\\",\\n \\"ResourceShares\\": [\\n {\\n \\"AllowExternalTargets\\": false,\\n \\"CreateTime\\": \\"2020-12-03T02:20:31.292Z\\",\\n \\"ResourceGroupId\\": \\"rg-aekz5nlvlak****\\",\\n \\"ResourceShareId\\": \\"rs-PqysnzIj****\\",\\n \\"ResourceShareName\\": \\"test\\",\\n \\"ResourceShareOwner\\": \\"151266687691****\\",\\n \\"ResourceShareStatus\\": \\"Active\\",\\n \\"Tags\\": [\\n {\\n \\"Key\\": \\"k1\\",\\n \\"Value\\": \\"v1\\"\\n }\\n ],\\n \\"UpdateTime\\": \\"2020-12-03T08:01:43.638Z\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListResourceSharesResponse>\\n <ResourceShares>\\n <ResourceShareId>rs-hX9wC5jO****</ResourceShareId>\\n <ResourceShareName>test1</ResourceShareName>\\n <ResourceShareStatus>Deleted</ResourceShareStatus>\\n <CreateTime>2020-12-03T02:47:14.651Z</CreateTime>\\n <UpdateTime>2020-12-03T08:01:56.696Z</UpdateTime>\\n <ResourceShareOwner>151266687691****</ResourceShareOwner>\\n <AllowExternalTargets>false</AllowExternalTargets>\\n </ResourceShares>\\n <ResourceShares>\\n <ResourceShareId>rs-PqysnzIj****</ResourceShareId>\\n <ResourceShareName>test</ResourceShareName>\\n <ResourceShareStatus>Active</ResourceShareStatus>\\n <CreateTime>2020-12-03T02:20:31.292Z</CreateTime>\\n <UpdateTime>2020-12-03T08:01:43.638Z</UpdateTime>\\n <ResourceShareOwner>151266687691****</ResourceShareOwner>\\n <AllowExternalTargets>true</AllowExternalTargets>\\n </ResourceShares>\\n <RequestId>2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA</RequestId>\\n</ListResourceSharesResponse>","errorExample":""}]', + 'title' => '查询共享单元列表', + 'description' => '本文将提供一个示例,查询当前账号在`cn-hangzhou`地域创建的共享单元列表。返回结果显示,当前账号`151266687691****`创建过以下2个共享单元:'."\n" + ."\n" + .'- 共享单元`rs-hX9wC5jO****`,处于已删除`Deleted`状态。'."\n" + .'- 共享单元`rs-PqysnzIj****`,处于已启用`Active`状态。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], ], - 'UntagResources' => [ - 'summary' => '为共享单元解绑标签。', - 'path' => '', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'ListSharedResources' => [ + 'summary' => '查询共享的资源列表或者其他账号共享的资源列表。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'update', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATUREentconsoleA4VJ8H', - ], - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ + 'name' => 'ResourceOwner', + 'in' => 'query', + 'schema' => ['description' => '共享单元归属者。取值:'."\n" + ."\n" + .'- Self:查询您创建的共享单元中,共享给其他账号的资源列表。'."\n" + .'- OtherAccounts:查询其他账号创建的共享单元中,共享给您的资源列表。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'Self'], + ], + [ 'name' => 'ResourceType', 'in' => 'query', - 'schema' => [ - 'title' => '资源类型', - 'description' => '资源类型。'."\n" - ."\n" - .'取值为`ResourceShare`,表示共享单元。', - 'type' => 'string', - 'required' => true, - 'example' => 'ResourceShare', - ], + 'schema' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'required' => false, 'example' => 'VSwitch'], ], [ - 'name' => 'ResourceId', + 'name' => 'Target', + 'in' => 'query', + 'schema' => ['description' => '资源使用者ID或资源所有者ID。取值:'."\n" + ."\n" + .'- 当`ResourceOwner`为`Self`时,该参数为资源使用者ID。'."\n" + .'- 当`ResourceOwner`是`OtherAccounts`时,该参数为资源所有者ID。', 'type' => 'string', 'required' => false, 'example' => '172050525300****'], + ], + [ + 'name' => 'MaxResults', + 'in' => 'query', + 'schema' => ['description' => '单次请求返回结果的最大条数。'."\n" + ."\n" + .'取值范围:1~100。默认值:20。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], + ], + [ + 'name' => 'NextToken', + 'in' => 'query', + 'schema' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'required' => false, 'example' => 'TGlzdFJlc291cm****'], + ], + [ + 'name' => 'ResourceShareIds', 'in' => 'query', 'style' => 'repeatList', 'schema' => [ 'description' => '共享单元ID。'."\n" ."\n" - .'最多可以添加20个共享单元。', + .'N的取值范围:1~5,即每次最多指定5个共享单元。', 'type' => 'array', - 'items' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'rs-PqysnzIj****', - ], + 'items' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => false, 'example' => 'rs-6GRmdD3X****'], 'required' => false, - 'maxItems' => 51, - ], - ], - [ - 'name' => 'RegionId', - 'in' => 'query', - 'schema' => [ - 'title' => '地域Id', - 'description' => '共享单元所属的地域ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'cn-hangzhou', + 'example' => 'rs-6GRmdD3X****', + 'maxItems' => 20, ], ], [ - 'name' => 'TagKey', + 'name' => 'ResourceIds', 'in' => 'query', 'style' => 'repeatList', 'schema' => [ - 'description' => '标签键。'."\n" + 'description' => '共享资源ID。'."\n" ."\n" - .'最多可以解绑20个标签键。'."\n" - .'> 当解绑全部标签的参数`All`取值为`true`时,不需要设置标签键。', + .'N的取值范围:1~5,即每次最多指定5个共享资源。', 'type' => 'array', - 'items' => [ - 'description' => '标签键。', - 'type' => 'string', - 'required' => false, - 'example' => 'k1', - ], + 'items' => ['description' => '共享资源ID。', 'type' => 'string', 'required' => false, 'example' => 'vsw-bp1upw03qyz8n7us9****'], 'required' => false, - 'maxItems' => 21, + 'example' => 'vsw-bp1upw03qyz8n7us9****', + 'maxItems' => 20, ], ], [ - 'name' => 'All', + 'name' => 'ResourceArns', 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '是否解绑指定资源的全部标签。取值:'."\n" - .'- false(默认值):否。'."\n" - .'- true:是。', - 'type' => 'boolean', + 'description' => '共享资源ARN列表。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多指定5个共享资源。', + 'type' => 'array', + 'items' => ['description' => '共享资源ARN。'."\n" + .'> 资源ARN格式请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'required' => false, 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], 'required' => false, - 'example' => 'false', + 'maxItems' => 20, ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '返回结果。', + 'description' => '返回参数。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C', + 'NextToken' => ['description' => '当请求的返回结果被截断时,您可以使用NextToken再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'example' => 'TGlzdFJlc291cm****'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '04677DCA-7C33-464B-8811-1B1DA3C3D197'], + 'SharedResources' => [ + 'description' => '共享资源信息。', + 'type' => 'array', + 'items' => [ + 'description' => '共享资源信息。', + 'type' => 'object', + 'properties' => [ + 'UpdateTime' => ['description' => '更新关联资源的时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:02.921Z'], + 'ResourceType' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'example' => 'VSwitch'], + 'CreateTime' => ['description' => '关联资源的时间。', 'type' => 'string', 'example' => '2020-12-07T07:39:02.921Z'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-6GRmdD3X****'], + 'ResourceArn' => ['description' => '共享资源ARN。', 'type' => 'string', 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + 'ResourceStatus' => ['description' => '共享资源状态。查询您共享的资源时不返回该参数,查询共享给您的资源时返回该参数。'."\n" + ."\n" + .'取值:'."\n" + ."\n" + .'- Available:资源可用。'."\n" + .'- ZonalResourceInaccessible:在当前可用区,资源不可用。'."\n" + .'- LimitExceeded:配额超限,资源不可用。'."\n" + .'- Unavailable:资源不可用。', 'type' => 'string', 'example' => 'Available'], + 'ResourceStatusMessage' => ['description' => '关联失败的原因。', 'type' => 'string', 'example' => 'The reason for the association failure. '], + 'ResourceId' => ['description' => '共享资源ID。', 'type' => 'string', 'example' => 'vsw-bp1upw03qyz8n7us9****'], + ], + ], ], ], ], @@ -3871,71 +2416,56 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType parameter is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceIds', - 'errorMessage' => 'You must specify ResourceIds.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceType', - 'errorMessage' => 'You must specify ResourceType.', - ], - [ - 'errorCode' => 'InvalidParameter.TagKey', - 'errorMessage' => 'The TagKey parameter is invalid.', - ], - [ - 'errorCode' => 'NumberExceed.ResourceIds', - 'errorMessage' => 'The maximum number of ResourceIds is exceeded.', - ], - [ - 'errorCode' => 'NumberExceed.TagKeys', - 'errorMessage' => 'The maximum number of TagKeys is exceeded.', - ], - [ - 'errorCode' => 'Duplicate.TagKey', - 'errorMessage' => 'The TagKey contains duplicate keys.', - ], - [ - 'errorCode' => 'InvalidResourceId.NotFound', - 'errorMessage' => 'The specified ResourceIds are not found in our records.', - ], - [ - 'errorCode' => 'MissingParameter.TagKeysOrDeleteAll', - 'errorMessage' => 'You must specify TagKeys or DeleteAll.', - ], + ['errorCode' => 'MissingParameter.ResourceOwner', 'errorMessage' => 'You must specify ResourceOwner.', 'description' => 'ResourceOwner参数缺失。'], + ['errorCode' => 'InvalidParameter.ResourceOwner', 'errorMessage' => 'The ResourceOwner is invalid.', 'description' => 'ResourceOwner参数错误。'], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType is invalid.', 'description' => '传入的资源类型错误。'], + ['errorCode' => 'InvalidParameter.MaxResults', 'errorMessage' => 'The MaxResults is invalid.', 'description' => 'MaxResults参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken', 'errorMessage' => 'The NextToken is invalid.', 'description' => 'NextToken参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken.Length', 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', 'description' => 'NextToken长度超限(最大256个字符)。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds', 'errorMessage' => 'The ResourceShareIds is invalid.', 'description' => 'ResourceShareIds参数错误。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', 'errorMessage' => 'The ResourceShareIds contains duplicate values.', 'description' => 'ResourceShareIds有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Length', 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', 'description' => 'ResourceShareIds长度超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.ResourceIds', 'errorMessage' => 'The ResourceIds is invalid.', 'description' => '传入的资源ID错误。'], + ['errorCode' => 'InvalidParameter.ResourceIds.Duplicate', 'errorMessage' => 'The specified ResourceId contains duplicate values.', 'description' => '传入的资源ID有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceIds.Length', 'errorMessage' => 'The maximum number of ResourceIds (5) is exceeded.', 'description' => '传入的资源ID数量超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.Target', 'errorMessage' => 'The Target is invalid.', 'description' => '资源所有者传参错误。'], + ['errorCode' => 'InvalidParameter', 'errorMessage' => 'The specified parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceArns', 'errorMessage' => 'The ResourceArns is invalid.', 'description' => 'ResourceArns参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceArns.Duplicate', 'errorMessage' => 'The ResourceArns contains duplicate values.', 'description' => '资源ARN参数有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceArns.Length', 'errorMessage' => 'The ResourceArns beyond the length limit.', 'description' => '资源ARN数量超限(最大5个)。'], + ['errorCode' => 'NotSupport.ResourceType.ResourcesParameter', 'errorMessage' => 'The Resources parameter does not support this resource type. Please use ResourceArns instead.', 'description' => '当前资源类型不支持Resources参数,请使用ResourceArns参数。'], + ['errorCode' => 'InvalidParameter.ResourceConflict', 'errorMessage' => 'Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters.', 'description' => 'ResourceId 和 ResourceArn 不能同时指定。请仅提供其中一个参数。'], ], - 403 => [ - [ - 'errorCode' => 'NoPermission', - 'errorMessage' => 'You are not authorized to perform this action.', - ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"04677DCA-7C33-464B-8811-1B1DA3C3D197\\",\\n \\"SharedResources\\": [\\n {\\n \\"UpdateTime\\": \\"2020-12-07T07:39:02.921Z\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"CreateTime\\": \\"2020-12-07T07:39:02.921Z\\",\\n \\"ResourceShareId\\": \\"rs-6GRmdD3X****\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceStatus\\": \\"Available\\",\\n \\"ResourceStatusMessage\\": \\"The reason for the association failure. \\",\\n \\"ResourceId\\": \\"vsw-bp1upw03qyz8n7us9****\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<?xml version=\\"1.0\\" encoding=\\"UTF-8\\" ?>\\r\\n<ListSharedResourcesResponse>\\r\\n\\t<RequestId>04677DCA-7C33-464B-8811-1B1DA3C3D197</RequestId>\\r\\n\\t<SharedResources>\\r\\n\\t\\t<ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\r\\n\\t\\t<ResourceId>vsw-bp1upw03qyz8n7us9****</ResourceId>\\r\\n\\t\\t<CreateTime>2020-12-07T07:39:02.921Z</CreateTime>\\r\\n\\t\\t<UpdateTime>2020-12-07T07:39:02.921Z</UpdateTime>\\r\\n\\t\\t<ResourceType>VSwitch</ResourceType>\\r\\n\\t</SharedResources>\\r\\n</ListSharedResourcesResponse>\\t\\r\\n","errorExample":""}]', + 'title' => '查询共享或其他账号共享的资源列表', + 'description' => '本文将提供一个示例,查询您在`cn-hangzhou`地域共享的资源列表。返回结果显示,您只共享过1个资源,即在共享单元`rs-6GRmdD3X****`内共享过`VSwitch`类型的资源`vsw-bp1upw03qyz8n7us9****`。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListSharedResources'], ], - 500 => [ - [ - 'errorCode' => 'InternalError', - 'errorMessage' => 'The request processing has failed due to some unknown error.', + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListSharedResources', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C\\"\\n}","type":"json"}]', - 'title' => '为共享单元解绑标签', ], - 'ListResourceShareInvitations' => [ - 'summary' => '资源使用者调用ListResourceShareInvitations查询自己收到的资源共享邀请信息。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'ListSharedTargets' => [ + 'summary' => '查询资源使用者列表。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -3943,66 +2473,79 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ + 'name' => 'ResourceOwner', + 'in' => 'query', + 'schema' => ['description' => '共享单元归属者。'."\n" + ."\n" + .'- Self:查询您创建的共享单元中,关联的资源使用者列表。'."\n" + .'- OtherAccounts:查询其他账号创建的共享单元中,您作为资源使用者的共享单元及共享单元拥有者列表。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'Self'], + ], + [ + 'name' => 'ResourceType', + 'in' => 'query', + 'schema' => ['description' => '共享资源类型。'."\n" + ."\n" + .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', 'type' => 'string', 'required' => false, 'example' => 'VSwitch'], + ], + [ + 'name' => 'ResourceId', + 'in' => 'query', + 'schema' => ['description' => '共享资源ID。', 'type' => 'string', 'required' => false, 'example' => 'vsw-bp1upw03qyz8n7us9****'], + ], + [ + 'name' => 'ResourceArn', + 'in' => 'query', + 'schema' => ['description' => '共享资源ARN。', 'type' => 'string', 'required' => false, 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****'], + ], + [ 'name' => 'MaxResults', 'in' => 'query', - 'schema' => [ - 'description' => '单次请求返回结果的最大条数。'."\n" - ."\n" - .'取值范围:1~100。默认值:20。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '20', - ], + 'schema' => ['description' => '单次请求返回结果的最大条数。'."\n" + ."\n" + .'取值范围:1~100。默认值:20。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], ], [ 'name' => 'NextToken', 'in' => 'query', - 'schema' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'required' => false, - 'example' => 'TGlzdFJlc291cm****', - ], + 'schema' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'required' => false, 'example' => 'TGlzdFJlc291cm****'], ], [ 'name' => 'ResourceShareIds', 'in' => 'query', 'style' => 'repeatList', 'schema' => [ - 'description' => '共享单元ID。', + 'description' => '共享单元ID。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多指定5个共享单元。', 'type' => 'array', - 'items' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'rs-ysGRci9z****', - ], + 'items' => ['description' => '共享单元ID。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多指定5个共享单元。', 'type' => 'string', 'required' => false, 'example' => 'rs-6GRmdD3X****'], 'required' => false, + 'example' => 'rs-6GRmdD3X****', 'maxItems' => 20, ], ], [ - 'name' => 'ResourceShareInvitationIds', + 'name' => 'Targets', 'in' => 'query', 'style' => 'repeatList', 'schema' => [ - 'description' => '资源共享邀请ID。', + 'description' => '资源使用者。', 'type' => 'array', - 'items' => [ - 'description' => '资源共享邀请ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'i-p6eRytrkjVvM****', - ], + 'items' => ['description' => '资源使用者。取值:'."\n" + ."\n" + .'- 当`AllowExternalTargets`为`false`时,资源使用者可以为资源目录ID、资源夹ID或成员ID。'."\n" + .'- 当`AllowExternalTargets`为`true`时,资源使用者可以为阿里云账号ID、资源目录ID、资源夹ID、成员ID或阿里云服务。'."\n" + ."\n" + .'更多信息,请参见[资源共享方式](~~160622~~)、[查看资源目录ID](~~111217~~)、[查看资源夹ID](~~111223~~)或[查看成员ID](~~111624~~)。'."\n" + ."\n" + .'N的取值范围:1~5,即每次最多添加5个资源使用者。', 'type' => 'string', 'required' => false, 'example' => '114240524784****'], 'required' => false, + 'example' => '114240524784****', 'maxItems' => 20, ], ], @@ -4010,133 +2553,38 @@ 'responses' => [ 200 => [ 'schema' => [ - 'description' => '返回结果。', + 'description' => '返回参数。', 'type' => 'object', 'properties' => [ - 'NextToken' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'example' => 'TGlzdFJlc291cm****', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '30EC8328-1BDE-51D5-BFAB-039508BD91A1', - ], - 'ResourceShareInvitations' => [ - 'description' => '资源共享邀请信息。', + 'NextToken' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'example' => 'TGlzdFJlc291cm****'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '04677DCA-7C33-464B-8811-1B1DA3C3D197'], + 'SharedTargets' => [ + 'description' => '资源使用者信息。'."\n", 'type' => 'array', 'items' => [ - 'description' => '资源共享邀请信息。', + 'description' => '资源使用者信息。', 'type' => 'object', 'properties' => [ - 'Status' => [ - 'description' => '邀请状态。取值:'."\n" - ."\n" - .'- Pending:等待确认。'."\n" - .'- Accepted:接受邀请成功。'."\n" - .'- Cancelled:已取消。'."\n" - .'- Rejected:已拒绝。'."\n" - .'- Expired:已过期。'."\n" - .'- AcceptFailed:接受邀请失败。', - 'type' => 'string', - 'example' => 'Pending', - ], - 'CreateTime' => [ - 'description' => '邀请创建时间(UTC时间)。', - 'type' => 'string', - 'example' => '2022-08-18T05:36:45.024Z', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'example' => 'rs-ysGRci9z****', - ], - 'ResourceShareName' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'example' => 'example', - ], - 'SenderAccountId' => [ - 'description' => '邀请者的阿里云账号ID。', - 'type' => 'string', - 'example' => '151266687691****', - ], - 'ReceiverAccountId' => [ - 'description' => '被邀请者的阿里云账号ID。', - 'type' => 'string', - 'example' => '134254031178****', - ], - 'ResourceShareInvitationId' => [ - 'description' => '资源共享邀请ID。', - 'type' => 'string', - 'example' => 'i-p6eRytrkjVvM****', - ], - 'InvitationFailedDetails' => [ - 'description' => '接受共享单元邀请或退出共享单元检查失败详细原因。', - 'type' => 'array', - 'items' => [ - 'description' => '接受共享单元邀请或退出共享单元检查失败详细原因。', - 'type' => 'object', - 'properties' => [ - 'Status' => [ - 'description' => '已弃用。请使用FailureReason。', - 'type' => 'string', - 'example' => 'None', - ], - 'StatusMessage' => [ - 'description' => '已弃用。请使用FailureDescription。', - 'type' => 'string', - 'example' => 'None', - ], - 'AssociateType' => [ - 'description' => '已弃用。请使用OperationType。', - 'type' => 'string', - 'example' => 'None', - ], - 'ResourceArn' => [ - 'description' => '共享资源ARN。', - 'type' => 'string', - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'example' => 'Snapshot', - ], - 'FailureReason' => [ - 'description' => '接受或退出共享单元检查失败时的原因。取值:'."\n" - ."\n" - .'- Unavailable:资源不可以共享。'."\n" - .'- LimitExceeded:资源可共享账号配额超限。'."\n" - .'- ZonalResourceInaccessible: 资源在此地域不可用。'."\n" - .'- InternalError:检查过程服务器内部出现错误。'."\n" - .'- UnsupportedOperation:不支持执行操作。', - 'type' => 'string', - 'example' => 'Unavailable', - ], - 'FailureDescription' => [ - 'description' => '接受或退出共享单元检查失败时的详细原因描述。', - 'type' => 'string', - 'example' => 'You cannot access the specified resource at this time.', - ], - 'OperationType' => [ - 'description' => '操作类型。取值:'."\n" - .'- Associate:关联。'."\n" - .'- Disassociate:解除关联。', - 'type' => 'string', - 'example' => 'Associate', - ], - 'ResourceId' => [ - 'description' => '共享资源ID。', - 'type' => 'string', - 'example' => 's-7xvh46nx5oqlre0wv***', - ], - ], - ], - ], + 'TargetId' => ['description' => '资源使用者ID或资源所有者ID。取值:'."\n" + ."\n" + .'- 当`ResourceOwner`为`Self`时,该参数为资源使用者ID。'."\n" + .'- 当`ResourceOwner`为`OtherAccounts`时,该参数为资源所有者ID。', 'type' => 'string', 'example' => '114240524784****'], + 'UpdateTime' => ['description' => '更新关联资源使用者的时间。', 'type' => 'string', 'example' => '2020-12-07T09:16:59.905Z'], + 'CreateTime' => ['description' => '关联资源使用者的时间。', 'type' => 'string', 'example' => '2020-12-07T09:16:59.905Z'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-6GRmdD3X****'], + 'External' => ['description' => '资源使用者是否为资源目录外账号。取值:'."\n" + ."\n" + .'- true:资源目录外账号。'."\n" + .'- false:资源目录内账号。', 'type' => 'boolean', 'example' => 'false'], + 'TargetProperty' => ['description' => '资源使用者属性。例如:资源共享的时间段。'."\n" + .'> 仅当资源使用者为阿里云服务时返回该参数。', 'type' => 'string', 'example' => '{'."\n" + .' "timeRange":{'."\n" + .' "timeRangeType":"timeRange",'."\n" + .' "beginAtTime":"00:00",'."\n" + .' "timezone":"UTC+8",'."\n" + .' "endAtTime":"19:59"'."\n" + .' }'."\n" + .'}'], ], ], ], @@ -4146,268 +2594,216 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InvalidParameter.MaxResults', - 'errorMessage' => 'The MaxResults is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken', - 'errorMessage' => 'The NextToken is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken.Length', - 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds', - 'errorMessage' => 'The ResourceShareIds is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', - 'errorMessage' => 'The ResourceShareIds contains duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareIds.Length', - 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareInvitationIds', - 'errorMessage' => 'The ResourceShareInvitationIds is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareInvitationIds.Duplicate', - 'errorMessage' => 'The ResourceShareInvitationIds duplicate values.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareInvitationIds.Length', - 'errorMessage' => 'The maximum length of ResourceShareInvitationIds exceeds quota limit.', - ], + ['errorCode' => 'MissingParameter.ResourceOwner', 'errorMessage' => 'You must specify ResourceOwner.', 'description' => 'ResourceOwner参数缺失。'], + ['errorCode' => 'InvalidParameter.ResourceOwner', 'errorMessage' => 'The ResourceOwner is invalid.', 'description' => 'ResourceOwner参数错误。'], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType is invalid.', 'description' => '传入的资源类型错误。'], + ['errorCode' => 'InvalidParameter.MaxResults', 'errorMessage' => 'The MaxResults is invalid.', 'description' => 'MaxResults参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken', 'errorMessage' => 'The NextToken is invalid.', 'description' => 'NextToken参数错误。'], + ['errorCode' => 'InvalidParameter.NextToken.Length', 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', 'description' => 'NextToken长度超限(最大256个字符)。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds', 'errorMessage' => 'The ResourceShareIds is invalid.', 'description' => 'ResourceShareIds参数错误。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Duplicate', 'errorMessage' => 'The ResourceShareIds contains duplicate values.', 'description' => 'ResourceShareIds有重复项。'], + ['errorCode' => 'InvalidParameter.ResourceShareIds.Length', 'errorMessage' => 'The maximum length of ResourceShareIds exceeds 5 characters.', 'description' => 'ResourceShareIds长度超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.Targets', 'errorMessage' => 'The Targets is invalid.', 'description' => '资源使用者的参数不符合规则。'], + ['errorCode' => 'InvalidParameter.Targets.Duplicate', 'errorMessage' => 'The Targets contains duplicate values.', 'description' => '资源使用者有重复项。'], + ['errorCode' => 'InvalidParameter.Targets.Length', 'errorMessage' => 'The maximum number of Targets exceeds 5.', 'description' => '资源使用者数量超限(最大5个)。'], + ['errorCode' => 'InvalidParameter.ResourceId', 'errorMessage' => 'The ResourceId is invalid.', 'description' => 'ResourceId参数错误。'], + ['errorCode' => 'InvalidParameter', 'errorMessage' => 'The specified parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceArn', 'errorMessage' => 'The ResourceArn is invalid.', 'description' => '资源ARN参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceConflict', 'errorMessage' => 'Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters.', 'description' => 'ResourceId 和 ResourceArn 不能同时指定。请仅提供其中一个参数。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"30EC8328-1BDE-51D5-BFAB-039508BD91A1\\",\\n \\"ResourceShareInvitations\\": [\\n {\\n \\"Status\\": \\"Pending\\",\\n \\"CreateTime\\": \\"2022-08-18T05:36:45.024Z\\",\\n \\"ResourceShareId\\": \\"rs-ysGRci9z****\\",\\n \\"ResourceShareName\\": \\"example\\",\\n \\"SenderAccountId\\": \\"151266687691****\\",\\n \\"ReceiverAccountId\\": \\"134254031178****\\",\\n \\"ResourceShareInvitationId\\": \\"i-p6eRytrkjVvM****\\",\\n \\"InvitationFailedDetails\\": [\\n {\\n \\"Status\\": \\"None\\",\\n \\"StatusMessage\\": \\"None\\",\\n \\"AssociateType\\": \\"None\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceType\\": \\"Snapshot\\",\\n \\"FailureReason\\": \\"Unavailable\\",\\n \\"FailureDescription\\": \\"You cannot access the specified resource at this time.\\",\\n \\"OperationType\\": \\"Associate\\",\\n \\"ResourceId\\": \\"s-7xvh46nx5oqlre0wv***\\"\\n }\\n ]\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListResourceShareInvitationsResponse>\\n <ResourceShareInvitations>\\n <Status>Pending</Status>\\n <ResourceShareId>rs-ysGRci9z****</ResourceShareId>\\n <ResourceShareName>example</ResourceShareName>\\n <SenderAccountId>151266687691****</SenderAccountId>\\n <ReceiverAccountId>134254031178****</ReceiverAccountId>\\n <CreateTime>2022-08-18T05:36:45.024Z</CreateTime>\\n <ResourceShareInvitationId>i-p6eRytrkjVvM****</ResourceShareInvitationId>\\n </ResourceShareInvitations>\\n <RequestId>30EC8328-1BDE-51D5-BFAB-039508BD91A1</RequestId>\\n</ListResourceShareInvitationsResponse>","errorExample":""}]', - 'title' => '查询收到的资源共享邀请信息', - 'description' => '### 使用说明'."\n" - .'本文将提供一个示例,查询当前账号在`cn-hangzhou`地域收到的资源共享邀请。返回结果显示,共收到1个邀请,且处于等待确认状态。', - 'requestParamsDescription' => '关于公共请求参数的详情,请参见[公共参数](~~159973~~)。', - ], - 'AcceptResourceShareInvitation' => [ - 'summary' => '资源使用者调用AcceptResourceShareInvitation接受资源共享邀请。', - 'methods' => [ - 'post', - 'get', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"04677DCA-7C33-464B-8811-1B1DA3C3D197\\",\\n \\"SharedTargets\\": [\\n {\\n \\"TargetId\\": \\"114240524784****\\",\\n \\"UpdateTime\\": \\"2020-12-07T09:16:59.905Z\\",\\n \\"CreateTime\\": \\"2020-12-07T09:16:59.905Z\\",\\n \\"ResourceShareId\\": \\"rs-6GRmdD3X****\\",\\n \\"External\\": false,\\n \\"TargetProperty\\": \\"{\\\\n \\\\\\"timeRange\\\\\\":{\\\\n \\\\\\"timeRangeType\\\\\\":\\\\\\"timeRange\\\\\\",\\\\n \\\\\\"beginAtTime\\\\\\":\\\\\\"00:00\\\\\\",\\\\n \\\\\\"timezone\\\\\\":\\\\\\"UTC+8\\\\\\",\\\\n \\\\\\"endAtTime\\\\\\":\\\\\\"19:59\\\\\\"\\\\n }\\\\n}\\"\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListSharedTargetsResponse>\\n <RequestId>445ECACB-1082-4008-ABD4-8B259EFF4855</RequestId>\\n <SharedTargets>\\n <ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\n <CreateTime>2020-12-07T09:16:59.905Z</CreateTime>\\n <UpdateTime>2020-12-07T09:16:59.905Z</UpdateTime>\\n <External>false</External>\\n <TargetId>114240524784****</TargetId>\\n </SharedTargets>\\n <SharedTargets>\\n <ResourceShareId>rs-6GRmdD3X****</ResourceShareId>\\n <CreateTime>2020-12-07T09:15:26.879Z</CreateTime>\\n <UpdateTime>2020-12-07T09:15:26.879Z</UpdateTime>\\n <External>false</External>\\n <TargetId>172050525300****</TargetId>\\n </SharedTargets>\\n</ListSharedTargetsResponse>","errorExample":""}]', + 'title' => '查询资源使用者列表', + 'description' => '如果您是资源所有者,您可以查询您把资源共享给了哪些资源使用者。'."\n" + .'如果您是资源使用者,您可以查询您参与了哪些资源共享。'."\n" + ."\n" + .'本文将提供一个示例,在`cn-hangzhou`地域,查询您发起的资源共享的资源使用者列表。返回结果显示,您将资源共享给了资源使用者`114240524784****`和`172050525300****`。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListSharedTargets'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListSharedTargets', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'ListTagResources' => [ + 'path' => '', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'list', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'update', + 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREentconsoleNPCJ32', 'FEATUREentconsoleI2HU3Z'], ], 'parameters' => [ [ - 'name' => 'ResourceShareInvitationId', + 'name' => 'ResourceType', + 'in' => 'query', + 'schema' => ['title' => '资源类型', 'description' => '资源类型。'."\n" + ."\n" + .'取值为`ResourceShare`,表示共享单元。', 'type' => 'string', 'required' => true, 'example' => 'ResourceShare'], + ], + [ + 'name' => 'ResourceId', 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '资源共享邀请ID。'."\n" + 'description' => '共享单元ID。'."\n" ."\n" - .'您可以调用[ListResourceShareInvitations](~~450564~~)获取资源共享邀请ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'i-pMnItMX19fBJ****', + .'最多可以添加20个共享单元。', + 'type' => 'array', + 'items' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => false, 'example' => 'rs-PqysnzIj****'], + 'required' => false, + 'maxItems' => 51, + ], + ], + [ + 'name' => 'RegionId', + 'in' => 'query', + 'schema' => ['title' => '地域Id', 'description' => '共享单元所属的地域ID。', 'type' => 'string', 'required' => true, 'example' => 'cn-hangzhou'], + ], + [ + 'name' => 'Tag', + 'in' => 'query', + 'style' => 'repeatList', + 'schema' => [ + 'description' => '标签列表。'."\n" + ."\n" + .'查询的过滤条件。最多可以指定20个标签。', + 'type' => 'array', + 'items' => [ + 'description' => '标签列表。', + 'type' => 'object', + 'properties' => [ + 'Key' => ['description' => '标签键。'."\n" + .'> 如需传入该值,则不能输入空字符串。一个标签键最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'k1'], + 'Value' => ['description' => '标签值。'."\n" + .'> 最多支持128个字符,不能以`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'v1'], + ], + 'required' => false, + ], + 'required' => false, + 'maxItems' => 20, ], ], + [ + 'name' => 'NextToken', + 'in' => 'query', + 'schema' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'required' => false, 'example' => 'caeba0bbb2be03f84eb48b699f0a****'], + ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '08F18B04-47CB-5C0E-A6D2-37DEF5C2A961', - ], - 'ResourceShareInvitation' => [ - 'description' => '资源共享邀请信息。', + 'NextToken' => ['description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', 'type' => 'string', 'example' => 'caeba0bbb2be03f84eb48b699f0a****'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => '8054B059-6B36-53BF-AA45-B8C9A0ED05AB'], + 'TagResources' => [ 'type' => 'object', + 'itemNode' => true, 'properties' => [ - 'ResourceShareInvitationId' => [ - 'description' => '资源共享邀请ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'i-pMnItMX19fBJ****', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'rs-ysGRci9z****', - ], - 'ResourceShareName' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'required' => true, - 'example' => 'example', - ], - 'SenderAccountId' => [ - 'description' => '邀请者的阿里云账号ID。', - 'type' => 'string', - 'required' => true, - 'example' => '151266687691****', - ], - 'ReceiverAccountId' => [ - 'description' => '被邀请者的阿里云账号ID。', - 'type' => 'string', - 'required' => true, - 'example' => '134254031178****', - ], - 'CreateTime' => [ - 'description' => '邀请创建时间(UTC时间)。', - 'type' => 'string', - 'required' => true, - 'example' => '2022-09-02T06:43:12.353Z', - ], - 'Status' => [ - 'description' => '邀请状态。取值:'."\n" - ."\n" - .'- Pending:等待确认。'."\n" - .'- Accepted:接受邀请成功。'."\n" - .'- Cancelled:已取消。'."\n" - .'- Rejected:已拒绝。'."\n" - .'- Expired:已过期。'."\n" - .'- AcceptFailed:接受邀请失败。', - 'type' => 'string', - 'required' => true, - 'example' => 'AcceptFailed', - ], - 'AcceptInvitationFailedDetails' => [ - 'description' => '接受共享单元邀请检查失败详细原因。', + 'TagResource' => [ + 'description' => '标签列表。', 'type' => 'array', 'items' => [ - 'description' => '接受共享单元邀请检查失败详细原因。', + 'description' => '标签列表。', 'type' => 'object', 'properties' => [ - 'Status' => [ - 'description' => '已弃用。请使用FailureReason。', - 'type' => 'string', - 'example' => 'None', - ], - 'StatusMessage' => [ - 'description' => '已弃用。请使用FailureDescription。', - 'type' => 'string', - 'example' => 'None', - ], - 'AssociateType' => [ - 'description' => '已弃用。请使用OperationType。', - 'type' => 'string', - 'example' => 'None', - ], - 'ResourceArn' => [ - 'description' => '共享资源ARN。', - 'type' => 'string', - 'example' => 'acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****', - ], - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'example' => 'Snapshot', - ], - 'FailureReason' => [ - 'description' => '接受共享单元邀请检查失败时的原因。取值:'."\n" - ."\n" - .'- Unavailable:资源不可以共享。'."\n" - .'- LimitExceeded:资源可共享账号配额超限。'."\n" - .'- ZonalResourceInaccessible: 资源在此地域不可用。'."\n" - .'- InternalError:检查过程服务器内部出现错误。', - 'type' => 'string', - 'example' => 'Unavailable', - ], - 'FailureDescription' => [ - 'description' => '接受共享单元邀请检查失败时的详细原因描述。', - 'type' => 'string', - 'example' => 'You cannot access the specified resource at this time.', - ], - 'OperationType' => [ - 'description' => '操作类型。取值:'."\n" - .'- Associate:关联。', - 'type' => 'string', - 'example' => 'Associate', - ], - 'ResourceId' => [ - 'description' => '共享资源ID。', - 'type' => 'string', - 'example' => 's-7xvh46nx5oqlre0wv***', - ], + 'ResourceId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-PqysnzIj****'], + 'ResourceType' => ['description' => '资源类型。'."\n" + ."\n" + .'取值为`ResourceShare`,表示共享单元。', 'type' => 'string', 'example' => 'ResourceShare'], + 'TagKey' => ['description' => '标签键。', 'type' => 'string', 'example' => 'k1'], + 'TagValue' => ['description' => '标签值。', 'type' => 'string', 'example' => 'v1'], ], ], ], ], + 'description' => '', ], ], ], ], + [ + 'schema' => [ + 'type' => 'object', + 'properties' => [], + 'description' => '', + ], + ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InvalidParameter.ResourceShareInvitationId', - 'errorMessage' => 'The ResourceShareInvitationId is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceShareInvitationId', - 'errorMessage' => 'You must specify ResourceShareInvitationId.', - ], + ['errorCode' => 'InvalidParameter.NextToken', 'errorMessage' => 'The NextToken is invalid.', 'description' => 'NextToken参数错误。'], + ['errorCode' => 'MissingParameter.ResourceIdOrTag', 'errorMessage' => 'You must specify ResourceId or Tag.', 'description' => '资源ID或标签参数无效。'], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType parameter is invalid.', 'description' => '资源类型参数无效。'], + ['errorCode' => 'MissingParameter.ResourceType', 'errorMessage' => 'You must specify ResourceType.', 'description' => '资源类型参数不能为空。'], + ['errorCode' => 'MissingParameter.TagKey', 'errorMessage' => 'You must specify TagKey.', 'description' => '标签键参数不能为空。'], + ['errorCode' => 'NumberExceed.ResourceIds', 'errorMessage' => 'The maximum number of ResourceIds is exceeded.', 'description' => '资源ID数量超出限制。'], + ['errorCode' => 'NumberExceed.Tags', 'errorMessage' => 'The maximum number of Tags is exceeded.', 'description' => '标签参数数量超出限制。'], + ['errorCode' => 'Duplicate.TagKey', 'errorMessage' => 'The TagKey contains duplicate keys.', 'description' => 'TagKey参数重复。'], + ['errorCode' => 'InvalidResourceId.NotFound', 'errorMessage' => 'The specified ResourceIds are not found in our records.', 'description' => '资源ID不存在。'], ], - 409 => [ - [ - 'errorCode' => 'InvitationStatus.Expired', - 'errorMessage' => 'The resource share invitation status is expired.', - ], - [ - 'errorCode' => 'EntityNotExists.ResourceShareInvitation', - 'errorMessage' => 'The resource share invitation does not exist in the current account.', - ], - [ - 'errorCode' => 'InvitationStatus.AlreadyRejected', - 'errorMessage' => 'The resource share invitation status is rejected.', - ], - [ - 'errorCode' => 'InvitationStatus.AlreadyAccepted', - 'errorMessage' => 'The resource share invitation status is alredy accepted.', + 403 => [ + ['errorCode' => 'NoPermission', 'errorMessage' => 'You are not authorized to perform this action.', 'description' => '当前操作未被授权,请联系管理员授权。'], + ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'The request processing has failed due to some unknown error.', 'description' => '由于某些未知错误,请求处理失败。'], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询共享单元绑定的标签', + 'summary' => '查询共享单元绑定的标签。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListTagResources'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListTagResources', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"08F18B04-47CB-5C0E-A6D2-37DEF5C2A961\\",\\n \\"ResourceShareInvitation\\": {\\n \\"ResourceShareInvitationId\\": \\"i-pMnItMX19fBJ****\\",\\n \\"ResourceShareId\\": \\"rs-ysGRci9z****\\",\\n \\"ResourceShareName\\": \\"example\\",\\n \\"SenderAccountId\\": \\"151266687691****\\",\\n \\"ReceiverAccountId\\": \\"134254031178****\\",\\n \\"CreateTime\\": \\"2022-09-02T06:43:12.353Z\\",\\n \\"Status\\": \\"AcceptFailed\\",\\n \\"AcceptInvitationFailedDetails\\": [\\n {\\n \\"Status\\": \\"None\\",\\n \\"StatusMessage\\": \\"None\\",\\n \\"AssociateType\\": \\"None\\",\\n \\"ResourceArn\\": \\"acs:vpc:cn-shanghai:103755469187****:vswitch/vsw-uf62b11ue4m8oz2di****\\",\\n \\"ResourceType\\": \\"Snapshot\\",\\n \\"FailureReason\\": \\"Unavailable\\",\\n \\"FailureDescription\\": \\"You cannot access the specified resource at this time.\\",\\n \\"OperationType\\": \\"Associate\\",\\n \\"ResourceId\\": \\"s-7xvh46nx5oqlre0wv***\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<AcceptResourceShareInvitationResponse>\\n <RequestId>08F18B04-47CB-5C0E-A6D2-37DEF5C2A961</RequestId>\\n <ResourceShareInvitation>\\n <ResourceShareId>rs-ysGRci9z****</ResourceShareId>\\n <ResourceShareName>example</ResourceShareName>\\n <Status>Accepted</Status>\\n <SenderAccountId>151266687691****</SenderAccountId>\\n <ReceiverAccountId>134254031178****</ReceiverAccountId>\\n <CreateTime>2022-09-02T06:43:12.353Z</CreateTime>\\n <ResourceShareInvitationId>i-pMnItMX19fBJ****</ResourceShareInvitationId>\\n </ResourceShareInvitation>\\n</AcceptResourceShareInvitationResponse>","errorExample":""}]', - 'title' => '接受资源共享邀请', - 'description' => '### 使用说明'."\n" - ."\n" - .'- 只有在资源目录外共享资源时,才需要接受或拒绝资源共享邀请。在资源目录内共享资源时,系统会默认接受共享邀请,资源使用者不需要做任何操作。'."\n" - .'- 共享邀请的有效期为7天,资源使用者需要在有效期内完成确认。'."\n" - ."\n" - .'本文将提供一个示例,在`cn-hangzhou`地域,接受ID为`i-pMnItMX19fBJ****`的共享邀请。', - 'requestParamsDescription' => '关于公共请求参数的详情,请参见[公共参数](~~159973~~)。', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"NextToken\\": \\"caeba0bbb2be03f84eb48b699f0a****\\",\\n \\"RequestId\\": \\"8054B059-6B36-53BF-AA45-B8C9A0ED05AB\\",\\n \\"TagResources\\": {\\n \\"TagResource\\": [\\n {\\n \\"ResourceId\\": \\"rs-PqysnzIj****\\",\\n \\"ResourceType\\": \\"ResourceShare\\",\\n \\"TagKey\\": \\"k1\\",\\n \\"TagValue\\": \\"v1\\"\\n }\\n ]\\n }\\n}","type":"json"}]', ], 'RejectResourceShareInvitation' => [ 'summary' => '资源使用者调用RejectResourceShareInvitation拒绝资源共享邀请。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4415,22 +2811,14 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - ], + 'systemTags' => ['operationType' => 'update'], 'parameters' => [ [ 'name' => 'ResourceShareInvitationId', 'in' => 'query', - 'schema' => [ - 'description' => '资源共享邀请ID。'."\n" - ."\n" - .'您可以调用[ListResourceShareInvitations](~~450564~~)获取资源共享邀请ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'i-yyTWbkjHArYh****', - ], + 'schema' => ['description' => '资源共享邀请ID。'."\n" + ."\n" + .'您可以调用[ListResourceShareInvitations](~~450564~~)获取资源共享邀请ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'i-yyTWbkjHArYh****'], ], ], 'responses' => [ @@ -4439,63 +2827,24 @@ 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'E446D6DE-BFC8-5F37-A494-33D7B118147D', - ], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'E446D6DE-BFC8-5F37-A494-33D7B118147D'], 'ResourceShareInvitation' => [ 'description' => '资源共享邀请信息。', 'type' => 'object', 'properties' => [ - 'ResourceShareInvitationId' => [ - 'description' => '资源共享邀请ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'i-yyTWbkjHArYh****', - ], - 'ResourceShareId' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'rs-JoA1Ayjm****', - ], - 'ResourceShareName' => [ - 'description' => '共享单元名称。', - 'type' => 'string', - 'required' => true, - 'example' => 'example', - ], - 'SenderAccountId' => [ - 'description' => '邀请者的阿里云账号ID。', - 'type' => 'string', - 'required' => true, - 'example' => '151266687691****', - ], - 'ReceiverAccountId' => [ - 'description' => '被邀请者的阿里云账号ID。', - 'type' => 'string', - 'required' => true, - 'example' => '134254031178****', - ], - 'CreateTime' => [ - 'description' => '邀请创建时间(UTC时间)。', - 'type' => 'string', - 'required' => true, - 'example' => '2022-09-02T07:07:30.809Z', - ], - 'Status' => [ - 'description' => '邀请状态。取值:'."\n" - ."\n" - .'- Pending:等待确认。'."\n" - .'- Accepted:已接受。'."\n" - .'- Cancelled:已取消。'."\n" - .'- Rejected:已拒绝。'."\n" - .'- Expired:已过期。', - 'type' => 'string', - 'required' => true, - 'example' => 'Rejected', - ], + 'ResourceShareInvitationId' => ['description' => '资源共享邀请ID。', 'type' => 'string', 'required' => true, 'example' => 'i-yyTWbkjHArYh****'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'example' => 'rs-JoA1Ayjm****'], + 'ResourceShareName' => ['description' => '共享单元名称。', 'type' => 'string', 'required' => true, 'example' => 'example'], + 'SenderAccountId' => ['description' => '邀请者的阿里云账号ID。', 'type' => 'string', 'required' => true, 'example' => '151266687691****'], + 'ReceiverAccountId' => ['description' => '被邀请者的阿里云账号ID。', 'type' => 'string', 'required' => true, 'example' => '134254031178****'], + 'CreateTime' => ['description' => '邀请创建时间(UTC时间)。', 'type' => 'string', 'required' => true, 'example' => '2022-09-02T07:07:30.809Z'], + 'Status' => ['description' => '邀请状态。取值:'."\n" + ."\n" + .'- Pending:等待确认。'."\n" + .'- Accepted:已接受。'."\n" + .'- Cancelled:已取消。'."\n" + .'- Rejected:已拒绝。'."\n" + .'- Expired:已过期。', 'type' => 'string', 'required' => true, 'example' => 'Rejected'], ], ], ], @@ -4504,47 +2853,25 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InvalidParameter.ResourceShareInvitationId', - 'errorMessage' => 'The ResourceShareInvitationId is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceShareInvitationId', - 'errorMessage' => 'You must specify ResourceShareInvitationId.', - ], + ['errorCode' => 'InvalidParameter.ResourceShareInvitationId', 'errorMessage' => 'The ResourceShareInvitationId is invalid.', 'description' => ''], + ['errorCode' => 'MissingParameter.ResourceShareInvitationId', 'errorMessage' => 'You must specify ResourceShareInvitationId.', 'description' => ''], ], 409 => [ - [ - 'errorCode' => 'InvitationStatus.Expired', - 'errorMessage' => 'The resource share invitation status is expired.', - ], - [ - 'errorCode' => 'EntityNotExists.ResourceShareInvitation', - 'errorMessage' => 'The resource share invitation does not exist in the current account.', - ], - [ - 'errorCode' => 'InvitationStatus.AlreadyRejected', - 'errorMessage' => 'The resource share invitation status is rejected.', - ], - [ - 'errorCode' => 'InvitationStatus.AlreadyAccepted', - 'errorMessage' => 'The resource share invitation status is alredy accepted.', - ], + ['errorCode' => 'InvitationStatus.Expired', 'errorMessage' => 'The resource share invitation status is expired.', 'description' => ''], + ['errorCode' => 'EntityNotExists.ResourceShareInvitation', 'errorMessage' => 'The resource share invitation does not exist in the current account.', 'description' => ''], + ['errorCode' => 'InvitationStatus.AlreadyRejected', 'errorMessage' => 'The resource share invitation status is rejected.', 'description' => ''], + ['errorCode' => 'InvitationStatus.AlreadyAccepted', 'errorMessage' => 'The resource share invitation status is alredy accepted.', 'description' => ''], ], ], 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E446D6DE-BFC8-5F37-A494-33D7B118147D\\",\\n \\"ResourceShareInvitation\\": {\\n \\"ResourceShareInvitationId\\": \\"i-yyTWbkjHArYh****\\",\\n \\"ResourceShareId\\": \\"rs-JoA1Ayjm****\\",\\n \\"ResourceShareName\\": \\"example\\",\\n \\"SenderAccountId\\": \\"151266687691****\\",\\n \\"ReceiverAccountId\\": \\"134254031178****\\",\\n \\"CreateTime\\": \\"2022-09-02T07:07:30.809Z\\",\\n \\"Status\\": \\"Rejected\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RejectResourceShareInvitationResponse>\\n <RequestId>E446D6DE-BFC8-5F37-A494-33D7B118147D</RequestId>\\n <ResourceShareInvitation>\\n <ResourceShareId>rs-JoA1Ayjm****</ResourceShareId>\\n <ResourceShareName>example</ResourceShareName>\\n <Status>Rejected</Status>\\n <SenderAccountId>151266687691****</SenderAccountId>\\n <ReceiverAccountId>134254031178****</ReceiverAccountId>\\n <CreateTime>2022-09-02T07:07:30.809Z</CreateTime>\\n <ResourceShareInvitationId>i-yyTWbkjHArYh****</ResourceShareInvitationId>\\n </ResourceShareInvitation>\\n</RejectResourceShareInvitationResponse>","errorExample":""}]', 'title' => '拒绝资源共享邀请', 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,拒绝ID为`i-yyTWbkjHArYh****`的资源共享邀请。', + 'changeSet' => [], ], - 'AssociateResourceSharePermission' => [ - 'summary' => '调用AssociateResourceSharePermission为共享单元关联共享权限。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'TagResources' => [ + 'path' => '', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4554,312 +2881,300 @@ 'deprecated' => false, 'systemTags' => [ 'operationType' => 'update', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREentconsoleT3AKMG'], ], 'parameters' => [ [ - 'name' => 'ResourceShareId', + 'name' => 'ResourceType', + 'in' => 'query', + 'schema' => ['title' => '资源类型', 'description' => '资源类型。'."\n" + ."\n" + .'取值为`ResourceShare`,表示共享单元。', 'type' => 'string', 'required' => true, 'example' => 'ResourceShare'], + ], + [ + 'name' => 'ResourceId', 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ 'description' => '共享单元ID。', - 'type' => 'string', + 'type' => 'array', + 'items' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => false, 'example' => 'rs-PqysnzIj****'], 'required' => true, - 'docRequired' => true, - 'example' => 'rs-6GRmdD3X****', + 'maxItems' => 51, ], ], [ - 'name' => 'PermissionName', + 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '共享权限名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => false, - 'example' => 'AliyunRSDefaultPermissionVSwitch', - ], + 'schema' => ['title' => '地域Id', 'description' => '共享单元所属的地域ID。', 'type' => 'string', 'required' => true, 'example' => 'cn-hangzhou'], ], [ - 'name' => 'Replace', + 'name' => 'Tag', 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '指定的权限是否替换现有权限。取值:'."\n" - .'- false(默认值):否,不替换现有权限,适合于将当前权限添加到没有权限的共享单元。由于同一个共享单元中相同资源类型只能具有一个权限,如果共享单元中某资源类型已经有设置权限,同时您将Replace设置为fasle,此时该操作会报错。防止您误操作替换现有权限。'."\n" + 'description' => '标签列表。'."\n" ."\n" - .'- true:是,替换共享单元中相同资源类型的权限。', - 'type' => 'boolean', - 'required' => false, - 'example' => 'false', + .'最多可以绑定20个标签。', + 'type' => 'array', + 'items' => [ + 'description' => '标签列表。', + 'type' => 'object', + 'properties' => [ + 'Key' => ['description' => '标签键。'."\n" + ."\n" + .'> 如需传入该值,则不能输入空字符串。最多支持128个字符,不能以`aliyun`和`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'k1'], + 'Value' => ['description' => '标签值。'."\n" + .'> 最多支持128个字符,不能以`acs:`开头,不能包含`http://`或者`https://`。', 'type' => 'string', 'required' => false, 'example' => 'v1'], + ], + 'required' => false, + ], + 'required' => true, + 'maxItems' => 20, ], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '111FB84A-60A9-403E-9067-E55D7EE95BD1', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InvalidParameter.ResourceShareId', - 'errorMessage' => 'The ResourceShareId is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceShareId', - 'errorMessage' => 'You must specify ResourceShareId.', - ], - [ - 'errorCode' => 'MissingParameter.PermissionName', - 'errorMessage' => 'You must specify PermissionName.', - ], + ['errorCode' => 'InvalidParameter.ResourceId', 'errorMessage' => 'The ResourceId is invalid.', 'description' => 'ResourceId参数错误。'], + ['errorCode' => 'InvalidResourceId.NotFound', 'errorMessage' => 'The specified ResourceIds are not found in our records.', 'description' => '资源ID不存在。'], + ['errorCode' => 'NumberExceed.ResourceIds', 'errorMessage' => 'The maximum number of ResourceIds is exceeded.', 'description' => '资源ID数量超出限制。'], + ['errorCode' => 'InvalidParameter.RegionId', 'errorMessage' => 'The RegionId parameter is invalid.', 'description' => '地域ID参数无效。'], + ['errorCode' => 'MissingParameter.ResourceIds', 'errorMessage' => 'You must specify ResourceIds.', 'description' => '资源ID参数不能为空。'], + ['errorCode' => 'MissingParameter.ResourceType', 'errorMessage' => 'You must specify ResourceType.', 'description' => '资源类型参数不能为空。'], + ['errorCode' => 'MissingParameter.Tags', 'errorMessage' => 'You must specify Tags.', 'description' => '标签参数不能为空。'], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType parameter is invalid.', 'description' => '资源类型参数无效。'], ], - 404 => [ - [ - 'errorCode' => 'EntityNotExists.Permission', - 'errorMessage' => 'The resource share permission does not exist.', - ], + 403 => [ + ['errorCode' => 'NoPermission', 'errorMessage' => 'You are not authorized to perform this action.', 'description' => '当前操作未被授权,请联系管理员授权。'], + ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'The request processing has failed due to some unknown error.', 'description' => '由于某些未知错误,请求处理失败。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"111FB84A-60A9-403E-9067-E55D7EE95BD1\\"\\n}","errorExample":""},{"type":"xml","example":"<AssociateResourceSharePermissionResponse>\\n <RequestId>2C3FA051-61DC-4F3E-81E9-E4830524DF4B</RequestId>\\n</AssociateResourceSharePermissionResponse>","errorExample":""}]', - 'title' => '为共享单元关联共享权限', - 'description' => '本文将提供一个示例,在`cn-hangzhou`地域的共享单元`rs-6GRmdD3X****`中,关联共享权限`AliyunRSDefaultPermissionVSwitch`。', - ], - 'DisassociateResourceSharePermission' => [ - 'summary' => '调用DisassociateResourceSharePermission为共享单元解除共享权限。当共享单元下权限对应的资源类型没有关联具体资源时,才允许从共享单元中删除权限。', - 'methods' => [ - 'post', - 'get', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '为共享单元绑定标签', + 'summary' => '为共享单元绑定标签。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'TagResources'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:TagResources', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => 'ResourceShare', 'arn' => 'acs:resourcesharing:{#regionId}:{#accountId}:resourceshare/{#ResourceShareId}'], + ], + ], + ], ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C\\"\\n}","type":"json"}]', + ], + 'UntagResources' => [ + 'summary' => '为共享单元解绑标签。', + 'path' => '', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'update', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'update', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREentconsoleA4VJ8H'], ], 'parameters' => [ [ - 'name' => 'ResourceShareId', + 'name' => 'ResourceType', + 'in' => 'query', + 'schema' => ['title' => '资源类型', 'description' => '资源类型。'."\n" + ."\n" + .'取值为`ResourceShare`,表示共享单元。', 'type' => 'string', 'required' => true, 'example' => 'ResourceShare'], + ], + [ + 'name' => 'ResourceId', 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'rs-6GRmdD3X****', + 'description' => '共享单元ID。'."\n" + ."\n" + .'最多可以添加20个共享单元。', + 'type' => 'array', + 'items' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => false, 'example' => 'rs-PqysnzIj****'], + 'required' => false, + 'maxItems' => 51, ], ], [ - 'name' => 'PermissionName', + 'name' => 'RegionId', + 'in' => 'query', + 'schema' => ['title' => '地域Id', 'description' => '共享单元所属的地域ID。', 'type' => 'string', 'required' => true, 'example' => 'cn-hangzhou'], + ], + [ + 'name' => 'TagKey', 'in' => 'query', + 'style' => 'repeatList', 'schema' => [ - 'description' => '共享权限名称。在[权限库](~~465474~~)文档中查看。', - 'type' => 'string', - 'required' => true, - 'docRequired' => false, - 'example' => 'AliyunRSDefaultPermissionVSwitch', + 'description' => '标签键。'."\n" + ."\n" + .'最多可以解绑20个标签键。'."\n" + .'> 当解绑全部标签的参数`All`取值为`true`时,不需要设置标签键。', + 'type' => 'array', + 'items' => ['description' => '标签键。', 'type' => 'string', 'required' => false, 'example' => 'k1'], + 'required' => false, + 'maxItems' => 21, ], ], + [ + 'name' => 'All', + 'in' => 'query', + 'schema' => ['description' => '是否解绑指定资源的全部标签。取值:'."\n" + .'- false(默认值):否。'."\n" + .'- true:是。', 'type' => 'boolean', 'required' => false, 'example' => 'false'], + ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '111FB84A-60A9-403E-9067-E55D7EE95BD1', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C'], ], ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'InvalidParameter.ResourceShareId', - 'errorMessage' => 'The ResourceShareId is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceShareId', - 'errorMessage' => 'You must specify ResourceShareId.', - ], - [ - 'errorCode' => 'MissingParameter.PermissionName', - 'errorMessage' => 'You must specify PermissionName.', - ], + ['errorCode' => 'InvalidParameter.ResourceType', 'errorMessage' => 'The ResourceType parameter is invalid.', 'description' => '资源类型参数无效。'], + ['errorCode' => 'MissingParameter.ResourceIds', 'errorMessage' => 'You must specify ResourceIds.', 'description' => '资源ID参数不能为空。'], + ['errorCode' => 'MissingParameter.ResourceType', 'errorMessage' => 'You must specify ResourceType.', 'description' => '资源类型参数不能为空。'], + ['errorCode' => 'InvalidParameter.TagKey', 'errorMessage' => 'The TagKey parameter is invalid.', 'description' => '标签键参数无效。'], + ['errorCode' => 'NumberExceed.ResourceIds', 'errorMessage' => 'The maximum number of ResourceIds is exceeded.', 'description' => '资源ID数量超出限制。'], + ['errorCode' => 'NumberExceed.TagKeys', 'errorMessage' => 'The maximum number of TagKeys is exceeded.', 'description' => '标签键参数数量超出限制。'], + ['errorCode' => 'Duplicate.TagKey', 'errorMessage' => 'The TagKey contains duplicate keys.', 'description' => 'TagKey参数重复。'], + ['errorCode' => 'InvalidResourceId.NotFound', 'errorMessage' => 'The specified ResourceIds are not found in our records.', 'description' => '资源ID不存在。'], + ['errorCode' => 'MissingParameter.TagKeysOrDeleteAll', 'errorMessage' => 'You must specify TagKeys or DeleteAll.', 'description' => 'TagKey列表或DeleteAll参数无效。'], ], - 404 => [ - [ - 'errorCode' => 'EntityNotExists.Permission', - 'errorMessage' => 'The resource share permission does not exist.', - ], + 403 => [ + ['errorCode' => 'NoPermission', 'errorMessage' => 'You are not authorized to perform this action.', 'description' => '当前操作未被授权,请联系管理员授权。'], ], - 409 => [ - [ - 'errorCode' => 'DisassociateConflict.Permission', - 'errorMessage' => 'Existing associated resource when disassociating permission with resource share.', - ], + 500 => [ + ['errorCode' => 'InternalError', 'errorMessage' => 'The request processing has failed due to some unknown error.', 'description' => '由于某些未知错误,请求处理失败。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"111FB84A-60A9-403E-9067-E55D7EE95BD1\\"\\n}","errorExample":""},{"type":"xml","example":"<DisassociateResourceSharePermissionResponse>\\n <RequestId>111FB84A-60A9-403E-9067-E55D7EE95BD1</RequestId>\\n</DisassociateResourceSharePermissionResponse>","errorExample":""}]', - 'title' => '为共享单元解除共享权限', - 'description' => '本文将提供一个示例,在`cn-hangzhou`地域的共享单元`rs-6GRmdD3X****`中,解除共享权限`AliyunRSDefaultPermissionVSwitch`。', - ], - 'ListResourceSharePermissions' => [ - 'summary' => '调用ListResourceSharePermissions查询共享单元中关联权限的记录。', - 'methods' => [ - 'post', - 'get', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '为共享单元解绑标签', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UntagResources'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:UntagResources', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => 'ResourceShare', 'arn' => 'acs:resourcesharing:{#regionId}:{#accountId}:resourceshare/{#ResourceShareId}'], + ], + ], + ], ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C\\"\\n}","type":"json"}]', + ], + 'UpdateResourceShare' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'list', - ], + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'ResourceShareId', 'in' => 'query', - 'schema' => [ - 'description' => '共享单元ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'rs-6GRmdD3X****', - ], + 'schema' => ['description' => '共享单元ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'rs-qSkW1HBY****'], ], [ - 'name' => 'MaxResults', + 'name' => 'ResourceShareName', 'in' => 'query', - 'schema' => [ - 'description' => '单次请求返回结果的最大条数。'."\n" - ."\n" - .'取值范围:1~100。默认值:20。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '20', - ], + 'schema' => ['description' => '新的共享单元名称。'."\n" + ."\n" + .'长度范围:1~50个字符。'."\n" + ."\n" + .'格式:允许输入英文字母、数字、中文、英文句点(.)、下划线(_)或短划线(-)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'new'], ], [ - 'name' => 'NextToken', - 'in' => 'query', - 'schema' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'required' => false, - 'example' => 'TGlzdFJlc291cm****', - ], - ], - [ - 'name' => 'ResourceOwner', + 'name' => 'AllowExternalTargets', 'in' => 'query', - 'schema' => [ - 'description' => '共享单元归属者。取值:'."\n" - ."\n" - .'- Self:查询当前账号的共享单元列表。'."\n" - .'- OtherAccounts:查询其他账号共享给当前账号的共享单元列表。', - 'type' => 'string', - 'required' => true, - 'example' => 'Self', - ], + 'schema' => ['description' => '是否允许共享给资源目录外的账号。取值:'."\n" + ."\n" + .'- false:仅允许资源目录内共享。'."\n" + .'- true:允许共享给任意账号。', 'type' => 'boolean', 'required' => false, 'example' => 'false'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'description' => '返回参数。', + 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'NextToken' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'example' => 'TGlzdFJlc291cm****', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA', - ], - 'Permissions' => [ - 'description' => '共享权限信息。', - 'type' => 'array', - 'items' => [ - 'description' => '共享权限信息。', - 'type' => 'object', - 'properties' => [ - 'PermissionName' => [ - 'description' => '共享权限名称。', - 'type' => 'string', - 'example' => 'AliyunRSDefaultPermissionVSwitch', - ], - 'PermissionVersion' => [ - 'description' => '共享权限版本。', - 'type' => 'string', - 'example' => 'v1', - ], - 'DefaultVersion' => [ - 'description' => '共享权限是否为默认版本。取值:'."\n" - ."\n" - .'- false:不是默认版本。'."\n" - ."\n" - .'- true:是默认版本。', - 'type' => 'boolean', - 'example' => 'true', - ], - 'CreateTime' => [ - 'description' => '创建时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:01.818Z', - ], - 'UpdateTime' => [ - 'description' => '更新时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:01.818Z', - ], - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'example' => 'VSwitch', - ], - 'DefaultPermission' => [ - 'description' => '是否为默认权限。取值:'."\n" - ."\n" - .'- false:不是默认权限。'."\n" - ."\n" - .'- true:是默认权限。', - 'type' => 'boolean', - 'example' => 'true', - ], - ], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '2860A3A4-D8C1-4EF4-954E-84A3945E26E5'], + 'ResourceShare' => [ + 'description' => '共享单元信息。', + 'type' => 'object', + 'properties' => [ + 'UpdateTime' => ['description' => '共享单元更新时间。', 'type' => 'string', 'example' => '2020-12-04T08:55:25.382Z'], + 'ResourceShareName' => ['description' => '共享单元名称。', 'type' => 'string', 'example' => 'new'], + 'ResourceShareOwner' => ['description' => '共享单元归属者。', 'type' => 'string', 'example' => '151266687691****'], + 'CreateTime' => ['description' => '共享单元创建时间。', 'type' => 'string', 'example' => '2020-12-03T08:02:22.413Z'], + 'ResourceShareId' => ['description' => '共享单元ID。', 'type' => 'string', 'example' => 'rs-qSkW1HBY****'], + 'ResourceShareStatus' => ['description' => '共享单元状态。取值:'."\n" + ."\n" + .'- Active:已启用。'."\n" + .'- Pending:待确认。'."\n" + .'- Deleting:删除中。'."\n" + .'- Deleted:已删除。'."\n" + ."\n" + .'> Deleted状态的共享单元记录,会在48~96小时内被系统自动删除。', 'type' => 'string', 'example' => 'Active'], + 'AllowExternalTargets' => ['description' => '是否允许共享给资源目录外的账号。取值:'."\n" + ."\n" + .'- false:仅允许资源目录内共享。'."\n" + .'- true:允许共享给任意账号。', 'type' => 'boolean', 'example' => 'false'], ], ], ], @@ -4868,609 +3183,595 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'MissingParameter.ResourceShareId', - 'errorMessage' => 'You must specify ResourceShareId.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceShareId', - 'errorMessage' => 'The ResourceShareId is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.MaxResults', - 'errorMessage' => 'The MaxResults is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken', - 'errorMessage' => 'The NextToken is invalid.', - ], - [ - 'errorCode' => 'InvalidParameter.NextToken.Length', - 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceOwner', - 'errorMessage' => 'The ResourceOwner is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.ResourceOwner', - 'errorMessage' => 'You must specify ResourceOwner.', - ], + ['errorCode' => 'MissingParameter.ResourceShareId', 'errorMessage' => 'You must specify ResourceShareId.', 'description' => 'ResourceShareId参数缺失。'], + ['errorCode' => 'InvalidParameter.ResourceShareId', 'errorMessage' => 'The ResourceShareId is invalid.', 'description' => 'ResourceShareId参数错误。'], + ['errorCode' => 'MissingParameter.ResourceShareName', 'errorMessage' => 'You must specify ResourceShareName.', 'description' => '共享单元名称缺失。'], + ['errorCode' => 'InvalidParameter.ResourceShareName', 'errorMessage' => 'The ResourceShareName is invalid.', 'description' => '共享单元名称无效。'], + ['errorCode' => 'InvalidParameter.ResourceShareName.Length', 'errorMessage' => 'The maximum length of ResourceShareName exceeds 50 characters.', 'description' => '共享单元名称字数超长(最大50字符)。'], + ['errorCode' => 'InvalidParameter', 'errorMessage' => 'The specified parameter is invalid.', 'description' => '参数无效。'], ], 404 => [ - [ - 'errorCode' => 'EntityNotExists.ResourceShare', - 'errorMessage' => 'The resource share does not exist in the current account.', - ], + ['errorCode' => 'EntityNotExists.ResourceShare', 'errorMessage' => 'The resource share does not exist in the current account.', 'description' => '共享单元不在当前账号内。'], + ], + 409 => [ + ['errorCode' => 'OperationNotPermitted', 'errorMessage' => 'You do not have permission to do this operation.', 'description' => '无权限操作此功能。'], + ['errorCode' => 'ResourceShareStatusMismatchAction', 'errorMessage' => 'The status of the resource share does not allow the specified operation.', 'description' => '共享单元的状态不支持当前操作。'], + ['errorCode' => 'NotSupport.AllowExternalTargets', 'errorMessage' => 'External sharing is not permitted for resource shares with unsupported configurations.', 'description' => '共享单元中包含不支持组织外共享的资源类型配置信息,无法将AllowExternalTargets的值设置为true。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA\\",\\n \\"Permissions\\": [\\n {\\n \\"PermissionName\\": \\"AliyunRSDefaultPermissionVSwitch\\",\\n \\"PermissionVersion\\": \\"v1\\",\\n \\"DefaultVersion\\": true,\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"UpdateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"DefaultPermission\\": true\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListResourceSharePermissionsResponse>\\n <NextToken>TGlzdFJlc291cm****</NextToken>\\n <RequestId>2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA</RequestId>\\n <Permissions>\\n <PermissionName>AliyunRSDefaultPermissionVSwitch</PermissionName>\\n <PermissionVersion>v1</PermissionVersion>\\n <DefaultVersion>true</DefaultVersion>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:01.818Z</UpdateTime>\\n <ResourceType>VSwitch</ResourceType>\\n <DefaultPermission>true</DefaultPermission>\\n </Permissions>\\n</ListResourceSharePermissionsResponse>","errorExample":""}]', - 'title' => '查询共享单元中关联权限的记录', - 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询当前账号创建的共享单元中关联的共享权限记录。', - ], - 'GetPermission' => [ - 'summary' => '调用GetPermission查询共享权限信息。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'title' => '修改共享单元信息', + 'summary' => '修改共享单元信息。', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateResourceShare'], + ], ], - 'security' => [ + 'ramActions' => [ [ - 'AK' => [], + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:UpdateResourceShare', + 'authLevel' => 'operate', + 'actionConditions' => [ + ['conditionKey' => 'resourcesharing:RequestedAllowExternalTargets', 'validationType' => 'always'], + ], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2860A3A4-D8C1-4EF4-954E-84A3945E26E5\\",\\n \\"ResourceShare\\": {\\n \\"UpdateTime\\": \\"2020-12-04T08:55:25.382Z\\",\\n \\"ResourceShareName\\": \\"new\\",\\n \\"ResourceShareOwner\\": \\"151266687691****\\",\\n \\"CreateTime\\": \\"2020-12-03T08:02:22.413Z\\",\\n \\"ResourceShareId\\": \\"rs-qSkW1HBY****\\",\\n \\"ResourceShareStatus\\": \\"Active\\",\\n \\"AllowExternalTargets\\": false\\n }\\n}","errorExample":""},{"type":"xml","example":"<UpdateResourceShareResponse>\\n <RequestId>2860A3A4-D8C1-4EF4-954E-84A3945E26E5</RequestId>\\n <ResourceShare>\\n <ResourceShareId>rs-qSkW1HBY****</ResourceShareId>\\n <ResourceShareName>new</ResourceShareName>\\n <ResourceShareStatus>Active</ResourceShareStatus>\\n <CreateTime>2020-12-03T08:02:22.413Z</CreateTime>\\n <UpdateTime>2020-12-04T08:55:25.382Z</UpdateTime>\\n <ResourceShareOwner>151266687691****</ResourceShareOwner>\\n <AllowExternalTargets>false</AllowExternalTargets>\\n </ResourceShare>\\n</UpdateResourceShareResponse>","errorExample":""}]', + ], + ], + 'endpoints' => [ + ['regionId' => 'cn-wulanchabu', 'regionName' => '华北6(乌兰察布)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-wulanchabu.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-wulanchabu.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-wulanchabu.aliyuncs.com'], + ['regionId' => 'cn-beijing', 'regionName' => '华北2(北京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-beijing.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-beijing.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-beijing.aliyuncs.com'], + ['regionId' => 'cn-qingdao', 'regionName' => '华北1(青岛)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-qingdao.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-qingdao.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-qingdao.aliyuncs.com'], + ['regionId' => 'cn-wuhan-lr', 'regionName' => '华中1(武汉-本地地域)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-wuhan-lr.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-wuhan-lr.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-wuhan-lr.aliyuncs.com'], + ['regionId' => 'cn-shanghai', 'regionName' => '华东2(上海)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-shanghai.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-shanghai.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-shanghai.aliyuncs.com'], + ['regionId' => 'cn-hongkong', 'regionName' => '中国香港', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-hongkong.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-hongkong.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-hongkong.aliyuncs.com'], + ['regionId' => 'cn-heyuan', 'regionName' => '华南2(河源)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-heyuan.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-heyuan.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-heyuan.aliyuncs.com'], + ['regionId' => 'cn-zhangjiakou', 'regionName' => '华北3(张家口)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-zhangjiakou.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-zhangjiakou.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-zhangjiakou.aliyuncs.com'], + ['regionId' => 'cn-shenzhen', 'regionName' => '华南1(深圳)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-shenzhen.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-shenzhen.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-shenzhen.aliyuncs.com'], + ['regionId' => 'ap-northeast-2', 'regionName' => '韩国(首尔)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.ap-northeast-2.aliyuncs.com', 'endpoint' => 'resourcesharing.ap-northeast-2.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.ap-northeast-2.aliyuncs.com'], + ['regionId' => 'ap-northeast-1', 'regionName' => '日本(东京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.ap-northeast-1.aliyuncs.com', 'endpoint' => 'resourcesharing.ap-northeast-1.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.ap-northeast-1.aliyuncs.com'], + ['regionId' => 'cn-chengdu', 'regionName' => '西南1(成都)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-chengdu.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-chengdu.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-chengdu.aliyuncs.com'], + ['regionId' => 'cn-guangzhou', 'regionName' => '华南3(广州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-guangzhou.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-guangzhou.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-guangzhou.aliyuncs.com'], + ['regionId' => 'ap-southeast-1', 'regionName' => '新加坡', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.ap-southeast-1.aliyuncs.com', 'endpoint' => 'resourcesharing.ap-southeast-1.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.ap-southeast-1.aliyuncs.com'], + ['regionId' => 'ap-southeast-3', 'regionName' => '马来西亚(吉隆坡)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.ap-southeast-3.aliyuncs.com', 'endpoint' => 'resourcesharing.ap-southeast-3.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.ap-southeast-3.aliyuncs.com'], + ['regionId' => 'cn-huhehaote', 'regionName' => '华北5(呼和浩特)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-huhehaote.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-huhehaote.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-huhehaote.aliyuncs.com'], + ['regionId' => 'ap-southeast-5', 'regionName' => '印度尼西亚(雅加达)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.ap-southeast-5.aliyuncs.com', 'endpoint' => 'resourcesharing.ap-southeast-5.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.ap-southeast-5.aliyuncs.com'], + ['regionId' => 'ap-southeast-6', 'regionName' => '菲律宾(马尼拉)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.ap-southeast-6.aliyuncs.com', 'endpoint' => 'resourcesharing.ap-southeast-6.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.ap-southeast-6.aliyuncs.com'], + ['regionId' => 'ap-southeast-7', 'regionName' => '泰国(曼谷)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.ap-southeast-7.aliyuncs.com', 'endpoint' => 'resourcesharing.ap-southeast-7.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.ap-southeast-7.aliyuncs.com'], + ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'resourcesharing.cn-hangzhou.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-hangzhou.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-hangzhou.aliyuncs.com'], + ['regionId' => 'us-east-1', 'regionName' => '美国(弗吉尼亚)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'resourcesharing.us-east-1.aliyuncs.com', 'endpoint' => 'resourcesharing.us-east-1.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.us-east-1.aliyuncs.com'], + ['regionId' => 'eu-west-1', 'regionName' => '英国(伦敦)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'resourcesharing.eu-west-1.aliyuncs.com', 'endpoint' => 'resourcesharing.eu-west-1.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.eu-west-1.aliyuncs.com'], + ['regionId' => 'us-west-1', 'regionName' => '美国(硅谷)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'resourcesharing.us-west-1.aliyuncs.com', 'endpoint' => 'resourcesharing.us-west-1.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.us-west-1.aliyuncs.com'], + ['regionId' => 'eu-central-1', 'regionName' => '德国(法兰克福)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'resourcesharing.eu-central-1.aliyuncs.com', 'endpoint' => 'resourcesharing.eu-central-1.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.eu-central-1.aliyuncs.com'], + ['regionId' => 'me-central-1', 'regionName' => '沙特(利雅得)', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'resourcesharing.me-central-1.aliyuncs.com', 'endpoint' => 'resourcesharing.me-central-1.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.me-central-1.aliyuncs.com'], + ['regionId' => 'cn-heyuan-acdr-1', 'regionName' => '河源专属云汽车合规', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'resourcesharing.cn-heyuan-acdr-1.aliyuncs.com', 'endpoint' => 'resourcesharing.cn-heyuan-acdr-1.aliyuncs.com', 'vpc' => 'resourcesharing-vpc.cn-heyuan-acdr-1.aliyuncs.com'], + ], + 'errorCodes' => [ + ['code' => 'AccountNotInResourceDirectory', 'message' => 'The account is not a master or a member of a resource directory.', 'http_code' => 409, 'description' => '资源使用者不在资源目录内。'], + ['code' => 'ActionNotPermitted', 'message' => 'The caller must be the master account for the Resource Directory.', 'http_code' => 409, 'description' => '只允许资源目录的管理账号调用此API。'], + ['code' => 'ActionNotPermitted.CreateServiceLinkedRole', 'message' => 'You are not authorized to perform ram:CreateServiceLinkedRole.', 'http_code' => 409, 'description' => '当前子用户/角色没有授予ram:CreateServiceLinkedRole权限。'], + ['code' => 'AlreadyDisabled', 'message' => 'You have already disabled sharing with the Resource Directory.', 'http_code' => 409, 'description' => '当前已经禁用了与资源目录组织的共享,无需重复操作。'], + ['code' => 'AlreadyEnabled', 'message' => 'You have already enabled sharing with the Resource Directory.', 'http_code' => 409, 'description' => '当前已经启用了与资源目录组织的共享,无需重复操作。'], + ['code' => 'AssociateConflict', 'message' => 'You cannot perform the operation while disassociation operation is being performed.', 'http_code' => 409, 'description' => '取消关联中,不能操作关联。'], + ['code' => 'ConcurrentExecutionError', 'message' => 'The operation could not be completed because another process is currently accessing the same resource.', 'http_code' => 409, 'description' => '存在另一个任务在处理相同资源,请稍后重试。'], + ['code' => 'ConflictedAssociationType', 'message' => 'The specified ResourceId or Target conflicts with AssociationType.', 'http_code' => 400, 'description' => '参数组合冲突:传入参数与AssociationType选定项不符。'], + ['code' => 'DeleteResourceShareConflict', 'message' => 'You cannot delete a resource share while there are unfinished tasks.', 'http_code' => 409, 'description' => '有任务未处理完成,不能删除共享单元。'], + ['code' => 'DisassociateConflict', 'message' => 'You cannot perform the operation while association is already in progress.', 'http_code' => 409, 'description' => '关联中,不能操作关联。'], + ['code' => 'DisassociateInvalid', 'message' => 'You can not disassociate unassociated resource or target.', 'http_code' => 400, 'description' => '对象未关联,不能取消关联。'], + ['code' => 'Duplicate.TagKey', 'message' => 'The TagKey contains duplicate keys.', 'http_code' => 400, 'description' => 'TagKey参数重复。'], + ['code' => 'EntityAlreadyExists.ResourceShare', 'message' => 'The specified resource share ID already exists.', 'http_code' => 409, 'description' => '共享单元ID已存在。'], + ['code' => 'EntityNotExists.Permission', 'message' => 'The resource share permission does not exist.', 'http_code' => 404, 'description' => '共享权限不存在。'], + ['code' => 'EntityNotExists.ResourceId', 'message' => 'The resourceId does not exist.', 'http_code' => 404, 'description' => '资源ID不存在。'], + ['code' => 'EntityNotExists.ResourceShare', 'message' => 'The resource share does not exist in the current account.', 'http_code' => 404, 'description' => '共享单元不在当前账号内。'], + ['code' => 'EntityNotExists.ResourceShareInvitation', 'message' => 'The resource share invitation does not exist in the current account.', 'http_code' => 409, 'description' => '该邀请已不存在。'], + ['code' => 'EntityNotExists.ResourceType', 'message' => 'The resource type does not exist.', 'http_code' => 404, 'description' => '资源类型不存在。'], + ['code' => 'ExternalTargetsNotAllowed.ResourceType', 'message' => 'The resource share includes resource types that cannot be shared with accounts outside the resource directory.', 'http_code' => 409, 'description' => '共享单元中包含不支持组织外共享的资源类型。'], + ['code' => 'ExternalTargetWithdrawConflict', 'message' => 'Existing internal association task in resource directory when disassociating with resource share.', 'http_code' => 409, 'description' => '当前账号是通过组织内共享添加到共享单元中的账号,不能主动退出共享单元。请联系共享单元的所有者将当前账号从共享单元中移除。'], + ['code' => 'InternalError', 'message' => 'The request processing has failed due to some unknown error.', 'http_code' => 500, 'description' => '由于某些未知错误,请求处理失败。'], + ['code' => 'InvalidParameter', 'message' => 'The specified parameter is invalid.', 'http_code' => 400, 'description' => '参数无效。'], + ['code' => 'InvalidParameter.AssociationStatus', 'message' => 'The AssociationStatus is invalid.', 'http_code' => 400, 'description' => 'AssociationStatus参数错误。'], + ['code' => 'InvalidParameter.AssociationType', 'message' => 'The AssociationType is invalid.', 'http_code' => 400, 'description' => 'AssociationType参数错误。'], + ['code' => 'InvalidParameter.MaxResults', 'message' => 'The MaxResults is invalid.', 'http_code' => 400, 'description' => 'MaxResults参数错误。'], + ['code' => 'InvalidParameter.NextToken', 'message' => 'The NextToken is invalid.', 'http_code' => 400, 'description' => 'NextToken参数错误。'], + ['code' => 'InvalidParameter.NextToken.Length', 'message' => 'The maximum length of NextToken exceeds 256 characters.', 'http_code' => 400, 'description' => 'NextToken长度超限(最大256个字符)。'], + ['code' => 'InvalidParameter.PermissionNames.Duplicate', 'message' => 'The PermissionNames duplicate values.', 'http_code' => 400, 'description' => '参数PermissionNames重复。'], + ['code' => 'InvalidParameter.PermissionNames.Length', 'message' => 'The maximum length of PermissionNames exceeds quota limit.', 'http_code' => 400, 'description' => 'PermissionNames长度超限。'], + ['code' => 'InvalidParameter.PermissionVersion', 'message' => 'The PermissionVersion is invalid.', 'http_code' => 400, 'description' => 'PermissionVersion参数错误。'], + ['code' => 'InvalidParameter.RegionId', 'message' => 'The RegionId parameter is invalid.', 'http_code' => 400, 'description' => '地域ID参数无效。'], + ['code' => 'InvalidParameter.ResourceId', 'message' => 'The ResourceId is invalid.', 'http_code' => 400, 'description' => 'ResourceId参数错误。'], + ['code' => 'InvalidParameter.ResourceIds', 'message' => 'The ResourceIds is invalid.', 'http_code' => 400, 'description' => '传入的资源ID错误。'], + ['code' => 'InvalidParameter.ResourceIds.Duplicate', 'message' => 'The specified ResourceId contains duplicate values.', 'http_code' => 400, 'description' => '传入的资源ID有重复项。'], + ['code' => 'InvalidParameter.ResourceIds.Length', 'message' => 'The maximum number of ResourceIds (5) is exceeded.', 'http_code' => 400, 'description' => '传入的资源ID数量超限(最大5个)。'], + ['code' => 'InvalidParameter.ResourceOwner', 'message' => 'The ResourceOwner is invalid.', 'http_code' => 400, 'description' => 'ResourceOwner参数错误。'], + ['code' => 'InvalidParameter.ResourceOwnerAndTag', 'message' => 'You cannot use ResourceOwner set to OtherAccounts and tags in one request.', 'http_code' => 400, 'description' => '当共享单元归属者设置为OtherAccounts时,不允许传入标签参数。'], + ['code' => 'InvalidParameter.Resources', 'message' => 'The Resources is invalid.', 'http_code' => 400, 'description' => '选定的共享资源无效。'], + ['code' => 'InvalidParameter.Resources.Duplicate', 'message' => 'The Resources contains duplicate values.', 'http_code' => 400, 'description' => '选定的共享资源有重复项。'], + ['code' => 'InvalidParameter.Resources.Length', 'message' => 'The maximum number of Resources exceeds 5.', 'http_code' => 400, 'description' => '选定的共享资源数量超限(最大5个)。'], + ['code' => 'InvalidParameter.ResourceShareId', 'message' => 'The ResourceShareId is invalid.', 'http_code' => 400, 'description' => 'ResourceShareId参数错误。'], + ['code' => 'InvalidParameter.ResourceShareIds', 'message' => 'The ResourceShareIds is invalid.', 'http_code' => 400, 'description' => 'ResourceShareIds参数错误。'], + ['code' => 'InvalidParameter.ResourceShareIds.Duplicate', 'message' => 'The ResourceShareIds contains duplicate values.', 'http_code' => 400, 'description' => 'ResourceShareIds有重复项。'], + ['code' => 'InvalidParameter.ResourceShareIds.Length', 'message' => 'The maximum length of ResourceShareIds exceeds 5 characters.', 'http_code' => 400, 'description' => 'ResourceShareIds长度超限(最大5个)。'], + ['code' => 'InvalidParameter.ResourceShareInvitationId', 'message' => 'The ResourceShareInvitationId is invalid.', 'http_code' => 400, 'description' => '资源共享邀请ID无效。'], + ['code' => 'InvalidParameter.ResourceShareInvitationIds', 'message' => 'The ResourceShareInvitationIds is invalid.', 'http_code' => 400, 'description' => '参数ResourceShareInvitationIds非法。'], + ['code' => 'InvalidParameter.ResourceShareInvitationIds.Duplicate', 'message' => 'The ResourceShareInvitationIds duplicate values.', 'http_code' => 400, 'description' => '参数ResourceShareInvitationIds重复。'], + ['code' => 'InvalidParameter.ResourceShareInvitationIds.Length', 'message' => 'The maximum length of ResourceShareInvitationIds exceeds quota limit.', 'http_code' => 400, 'description' => 'ResourceShareInvitationIds长度超限。'], + ['code' => 'InvalidParameter.ResourceShareName', 'message' => 'The ResourceShareName is invalid.', 'http_code' => 400, 'description' => '共享单元名称无效。'], + ['code' => 'InvalidParameter.ResourceShareName.Length', 'message' => 'The maximum length of ResourceShareName exceeds 50 characters.', 'http_code' => 400, 'description' => '共享单元名称字数超长(最大50字符)。'], + ['code' => 'InvalidParameter.ResourceShareStatus', 'message' => 'The ResourceShareStatus is invalid.', 'http_code' => 400, 'description' => 'ResourceShareStatus参数错误。'], + ['code' => 'InvalidParameter.ResourceType', 'message' => 'The ResourceType is invalid.', 'http_code' => 400, 'description' => '传入的资源类型错误。'], + ['code' => 'InvalidParameter.ResourceType', 'message' => 'The ResourceType parameter is invalid.', 'http_code' => 400, 'description' => '资源类型参数无效。'], + ['code' => 'InvalidParameter.TagKey', 'message' => 'The TagKey parameter is invalid.', 'http_code' => 400, 'description' => '标签键参数无效。'], + ['code' => 'InvalidParameter.Target', 'message' => 'The Target is invalid.', 'http_code' => 400, 'description' => '资源所有者传参错误。'], + ['code' => 'InvalidParameter.TargetProperties', 'message' => 'The TargetProperties is invalid.', 'http_code' => 400, 'description' => 'TargetProperties参数无效。'], + ['code' => 'InvalidParameter.TargetProperties.Duplicate', 'message' => 'The TargetProperties contains duplicate values.', 'http_code' => 400, 'description' => 'TargetProperties包含重复的参数。'], + ['code' => 'InvalidParameter.TargetProperties.Length', 'message' => 'The TargetProperties beyond the length limit.', 'http_code' => 400, 'description' => 'TargetProperties数量超过限制。'], + ['code' => 'InvalidParameter.Targets', 'message' => 'The Targets is invalid.', 'http_code' => 400, 'description' => '资源使用者的参数不符合规则。'], + ['code' => 'InvalidParameter.Targets.Duplicate', 'message' => 'The Targets contains duplicate values.', 'http_code' => 400, 'description' => '资源使用者有重复项。'], + ['code' => 'InvalidParameter.Targets.Length', 'message' => 'The maximum number of Targets exceeds 5.', 'http_code' => 400, 'description' => '资源使用者数量超限(最大5个)。'], + ['code' => 'InvalidResourceGroup', 'message' => 'The specified ResourceGroupId is invalid', 'http_code' => 400, 'description' => 'ResourceGroupId参数非法。'], + ['code' => 'InvalidResourceId.NotFound', 'message' => 'The specified ResourceIds are not found in our records.', 'http_code' => 400, 'description' => '资源ID不存在。'], + ['code' => 'InvalidTarget', 'message' => 'The shared target does not exist in the resource directory.', 'http_code' => 400, 'description' => '资源使用者不在资源目录内。'], + ['code' => 'InvalidTarget.LegalEntityMismatch', 'message' => 'The target account does not have the same legal entity as the resource owner account.', 'http_code' => 409, 'description' => '共享目标账号的企业名称与共享者不一致。'], + ['code' => 'InvalidTarget.SiteMismatch', 'message' => 'Cross-site resource sharing is not supported.', 'http_code' => 409, 'description' => '共享目标账号与共享者站点不一致。'], + ['code' => 'InvitationStatus.AlreadyAccepted', 'message' => 'The resource share invitation status is alredy accepted.', 'http_code' => 409, 'description' => '该邀请已被接受。'], + ['code' => 'InvitationStatus.AlreadyRejected', 'message' => 'The resource share invitation status is rejected.', 'http_code' => 409, 'description' => '该邀请已被拒绝。'], + ['code' => 'InvitationStatus.Expired', 'message' => 'The resource share invitation status is expired.', 'http_code' => 409, 'description' => '该邀请已过期。'], + ['code' => 'LeaveResourceShareFailed', 'message' => 'Failed to leave the resource share.', 'http_code' => 409, 'description' => '退出共享单元失败。'], + ['code' => 'LeavingFailed.Account', 'message' => 'The account was added to the resource share automatically by resoucre directory.', 'http_code' => 409, 'description' => '当前账号是通过组织内共享添加到共享单元中的账号,不能主动退出共享单元。需联系共享单元的所有者将当前账号从共享单元中移除。'], + ['code' => 'LeavingFailed.ResourceType', 'message' => 'The resource share contains resources of the resource types that dont support this action.', 'http_code' => 409, 'description' => '共享单元中包含不支持主动退出的资源类型。需联系共享单元的所有者将当前账号从共享单元中移除。'], + ['code' => 'MissingParameter.AssociationType', 'message' => 'You must specify AssociationType.', 'http_code' => 400, 'description' => 'AssociationType参数缺失。'], + ['code' => 'MissingParameter.PermissionName', 'message' => 'You must specify PermissionName.', 'http_code' => 400, 'description' => 'PermissionName参数缺失。'], + ['code' => 'MissingParameter.ResourceGroupId', 'message' => 'The ResourceGroupId parameters that are required for processing this request are missing', 'http_code' => 400, 'description' => 'ResourceGroupId参数缺失。'], + ['code' => 'MissingParameter.ResourceId', 'message' => 'The ResourceId parameters that are required for processing this request are missing', 'http_code' => 400, 'description' => 'ResourceId参数缺失。'], + ['code' => 'MissingParameter.ResourceIdOrTag', 'message' => 'You must specify ResourceId or Tag.', 'http_code' => 400, 'description' => '资源ID或标签参数无效。'], + ['code' => 'MissingParameter.ResourceIds', 'message' => 'You must specify ResourceIds.', 'http_code' => 400, 'description' => '资源ID参数不能为空。'], + ['code' => 'MissingParameter.ResourceOwner', 'message' => 'You must specify ResourceOwner.', 'http_code' => 400, 'description' => 'ResourceOwner参数缺失。'], + ['code' => 'MissingParameter.ResourceRegionId', 'message' => 'The ResourceRegionId parameters that are required for processing this request are missing', 'http_code' => 400, 'description' => 'ResourceRegionId参数缺失。'], + ['code' => 'MissingParameter.ResourceShareId', 'message' => 'You must specify ResourceShareId.', 'http_code' => 400, 'description' => 'ResourceShareId参数缺失。'], + ['code' => 'MissingParameter.ResourceShareInvitationId', 'message' => 'You must specify ResourceShareInvitationId.', 'http_code' => 400, 'description' => '需指定共享单元邀请ID。'], + ['code' => 'MissingParameter.ResourceShareName', 'message' => 'You must specify ResourceShareName.', 'http_code' => 400, 'description' => '共享单元名称缺失。'], + ['code' => 'MissingParameter.ResourceType', 'message' => 'You must specify ResourceType.', 'http_code' => 400, 'description' => '资源类型参数不能为空。'], + ['code' => 'MissingParameter.TagKey', 'message' => 'You must specify TagKey.', 'http_code' => 400, 'description' => '标签键参数不能为空。'], + ['code' => 'MissingParameter.TagKeysOrDeleteAll', 'message' => 'You must specify TagKeys or DeleteAll.', 'http_code' => 400, 'description' => 'TagKey列表或DeleteAll参数无效。'], + ['code' => 'MissingParameter.Tags', 'message' => 'You must specify Tags.', 'http_code' => 400, 'description' => '标签参数不能为空。'], + ['code' => 'NoPermission', 'message' => 'User No Permission', 'http_code' => 409, 'description' => '用户没有权限'], + ['code' => 'NoPermission', 'message' => 'You are not authorized to perform this action.', 'http_code' => 403, 'description' => '当前操作未被授权,请联系管理员授权。'], + ['code' => 'NoPermission.ChangeResourceGroup', 'message' => 'You are not authorized to change resourcegroup', 'http_code' => 400, 'description' => '无更改资源组权限。'], + ['code' => 'NotEnableSharingWithResourceDirectory', 'message' => 'You have not enabled sharing with your Resource Directory.', 'http_code' => 409, 'description' => '未开启与资源目录组织的共享。'], + ['code' => 'NotManagementAccount', 'message' => 'Only the management account of the service is allowed to share such resources.', 'http_code' => 409, 'description' => '当前资源类型仅支持资源目录的管理账号共享资源。如仍需使用当前账号,请联系管理账号将当前账号设置为当前资源类型所属可信服务的委派管理员账号。'], + ['code' => 'NotSupport.Service.AssociateConflict', 'message' => 'The same resource cannot be shared repeatedly to the target service.', 'http_code' => 409, 'description' => '同一个资源不允许重复共享给目标云服务。'], + ['code' => 'NotSupport.Service.ExistInOtherResourceShare', 'message' => 'The resource type has been shared to the target service through other resourceShare. Please share it in the same resourceShare.', 'http_code' => 409, 'description' => '此资源类型已经通过其他共享单元共享给目标云服务,请在同一个共享单元中共享。'], + ['code' => 'NumberExceed.ResourceIds', 'message' => 'The maximum number of ResourceIds is exceeded.', 'http_code' => 400, 'description' => '资源ID数量超出限制。'], + ['code' => 'NumberExceed.TagKeys', 'message' => 'The maximum number of TagKeys is exceeded.', 'http_code' => 400, 'description' => '标签键参数数量超出限制。'], + ['code' => 'NumberExceed.Tags', 'message' => 'The maximum number of Tags is exceeded.', 'http_code' => 400, 'description' => '标签参数数量超出限制。'], + ['code' => 'OperationNotPermitted', 'message' => 'You do not have permission to do this operation.', 'http_code' => 409, 'description' => '无权限操作此功能。'], + ['code' => 'QuotaExceeded.PendingInvitations', 'message' => 'The maximum number of pending invitations exceeds the limit.', 'http_code' => 409, 'description' => '邀请数量超出限制。'], + ['code' => 'QuotaExceeded.ResourceShare.Count', 'message' => 'The maximum number of ResourceShare exceeds the limit.', 'http_code' => 409, 'description' => '共享单元数量超出限制。'], + ['code' => 'QuotaExceeded.SharedResource.Count', 'message' => 'The maximum number of shared resources per account exceeds the limit.', 'http_code' => 409, 'description' => '共享的资源超出单个账号最大限制。'], + ['code' => 'ResourceAndTargetBothEmpty', 'message' => 'Either a resource or a shared target must be specified.', 'http_code' => 400, 'description' => '必须指定一个资源或一个资源使用者。'], + ['code' => 'ResourceNotFound', 'message' => 'The specified resource is not found', 'http_code' => 400, 'description' => '您的账号下不存在该资源。'], + ['code' => 'ResourceShareStatusMismatchAction', 'message' => 'The status of the resource share does not allow the specified operation.', 'http_code' => 409, 'description' => '共享单元的状态不支持当前操作。'], + ['code' => 'ShareWithYourself', 'message' => 'You cannot share resources with yourself.', 'http_code' => 409, 'description' => '资源使用者不能是自己。'], + ['code' => 'SystemError', 'message' => 'A system error occurred while processing your request', 'http_code' => 400, 'description' => '系统异常。'], + ['code' => 'NotSupport.ResourceType.ResourcesParameter', 'message' => 'The Resources parameter does not support this resource type. Please use ResourceArns instead.', 'http_code' => 400, 'description' => '当前资源类型不支持Resources参数,请使用ResourceArns参数。'], + ['code' => 'InvalidParameter.ResourceArn', 'message' => 'The ResourceArn is invalid.', 'http_code' => 400, 'description' => '资源ARN参数无效。'], + ['code' => 'InvalidParameter.ResourceArns.Length', 'message' => 'The ResourceArns beyond the length limit.', 'http_code' => 400, 'description' => '资源ARN数量超限(最大5个)。'], + ['code' => 'InvalidParameter.ResourceArns', 'message' => 'The ResourceArns is invalid.', 'http_code' => 400, 'description' => 'ResourceArns参数无效。'], + ['code' => 'InvalidParameter.ResourceArns.Duplicate', 'message' => 'The ResourceArns contains duplicate values.', 'http_code' => 400, 'description' => '资源ARN参数有重复项。'], + ['code' => 'InvalidParameter.ResourceConflict', 'message' => 'Both Resources and ResourceArns cannot be specified simultaneously. Please provide only one of these parameters.', 'http_code' => 400, 'description' => 'Resources 和 ResourceArns 不能同时指定。请仅提供其中一个参数。'], + ['code' => 'InvalidParameter.ResourceConflict', 'message' => 'Both ResourceId and ResourceArn cannot be specified simultaneously. Please provide only one of these parameters.', 'http_code' => 400, 'description' => 'ResourceId 和 ResourceArn 不能同时指定。请仅提供其中一个参数。'], + ['code' => 'NotSupport.ResourcePropertyConflict', 'message' => 'The ResourceProperty can not be updated until the last operation is completed.', 'http_code' => 409, 'description' => '资源属性关联中,暂无法更新。'], + ['code' => 'NotSupport.ResourceProperty', 'message' => 'The resource type does not support resource property.', 'http_code' => 400, 'description' => '资源类型不支持属性。'], + ['code' => 'InvalidParameter.ResourceProperties.Length', 'message' => 'The ResourceProperties beyond the length limit.', 'http_code' => 400, 'description' => '资源属性数量超限(最大5个)。'], + ['code' => 'InvalidParameter.ResourceProperties.Duplicate', 'message' => 'The ResourceProperties contains duplicate values.', 'http_code' => 400, 'description' => '资源属性参数有重复项。'], + ['code' => 'InvalidParameter.ResourceProperties', 'message' => 'The ResourceProperties is invalid.', 'http_code' => 400, 'description' => '资源属性参数无效。'], + ['code' => 'NotSupport.AllowExternalTargets', 'message' => 'External sharing is not permitted for resource shares with unsupported configurations.', 'http_code' => 409, 'description' => '共享单元中包含不支持组织外共享的资源类型配置信息,无法将AllowExternalTargets的值设置为true。'], + ], + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListResourceSharePermissions'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssociateResourceSharePermission'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListTagResources'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UntagResources'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssociateResourceShare'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RejectResourceShareInvitation'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateResourceShare'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AcceptResourceShareInvitation'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListPermissions'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CheckSharingWithResourceDirectoryStatus'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListSharedResources'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DescribeRegions'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DisassociateResourceSharePermission'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListResourceShares'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetPermission'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteResourceShare'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListPermissionVersions'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListResourceShareInvitations'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListResourceShareAssociations'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateResourceShare'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListSharedTargets'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DisassociateResourceShare'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'EnableSharingWithResourceDirectory'], + ['threshold' => '20', 'countWindow' => 1, 'regionId' => '*', 'api' => 'TagResources'], + ['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeResourceGroup'], + ], + ], + 'ram' => [ + 'productCode' => 'ResourceManager', + 'productName' => '资源管理', + 'ramCodes' => ['resourcecenter', 'resourcemanager', 'tag', 'resourcesharing'], + 'ramLevel' => '资源级', + 'ramConditions' => [ + [ + 'name' => 'resourcesharing:ResourceArn', + 'schema' => ['type' => 'String', 'description' => '资源ARN。取值示例:acs:vpc:cn-shanghai:131993166204****:vswitch/vsw-7xv4sfwo86u2etl64****。'], + ], + [ + 'name' => 'resourcesharing:RequestedAllowExternalTargets', + 'schema' => [ + 'type' => 'Boolean', + 'description' => '是否允许共享给资源目录外的账号。取值示例:false。', + 'enums' => ['true', 'false'], + ], + ], + [ + 'name' => 'ram:ServiceName', + 'schema' => ['type' => 'String', 'description' => '服务关联角色可信的云服务标识,取值示例:actiontrail.aliyuncs.com服务关联角色可信的云服务标识,取值示例:actiontrail.aliyuncs.com'], + ], + [ + 'name' => 'resourcesharing:Target', + 'schema' => ['type' => 'String', 'description' => '取值示例:资源目录ID、资源夹的RDPath或账号的RDPath(组织内账号)或账号ID(组织外账号)。'], + ], + [ + 'name' => 'resourcesharing:RequestedResourceType', + 'schema' => ['type' => 'String', 'description' => '资源类型。取值示例:VSwitch。'], ], - 'parameters' => [ - [ - 'name' => 'PermissionName', - 'in' => 'query', - 'schema' => [ - 'description' => '共享权限名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'AliyunRSDefaultPermissionVSwitch', + ], + 'ramActions' => [ + [ + 'apiName' => 'DisassociateResourceSharePermission', + 'description' => '为共享单元解除共享权限', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:DisassociateResourceSharePermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'PermissionVersion', - 'in' => 'query', - 'schema' => [ - 'description' => '共享权限版本。', - 'type' => 'string', - 'required' => false, - 'docRequired' => false, - 'example' => 'v1', + ], + [ + 'apiName' => 'DeleteResourceShare', + 'description' => '删除共享单元', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'resourcesharing:DeleteResourceShare', + 'authLevel' => 'operate', + 'actionConditions' => [ + ['conditionKey' => 'resourcesharing:RequestedResourceType'], + ['conditionKey' => 'resourcesharing:ResourceArn'], + ], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'description' => '返回参数。', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA', - ], - 'Permission' => [ - 'description' => '共享权限信息。', - 'type' => 'object', - 'properties' => [ - 'PermissionName' => [ - 'description' => '共享权限名称。', - 'type' => 'string', - 'example' => 'AliyunRSDefaultPermissionVSwitch', - ], - 'PermissionVersion' => [ - 'description' => '共享权限版本。', - 'type' => 'string', - 'example' => 'v1', - ], - 'Permission' => [ - 'description' => '共享权限策略定义。', - 'type' => 'string', - 'example' => '{"Effect":"Allow","Action":["vpc:DescribeVSwitches","vpc:DescribeVSwitchAttributes"]}', - ], - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'example' => 'VSwitch', - ], - 'DefaultVersion' => [ - 'description' => '共享权限是否为默认版本。取值:'."\n" - ."\n" - .'- false:不是默认版本。'."\n" - ."\n" - .'- true:是默认版本。', - 'type' => 'boolean', - 'example' => 'true', - ], - 'CreateTime' => [ - 'description' => '创建时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:01.818Z', - ], - 'UpdateTime' => [ - 'description' => '更新时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:01.818Z', - ], - 'DefaultPermission' => [ - 'description' => '是否为默认权限。取值:'."\n" - ."\n" - .'- false:不是默认权限。'."\n" - ."\n" - .'- true:是默认权限。', - 'type' => 'boolean', - 'example' => 'true', - ], - ], - ], - ], + [ + 'apiName' => 'AssociateResourceSharePermission', + 'description' => '为共享单元关联共享权限', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:AssociateResourceSharePermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'InvalidParameter.PermissionVersion', - 'errorMessage' => 'The PermissionVersion is invalid.', - ], - [ - 'errorCode' => 'MissingParameter.PermissionName', - 'errorMessage' => 'You must specify PermissionName.', + [ + 'apiName' => 'ChangeResourceGroup', + 'description' => '共享单元转组', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:ChangeResourceGroup', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => 'ResourceShare', 'arn' => 'acs:resourcesharing:{#regionId}:{#accountId}:resourceshare/{#ResourceShareId}'], ], ], - 404 => [ - [ - 'errorCode' => 'EntityNotExists.Permission', - 'errorMessage' => 'The resource share permission does not exist.', + ], + [ + 'apiName' => 'ListSharedResources', + 'description' => '查询共享或其他账号共享的资源列表', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListSharedResources', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA\\",\\n \\"Permission\\": {\\n \\"PermissionName\\": \\"AliyunRSDefaultPermissionVSwitch\\",\\n \\"PermissionVersion\\": \\"v1\\",\\n \\"Permission\\": \\"{\\\\\\"Effect\\\\\\":\\\\\\"Allow\\\\\\",\\\\\\"Action\\\\\\":[\\\\\\"vpc:DescribeVSwitches\\\\\\",\\\\\\"vpc:DescribeVSwitchAttributes\\\\\\"]}\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"DefaultVersion\\": true,\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"UpdateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"DefaultPermission\\": true\\n }\\n}","errorExample":""},{"type":"xml","example":"<GetPermissionResponse>\\n <RequestId>2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA</RequestId>\\n <Permission>\\n <PermissionName>AliyunRSDefaultPermissionVSwitch</PermissionName>\\n <PermissionVersion>v1</PermissionVersion>\\n <Permission>{\\\\\\"Effect\\\\\\":\\\\\\"Allow\\\\\\",\\\\\\"Action\\\\\\":[\\\\\\"vpc:DescribeVSwitches\\\\\\",\\\\\\"vpc:DescribeVSwitchAttributes\\\\\\"]}</Permission>\\n <ResourceType>VSwitch</ResourceType>\\n <DefaultVersion>true</DefaultVersion>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:01.818Z</UpdateTime>\\n <DefaultPermission>true</DefaultPermission>\\n </Permission>\\n</GetPermissionResponse>","errorExample":""}]', - 'title' => '查询共享权限信息', - 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询共享权限名称为`AliyunRSDefaultPermissionVSwitch`,权限版本为`v1`的共享权限信息。', - ], - 'ListPermissionVersions' => [ - 'summary' => '调用ListPermissionVersions查询指定共享权限名称的版本信息。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'CheckSharingWithResourceDirectoryStatus', + 'description' => '检查基于组织共享的状态', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'resourcesharing:CheckSharingWithResourceDirectoryStatus', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'ListSharedTargets', + 'description' => '查询资源使用者列表', 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], - 'parameters' => [ - [ - 'name' => 'PermissionName', - 'in' => 'query', - 'schema' => [ - 'description' => '共享权限名称。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'AliyunRSDefaultPermissionVSwitch', + 'ramAction' => [ + 'action' => 'resourcesharing:ListSharedTargets', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'MaxResults', - 'in' => 'query', - 'schema' => [ - 'description' => '单次请求返回结果的最大条数。'."\n" - ."\n" - .'取值范围:1~100。默认值:20。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '20', + ], + [ + 'apiName' => 'GetPermission', + 'description' => '查询共享权限信息', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'resourcesharing:GetPermission', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'NextToken', - 'in' => 'query', - 'schema' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'required' => false, - 'example' => 'TGlzdFJlc291cm****', + ], + [ + 'apiName' => 'UntagResources', + 'description' => '为共享单元解绑标签', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:UntagResources', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => 'ResourceShare', 'arn' => 'acs:resourcesharing:{#regionId}:{#accountId}:resourceshare/{#ResourceShareId}'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'description' => '返回参数。', - 'type' => 'object', - 'properties' => [ - 'NextToken' => [ - 'description' => '当请求的返回结果被截断时,您可以使用NextToken再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'example' => 'TGlzdFJlc291cm****', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '04677DCA-7C33-464B-8811-1B1DA3C3D197', - ], - 'Permissions' => [ - 'description' => '共享权限信息。', - 'type' => 'array', - 'items' => [ - 'description' => '共享权限信息。', - 'type' => 'object', - 'properties' => [ - 'PermissionName' => [ - 'description' => '共享权限名称。', - 'type' => 'string', - 'example' => 'AliyunRSDefaultPermissionVSwitch', - ], - 'PermissionVersion' => [ - 'description' => '共享权限版本。', - 'type' => 'string', - 'example' => 'v1', - ], - 'DefaultVersion' => [ - 'description' => '共享权限是否为默认版本。取值:'."\n" - ."\n" - .'- false:不是默认版本。'."\n" - ."\n" - .'- true:是默认版本。', - 'type' => 'boolean', - 'example' => 'true', - ], - 'CreateTime' => [ - 'description' => '创建时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:01.818Z', - ], - 'UpdateTime' => [ - 'description' => '更新时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:01.818Z', - ], - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'example' => 'VSwitch', - ], - 'DefaultPermission' => [ - 'description' => '是否为默认权限。取值:'."\n" - ."\n" - .'- false:不是默认权限。'."\n" - ."\n" - .'- true:是默认权限。', - 'type' => 'boolean', - 'example' => 'true', - ], - ], - ], - ], - ], + [ + 'apiName' => 'CreateResourceShare', + 'description' => '创建共享单元', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'resourcesharing:CreateResourceShare', + 'authLevel' => 'operate', + 'actionConditions' => [ + ['conditionKey' => 'resourcesharing:RequestedAllowExternalTargets', 'validationType' => 'always'], + ['conditionKey' => 'resourcesharing:Target', 'validationType' => 'always'], + ['conditionKey' => 'resourcesharing:RequestedResourceType'], + ['conditionKey' => 'resourcesharing:ResourceArn'], + ], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'MissingParameter.PermissionName', - 'errorMessage' => 'You must specify PermissionName.', - ], - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType is invalid.', + [ + 'apiName' => 'DisassociateResourceShare', + 'description' => '移除共享资源或资源使用者', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:DisassociateResourceShare', + 'authLevel' => 'operate', + 'actionConditions' => [ + ['conditionKey' => 'resourcesharing:RequestedResourceType'], + ['conditionKey' => 'resourcesharing:ResourceArn'], ], - [ - 'errorCode' => 'InvalidParameter.MaxResults', - 'errorMessage' => 'The MaxResults is invalid.', + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], - [ - 'errorCode' => 'InvalidParameter.NextToken', - 'errorMessage' => 'The NextToken is invalid.', + ], + ], + [ + 'apiName' => 'RejectResourceShareInvitation', + 'description' => '拒绝资源共享邀请', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:RejectResourceShareInvitation', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], - [ - 'errorCode' => 'InvalidParameter.NextToken.Length', - 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', + ], + ], + [ + 'apiName' => 'ListResourceShares', + 'description' => '查询共享单元列表', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListResourceShares', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"04677DCA-7C33-464B-8811-1B1DA3C3D197\\",\\n \\"Permissions\\": [\\n {\\n \\"PermissionName\\": \\"AliyunRSDefaultPermissionVSwitch\\",\\n \\"PermissionVersion\\": \\"v1\\",\\n \\"DefaultVersion\\": true,\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"UpdateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"DefaultPermission\\": true\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListPermissionVersionsResponse>\\n <NextToken>TGlzdFJlc291cm****</NextToken>\\n <RequestId>04677DCA-7C33-464B-8811-1B1DA3C3D197</RequestId>\\n <Permissions>\\n <PermissionName>AliyunRSDefaultPermissionVSwitch</PermissionName>\\n <PermissionVersion>v1</PermissionVersion>\\n <DefaultVersion>true</DefaultVersion>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:01.818Z</UpdateTime>\\n <ResourceType>VSwitch</ResourceType>\\n <DefaultPermission>true</DefaultPermission>\\n </Permissions>\\n</ListPermissionVersionsResponse>","errorExample":""}]', - 'title' => '查询共享权限的版本信息', - 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询共享权限名称为`AliyunRSDefaultPermissionVSwitch`的版本信息。', - ], - 'ListPermissions' => [ - 'summary' => '调用ListPermissions查询默认共享权限信息。', - 'methods' => [ - 'post', - 'get', + [ + 'apiName' => 'ListPermissions', + 'description' => '查询默认共享权限信息', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListPermissions', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'ListResourceShareAssociations', + 'description' => '查询关联资源或资源使用者', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListResourceShareAssociations', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'AcceptResourceShareInvitation', + 'description' => '接受资源共享邀请', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:AcceptResourceShareInvitation', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'ListResourceShareInvitations', + 'description' => '查询收到的资源共享邀请信息', 'operationType' => 'list', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], - 'parameters' => [ - [ - 'name' => 'ResourceType', - 'in' => 'query', - 'schema' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'required' => false, - 'example' => 'VSwitch', + 'ramAction' => [ + 'action' => 'resourcesharing:ListResourceShareInvitations', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'MaxResults', - 'in' => 'query', - 'schema' => [ - 'description' => '单次请求返回结果的最大条数。'."\n" - ."\n" - .'取值范围:1~100。默认值:20。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '20', + ], + [ + 'apiName' => 'ListPermissionVersions', + 'description' => '查询共享权限的版本信息', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListPermissionVersions', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'NextToken', - 'in' => 'query', - 'schema' => [ - 'description' => '当请求的返回结果被截断时,您可以使用`NextToken`再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'required' => false, - 'example' => 'TGlzdFJlc291cm****', + ], + [ + 'apiName' => 'AssociateResourceShare', + 'description' => '关联共享资源或资源使用者', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:AssociateResourceShare', + 'authLevel' => 'operate', + 'actionConditions' => [ + ['conditionKey' => 'resourcesharing:Target', 'validationType' => 'always'], + ['conditionKey' => 'resourcesharing:RequestedResourceType'], + ['conditionKey' => 'resourcesharing:ResourceArn'], + ], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'description' => '返回参数。', - 'type' => 'object', - 'properties' => [ - 'NextToken' => [ - 'description' => '当请求的返回结果被截断时,您可以使用NextToken再次发起请求,获取从当前截断位置之后的内容。', - 'type' => 'string', - 'example' => 'TGlzdFJlc291cm****', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '04677DCA-7C33-464B-8811-1B1DA3C3D197', - ], - 'Permissions' => [ - 'description' => '共享权限信息。', - 'type' => 'array', - 'items' => [ - 'description' => '共享权限信息。', - 'type' => 'object', - 'properties' => [ - 'PermissionName' => [ - 'description' => '共享权限名称。', - 'type' => 'string', - 'example' => 'AliyunRSDefaultPermissionVSwitch', - ], - 'PermissionVersion' => [ - 'description' => '共享权限版本。', - 'type' => 'string', - 'example' => 'v1', - ], - 'DefaultVersion' => [ - 'description' => '共享权限是否为默认版本。取值:'."\n" - ."\n" - .'- false:不是默认版本。'."\n" - ."\n" - .'- true:是默认版本。', - 'type' => 'boolean', - 'example' => 'true', - ], - 'CreateTime' => [ - 'description' => '创建时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:01.818Z', - ], - 'UpdateTime' => [ - 'description' => '更新时间。', - 'type' => 'string', - 'example' => '2020-12-07T07:39:01.818Z', - ], - 'ResourceType' => [ - 'description' => '共享资源类型。'."\n" - ."\n" - .'支持共享的资源类型,请参见[支持资源共享的云服务](~~450526~~)。', - 'type' => 'string', - 'example' => 'VSwitch', - ], - 'DefaultPermission' => [ - 'description' => '是否为默认权限。取值:'."\n" - ."\n" - .'- false:不是默认权限。'."\n" - ."\n" - .'- true:是默认权限。', - 'type' => 'boolean', - 'example' => 'true', - ], - ], - ], - ], - ], + [ + 'apiName' => 'ListResourceSharePermissions', + 'description' => '查询共享单元中关联权限的记录', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListResourceSharePermissions', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'InvalidParameter.ResourceType', - 'errorMessage' => 'The ResourceType is invalid.', + [ + 'apiName' => 'UpdateResourceShare', + 'description' => '修改共享单元名称', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:UpdateResourceShare', + 'authLevel' => 'operate', + 'actionConditions' => [ + ['conditionKey' => 'resourcesharing:RequestedAllowExternalTargets', 'validationType' => 'always'], ], - [ - 'errorCode' => 'InvalidParameter.MaxResults', - 'errorMessage' => 'The MaxResults is invalid.', + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], - [ - 'errorCode' => 'InvalidParameter.NextToken', - 'errorMessage' => 'The NextToken is invalid.', + ], + ], + [ + 'apiName' => 'TagResources', + 'description' => '为共享单元绑定标签', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:TagResources', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => 'ResourceShare', 'arn' => 'acs:resourcesharing:{#regionId}:{#accountId}:resourceshare/{#ResourceShareId}'], ], - [ - 'errorCode' => 'InvalidParameter.NextToken.Length', - 'errorMessage' => 'The maximum length of NextToken exceeds 256 characters.', + ], + ], + [ + 'apiName' => 'ListTagResources', + 'description' => '查询共享单元绑定的标签', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'resourcesharing:ListTagResources', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'EnableSharingWithResourceDirectory', + 'description' => '启用资源目录组织共享', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'resourcesharing:EnableSharingWithResourceDirectory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'ResourceManager', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"NextToken\\": \\"TGlzdFJlc291cm****\\",\\n \\"RequestId\\": \\"04677DCA-7C33-464B-8811-1B1DA3C3D197\\",\\n \\"Permissions\\": [\\n {\\n \\"PermissionName\\": \\"AliyunRSDefaultPermissionVSwitch\\",\\n \\"PermissionVersion\\": \\"v1\\",\\n \\"DefaultVersion\\": true,\\n \\"CreateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"UpdateTime\\": \\"2020-12-07T07:39:01.818Z\\",\\n \\"ResourceType\\": \\"VSwitch\\",\\n \\"DefaultPermission\\": true\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"<ListPermissionsResponse>\\n <NextToken>TGlzdFJlc291cm****</NextToken>\\n <RequestId>04677DCA-7C33-464B-8811-1B1DA3C3D197</RequestId>\\n <Permissions>\\n <PermissionName>AliyunRSDefaultPermissionVSwitch</PermissionName>\\n <PermissionVersion>v1</PermissionVersion>\\n <DefaultVersion>true</DefaultVersion>\\n <CreateTime>2020-12-07T07:39:01.818Z</CreateTime>\\n <UpdateTime>2020-12-07T07:39:01.818Z</UpdateTime>\\n <ResourceType>VSwitch</ResourceType>\\n <DefaultPermission>true</DefaultPermission>\\n </Permissions>\\n</ListPermissionsResponse>","errorExample":""}]', - 'title' => '查询默认共享权限信息', - 'description' => '本文将提供一个示例,在`cn-hangzhou`地域,查询资源类型为`VSwitch`的默认共享权限信息。', - ], - ], - 'endpoints' => [ - [ - 'regionId' => 'us-east-1', - 'endpoint' => 'resourcesharing.us-east-1.aliyuncs.com', - ], - [ - 'regionId' => 'cn-qingdao', - 'endpoint' => 'resourcesharing.cn-qingdao.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing', - 'endpoint' => 'resourcesharing.cn-beijing.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangjiakou', - 'endpoint' => 'resourcesharing.cn-zhangjiakou.aliyuncs.com', - ], - [ - 'regionId' => 'cn-huhehaote', - 'endpoint' => 'resourcesharing.cn-huhehaote.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou', - 'endpoint' => 'resourcesharing.cn-hangzhou.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai', - 'endpoint' => 'resourcesharing.cn-shanghai.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen', - 'endpoint' => 'resourcesharing.cn-shenzhen.aliyuncs.com', - ], - [ - 'regionId' => 'cn-heyuan', - 'endpoint' => 'resourcesharing.cn-heyuan.aliyuncs.com', - ], - [ - 'regionId' => 'cn-guangzhou', - 'endpoint' => 'resourcesharing.cn-guangzhou.aliyuncs.com', - ], - [ - 'regionId' => 'cn-chengdu', - 'endpoint' => 'resourcesharing.cn-chengdu.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hongkong', - 'endpoint' => 'resourcesharing.cn-hongkong.aliyuncs.com', - ], - [ - 'regionId' => 'ap-northeast-1', - 'endpoint' => 'resourcesharing.ap-northeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-northeast-2', - 'endpoint' => 'resourcesharing.ap-northeast-2.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-1', - 'endpoint' => 'resourcesharing.ap-southeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-3', - 'endpoint' => 'resourcesharing.ap-southeast-3.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-5', - 'endpoint' => 'resourcesharing.ap-southeast-5.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-6', - 'endpoint' => 'resourcesharing.ap-southeast-6.aliyuncs.com', - ], - [ - 'regionId' => 'us-west-1', - 'endpoint' => 'resourcesharing.us-west-1.aliyuncs.com', - ], - [ - 'regionId' => 'eu-west-1', - 'endpoint' => 'resourcesharing.eu-west-1.aliyuncs.com', - ], - [ - 'regionId' => 'eu-central-1', - 'endpoint' => 'resourcesharing.eu-central-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-7', - 'endpoint' => 'resourcesharing.ap-southeast-7.aliyuncs.com', - ], - [ - 'regionId' => 'cn-wulanchabu', - 'endpoint' => 'resourcesharing.cn-wulanchabu.aliyuncs.com', - ], - [ - 'regionId' => 'cn-wuhan-lr', - 'endpoint' => 'resourcesharing.cn-wuhan-lr.aliyuncs.com', - ], - [ - 'regionId' => 'me-central-1', - 'endpoint' => 'resourcesharing.me-central-1.aliyuncs.com', ], - [ - 'regionId' => 'cn-heyuan-acdr-1', - 'endpoint' => 'resourcesharing.cn-heyuan-acdr-1.aliyuncs.com', + 'resourceTypes' => [ + ['validationType' => 'always', 'resourceType' => 'ResourceShare', 'arn' => 'acs:resourcesharing:{#regionId}:{#accountId}:resourceshare/{#ResourceShareId}'], + ['validationType' => 'always', 'resourceType' => 'ResourceSharePermission', 'arn' => 'acs:resourcesharing:{#regionId}:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'ResourceShare', 'arn' => 'acs:resourcesharing:{#regionId}:{#accountId}:resourceshare/*'], ], ], ]; |
