Answers for "ec2 describeAddresses to get instance id"

0

ec2 describeAddresses to get instance id

/* This example describes your Elastic IP addresses for use with instances in EC2-Classic. */

 var params = {
  Filters: [
     {
    Name: "domain", 
    Values: [
       "standard"
    ]
   }
  ]
 };
 ec2.describeAddresses(params, function(err, data) {
   if (err) console.log(err, err.stack); // an error occurred
   else     console.log(data);           // successful response
   /*
   data = {
    Addresses: [
       {
      Domain: "standard", 
      InstanceId: "i-1234567890abcdef0", 
      PublicIp: "198.51.100.0"
     }
    ]
   }
   */
 });
Posted by: Guest on September-06-2021

Code answers related to "ec2 describeAddresses to get instance id"

Browse Popular Code Answers by Language