华为云用户手册

  • 响应示例 状态码: 200 Successful. { "accounts" : [ { "id" : "05261f923e80d3890f33c0056e9b3f80", "urn" : "organizations::0a6d25d23900d45c0faac010e0fb4de0:account:o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv/05261f923e80d3890f33c0056e9b3f80", "join_method" : "invited", "joined_at" : "2022-08-24T06:41:15Z", "name" : "paas_iam_573331", "status" : "active" } ], "page_info" : { "next_marker" : "ou-taowxgy4xbme6m4x3c2iijbxw7yj8fcw", "current_count" : 100 } }
  • URI GET /v1/organizations/accounts 表1 Query参数 参数 是否必选 参数类型 描述 parent_id 否 String 父节点(根或组织单元)的唯一标识符(ID)。 最大长度:100 limit 否 Integer 页面中最大结果数量。 最小值:1 最大值:2000 缺省值:200 marker 否 String 分页标记。 最小长度:4 最大长度:400
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 accounts Array of AccountDto objects 组织中的账号列表。 page_info PageInfoDto object 分页信息 表4 AccountDto 参数 参数类型 描述 id String 账号的唯一标识符(ID)。 最大长度:36 urn String 账号的统一资源名称。 最小长度:1 最大长度:1500 join_method String 账号加入组织的方式。invited:邀请加入,created:创建加入。 最小长度:1 最大长度:64 status String 账号当前的状态。active:有效; suspended:已关闭; pending_closure:关闭中。 最小长度:1 最大长度:64 joined_at String 账号加入组织的日期。 name String 账号名称 最大长度:64 表5 PageInfoDto 参数 参数类型 描述 next_marker String 如果存在,则表示可用的输出比当前响应中包含的输出多。在对操作的后续调用中,在标签请求参数中使用此值,以获取输出的下一部分。您应该重复此操作,直到next_marker响应元素返回为null。 current_count Integer 本页返回条目数量 最小值:1 最大值:2000
  • 响应示例 状态码: 200 Successful. { "attached_entities" : [ { "name" : "paas_iam_573331", "id" : "05261f923e80d3890f33c0056e9b3f80", "type" : "account" } ], "page_info" : { "next_marker" : "ou-taowxgy4xbme6m4x3c2iijbxw7yj8fcw", "current_count" : 100 } }
  • URI GET /v1/organizations/policies/{policy_id}/attached-entities 表1 路径参数 参数 是否必选 参数类型 描述 policy_id 是 String 策略的唯一标识符(ID)。 最大长度:130 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 页面中最大结果数量。 最小值:1 最大值:2000 缺省值:200 marker 否 String 分页标记。 最小长度:4 最大长度:400
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 attached_entities Array of EntityDto objects 结构列表,每个结构都包含有关指定策略附加到的实体的详细信息。 page_info PageInfoDto object 分页信息 表5 EntityDto 参数 参数类型 描述 name String 实体的名称。 最小长度:1 最大长度:64 id String 实体的唯一标识符(ID)。 最大长度:100 type String 实体的类型。account:账号;organizational_unit:组织单元;root:根。 最小长度:1 最大长度:64 表6 PageInfoDto 参数 参数类型 描述 next_marker String 如果存在,则表示可用的输出比当前响应中包含的输出多。在对操作的后续调用中,在标签请求参数中使用此值,以获取输出的下一部分。您应该重复此操作,直到next_marker响应元素返回为null。 current_count Integer 本页返回条目数量 最小值:1 最大值:2000
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 quotas QuotasResourcesDto object 组织配额的响应体。 表3 QuotasResourcesDto 参数 参数类型 描述 resources Array of QuotaDto objects 配额信息。 表4 QuotaDto 参数 参数类型 描述 type String 配额类型。account:账号;organizational_unit:组织单元;policy:策略。 最小长度:1 最大长度:64 quota Integer 配额数量。 min Integer 最小配额。 max Integer 最大配额。 used Integer 已使用数量。
  • 响应示例 状态码: 200 Successful. { "account" : { "id" : "05261f923e80d3890f33c0056e9b3f80", "urn" : "organizations::0a6d25d23900d45c0faac010e0fb4de0:account:o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv/05261f923e80d3890f33c0056e9b3f80", "join_method" : "invited", "status" : "active", "joined_at" : "2022-08-24T06:41:15Z", "name" : "paas_iam_573331" } }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 account AccountDto object 包含组织成员的账号的有关信息。 表4 AccountDto 参数 参数类型 描述 id String 账号的唯一标识符(ID)。 最大长度:36 urn String 账号的统一资源名称。 最小长度:1 最大长度:1500 join_method String 账号加入组织的方式。invited:邀请加入,created:创建加入。 最小长度:1 最大长度:64 status String 账号当前的状态。active:有效; suspended:已关闭; pending_closure:关闭中。 最小长度:1 最大长度:64 joined_at String 账号加入组织的日期。 name String 账号名称 最大长度:64
  • 基本概念 账号 用户注册时的账号,账号对其所拥有的资源及云服务具有完全的访问权限,可以重置用户密码、分配用户权限等。由于账号是付费主体,为了确保账号安全,建议您不要直接使用账号进行日常管理工作,而是创建用户并使用用户进行日常管理工作。 用户 由账号在 IAM 中创建的用户,是云服务的使用人员,具有身份凭证(密码和访问密钥)。 在我的凭证下,您可以查看账号ID和IAM用户ID。通常在调用API的鉴权过程中,您需要用到账号、用户和密码等信息。 区域(Region) 指云资源所在的物理位置,同一区域内可用区间内网互通,不同区域间内网不互通。通过在不同地区创建云资源,可以将应用程序设计的更接近特定客户的要求,或满足不同地区的法律或其他要求。 从地理位置和网络时延维度划分,同一个Region内共享弹性计算、块存储、对象存储、VPC网络、弹性公网IP、镜像等公共服务。Region分为通用Region和专属Region,通用Region指面向公共租户提供通用云服务的Region;专属Region指只承载同一类业务或只面向特定租户提供业务服务的专用Region。 详情请参见区域和可用区。 可用区(AZ,Availability Zone) 一个可用区是一个或多个物理数据中心的集合,有独立的风火水电,AZ内逻辑上再将计算、网络、存储等资源划分成多个集群。一个Region中的多个AZ间通过高速光纤相连,以满足用户跨AZ构建高可用性系统的需求。 项目 区域默认对应一个项目,这个项目由系统预置,用来隔离物理区域间的资源(计算资源、存储资源和网络资源),以默认项目为单位进行授权,用户可以访问您账号中该区域的所有资源。如果您希望进行更加精细的权限控制,可以在区域默认的项目中创建子项目,并在子项目中创建资源,然后以子项目为单位进行授权,使得用户仅能访问特定子项目中的资源,使得资源的权限控制更加精确。 图1 项目隔离模型 同样在我的凭证下,您可以查看项目ID。 企业项目 企业项目是项目的升级版,针对企业不同项目间的资源进行分组和管理,是逻辑隔离。企业项目中可以包含多个区域的资源,且项目中的资源可以迁入迁出。 关于企业项目ID的获取及企业项目特性的详细信息,请参见《企业管理用户指南》。 父主题: 使用前必读
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 tags Array of TagDto objects 标签列表。 page_info PageInfoDto object 分页信息 表5 TagDto 参数 参数类型 描述 key String 标签键的密钥标识符或名称。 最小长度:1 最大长度:128 value String 与标签键关联的字符串值。您可以将标签的值设置为空字符串,但不能将标签的值设置为NULL。 最小长度:0 最大长度:255 表6 PageInfoDto 参数 参数类型 描述 next_marker String 如果存在,则表示可用的输出比当前响应中包含的输出多。在对操作的后续调用中,在标签请求参数中使用此值,以获取输出的下一部分。您应该重复此操作,直到next_marker响应元素返回为null。 current_count Integer 本页返回条目数量 最小值:1 最大值:2000
  • 响应示例 状态码: 200 Successful. { "tags" : [ { "key" : "auto09230Uv5key", "value" : "auto0923XXFmvalue" } ], "page_info" : { "next_marker" : "ou-taowxgy4xbme6m4x3c2iijbxw7yj8fcw", "current_count" : 100 } }
  • URI GET /v1/organizations/{resource_type}/{resource_id}/tags 表1 路径参数 参数 是否必选 参数类型 描述 resource_type 是 String 资源类型。枚举值:organizations:policies(服务策略)、organizations:ous(组织OU)、organizations:accounts(账号信息) 、organizations:roots:(根)。 枚举值: organizations:policies organizations:ous organizations:accounts organizations:roots resource_id 是 String 根、组织单元、账号或策略的唯一标识符(ID)。 最大长度:130 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 页面中最大结果数量。 最小值:1 最大值:2000 缺省值:200 marker 否 String 分页标记。 最小长度:4 最大长度:400
  • 错误码 当您调用API时,如果遇到“APIGW”开头的错误码,请参见API网关错误码进行处理。 更多服务错误码请参见API错误中心。 状态码 错误码 错误信息 描述 处理措施 401 Organizations.1001 this operation can be called only from the management account of an organization. 权限校验失败 请检查是否是组织的管理账号调用。 401 Organizations.1002 this operation can be called only from the management account of an organization or by a member account that is a delegated administrator for an service. 权限校验失败 请检查是否是组织的管理账号或委托管理员账号调用。 409 Organizations.1003 concurrent modification. 并发修改 请稍后重试。 400 Organizations.1004 bad request for generate organizations service management token. 生成组织管理员token请求错误 请稍后重试,如果再次失败请联系管理员。 400 Organizations.1005 bad request for query cbc em info. 查询企业多账号请求失败 请确认是否是企业多账号的主账号或子账号。 400 Organizations.1006 bad request for generate assume-role token. 升级权限失败 请稍后重试,如果再次失败请联系管理员。 403 Organizations.1007 Policy doesn't allow '{0}' to be performed. 细粒度鉴权失败 请检查用户有接口访问权限。 400 Organizations.1008 bad request for checking permission. 细粒度鉴权请求错误 请联系管理员。 400 Organizations.1009 bad request for impersonate. 切换角色请求错误 请联系管理员。 404 Organizations.1010 not found for http header. 请求头不存在 请检查是否满足调用接口所需的全部请求头。 400 Organizations.1011 bad request for invalid user profile. 无效用户配置文件的错误请求 请联系管理员。 400 Organizations.1012 bad request for invalid context attributes. 对无效上下文属性的错误请求 请联系管理员。 400 Organizations.1013 bad request for invalid marker. marker参数非法 请检查marker参数是否合法传入。 400 Organizations.1014 bad request for request proof. proof请求头非法 请检查proof请求头是否合法传入。 401 Organizations.1015 this operation can be called from any account in the organization. 权限校验失败 请检查是否是组织的成员账号调用。 400 Organizations.1016 bad request for domain tags. 获取账号标签失败 请联系管理员。 400 Organizations.1017 bad request for get projects. 获取账号的项目信息失败 请联系管理员。 401 Organizations.1018 this operation can be called only from the organization''s member account. 权限校验失败 请检查是否是组织的普通成员账号调用。 400 Organizations.1019 bad request for query iam domain info. 获取用户信息失败 请联系管理员。 400 Organizations.1020 ssl check failed. 证书校验失败 请联系管理员。 400 Organizations.1021 bad request for authorization header pattern. token请求头非法 请检查authorization请求头是否合法传入。 400 Organizations.1022 bad request for query restricted list. 查询受限列表失败 请联系管理员。 400 Organizations.1023 bad request for query frozen list. 查询冻结列表失败 请联系管理员。 404 Organizations.1100 not found for organization. 组织不存在 请检查账号是否开通组织服务。 409 Organizations.1101 conflict for create organization, this account is already a member of an organization. 创建组织发生冲突 请检查账号是否已经开通组织服务。 400 Organizations.1102 deletes the organization, you must first remove all member accounts and all organizational units and all policies. 删除组织失败 请检查是否已经移除所有的成员账号、组织单元以及策略。 400 Organizations.1103 can not create organization, only for primary account of EM. 无法创建组织,仅适用于EM的主账号 请检查是否是企业主子账号的主账号。 403 Organizations.1104 the current operation has been restricted. 操作被受限,不允许访问 请检查账号是否被受限。 403 Organizations.1105 the current operation has been frozen. 操作被冻结,不允许访问 请检查账号是否被冻结。 404 Organizations.1200 not found for organizational unit. 组织单元不存在 请检查该组织单元是否存在。 404 Organizations.1201 not found for a root or organizational unit with the ParentId. 根据ParentId没有找到root节点或组织单元 请检查该ParentId是否存在。 400 Organizations.1202 the organizational unit is not empty. 组织单元非空 请检查该组织单元是否清空,包括该组织单元下的账号及子组织单元。 400 Organizations.1203 quota exceeded for an organizational unit tree level. 超过组织单元最大的树深度配额 请检查是否超过组织单元最大的树深度配额。 400 Organizations.1204 quota exceeded for organizational unit. 超过可以创建的组织单元配额 请检查是否超过可以创建的组织单元配额。 409 Organizations.1205 conflict for organizational unit, an organizational unit names must be unique within a parent. 组织单元名称不唯一 请检查组织单元名称是否在父节点下唯一。 404 Organizations.1300 not found for account. 账号不存在 请检查该账号是否存在。 404 Organizations.1301 not found for create account status. 创建账号状态不存在 请检查传入的create_account_status_id是否正确。 400 Organizations.1302 bad request for wrong source parent id. source_parent_id错误 请检查传入的source_parent_id是否正确。 400 Organizations.1303 bad request for wrong destination parent id. destination_parent_id错误 请检查传入的destination_parent_id是否正确。 400 Organizations.1304 the management account of the organization or the organization administrator could not leave organization. 组织的管理账号或管理员账号不能离开组织 请检查离开组织的账号是否是组织的管理账号或管理员账号。 400 Organizations.1305 quota exceeded for account. 组织中的账号超出配额 请检查组织中的账号是否超出配额。 409 Organizations.1306 this account is already a member of an organization. An account can belong to only one organization at a time. 该账号已经是组织中的成员 请检查该账号是否已经是组织中的成员。 409 Organizations.1307 this account is already invited. 该账号已经被邀请 请检查该账号是否已经被邀请。 400 Organizations.1308 can not invite account, only for sub-account of EM. 不能邀请账号,仅适用于EM的子账号 请检查是否是组织管理员所在企业主子账号的子账号。 400 Organizations.1309 This account cannot be invited because it is at a site different from your organization. 不能邀请该账号,因为该账号与当前组织不在同一站点 请检查主账号和被邀请账号是否在同一站点。 400 Organizations.1310 This account cannot be invited because its type is currently not supported. 不能邀请该账号,暂不支持邀请该账号类型 请检查账号类型是否为普通账号。 404 Organizations.1400 not found for handshake. handshake不存在 请检查handshake是否正确。 400 Organizations.1401 bad request for wrong handshake status, this operation can only be applied to a pending handshake. handshake状态不正确,该操作只能在handshake为pending时执行 请检查handshake的状态是否正确。 400 Organizations.1402 quota exceeded for cancelled handshake per day. 超出每天取消handshake的配额 请检查是否超出每天取消handshake的配额。 404 Organizations.1500 not found for delegated administrator. 委托管理员不存在 请检查委托管理员是否存在。 409 Organizations.1501 conflict for delegated administrator. 委托管理员冲突 请检查委托管理员是否存在。 404 Organizations.1600 not found for policy. 策略不存在 请检查该策略是否存在。 404 Organizations.1601 not found for policy attachment. 策略绑定关系不存在 请检查该策略的绑定关系。 404 Organizations.1602 not found for policy attachment entity. 策略需要绑定的实体不存在 请检查该策略需要绑定的实体是否存在。 409 Organizations.1603 conflict for policy attachment. 绑定策略冲突 请检查该策略在该实体上是否已经存在绑定。 400 Organizations.1604 bad request for existing policy attachment. 该策略不存在绑定的实体 请检查该策略是否存在绑定的实体。 400 Organizations.1605 bad request for modify builtin policy. 内置策略不允许修改 请检查进行操作的策略是否是内置策略。 400 Organizations.1606 quota exceeded for policy. 超出创建策略的配额 请检查是否达到策略的配额限制。 400 Organizations.1607 quota exceeded for service control policy per entity. 每一个实体上允许绑定的策略超出配额 请检查该实体上已经绑定的策略是否达到配额限制。 400 Organizations.1608 wrong format for policy content. 策略内容格式错误 请检查策略的内容是否格式错误。 404 Organizations.1609 not found for root. root节点不存在 请检查输入的root节点ID是否正确。 404 Organizations.1610 not found for root policy type. root节点策略类型不存在 请检查输入参数是否正确。 400 Organizations.1611 bad request for wrong root policy type status. root节点策略类型状态错误 请检查输入参数是否正确。 409 Organizations.1612 conflict for policy, policy names must be unique within a organization. 策略名称在同一个组织内不唯一 请检查策略名称在该组织下是否唯一。 400 Organizations.1613 bad request for service control policy disabled. 服务控制策略已经禁止 请检查服务控制策略是否被禁止。 400 Organizations.1614 the last policy not allow detach. 最后一个策略不允许解绑 请检查需要解除绑定的策略是否是该实体的最后一个策略。 400 Organizations.1615 the policy name not allow all space. 策略名称不能全为空白字符 请检查策略名称是否合法。 400 Organizations.1616 policy changes in progress. 策略变更正在进行 请稍后重试。 400 Organizations.1617 scheduler runtime exception. 启用/禁用策略类型失败 请稍后重试。 400 Organizations.1618 not supported policy type. 不支持的策略类型 请检查策略类型是否正确。 400 Organizations.1619 You provided a string parameter that is longer than allowed. 参数长度超出允许范围 请输入最大长度5120内的参数。 404 Organizations.1700 not found for tag. 标签不存在 请检查标签是否存在。 404 Organizations.1701 not found for tag resource. 标签所对应的资源不存在 请检查标签对应的资源是否存在。 409 Organizations.1702 conflict for tag. 标签已经存在 请检查该资源是否已经存在该标签。 400 Organizations.1703 quota exceeded for tag. 标签超出配额 请检查标签是否达到配额限制。 400 Organizations.1800 invalid quota value. 配额值无效 请检查输入的配额值是否正确。 404 Organizations.1900 not found for trusted service. 可信服务不存在 请检查输入的参数是否正确。 409 Organizations.1901 conflict for trusted service. 可信服务冲突 请检查可信服务是否已经存在。 400 Organizations.1902 delegated administrator is not empty for this service. 当前服务委托管理员不能为空 请给当前服务设置委托管理员。 400 Organizations.2000 bad request for create service linked agency. 创建服务关联委托失败 请检查输入的参数是否正确。 400 Organizations.2001 bad request for missing app_name. 缺少app名称 请检查是否缺少app名称。 409 Organizations.2002 conflict for service linked agency, already created. 服务关联委托冲突 请检查是否已经存在该服务关联委托。 400 Organizations.2003 bad request for delete service linked agency. 删除服务关联委托失败 请检查输入的参数是否正确。 404 Organizations.2004 not found for service linked agency. 服务关联委托不存在 请检查是否存在该服务关联委托。 404 Organizations.2005 not found for service request for service_principal. app名称不存在 请检查app名称是否正确。 400 Organizations.2006 bad request for authorization header, jwt token is malformed. jwt token畸形 请检查jwt token是否正确。 400 Organizations.2100 exactly one of parent id and child id should be provided. ParentId和ChildId必须填写一个 请检查ParentId和ChildId是否均不存在。 409 Organizations.2101 conflict for service, service_principal and app_name names must be unique. service_principal或app_name冲突,该名称可能已存在 请检查service_principal或app_name是否已经存在。 404 Organizations.2102 not found for service. 服务不存在 请检查传入的service_principal是否正确。 400 Organizations.2103 bad request for list service principal. 获取service_principal错误 请检查输入的参数是否正确。 404 Organizations.2104 not found for entity. 实体不存在 请检查实体id是否正确,如果是新建实体请稍后重试。 400 Organizations.2105 policy type is invalid. 策略类型无效 请检查策略类型(tag_policy)。 404 Organizations.2106 not found for service principal from iam, must register at IAM. service_principal未在IAM进行注册 请检查service_principal是否已经在IAM注册。 400 Organizations.2200 time format or range error. 时间格式/范围错误 请检查输入的参数是否正确。 400 Organizations.2201 bad request for change customer relation. 变更绑定关系失败 请联系管理员。 400 Organizations.2202 The relation of domain ID has changed too many times. 变更绑定关系次数太多 子客户不能频繁变更绑定关系(子客户单月操作不大于10次)。 403 Organizations.2007 Bad Request: {0}. 创建服务关联委托失败 根据填充的错误原因,检查权限是否被授权。 父主题: 附录
  • URI POST /v1/organizations/{resource_type}/{resource_id}/tags/create 表1 路径参数 参数 是否必选 参数类型 描述 resource_type 是 String 资源类型。枚举值:organizations:policies(服务策略)、organizations:ous(组织OU)、organizations:accounts(账号信息) 、organizations:roots:(根)。 枚举值: organizations:policies organizations:ous organizations:accounts organizations:roots resource_id 是 String 根、组织单元、账号或策略的唯一标识符(ID)。 最大长度:130
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Security-Token 否 String 如果正在使用临时安全凭据,则此header是必需的,该值是临时安全凭据的安全令牌(会话令牌)。 最小值:1 表3 请求Body参数 参数 是否必选 参数类型 描述 tags 是 Array of TagDto objects 要添加到指定资源的标签列表。 数组长度:1 - 20 表4 TagDto 参数 是否必选 参数类型 描述 key 是 String 标签键的密钥标识符或名称。 最小长度:1 最大长度:128 value 是 String 与标签键关联的字符串值。您可以将标签的值设置为空字符串,但不能将标签的值设置为NULL。 最小长度:0 最大长度:255
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 services Array of TagPolicyServiceDto objects 被添加到标签策略强制执行的资源类型。 表3 TagPolicyServiceDto 参数 参数类型 描述 service_name String 服务名称。 最小长度:1 最大长度:64 resource_types Array of strings 资源类型。 support_all Boolean resource_type是否支持全量选择,即*
  • 响应示例 状态码: 200 Successful. { "handshake" : { "id" : "h-awjp43m7bz3b8jgy5v61jrfwakt3og8w", "urn" : "organizations::0a6d25d23900d45c0faac010e0fb4de0:handshake:o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv/h-awjp43m7bz3b8jgy5v61jrfwakt3og8w", "updated_at" : "2022-08-25T08:11:53Z", "created_at" : "2022-08-25T08:11:20Z", "management_account_id" : "0a6d25d23900d45c0faac010e0fb4de0", "management_account_name" : "paas_iam_573331", "organization_id" : "o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv", "notes" : "test-notes", "target" : { "type" : "account", "entity" : "05c734152f00d4200f2bc0179ac6c5e0" }, "status" : "pending" } }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 handshake HandshakeDto object 两个账号(发起者和接收者)之间为了能安全地建立关系,所需要交换的信息。例如,当管理账号(发起者)邀请另一个账号(接收者)加入其组织时,两个账号一系列邀请(握手)请求和响应交换信息。 表4 HandshakeDto 参数 参数类型 描述 id String 邀请(握手)的唯一标识符(ID)。源账号在发起邀请(握手)时创建ID。 最大长度:34 urn String 邀请(握手)的统一资源名称。 最小长度:1 最大长度:1500 updated_at String 邀请(握手)请求被接受、取消、拒绝或到期的日期和时间。 created_at String 提出邀请(握手)请求的日期和时间。 management_account_id String 组织管理账号的唯一标识符(ID)。 最大长度:36 management_account_name String 组织管理账号的名称。 最大长度:64 organization_id String 组织的唯一标识符(ID)。 最大长度:34 notes String 给收件账号所有者的邮件中的附加信息。 最大长度:1024 target TargetDto object 要邀请加入组织的账号的标识符(ID)。 status String 邀请(握手)的当前状态, pending:邀请中;accepted:接受邀请;cancelled:取消邀请;declined:拒绝邀请;expired:邀请过期。 最小长度:1 最大长度:64 表5 TargetDto 参数 参数类型 描述 type String 目标类型,account:账号,email:邮箱。 最小长度:1 最大长度:64 entity String 如果指定 "type:account",则必须提供账号ID作为实体。如果指定"type:email",则必须指定与账号关联的电子邮件地址。 最大长度:100
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 handshake HandshakeDto object 两个账号(发起者和接收者)之间为了能安全地建立关系,所需要交换的信息。例如,当管理账号(发起者)邀请另一个账号(接收者)加入其组织时,两个账号一系列邀请(握手)请求和响应交换信息。 表4 HandshakeDto 参数 参数类型 描述 id String 邀请(握手)的唯一标识符(ID)。源账号在发起邀请(握手)时创建ID。 最大长度:34 urn String 邀请(握手)的统一资源名称。 最小长度:1 最大长度:1500 updated_at String 邀请(握手)请求被接受、取消、拒绝或到期的日期和时间。 created_at String 提出邀请(握手)请求的日期和时间。 management_account_id String 组织管理账号的唯一标识符(ID)。 最大长度:36 management_account_name String 组织管理账号的名称。 最大长度:64 organization_id String 组织的唯一标识符(ID)。 最大长度:34 notes String 给收件账号所有者的邮件中的附加信息。 最大长度:1024 target TargetDto object 要邀请加入组织的账号的标识符(ID)。 status String 邀请(握手)的当前状态, pending:邀请中;accepted:接受邀请;cancelled:取消邀请;declined:拒绝邀请;expired:邀请过期。 最小长度:1 最大长度:64 表5 TargetDto 参数 参数类型 描述 type String 目标类型,account:账号,email:邮箱。 最小长度:1 最大长度:64 entity String 如果指定 "type:account",则必须提供账号ID作为实体。如果指定"type:email",则必须指定与账号关联的电子邮件地址。 最大长度:100
  • 响应示例 状态码: 200 Successful. { "handshake" : { "id" : "h-awjp43m7bz3b8jgy5v61jrfwakt3og8w", "urn" : "organizations::0a6d25d23900d45c0faac010e0fb4de0:handshake:o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv/h-awjp43m7bz3b8jgy5v61jrfwakt3og8w", "updated_at" : "2022-08-25T08:11:53Z", "created_at" : "2022-08-25T08:11:20Z", "management_account_id" : "0a6d25d23900d45c0faac010e0fb4de0", "management_account_name" : "paas_iam_573331", "organization_id" : "o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv", "notes" : "test-notes", "target" : { "type" : "account", "entity" : "05c734152f00d4200f2bc0179ac6c5e0" }, "status" : "pending" } }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 last_updated_at String 有效策略最后更新时间。 policy_content String 有效策略文本内容。 最小长度:0 最大长度:20000 policy_type String 策略类型的名称。tag_policy标签策略。 枚举值: tag_policy entity_id String 根、组织单元或账号的唯一标识符(ID)。 最大长度:100
  • 响应示例 状态码: 200 Successful. { "last_updated_at" : "2023-01-11T11:00:00Z", "policy_content" : "{\"tags\":{\"color\":{\"tag_value\":[],\"tag_key\":\"Color\",\"enforced_for\":[\"iam:policy\"]},\"key_string\":{\"tag_value\":[\"AA\",\"BB\",\"cc\"],\"tag_key\":\"key_String\",\"enforced_for\":[\"iam:policy\"]},\"project\":{\"tag_value\":[\"Maintenance\",\"Escalations\"],\"tag_key\":\"Project\"}}}", "policy_type" : "tag_policy", "entity_id" : "c2acfcdf5fc7461a88f20094963e56c8" }
  • 响应示例 状态码: 200 Successful. { "handshake" : { "id" : "h-awjp43m7bz3b8jgy5v61jrfwakt3og8w", "urn" : "organizations::0a6d25d23900d45c0faac010e0fb4de0:handshake:o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv/h-awjp43m7bz3b8jgy5v61jrfwakt3og8w", "updated_at" : "2022-08-25T08:11:53Z", "created_at" : "2022-08-25T08:11:20Z", "management_account_id" : "0a6d25d23900d45c0faac010e0fb4de0", "management_account_name" : "paas_iam_573331", "organization_id" : "o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv", "notes" : "test-notes", "target" : { "type" : "account", "entity" : "05c734152f00d4200f2bc0179ac6c5e0" }, "status" : "pending" } }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 handshake HandshakeDto object 两个账号(发起者和接收者)之间为了能安全地建立关系,所需要交换的信息。例如,当管理账号(发起者)邀请另一个账号(接收者)加入其组织时,两个账号一系列邀请(握手)请求和响应交换信息。 表4 HandshakeDto 参数 参数类型 描述 id String 邀请(握手)的唯一标识符(ID)。源账号在发起邀请(握手)时创建ID。 最大长度:34 urn String 邀请(握手)的统一资源名称。 最小长度:1 最大长度:1500 updated_at String 邀请(握手)请求被接受、取消、拒绝或到期的日期和时间。 created_at String 提出邀请(握手)请求的日期和时间。 management_account_id String 组织管理账号的唯一标识符(ID)。 最大长度:36 management_account_name String 组织管理账号的名称。 最大长度:64 organization_id String 组织的唯一标识符(ID)。 最大长度:34 notes String 给收件账号所有者的邮件中的附加信息。 最大长度:1024 target TargetDto object 要邀请加入组织的账号的标识符(ID)。 status String 邀请(握手)的当前状态, pending:邀请中;accepted:接受邀请;cancelled:取消邀请;declined:拒绝邀请;expired:邀请过期。 最小长度:1 最大长度:64 表5 TargetDto 参数 参数类型 描述 type String 目标类型,account:账号,email:邮箱。 最小长度:1 最大长度:64 entity String 如果指定 "type:account",则必须提供账号ID作为实体。如果指定"type:email",则必须指定与账号关联的电子邮件地址。 最大长度:100
  • 请求示例 根据资源类型及标签信息查询实例数量 POST https://{hostname}/v1/organizations/{resource_type}/resource-instances/count { "without_any_tag" : true, "tags" : [ { "key" : "string", "values" : [ "string" ] } ], "matches" : [ { "key" : "string", "value" : "string" } ] }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Security-Token 否 String 如果正在使用临时安全凭据,则此header是必需的,该值是临时安全凭据的安全令牌(会话令牌)。 最小值:1 表3 请求Body参数 参数 是否必选 参数类型 描述 without_any_tag 否 Boolean 不包含任意一个标签,该字段为true时查询所有不带标签的资源。 tags 否 Array of TagsDTO objects 包含标签,最多包含10个key,每个key下面的value最多10个,结构体不能缺失,key不能为空或者空字符串。Key不能重复,同一个key中values不能重复。返回包含所有标签的资源列表,key之间是与的关系,key-value结构中value是或的关系。无tag过滤条件时返回全量数据。 数组长度:0 - 20 matches 否 Array of Match objects 要绑定到新创建的账号的标签列表。 表4 TagsDTO 参数 是否必选 参数类型 描述 key 是 String 键。最大长度127个unicode字符。 key不能为空。 最小长度:1 最大长度:128 values 是 Array of strings 值列表。每个值最大长度255个unicode字符。 最小长度:0 最大长度:255 数组长度:0 - 10 表5 Match 参数 是否必选 参数类型 描述 key 是 String 键。取值范围为policy , organizational-unit, account。 最小长度:0 最大长度:128 value 是 String 值。每个值最大长度255个unicode字符。 最小长度:0 最大长度:256
  • URI POST /v1/organizations/{resource_type}/resource-instances/count 表1 路径参数 参数 是否必选 参数类型 描述 resource_type 是 String 资源类型。枚举值:organizations:policies(服务策略)、organizations:ous(组织OU)、organizations:accounts(账号信息) 、organizations:roots:(根)。 枚举值: organizations:policies organizations:ous organizations:accounts organizations:roots
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 handshakes Array of HandshakeDto objects 邀请(握手)对象的列表,其中包含与指定账号关联的每个邀请(握手)的详细信息。 page_info PageInfoDto object 分页信息 表4 HandshakeDto 参数 参数类型 描述 id String 邀请(握手)的唯一标识符(ID)。源账号在发起邀请(握手)时创建ID。 最大长度:34 urn String 邀请(握手)的统一资源名称。 最小长度:1 最大长度:1500 updated_at String 邀请(握手)请求被接受、取消、拒绝或到期的日期和时间。 created_at String 提出邀请(握手)请求的日期和时间。 management_account_id String 组织管理账号的唯一标识符(ID)。 最大长度:36 management_account_name String 组织管理账号的名称。 最大长度:64 organization_id String 组织的唯一标识符(ID)。 最大长度:34 notes String 给收件账号所有者的邮件中的附加信息。 最大长度:1024 target TargetDto object 要邀请加入组织的账号的标识符(ID)。 status String 邀请(握手)的当前状态, pending:邀请中;accepted:接受邀请;cancelled:取消邀请;declined:拒绝邀请;expired:邀请过期。 最小长度:1 最大长度:64 表5 TargetDto 参数 参数类型 描述 type String 目标类型,account:账号,email:邮箱。 最小长度:1 最大长度:64 entity String 如果指定 "type:account",则必须提供账号ID作为实体。如果指定"type:email",则必须指定与账号关联的电子邮件地址。 最大长度:100 表6 PageInfoDto 参数 参数类型 描述 next_marker String 如果存在,则表示可用的输出比当前响应中包含的输出多。在对操作的后续调用中,在标签请求参数中使用此值,以获取输出的下一部分。您应该重复此操作,直到next_marker响应元素返回为null。 current_count Integer 本页返回条目数量 最小值:1 最大值:2000
  • 响应示例 状态码: 200 Successful. { "handshakes" : [ { "id" : "h-awjp43m7bz3b8jgy5v61jrfwakt3og8w", "urn" : "organizations::0a6d25d23900d45c0faac010e0fb4de0:handshake:o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv/h-awjp43m7bz3b8jgy5v61jrfwakt3og8w", "updated_at" : "2022-08-25T08:11:53Z", "created_at" : "2022-08-25T08:11:20Z", "management_account_id" : "0a6d25d23900d45c0faac010e0fb4de0", "management_account_name" : "paas_iam_573331", "organization_id" : "o-fhkmi6mek7wlqdp6nideqhb47qwtjdsv", "notes" : "test-notes", "target" : { "type" : "account", "entity" : "05c734152f00d4200f2bc0179ac6c5e0" }, "status" : "pending" } ], "page_info" : { "next_marker" : "ou-taowxgy4xbme6m4x3c2iijbxw7yj8fcw", "current_count" : 100 } }
共100000条