hcloud v0.1.1 HetznerCloud.Actions
This module will cover both action endpoint available on https://docs.hetzner.cloud/#actions
Link to this section Summary
Functions
This will fetch an action performed by the token holder’s account with action ID
This will fetch all the action performed by the token holder’s account ##Example
iex(1)> client = HetznerCloud.Auth.new("yourtoken")
%HetznerCloud.Auth{
token: "yourtoken"
}
iex(2)> HetznerCloud.Actions.actions(client)
%HetznerCloud.Actions{
actions: [
%HetznerCloud.Action{
command: "create_server",
error: nil,
finished: "2018-08-07T12:13:52+00:00",
id: 4342913,
progress: 100,
resources: [%{"id" => 942959, "type" => "server"}],
started: "2018-08-07T12:13:33+00:00",
status: "success"
}
],
meta: %HetznerCloud.Meta.Pagination{
last_page: 1,
next_page: nil,
page: 1,
per_page: 25,
previous_page: nil,
total_entries: 11
}
}
Link to this section Functions
Link to this function
action(client, id)
This will fetch an action performed by the token holder’s account with action ID
##Example
iex(1)> client = HetznerCloud.Auth.new("yourtoken")
%HetznerCloud.Auth{
token: "yourtoken"
}
iex(2)> HetznerCloud.Actions.actions(client, "4342913")
%HetznerCloud.Action{
command: "create_server",
error: nil,
finished: "2018-08-07T12:13:52+00:00",
id: 4342913,
progress: 100,
resources: [%{"id" => 942959, "type" => "server"}],
started: "2018-08-07T12:13:33+00:00",
status: "success"
}
Link to this function
actions(client)
This will fetch all the action performed by the token holder’s account ##Example
iex(1)> client = HetznerCloud.Auth.new("yourtoken")
%HetznerCloud.Auth{
token: "yourtoken"
}
iex(2)> HetznerCloud.Actions.actions(client)
%HetznerCloud.Actions{
actions: [
%HetznerCloud.Action{
command: "create_server",
error: nil,
finished: "2018-08-07T12:13:52+00:00",
id: 4342913,
progress: 100,
resources: [%{"id" => 942959, "type" => "server"}],
started: "2018-08-07T12:13:33+00:00",
status: "success"
}
],
meta: %HetznerCloud.Meta.Pagination{
last_page: 1,
next_page: nil,
page: 1,
per_page: 25,
previous_page: nil,
total_entries: 11
}
}