lundi 27 juillet 2015

Correct usage of describeInstances amazon ec2

I am trying to use the describeInstances function in amazon ec2 to get details about my instance using my tag id. In the documentation it mentions use the filter,

tag:key=value - The key/value combination of a tag assigned to the resource, where tag:key is the tag's key.

I tried it in the following way:

var params1 = {
            Filters : [
                {
                    Tags      : [ {
                        Key   : key_name,
                        Value : key_value
                    } ]
                }
            ]
        };

ec2.describeInstances(params1, function(data, err) {
})

, but I get an error: Unexpected Token at Tags : What is the correct way to use this api?




Aucun commentaire:

Enregistrer un commentaire