Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services action DescribeImageAttribute对此web服务无效_Amazon Web Services_Amazon Ec2 - Fatal编程技术网

Amazon web services action DescribeImageAttribute对此web服务无效

Amazon web services action DescribeImageAttribute对此web服务无效,amazon-web-services,amazon-ec2,Amazon Web Services,Amazon Ec2,我试图获取我的AWS AMI的产品代码,根据,我生成了请求并启动了它。 我得到了这样的回应 <Response> <Errors> <Error> <Code>InvalidAction</Code> <Message> The action DescribeImageAttribute is not valid for this web service. </Message> </Error> &l

我试图获取我的AWS AMI的产品代码,根据,我生成了请求并启动了它。 我得到了这样的回应

<Response>
<Errors>
<Error>
<Code>InvalidAction</Code>
<Message>
The action DescribeImageAttribute is not valid for this web service.
</Message>
</Error>
</Errors>
<RequestID>b17b3f04-f7e6-47c7-a379-cb3d9a902865</RequestID>
</Response>

生成的URL是:

您的请求似乎缺少
Version
属性,因此服务显然假设您是一些非常旧的代码,只知道非常旧的EC2 API版本,因此它将请求传递给旧的请求处理程序,而该处理程序不知道您在请求什么,并以错误响应

在签署请求之前,您需要在查询中输入
&Version=2016-11-15
,其中
2016-11-15
是当前的API发布版本,显示在API参考手册的每页顶部。每个AWS服务的日期都不同


这是AWS在API级别不破坏东西的一种方法。请求和响应中不兼容的更改被部署为新的API版本,因此旧代码不会失败。

谢谢您的回答。这有帮助。