pub struct TerminateInstanceRequest {
pub instance_id: String,
pub if_match: Option<String>,
pub preserve_boot_volume: Option<bool>,
pub preserve_data_volumes_created_at_launch: Option<bool>,
pub recycle_level: Option<TerminateInstanceRequestRecycleLevel>,
}Fields§
§instance_id: StringThe OCID of the instance.
if_match: Option<String>For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code if-match} parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
preserve_boot_volume: Option<bool>Specifies whether to delete or preserve the boot volume when terminating an instance. When set to {@code true}, the boot volume is preserved. The default value is {@code false}.
preserve_data_volumes_created_at_launch: Option<bool>Specifies whether to delete or preserve the data volumes created during launch when terminating an instance. When set to {@code true}, the data volumes are preserved. The default value is {@code true}.
recycle_level: Option<TerminateInstanceRequestRecycleLevel>This optional parameter overrides recycle level for hosts. The parameter can be used when hosts are associated with a Capacity Reservation. * {@code FULL_RECYCLE} - Does not skip host wipe. This is the default behavior.
Implementations§
Source§impl TerminateInstanceRequest
impl TerminateInstanceRequest
Sourcepub fn new(required: TerminateInstanceRequestRequired) -> Self
pub fn new(required: TerminateInstanceRequestRequired) -> Self
Create a new TerminateInstanceRequest with required fields
Sourcepub fn set_instance_id(self, value: String) -> Self
pub fn set_instance_id(self, value: String) -> Self
Set instance_id
Sourcepub fn set_if_match(self, value: Option<String>) -> Self
pub fn set_if_match(self, value: Option<String>) -> Self
Set if_match
Sourcepub fn set_preserve_boot_volume(self, value: Option<bool>) -> Self
pub fn set_preserve_boot_volume(self, value: Option<bool>) -> Self
Set preserve_boot_volume
Sourcepub fn set_preserve_data_volumes_created_at_launch(
self,
value: Option<bool>,
) -> Self
pub fn set_preserve_data_volumes_created_at_launch( self, value: Option<bool>, ) -> Self
Set preserve_data_volumes_created_at_launch
Sourcepub fn set_recycle_level(
self,
value: Option<TerminateInstanceRequestRecycleLevel>,
) -> Self
pub fn set_recycle_level( self, value: Option<TerminateInstanceRequestRecycleLevel>, ) -> Self
Set recycle_level
Sourcepub fn with_if_match(self, value: impl Into<String>) -> Self
pub fn with_if_match(self, value: impl Into<String>) -> Self
Set if_match (unwraps Option)
Sourcepub fn with_preserve_boot_volume(self, value: bool) -> Self
pub fn with_preserve_boot_volume(self, value: bool) -> Self
Set preserve_boot_volume (unwraps Option)
Sourcepub fn with_preserve_data_volumes_created_at_launch(self, value: bool) -> Self
pub fn with_preserve_data_volumes_created_at_launch(self, value: bool) -> Self
Set preserve_data_volumes_created_at_launch (unwraps Option)
Sourcepub fn with_recycle_level(
self,
value: TerminateInstanceRequestRecycleLevel,
) -> Self
pub fn with_recycle_level( self, value: TerminateInstanceRequestRecycleLevel, ) -> Self
Set recycle_level (unwraps Option)
Trait Implementations§
Source§impl Clone for TerminateInstanceRequest
impl Clone for TerminateInstanceRequest
Source§fn clone(&self) -> TerminateInstanceRequest
fn clone(&self) -> TerminateInstanceRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more