| generate_session_token/1 | |
| generate_session_token/2 | Generate session token Will fail if not an EC2 instance. |
| get_instance_dynamic_data/0 | |
| get_instance_dynamic_data/1 | |
| get_instance_dynamic_data/2 | |
| get_instance_dynamic_data/3 | |
| get_instance_metadata/0 | |
| get_instance_metadata/1 | |
| get_instance_metadata/2 | |
| get_instance_metadata/3 | Retrieve the instance meta data for the instance this code is running on. |
| get_instance_user_data/0 | |
| get_instance_user_data/1 | |
| get_instance_user_data/2 | Retrieve the user data for the instance this code is running on. |
generate_session_token(DurationSecs::non_neg_integer()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
generate_session_token(DurationSecs::non_neg_integer(), Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
Generate session token Will fail if not an EC2 instance.
This convenience function will generate the IMDSv2 session token from the AWS metadata available at http://<host:port>/latest/latest/api/token ItemPath allows fetching specific pieces of metadata. <host:port> defaults to 169.254.169.254get_instance_dynamic_data() -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
get_instance_dynamic_data(Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
get_instance_dynamic_data(ItemPath::string(), Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
get_instance_dynamic_data(ItemPath::string(), Config::aws_config(), Token::undefined | binary()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
get_instance_metadata() -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
get_instance_metadata(Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
get_instance_metadata(ItemPath::string(), Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
get_instance_metadata(ItemPath::string(), Config::aws_config(), Token::undefined | binary()) -> {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://<host:port>/latest/meta-data/* ItemPath allows fetching specific pieces of metadata. <host:port> defaults to 169.254.169.254
get_instance_user_data() -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
get_instance_user_data(Config::aws_config()) -> {ok, binary()} | {error, erlcloud_aws:httpc_result_error()}
get_instance_user_data(Config::aws_config(), Token::undefined | binary()) -> {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://<host:port>/latest/user-data <host:port> defaults to 169.254.169.254
Generated by EDoc