我正在尝试为Amazon EC2实例创建一个名为Name和值hostname 的新标记apphostname.
下面是我的代码,它失败并显示以下错误消息:
>>> ec2.create_tags(["i-1923943832310"], {"name": "apphostname"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/botocore/client.py", line 157, in _api_call
"%s() only accepts keyword arguments." % py_operation_name)
TypeError: create_tags() only accepts keyword arguments.
>>>
Run Code Online (Sandbox Code Playgroud)