InstanceGroupConfig

Struct InstanceGroupConfig 

Source
#[non_exhaustive]
pub struct InstanceGroupConfig {
Show 14 fields pub num_instances: i32, pub instance_names: Vec<String>, pub instance_references: Vec<InstanceReference>, pub image_uri: String, pub machine_type_uri: String, pub disk_config: Option<DiskConfig>, pub is_preemptible: bool, pub preemptibility: Preemptibility, pub managed_group_config: Option<ManagedGroupConfig>, pub accelerators: Vec<AcceleratorConfig>, pub min_cpu_platform: String, pub min_num_instances: i32, pub instance_flexibility_policy: Option<InstanceFlexibilityPolicy>, pub startup_config: Option<StartupConfig>, /* private fields */
}
Expand description

The config settings for Compute Engine resources in an instance group, such as a master or worker group.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§num_instances: i32

Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1.

§instance_names: Vec<String>

Output only. The list of instance names. Dataproc derives the names from cluster_name, num_instances, and the instance group.

§instance_references: Vec<InstanceReference>

Output only. List of references to Compute Engine instances.

§image_uri: String

Optional. The Compute Engine image resource used for cluster instances.

The URI can represent an image or image family.

Image examples:

  • <https://www.googleapis.com/compute/v1/projects/>[project_id]/global/images/[image-id]
  • projects/[project_id]/global/images/[image-id]
  • image-id

Image family examples. Dataproc will use the most recent image from the family:

  • <https://www.googleapis.com/compute/v1/projects/>[project_id]/global/images/family/[custom-image-family-name]
  • projects/[project_id]/global/images/family/[custom-image-family-name]

If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system default.

§machine_type_uri: String

Optional. The Compute Engine machine type used for cluster instances.

A full URL, partial URI, or short name are valid. Examples:

  • <https://www.googleapis.com/compute/v1/projects/>[project_id]/zones/[zone]/machineTypes/n1-standard-2
  • projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2
  • n1-standard-2

Auto Zone Exception: If you are using the Dataproc Auto Zone Placement feature, you must use the short name of the machine type resource, for example, n1-standard-2.

§disk_config: Option<DiskConfig>

Optional. Disk option config settings.

§is_preemptible: bool

Output only. Specifies that this instance group contains preemptible instances.

§preemptibility: Preemptibility

Optional. Specifies the preemptibility of the instance group.

The default value for master and worker groups is NON_PREEMPTIBLE. This default cannot be changed.

The default value for secondary instances is PREEMPTIBLE.

§managed_group_config: Option<ManagedGroupConfig>

Output only. The config for Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.

§accelerators: Vec<AcceleratorConfig>

Optional. The Compute Engine accelerator configuration for these instances.

§min_cpu_platform: String

Optional. Specifies the minimum cpu platform for the Instance Group. See Dataproc -> Minimum CPU Platform.

§min_num_instances: i32

Optional. The minimum number of primary worker instances to create. If min_num_instances is set, cluster creation will succeed if the number of primary workers created is at least equal to the min_num_instances number.

Example: Cluster creation request with num_instances = 5 and min_num_instances = 3:

  • If 4 VMs are created and 1 instance fails, the failed VM is deleted. The cluster is resized to 4 instances and placed in a RUNNING state.
  • If 2 instances are created and 3 instances fail, the cluster in placed in an ERROR state. The failed VMs are not deleted.
§instance_flexibility_policy: Option<InstanceFlexibilityPolicy>

Optional. Instance flexibility Policy allowing a mixture of VM shapes and provisioning models.

§startup_config: Option<StartupConfig>

Optional. Configuration to handle the startup of instances during cluster create and update process.

Implementations§

Source§

impl InstanceGroupConfig

Source

pub fn new() -> Self

Source

pub fn set_num_instances<T: Into<i32>>(self, v: T) -> Self

Sets the value of num_instances.

Source

pub fn set_instance_names<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of instance_names.

Source

pub fn set_instance_references<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<InstanceReference>,

Sets the value of instance_references.

Source

pub fn set_image_uri<T: Into<String>>(self, v: T) -> Self

Sets the value of image_uri.

Source

pub fn set_machine_type_uri<T: Into<String>>(self, v: T) -> Self

Sets the value of machine_type_uri.

Source

pub fn set_disk_config<T>(self, v: T) -> Self
where T: Into<DiskConfig>,

Sets the value of disk_config.

Source

pub fn set_or_clear_disk_config<T>(self, v: Option<T>) -> Self
where T: Into<DiskConfig>,

Sets or clears the value of disk_config.

Source

pub fn set_is_preemptible<T: Into<bool>>(self, v: T) -> Self

Sets the value of is_preemptible.

Source

pub fn set_preemptibility<T: Into<Preemptibility>>(self, v: T) -> Self

Sets the value of preemptibility.

Source

pub fn set_managed_group_config<T>(self, v: T) -> Self

Sets the value of managed_group_config.

Source

pub fn set_or_clear_managed_group_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of managed_group_config.

Source

pub fn set_accelerators<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<AcceleratorConfig>,

Sets the value of accelerators.

Source

pub fn set_min_cpu_platform<T: Into<String>>(self, v: T) -> Self

Sets the value of min_cpu_platform.

Source

pub fn set_min_num_instances<T: Into<i32>>(self, v: T) -> Self

Sets the value of min_num_instances.

Source

pub fn set_instance_flexibility_policy<T>(self, v: T) -> Self

Sets the value of instance_flexibility_policy.

Source

pub fn set_or_clear_instance_flexibility_policy<T>(self, v: Option<T>) -> Self

Sets or clears the value of instance_flexibility_policy.

Source

pub fn set_startup_config<T>(self, v: T) -> Self
where T: Into<StartupConfig>,

Sets the value of startup_config.

Source

pub fn set_or_clear_startup_config<T>(self, v: Option<T>) -> Self
where T: Into<StartupConfig>,

Sets or clears the value of startup_config.

Trait Implementations§

Source§

impl Clone for InstanceGroupConfig

Source§

fn clone(&self) -> InstanceGroupConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InstanceGroupConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for InstanceGroupConfig

Source§

fn default() -> InstanceGroupConfig

Returns the “default value” for a type. Read more
Source§

impl Message for InstanceGroupConfig

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for InstanceGroupConfig

Source§

fn eq(&self, other: &InstanceGroupConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for InstanceGroupConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,