创建服务连接
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /organization/{organizationId}/createServiceConnection HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| organizationId |
string |
是 |
企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https:// devops.aliyun.com/organization/【OrgId】 |
5ebbc0228123212b59xxxxx |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| body |
object |
否 |
请求 Body |
|
| connectionType |
string |
是 |
服务连接类型 枚举值:
|
ecs 云服务器(ECS) ack 容器服务Kubernetes(ACK) oss 对象存储(OSS) edas 企业级分布式应用(EDAS) sae Serverless应用引擎(SAE) ros 资源编排服务(ROS) fc 阿里云函数计算(FC) emas 移动研发平台(EMAS) customGitlab 自建Gitlab git 通用Git gitlab Gitlab bitbucket Bitbucket docker_register_aliyun 容器镜像服务(ACR) ess 弹性伸缩(ESS) |
| connectionName |
string |
是 |
服务连接名称 |
ecs连接 |
| serviceAuthId |
integer |
是 |
服务授权 id |
111 |
| scope |
string |
是 |
可见范围:如 PERSON,GLOBAL,CUSTOM 枚举值:
|
PERSON (私有) GLOBAL (公开) CUSTOM (自定义) |
| authType |
string |
是 |
服务授权类型 枚举值:
|
CREDENTIAL (服务证书) AUTHENTICATION (服务授权) |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| requestId |
string |
请求 id |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorMessage |
string |
错误信息 |
"" |
| errorCode |
string |
错误码 |
"" |
| success |
boolean |
true 接口调用成功,false 接口调用失败 |
true |
| id |
integer |
服务连接 id |
19224 |
示例
正常返回示例
JSON格式
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS\n",
"errorMessage": "\"\"",
"errorCode": "\"\"",
"success": true,
"id": 19224
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParam.ParamNotPresent | The parameter is invalid. | 参数有误,请检查参数 |
| 400 | InvalidUser.NotFound | The user that is invoking the API service is not a registered user. | 调用 API 的用户,未注册为云效用户 |
| 403 | Forbidden.UserNotInCurrentOrganization | The user is not in the organization and is not authorized to perform the operation. | 当前用户不在该企业中,无权进行操作。 |
| 404 | InvalidOrganization.NotFound | The organization is not found. | 企业不存在,请检查企业ID是否正确 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。