Struct google_api_proto::google::cloud::compute::v1::BulkInsertInstanceResource
source · pub struct BulkInsertInstanceResource {
pub count: Option<i64>,
pub instance_properties: Option<InstanceProperties>,
pub location_policy: Option<LocationPolicy>,
pub min_count: Option<i64>,
pub name_pattern: Option<String>,
pub per_instance_properties: BTreeMap<String, BulkInsertInstanceResourcePerInstanceProperties>,
pub source_instance_template: Option<String>,
}
Expand description
A transient resource used in compute.instances.bulkInsert and compute.regionInstances.bulkInsert . This resource is not persisted anywhere, it is used only for processing the requests.
Fields§
§count: Option<i64>
The maximum number of instances to create.
instance_properties: Option<InstanceProperties>
The instance properties defining the VM instances to be created. Required if sourceInstanceTemplate is not provided.
location_policy: Option<LocationPolicy>
Policy for chosing target zone. For more information, see Create VMs in bulk .
min_count: Option<i64>
The minimum number of instances to create. If no min_count is specified then count is used as the default value. If min_count instances cannot be created, then no instances will be created and instances already created will be deleted.
name_pattern: Option<String>
The string pattern used for the names of the VMs. Either name_pattern or per_instance_properties must be set. The pattern must contain one continuous sequence of placeholder hash characters (#) with each character corresponding to one digit of the generated instance name. Example: a name_pattern of inst-#### generates instance names such as inst-0001 and inst-0002. If existing instances in the same project and zone have names that match the name pattern then the generated instance numbers start after the biggest existing number. For example, if there exists an instance with name inst-0050, then instance names generated using the pattern inst-#### begin with inst-0051. The name pattern placeholder #…# can contain up to 18 characters.
per_instance_properties: BTreeMap<String, BulkInsertInstanceResourcePerInstanceProperties>
Per-instance properties to be set on individual instances. Keys of this map specify requested instance names. Can be empty if name_pattern is used.
source_instance_template: Option<String>
Specifies the instance template from which to create instances. You may combine sourceInstanceTemplate with instanceProperties to override specific values from an existing instance template. Bulk API follows the semantics of JSON Merge Patch described by RFC 7396. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate This field is optional.
Implementations§
source§impl BulkInsertInstanceResource
impl BulkInsertInstanceResource
sourcepub fn source_instance_template(&self) -> &str
pub fn source_instance_template(&self) -> &str
Returns the value of source_instance_template
, or the default value if source_instance_template
is unset.
sourcepub fn name_pattern(&self) -> &str
pub fn name_pattern(&self) -> &str
Returns the value of name_pattern
, or the default value if name_pattern
is unset.
Trait Implementations§
source§impl Clone for BulkInsertInstanceResource
impl Clone for BulkInsertInstanceResource
source§fn clone(&self) -> BulkInsertInstanceResource
fn clone(&self) -> BulkInsertInstanceResource
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BulkInsertInstanceResource
impl Debug for BulkInsertInstanceResource
source§impl Default for BulkInsertInstanceResource
impl Default for BulkInsertInstanceResource
source§impl Message for BulkInsertInstanceResource
impl Message for BulkInsertInstanceResource
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for BulkInsertInstanceResource
impl PartialEq for BulkInsertInstanceResource
source§fn eq(&self, other: &BulkInsertInstanceResource) -> bool
fn eq(&self, other: &BulkInsertInstanceResource) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BulkInsertInstanceResource
Auto Trait Implementations§
impl Freeze for BulkInsertInstanceResource
impl RefUnwindSafe for BulkInsertInstanceResource
impl Send for BulkInsertInstanceResource
impl Sync for BulkInsertInstanceResource
impl Unpin for BulkInsertInstanceResource
impl UnwindSafe for BulkInsertInstanceResource
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request