简体   繁体   English

如何使用CLI为IBM Cloud Object Storage创建HMAC凭证?

[英]How do I create HMAC credentials for IBM Cloud Object Storage using the CLI?

I am using the IBM Cloud CLI and tried to generate credentials for my cloud object storage service. 我正在使用IBM Cloud CLI,并尝试为我的云对象存储服务生成凭证。 However, the following command does not create HMAC credentials needed for using some S3 tools and APIs: 但是,以下命令不会创建使用某些S3工具和API所需的HMAC凭据:

ibmcloud resource service-key-create cos-hmac-cli Writer --instance-name myobjectstorage 

How can I create HMAC credentials using the command line interface? 如何使用命令行界面创建HMAC凭证?

The trick is to provide an additional parameter that tells the service to generate the HMAC part, too: 技巧是提供一个额外的参数,告诉服务也要生成HMAC部分:

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. --parameters '{"HMAC":true}'以JSON格式添加功能请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM