- URL:
- https://<root>/cloud/services/<serviceID>/credential/add
- Methods:
POST
- Required Capability:
- Access allowed only with the default administrator role
- Version Introduced:
- 11.2
Description
The credential/add
operation updates the credentials for a cloud service. Its a security best practice to rotate credentials at regular intervals if the cloud service utilizes key-based authentication models. To update credentials, the request needs to include the credential
information for the service, which is returned by the Services resource.
Once submitted, the request will return a job ID. The HTML view returns a link that can be used to access the job page for the request. Otherwise, to access the job
resource you can make a request of the following form:
https://organization.domain.com/context/admin/jobs/<jobID>
Request parameters
Parameter | Details |
---|---|
| The updated connection information. The current connection information can be retrieved from the Services resource and modified with the updated credentials. Examples
|
| The response format. The default format is Values: |
Example usage
The following is a sample POST request for the credential/add
operation:
POST /context/admin/clouds/services/eg7hrelq6b/credential/add HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
credential={"type":"STORAGE-ACCOUNT-KEY","secret": {"storageAccountName": "{crypt}R68p/cvTUo1LmRcgXJ5U07WKv936mnCe","storageAccountKey": "{crypt}xxxxxxxxxxxxxxxxVC5M"}}&f=pjson&token=m7zGSezM7znt6ZuIwr827imJxOTSDsjYujVdd7SiAQLYG1HmesG8EbSnTwCbiekEh0QwRdmeyp1hP63M60TPrdZQ2NzIg5G7qFaQh40MdiOCfh60-6oPKC2MNoqwdVDZ3srzreVZb66QofWXws8GMrKWkgP45A-2an5crKvReUo-pwvkzm68W87Q0yPJFA2Kww39UnMYNw-5qd2-Bt04VmkrqKI-lCbA-jFZY_UGzeGzNqnBGrjKuVB_q17HogMw
JSON Response example
{
"cloudCredentialRotationJobId": j876ae6e7-27d9-4b2d-b8ab-d07e2433e2c1",
"message": "A cloud credentials rotation job is in-progress"
}