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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more