CreateServiceConnection

Updated at:

Creates a service connection.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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:

  • customGitlab :

    Self-managed GitLab.

  • ess :

    Auto Scaling.

  • ack :

    Container Service for Kubernetes.

  • bitbucket :

    Bitbucket

  • docker_register_aliyun :

    Container Registry.

  • oss :

    Object Storage Service.

  • git :

    General Git.

  • ecs :

    Elastic Compute Service.

  • emas :

    Enterprise Mobile Application Studio.

  • sae :

    Serverless App Engine.

  • Codeup :

    Codeup.

  • ros :

    Resource Orchestration Service.

  • gitlab :

    GitLab

  • fc :

    Function Compute.

  • edas :

    Enterprise Distributed Application Service.

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 :

    Private.

  • CUSTOM :

    Custom.

  • GLOBAL :

    Public.

PERSONAL

authType

string

Yes

The type of the service authorization.

Valid values:

  • AUTHENTICATION :

    Service authorization.

  • CREDENTIAL :

    Service certificate.

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.