[][src]Struct google_compute1::PathMatcher

pub struct PathMatcher {
    pub default_service: Option<String>,
    pub path_rules: Option<Vec<PathRule>>,
    pub description: Option<String>,
    pub name: Option<String>,
}

A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.

This type is not used in any activity, and only used as part of another schema.

Fields

default_service: Option<String>

The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource:

  • https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
  • compute/v1/projects/project/global/backendServices/backendService
  • global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service:
  • compute.backendBuckets.use
  • compute.backendServices.use
path_rules: Option<Vec<PathRule>>

The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Only one of pathRules or routeRules must be set.

description: Option<String>

An optional description of this resource. Provide this property when you create the resource.

name: Option<String>

The name to which this PathMatcher is referred by the HostRule.

Trait Implementations

impl Part for PathMatcher[src]

impl Default for PathMatcher[src]

impl Clone for PathMatcher[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for PathMatcher[src]

impl Serialize for PathMatcher[src]

impl<'de> Deserialize<'de> for PathMatcher[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]