#[non_exhaustive]pub struct PscAutoConnection {
pub psc_connection_id: String,
pub ip_address: String,
pub forwarding_rule: String,
pub project_id: String,
pub network: String,
pub service_attachment: String,
pub psc_connection_status: PscConnectionStatus,
pub connection_type: ConnectionType,
pub ports: Option<Ports>,
/* private fields */
}Expand description
Details of consumer resources in a PSC connection.
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.psc_connection_id: StringOutput only. The PSC connection id of the forwarding rule connected to the service attachment.
ip_address: StringOutput only. The IP allocated on the consumer network for the PSC forwarding rule.
forwarding_rule: StringOutput only. The URI of the consumer side forwarding rule. Format: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
project_id: StringRequired. The consumer project_id where PSC connections are established. This should be the same project_id that the instance is being created in.
network: StringRequired. The network where the PSC endpoints are created, in the form of projects/{project_id}/global/networks/{network_id}.
service_attachment: StringOutput only. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
psc_connection_status: PscConnectionStatusOutput only. The status of the PSC connection: whether a connection exists and ACTIVE or it no longer exists. Please note that this value is updated periodically. Please use Private Service Connect APIs for the latest status.
connection_type: ConnectionTypeOutput only. Type of the PSC connection.
ports: Option<Ports>Ports of the exposed endpoint.
Implementations§
Source§impl PscAutoConnection
impl PscAutoConnection
pub fn new() -> Self
Sourcepub fn set_psc_connection_id<T: Into<String>>(self, v: T) -> Self
pub fn set_psc_connection_id<T: Into<String>>(self, v: T) -> Self
Sets the value of psc_connection_id.
§Example
let x = PscAutoConnection::new().set_psc_connection_id("example");Sourcepub fn set_ip_address<T: Into<String>>(self, v: T) -> Self
pub fn set_ip_address<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_forwarding_rule<T: Into<String>>(self, v: T) -> Self
pub fn set_forwarding_rule<T: Into<String>>(self, v: T) -> Self
Sets the value of forwarding_rule.
§Example
let x = PscAutoConnection::new().set_forwarding_rule("example");Sourcepub fn set_project_id<T: Into<String>>(self, v: T) -> Self
pub fn set_project_id<T: Into<String>>(self, v: T) -> Self
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_service_attachment<T: Into<String>>(self, v: T) -> Self
pub fn set_service_attachment<T: Into<String>>(self, v: T) -> Self
Sets the value of service_attachment.
§Example
let x = PscAutoConnection::new().set_service_attachment("example");Sourcepub fn set_psc_connection_status<T: Into<PscConnectionStatus>>(
self,
v: T,
) -> Self
pub fn set_psc_connection_status<T: Into<PscConnectionStatus>>( self, v: T, ) -> Self
Sets the value of psc_connection_status.
§Example
use google_cloud_memorystore_v1::model::PscConnectionStatus;
let x0 = PscAutoConnection::new().set_psc_connection_status(PscConnectionStatus::Active);
let x1 = PscAutoConnection::new().set_psc_connection_status(PscConnectionStatus::NotFound);Sourcepub fn set_connection_type<T: Into<ConnectionType>>(self, v: T) -> Self
pub fn set_connection_type<T: Into<ConnectionType>>(self, v: T) -> Self
Sets the value of connection_type.
§Example
use google_cloud_memorystore_v1::model::ConnectionType;
let x0 = PscAutoConnection::new().set_connection_type(ConnectionType::Discovery);
let x1 = PscAutoConnection::new().set_connection_type(ConnectionType::Primary);
let x2 = PscAutoConnection::new().set_connection_type(ConnectionType::Reader);Trait Implementations§
Source§impl Clone for PscAutoConnection
impl Clone for PscAutoConnection
Source§fn clone(&self) -> PscAutoConnection
fn clone(&self) -> PscAutoConnection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more