Struct digitalocean::prelude::Action
source · pub struct Action { /* private fields */ }
Expand description
Actions are records of events that have occurred on the resources in your account. These can be things like rebooting a Droplet, or transferring an image to a new region.
An action object is created every time one of these actions is initiated. The action object contains information about the current status of the action, start and complete timestamps, and the associated resource type and ID.
Every action that creates an action object is available through this endpoint. Completed actions are not removed from this list and are always available for querying.
Implementations§
source§impl Action
impl Action
sourcepub fn id(&self) -> &usize
pub fn id(&self) -> &usize
A unique identifier for each Droplet action event. This is used to reference a specific action that was requested.
sourcepub fn status(&self) -> &String
pub fn status(&self) -> &String
The current status of the action. The value of this attribute will be “in-progress”, “completed”, or “errored”.
sourcepub fn started_at(&self) -> &DateTime<Utc>
pub fn started_at(&self) -> &DateTime<Utc>
The type of action that the event is executing (reboot, power_off, etc.).
sourcepub fn completed_at(&self) -> &Option<DateTime<Utc>>
pub fn completed_at(&self) -> &Option<DateTime<Utc>>
A time value given in ISO8601 combined date and time format that represents when the action was completed.
sourcepub fn resource_id(&self) -> &usize
pub fn resource_id(&self) -> &usize
A unique identifier for the resource that the action is associated with.
sourcepub fn resource_type(&self) -> &String
pub fn resource_type(&self) -> &String
The type of resource that the action is associated with.
sourcepub fn region_slug(&self) -> &Option<String>
pub fn region_slug(&self) -> &Option<String>
A slug representing the region where the action occurred.