{"base_path":null,"components":null,"consumes":"[\"application/json\"]","definitions":{"BadRequestErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211102","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The parameter is invalid.","readOnly":true,"type":"string"}}},"CreateAppServerReq":{"description":"创建云服务请求。","properties":{"availability_zone":{"description":"可用分区。\n> - 。\n> -","example":"az3.manage.x86","maxLength":255,"minLength":0,"type":"string"},"create_server_extend_param":{"$ref":"#/definitions/CreateServerExtendParam","description":"创建云服务器附加信息。"},"flavor_id":{"description":"规格ID。","example":"c3.large.4","maxLength":255,"minLength":1,"type":"string"},"nics":{"description":"服务对应的网卡信息,当前未使用该字段。","items":{"$ref":"#/definitions/Nic"},"maxItems":5,"minItems":0,"type":"array","x-maxLength":5,"x-minLength":0},"os_type":{"description":"操作系统类型,当前仅支持Windows。","example":"Windows","maxLength":32,"minLength":0,"type":"string"},"ou_name":{"description":"OU名称,在对接AD时使用,需提前在AD中创建OU。","example":"test","maxLength":255,"minLength":0,"type":"string"},"product_id":{"description":"产品ID。\n> - 获取方式详见产品套餐管理ListProduct:\"GET /v1/{project_id}/product\"。","example":"workspace.appstream.general.2xlarge.2","maxLength":128,"minLength":1,"type":"string"},"root_volume":{"$ref":"#/definitions/Volume","description":"系统盘: 磁盘容量,磁盘容量最大只支持1024G, 且为10的倍数。"},"scheduler_hints":{"$ref":"#/definitions/WdhParam","description":"专属主机: 专属主机只支持按需模式,包周期模式不支持专属主机。"},"server_group_id":{"description":"服务器组唯一标识。","example":"1","maxLength":128,"minLength":1,"type":"string"},"subnet_id":{"description":"网卡对应的子网ID。","example":"197c1aa4-2611-48bd-a3af-ac4ce2c17c4c","maxLength":255,"minLength":1,"type":"string"},"subscription_num":{"description":"订购数量。","example":3,"format":"int32","maximum":100,"minimum":1,"type":"integer"},"type":{"description":"创建云服务类型,当前仅支持创建云应用:createApps。","example":"createApps","pattern":"^(createApps)$","type":"string"},"update_access_agent":{"description":"是否自动升级hda版本。","example":true,"type":"boolean"},"vpc_id":{"description":"虚拟私有云ID。","maxLength":255,"minLength":1,"type":"string"}},"required":["product_id","root_volume","server_group_id","subnet_id","subscription_num","type","vpc_id"],"title":"CreateServiceReq","type":"object"},"CreateAppServerResp":{"properties":{"job_id":{"description":"","example":"574130879874465792","maxLength":255,"minLength":1,"type":"string"},"order_id":{"description":"订单号,创建包年包月的弹性云服务器时返回该参数。","example":"CS23060117315YQ6Z","type":"string","x-hcs-ignore":true}},"title":"CreateAppServerResp","type":"object"},"CreateServerExtendParam":{"properties":{"charging_mode":{"default":"postPaid","description":"计费模式,取值范围:\n- prePaid-预付费,即包年包月;\n- postPaid-后付费,即按需付费;","example":"postPaid","pattern":"^(prePaid|postPaid)$","type":"string"},"is_auto_pay":{"default":false,"description":"下单订购后,是否自动从客户的账户中支付,而不需要客户手动去进行支付。chargingMode为prePaid时生效,不传该字段时默认为客户手动支付。\n> - true :是(自动支付)。\n> - false:否(需要客户手动支付)。","example":false,"type":"boolean"},"is_auto_renew":{"default":false,"description":"是否是自动续订,默认不填为false。\n>- false 不自动续订。\n>- true 自动续订。","example":false,"type":"boolean"},"period_num":{"description":"订购周期数,chargingMode为prePaid时生效且为必选值,periodNum为正整数,取值范围:\n> - periodType=2(周期类型为月)时,取值为[1,9]。\n> - periodType=3(周期类型为年)时,取值为[1,3]。","example":1,"format":"int32","maximum":1024,"minimum":1,"type":"integer"},"period_type":{"description":"周期类型 2:包月;3:包年* chargingMode为prePaid时生效且为必选值。","example":1,"format":"int32","maximum":10,"minimum":0,"type":"integer"}}},"ForbiddenErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00081102","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"User does not have permission to access this resource.","readOnly":true,"type":"string"}}},"InternalServerErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211401","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The requested operation failed. Please try again later.","readOnly":true,"type":"string"}}},"MethodNotAllowedErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00000405","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The method specified in the request is not allowed for this resource.","readOnly":true,"type":"string"}}},"Nic":{"description":"云服务对应的网卡信息。","properties":{"ip_address":{"description":"IP地址。","maxLength":255,"minLength":1,"type":"string"},"subnet_id":{"description":"网卡对应的子网ID。","example":"197c1aa4-2611-48bd-a3af-ac4ce2c17c4c","maxLength":255,"minLength":0,"type":"string"}},"title":"Nic","type":"object"},"NotFoundErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211902","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The application does not exist","readOnly":true,"type":"string"}}},"ServiceUnavailableErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00050902","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The service is now unavailable to process the request.","readOnly":true,"type":"string"}}},"UnauthorizedErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211302","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"User authorization error.","readOnly":true,"type":"string"}}},"Volume":{"description":"磁盘。","properties":{"cluster_id":{"description":"云服务器系统盘对应的存储池的ID。","example":"c950ee97-587c-4f24-8a74-3367e3da570f","maxLength":255,"minLength":0,"type":"string"},"size":{"description":"磁盘容量,单位GB,数值约束为10的倍数。\n* `系统盘` minLength: 10,maxLength: 1024\n* `数据盘` minLength: 10,maxLength: 32768","example":10,"maximum":32768,"minimum":10,"type":"integer"},"type":{"$ref":"#/definitions/VolumeType"}},"required":["size","type"]},"VolumeType":{"description":"磁盘类型,获取可用磁盘类型详见接口磁盘管理ListVolumeType。\n* `ESSD` - 极速型SSD\n* `SSD` - 超高IO\n* `GPSSD` - 通用型SSD\n* `SAS` - 高IO\n* `SATA` - 普通IO","enum":["ESSD","SSD","GPSSD","SAS","SATA"],"example":"SSD","type":"string"},"WdhParam":{"description":"wdh参数。","properties":{"dedicated_host_id":{"description":"云办公主机id。","maxLength":255,"minLength":0,"type":"string"},"tenancy":{"description":"类型。","maxLength":255,"minLength":1,"type":"string"}},"title":"WdhParam","type":"object"}},"description":null,"group_id":"fe7dbee2e20f4aa589be7dce935a38ad","host":"appstream.cn-north-4.myhuaweicloud.com","id":"68822539692444ea9758288d693231fd","info_version":"v1","method":"post","name":"CreateAppServers","parameters":{},"paths":{"/v1/{project_id}/app-servers/actions/create":{"post":{"consumes":["application/json"],"description":"创建云服务器接口。","operationId":"CreateAppServers","parameters":[{"description":"创建服务请求体。","in":"body","name":"CreateAppServersRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateAppServerReq"}},{"description":"用户Token。\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":2147483647,"minLength":0,"name":"X-Auth-Token","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."},{"description":"项目唯一标识。","in":"path","maxLength":128,"minLength":1,"name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"交易组件调用时下发的关联ID。","in":"header","maxLength":64,"minLength":0,"name":"X-Linked-Id","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."},{"description":"CBC接口回调时,请求头里带上的业务ID 包周期场景必填 按需场景无。","in":"header","maxLength":64,"minLength":0,"name":"Service-Transaction-Id","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."}],"produces":["application/json"],"responses":{"200":{"description":"成功响应。","examples":{"application/json":{"job_id":"575768277444198400","order_id":"CS2310081912FP1MC"}},"schema":{"$ref":"#/definitions/CreateAppServerResp"}},"400":{"description":"由于包含语法错误,当前请求无法被服务器理解。","schema":{"$ref":"#/definitions/BadRequestErrorResp"}},"401":{"description":"鉴权失败。","schema":{"$ref":"#/definitions/UnauthorizedErrorResp"}},"403":{"description":"没有操作权限。","schema":{"$ref":"#/definitions/ForbiddenErrorResp"}},"404":{"description":"找不到资源。","schema":{"$ref":"#/definitions/NotFoundErrorResp"}},"405":{"description":"请求中指定的方法不被允许。","schema":{"$ref":"#/definitions/MethodNotAllowedErrorResp"}},"500":{"description":"服务内部错误,具体返回错误码请参见错误码说明。","schema":{"$ref":"#/definitions/InternalServerErrorResp"}},"503":{"description":"服务不可用。","schema":{"$ref":"#/definitions/ServiceUnavailableErrorResp"}}},"security":[{"apig-auth-iam-used-authn5":[]}],"summary":"创建云服务器","tags":["Server"],"x-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"internal,public","x-apigateway-backend":{"httpVpcEndpoints":{"description":"","method":"POST","name":"wks-bundlemanager-lb","path":"/v1/{project_id}/app-servers/actions/create","scheme":"https","timeout":30000},"parameters":[{"description":"","in":"header","name":"X-Auth-Token","origin":"request","value":"X-Auth-Token"},{"description":"","in":"path","name":"project_id","origin":"request","value":"project_id"}],"type":"HTTP-VPC"},"x-apigateway-cors":false,"x-apigateway-match-mode":"NORMAL","x-apigateway-ratelimit":"workspace_default_operate","x-apigateway-request-type":"public","x-is-registered":"Y","x-order":1,"x-request-examples-1":{"availability_zone":"cn-north-5a","create_server_extend_param":{"charging_mode":"prePaid","is_auto_pay":false,"is_auto_renew":false,"period_num":2,"period_type":3},"flavor_id":"c3.large.4","nics":[{"subnet_id":"085ca7d8-4474-4c32-bff0-31254d98c4a9"}],"os_type":"Windows","ou_name":"","product_id":"workspace.appstream.general.xlarge.2","root_volume":{"size":80,"type":"SAS"},"server_group_id":"f309fa65-881a-4f49-8c06-31e20437ae20","subnet_id":"085ca7d8-4474-4c32-bff0-31254d98c4a9","subscription_num":1,"type":"createApps","update_access_agent":false,"vpc_id":"d987ecf7-c6a4-4753-8b66-135dcc3eed79"},"x-request-examples-url-1":"POST /v1/a4da8115c9d8464ead3a38309130523f/app-servers/actions/create","x-support-hcs":"Y","x-support-sdk":"Y"}}},"product_short":"WorkspaceApp","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":{"apig-auth-app":{"in":"header","name":"Authorization","type":"apiKey","x-apigateway-auth-type":"AppSigv1"},"apig-auth-iam":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-type":"IAM"},"apig-auth-iam-used-authn5":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-opt":{"inner-auth-type":"iam_auth_n5"},"x-apigateway-auth-type":"IAM"}},"summary":"创建云服务器","tags":"服务器管理","uri":null,"version":"2.0"}