#[non_exhaustive]pub struct ServiceAttachment {Show 21 fields
pub connected_endpoints: Vec<ServiceAttachmentConnectedEndpoint>,
pub connection_preference: Option<ConnectionPreference>,
pub consumer_accept_lists: Vec<ServiceAttachmentConsumerProjectLimit>,
pub consumer_reject_lists: Vec<String>,
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub domain_names: Vec<String>,
pub enable_proxy_protocol: Option<bool>,
pub fingerprint: Option<Bytes>,
pub id: Option<u64>,
pub kind: Option<String>,
pub metadata: HashMap<String, String>,
pub name: Option<String>,
pub nat_subnets: Vec<String>,
pub producer_forwarding_rule: Option<String>,
pub propagated_connection_limit: Option<u32>,
pub psc_service_attachment_id: Option<Uint128>,
pub reconcile_connections: Option<bool>,
pub region: Option<String>,
pub self_link: Option<String>,
pub target_service: Option<String>,
/* private fields */
}service-attachments only.Expand description
Represents a ServiceAttachment resource.
A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service.
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.connected_endpoints: Vec<ServiceAttachmentConnectedEndpoint>Output only. [Output Only] An array of connections for all the consumers connected to this service attachment.
connection_preference: Option<ConnectionPreference>The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules.
consumer_accept_lists: Vec<ServiceAttachmentConsumerProjectLimit>Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks or only endpoints.
consumer_reject_lists: Vec<String>Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks.
creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>An optional description of this resource. Provide this property when you create the resource.
domain_names: Vec<String>If specified, the domain name will be used during the integration between the PSC connected endpoints and the Cloud DNS. For example, this is a valid domain name: “p.mycompany.com.”. Current max number of domain names supported is 1.
enable_proxy_protocol: Option<bool>If true, enable the proxy protocol which is for supplying client TCP/IP address data in TCP connections that traverse proxies on their way to destination servers.
fingerprint: Option<Bytes>Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ServiceAttachment. An up-to-date fingerprint must be provided in order to patch/update the ServiceAttachment; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the ServiceAttachment.
id: Option<u64>Output only. [Output Only] The unique identifier for the resource type. The server generates this identifier.
kind: Option<String>Output only. [Output Only] Type of the resource. Alwayscompute#serviceAttachment for service attachments.
metadata: HashMap<String, String>Metadata of the service attachment.
name: Option<String>Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first
character must be a lowercase letter, and all following characters must
be a dash, lowercase letter, or digit, except the last character, which
cannot be a dash.
nat_subnets: Vec<String>An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment.
producer_forwarding_rule: Option<String>The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is serving the endpoint identified by this service attachment.
propagated_connection_limit: Option<u32>The number of consumer spokes that connected Private Service Connect endpoints can be propagated to through Network Connectivity Center. This limit lets the service producer limit how many propagated Private Service Connect connections can be established to this service attachment from a single consumer.
If the connection preference of the service attachment is ACCEPT_MANUAL, the limit applies to each project or network that is listed in the consumer accept list. If the connection preference of the service attachment is ACCEPT_AUTOMATIC, the limit applies to each project that contains a connected endpoint.
If unspecified, the default propagated connection limit is 250.
psc_service_attachment_id: Option<Uint128>Output only. [Output Only] An 128-bit global unique ID of the PSC service attachment.
reconcile_connections: Option<bool>This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints.
- If false, connection policy update will only affect existing PENDING
PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched
regardless how the connection policy is modified .- If true, update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project is added to the reject list.
For newly created service attachment, this boolean defaults to false.
region: Option<String>Output only. [Output Only] URL of the region where the service attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
self_link: Option<String>Output only. [Output Only] Server-defined URL for the resource.
target_service: Option<String>The URL of a service serving the endpoint identified by this service attachment.
Implementations§
Source§impl ServiceAttachment
impl ServiceAttachment
pub fn new() -> Self
Sourcepub fn set_connected_endpoints<T, V>(self, v: T) -> Self
pub fn set_connected_endpoints<T, V>(self, v: T) -> Self
Sets the value of connected_endpoints.
§Example
use google_cloud_compute_v1::model::ServiceAttachmentConnectedEndpoint;
let x = ServiceAttachment::new()
.set_connected_endpoints([
ServiceAttachmentConnectedEndpoint::default()/* use setters */,
ServiceAttachmentConnectedEndpoint::default()/* use (different) setters */,
]);Sourcepub fn set_connection_preference<T>(self, v: T) -> Selfwhere
T: Into<ConnectionPreference>,
pub fn set_connection_preference<T>(self, v: T) -> Selfwhere
T: Into<ConnectionPreference>,
Sets the value of connection_preference.
§Example
use google_cloud_compute_v1::model::service_attachment::ConnectionPreference;
let x0 = ServiceAttachment::new().set_connection_preference(ConnectionPreference::AcceptManual);
let x1 = ServiceAttachment::new().set_connection_preference(ConnectionPreference::Unspecified);Sourcepub fn set_or_clear_connection_preference<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConnectionPreference>,
pub fn set_or_clear_connection_preference<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConnectionPreference>,
Sets or clears the value of connection_preference.
§Example
use google_cloud_compute_v1::model::service_attachment::ConnectionPreference;
let x0 = ServiceAttachment::new().set_or_clear_connection_preference(Some(ConnectionPreference::AcceptManual));
let x1 = ServiceAttachment::new().set_or_clear_connection_preference(Some(ConnectionPreference::Unspecified));
let x_none = ServiceAttachment::new().set_or_clear_connection_preference(None::<ConnectionPreference>);Sourcepub fn set_consumer_accept_lists<T, V>(self, v: T) -> Self
pub fn set_consumer_accept_lists<T, V>(self, v: T) -> Self
Sets the value of consumer_accept_lists.
§Example
use google_cloud_compute_v1::model::ServiceAttachmentConsumerProjectLimit;
let x = ServiceAttachment::new()
.set_consumer_accept_lists([
ServiceAttachmentConsumerProjectLimit::default()/* use setters */,
ServiceAttachmentConsumerProjectLimit::default()/* use (different) setters */,
]);Sourcepub fn set_consumer_reject_lists<T, V>(self, v: T) -> Self
pub fn set_consumer_reject_lists<T, V>(self, v: T) -> Self
Sets the value of consumer_reject_lists.
§Example
let x = ServiceAttachment::new().set_consumer_reject_lists(["a", "b", "c"]);Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = ServiceAttachment::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = ServiceAttachment::new().set_or_clear_creation_timestamp(Some("example"));
let x = ServiceAttachment::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sets the value of description.
§Example
let x = ServiceAttachment::new().set_description("example");Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = ServiceAttachment::new().set_or_clear_description(Some("example"));
let x = ServiceAttachment::new().set_or_clear_description(None::<String>);Sourcepub fn set_domain_names<T, V>(self, v: T) -> Self
pub fn set_domain_names<T, V>(self, v: T) -> Self
Sets the value of domain_names.
§Example
let x = ServiceAttachment::new().set_domain_names(["a", "b", "c"]);Sourcepub fn set_enable_proxy_protocol<T>(self, v: T) -> Self
pub fn set_enable_proxy_protocol<T>(self, v: T) -> Self
Sets the value of enable_proxy_protocol.
§Example
let x = ServiceAttachment::new().set_enable_proxy_protocol(true);Sourcepub fn set_or_clear_enable_proxy_protocol<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_enable_proxy_protocol<T>(self, v: Option<T>) -> Self
Sets or clears the value of enable_proxy_protocol.
§Example
let x = ServiceAttachment::new().set_or_clear_enable_proxy_protocol(Some(false));
let x = ServiceAttachment::new().set_or_clear_enable_proxy_protocol(None::<bool>);Sourcepub fn set_fingerprint<T>(self, v: T) -> Self
pub fn set_fingerprint<T>(self, v: T) -> Self
Sets the value of fingerprint.
§Example
let x = ServiceAttachment::new().set_fingerprint(bytes::Bytes::from_static(b"example"));Sourcepub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
Sets or clears the value of fingerprint.
§Example
let x = ServiceAttachment::new().set_or_clear_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = ServiceAttachment::new().set_or_clear_fingerprint(None::<bytes::Bytes>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_metadata<T, K, V>(self, v: T) -> Self
pub fn set_metadata<T, K, V>(self, v: T) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_nat_subnets<T, V>(self, v: T) -> Self
pub fn set_nat_subnets<T, V>(self, v: T) -> Self
Sets the value of nat_subnets.
§Example
let x = ServiceAttachment::new().set_nat_subnets(["a", "b", "c"]);Sourcepub fn set_producer_forwarding_rule<T>(self, v: T) -> Self
👎Deprecated
pub fn set_producer_forwarding_rule<T>(self, v: T) -> Self
Sets the value of producer_forwarding_rule.
§Example
let x = ServiceAttachment::new().set_producer_forwarding_rule("example");Sourcepub fn set_or_clear_producer_forwarding_rule<T>(self, v: Option<T>) -> Self
👎Deprecated
pub fn set_or_clear_producer_forwarding_rule<T>(self, v: Option<T>) -> Self
Sets or clears the value of producer_forwarding_rule.
§Example
let x = ServiceAttachment::new().set_or_clear_producer_forwarding_rule(Some("example"));
let x = ServiceAttachment::new().set_or_clear_producer_forwarding_rule(None::<String>);Sourcepub fn set_propagated_connection_limit<T>(self, v: T) -> Self
pub fn set_propagated_connection_limit<T>(self, v: T) -> Self
Sets the value of propagated_connection_limit.
§Example
let x = ServiceAttachment::new().set_propagated_connection_limit(42_u32);Sourcepub fn set_or_clear_propagated_connection_limit<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_propagated_connection_limit<T>(self, v: Option<T>) -> Self
Sets or clears the value of propagated_connection_limit.
§Example
let x = ServiceAttachment::new().set_or_clear_propagated_connection_limit(Some(42_u32));
let x = ServiceAttachment::new().set_or_clear_propagated_connection_limit(None::<u32>);Sourcepub fn set_psc_service_attachment_id<T>(self, v: T) -> Self
pub fn set_psc_service_attachment_id<T>(self, v: T) -> Self
Sets the value of psc_service_attachment_id.
§Example
use google_cloud_compute_v1::model::Uint128;
let x = ServiceAttachment::new().set_psc_service_attachment_id(Uint128::default()/* use setters */);Sourcepub fn set_or_clear_psc_service_attachment_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_psc_service_attachment_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of psc_service_attachment_id.
§Example
use google_cloud_compute_v1::model::Uint128;
let x = ServiceAttachment::new().set_or_clear_psc_service_attachment_id(Some(Uint128::default()/* use setters */));
let x = ServiceAttachment::new().set_or_clear_psc_service_attachment_id(None::<Uint128>);Sourcepub fn set_reconcile_connections<T>(self, v: T) -> Self
pub fn set_reconcile_connections<T>(self, v: T) -> Self
Sets the value of reconcile_connections.
§Example
let x = ServiceAttachment::new().set_reconcile_connections(true);Sourcepub fn set_or_clear_reconcile_connections<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_reconcile_connections<T>(self, v: Option<T>) -> Self
Sets or clears the value of reconcile_connections.
§Example
let x = ServiceAttachment::new().set_or_clear_reconcile_connections(Some(false));
let x = ServiceAttachment::new().set_or_clear_reconcile_connections(None::<bool>);Sourcepub fn set_region<T>(self, v: T) -> Self
pub fn set_region<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_target_service<T>(self, v: T) -> Self
pub fn set_target_service<T>(self, v: T) -> Self
Sets the value of target_service.
§Example
let x = ServiceAttachment::new().set_target_service("example");Sourcepub fn set_or_clear_target_service<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_target_service<T>(self, v: Option<T>) -> Self
Sets or clears the value of target_service.
§Example
let x = ServiceAttachment::new().set_or_clear_target_service(Some("example"));
let x = ServiceAttachment::new().set_or_clear_target_service(None::<String>);Trait Implementations§
Source§impl Clone for ServiceAttachment
impl Clone for ServiceAttachment
Source§fn clone(&self) -> ServiceAttachment
fn clone(&self) -> ServiceAttachment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more