#[non_exhaustive]pub struct InstanceNetworkConfig {
pub authorized_external_networks: Vec<AuthorizedNetwork>,
pub enable_public_ip: bool,
pub enable_outbound_public_ip: bool,
pub network: String,
pub allocated_ip_range_override: String,
/* private fields */
}Expand description
Metadata related to instance-level network configuration.
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.Optional. A list of external network authorized to access this instance.
enable_public_ip: boolOptional. Enabling public ip for the instance.
enable_outbound_public_ip: boolOptional. Enabling an outbound public IP address to support a database server sending requests out into the internet.
network: StringOutput only. The resource link for the VPC network in which instance
resources are created and from which they are accessible via Private IP.
This will be the same value as the parent cluster’s network. It is
specified in the form: //
projects/{project_number}/global/networks/{network_id}.
allocated_ip_range_override: StringOptional. Name of the allocated IP range for the private IP AlloyDB instance, for example: “google-managed-services-default”. If set, the instance IPs will be created from this allocated range and will override the IP range used by the parent cluster. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?.
Implementations§
Source§impl InstanceNetworkConfig
impl InstanceNetworkConfig
pub fn new() -> Self
Sets the value of authorized_external_networks.
§Example
use google_cloud_alloydb_v1::model::instance::instance_network_config::AuthorizedNetwork;
let x = InstanceNetworkConfig::new()
.set_authorized_external_networks([
AuthorizedNetwork::default()/* use setters */,
AuthorizedNetwork::default()/* use (different) setters */,
]);Sourcepub fn set_enable_public_ip<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_public_ip<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_public_ip.
§Example
let x = InstanceNetworkConfig::new().set_enable_public_ip(true);Sourcepub fn set_enable_outbound_public_ip<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_outbound_public_ip<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_outbound_public_ip.
§Example
let x = InstanceNetworkConfig::new().set_enable_outbound_public_ip(true);Sourcepub fn set_network<T: Into<String>>(self, v: T) -> Self
pub fn set_network<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_allocated_ip_range_override<T: Into<String>>(self, v: T) -> Self
pub fn set_allocated_ip_range_override<T: Into<String>>(self, v: T) -> Self
Sets the value of allocated_ip_range_override.
§Example
let x = InstanceNetworkConfig::new().set_allocated_ip_range_override("example");Trait Implementations§
Source§impl Clone for InstanceNetworkConfig
impl Clone for InstanceNetworkConfig
Source§fn clone(&self) -> InstanceNetworkConfig
fn clone(&self) -> InstanceNetworkConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more