CreateServiceCredential
Creates a username and password certificate.
Try it now
Test
RAM authorization
Request syntax
POST /organization/{organizationId}/serviceCredentials HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The organization ID. You can obtain the organization ID from the URL of the Yunxiao console, such as https://devops.aliyun.com/organization/[OrgId]. |
5ebbc0228123212b59xxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| name |
string |
Yes |
The name of the service certificate. |
Zhang San's Git certificate |
| type |
string |
Yes |
The type of the service certificate. Default value: USERNAME_PASSWORD. Valid values:
|
USERNAME_PASSWORD |
| scope |
string |
No |
The visibility scope. Example: PERSON. Valid values:
|
PERSON |
| username |
string |
Yes |
The username. |
zhangsan |
| password |
string |
Yes |
The password. |
zhangsan |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID. |
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 |
| id |
integer |
The ID of the service certificate. |
11222 |
Examples
Success response
JSON format
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorMessage": "\"\"",
"errorCode": "\"\"",
"success": true,
"id": 11222
}
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.