EnableDeployKey
Enables an existing deploy key in a code repository.
Try it now
Test
RAM authorization
Request syntax
POST /repository/{repositoryId}/keys/{keyId}/enable HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| repositoryId |
integer |
Yes |
The code repository ID. |
2709413 |
| keyId |
integer |
Yes |
The deploy key ID. |
50998 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The enterprise ID. It is a string that can be obtained from the Yunxiao URL, such as https://devops.aliyun.com/organization/[OrganizationId]. |
60de7a6852743a5162b5f957 |
| accessToken |
string |
No |
The personal access token. This parameter is not required if you use an Alibaba Cloud AccessKey pair or Security Token Service (STS) for temporary authorization. |
f0b1e61db5961df5975a93f9129d2513 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID. |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorCode |
string |
The error code. |
Openapi.RequestError |
| errorMessage |
string |
The error message. |
"" |
| success |
boolean |
Indicates whether the call was successful. |
true |
| result |
object |
The returned result. |
|
| result |
boolean |
Indicates whether the key was enabled successfully. |
true |
Examples
Success response
JSON format
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorCode": "Openapi.RequestError",
"errorMessage": "\"\"",
"success": true,
"result": {
"result": true
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden.AccessDenied | The user is not authorized to perform the operation. | The user is not authorized to perform the operation. |
| 403 | Forbidden.UserNotInCurrentOrganization | The user is not in the organization and is not authorized to perform the operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.