{"base_path":null,"components":null,"consumes":"[\"application/json\",\"application/json;charset=utf-8\"]","definitions":{"BaseResp":{"description":"API响应基类。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00139901","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The request message is invalid.","readOnly":true,"type":"string"}}},"CreateBucketCredentialReq":{"description":"生成资源访问凭据。","properties":{"file_name":{"description":"文件完整名称,不允许包含如下字符:^;|~`{}[]<>。","example":"xxx.exe","maxLength":256,"minLength":1,"type":"string"}},"required":["file_name"]},"CreateBucketCredentialResp":{"description":"应用中心的obs桶信息。","properties":{"bucket_name":{"description":"存放的桶名称。","example":"","readOnly":true,"type":"string"},"credential":{"$ref":"#/definitions/ObsCredential","description":"对应的凭据信息。"},"object_path":{"description":"OBS对象路径。\n注: path是对象在obs中的完整路径。\n例如桶存在如下目录结构的数据。\n Bucket:\n ├─dir1\n | ├─object1.txt\n | └─object2.txt\n └─object3.txt\nObject1的path: dir1/object1.txt\nObject2的path: dir1/object2.txt\nObject3的path: object3.txt","example":"app-file/xxxx.exe","readOnly":true,"type":"string"},"policy":{"$ref":"#/definitions/ObsPolicy","description":"访问策略。"},"server_end_point":{"description":"访问的服务终端节点。","example":"obs.cn-north-xx.myhuaweicloud.com","readOnly":true,"type":"string"}}},"ObsCredential":{"description":"obs访问凭据。","properties":{"access":{"description":"access key。","example":"nvf**********390","readOnly":true,"type":"string"},"secret":{"description":"secret key。","example":"nvf**********390","readOnly":true,"type":"string"},"security_token":{"description":"安全校验token。","example":"nvf**********390","readOnly":true,"type":"string"}}},"ObsPolicy":{"description":"obs桶存放的策略。","properties":{"statement":{"$ref":"#/definitions/ObsPolicyStatement"},"version":{"description":"版本号。","example":"1.1","maxLength":32,"minLength":1,"type":"string"}},"type":"object"},"ObsPolicyStatement":{"description":"obs桶存放的策略内容。","properties":{"action":{"description":"可以进行操作的权限合集。","example":["obs:object:PutObject"],"items":{"maxLength":128,"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"readOnly":true,"type":"array"},"effect":{"description":"状态(正常、禁用):\n* 'Allow' - 允许\n* 'Deny' - 禁用","example":"Allow","readOnly":true,"type":"string"},"resource":{"description":"允许访问的资源。","example":["obs:*:*:object:file/xxx.exe"],"items":{"maxLength":128,"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"readOnly":true,"type":"array"}},"type":"object"}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"882379d0ff90476fbbfbe61bccf81e64","info_version":"v2","method":"post","name":"CreateBucketCredential","parameters":{},"paths":{"/v1/{project_id}/app-center/buckets/actions/create-credential":{"post":{"description":"生成桶凭证信息。","operationId":"CreateBucketCredential","parameters":[{"description":"用户Token。\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":102400,"minLength":1,"name":"X-Auth-Token","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."},{"description":"项目ID。","in":"path","maxLength":128,"minLength":1,"name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"生成凭证请求结构体。","in":"body","name":"CreateBucketCredentialRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateBucketCredentialReq"}}],"responses":{"200":{"description":"成功响应。","examples":{"application/json":{"bucket_name":"","credential":{"access":"nvf***********390","secret":"nvf***********390","security_token":"nvf***********390"},"object_path":"app-file/xxxx.exe","policy":{"statement":{"action":["obs:object:PutObject"],"effect":"Allow","resource":["obs:*:*:object:file/xxx.exe"]},"version":"1.1"},"server_end_point":"obs.cn-north-xx.myhuaweicloud.com"}},"schema":{"$ref":"#/definitions/CreateBucketCredentialResp"}},"400":{"description":"由于包含语法错误,当前请求无法被服务器理解。","schema":{"$ref":"#/definitions/BaseResp"}},"401":{"description":"鉴权失败。","schema":{"$ref":"#/definitions/BaseResp"}},"403":{"description":"没有操作权限。","schema":{"$ref":"#/definitions/BaseResp"}},"404":{"description":"找不到资源。","schema":{"$ref":"#/definitions/BaseResp"}},"405":{"description":"请求中指定的方法不被允许。","schema":{"$ref":"#/definitions/BaseResp"}},"500":{"description":"服务内部错误,具体返回错误码请参见错误码说明。","schema":{"$ref":"#/definitions/BaseResp"}},"503":{"description":"服务不可用。","schema":{"$ref":"#/definitions/BaseResp"}}},"schemes":["https"],"security":[{"apig-auth-iam-used-authn5":[]}],"summary":"生成访问凭证信息","tags":["AppCenter"],"x-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"internal_token,public","x-apigateway-backend":{"httpVpcEndpoints":{"description":"","method":"POST","name":"wks-appcenter-lb","path":"/v1/{project_id}/app-center/buckets/actions/create-credential","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_get","x-apigateway-request-type":"public","x-is-registered":"Y","x-request-examples-1":{"file_name":"xxx.exe"},"x-request-examples-text-1":{"file_name":"xxx.exe"},"x-support-apig-group":"workspace","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"}