#[non_exhaustive]pub struct BatchCreateInstanceStatus {
pub state: State,
pub error_msg: String,
pub error: Option<Status>,
pub type: InstanceType,
/* private fields */
}Expand description
Message for current status of an instance in the BatchCreateInstances operation. For example, lets say a BatchCreateInstances workflow has 4 instances, Instance1 through Instance4. Lets also assume that 2 instances succeeded but the third failed to create and the 4th was never picked up for creation because of failure of the previous one. Then, resulting states would look something like:
- Instance1 = ROLLED_BACK
- Instance2 = ROLLED_BACK
- Instance3 = FAILED
- Instance4 = FAILED
However, while the operation is running, the instance might be in other states including PENDING_CREATE, ACTIVE, DELETING and CREATING. The states / do not get further updated once the operation is done.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.state: StateThe current state of an instance involved in the batch create operation. Once the operation is complete, the final state of the instances in the LRO can be one of:
- ACTIVE, indicating that instances were created successfully
- FAILED, indicating that a particular instance failed creation
- ROLLED_BACK indicating that although the instance was created successfully, it had to be rolled back and deleted due to failure in other steps of the workflow.
error_msg: StringDEPRECATED - Use the error field instead. Error, if any error occurred and is available, during instance creation.
error: Option<Status>The RPC status of the instance creation operation. This field will be present if an error happened during the instance creation.
type: InstanceTypeImplementations§
Source§impl BatchCreateInstanceStatus
impl BatchCreateInstanceStatus
pub fn new() -> Self
Sourcepub fn set_state<T: Into<State>>(self, v: T) -> Self
pub fn set_state<T: Into<State>>(self, v: T) -> Self
Sets the value of state.
§Example
use google_cloud_alloydb_v1::model::batch_create_instance_status::State;
let x0 = BatchCreateInstanceStatus::new().set_state(State::PendingCreate);
let x1 = BatchCreateInstanceStatus::new().set_state(State::Ready);
let x2 = BatchCreateInstanceStatus::new().set_state(State::Creating);Sourcepub fn set_error_msg<T: Into<String>>(self, v: T) -> Self
pub fn set_error_msg<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
Sourcepub fn set_type<T: Into<InstanceType>>(self, v: T) -> Self
pub fn set_type<T: Into<InstanceType>>(self, v: T) -> Self
Sets the value of r#type.
§Example
use google_cloud_alloydb_v1::model::instance::InstanceType;
let x0 = BatchCreateInstanceStatus::new().set_type(InstanceType::Primary);
let x1 = BatchCreateInstanceStatus::new().set_type(InstanceType::ReadPool);
let x2 = BatchCreateInstanceStatus::new().set_type(InstanceType::Secondary);Trait Implementations§
Source§impl Clone for BatchCreateInstanceStatus
impl Clone for BatchCreateInstanceStatus
Source§fn clone(&self) -> BatchCreateInstanceStatus
fn clone(&self) -> BatchCreateInstanceStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more