2017 © Pedro Peláez
 

library ec2-metadata-getter

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

image

d9magai/ec2-metadata-getter

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  • Tuesday, March 8, 2016
  • by d9magai
  • Repository
  • 1 Watchers
  • 2 Stars
  • 74 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

ec2-metadata Build Status

This tool is a rewrite of the EC2 Instance Metadata API for PHP., (*1)

This is a fork of d9magai/Ec2MetadataGetter., (*2)

The differences from the fork are:, (*3)

  • An additional method called getMultiple which fetches multiple instance attributes specified in an array
  • Caching support. The same request repeated twice on the same machine will give a cached response.
  • Custom caching directory. The constructor now takes a cache storage directory and uses that.
  • Support for returning dummy data

Usage:

In composer.json, (*4)

"require": {
    "razorpay/ec2-metadata": "dev-master"
}

In your code:, (*5)

getNetwork(); // Will return network info

// You can also enable use in dev environments with the following call:

$client->allowDummy();

$client->getAmiId(); // Will always return "ami-12345678"

// Another extra feature from the upstream is the inclusion of a getMultiple method:
// Dummy is always given priority

$client->getMultiple(['Network', ['AmiId']]);

// This returns both Network and AmiId in a properly keyed array

?>

LICENSE

This is licensed under the MIT License., (*6)

The Versions

08/03 2016

dev-master

9999999-dev

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • mikey179/vfsstream 1.3.*

 

The Development Requires

27/08 2014

1.1.3

1.1.3.0

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

20/08 2014

1.1.2

1.1.2.0

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

20/08 2014

1.1.1

1.1.1.0

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

19/08 2014

1.1.0

1.1.0.0

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

14/08 2014

1.0.3

1.0.3.0

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

03/12 2013

1.0.2

1.0.2.0

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

03/12 2013

1.0.1

1.0.1.0

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

03/12 2013

0.1.0

0.1.0.0

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

03/12 2013

1.0.0

1.0.0.0

This tool is a rewrite of the EC2 Instance Metadata API for PHP.

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires