{"base_path":null,"components":null,"consumes":"[\"application/json\",\"application/json;charset=utf-8\"]","definitions":{"BaseResponse":{"description":"API响应基类。","properties":{"encoded_authorization_message":{"description":"加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。","readOnly":true,"type":"string"},"error_code":{"description":"错误码。","maxLength":12,"minLength":0,"type":"string"},"error_msg":{"description":"错误描述。","maxLength":1000,"minLength":0,"type":"string"}}},"CreateTagReq":{"properties":{"tag":{"$ref":"#/definitions/Tag"}},"required":["tag"]},"Tag":{"description":"标签。","properties":{"key":{"description":"标签的键,不能为空,最大长度128个unicode字符。标签的键可以包含任意语种字母、数字、空格和_.:=+-@,但首尾不能含有空格,不能以_sys_开头。","maxLength":128,"minLength":0,"type":"string"},"value":{"default":"","description":"标签的值,最大长度43个unicode字符。标签的值可以包含任意语种字母、数字、空格和_.:=+-@,但首尾不能含有空格。","maxLength":43,"minLength":0,"type":"string"}},"required":["key"]}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"3cf50d1e9b6948f39e8b6b8ad8592035","info_version":"v2","method":"post","name":"CreateTag","parameters":{},"paths":{"/v2/{project_id}/desktops/{desktop_id}/tags":{"post":{"description":"该接口用于为桌面创建标签,一个桌面上最多有10个标签。创建时,如果创建的标签已经存在(key相同),则覆盖。","operationId":"CreateTag","parameters":[{"description":"用户Token。\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":40000,"minLength":1,"name":"X-Auth-Token","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX...","x-is-registered":"N"},{"description":"发送的实体的MIME类型。","in":"header","maxLength":255,"minLength":1,"name":"Content-Type","required":false,"type":"string","x-example":"application/json"},{"description":"项目ID。","in":"path","maxLength":255,"minLength":1,"name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"桌面id。","in":"path","maxLength":255,"minLength":1,"name":"desktop_id","required":true,"type":"string","x-example":"2b31e-d520xxxx-xxebedb6-e57xxxxxx"},{"description":"创建桌面标签请求。","in":"body","name":"CreateTagRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateTagReq"}}],"responses":{"204":{"description":"创建桌面标签响应。"},"400":{"description":"参数错误。","schema":{"$ref":"#/definitions/BaseResponse"}},"401":{"description":"鉴权失败。","schema":{"$ref":"#/definitions/BaseResponse"}},"403":{"description":"无权限范围。","schema":{"$ref":"#/definitions/BaseResponse"}},"404":{"description":"资源不存在。","schema":{"$ref":"#/definitions/BaseResponse"}},"500":{"description":"内部错误。","schema":{"$ref":"#/definitions/BaseResponse"}}},"schemes":["https"],"summary":"创建桌面标签","tags":["DesktopTag"],"x-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"public,internal_token","x-apigateway-request-type":"public","x-is-registered":"Y","x-methodAnnotations":["@EnableAuth","@WksIamAuthMeta(resourceField = \"desktop_id\", tagField=\"tag\", operationType=OperationType.CREATE)","@IamAuthMeta(authLevel = IamAuthLevel.INSTANCE, abacAction = \"workspace:desktops:tag\", needApigwJwtAuthCheck = false, authContextInitializerName = \"workspaceInstanceAuthContextInitializer\", needRbacCheck = false, needAbacResourceCheck = true)","@CtsMeta(serviceType = \"Workspace\", resourceType = \"workspace\", traceName = \"createDesktopTags\")"],"x-request-examples-1":{"tag":{"key":"ENV","value":"DEV"}},"x-request-examples-text-1":{"tag":{"key":"ENV","value":"DEV"}},"x-request-examples-url-1":"/v2/9c53a566cb3443ab910cf0daebca90c4/desktops/8e07d3e9-454e-4fc9-ba56-c631d05c4712/tags","x-support-isv":"ZR","x-support-sdk":"Y"}}},"product_short":"Workspace","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"}