Module erlcloud_ec2_meta

Function Index

get_instance_dynamic_data/0
get_instance_dynamic_data/1
get_instance_dynamic_data/2
get_instance_metadata/0
get_instance_metadata/1
get_instance_metadata/2Retrieve the instance meta data for the instance this code is running on.
get_instance_user_data/0
get_instance_user_data/1Retrieve the user data for the instance this code is running on.

Function Details

get_instance_dynamic_data/0

get_instance_dynamic_data() -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}

get_instance_dynamic_data/1

get_instance_dynamic_data(Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}

get_instance_dynamic_data/2

get_instance_dynamic_data(ItemPath::string(), Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}

get_instance_metadata/0

get_instance_metadata() -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}

get_instance_metadata/1

get_instance_metadata(Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}

get_instance_metadata/2

get_instance_metadata(ItemPath::string(), Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}

Retrieve the instance meta data for the instance this code is running on. Will fail if not an EC2 instance.

This convenience function will retrieve the instance id from the AWS metadata available at http://169.254.169.254/latest/meta-data/* ItemPath allows fetching specific pieces of metadata.

get_instance_user_data/0

get_instance_user_data() -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}

get_instance_user_data/1

get_instance_user_data(Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}

Retrieve the user data for the instance this code is running on. Will fail if not an EC2 instance.

This convenience function will retrieve the user data the instance was started with, i.e. what's available at http://169.254.169.254/latest/user-data


Generated by EDoc