I am writing automation to update softlayer's S3 account keys. I know I can do it via UI. Is there any option to do it via api (python / java/ rest/ cli)?
I could not see anything in slcli
nor can I see any rest endpoint here:
There is not possible to update the credentials or ACCESS KEYS of a S3 by control portal and api, you can only create and delete the credentials (ACCESS KEYS).
The Object Storage S3 has a limit of 2 credentials by default. If you already have 2 credentials created, you must delete one of them in order to create another.
To know the limit of your credentials for your S3, use the following rest call:
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Network_Storage_Hub_Cleversafe_Account/[networkStorageAccountId]/getCredentialLimit
To retrieve the credentials, use the below rest call:
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Network_Storage_Hub_Cleversafe_Account/[networkStorageAccountId]/getCredentials
To create a credential use this rest call:
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Network_Storage_Hub_Cleversafe_Account/[networkStorageAccountId]/credentialCreate
To delete a credential:
Method: POST
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Network_Storage_Hub_Cleversafe_Account/[networkStorageAccountId]/credentialDelete
Body: Json
{
"parameters":[
{
"id": 11111
}
]
}
Replace the 11111 data with your credentialId.