https://github.com/extrawurst/aws-d-metadata
helper library to fetch meta data of an ec2 instance from within a vide.d application
https://github.com/extrawurst/aws-d-metadata
Last synced: over 1 year ago
JSON representation
helper library to fetch meta data of an ec2 instance from within a vide.d application
- Host: GitHub
- URL: https://github.com/extrawurst/aws-d-metadata
- Owner: extrawurst
- License: mit
- Created: 2014-07-28T12:46:05.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-10-14T09:15:37.000Z (over 11 years ago)
- Last Synced: 2025-01-25T21:12:57.815Z (over 1 year ago)
- Language: D
- Size: 168 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
aws-d-metadata
==============
Helper library to fetch meta data of an ec2 instance from within a vide.d application.
usage
=============
this is a dub compatible package.
add it as a dependency in your dub.json
```
{
...,
"dependencies": {
"aws-d-metadata": ">=0.0.1",
},
}
```
in your code:
```
import awsd.metadata;
shared static this()
{
// get a specific MetaData (see amazon docs for all possiblities)
writefln("%s", Ec2GetMetaData("/latest/meta-data/"));
// shorthand method to retrieve instance id
writefln("instance-id: %s", Ec2GetInstanceId());
}
```
For the possible request urls see amazon docs on "Instance Metadata and User Data" here:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html