CreateServiceConnection
Creates a service connection.
Try it now
Test
RAM authorization
Request syntax
POST /organization/{organizationId}/createServiceConnection HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The organization ID. This is a string value that you can obtain from the Yunxiao URL, such as https://devops.aliyun.com/organization/[OrgId]. |
5ebbc0228123212b59xxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| connectionType |
string |
Yes |
The type of the service connection. Valid values:
|
ecs |
| connectionName |
string |
Yes |
The name of the service connection. |
ECS connection |
| serviceAuthId |
integer |
Yes |
The ID of the service authorization. |
111 |
| scope |
string |
Yes |
The visibility scope, such as PERSONAL, GLOBAL, or CUSTOM. Valid values:
|
PERSONAL |
| authType |
string |
Yes |
The type of the service authorization. Valid values:
|
CREDENTIAL |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The ID of the request. |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorMessage |
string |
The error message. |
"" |
| errorCode |
string |
The error code. |
"" |
| success |
boolean |
Indicates whether the API call is successful. Valid values: true and false. |
true |
| id |
integer |
The ID of the service connection. |
19224 |
Examples
Success response
JSON format
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS\n",
"errorMessage": "\"\"",
"errorCode": "\"\"",
"success": true,
"id": 19224
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParam.ParamNotPresent | The parameter is invalid. | The parameter is invalid. |
| 400 | InvalidUser.NotFound | The user that is invoking the API service is not a registered user. | The user that is invoking the API service is not a registered user. |
| 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. | The organization is not found. Please check the organization ID. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.