标签:
1 // Create the instance 2 ec2.runInstances(params, function(err, data) { 3 if (err) { 4 console.log("Could not create instance", err); 5 return; 6 } 7 8 var instanceId = data.Instances[0].InstanceId; 9 console.log("Created instance: ", instanceId); 10 11 // Add tags to the instance 12 params = { 13 Resources: [instanceId], 14 Tags: [{ 15 Key: ‘Name‘, 16 Value: ‘Test_01‘ 17 }] 18 }; 19 20 ec2.createTags(params, function(err) { 21 console.log("Tagging instance", err ? "failure" : "success"); 22 }); 23 });
标签:
原文地址:http://www.cnblogs.com/marshallguo/p/5870471.html