Skip to main content

ServiceAttachment

Struct ServiceAttachment 

Source
#[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 */
}
Available on crate feature 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
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.
§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>
👎Deprecated

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

Source

pub fn new() -> Self

Source

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 */,
    ]);
Source

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

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);
Source

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

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>);
Source

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 */,
    ]);
Source

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

Sets the value of consumer_reject_lists.

§Example
let x = ServiceAttachment::new().set_consumer_reject_lists(["a", "b", "c"]);
Source

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

Sets the value of creation_timestamp.

§Example
let x = ServiceAttachment::new().set_creation_timestamp("example");
Source

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

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>);
Source

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

Sets the value of description.

§Example
let x = ServiceAttachment::new().set_description("example");
Source

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

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>);
Source

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

Sets the value of domain_names.

§Example
let x = ServiceAttachment::new().set_domain_names(["a", "b", "c"]);
Source

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

Sets the value of enable_proxy_protocol.

§Example
let x = ServiceAttachment::new().set_enable_proxy_protocol(true);
Source

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

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>);
Source

pub fn set_fingerprint<T>(self, v: T) -> Self
where T: Into<Bytes>,

Sets the value of fingerprint.

§Example
let x = ServiceAttachment::new().set_fingerprint(bytes::Bytes::from_static(b"example"));
Source

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

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>);
Source

pub fn set_id<T>(self, v: T) -> Self
where T: Into<u64>,

Sets the value of id.

§Example
let x = ServiceAttachment::new().set_id(42_u32);
Source

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

Sets or clears the value of id.

§Example
let x = ServiceAttachment::new().set_or_clear_id(Some(42_u32));
let x = ServiceAttachment::new().set_or_clear_id(None::<u32>);
Source

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

Sets the value of kind.

§Example
let x = ServiceAttachment::new().set_kind("example");
Source

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

Sets or clears the value of kind.

§Example
let x = ServiceAttachment::new().set_or_clear_kind(Some("example"));
let x = ServiceAttachment::new().set_or_clear_kind(None::<String>);
Source

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

Sets the value of metadata.

§Example
let x = ServiceAttachment::new().set_metadata([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

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

Sets the value of name.

§Example
let x = ServiceAttachment::new().set_name("example");
Source

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

Sets or clears the value of name.

§Example
let x = ServiceAttachment::new().set_or_clear_name(Some("example"));
let x = ServiceAttachment::new().set_or_clear_name(None::<String>);
Source

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

Sets the value of nat_subnets.

§Example
let x = ServiceAttachment::new().set_nat_subnets(["a", "b", "c"]);
Source

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

👎Deprecated

Sets the value of producer_forwarding_rule.

§Example
let x = ServiceAttachment::new().set_producer_forwarding_rule("example");
Source

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

👎Deprecated

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>);
Source

pub fn set_propagated_connection_limit<T>(self, v: T) -> Self
where T: Into<u32>,

Sets the value of propagated_connection_limit.

§Example
let x = ServiceAttachment::new().set_propagated_connection_limit(42_u32);
Source

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

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>);
Source

pub fn set_psc_service_attachment_id<T>(self, v: T) -> Self
where T: Into<Uint128>,

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 */);
Source

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

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>);
Source

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

Sets the value of reconcile_connections.

§Example
let x = ServiceAttachment::new().set_reconcile_connections(true);
Source

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

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>);
Source

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

Sets the value of region.

§Example
let x = ServiceAttachment::new().set_region("example");
Source

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

Sets or clears the value of region.

§Example
let x = ServiceAttachment::new().set_or_clear_region(Some("example"));
let x = ServiceAttachment::new().set_or_clear_region(None::<String>);

Sets the value of self_link.

§Example
let x = ServiceAttachment::new().set_self_link("example");

Sets or clears the value of self_link.

§Example
let x = ServiceAttachment::new().set_or_clear_self_link(Some("example"));
let x = ServiceAttachment::new().set_or_clear_self_link(None::<String>);
Source

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

Sets the value of target_service.

§Example
let x = ServiceAttachment::new().set_target_service("example");
Source

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

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

Source§

fn clone(&self) -> ServiceAttachment

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 ServiceAttachment

Source§

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

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

impl Default for ServiceAttachment

Source§

fn default() -> ServiceAttachment

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

impl Message for ServiceAttachment

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for ServiceAttachment

Source§

fn eq(&self, other: &ServiceAttachment) -> 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 ServiceAttachment

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>,