日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

CreateResourceShare - 創(chuàng)建共享單元

創(chuàng)建共享單元。

接口說明

阿里云資源共享(Resource Sharing)支持將一個賬號下的指定資源共享給一個或多個目標(biāo)賬號使用。更多信息,請參見資源共享概述。

本文將提供一個示例,在cn-hangzhou地域,使用資源目錄管理賬號創(chuàng)建一個名為test的共享單元,將 VPC 交換機vsw-bp183p93qs667muql****共享給資源目錄內(nèi)的成員172050525300****。

調(diào)試

您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。

授權(quán)信息

下表是API對應(yīng)的授權(quán)信息,可以在RAM權(quán)限策略語句的Action元素中使用,用來給RAM用戶或RAM角色授予調(diào)用此API的權(quán)限。具體說明如下:

  • 操作:是指具體的權(quán)限點。
  • 訪問級別:是指每個操作的訪問級別,取值為寫入(Write)、讀?。≧ead)或列出(List)。
  • 資源類型:是指操作中支持授權(quán)的資源類型。具體說明如下:
    • 對于必選的資源類型,用背景高亮的方式表示。
    • 對于不支持資源級授權(quán)的操作,用全部資源表示。
  • 條件關(guān)鍵字:是指云產(chǎn)品自身定義的條件關(guān)鍵字。
  • 關(guān)聯(lián)操作:是指成功執(zhí)行操作所需要的其他權(quán)限。操作者必須同時具備關(guān)聯(lián)操作的權(quán)限,操作才能成功。
操作訪問級別資源類型條件關(guān)鍵字關(guān)聯(lián)操作
resourcesharing:CreateResourceShareWrite
  • 全部資源
    *
  • resourcesharing:RequestedAllowExternalTargets
  • resourcesharing:Target
  • resourcesharing:RequestedResourceType

請求參數(shù)

名稱類型必填描述示例值
ResourceShareNamestring

共享單元名稱。

長度范圍:1~50 個字符。

格式:允許輸入英文字母、數(shù)字、中文、半角句號(.)、下劃線(_)或短劃線(-)。

test
Resourcesobject []

共享資源列表。

ResourceTypestring

共享資源類型。

N 的取值范圍:1~5,即每次最多添加 5 個共享資源。

支持共享的資源類型,請參見支持資源共享的云服務(wù)

說明 Resources.N.ResourceIdResources.N.ResourceType成對出現(xiàn),需要同時設(shè)置。
VSwitch
ResourceIdstring

共享資源 ID。

N 的取值范圍:1~5,即每次最多添加 5 個共享資源。

說明 Resources.N.ResourceIdResources.N.ResourceType成對出現(xiàn),需要同時設(shè)置。
vsw-bp183p93qs667muql****
Targetsarray

資源使用者。

string

資源使用者。取值:

  • 當(dāng)AllowExternalTargetsfalse時,資源使用者可以為資源目錄 ID、資源夾 ID 或成員 ID。
  • 當(dāng)AllowExternalTargetstrue時,資源使用者可以為阿里云賬號 ID、資源目錄 ID、資源夾 ID、成員 ID 或阿里云服務(wù)。

更多信息,請參見資源共享方式、查看資源目錄 ID、查看資源夾 ID查看成員 ID。

N 的取值范圍:1~5,即每次最多添加 5 個資源使用者。

172050525300****
PermissionNamesarray

共享權(quán)限名稱。為空時,系統(tǒng)自動綁定資源類型關(guān)聯(lián)的默認權(quán)限。具體信息,請參見權(quán)限庫。

string

共享權(quán)限名稱。為空時,系統(tǒng)自動綁定資源類型關(guān)聯(lián)的默認權(quán)限。具體信息,請參見權(quán)限庫。

AliyunRSDefaultPermissionVSwitch
AllowExternalTargetsboolean

是否允許共享給資源目錄外的賬號。取值:

  • false(默認值):僅允許資源目錄內(nèi)共享。
  • true:允許共享給任意賬號。
false
TargetPropertiesobject []

資源使用者屬性。

說明 僅當(dāng)資源使用者為阿里云服務(wù)時可以設(shè)置該參數(shù)。
TargetIdstring

資源使用者 ID。

說明 TargetProperties.N.TargetIdTargetProperties.N.Property成對出現(xiàn),需要同時設(shè)置。
172050525300****
Propertystring

資源使用者屬性參數(shù)。例如:您可以設(shè)置資源共享的時間段。timeRangeType取值:

  • timeRange:指定時間段。
  • day:全天。
說明 TargetProperties.N.TargetIdTargetProperties.N.Property成對出現(xiàn),需要同時設(shè)置。
{ "timeRange":{ "timeRangeType":"timeRange", "beginAtTime":"00:00", "timezone":"UTC+8", "endAtTime":"19:59" } }

返回參數(shù)

名稱類型描述示例值
object

返回參數(shù)。

RequestIdstring

請求 ID。

2C3FA051-61DC-4F3E-81E9-E4830524DF4B
ResourceShareobject

共享單元信息。

UpdateTimestring

共享單元更新時間。

2020-12-03T08:02:22.413Z
ResourceShareNamestring

共享單元名稱。

test
ResourceShareOwnerstring

共享單元歸屬者。

151266687691****
CreateTimestring

共享單元創(chuàng)建時間。

2020-12-03T08:02:22.413Z
ResourceShareIdstring

共享單元 ID。

rs-qSkW1HBY****
ResourceShareStatusstring

共享單元狀態(tài)。取值:

  • Active:已啟用。
  • Pending:待確認。
  • Deleting:刪除中。
  • Deleted:已刪除。
說明 Deleted 狀態(tài)的共享單元記錄,會在 48~96 小時內(nèi)被系統(tǒng)自動刪除。
Active
AllowExternalTargetsboolean

是否允許共享給資源目錄外的賬號。取值:

  • false:僅允許資源目錄內(nèi)共享。
  • true:允許共享給任意賬號。
false

示例

正常返回示例

JSON格式

{
  "RequestId": "2C3FA051-61DC-4F3E-81E9-E4830524DF4B",
  "ResourceShare": {
    "UpdateTime": "2020-12-03T08:02:22.413Z",
    "ResourceShareName": "test",
    "ResourceShareOwner": "151266687691****",
    "CreateTime": "2020-12-03T08:02:22.413Z",
    "ResourceShareId": "rs-qSkW1HBY****",
    "ResourceShareStatus": "Active",
    "AllowExternalTargets": false
  }
}

錯誤碼

HTTP status code錯誤碼錯誤信息描述
400InvalidParameter.ResourceShareNameThe ResourceShareName is invalid.共享單元名稱無效。
400InvalidParameter.ResourceShareName.LengthThe maximum length of ResourceShareName exceeds 50 characters.共享單元名稱字數(shù)超長(最大50字符)。
400InvalidParameter.ResourcesThe Resources is invalid.選定的共享資源無效。
400InvalidParameter.Resources.DuplicateThe Resources contains duplicate values.選定的共享資源有重復(fù)項。
400InvalidParameter.Resources.LengthThe maximum number of Resources exceeds 5.選定的共享資源數(shù)量超限(最大5個)。
400InvalidParameter.TargetsThe Targets is invalid.資源使用者的參數(shù)不符合規(guī)則。
400InvalidParameter.Targets.DuplicateThe Targets contains duplicate values.資源使用者有重復(fù)項。
400InvalidParameter.Targets.LengthThe maximum number of Targets exceeds 5.資源使用者數(shù)量超限(最大5個)。
400InvalidTargetThe shared target does not exist in the resource directory.資源使用者不在資源目錄內(nèi)。
400InvalidParameterThe specified parameter is invalid.參數(shù)無效。
400MissingParameter.ResourceShareNameYou must specify ResourceShareName.共享單元名稱缺失。
400InvalidParameter.ResourceTypeThe ResourceType is invalid.傳入的資源類型錯誤。
400InvalidParameter.PermissionNames.DuplicateThe PermissionNames duplicate values.參數(shù)PermissionNames重復(fù)。
400InvalidParameter.PermissionNames.LengthThe maximum length of PermissionNames exceeds quota limit.PermissionNames長度超限。
400InvalidParameter.TargetPropertiesThe TargetProperties is invalid.TargetProperties參數(shù)無效。
400InvalidParameter.TargetProperties.DuplicateThe TargetProperties contains duplicate values.TargetProperties包含重復(fù)的參數(shù)。
400InvalidParameter.TargetProperties.LengthThe TargetProperties beyond the length limit.TargetProperties數(shù)量超過限制。
404EntityNotExists.PermissionThe resource share permission does not exist.共享權(quán)限不存在。
409NotEnableSharingWithResourceDirectoryYou have not enabled sharing with your Resource Directory.未開啟與資源目錄組織的共享。
409AccountNotInResourceDirectoryThe account is not a master or a member of a resource directory.資源使用者不在資源目錄內(nèi)。
409QuotaExceeded.ResourceShare.CountThe maximum number of ResourceShare exceeds the limit.共享單元數(shù)量超出限制。
409EntityAlreadyExists.ResourceShareThe specified resource share ID already exists.共享單元ID已存在。
409QuotaExceeded.SharedResource.CountThe maximum number of shared resources per account exceeds the limit.共享的資源超出單個賬號最大限制。
409ShareWithYourselfYou cannot share resources with yourself.資源使用者不能是自己。
409NotManagementAccountOnly the management account of the service is allowed to share such resources.當(dāng)前資源類型僅支持資源目錄的管理賬號共享資源。如仍需使用當(dāng)前賬號,請聯(lián)系管理賬號將當(dāng)前賬號設(shè)置為當(dāng)前資源類型所屬可信服務(wù)的委派管理員賬號。
409QuotaExceeded.PendingInvitationsThe maximum number of pending invitations exceeds the limit.邀請數(shù)量超出限制。
409InvalidTarget.LegalEntityMismatchThe target account does not have the same legal entity as the resource owner account.共享目標(biāo)賬號的企業(yè)名稱與共享者不一致。
409ExternalTargetsNotAllowed.ResourceTypeThe resource share includes resource types that cannot be shared with accounts outside the resource directory.共享單元中包含不支持組織外共享的資源類型。
409InvalidTarget.SiteMismatchCross-site resource sharing is not supported.共享目標(biāo)賬號與共享者站點不一致。
409NotSupport.Service.ExistInOtherResourceShareThe resource type has been shared to the target service through other resourceShare. Please share it in the same resourceShare.此資源類型已經(jīng)通過其他共享單元共享給目標(biāo)云服務(wù),請在同一個共享單元中共享。
409NotSupport.Service.AssociateConflictThe same resource cannot be shared repeatedly to the target service.同一個資源不允許重復(fù)共享給目標(biāo)云服務(wù)。

訪問錯誤中心查看更多錯誤碼。

變更歷史

變更時間變更內(nèi)容概要操作
2024-01-23OpenAPI 錯誤碼發(fā)生變更、OpenAPI 入?yún)l(fā)生變更看變更集
變更項變更內(nèi)容
錯誤碼OpenAPI 錯誤碼發(fā)生變更。
    刪除錯誤碼:400
    刪除錯誤碼:404
    刪除錯誤碼:409
入?yún)?/span>OpenAPI 入?yún)l(fā)生變更
    新增入?yún)ⅲ篢argetProperties
2024-01-03OpenAPI 錯誤碼發(fā)生變更看變更集
變更項變更內(nèi)容
錯誤碼OpenAPI 錯誤碼發(fā)生變更
    錯誤碼 400 變更
    錯誤碼 409 變更
    刪除錯誤碼:404
2023-04-07OpenAPI 錯誤碼發(fā)生變更看變更集
變更項變更內(nèi)容
錯誤碼OpenAPI 錯誤碼發(fā)生變更。
    錯誤碼 409 變更
    刪除錯誤碼:400
    刪除錯誤碼:404
2023-04-07OpenAPI 錯誤碼發(fā)生變更看變更集
變更項變更內(nèi)容
錯誤碼OpenAPI 錯誤碼發(fā)生變更。
    錯誤碼 409 變更
    刪除錯誤碼:400
    刪除錯誤碼:404
2023-04-03OpenAPI 錯誤碼發(fā)生變更、OpenAPI 入?yún)l(fā)生變更看變更集
變更項變更內(nèi)容
錯誤碼OpenAPI 錯誤碼發(fā)生變更
    刪除錯誤碼:400
    刪除錯誤碼:404
    刪除錯誤碼:409
入?yún)?/span>OpenAPI 入?yún)l(fā)生變更
    刪除入?yún)ⅲ篟esourceGroupId
2023-03-02OpenAPI 描述信息更新、OpenAPI 錯誤碼發(fā)生變更、OpenAPI 入?yún)l(fā)生變更看變更集
變更項變更內(nèi)容
API 描述OpenAPI 描述信息更新
錯誤碼OpenAPI 錯誤碼發(fā)生變更
    刪除錯誤碼:400
    刪除錯誤碼:404
    刪除錯誤碼:409
入?yún)?/span>OpenAPI 入?yún)l(fā)生變更。
    新增入?yún)ⅲ篟esourceGroupId