问题
I am using the IBM Cloud CLI and tried to generate credentials for my cloud object storage service. However, the following command does not create HMAC credentials needed for using some S3 tools and APIs:
ibmcloud resource service-key-create cos-hmac-cli Writer --instance-name myobjectstorage
How can I create HMAC credentials using the command line interface?
回答1:
The trick is to provide an additional parameter that tells the service to generate the HMAC part, too:
ibmcloud resource service-key-create cos-hmac-cli Writer \
--instance-name myobjectstorage --parameters '{"HMAC":true}'
The --parameters '{"HMAC":true}'
adds the feature request in JSON format.
来源:https://stackoverflow.com/questions/51632767/how-do-i-create-hmac-credentials-for-ibm-cloud-object-storage-using-the-cli