使用 aws cli 运行 create Secrets Manager 命令时出现错误
我正在尝试使用 aws cli 命令创建一个秘密管理器。我尝试的命令是
aws secretsmanager create-secret \
--name sample_auth_aws_secret1 \
--description "My test secret created with the CLI." \
-- tags {"env":"dev","sample=test"} \
--secret-string "{\"clientId\":\"sample123\",\"secret\":\"wjwjwjwjwjwjwjsjsjsj\"}"
我收到错误
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: env:dev, sample=test, --secret-string, {"clientId":"sample123","secret":"wjwjwjwjwjwjwjsjsjsj"}, tags
我做错了什么?
I am trying to create one secrets manager using aws cli command. The command I tried is
aws secretsmanager create-secret \
--name sample_auth_aws_secret1 \
--description "My test secret created with the CLI." \
-- tags {"env":"dev","sample=test"} \
--secret-string "{\"clientId\":\"sample123\",\"secret\":\"wjwjwjwjwjwjwjsjsjsj\"}"
I am getting error
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
Unknown options: env:dev, sample=test, --secret-string, {"clientId":"sample123","secret":"wjwjwjwjwjwjwjsjsjsj"}, tags
What did I do wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的命令有两个问题。
请使用下面的命令
There are two problems in your command.
please use below command
您在
--
和tags
之间有一个空格:它应该是:
另外,您设置标签的语法完全错误。您在第一个标记中使用
:
,在第二个标记中使用=
,但您的整体语法无论如何都是错误的。我建议查看文档并复制他们的例子。应该是:
You have a space here between the
--
andtags
:It should be:
Also, you're syntax is totally wrong for setting tags. You're using
:
in the first tag, and=
in the 2nd tag, but your overall syntax is wrong anyway. I suggest looking at the documentation and copying their examples.It should be:
它与您传递的
标签
有关。您需要正确的键和值分配。尝试传递工作简写:
--tags Key="env",Value="dev" Key="sample",Value="test" \
It has to do with the
tags
that you are passing. You need a proper Key and Value assignment.Try passing the working shorthand:
--tags Key="env",Value="dev" Key="sample",Value="test" \