我的EC2实例标记为键environment
和值production
。我试图使用以下内容返回它们:
$result = $ec2_client->describeInstances(array(
"Filters" => array(
array(
"Name" => "tag",
"Value" => array(
"environment=production"
)
)
)
));
以上错误消失了。
如何以正确的方式指定此方法调用?
答案 0 :(得分:1)
正确的格式是:
$result = $ec2_client->describeInstances(array(
"Filters" => array(
array(
"Name" => "tag:environment",
"Value" => array(
"production"
)
)
)
));