华为云用户手册

  • 响应消息 响应参数 参数 参数类型 描述 job_id String 任务ID。 job_type String 任务类型。 imsCreateImageByInstance:云服务器制作镜像 imsImportImageJob:外部镜像文件创建镜像 imsImportOvaImageJob:外部Ova镜像文件创建镜像 imsVolumeCreateImageJob:数据盘制作数据盘镜像 imsImportDataImageJob:外部镜像文件制作数据盘镜像 imsCreateWholeImageByInstanceJob:云服务器制作整机镜像 imsCreateWholeImageByBackupJob:云备份或云服务器备份制作整机镜像 imsNativeImportImageJob:注册镜像 imsNativeExportImageJob:导出镜像 imsAddImageMembersJob:添加镜像成员 imsDelImageMembersJob:删除镜像成员 imsUpdateImageMembersJob:修改镜像成员 imsCopyImageInRegionJob:Region内复制镜像 imsCopyImageCrossUserJob:跨Region复制镜像 begin_time String 任务开始执行时间。格式为UTC时间。 end_time String 任务结束时间。格式为UTC时间。 status String 任务状态,目前取值如下: SUC CES S:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表示该任务还未执行,正在初始化。 error_code String 错误码。 fail_reason String 失败原因。 entities Object 任务自定义属性。 任务正常时,返回镜像的ID;任务异常时,返回错误码和信息。 详情请参见表2。 表2 entities字段数据结构说明 参数 参数类型 描述 image_name String 镜像名称。 process_percent Double 任务执行进度。 current_task String 当前任务名称。 subJobId String 子任务ID。 image_id String 镜像ID。 sub_jobs_result Array of SubJobResult objects 子任务执行结果。详情请参见表3。 sub_jobs_list Array of string 子任务id列表。 表3 SubJobResult字段数据结构说明 参数 数据结构说明 描述 status String 子任务状态,取值如下: SUCCESS:表示该任务执行已经结束,任务执行成功。 FAIL:表示该任务执行已经结束,任务执行失败。 RUNNING:表示该任务正在执行。 INIT:表示该任务还未执行,正在初始化。 job_id String 子任务ID。 job_type String 子任务类型。 begin_time String 子任务开始执行时间。格式为UTC时间。 end_time String 子任务结束时间。格式为UTC时间。 error_code String 错误码。 fail_reason String 失败原因。 entities Object SubJobEntities 子任务自定义属性。详情请参见表4 任务正常时,返回镜像的ID。 任务异常时,返回错误码和信息。 表4 SubJobEntities字段数据结构说明 参数 数据结构说明 描述 image_id String 镜像ID。 image_name String 镜像名称。 响应样例 STATUS CODE 200 { "job_id": "ff80808280c204e30180d2784c3c0d86", "job_type": "imsCopyImageInRegionJob", "begin_time": "2022-05-17T14:42:20.859Z", "end_time": "", "status": "RUNNING", "error_code": null, "fail_reason": null, "entities": { "image_name": "d0d2e701-dfc4-4520-9247-f92907f38eb0", "process_percent": 0.40, "current_task": "CopyImageInRegionTask:", "subJobId": "ff80808280ca6cd30180d278b9db0221", "image_id": "498cc67e-7795-482c-8c47-32bcece2d7ec" }}
  • API概览 镜像服务 所提供的接口分为IMS接口与OpenStack原生接口。 通过配合使用镜像服务提供的接口和OpenStack原生接口,您可以完整地使用镜像服务的所有功能。例如制作私有镜像,可以使用OpenStack原生接口,也可以使用IMS接口进行操作。 表1 接口说明 类型 子类型 说明 IMS接口 镜像 可以实现镜像的制作、镜像列表查询、镜像导出等操作。 镜像标签 对私有镜像进行自定义标记。通过镜像标签,用户可以自由地对私有镜像分类管理。 镜像共享 用户可以将私有镜像共享给其他用户使用。通过镜像共享的接口完成镜像共享的相关操作。 镜像复制 通过Region内复制镜像实现加密镜像与非加密镜像的转换;通过跨Region复制镜像实现镜像在两个区域间复制,帮助用户实现区域间的业务迁移。 镜像配额 查询租户在当前Region的私有镜像的配额数量。 镜像任务 查询异步任务接口执行情况以及异步任务进度。 OpenStack原生接口 镜像 可以实现镜像的制作、镜像列表/详情查询、镜像导出等操作。 镜像标签 对私有镜像进行自定义标记。通过镜像标签,用户可以自由地对私有镜像分类管理。 镜像视图 镜像视图是提供给用户查询镜像属性详情的接口,比如属性的取值类型、用途等。通过镜像视图,用户可以从宏观上对镜像的基本情况进行了解。 镜像共享 用户可以将私有镜像共享给其他用户使用。通过镜像共享的接口完成镜像共享的相关操作。 查询API版本信息 查询镜像服务当前所用的API版本。
  • 基本概念 帐号 用户注册时的帐号,帐号对其所拥有的资源及云服务具有完全的访问权限,可以重置用户密码、分配用户权限等。由于帐号是付费主体,为了确保帐号安全,建议您不要直接使用帐号进行日常管理工作,而是创建用户并使用用户进行日常管理工作。 用户 由帐号在 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的获取及企业项目特性的详细信息,请参见《企业管理用户指南》。 父主题: 使用前必读
  • 功能介绍 该接口用于上传用户本地的镜像文件到云平台。使用该接口上传镜像时,镜像文件大小需要小于2GB,超过2GB的镜像文件参考注册镜像进行操作。 了解更多关于使用外部文件创建镜像的相关内容,请参见“通过外部镜像文件创建Windows系统盘镜像”、“通过外部镜像文件创建Linux系统盘镜像”。 使用该接口上传镜像的具体步骤如下: 准备待上传的镜像,支持的镜像格式:QCOW2、VMDK、VHD、RAW、VHDX、QED、VDI、QCOW、ZVHD2和ZVHD。 使用创建镜像元数据(OpenStack原生)创建镜像元数据。调用成功后,保存该镜像的ID。 使用2得到的镜像ID,上传支持格式的镜像文件。
  • URI PUT /v2/images/{image_id}/file 参数说明请参见表1。 表1 参数说明 参数 是否必选 参数类型 描述 image_id 是 String 镜像ID。 image_id为用户调用创建镜像元数据接口所创建出来镜像的id,使用其他方式创建的镜像id会导致上传失败。 上传接口调用成功后,请根据镜像id查询镜像的状态。镜像状态变为active表示镜像上传成功。 AK/SK签名认证方式仅支持消息体大小在12MB以内,12MB以上的请求请使用Token认证。
  • 请求示例 上传本地镜像文件。 PUT https://{Endpoint}/v2/images/84ac7f2b-bf19-4efb-86a0-b5be8771b476/file 如果使用curl命令方式调用接口,样例参考如下: curl -i --insecure 'https://IP/v2/images/84ac7f2b-bf19-4efb-86a0-b5be8771b476/file' -X PUT -H "X-Auth-Token: $mytoken" -H "Content-Type:application/octet-stream" -T /mnt/userdisk/images/suse.zvhd
  • URI PUT /v2/images/{image_id}/tags/{tag} 参数说明请参见表1。 表1 参数说明 参数 是否必选 参数类型 描述 image_id 是 String 镜像ID tag 是 String 新增的tag。 字符串中不能包含“=”。 说明: 该接口只能添加标签键,如果需要添加标签值,请使用接口PUT /v1/cloudimages/tags ,详情请参考增加或修改标签。
  • 概述 欢迎使用镜像服务(Image Management Service,IMS)。镜像是用于创建服务器或磁盘的模板,镜像服务提供镜像生命周期管理能力。可以通过服务器或外部文件创建系统盘镜像或数据盘镜像,也可以使用弹性云服务器、云服务器备份或云备份创建带数据盘的整机镜像。 您可以使用本文档提供API对镜像进行相关操作,如创建、查询、删除、更新等。支持的全部操作请参见API概览。 在调用镜像服务API之前,请确保已经充分了解镜像服务相关概念,详细信息请参见“什么是镜像服务”。 父主题: 使用前必读
  • 镜像标签数据格式 tag数据格式: 标签数据规范的格式为“key.value”,新增key为增加标签,否则为修改标签。 当标签数据出现多个小数点时,定义第一个小数点之前的为key,之后为value。如果分割后的value中依然包含小数点,依然视为value的一部分;如果没有小数点,则value视为空字符串。 key的长度不超过36个字符,value的长度不超过43个字符,value可以为空白字符串。 标签的键只能包含数字、英文字母、下划线、中划线和中文。 标签的键必须唯一且输入不能为空。 标签的值只能包含数字、英文字母、下划线、点、中划线和中文。 image_tags数据格式: 新规范标签数据格式为{"key":"keyA","value":"valueA"},如果添加的keyA已存在,视为更新标签。 key的长度不超过36个字符,value的长度不超过43个字符,value可以为空白字符串。 标签的键只能包含数字、英文字母、下划线、中划线和中文。 标签的键必须唯一且输入不能为空。 标签的值只能包含数字、英文字母、下划线、点、中划线和中文。
  • 约束与限制 用户只能共享自己没有发布为市场镜像的私有镜像,已经发布为市场镜像的不能共享。 镜像共享的范围只能在区域内。 系统盘镜像和数据盘镜像最多可以共享给128个租户,整机镜像最多可以共享给10个租户。 用户可以随时取消自己共享的镜像,无需通知镜像的接受方。 用户可以随时删除自己共享的镜像,无需通知镜像的接受方。 加密镜像不能共享。 只有通过云备份创建的整机镜像,才支持共享。通过其他方式创建的整机镜像,暂不支持共享。
  • 涉及API 当您使用Token认证方式完成认证鉴权时,需要获取用户Token并在调用接口时增加“X-Auth-Token”到业务接口请求消息头中。 IAM获取token的API URI格式:POST https://{IAM的Endpoint}/v3/auth/tokens 镜像服务API:制作镜像(使用上传至OBS桶中的外部镜像文件制作私有镜像) URI格式:POST https://{IMS的Endpoint}/v2/cloudimages/action 弹性云服务器API:创建云服务器(按需) URI格式:POST https://{E CS 的Endpoint}/v1/{project_id}/cloudservers 镜像服务API:制作镜像(使用数据盘制作系统盘镜像) URI格式:POST https://{IMS的Endpoint}/v2/cloudimages/action
  • 具体步骤 Token认证,具体操作请参考认证鉴权。 使用上传至OBS桶中的ISO镜像文件制作私有镜像。 发送“POST https://{IMS的Endpoint}/v2/cloudimages/action”。 在Request Header中增加“X-Auth-Token”。 在Request Body中传入如下参数: 详细的参数说明请参见“制作镜像”。 { "name": "ims_test_file", //镜像名称(必填String) "description": "OBS文件制作镜像", //镜像描述(非必填String) "image_url": "ims-image:centos70.iso", //OBS桶中外部镜像文件地址(必填String) "os_type": "Linux", //操作系统类型(非必填String) "os_version": "CentOS 7.0 64bit", //操作系统版本(必填String) "type": "IsoImage", //镜像的类型(必填String) "min_disk": 40, //最小系统盘大小(必填Integer) "image_tags": [{"key":"key2","value":"value2"},{"key":"key1","value":"value1"}] //镜像标签列表(非必填Array of objects)} 请求响应成功后,返回job_id,根据job_id查询job详情,可以获取镜像ID。具体操作请参考异步任务查询。 根据ISO镜像创建一台临时云服务器。 创建云服务器时,只能选择通用计算型、2 vCPU、内存为4G及以上的KVM类型的规格。 通过ISO镜像创建云服务器必须创建两块盘,一块系统盘一块数据盘,在安装操作系统时,操作系统默认安装至数据盘中。 发送“POST https://{ECS的Endpoint}/v1/{project_id}/cloudservers”。 在Request Header中增加“X-Auth-Token”。 在Request Body中传入如下参数: 以下参数均为必填项,详细的参数说明请参见“创建云服务器(按需)”。 { "server": { "imageRef": "fac42d61-ea1e-4271-94ba-6543a852d2c6", //上一步获取的镜像ID "flavorRef": "rc6.large.2_manage", "name": "instance-test", "vpcid": "18ec99f0-7159-4d7b-ad27-f32315d5af61", "nics": [{ "subnet_id": "81a4ecb0-0451-4c60-8373-8b923238ec40" }], "root_volume": { "volumetype": "SATA", "size": "40" }, "data_volumes": [{ "volumetype": "SATA", "size": "40" }], "availability_zone": "az-1a", "metadata": { "virtual_env_type": "IsoImage" }, "extendparam": { "diskPrior": "true" } }} 请求响应成功后,返回job_id,根据job_id查询job详情,可以获取云服务器ID。具体操作请参考“查询任务的执行状态”。 根据云服务器ID查询云服务器详情,可以获取4中需要用到的数据盘ID(volume_id)。具体操作请参考“查询云服务器详情”。 使用临时云服务器创建标准私有镜像。 发送“POST https://{IMS的Endpoint}/v2/cloudimages/action”。 在Request Header中增加“X-Auth-Token”。 在Request Body中传入如下参数: 详细的参数说明请参见“制作镜像”。 { "name": "ims_test", //镜像名称(必填String) "description": "数据盘制作系统盘镜像", //镜像描述(非必填String) "volume_id": "877a2cda-ba63-4e1e-b95f-e67e48b6129a", //数据盘ID(必填String) "type": "ECS", //镜像的类型(必填String) "os_version": "CentOS 7.0 64bit", //操作系统版本(必填String) "image_tags": [{"key":"key2","value":"value2"},{"key":"key1","value":"value1"}] //镜像标签列表(非必填Array of objects)} 请求响应成功后,返回job_id,根据job_id查询job详情,可以获取镜像ID。具体操作请参考异步任务查询。
  • 状态码 正常 返回值 说明 200 OK GET和PUT操作正常返回。 201 Created POST操作正常返回。 202 Accepted 请求已被接受。 204 No Content DELETE操作正常返回。 异常 返回值 说明 400 Bad Request 服务器未能处理请求。 401 Unauthorized 被请求的页面需要用户名和密码。 403 Forbidden 对被请求页面的访问被禁止。 404 Not Found 服务器无法找到被请求的页面。 405 Method Not Allowed 请求中指定的方法不被允许。 406 Not Acceptable 服务器生成的响应无法被客户端所接受。 407 Proxy Authentication Required 用户必须首先使用代理服务器进行验证,这样请求才会被处理。 408 Request Timeout 请求超出了服务器的等待时间。 409 Conflict 由于冲突,请求无法被完成。 500 Internal Server Error 请求未完成。服务异常。 501 Not Implemented 请求未完成。服务器不支持所请求的功能。 502 Bad Gateway 请求未完成。服务器从上游服务器收到一个无效的响应。 503 Service Unavailable 请求未完成。系统暂时异常。 504 Gateway Timeout 网关超时。
  • 调用API获取项目ID 项目ID可以通过调用查询指定条件下的项目列表API获取。 获取项目ID的接口为“GET https://{Endpoint}/v3/projects”,其中{Endpoint}为IAM的终端节点,可以从地区和终端节点获取。接口的认证鉴权请参见认证鉴权。 响应示例如下,其中projects下的“id”即为项目ID。 { "projects": [ { "domain_id": "65382450e8f64ac0870cd180d14e684b", "is_domain": false, "parent_id": "65382450e8f64ac0870cd180d14e684b", "name": "project_name", "description": "", "links": { "next": null, "previous": null, "self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99" }, "id": "a4a5d4098fb4474fa22cd05f897d6b99", "enabled": true } ], "links": { "next": null, "previous": null, "self": "https://www.example.com/v3/projects" }}
  • 支持的授权项 策略包含系统策略和自定义策略,如果系统策略不满足授权要求,租户管理员可以创建自定义策略,并通过给用户组授予自定义策略来进行精细的访问控制。策略支持的操作与API相对应,授权项列表说明如下: 权限:允许或拒绝某项操作。 对应API接口:自定义策略实际调用的API接口。 授权项:自定义策略中支持的Action,在自定义策略中的Action中写入授权项,可以实现授权项对应的权限功能。 依赖的授权项:部分Action存在对其他Action的依赖,需要将依赖的Action同时写入授权项,才能实现对应的权限功能。 IAM项目(Project)/企业项目(Enterprise Project):自定义策略的授权范围,包括IAM项目与企业项目。授权范围如果同时支持IAM项目和企业项目,表示此授权项对应的自定义策略,可以在IAM和企业管理两个服务中给用户组授权并生效。如果仅支持IAM项目,不支持企业项目,表示仅能在IAM中给用户组授权并生效,如果在企业管理中授权,则该自定义策略不生效。关于IAM项目与企业项目的区别,详情请参见:IAM与企业管理的区别。 “√”表示支持,“x”表示暂不支持。 镜像服务(IMS)支持的自定义策略授权项如下所示: 镜像管理,包含镜像管理接口对应的授权项,如查询镜像列表、更新镜像信息、制作镜像、注册镜像、导出镜像等接口。 镜像标签,包括镜像标签管理接口对应的授权项,如增加标签、删除标签、查询租户镜像标签列表等接口。 镜像视图,包含镜像视图管理接口对应的授权项,如查询镜像视图、查询镜像列表视图、查询镜像成员视图、查询镜像成员列表视图等接口。 镜像共享,包含共享镜像接口对应的授权项,如添加镜像成员、更新镜像成员状态、获取镜像成员详情、删除指定的镜像成员等接口。 镜像复制,包含复制镜像接口对应的授权项,如Region内复制镜像等接口。 镜像配额,包含镜像配额接口对应的授权项,如查询镜像配额等接口。 OpenStack原生API接口错误消息返回体为XML格式,暂不支持细粒度策略的标准无权限提示格式(JSON)。
  • 特殊镜像类型与支持的操作系统版本 表4 镜像类型与支持的操作系统版本 镜像类型 支持的操作系统版本 超大内存型 CentOS 6.6 64bit CentOS 6.7 64bit CentOS 6.8 64bit CentOS 7.1 64bit CentOS 7.2 64bit CentOS 7.3 64bit SUSE Enterprise Linux Server 11 SP3 64bit SUSE Enterprise Linux Server 11 SP4 64bit SUSE Enterprise Linux Server 12 SP1 64bit SUSE Enterprise Linux Server 12 SP2 64bit Red Hat Linux Enterprise 6.8 64bit Red Hat Linux Enterprise 7.3 64bit GPU优化型(G1型) Windows Server 2008 R2 Enterprise SP1 64bit Windows Server 2012 R2 Standard 64bit Windows Server 2016 Datacenter GPU优化型(G2型) Windows Server 2008 R2 Enterprise SP1 64bit Windows Server 2012 R2 Standard 64bit 密集存储型 CentOS 7.2 64bit CentOS 7.3 64bit CentOS 6.8 64bit SUSE Enterprise Linux Server 11 SP3 64bit SUSE Enterprise Linux Server 11 SP4 64bit SUSE Enterprise Linux Server 12 SP1 64bit SUSE Enterprise Linux Server 12 SP2 64bit Red Hat Linux Enterprise 6.8 64bit Red Hat Linux Enterprise 7.3 64bit 高计算型 CentOS 6.8 64bit CentOS 7.2 64bit CentOS 7.3 64bit Windows Server 2008 Windows Server 2012 Windows Server 2016 SUSE Enterprise Linux Server 11 SP3 64bit SUSE Enterprise Linux Server 11 SP4 64bit SUSE Enterprise Linux Server 12 SP1 64bit SUSE Enterprise Linux Server 12 SP2 64bit Red Hat Linux Enterprise 6.8 64bit Red Hat Linux Enterprise 7.3 64bit
  • __os_version取值 表1 __os_version取值 操作系统类型 操作系统版本(__os_version) Windows Windows 10 64bit Windows Server 2019 Standard 64bit Windows Server 2019 Datacenter 64bit Windows Server 2016 Standard 64bit Windows Server 2016 Datacenter 64bit Windows Server 2012 R2 Standard 64bit Windows Server 2012 Essentials R2 64bit Windows Server 2012 R2 Datacenter 64bit Windows Server 2012 Datacenter 64bit Windows Server 2012 Standard 64bit Windows Server 2008 R2 WEB 64bit Windows Server 2008 R2 Standard 64bit Windows Server 2008 R2 Enterprise 64bit Windows Server 2008 R2 Datacenter 64bit SUSE SUSE Linux Enterprise Server 15 SP1 64bit SUSE Linux Enterprise Server 15 64bit SUSE Linux Enterprise Server 12 SP5 64bit SUSE Linux Enterprise Server 12 SP4 64bit SUSE Linux Enterprise Server 12 SP3 64bit SUSE Linux Enterprise Server 12 SP2 64bit SUSE Linux Enterprise Server 12 SP1 64bit SUSE Linux Enterprise Server 11 SP4 64bit SUSE Linux Enterprise Server 11 SP3 64bit SUSE Linux Enterprise Server 11 SP3 32bit Oracle Linux Oracle Linux Server release 7.6 64bit Oracle Linux Server release 7.5 64bit Oracle Linux Server release 7.4 64bit Oracle Linux Server release 7.3 64bit Oracle Linux Server release 7.2 64bit Oracle Linux Server release 7.1 64bit Oracle Linux Server release 7.0 64bit Oracle Linux Server release 6.10 64bit Oracle Linux Server release 6.9 64bit Oracle Linux Server release 6.8 64bit Oracle Linux Server release 6.7 64bit Oracle Linux Server release 6.5 64bit Red Hat Red Hat Linux Enterprise 8.0 64bit Red Hat Linux Enterprise 7.6 64bit Red Hat Linux Enterprise 7.5 64bit Red Hat Linux Enterprise 7.4 64bit Red Hat Linux Enterprise 7.3 64bit Red Hat Linux Enterprise 7.2 64bit Red Hat Linux Enterprise 7.1 64bit Red Hat Linux Enterprise 7.0 64bit Red Hat Linux Enterprise 6.10 64bit Red Hat Linux Enterprise 6.9 64bit Red Hat Linux Enterprise 6.8 64bit Red Hat Linux Enterprise 6.7 64bit Red Hat Linux Enterprise 6.6 64bit Red Hat Linux Enterprise 6.6 32bit Red Hat Linux Enterprise 6.5 64bit Red Hat Linux Enterprise 6.4 64bit Red Hat Linux Enterprise 6.4 32bit Ubuntu Ubuntu 19.04 server 64bit Ubuntu 18.04.2 server 64bit Ubuntu 18.04.1 server 64bit Ubuntu 18.04 server 64bit Ubuntu 16.04.6 server 64bit Ubuntu 16.04.5 server 64bit Ubuntu 16.04.4 server 64bit Ubuntu 16.04.3 server 64bit Ubuntu 16.04.2 server 64bit Ubuntu 16.04 server 64bit Ubuntu 14.04.5 server 64bit Ubuntu 14.04.4 server 64bit Ubuntu 14.04.4 server 32bit Ubuntu 14.04.3 server 64bit Ubuntu 14.04.3 server 32bit Ubuntu 14.04.1 server 64bit Ubuntu 14.04.1 server 32bit Ubuntu 14.04 server 64bit Ubuntu 14.04 server 32bit openSUSE openSUSE 42.3 64bit openSUSE 42.2 64bit openSUSE 42.1 64bit openSUSE 15.0 64bit openSUSE 13.2 64bit openSUSE 11.3 64bit CentOS CentOS 8.0 64bit CentOS 7.7 64bit CentOS 7.6 64bit CentOS 7.5 64bit CentOS 7.4 64bit CentOS 7.3 64bit CentOS 7.2 64bit CentOS 7.1 64bit CentOS 7.0 64bit CentOS 7.0 32bit CentOS 6.10 64bit CentOS 6.10 32bit CentOS 6.9 64bit CentOS 6.8 64bit CentOS 6.7 64bit CentOS 6.7 32bit CentOS 6.6 64bit CentOS 6.6 32bit CentOS 6.5 64bit CentOS 6.5 32bit CentOS 6.4 64bit CentOS 6.4 32bit CentOS 6.3 64bit CentOS 6.3 32bit Debian Debian GNU/Linux 10.0.0 64bit Debian GNU/Linux 9.3.0 64bit Debian GNU/Linux 9.0.0 64bit Debian GNU/Linux 8.10.0 64bit Debian GNU/Linux 8.8.0 64bit Debian GNU/Linux 8.7.0 64bit Debian GNU/Linux 8.6.0 64bit Debian GNU/Linux 8.5.0 64bit Debian GNU/Linux 8.4.0 64bit Debian GNU/Linux 8.2.0 64bit Debian GNU/Linux 8.1.0 64bit Fedora Fedora 30 64bit Fedora 29 64bit Fedora 28 64bit Fedora 27 64bit Fedora 26 64bit Fedora 25 64bit Fedora 24 64bit Fedora 23 64bit Fedora 22 64bit EulerOS EulerOS 2.9 64bit EulerOS 2.5 64bit EulerOS 2.3 64bit EulerOS 2.2 64bit EulerOS 2.1 64bit openEuler openEuler 20.03 64bit 中标麒麟 NeoKylin 7.4 64bit NeoKylin Server release 5.0 U2 64bit NeoKylin Linux Advanced Server release 7.0 U5 64bit
  • __support_kvm_gpu_type取值 表3 镜像支持的GPU类型说明 支持GPU类型(__support_kvm_gpu_type) 说明 M60 表示镜像内部安装了M60显卡的硬件虚拟化驱动,支持的云服务器规格为g1.xlarge、g1.2xlarge、g3.4xlarge.4等。 V100_vGPU 表示镜像内部安装了V100显卡的硬件虚拟化驱动,支持的云服务器规格为g5.8xlarge.4等。 P2V_V100 表示镜像内部安装了V100显卡的硬件虚拟化驱动,支持的云服务器规格为p2v.2xlarge.8等。 P100 表示镜像内部安装了P100显卡的硬件虚拟化驱动,支持的云服务器规格为p1.2xlarge.8、p1.4xlarge.8等。 V100 表示镜像内部安装了V100显卡的硬件虚拟化驱动,支持的云服务器规格为p2.2xlarge.8、p2.4xlarge.8等。
  • 镜像管理 权限 对应API接口 授权项(Action) IAM项目(Project) 企业项目(Enterprise Project) 查询镜像列表 GET /v2/cloudimages ims:images:list √ √ 查询镜像支持的OS列表 GET /v1/cloudimages/os_version ims:images:list √ × 更新镜像信息 PATCH /v2/cloudimages/{image_id} ims:images:update ims:serverImages:create(仅企业项目迁移需要) √ √ 制作镜像 POST /v2/cloudimages/action 说明: 外部文件制作镜像前请确保用户已拥有 对象存储服务 的Tenant Administrator权限。 ims:serverImages:create √ √ 镜像文件快速导入 POST /v2/cloudimages/quickimport/action 说明: 使用镜像文件快速导入前请确保用户已拥有对象存储服务的Tenant Administrator权限。 ims:serverImages:create(仅快速导入系统盘镜像需要) ims:dataImages:create(仅快速导入数据盘镜像需要) √ √ 使用外部镜像文件制作数据镜像 POST /v1/cloudimages/dataimages/action 说明: 使用外部镜像文件前请确保用户已拥有对象存储服务的Tenant Administrator权限。 ims:dataImages:create √ √ 制作整机镜像 POST /v1/cloudimages/wholeimages/action 说明: 制作整机镜像前请确保用户已拥有云服务器备份服务的CSBS Administrator权限,或者云备份服务的CBR Admin权限。 ims:wholeImages:create √ √ 注册镜像 PUT /v1/cloudimages/{image_id}/upload 说明: 注册镜像前请确保用户已拥有对象存储服务的Tenant Administrator权限。 必须配置default的企业项目权限,才能正常使用企业项目权限注册镜像。 ims:images:upload √ √ 导出镜像 POST /v1/cloudimages/{image_id}/file 说明: 导出镜像前请确保用户已拥有对象存储服务的Tenant Administrator权限。 ims:images:export √ √ 查询镜像列表(OpenStack原生) GET /v2/images ims:images:list √ x 查询镜像详情(OpenStack原生) GET /v2/images/{image_id} ims:images:get √ √ 更新镜像信息(OpenStack原生) PATCH /v2/images/{image_id} ims:images:update √ √ 删除镜像(OpenStack原生) DELETE /v2/images/{image_id} ims:images:delete √ √ 创建镜像元数据(OpenStack原生) POST /v2/images ims:images:create √ x 上传镜像(OpenStack原生) PUT /v2/images/{image_id}/file ims:images:get ims:images:update ims:images:upload √ x 查询版本(OpenStack原生) GET / 无 √ x 查询镜像详情(OpenStack原生v1.1--已废弃,不推荐使用) GET /v1.1/images/detail ims:images:list √ x 查询镜像元数据(OpenStack原生v1--已废弃,不推荐使用) HEAD /v1/images/{image_id} ims:images:get √ x 删除镜像(OpenStack原生v1.1--已废弃,不推荐使用) DELETE /v1.1/images/{image_id} ims:images:delete √ x 父主题: 权限和授权项
  • 镜像共享 权限 对应API接口 授权项(Action) IAM项目(Project) 企业项目(Enterprise Project) 添加镜像成员(OpenStack原生) POST /v2/images/{image_id}/members ims:images:get ims:images:share √ x 更新镜像成员状态(OpenStack原生) PUT /v2/images/{image_id}/members/{member_id} ims:images:get ims:images:share √ x 获取镜像成员详情(OpenStack原生) GET /v2/images/{image_id}/members/{member_id} ims:images:get ims:images:share √ x 获取镜像成员列表(OpenStack原生) GET /v2/images/{image_id}/members ims:images:get ims:images:share √ x 删除指定的镜像成员(OpenStack原生) DELETE /v2/images/{image_id}/members/{member_id} ims:images:get ims:images:share √ x 批量添加镜像成员 POST /v1/cloudimages/members ims:images:share √ x 批量更新镜像成员状态 PUT /v1/cloudimages/members ims:images:share √ x 批量删除镜像成员 DELETE /v1/cloudimages/members ims:images:share √ x 父主题: 权限和授权项
  • 计费模式检查 应用场景 部分资源支持将按需计费实例转为包周期(包年/包月)实例。由于按需资源较贵,需要长期使用资源的按需用户可以选择对按需资源进行转包周期,继续使用这些资源的同时,享受包周期的低资费。 检查步骤 登录优化顾问服务控制台。 在“总览”页面,点击“检查”按钮,当检查进度为100%时检查完成。 图1 点击检查 图2 检查 在“维度”菜单下,点击“成本”页签,在“风险项”页签,查看部分资源计费模式检查结果。 图3 成本检查结果 优化建议 建议将按需计费超过一个月的实例的计费方式变更为包周期计费,节约成本。
  • 响应参数 状态码: 200 表6 响应Header参数 参数 参数类型 描述 X-request-id String This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. 表7 响应Body参数 参数 参数类型 描述 code String Id value 最小长度:32 最大长度:64 message String Error message 最小长度:1 最大长度:32 total Integer tatal count 最小值:0 最大值:99999 limit Integer current page count 最小值:0 最大值:9999 offset Integer current page size 最小值:0 最大值:100 data Array of DataobjectInfo objects list of informations of dataobject 表8 DataobjectInfo 参数 参数类型 描述 id String Id value 最小长度:32 最大长度:64 create_time String Create time 最小长度:0 最大长度:64 update_time String Update time 最小长度:0 最大长度:64 project_id String Project id value 最小长度:32 最大长度:64 dataclass_id String dataclass id. 最小长度:32 最大长度:64 name String The name, display only 最小长度:0 最大长度:1024 type String SIMULATION,PLAYBOOK,MANUAL,INSTANCE,DATA_SOURCE 最小长度:0 最大长度:32 content String data 最小长度:0 最大长度:4096 状态码: 400 表9 响应Header参数 参数 参数类型 描述 X-request-id String This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. 表10 响应Body参数 参数 参数类型 描述 code String Error code. 最小长度:0 最大长度:64 message String Error description. 最小长度:0 最大长度:1024
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:2097152 content-type 是 String application/json;charset=UTF-8 缺省值:application/json;charset=UTF-8 最小长度:1 最大长度:64 表3 请求Body参数 参数 是否必选 参数类型 描述 limit 否 Integer limit 最小值:0 最大值:1000 offset 否 Integer offset 最小值:0 最大值:1000 sort_by 否 String sortby 最小长度:0 最大长度:1000 order 否 String order 最小长度:0 最大长度:1000 from_date 否 String search start time 最小长度:0 最大长度:64 to_date 否 String search end time 最小长度:0 最大长度:64 condition 否 condition object search condition 表4 condition 参数 是否必选 参数类型 描述 conditions 否 Array of ConditonInfo objects conditions logics 否 Array of strings conditions 最小长度:1 最大长度:64 表5 ConditonInfo 参数 是否必选 参数类型 描述 name 否 String name 最小长度:0 最大长度:100 data 否 Array of strings search data 最小长度:1 最大长度:64
  • URI POST /v1/{project_id}/workspaces/{workspace_id}/soc/{dataclass_type}/{data_object_id}/{related_dataclass_type}/search 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String ID of project 最小长度:32 最大长度:36 workspace_id 是 String ID of workspace 最小长度:32 最大长度:36 dataclass_type 是 String type of dataclass 最小长度:1 最大长度:64 data_object_id 是 String ID of dataobject 最小长度:32 最大长度:36 related_dataclass_type 是 String type of related dataclass 最小长度:1 最大长度:64
  • 响应参数 状态码: 200 表3 响应Header参数 参数 参数类型 描述 X-request-id String This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. 表4 响应Body参数 参数 参数类型 描述 code String Error code 最小长度:1 最大长度:32 message String Error message 最小长度:1 最大长度:32 data Array of DataClassTypeDetailInfo objects Response of dataclass detail total Integer tatal count 最小值:0 最大值:99999 size Integer current page size 最小值:0 最大值:100 page Integer current page count 最小值:0 最大值:9999 表5 DataClassTypeDetailInfo 参数 参数类型 描述 id String Id value 最小长度:32 最大长度:64 parent_name String The name, display only 最小长度:0 最大长度:1024 parent_business_code String 类型标识码 最小长度:32 最大长度:256 name String The name, display only 最小长度:0 最大长度:1024 business_code String 类型标识码 最小长度:32 最大长度:256 description String The description, display only 最小长度:0 最大长度:1024 workspace_id String workspace id 最小长度:32 最大长度:64 project_id String Project id value 最小长度:32 最大长度:64 enabled Boolean If is enabled, false for disenabled, true for enabled is_built_in Boolean 是否内置 缺省值:false 枚举值: true false layout_id String 布局ID 最小长度:0 最大长度:64 layout_name String The name, display only 最小长度:0 最大长度:1024 dataclass_id String dataclass id. 最小长度:32 最大长度:64 sla Integer sla 最小值:-1 最大值:999999999999 状态码: 400 表6 响应Header参数 参数 参数类型 描述 X-request-id String This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. 表7 响应Body参数 参数 参数类型 描述 code String Error code. 最小长度:0 最大长度:64 message String Error description. 最小长度:0 最大长度:1024
  • 响应示例 状态码: 200 Response of listing types { "code" : "SOAR.0000", "message" : "Error message", "data" : [ { "id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "parent_name" : "MyXXX", "parent_business_code" : "stringstringstringstringstringst", "name" : "MyXXX", "business_code" : "stringstringstringstringstringst", "description" : "This my XXXX", "workspace_id" : "909494e3-558e-46b6-a9eb-07a8e18ca620", "project_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "enabled" : true, "is_built_in" : false, "layout_id" : "28f61af50fc9452aa0ed5ea25c3cc3d3", "layout_name" : "MyXXX", "dataclass_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "sla" : 6400 } ], "total" : 41, "size" : 10, "page" : 3}
  • URI GET /v1/{project_id}/workspaces/{workspace_id}/soc/incidents/types 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID 最小长度:1 最大长度:64 workspace_id 是 String 工作空间ID 最小长度:1 最大长度:64 表2 Query参数 参数 是否必选 参数类型 描述 parent_business_code 否 String 子类类型标识码 最小长度:32 最大长度:256 offset 否 Integer request offset, from 0 最小值:0 最大值:999999 缺省值:0 limit 否 Integer request limit size 最小值:1 最大值:999999 order 否 String sort order, ASC, DESC. 最小长度:1 最大长度:64 sortby 否 String sort by property, create_time. 最小长度:1 最大长度:64 name 否 String name 最小长度:0 最大长度:64 enabled 否 Boolean 是否启用 layout_name 否 String 布局名称 最小长度:0 最大长度:64 is_built_in 否 Boolean 是否内置
  • 响应参数 状态码: 200 表4 响应Header参数 参数 参数类型 描述 X-request-id String This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. 表5 响应Body参数 参数 参数类型 描述 code String Id value 最小长度:0 最大长度:64 message String Error message 最小长度:0 最大长度:32 request_id String Error message 最小长度:0 最大长度:32 success Boolean Error message 最小长度:1 最大长度:32 total Integer tatal count 最小值:0 最大值:99999 limit Integer current page count 最小值:0 最大值:9999 offset Integer current page size 最小值:0 最大值:100 data DataResponse object indicator batch operation response 表6 DataResponse 参数 参数类型 描述 success_ids Array of strings id list 最小长度:32 最大长度:64 error_ids Array of strings id list 最小长度:32 最大长度:64
  • 响应示例 状态码: 200 Response of DeleteDataobjectRelation { "code" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "message" : "Error message", "request_id" : "Error message", "success" : false, "total" : 41, "limit" : 3, "offset" : 10, "data" : { "success_ids" : [ "909494e3-558e-46b6-a9eb-07a8e18ca62f" ], "error_ids" : [ "909494e3-558e-46b6-a9eb-07a8e18ca62f" ] }}
  • URI DELETE /v1/{project_id}/workspaces/{workspace_id}/soc/{dataclass_type}/{data_object_id}/{related_dataclass_type} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String ID of project 最小长度:32 最大长度:36 workspace_id 是 String ID of workspace 最小长度:32 最大长度:36 dataclass_type 是 String type of dataclass 最小长度:1 最大长度:64 data_object_id 是 String ID of dataobject 最小长度:32 最大长度:36 related_dataclass_type 是 String type of related dataclass 最小长度:1 最大长度:64
共100000条