composite

package
v1.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBackendService

func CreateBackendService(backendService *BackendService, cloud *gce.Cloud, key *meta.Key) error

func CreateForwardingRule added in v1.6.0

func CreateForwardingRule(forwardingRule *ForwardingRule, cloud *gce.Cloud, key *meta.Key) error

func CreateHealthCheck added in v1.6.0

func CreateHealthCheck(healthCheck *HealthCheck, cloud *gce.Cloud, key *meta.Key) error

func CreateTargetHttpProxy added in v1.6.0

func CreateTargetHttpProxy(targetHttpProxy *TargetHttpProxy, cloud *gce.Cloud, key *meta.Key) error

func CreateTargetHttpsProxy added in v1.6.0

func CreateTargetHttpsProxy(targetHttpsProxy *TargetHttpsProxy, cloud *gce.Cloud, key *meta.Key) error

func CreateUrlMap added in v1.6.0

func CreateUrlMap(urlMap *UrlMap, cloud *gce.Cloud, key *meta.Key) error

func UpdateBackendService

func UpdateBackendService(backendService *BackendService, cloud *gce.Cloud, key *meta.Key) error

func UpdateHealthCheck added in v1.6.0

func UpdateHealthCheck(healthCheck *HealthCheck, cloud *gce.Cloud, key *meta.Key) error

func UpdateUrlMap added in v1.6.0

func UpdateUrlMap(urlMap *UrlMap, cloud *gce.Cloud, key *meta.Key) error

Types

type AuthenticationPolicy added in v1.6.0

type AuthenticationPolicy struct {
	// List of authentication methods that can be used for origin
	// authentication. Similar to peers, these will be evaluated in order
	// the first valid one will be used to set origin identity. If none of
	// these methods pass, the request will be rejected with authentication
	// failed error (401). Leave the list empty if origin authentication is
	// not required.
	Origins []*OriginAuthenticationMethod `json:"origins,omitempty"`
	// List of authentication methods that can be used for peer
	// authentication. They will be evaluated in order the first valid one
	// will be used to set peer identity. If none of these methods pass, the
	// request will be rejected with authentication failed error (401).
	// Leave the list empty if peer authentication is not required.
	Peers []*PeerAuthenticationMethod `json:"peers,omitempty"`
	// Define whether peer or origin identity should be used for principal.
	// Default value is USE_PEER. If peer (or origin) identity is not
	// available, either because peer/origin authentication is not defined,
	// or failed, principal will be left unset. In other words, binding rule
	// does not affect the decision to accept or reject request. This field
	// can be set to one of the following: USE_PEER: Principal will be set
	// to the identity from peer authentication. USE_ORIGIN: Principal will
	// be set to the identity from origin authentication.
	PrincipalBinding string `json:"principalBinding,omitempty"`
	// Configures the mechanism to obtain server-side security certificates
	// and identity information.
	ServerTlsContext *TlsContext `json:"serverTlsContext,omitempty"`
	ForceSendFields  []string    `json:"-"`
	NullFields       []string    `json:"-"`
}

AuthenticationPolicy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type AuthorizationConfig added in v1.6.0

type AuthorizationConfig struct {
	// List of RbacPolicies.
	Policies        []*RbacPolicy `json:"policies,omitempty"`
	ForceSendFields []string      `json:"-"`
	NullFields      []string      `json:"-"`
}

AuthorizationConfig is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type Backend

type Backend struct {
	// Specifies the balancing mode for the backend.
	//
	// When choosing a balancing mode, you need to consider the
	// loadBalancingScheme, and protocol for the backend service, as well as
	// the type of backend (instance group or NEG).
	//
	//
	// - If the load balancing mode is CONNECTION, then the load is spread
	// based on how many concurrent connections the backend can handle.
	// You can use the CONNECTION balancing mode if the protocol for the
	// backend service is SSL, TCP, or UDP.
	//
	// If the loadBalancingScheme for the backend service is EXTERNAL (SSL
	// Proxy and TCP Proxy load balancers), you must also specify exactly
	// one of the following parameters: maxConnections,
	// maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
	//
	// If the loadBalancingScheme for the backend service is INTERNAL
	// (internal TCP/UDP load balancers), you cannot specify any additional
	// parameters.
	//
	// - If the load balancing mode is RATE, the load is spread based on the
	// rate of HTTP requests per second (RPS).
	// You can use the RATE balancing mode if the protocol for the backend
	// service is HTTP or HTTPS. You must specify exactly one of the
	// following parameters: maxRate, maxRatePerInstance, or
	// maxRatePerEndpoint.
	//
	// - If the load balancing mode is UTILIZATION, the load is spread based
	// on the CPU utilization of instances in an instance group.
	// You can use the UTILIZATION balancing mode if the loadBalancingScheme
	// of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or
	// INTERNAL_MANAGED and the backends are instance groups. There are no
	// restrictions on the backend service protocol.
	BalancingMode string `json:"balancingMode,omitempty"`
	// A multiplier applied to the group's maximum servicing capacity (based
	// on UTILIZATION, RATE or CONNECTION). Default value is 1, which means
	// the group will serve up to 100% of its configured capacity (depending
	// on balancingMode). A setting of 0 means the group is completely
	// drained, offering 0% of its available Capacity. Valid range is
	// [0.0,1.0].
	//
	// This cannot be used for internal load balancing.
	CapacityScaler float64 `json:"capacityScaler,omitempty"`
	// An optional description of this resource. Provide this property when
	// you create the resource.
	Description string `json:"description,omitempty"`
	// This field designates whether this is a failover backend. More than
	// one failover backend can be configured for a given BackendService.
	Failover bool `json:"failover,omitempty"`
	// The fully-qualified URL of an instance group or network endpoint
	// group (NEG) resource. The type of backend that a backend service
	// supports depends on the backend service's loadBalancingScheme.
	//
	//
	// - When the loadBalancingScheme for the backend service is EXTERNAL,
	// INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either
	// an instance group or a NEG. The backends on the backend service must
	// be either all instance groups or all NEGs. You cannot mix instance
	// group and NEG backends on the same backend service.
	//
	//
	// - When the loadBalancingScheme for the backend service is INTERNAL,
	// the backend must be an instance group in the same region as the
	// backend service. NEGs are not supported.
	//
	// You must use the fully-qualified URL (starting with
	// https://www.googleapis.com/) to specify the instance group or NEG.
	// Partial URLs are not supported.
	Group string `json:"group,omitempty"`
	// Defines a maximum target for simultaneous connections for the entire
	// backend (instance group or NEG). If the backend's balancingMode is
	// UTILIZATION, this is an optional parameter. If the backend's
	// balancingMode is CONNECTION, and backend is attached to a backend
	// service whose loadBalancingScheme is EXTERNAL, you must specify
	// either this parameter, maxConnectionsPerInstance, or
	// maxConnectionsPerEndpoint.
	//
	// Not available if the backend's balancingMode is RATE. If the
	// loadBalancingScheme is INTERNAL, then maxConnections is not
	// supported, even though the backend requires a balancing mode of
	// CONNECTION.
	MaxConnections int64 `json:"maxConnections,omitempty"`
	// Defines a maximum target for simultaneous connections for an endpoint
	// of a NEG. This is multiplied by the number of endpoints in the NEG to
	// implicitly calculate a maximum number of target maximum simultaneous
	// connections for the NEG. If the backend's balancingMode is
	// CONNECTION, and the backend is attached to a backend service whose
	// loadBalancingScheme is EXTERNAL, you must specify either this
	// parameter, maxConnections, or maxConnectionsPerInstance.
	//
	// Not available if the backend's balancingMode is RATE. Internal
	// TCP/UDP load balancing does not support setting
	// maxConnectionsPerEndpoint even though its backends require a
	// balancing mode of CONNECTION.
	MaxConnectionsPerEndpoint int64 `json:"maxConnectionsPerEndpoint,omitempty"`
	// Defines a maximum target for simultaneous connections for a single VM
	// in a backend instance group. This is multiplied by the number of
	// instances in the instance group to implicitly calculate a target
	// maximum number of simultaneous connections for the whole instance
	// group. If the backend's balancingMode is UTILIZATION, this is an
	// optional parameter. If the backend's balancingMode is CONNECTION, and
	// backend is attached to a backend service whose loadBalancingScheme is
	// EXTERNAL, you must specify either this parameter, maxConnections, or
	// maxConnectionsPerEndpoint.
	//
	// Not available if the backend's balancingMode is RATE. Internal
	// TCP/UDP load balancing does not support setting
	// maxConnectionsPerInstance even though its backends require a
	// balancing mode of CONNECTION.
	MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"`
	// The max requests per second (RPS) of the group. Can be used with
	// either RATE or UTILIZATION balancing modes, but required if RATE
	// mode. For RATE mode, either maxRate or maxRatePerInstance must be
	// set.
	//
	// This cannot be used for internal load balancing.
	MaxRate int64 `json:"maxRate,omitempty"`
	// Defines a maximum target for requests per second (RPS) for an
	// endpoint of a NEG. This is multiplied by the number of endpoints in
	// the NEG to implicitly calculate a target maximum rate for the
	// NEG.
	//
	// If the backend's balancingMode is RATE, you must specify either this
	// parameter, maxRate, or maxRatePerInstance.
	//
	// Not available if the backend's balancingMode is CONNECTION.
	MaxRatePerEndpoint float64 `json:"maxRatePerEndpoint,omitempty"`
	// Defines a maximum target for requests per second (RPS) for a single
	// VM in a backend instance group. This is multiplied by the number of
	// instances in the instance group to implicitly calculate a target
	// maximum rate for the whole instance group.
	//
	// If the backend's balancingMode is UTILIZATION, this is an optional
	// parameter. If the backend's balancingMode is RATE, you must specify
	// either this parameter, maxRate, or maxRatePerEndpoint.
	//
	// Not available if the backend's balancingMode is CONNECTION.
	MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"`
	// Defines the maximum average CPU utilization of a backend VM in an
	// instance group. The valid range is [0.0, 1.0]. This is an optional
	// parameter if the backend's balancingMode is UTILIZATION.
	//
	// This parameter can be used in conjunction with maxRate,
	// maxRatePerInstance, maxConnections, or maxConnectionsPerInstance.
	MaxUtilization  float64  `json:"maxUtilization,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

Backend is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type BackendService

type BackendService struct {
	// Version keeps track of the intended compute version for this BackendService.
	// Note that the compute API's do not contain this field. It is for our
	// own bookkeeping purposes.
	Version meta.Version `json:"-"`
	// ResourceType keeps track of the intended type of the service (e.g. Global)
	// This is also an internal field purely for bookkeeping purposes
	ResourceType meta.KeyType `json:"-"`

	// If set to 0, the cookie is non-persistent and lasts only until the
	// end of the browser session (or equivalent). The maximum allowed value
	// is one day (86,400).
	AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"`
	// The list of backends that serve this BackendService.
	Backends []*Backend `json:"backends,omitempty"`
	// Cloud CDN configuration for this BackendService.
	CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"`
	// Settings controlling the volume of connections to a backend service.
	// If not set, this feature is considered disabled.
	//
	// This field is applicable to either:
	// - A regional backend service with the service_protocol set to HTTP,
	// HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
	//
	// - A global backend service with the load_balancing_scheme set to
	// INTERNAL_SELF_MANAGED.
	CircuitBreakers    *CircuitBreakers    `json:"circuitBreakers,omitempty"`
	ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"`
	// Consistent Hash-based load balancing can be used to provide soft
	// session affinity based on HTTP headers, cookies or other properties.
	// This load balancing policy is applicable only for HTTP connections.
	// The affinity to a particular destination host will be lost when one
	// or more hosts are added/removed from the destination service. This
	// field specifies parameters that control consistent hashing. This
	// field is only applicable when localityLbPolicy is set to MAGLEV or
	// RING_HASH.
	//
	// This field is applicable to either:
	// - A regional backend service with the service_protocol set to HTTP,
	// HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
	//
	// - A global backend service with the load_balancing_scheme set to
	// INTERNAL_SELF_MANAGED.
	ConsistentHash *ConsistentHashLoadBalancerSettings `json:"consistentHash,omitempty"`
	// [Output Only] Creation timestamp in RFC3339 text format.
	CreationTimestamp string `json:"creationTimestamp,omitempty"`
	// Headers that the HTTP/S load balancer should add to proxied requests.
	CustomRequestHeaders []string `json:"customRequestHeaders,omitempty"`
	// An optional description of this resource. Provide this property when
	// you create the resource.
	Description string `json:"description,omitempty"`
	// If true, enables Cloud CDN for the backend service. Only applicable
	// if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or
	// HTTPS.
	EnableCDN bool `json:"enableCDN,omitempty"`
	// Applicable only to Failover for Internal TCP/UDP Load Balancing.
	// Requires at least one backend instance group to be defined as a
	// backup (failover) backend.
	FailoverPolicy *BackendServiceFailoverPolicy `json:"failoverPolicy,omitempty"`
	// 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 BackendService. An up-to-date fingerprint
	// must be provided in order to update the BackendService, otherwise the
	// request will fail with error 412 conditionNotMet.
	//
	// To see the latest fingerprint, make a get() request to retrieve a
	// BackendService.
	Fingerprint string `json:"fingerprint,omitempty"`
	// The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource
	// for health checking this BackendService. Currently at most one health
	// check can be specified. Health check is optional for Compute Engine
	// backend services if there is no backend. A health check must not be
	// specified when adding Internet Network Endpoint Group or Serverless
	// Network Endpoint Group as backends. In all other cases, a health
	// check is required for Compute Engine backend services.
	//
	// For internal load balancing, a URL to a HealthCheck resource must be
	// specified instead.
	HealthChecks []string           `json:"healthChecks,omitempty"`
	Iap          *BackendServiceIAP `json:"iap,omitempty"`
	// [Output Only] The unique identifier for the resource. This identifier
	// is defined by the server.
	Id uint64 `json:"id,omitempty,string"`
	// [Output Only] Type of resource. Always compute#backendService for
	// backend services.
	Kind string `json:"kind,omitempty"`
	// Specifies the load balancer type. Choose EXTERNAL for load balancers
	// that receive traffic from external clients. Choose INTERNAL for
	// Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal
	// HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic
	// Director. A backend service created for one type of load balancing
	// cannot be used with another. For more information, refer to Choosing
	// a load balancer.
	LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
	// The load balancing algorithm used within the scope of the locality.
	// The possible values are:
	// - ROUND_ROBIN: This is a simple policy in which each healthy backend
	// is selected in round robin order. This is the default.
	// - LEAST_REQUEST: An O(1) algorithm which selects two random healthy
	// hosts and picks the host which has fewer active requests.
	// - RING_HASH: The ring/modulo hash load balancer implements consistent
	// hashing to backends. The algorithm has the property that the
	// addition/removal of a host from a set of N hosts only affects 1/N of
	// the requests.
	// - RANDOM: The load balancer selects a random healthy host.
	// - ORIGINAL_DESTINATION: Backend host is selected based on the client
	// connection metadata, i.e., connections are opened to the same address
	// as the destination address of the incoming connection before the
	// connection was redirected to the load balancer.
	// - MAGLEV: used as a drop in replacement for the ring hash load
	// balancer. Maglev is not as stable as ring hash but has faster table
	// lookup build times and host selection times. For more information
	// about Maglev, refer to https://ai.google/research/pubs/pub44824
	//
	//
	// This field is applicable to either:
	// - A regional backend service with the service_protocol set to HTTP,
	// HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
	//
	// - A global backend service with the load_balancing_scheme set to
	// INTERNAL_SELF_MANAGED.
	//
	// If sessionAffinity is not NONE, and this field is not set to >MAGLEV
	// or RING_HASH, session affinity settings will not take effect.
	LocalityLbPolicy string `json:"localityLbPolicy,omitempty"`
	// This field denotes the logging options for the load balancer traffic
	// served by this backend service. If logging is enabled, logs will be
	// exported to Stackdriver.
	LogConfig *BackendServiceLogConfig `json:"logConfig,omitempty"`
	// Name of the resource. Provided by the client when the resource is
	// created. The name must be 1-63 characters long, and comply with
	// RFC1035. 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.
	Name string `json:"name,omitempty"`
	// The URL of the network to which this backend service belongs. This
	// field can only be spcified when the load balancing scheme is set to
	// INTERNAL.
	Network string `json:"network,omitempty"`
	// Settings controlling the eviction of unhealthy hosts from the load
	// balancing pool for the backend service. If not set, this feature is
	// considered disabled.
	//
	// This field is applicable to either:
	// - A regional backend service with the service_protocol set to HTTP,
	// HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
	//
	// - A global backend service with the load_balancing_scheme set to
	// INTERNAL_SELF_MANAGED.
	OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"`
	// Deprecated in favor of portName. The TCP port to connect on the
	// backend. The default value is 80.
	//
	// This cannot be used if the loadBalancingScheme is INTERNAL (Internal
	// TCP/UDP Load Balancing).
	Port int64 `json:"port,omitempty"`
	// A named port on a backend instance group representing the port for
	// communication to the backend VMs in that group. Required when the
	// loadBalancingScheme is EXTERNAL and the backends are instance groups.
	// The named port must be defined on each backend instance group. This
	// parameter has no meaning if the backends are NEGs.
	//
	//
	//
	// Must be omitted when the loadBalancingScheme is INTERNAL (Internal
	// TCP/UDP Load Blaancing).
	PortName string `json:"portName,omitempty"`
	// The protocol this BackendService uses to communicate with
	// backends.
	//
	// Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending
	// on the chosen load balancer or Traffic Director configuration. Refer
	// to the documentation for the load balancer or for Traffic Director
	// for more information.
	Protocol string `json:"protocol,omitempty"`
	// [Output Only] URL of the region where the regional backend service
	// resides. This field is not applicable to global backend services. You
	// must specify this field as part of the HTTP request URL. It is not
	// settable as a field in the request body.
	Region string `json:"region,omitempty"`
	// [Output Only] The resource URL for the security policy associated
	// with this backend service.
	SecurityPolicy string `json:"securityPolicy,omitempty"`
	// This field specifies the security policy that applies to this backend
	// service. This field is applicable to either:
	// - A regional backend service with the service_protocol set to HTTP,
	// HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
	//
	// - A global backend service with the load_balancing_scheme set to
	// INTERNAL_SELF_MANAGED.
	SecuritySettings *SecuritySettings `json:"securitySettings,omitempty"`
	// [Output Only] Server-defined URL for the resource.
	SelfLink string `json:"selfLink,omitempty"`
	// [Output Only] Server-defined URL for this resource with the resource
	// id.
	SelfLinkWithId string `json:"selfLinkWithId,omitempty"`
	// Type of session affinity to use. The default is NONE. Session
	// affinity is not applicable if the --protocol is UDP.
	//
	// When the loadBalancingScheme is EXTERNAL, possible values are NONE,
	// CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the
	// protocol is HTTP or HTTPS.
	//
	// When the loadBalancingScheme is INTERNAL, possible values are NONE,
	// CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
	//
	// When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or
	// INTERNAL_MANAGED, possible values are NONE, CLIENT_IP,
	// GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
	SessionAffinity string `json:"sessionAffinity,omitempty"`
	// The backend service timeout has a different meaning depending on the
	// type of load balancer. For more information read,  Backend service
	// settings The default is 30 seconds.
	TimeoutSec               int64 `json:"timeoutSec,omitempty"`
	googleapi.ServerResponse `json:"-"`
	ForceSendFields          []string `json:"-"`
	NullFields               []string `json:"-"`
}

BackendService is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

func GetBackendService

func GetBackendService(version meta.Version, cloud *gce.Cloud, key *meta.Key) (*BackendService, error)

func ToBackendService added in v1.6.0

func ToBackendService(obj interface{}) (*BackendService, error)

ToBackendService converts a compute alpha, beta or GA BackendService into our composite type.

func (*BackendService) ToAlpha added in v1.6.0

func (backendService *BackendService) ToAlpha() (*computealpha.BackendService, error)

ToAlpha converts our composite type into an alpha type. This alpha type can be used in GCE API calls.

func (*BackendService) ToBeta added in v1.6.0

func (backendService *BackendService) ToBeta() (*computebeta.BackendService, error)

ToBeta converts our composite type into an beta type. This beta type can be used in GCE API calls.

func (*BackendService) ToGA added in v1.6.0

func (backendService *BackendService) ToGA() (*compute.BackendService, error)

ToGA converts our composite type into an ga type. This ga type can be used in GCE API calls.

type BackendServiceCdnPolicy

type BackendServiceCdnPolicy struct {
	// The CacheKeyPolicy for this CdnPolicy.
	CacheKeyPolicy *CacheKeyPolicy `json:"cacheKeyPolicy,omitempty"`
	// Maximum number of seconds the response to a signed URL request will
	// be considered fresh. After this time period, the response will be
	// revalidated before being served. Defaults to 1hr (3600s). When
	// serving responses to signed URL requests, Cloud CDN will internally
	// behave as though all responses from this backend had a
	// "Cache-Control: public, max-age=[TTL]" header, regardless of any
	// existing Cache-Control header. The actual headers served in responses
	// will not be altered.
	SignedUrlCacheMaxAgeSec int64 `json:"signedUrlCacheMaxAgeSec,omitempty,string"`
	// [Output Only] Names of the keys for signing request URLs.
	SignedUrlKeyNames []string `json:"signedUrlKeyNames,omitempty"`
	ForceSendFields   []string `json:"-"`
	NullFields        []string `json:"-"`
}

BackendServiceCdnPolicy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type BackendServiceFailoverPolicy

type BackendServiceFailoverPolicy struct {
	// This can be set to true only if the protocol is TCP.
	//
	// The default is false.
	DisableConnectionDrainOnFailover bool `json:"disableConnectionDrainOnFailover,omitempty"`
	// Applicable only to Failover for Internal TCP/UDP Load Balancing. If
	// set to true, connections to the load balancer are dropped when all
	// primary and all backup backend VMs are unhealthy. If set to false,
	// connections are distributed among all primary VMs when all primary
	// and all backup backend VMs are unhealthy.
	//
	// The default is false.
	DropTrafficIfUnhealthy bool `json:"dropTrafficIfUnhealthy,omitempty"`
	// Applicable only to Failover for Internal TCP/UDP Load Balancing. The
	// value of the field must be in the range [0, 1]. If the value is 0,
	// the load balancer performs a failover when the number of healthy
	// primary VMs equals zero. For all other values, the load balancer
	// performs a failover when the total number of healthy primary VMs is
	// less than this ratio.
	FailoverRatio   float64  `json:"failoverRatio,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

BackendServiceFailoverPolicy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type BackendServiceIAP

type BackendServiceIAP struct {
	Enabled        bool   `json:"enabled,omitempty"`
	Oauth2ClientId string `json:"oauth2ClientId,omitempty"`
	// [Input Only] OAuth client info required to generate client id to be
	// used for IAP.
	Oauth2ClientInfo   *BackendServiceIAPOAuth2ClientInfo `json:"oauth2ClientInfo,omitempty"`
	Oauth2ClientSecret string                             `json:"oauth2ClientSecret,omitempty"`
	// [Output Only] SHA256 hash value for the field oauth2_client_secret
	// above.
	Oauth2ClientSecretSha256 string   `json:"oauth2ClientSecretSha256,omitempty"`
	ForceSendFields          []string `json:"-"`
	NullFields               []string `json:"-"`
}

BackendServiceIAP is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type BackendServiceIAPOAuth2ClientInfo

type BackendServiceIAPOAuth2ClientInfo struct {
	// Application name to be used in OAuth consent screen.
	ApplicationName string `json:"applicationName,omitempty"`
	// Name of the client to be generated. Optional - If not provided, the
	// name will be autogenerated by the backend.
	ClientName string `json:"clientName,omitempty"`
	// Developer's information to be used in OAuth consent screen.
	DeveloperEmailAddress string   `json:"developerEmailAddress,omitempty"`
	ForceSendFields       []string `json:"-"`
	NullFields            []string `json:"-"`
}

BackendServiceIAPOAuth2ClientInfo is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type BackendServiceLogConfig added in v1.6.0

type BackendServiceLogConfig struct {
	// This field denotes whether to enable logging for the load balancer
	// traffic served by this backend service.
	Enable bool `json:"enable,omitempty"`
	// This field can only be specified if logging is enabled for this
	// backend service. The value of the field must be in [0, 1]. This
	// configures the sampling rate of requests to the load balancer where
	// 1.0 means all logged requests are reported and 0.0 means no logged
	// requests are reported. The default value is 1.0.
	SampleRate      float64  `json:"sampleRate,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

BackendServiceLogConfig is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type CacheKeyPolicy

type CacheKeyPolicy struct {
	// If true, requests to different hosts will be cached separately.
	IncludeHost bool `json:"includeHost,omitempty"`
	// If true, http and https requests will be cached separately.
	IncludeProtocol bool `json:"includeProtocol,omitempty"`
	// If true, include query string parameters in the cache key according
	// to query_string_whitelist and query_string_blacklist. If neither is
	// set, the entire query string will be included. If false, the query
	// string will be excluded from the cache key entirely.
	IncludeQueryString bool `json:"includeQueryString,omitempty"`
	// Names of query string parameters to exclude in cache keys. All other
	// parameters will be included. Either specify query_string_whitelist or
	// query_string_blacklist, not both. '&' and '=' will be percent encoded
	// and not treated as delimiters.
	QueryStringBlacklist []string `json:"queryStringBlacklist,omitempty"`
	// Names of query string parameters to include in cache keys. All other
	// parameters will be excluded. Either specify query_string_whitelist or
	// query_string_blacklist, not both. '&' and '=' will be percent encoded
	// and not treated as delimiters.
	QueryStringWhitelist []string `json:"queryStringWhitelist,omitempty"`
	ForceSendFields      []string `json:"-"`
	NullFields           []string `json:"-"`
}

CacheKeyPolicy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type CallCredentials added in v1.6.0

type CallCredentials struct {
	// The type of call credentials to use for GRPC requests to the SDS
	// server. This field can be set to one of the following:
	// - GCE_VM: The local GCE VM service account credentials are used to
	// access the SDS server.
	// - FROM_PLUGIN: Custom authenticator credentials are used to access
	// the SDS server.
	CallCredentialType string `json:"callCredentialType,omitempty"`
	// Custom authenticator credentials. Valid if callCredentialType is
	// FROM_PLUGIN.
	FromPlugin      *MetadataCredentialsFromPlugin `json:"fromPlugin,omitempty"`
	ForceSendFields []string                       `json:"-"`
	NullFields      []string                       `json:"-"`
}

CallCredentials is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type ChannelCredentials added in v1.6.0

type ChannelCredentials struct {
	// The call credentials to access the SDS server.
	Certificates *TlsCertificatePaths `json:"certificates,omitempty"`
	// The channel credentials to access the SDS server. This field can be
	// set to one of the following: CERTIFICATES: Use TLS certificates to
	// access the SDS server. GCE_VM: Use local GCE VM credentials to access
	// the SDS server.
	ChannelCredentialType string   `json:"channelCredentialType,omitempty"`
	ForceSendFields       []string `json:"-"`
	NullFields            []string `json:"-"`
}

ChannelCredentials is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type CircuitBreakers added in v1.6.0

type CircuitBreakers struct {
	// The timeout for new network connections to hosts.
	ConnectTimeout *Duration `json:"connectTimeout,omitempty"`
	// The maximum number of connections to the backend service. If not
	// specified, there is no limit.
	MaxConnections int64 `json:"maxConnections,omitempty"`
	// The maximum number of pending requests allowed to the backend
	// service. If not specified, there is no limit.
	MaxPendingRequests int64 `json:"maxPendingRequests,omitempty"`
	// The maximum number of parallel requests that allowed to the backend
	// service. If not specified, there is no limit.
	MaxRequests int64 `json:"maxRequests,omitempty"`
	// Maximum requests for a single connection to the backend service. This
	// parameter is respected by both the HTTP/1.1 and HTTP/2
	// implementations. If not specified, there is no limit. Setting this
	// parameter to 1 will effectively disable keep alive.
	MaxRequestsPerConnection int64 `json:"maxRequestsPerConnection,omitempty"`
	// The maximum number of parallel retries allowed to the backend
	// cluster. If not specified, the default is 1.
	MaxRetries      int64    `json:"maxRetries,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

CircuitBreakers is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type ClientTlsSettings added in v1.6.0

type ClientTlsSettings struct {
	// Configures the mechanism to obtain client-side security certificates
	// and identity information. This field is only applicable when mode is
	// set to MUTUAL.
	ClientTlsContext *TlsContext `json:"clientTlsContext,omitempty"`
	// Indicates whether connections to this port should be secured using
	// TLS. The value of this field determines how TLS is enforced. This can
	// be set to one of the following values: DISABLE: Do not setup a TLS
	// connection to the backends. SIMPLE: Originate a TLS connection to the
	// backends. MUTUAL: Secure connections to the backends using mutual TLS
	// by presenting client certificates for authentication.
	Mode string `json:"mode,omitempty"`
	// SNI string to present to the server during TLS handshake. This field
	// is applicable only when mode is SIMPLE or MUTUAL.
	Sni string `json:"sni,omitempty"`
	// A list of alternate names to verify the subject identity in the
	// certificate.If specified, the proxy will verify that the server
	// certificate's subject alt name matches one of the specified values.
	// This field is applicable only when mode is SIMPLE or MUTUAL.
	SubjectAltNames []string `json:"subjectAltNames,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

ClientTlsSettings is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type ConnectionDraining

type ConnectionDraining struct {
	// The amount of time in seconds to allow existing connections to
	// persist while on unhealthy backend VMs. Only applicable if the
	// protocol is not UDP. The valid range is [0, 3600].
	DrainingTimeoutSec int64    `json:"drainingTimeoutSec,omitempty"`
	ForceSendFields    []string `json:"-"`
	NullFields         []string `json:"-"`
}

ConnectionDraining is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type ConsistentHashLoadBalancerSettings added in v1.6.0

type ConsistentHashLoadBalancerSettings struct {
	// Hash is based on HTTP Cookie. This field describes a HTTP cookie that
	// will be used as the hash key for the consistent hash load balancer.
	// If the cookie is not present, it will be generated. This field is
	// applicable if the sessionAffinity is set to HTTP_COOKIE.
	HttpCookie *ConsistentHashLoadBalancerSettingsHttpCookie `json:"httpCookie,omitempty"`
	// The hash based on the value of the specified header field. This field
	// is applicable if the sessionAffinity is set to HEADER_FIELD.
	HttpHeaderName string `json:"httpHeaderName,omitempty"`
	// The minimum number of virtual nodes to use for the hash ring.
	// Defaults to 1024. Larger ring sizes result in more granular load
	// distributions. If the number of hosts in the load balancing pool is
	// larger than the ring size, each host will be assigned a single
	// virtual node.
	MinimumRingSize int64    `json:"minimumRingSize,omitempty,string"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

ConsistentHashLoadBalancerSettings is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type ConsistentHashLoadBalancerSettingsHttpCookie added in v1.6.0

type ConsistentHashLoadBalancerSettingsHttpCookie struct {
	// Name of the cookie.
	Name string `json:"name,omitempty"`
	// Path to set for the cookie.
	Path string `json:"path,omitempty"`
	// Lifetime of the cookie.
	Ttl             *Duration `json:"ttl,omitempty"`
	ForceSendFields []string  `json:"-"`
	NullFields      []string  `json:"-"`
}

ConsistentHashLoadBalancerSettingsHttpCookie is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type CorsPolicy added in v1.6.0

type CorsPolicy struct {
	// In response to a preflight request, setting this to true indicates
	// that the actual request can include user credentials. This translates
	// to the Access-Control-Allow-Credentials header.
	// Default is false.
	AllowCredentials bool `json:"allowCredentials,omitempty"`
	// Specifies the content for the Access-Control-Allow-Headers header.
	AllowHeaders []string `json:"allowHeaders,omitempty"`
	// Specifies the content for the Access-Control-Allow-Methods header.
	AllowMethods []string `json:"allowMethods,omitempty"`
	// Specifies the regualar expression patterns that match allowed
	// origins. For regular expression grammar please see
	// en.cppreference.com/w/cpp/regex/ecmascript
	// An origin is allowed if it matches either allow_origins or
	// allow_origin_regex.
	AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"`
	// Specifies the list of origins that will be allowed to do CORS
	// requests.
	// An origin is allowed if it matches either allow_origins or
	// allow_origin_regex.
	AllowOrigins []string `json:"allowOrigins,omitempty"`
	// If true, specifies the CORS policy is disabled. The default value of
	// false, which indicates that the CORS policy is in effect.
	Disabled bool `json:"disabled,omitempty"`
	// Specifies the content for the Access-Control-Expose-Headers header.
	ExposeHeaders []string `json:"exposeHeaders,omitempty"`
	// Specifies how long results of a preflight request can be cached in
	// seconds. This translates to the Access-Control-Max-Age header.
	MaxAge          int64    `json:"maxAge,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

CorsPolicy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type Duration added in v1.6.0

type Duration struct {
	// Span of time that's a fraction of a second at nanosecond resolution.
	// Durations less than one second are represented with a 0 `seconds`
	// field and a positive `nanos` field. Must be from 0 to 999,999,999
	// inclusive.
	Nanos int64 `json:"nanos,omitempty"`
	// Span of time at a resolution of a second. Must be from 0 to
	// 315,576,000,000 inclusive. Note: these bounds are computed from: 60
	// sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
	Seconds         int64    `json:"seconds,omitempty,string"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

Duration is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type ForwardingRule added in v1.6.0

type ForwardingRule struct {
	// Version keeps track of the intended compute version for this ForwardingRule.
	// Note that the compute API's do not contain this field. It is for our
	// own bookkeeping purposes.
	Version meta.Version `json:"-"`
	// ResourceType keeps track of the intended type of the service (e.g. Global)
	// This is also an internal field purely for bookkeeping purposes
	ResourceType meta.KeyType `json:"-"`

	// This field is used along with the backend_service field for internal
	// load balancing or with the target field for internal TargetInstance.
	// This field cannot be used with port or portRange fields.
	//
	// When the load balancing scheme is INTERNAL and protocol is TCP/UDP,
	// specify this field to allow packets addressed to any ports will be
	// forwarded to the backends configured with this forwarding rule.
	AllPorts bool `json:"allPorts,omitempty"`
	// This field is used along with the backend_service field for internal
	// load balancing or with the target field for internal TargetInstance.
	// If the field is set to TRUE, clients can access ILB from all regions.
	// Otherwise only allows access from clients in the same region as the
	// internal load balancer.
	AllowGlobalAccess bool `json:"allowGlobalAccess,omitempty"`
	// This field is only used for INTERNAL load balancing.
	//
	// For internal load balancing, this field identifies the BackendService
	// resource to receive the matched traffic.
	BackendService string `json:"backendService,omitempty"`
	// [Output Only] Creation timestamp in RFC3339 text format.
	CreationTimestamp string `json:"creationTimestamp,omitempty"`
	// An optional description of this resource. Provide this property when
	// you create the resource.
	Description string `json:"description,omitempty"`
	// 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 ForwardingRule. Include the fingerprint in
	// patch request to ensure that you do not overwrite changes that were
	// applied from another concurrent request.
	//
	// To see the latest fingerprint, make a get() request to retrieve a
	// ForwardingRule.
	Fingerprint string `json:"fingerprint,omitempty"`
	// IP address that this forwarding rule serves. When a client sends
	// traffic to this IP address, the forwarding rule directs the traffic
	// to the target that you specify in the forwarding rule.
	//
	// If you don't specify a reserved IP address, an ephemeral IP address
	// is assigned. Methods for specifying an IP address:
	//
	// * IPv4 dotted decimal, as in `100.1.2.3` * Full URL, as in
	// https://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name * Partial URL or by name, as in: * projects/project_id/regions/region/addresses/address-name * regions/region/addresses/address-name * global/addresses/address-name * address-name
	//
	// The loadBalancingScheme and the forwarding rule's target determine
	// the type of IP address that you can use. For detailed information,
	// refer to [IP address
	// specifications](/load-balancing/docs/forwarding-rule-concepts#ip_addre
	// ss_specifications).
	IPAddress string `json:"IPAddress,omitempty"`
	// The IP protocol to which this rule applies. For protocol forwarding,
	// valid options are TCP, UDP, ESP, AH, SCTP or ICMP.
	//
	// For Internal TCP/UDP Load Balancing, the load balancing scheme is
	// INTERNAL, and one of TCP or UDP are valid. For Traffic Director, the
	// load balancing scheme is INTERNAL_SELF_MANAGED, and only TCPis valid.
	// For Internal HTTP(S) Load Balancing, the load balancing scheme is
	// INTERNAL_MANAGED, and only TCP is valid. For HTTP(S), SSL Proxy, and
	// TCP Proxy Load Balancing, the load balancing scheme is EXTERNAL and
	// only TCP is valid. For Network TCP/UDP Load Balancing, the load
	// balancing scheme is EXTERNAL, and one of TCP or UDP is valid.
	IPProtocol string `json:"IPProtocol,omitempty"`
	// [Output Only] The unique identifier for the resource. This identifier
	// is defined by the server.
	Id uint64 `json:"id,omitempty,string"`
	// The IP Version that will be used by this forwarding rule. Valid
	// options are IPV4 or IPV6. This can only be specified for an external
	// global forwarding rule.
	IpVersion string `json:"ipVersion,omitempty"`
	// Indicates whether or not this load balancer can be used as a
	// collector for packet mirroring. To prevent mirroring loops, instances
	// behind this load balancer will not have their traffic mirrored even
	// if a PacketMirroring rule applies to them. This can only be set to
	// true for load balancers that have their loadBalancingScheme set to
	// INTERNAL.
	IsMirroringCollector bool `json:"isMirroringCollector,omitempty"`
	// [Output Only] Type of the resource. Always compute#forwardingRule for
	// Forwarding Rule resources.
	Kind string `json:"kind,omitempty"`
	// A fingerprint for the labels being applied to this resource, which is
	// essentially a hash of the labels set used for optimistic locking. The
	// fingerprint is initially generated by Compute Engine and changes
	// after every request to modify or update labels. You must always
	// provide an up-to-date fingerprint hash in order to update or change
	// labels, otherwise the request will fail with error 412
	// conditionNotMet.
	//
	// To see the latest fingerprint, make a get() request to retrieve a
	// ForwardingRule.
	LabelFingerprint string `json:"labelFingerprint,omitempty"`
	// Labels to apply to this resource. These can be later modified by the
	// setLabels method. Each label key/value pair must comply with RFC1035.
	// Label values may be empty.
	Labels map[string]string `json:"labels,omitempty"`
	// Specifies the forwarding rule type.
	//
	//
	// - EXTERNAL is used for:
	// - Classic Cloud VPN gateways
	// - Protocol forwarding to VMs from an external IP address
	// - The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and
	// Network TCP/UDP
	// - INTERNAL is used for:
	// - Protocol forwarding to VMs from an internal IP address
	// - Internal TCP/UDP load balancers
	// - INTERNAL_MANAGED is used for:
	// - Internal HTTP(S) load balancers
	// - >INTERNAL_SELF_MANAGED is used for:
	// - Traffic Director
	//
	// For more information about forwarding rules, refer to Forwarding rule
	// concepts.
	LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
	// Opaque filter criteria used by Loadbalancer to restrict routing
	// configuration to a limited set of xDS compliant clients. In their xDS
	// requests to Loadbalancer, xDS clients present node metadata. If a
	// match takes place, the relevant configuration is made available to
	// those proxies. Otherwise, all the resources (e.g. TargetHttpProxy,
	// UrlMap) referenced by the ForwardingRule will not be visible to those
	// proxies.
	// For each metadataFilter in this list, if its filterMatchCriteria is
	// set to MATCH_ANY, at least one of the filterLabels must match the
	// corresponding label provided in the metadata. If its
	// filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels
	// must match with corresponding labels provided in the
	// metadata.
	// metadataFilters specified here will be applifed before those
	// specified in the UrlMap that this ForwardingRule
	// references.
	// metadataFilters only applies to Loadbalancers that have their
	// loadBalancingScheme set to INTERNAL_SELF_MANAGED.
	MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"`
	// Name of the resource; provided by the client when the resource is
	// created. The name must be 1-63 characters long, and comply with
	// RFC1035. 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.
	Name string `json:"name,omitempty"`
	// This field is not used for external load balancing.
	//
	// For INTERNAL and INTERNAL_SELF_MANAGED load balancing, this field
	// identifies the network that the load balanced IP should belong to for
	// this Forwarding Rule. If this field is not specified, the default
	// network will be used.
	Network string `json:"network,omitempty"`
	// This signifies the networking tier used for configuring this load
	// balancer and can only take the following values: PREMIUM ,
	// STANDARD.
	//
	// For regional ForwardingRule, the valid values are PREMIUM and
	// STANDARD. For GlobalForwardingRule, the valid value is PREMIUM.
	//
	// If this field is not specified, it is assumed to be PREMIUM. If
	// IPAddress is specified, this value must be equal to the networkTier
	// of the Address.
	NetworkTier string `json:"networkTier,omitempty"`
	// When the load balancing scheme is EXTERNAL, INTERNAL_SELF_MANAGED and
	// INTERNAL_MANAGED, you can specify a port_range. Use with a forwarding
	// rule that points to a target proxy or a target pool. Do not use with
	// a forwarding rule that points to a backend service. This field is
	// used along with the target field for TargetHttpProxy,
	// TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway,
	// TargetPool, TargetInstance.
	//
	// Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets
	// addressed to ports in the specified range will be forwarded to
	// target. Forwarding rules with the same [IPAddress, IPProtocol] pair
	// must have disjoint port ranges.
	//
	// Some types of forwarding target have constraints on the acceptable
	// ports:
	// - TargetHttpProxy: 80, 8080
	// - TargetHttpsProxy: 443
	// - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993,
	// 995, 1688, 1883, 5222
	// - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993,
	// 995, 1688, 1883, 5222
	// - TargetVpnGateway: 500, 4500
	PortRange string `json:"portRange,omitempty"`
	// This field is used along with the backend_service field for internal
	// load balancing.
	//
	// When the load balancing scheme is INTERNAL, a list of ports can be
	// configured, for example, ['80'], ['8000','9000']. Only packets
	// addressed to these ports are forwarded to the backends configured
	// with the forwarding rule.
	//
	// If the forwarding rule's loadBalancingScheme is INTERNAL, you can
	// specify ports in one of the following ways:
	//
	// * A list of up to five ports, which can be non-contiguous * Keyword
	// ALL, which causes the forwarding rule to forward traffic on any port
	// of the forwarding rule's protocol.
	Ports []string `json:"ports,omitempty"`
	// [Output Only] URL of the region where the regional forwarding rule
	// resides. This field is not applicable to global forwarding rules. You
	// must specify this field as part of the HTTP request URL. It is not
	// settable as a field in the request body.
	Region string `json:"region,omitempty"`
	// [Output Only] Server-defined URL for the resource.
	SelfLink string `json:"selfLink,omitempty"`
	// [Output Only] Server-defined URL for this resource with the resource
	// id.
	SelfLinkWithId string `json:"selfLinkWithId,omitempty"`
	// An optional prefix to the service name for this Forwarding Rule. If
	// specified, the prefix is the first label of the fully qualified
	// service name.
	//
	// The label must be 1-63 characters long, and comply with RFC1035.
	// Specifically, the label 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.
	//
	// This field is only used for internal load balancing.
	ServiceLabel string `json:"serviceLabel,omitempty"`
	// [Output Only] The internal fully qualified service name for this
	// Forwarding Rule.
	//
	// This field is only used for internal load balancing.
	ServiceName string `json:"serviceName,omitempty"`
	// This field is only used for INTERNAL load balancing.
	//
	// For internal load balancing, this field identifies the subnetwork
	// that the load balanced IP should belong to for this Forwarding
	// Rule.
	//
	// If the network specified is in auto subnet mode, this field is
	// optional. However, if the network is in custom subnet mode, a
	// subnetwork must be specified.
	Subnetwork string `json:"subnetwork,omitempty"`
	// The URL of the target resource to receive the matched traffic. For
	// regional forwarding rules, this target must live in the same region
	// as the forwarding rule. For global forwarding rules, this target must
	// be a global load balancing resource. The forwarded traffic must be of
	// a type appropriate to the target object. For INTERNAL_SELF_MANAGED
	// load balancing, only targetHttpProxy is valid, not targetHttpsProxy.
	Target                   string `json:"target,omitempty"`
	googleapi.ServerResponse `json:"-"`
	ForceSendFields          []string `json:"-"`
	NullFields               []string `json:"-"`
}

ForwardingRule is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

func GetForwardingRule added in v1.6.0

func GetForwardingRule(name string, version meta.Version, cloud *gce.Cloud, key *meta.Key) (*ForwardingRule, error)

func ToForwardingRule added in v1.6.0

func ToForwardingRule(obj interface{}) (*ForwardingRule, error)

ToForwardingRule converts a compute alpha, beta or GA ForwardingRule into our composite type.

func (*ForwardingRule) ToAlpha added in v1.6.0

func (forwardingRule *ForwardingRule) ToAlpha() (*computealpha.ForwardingRule, error)

ToAlpha converts our composite type into an alpha type. This alpha type can be used in GCE API calls.

func (*ForwardingRule) ToBeta added in v1.6.0

func (forwardingRule *ForwardingRule) ToBeta() (*computebeta.ForwardingRule, error)

ToBeta converts our composite type into an beta type. This beta type can be used in GCE API calls.

func (*ForwardingRule) ToGA added in v1.6.0

func (forwardingRule *ForwardingRule) ToGA() (*compute.ForwardingRule, error)

ToGA converts our composite type into an ga type. This ga type can be used in GCE API calls.

type GrpcServiceConfig added in v1.6.0

type GrpcServiceConfig struct {
	// The call credentials to access the SDS server.
	CallCredentials *CallCredentials `json:"callCredentials,omitempty"`
	// The channel credentials to access the SDS server.
	ChannelCredentials *ChannelCredentials `json:"channelCredentials,omitempty"`
	// The target URI of the SDS server.
	TargetUri       string   `json:"targetUri,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

GrpcServiceConfig is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HTTP2HealthCheck added in v1.6.0

type HTTP2HealthCheck struct {
	// The value of the host header in the HTTP/2 health check request. If
	// left empty (default value), the IP on behalf of which this health
	// check is performed will be used.
	Host string `json:"host,omitempty"`
	// The TCP port number for the health check request. The default value
	// is 443. Valid values are 1 through 65535.
	Port int64 `json:"port,omitempty"`
	// Port name as defined in InstanceGroup#NamedPort#name. If both port
	// and port_name are defined, port takes precedence.
	PortName string `json:"portName,omitempty"`
	// Specifies how port is selected for health checking, can be one of
	// following values:
	// USE_FIXED_PORT: The port number in port is used for health
	// checking.
	// USE_NAMED_PORT: The portName is used for health
	// checking.
	// USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for
	// each network endpoint is used for health checking. For other
	// backends, the port or named port specified in the Backend Service is
	// used for health checking.
	//
	//
	// If not specified, HTTP2 health check follows behavior specified in
	// port and portName fields.
	PortSpecification string `json:"portSpecification,omitempty"`
	// Specifies the type of proxy header to append before sending data to
	// the backend, either NONE or PROXY_V1. The default is NONE.
	ProxyHeader string `json:"proxyHeader,omitempty"`
	// The request path of the HTTP/2 health check request. The default
	// value is /.
	RequestPath string `json:"requestPath,omitempty"`
	// The string to match anywhere in the first 1024 bytes of the response
	// body. If left empty (the default value), the status code determines
	// health. The response data can only be ASCII.
	Response        string   `json:"response,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HTTP2HealthCheck is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HTTPHealthCheck added in v1.6.0

type HTTPHealthCheck struct {
	// The value of the host header in the HTTP health check request. If
	// left empty (default value), the IP on behalf of which this health
	// check is performed will be used.
	Host string `json:"host,omitempty"`
	// The TCP port number for the health check request. The default value
	// is 80. Valid values are 1 through 65535.
	Port int64 `json:"port,omitempty"`
	// Port name as defined in InstanceGroup#NamedPort#name. If both port
	// and port_name are defined, port takes precedence.
	PortName string `json:"portName,omitempty"`
	// Specifies how port is selected for health checking, can be one of
	// following values:
	// USE_FIXED_PORT: The port number in port is used for health
	// checking.
	// USE_NAMED_PORT: The portName is used for health
	// checking.
	// USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for
	// each network endpoint is used for health checking. For other
	// backends, the port or named port specified in the Backend Service is
	// used for health checking.
	//
	//
	// If not specified, HTTP health check follows behavior specified in
	// port and portName fields.
	PortSpecification string `json:"portSpecification,omitempty"`
	// Specifies the type of proxy header to append before sending data to
	// the backend, either NONE or PROXY_V1. The default is NONE.
	ProxyHeader string `json:"proxyHeader,omitempty"`
	// The request path of the HTTP health check request. The default value
	// is /.
	RequestPath string `json:"requestPath,omitempty"`
	// The string to match anywhere in the first 1024 bytes of the response
	// body. If left empty (the default value), the status code determines
	// health. The response data can only be ASCII.
	Response        string   `json:"response,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HTTPHealthCheck is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HTTPSHealthCheck added in v1.6.0

type HTTPSHealthCheck struct {
	// The value of the host header in the HTTPS health check request. If
	// left empty (default value), the IP on behalf of which this health
	// check is performed will be used.
	Host string `json:"host,omitempty"`
	// The TCP port number for the health check request. The default value
	// is 443. Valid values are 1 through 65535.
	Port int64 `json:"port,omitempty"`
	// Port name as defined in InstanceGroup#NamedPort#name. If both port
	// and port_name are defined, port takes precedence.
	PortName string `json:"portName,omitempty"`
	// Specifies how port is selected for health checking, can be one of
	// following values:
	// USE_FIXED_PORT: The port number in port is used for health
	// checking.
	// USE_NAMED_PORT: The portName is used for health
	// checking.
	// USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for
	// each network endpoint is used for health checking. For other
	// backends, the port or named port specified in the Backend Service is
	// used for health checking.
	//
	//
	// If not specified, HTTPS health check follows behavior specified in
	// port and portName fields.
	PortSpecification string `json:"portSpecification,omitempty"`
	// Specifies the type of proxy header to append before sending data to
	// the backend, either NONE or PROXY_V1. The default is NONE.
	ProxyHeader string `json:"proxyHeader,omitempty"`
	// The request path of the HTTPS health check request. The default value
	// is /.
	RequestPath string `json:"requestPath,omitempty"`
	// The string to match anywhere in the first 1024 bytes of the response
	// body. If left empty (the default value), the status code determines
	// health. The response data can only be ASCII.
	Response        string   `json:"response,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HTTPSHealthCheck is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HealthCheck added in v1.6.0

type HealthCheck struct {
	// Version keeps track of the intended compute version for this HealthCheck.
	// Note that the compute API's do not contain this field. It is for our
	// own bookkeeping purposes.
	Version meta.Version `json:"-"`
	// ResourceType keeps track of the intended type of the service (e.g. Global)
	// This is also an internal field purely for bookkeeping purposes
	ResourceType meta.KeyType `json:"-"`

	// How often (in seconds) to send a health check. The default value is 5
	// seconds.
	CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"`
	// [Output Only] Creation timestamp in 3339 text format.
	CreationTimestamp string `json:"creationTimestamp,omitempty"`
	// An optional description of this resource. Provide this property when
	// you create the resource.
	Description string `json:"description,omitempty"`
	// A so-far unhealthy instance will be marked healthy after this many
	// consecutive successes. The default value is 2.
	HealthyThreshold int64             `json:"healthyThreshold,omitempty"`
	Http2HealthCheck *HTTP2HealthCheck `json:"http2HealthCheck,omitempty"`
	HttpHealthCheck  *HTTPHealthCheck  `json:"httpHealthCheck,omitempty"`
	HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"`
	// [Output Only] The unique identifier for the resource. This identifier
	// is defined by the server.
	Id uint64 `json:"id,omitempty,string"`
	// Type of the resource.
	Kind string `json:"kind,omitempty"`
	// Configure logging on this health check.
	LogConfig *HealthCheckLogConfig `json:"logConfig,omitempty"`
	// Name of the resource. Provided by the client when the resource is
	// created. The name must be 1-63 characters long, and comply with
	// RFC1035. 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.
	Name string `json:"name,omitempty"`
	// [Output Only] Region where the health check resides. Not applicable
	// to global health checks.
	Region string `json:"region,omitempty"`
	// [Output Only] Server-defined URL for the resource.
	SelfLink string `json:"selfLink,omitempty"`
	// [Output Only] Server-defined URL for this resource with the resource
	// id.
	SelfLinkWithId string          `json:"selfLinkWithId,omitempty"`
	SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"`
	TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"`
	// How long (in seconds) to wait before claiming failure. The default
	// value is 5 seconds. It is invalid for timeoutSec to have greater
	// value than checkIntervalSec.
	TimeoutSec int64 `json:"timeoutSec,omitempty"`
	// Specifies the type of the healthCheck, either TCP, SSL, HTTP, HTTPS
	// or HTTP2. If not specified, the default is TCP. Exactly one of the
	// protocol-specific health check field must be specified, which must
	// match type field.
	Type           string          `json:"type,omitempty"`
	UdpHealthCheck *UDPHealthCheck `json:"udpHealthCheck,omitempty"`
	// A so-far healthy instance will be marked unhealthy after this many
	// consecutive failures. The default value is 2.
	UnhealthyThreshold       int64 `json:"unhealthyThreshold,omitempty"`
	googleapi.ServerResponse `json:"-"`
	ForceSendFields          []string `json:"-"`
	NullFields               []string `json:"-"`
}

HealthCheck is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

func GetHealthCheck added in v1.6.0

func GetHealthCheck(version meta.Version, cloud *gce.Cloud, key *meta.Key) (*HealthCheck, error)

func ToHealthCheck added in v1.6.0

func ToHealthCheck(obj interface{}) (*HealthCheck, error)

ToHealthCheck converts a compute alpha, beta or GA HealthCheck into our composite type.

func (*HealthCheck) ToAlpha added in v1.6.0

func (healthCheck *HealthCheck) ToAlpha() (*computealpha.HealthCheck, error)

ToAlpha converts our composite type into an alpha type. This alpha type can be used in GCE API calls.

func (*HealthCheck) ToBeta added in v1.6.0

func (healthCheck *HealthCheck) ToBeta() (*computebeta.HealthCheck, error)

ToBeta converts our composite type into an beta type. This beta type can be used in GCE API calls.

func (*HealthCheck) ToGA added in v1.6.0

func (healthCheck *HealthCheck) ToGA() (*compute.HealthCheck, error)

ToGA converts our composite type into an ga type. This ga type can be used in GCE API calls.

type HealthCheckLogConfig added in v1.6.2

type HealthCheckLogConfig struct {
	// Indicates whether or not to export logs. This is false by default,
	// which means no health check logging will be done.
	Enable          bool     `json:"enable,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HealthCheckLogConfig is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HostRule added in v1.6.0

type HostRule struct {
	// An optional description of this resource. Provide this property when
	// you create the resource.
	Description string `json:"description,omitempty"`
	// The list of host patterns to match. They must be valid hostnames,
	// except * will match any string of ([a-z0-9-.]*). In that case, * must
	// be the first character and must be followed in the pattern by either
	// - or ..
	Hosts []string `json:"hosts,omitempty"`
	// The name of the PathMatcher to use to match the path portion of the
	// URL if the hostRule matches the URL's host portion.
	PathMatcher     string   `json:"pathMatcher,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HostRule is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpFaultAbort added in v1.6.0

type HttpFaultAbort struct {
	// The HTTP status code used to abort the request.
	// The value must be between 200 and 599 inclusive.
	HttpStatus int64 `json:"httpStatus,omitempty"`
	// The percentage of traffic (connections/operations/requests) which
	// will be aborted as part of fault injection.
	// The value must be between 0.0 and 100.0 inclusive.
	Percentage      float64  `json:"percentage,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HttpFaultAbort is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpFaultDelay added in v1.6.0

type HttpFaultDelay struct {
	// Specifies the value of the fixed delay interval.
	FixedDelay *Duration `json:"fixedDelay,omitempty"`
	// The percentage of traffic (connections/operations/requests) on which
	// delay will be introduced as part of fault injection.
	// The value must be between 0.0 and 100.0 inclusive.
	Percentage      float64  `json:"percentage,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HttpFaultDelay is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpFaultInjection added in v1.6.0

type HttpFaultInjection struct {
	// The specification for how client requests are aborted as part of
	// fault injection.
	Abort *HttpFaultAbort `json:"abort,omitempty"`
	// The specification for how client requests are delayed as part of
	// fault injection, before being sent to a backend service.
	Delay           *HttpFaultDelay `json:"delay,omitempty"`
	ForceSendFields []string        `json:"-"`
	NullFields      []string        `json:"-"`
}

HttpFaultInjection is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpHeaderAction added in v1.6.0

type HttpHeaderAction struct {
	// Headers to add to a matching request prior to forwarding the request
	// to the backendService.
	RequestHeadersToAdd []*HttpHeaderOption `json:"requestHeadersToAdd,omitempty"`
	// A list of header names for headers that need to be removed from the
	// request prior to forwarding the request to the backendService.
	RequestHeadersToRemove []string `json:"requestHeadersToRemove,omitempty"`
	// Headers to add the response prior to sending the response back to the
	// client.
	ResponseHeadersToAdd []*HttpHeaderOption `json:"responseHeadersToAdd,omitempty"`
	// A list of header names for headers that need to be removed from the
	// response prior to sending the response back to the client.
	ResponseHeadersToRemove []string `json:"responseHeadersToRemove,omitempty"`
	ForceSendFields         []string `json:"-"`
	NullFields              []string `json:"-"`
}

HttpHeaderAction is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpHeaderMatch added in v1.6.0

type HttpHeaderMatch struct {
	// The value should exactly match contents of exactMatch.
	// Only one of exactMatch, prefixMatch, suffixMatch, regexMatch,
	// presentMatch or rangeMatch must be set.
	ExactMatch string `json:"exactMatch,omitempty"`
	// The name of the HTTP header to match.
	// For matching against the HTTP request's authority, use a headerMatch
	// with the header name ":authority".
	// For matching a request's method, use the headerName ":method".
	HeaderName string `json:"headerName,omitempty"`
	// If set to false, the headerMatch is considered a match if the match
	// criteria above are met. If set to true, the headerMatch is considered
	// a match if the match criteria above are NOT met.
	// The default setting is false.
	InvertMatch bool `json:"invertMatch,omitempty"`
	// The value of the header must start with the contents of
	// prefixMatch.
	// Only one of exactMatch, prefixMatch, suffixMatch, regexMatch,
	// presentMatch or rangeMatch must be set.
	PrefixMatch string `json:"prefixMatch,omitempty"`
	// A header with the contents of headerName must exist. The match takes
	// place whether or not the request's header has a value.
	// Only one of exactMatch, prefixMatch, suffixMatch, regexMatch,
	// presentMatch or rangeMatch must be set.
	PresentMatch bool `json:"presentMatch,omitempty"`
	// The header value must be an integer and its value must be in the
	// range specified in rangeMatch. If the header does not contain an
	// integer, number or is empty, the match fails.
	// For example for a range [-5, 0]
	// - -3 will match.
	// - 0 will not match.
	// - 0.25 will not match.
	// - -3someString will not match.
	// Only one of exactMatch, prefixMatch, suffixMatch, regexMatch,
	// presentMatch or rangeMatch must be set.
	// Note that rangeMatch is not supported for Loadbalancers that have
	// their loadBalancingScheme set to EXTERNAL.
	RangeMatch *Int64RangeMatch `json:"rangeMatch,omitempty"`
	// The value of the header must match the regular expression specified
	// in regexMatch. For regular expression grammar, please see:
	// en.cppreference.com/w/cpp/regex/ecmascript
	// For matching against a port specified in the HTTP request, use a
	// headerMatch with headerName set to PORT and a regular expression that
	// satisfies the RFC2616 Host header's port specifier.
	// Only one of exactMatch, prefixMatch, suffixMatch, regexMatch,
	// presentMatch or rangeMatch must be set.
	// Note that regexMatch only applies to Loadbalancers that have their
	// loadBalancingScheme set to INTERNAL_SELF_MANAGED.
	RegexMatch string `json:"regexMatch,omitempty"`
	// The value of the header must end with the contents of
	// suffixMatch.
	// Only one of exactMatch, prefixMatch, suffixMatch, regexMatch,
	// presentMatch or rangeMatch must be set.
	SuffixMatch     string   `json:"suffixMatch,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HttpHeaderMatch is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpHeaderOption added in v1.6.0

type HttpHeaderOption struct {
	// The name of the header.
	HeaderName string `json:"headerName,omitempty"`
	// The value of the header to add.
	HeaderValue string `json:"headerValue,omitempty"`
	// If false, headerValue is appended to any values that already exist
	// for the header. If true, headerValue is set for the header,
	// discarding any values that were set for that header.
	// The default value is false.
	Replace         bool     `json:"replace,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HttpHeaderOption is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpQueryParameterMatch added in v1.6.0

type HttpQueryParameterMatch struct {
	// The queryParameterMatch matches if the value of the parameter exactly
	// matches the contents of exactMatch.
	// Only one of presentMatch, exactMatch or regexMatch must be set.
	ExactMatch string `json:"exactMatch,omitempty"`
	// The name of the query parameter to match. The query parameter must
	// exist in the request, in the absence of which the request match
	// fails.
	Name string `json:"name,omitempty"`
	// Specifies that the queryParameterMatch matches if the request
	// contains the query parameter, irrespective of whether the parameter
	// has a value or not.
	// Only one of presentMatch, exactMatch or regexMatch must be set.
	PresentMatch bool `json:"presentMatch,omitempty"`
	// The queryParameterMatch matches if the value of the parameter matches
	// the regular expression specified by regexMatch. For the regular
	// expression grammar, please see
	// en.cppreference.com/w/cpp/regex/ecmascript
	// Only one of presentMatch, exactMatch or regexMatch must be set.
	// Note that regexMatch only applies when the loadBalancingScheme is set
	// to INTERNAL_SELF_MANAGED.
	RegexMatch      string   `json:"regexMatch,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HttpQueryParameterMatch is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpRedirectAction added in v1.6.0

type HttpRedirectAction struct {
	// The host that will be used in the redirect response instead of the
	// one that was supplied in the request.
	// The value must be between 1 and 255 characters.
	HostRedirect string `json:"hostRedirect,omitempty"`
	// If set to true, the URL scheme in the redirected request is set to
	// https. If set to false, the URL scheme of the redirected request will
	// remain the same as that of the request.
	// This must only be set for UrlMaps used in TargetHttpProxys. Setting
	// this true for TargetHttpsProxy is not permitted.
	// The default is set to false.
	HttpsRedirect bool `json:"httpsRedirect,omitempty"`
	// The path that will be used in the redirect response instead of the
	// one that was supplied in the request.
	// pathRedirect cannot be supplied together with prefixRedirect. Supply
	// one alone or neither. If neither is supplied, the path of the
	// original request will be used for the redirect.
	// The value must be between 1 and 1024 characters.
	PathRedirect string `json:"pathRedirect,omitempty"`
	// The prefix that replaces the prefixMatch specified in the
	// HttpRouteRuleMatch, retaining the remaining portion of the URL before
	// redirecting the request.
	// prefixRedirect cannot be supplied together with pathRedirect. Supply
	// one alone or neither. If neither is supplied, the path of the
	// original request will be used for the redirect.
	// The value must be between 1 and 1024 characters.
	PrefixRedirect string `json:"prefixRedirect,omitempty"`
	// The HTTP Status code to use for this RedirectAction.
	// Supported values are:
	// - MOVED_PERMANENTLY_DEFAULT, which is the default value and
	// corresponds to 301.
	// - FOUND, which corresponds to 302.
	// - SEE_OTHER which corresponds to 303.
	// - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the
	// request method will be retained.
	// - PERMANENT_REDIRECT, which corresponds to 308. In this case, the
	// request method will be retained.
	RedirectResponseCode string `json:"redirectResponseCode,omitempty"`
	// If set to true, any accompanying query portion of the original URL is
	// removed prior to redirecting the request. If set to false, the query
	// portion of the original URL is retained.
	// The default is set to false.
	StripQuery      bool     `json:"stripQuery,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HttpRedirectAction is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpRetryPolicy added in v1.6.0

type HttpRetryPolicy struct {
	// Specifies the allowed number retries. This number must be > 0. If not
	// specified, defaults to 1.
	NumRetries int64 `json:"numRetries,omitempty"`
	// Specifies a non-zero timeout per retry attempt.
	// If not specified, will use the timeout set in HttpRouteAction. If
	// timeout in HttpRouteAction is not set, will use the largest timeout
	// among all backend services associated with the route.
	PerTryTimeout *Duration `json:"perTryTimeout,omitempty"`
	// Specfies one or more conditions when this retry rule applies. Valid
	// values are:
	// - 5xx: Loadbalancer will attempt a retry if the backend service
	// responds with any 5xx response code, or if the backend service does
	// not respond at all, example: disconnects, reset, read timeout,
	// connection failure, and refused streams.
	// - gateway-error: Similar to 5xx, but only applies to response codes
	// 502, 503 or 504.
	// -
	// - connect-failure: Loadbalancer will retry on failures connecting to
	// backend services, for example due to connection timeouts.
	// - retriable-4xx: Loadbalancer will retry for retriable 4xx response
	// codes. Currently the only retriable error supported is 409.
	// - refused-stream:Loadbalancer will retry if the backend service
	// resets the stream with a REFUSED_STREAM error code. This reset type
	// indicates that it is safe to retry.
	// - cancelledLoadbalancer will retry if the gRPC status code in the
	// response header is set to cancelled
	// - deadline-exceeded: Loadbalancer will retry if the gRPC status code
	// in the response header is set to deadline-exceeded
	// - resource-exhausted: Loadbalancer will retry if the gRPC status code
	// in the response header is set to resource-exhausted
	// - unavailable: Loadbalancer will retry if the gRPC status code in the
	// response header is set to unavailable
	RetryConditions []string `json:"retryConditions,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HttpRetryPolicy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpRouteAction added in v1.6.0

type HttpRouteAction struct {
	// The specification for allowing client side cross-origin requests.
	// Please see W3C Recommendation for Cross Origin Resource Sharing
	CorsPolicy *CorsPolicy `json:"corsPolicy,omitempty"`
	// The specification for fault injection introduced into traffic to test
	// the resiliency of clients to backend service failure. As part of
	// fault injection, when clients send requests to a backend service,
	// delays can be introduced by Loadbalancer on a percentage of requests
	// before sending those request to the backend service. Similarly
	// requests from clients can be aborted by the Loadbalancer for a
	// percentage of requests.
	// timeout and retry_policy will be ignored by clients that are
	// configured with a fault_injection_policy.
	FaultInjectionPolicy *HttpFaultInjection `json:"faultInjectionPolicy,omitempty"`
	// Specifies the policy on how requests intended for the route's
	// backends are shadowed to a separate mirrored backend service.
	// Loadbalancer does not wait for responses from the shadow service.
	// Prior to sending traffic to the shadow service, the host / authority
	// header is suffixed with -shadow.
	RequestMirrorPolicy *RequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"`
	// Specifies the retry policy associated with this route.
	RetryPolicy *HttpRetryPolicy `json:"retryPolicy,omitempty"`
	// Specifies the timeout for the selected route. Timeout is computed
	// from the time the request has been fully processed (i.e.
	// end-of-stream) up until the response has been completely processed.
	// Timeout includes all retries.
	// If not specified, will use the largest timeout among all backend
	// services associated with the route.
	Timeout *Duration `json:"timeout,omitempty"`
	// The spec to modify the URL of the request, prior to forwarding the
	// request to the matched service.
	UrlRewrite *UrlRewrite `json:"urlRewrite,omitempty"`
	// A list of weighted backend services to send traffic to when a route
	// match occurs. The weights determine the fraction of traffic that
	// flows to their corresponding backend service. If all traffic needs to
	// go to a single backend service, there must be one
	// weightedBackendService with weight set to a non 0 number.
	// Once a backendService is identified and before forwarding the request
	// to the backend service, advanced routing actions like Url rewrites
	// and header transformations are applied depending on additional
	// settings specified in this HttpRouteAction.
	WeightedBackendServices []*WeightedBackendService `json:"weightedBackendServices,omitempty"`
	ForceSendFields         []string                  `json:"-"`
	NullFields              []string                  `json:"-"`
}

HttpRouteAction is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpRouteRule added in v1.6.0

type HttpRouteRule struct {
	// The short description conveying the intent of this routeRule.
	// The description can have a maximum length of 1024 characters.
	Description string `json:"description,omitempty"`
	// Specifies changes to request and response headers that need to take
	// effect for the selected backendService.
	// The headerAction specified here are applied before the matching
	// pathMatchers[].headerAction and after
	// pathMatchers[].routeRules[].routeAction.weightedBackendService.backend
	// ServiceWeightAction[].headerAction
	HeaderAction *HttpHeaderAction     `json:"headerAction,omitempty"`
	MatchRules   []*HttpRouteRuleMatch `json:"matchRules,omitempty"`
	// For routeRules within a given pathMatcher, priority determines the
	// order in which load balancer will interpret routeRules. RouteRules
	// are evaluated in order of priority, from the lowest to highest
	// number. The priority of a rule decreases as its number increases (1,
	// 2, 3, N+1). The first rule that matches the request is applied.
	// You cannot configure two or more routeRules with the same priority.
	// Priority for each rule must be set to a number between 0 and
	// 2147483647 inclusive.
	// Priority numbers can have gaps, which enable you to add or remove
	// rules in the future without affecting the rest of the rules. For
	// example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority
	// numbers to which you could add rules numbered from 6 to 8, 10 to 11,
	// and 13 to 15 in the future without any impact on existing rules.
	Priority int64 `json:"priority,omitempty"`
	// In response to a matching matchRule, the load balancer performs
	// advanced routing actions like URL rewrites, header transformations,
	// etc. prior to forwarding the request to the selected backend. If
	// routeAction specifies any  weightedBackendServices, service must not
	// be set. Conversely if service is set, routeAction cannot contain any
	// weightedBackendServices.
	// Only one of urlRedirect, service or
	// routeAction.weightedBackendService must be set.
	RouteAction *HttpRouteAction `json:"routeAction,omitempty"`
	// The full or partial URL of the backend service resource to which
	// traffic is directed if this rule is matched. If routeAction is
	// additionally specified, advanced routing actions like URL Rewrites,
	// etc. take effect prior to sending the request to the backend.
	// However, if service is specified, routeAction cannot contain any
	// weightedBackendService s. Conversely, if routeAction specifies any
	// weightedBackendServices, service must not be specified.
	// Only one of urlRedirect, service or
	// routeAction.weightedBackendService must be set.
	Service string `json:"service,omitempty"`
	// When this rule is matched, the request is redirected to a URL
	// specified by urlRedirect.
	// If urlRedirect is specified, service or routeAction must not be set.
	UrlRedirect     *HttpRedirectAction `json:"urlRedirect,omitempty"`
	ForceSendFields []string            `json:"-"`
	NullFields      []string            `json:"-"`
}

HttpRouteRule is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type HttpRouteRuleMatch added in v1.6.0

type HttpRouteRuleMatch struct {
	// For satisfying the matchRule condition, the path of the request must
	// exactly match the value specified in fullPathMatch after removing any
	// query parameters and anchor that may be part of the original
	// URL.
	// fullPathMatch must be between 1 and 1024 characters.
	// Only one of prefixMatch, fullPathMatch or regexMatch must be
	// specified.
	FullPathMatch string `json:"fullPathMatch,omitempty"`
	// Specifies a list of header match criteria, all of which must match
	// corresponding headers in the request.
	HeaderMatches []*HttpHeaderMatch `json:"headerMatches,omitempty"`
	// Specifies that prefixMatch and fullPathMatch matches are case
	// sensitive.
	// The default value is false.
	// ignoreCase must not be used with regexMatch.
	IgnoreCase bool `json:"ignoreCase,omitempty"`
	// Opaque filter criteria used by Loadbalancer to restrict routing
	// configuration to a limited set of xDS compliant clients. In their xDS
	// requests to Loadbalancer, xDS clients present node metadata. If a
	// match takes place, the relevant routing configuration is made
	// available to those proxies.
	// For each metadataFilter in this list, if its filterMatchCriteria is
	// set to MATCH_ANY, at least one of the filterLabels must match the
	// corresponding label provided in the metadata. If its
	// filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels
	// must match with corresponding labels provided in the
	// metadata.
	// metadataFilters specified here will be applied after those specified
	// in ForwardingRule that refers to the UrlMap this HttpRouteRuleMatch
	// belongs to.
	// metadataFilters only applies to Loadbalancers that have their
	// loadBalancingScheme set to INTERNAL_SELF_MANAGED.
	MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"`
	// For satisfying the matchRule condition, the request's path must begin
	// with the specified prefixMatch. prefixMatch must begin with a /.
	// The value must be between 1 and 1024 characters.
	// Only one of prefixMatch, fullPathMatch or regexMatch must be
	// specified.
	PrefixMatch string `json:"prefixMatch,omitempty"`
	// Specifies a list of query parameter match criteria, all of which must
	// match corresponding query parameters in the request.
	QueryParameterMatches []*HttpQueryParameterMatch `json:"queryParameterMatches,omitempty"`
	// For satisfying the matchRule condition, the path of the request must
	// satisfy the regular expression specified in regexMatch after removing
	// any query parameters and anchor supplied with the original URL. For
	// regular expression grammar please see
	// en.cppreference.com/w/cpp/regex/ecmascript
	// Only one of prefixMatch, fullPathMatch or regexMatch must be
	// specified.
	// Note that regexMatch only applies to Loadbalancers that have their
	// loadBalancingScheme set to INTERNAL_SELF_MANAGED.
	RegexMatch      string   `json:"regexMatch,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

HttpRouteRuleMatch is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type Int64RangeMatch added in v1.6.0

type Int64RangeMatch struct {
	// The end of the range (exclusive) in signed long integer format.
	RangeEnd int64 `json:"rangeEnd,omitempty,string"`
	// The start of the range (inclusive) in signed long integer format.
	RangeStart      int64    `json:"rangeStart,omitempty,string"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

Int64RangeMatch is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type Jwt added in v1.6.0

type Jwt struct {
	// A JWT containing any of these audiences will be accepted. The service
	// name will be accepted if audiences is empty. Examples:
	// bookstore_android.apps.googleusercontent.com,
	// bookstore_web.apps.googleusercontent.com
	Audiences []string `json:"audiences,omitempty"`
	// Identifies the issuer that issued the JWT, which is usually a URL or
	// an email address. Examples: https://securetoken.google.com,
	// 1234567-compute@developer.gserviceaccount.com
	Issuer string `json:"issuer,omitempty"`
	// The provider's public key set to validate the signature of the JWT.
	JwksPublicKeys string `json:"jwksPublicKeys,omitempty"`
	// jwt_headers and jwt_params define where to extract the JWT from an
	// HTTP request. If no explicit location is specified, the following
	// default locations are tried in order:
	//
	// 1. The Authorization header using the Bearer schema. See `here `_.
	// Example:
	//
	// Authorization: Bearer .
	//
	// 2. `access_token` query parameter. See `this `_
	//
	// Multiple JWTs can be verified for a request. Each JWT has to be
	// extracted from the locations its issuer specified or from the default
	// locations.
	//
	// This field is set if JWT is sent in a request header. This field
	// specifies the header name. For example, if
	// `header=x-goog-iap-jwt-assertion`, the header format will be
	// x-goog-iap-jwt-assertion: .
	JwtHeaders []*JwtHeader `json:"jwtHeaders,omitempty"`
	// This field is set if JWT is sent in a query parameter. This field
	// specifies the query parameter name. For example, if jwt_params[0] is
	// jwt_token, the JWT format in the query parameter is /path?jwt_token=.
	JwtParams       []string `json:"jwtParams,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

Jwt is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type JwtHeader added in v1.6.0

type JwtHeader struct {
	// The HTTP header name.
	Name string `json:"name,omitempty"`
	// The value prefix. The value format is "value_prefix" For example, for
	// "Authorization: Bearer ", value_prefix="Bearer " with a space at the
	// end.
	ValuePrefix     string   `json:"valuePrefix,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

JwtHeader is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type MetadataCredentialsFromPlugin added in v1.6.0

type MetadataCredentialsFromPlugin struct {
	// Plugin name.
	Name string `json:"name,omitempty"`
	// A text proto that conforms to a Struct type definition interpreted by
	// the plugin.
	StructConfig    string   `json:"structConfig,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

MetadataCredentialsFromPlugin is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type MetadataFilter added in v1.6.0

type MetadataFilter struct {
	// The list of label value pairs that must match labels in the provided
	// metadata based on filterMatchCriteria
	// This list must not be empty and can have at the most 64 entries.
	FilterLabels []*MetadataFilterLabelMatch `json:"filterLabels,omitempty"`
	// Specifies how individual filterLabel matches within the list of
	// filterLabels contribute towards the overall metadataFilter
	// match.
	// Supported values are:
	// - MATCH_ANY: At least one of the filterLabels must have a matching
	// label in the provided metadata.
	// - MATCH_ALL: All filterLabels must have matching labels in the
	// provided metadata.
	FilterMatchCriteria string   `json:"filterMatchCriteria,omitempty"`
	ForceSendFields     []string `json:"-"`
	NullFields          []string `json:"-"`
}

MetadataFilter is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type MetadataFilterLabelMatch added in v1.6.0

type MetadataFilterLabelMatch struct {
	// Name of metadata label.
	// The name can have a maximum length of 1024 characters and must be at
	// least 1 character long.
	Name string `json:"name,omitempty"`
	// The value of the label must match the specified value.
	// value can have a maximum length of 1024 characters.
	Value           string   `json:"value,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

MetadataFilterLabelMatch is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type MutualTls added in v1.6.0

type MutualTls struct {
	// Specifies if the server TLS is configured to be strict or permissive.
	// This field can be set to one of the following: STRICT: Client
	// certificate must be presented, connection is in TLS. PERMISSIVE:
	// Client certificate can be omitted, connection can be either plaintext
	// or TLS.
	Mode            string   `json:"mode,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

MutualTls is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type OriginAuthenticationMethod added in v1.6.0

type OriginAuthenticationMethod struct {
	Jwt             *Jwt     `json:"jwt,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

OriginAuthenticationMethod is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type OutlierDetection added in v1.6.0

type OutlierDetection struct {
	// The base time that a host is ejected for. The real ejection time is
	// equal to the base ejection time multiplied by the number of times the
	// host has been ejected. Defaults to 30000ms or 30s.
	BaseEjectionTime *Duration `json:"baseEjectionTime,omitempty"`
	// Number of errors before a host is ejected from the connection pool.
	// When the backend host is accessed over HTTP, a 5xx return code
	// qualifies as an error. Defaults to 5.
	ConsecutiveErrors int64 `json:"consecutiveErrors,omitempty"`
	// The number of consecutive gateway failures (502, 503, 504 status or
	// connection errors that are mapped to one of those status codes)
	// before a consecutive gateway failure ejection occurs. Defaults to 3.
	ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"`
	// The percentage chance that a host will be actually ejected when an
	// outlier status is detected through consecutive 5xx. This setting can
	// be used to disable ejection or to ramp it up slowly. Defaults to 0.
	EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"`
	// The percentage chance that a host will be actually ejected when an
	// outlier status is detected through consecutive gateway failures. This
	// setting can be used to disable ejection or to ramp it up slowly.
	// Defaults to 100.
	EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"`
	// The percentage chance that a host will be actually ejected when an
	// outlier status is detected through success rate statistics. This
	// setting can be used to disable ejection or to ramp it up slowly.
	// Defaults to 100.
	EnforcingSuccessRate int64 `json:"enforcingSuccessRate,omitempty"`
	// Time interval between ejection analysis sweeps. This can result in
	// both new ejections as well as hosts being returned to service.
	// Defaults to 1 second.
	Interval *Duration `json:"interval,omitempty"`
	// Maximum percentage of hosts in the load balancing pool for the
	// backend service that can be ejected. Defaults to 50%.
	MaxEjectionPercent int64 `json:"maxEjectionPercent,omitempty"`
	// The number of hosts in a cluster that must have enough request volume
	// to detect success rate outliers. If the number of hosts is less than
	// this setting, outlier detection via success rate statistics is not
	// performed for any host in the cluster. Defaults to 5.
	SuccessRateMinimumHosts int64 `json:"successRateMinimumHosts,omitempty"`
	// The minimum number of total requests that must be collected in one
	// interval (as defined by the interval duration above) to include this
	// host in success rate based outlier detection. If the volume is lower
	// than this setting, outlier detection via success rate statistics is
	// not performed for that host. Defaults to 100.
	SuccessRateRequestVolume int64 `json:"successRateRequestVolume,omitempty"`
	// This factor is used to determine the ejection threshold for success
	// rate outlier ejection. The ejection threshold is the difference
	// between the mean success rate, and the product of this factor and the
	// standard deviation of the mean success rate: mean - (stdev *
	// success_rate_stdev_factor). This factor is divided by a thousand to
	// get a double. That is, if the desired factor is 1.9, the runtime
	// value should be 1900. Defaults to 1900.
	SuccessRateStdevFactor int64    `json:"successRateStdevFactor,omitempty"`
	ForceSendFields        []string `json:"-"`
	NullFields             []string `json:"-"`
}

OutlierDetection is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type PathMatcher added in v1.6.0

type PathMatcher struct {
	// defaultRouteAction takes effect when none of the  pathRules or
	// routeRules match. The load balancer performs advanced routing actions
	// like URL rewrites, header transformations, etc. prior to forwarding
	// the request to the selected backend. If defaultRouteAction specifies
	// any weightedBackendServices, defaultService must not be set.
	// Conversely if defaultService is set, defaultRouteAction cannot
	// contain any  weightedBackendServices.
	// Only one of defaultRouteAction or defaultUrlRedirect must be set.
	DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"`
	// 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
	DefaultService string `json:"defaultService,omitempty"`
	// When none of the specified pathRules or routeRules match, the request
	// is redirected to a URL specified by defaultUrlRedirect.
	// If defaultUrlRedirect is specified, defaultService or
	// defaultRouteAction must not be set.
	DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"`
	// An optional description of this resource. Provide this property when
	// you create the resource.
	Description string `json:"description,omitempty"`
	// Specifies changes to request and response headers that need to take
	// effect for the selected backendService.
	// HeaderAction specified here are applied after the matching
	// HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap
	HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"`
	// The name to which this PathMatcher is referred by the HostRule.
	Name string `json:"name,omitempty"`
	// 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.
	// Within a given pathMatcher, only one of pathRules or routeRules must
	// be set.
	PathRules []*PathRule `json:"pathRules,omitempty"`
	// The list of HTTP route rules. Use this list instead of pathRules when
	// advanced route matching and routing actions are desired. routeRules
	// are evaluated in order of priority, from the lowest to highest
	// number.
	// Within a given pathMatcher, you can set only one of pathRules or
	// routeRules.
	RouteRules      []*HttpRouteRule `json:"routeRules,omitempty"`
	ForceSendFields []string         `json:"-"`
	NullFields      []string         `json:"-"`
}

PathMatcher is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type PathRule added in v1.6.0

type PathRule struct {
	// The list of path patterns to match. Each must start with / and the
	// only place a * is allowed is at the end following a /. The string fed
	// to the path matcher does not include any text after the first ? or #,
	// and those chars are not allowed here.
	Paths []string `json:"paths,omitempty"`
	// In response to a matching path, the load balancer performs advanced
	// routing actions like URL rewrites, header transformations, etc. prior
	// to forwarding the request to the selected backend. If routeAction
	// specifies any  weightedBackendServices, service must not be set.
	// Conversely if service is set, routeAction cannot contain any
	// weightedBackendServices.
	// Only one of routeAction or urlRedirect must be set.
	RouteAction *HttpRouteAction `json:"routeAction,omitempty"`
	// The full or partial URL of the backend service resource to which
	// traffic is directed if this rule is matched. If routeAction is
	// additionally specified, advanced routing actions like URL Rewrites,
	// etc. take effect prior to sending the request to the backend.
	// However, if service is specified, routeAction cannot contain any
	// weightedBackendService s. Conversely, if routeAction specifies any
	// weightedBackendServices, service must not be specified.
	// Only one of urlRedirect, service or
	// routeAction.weightedBackendService must be set.
	Service string `json:"service,omitempty"`
	// When a path pattern is matched, the request is redirected to a URL
	// specified by urlRedirect.
	// If urlRedirect is specified, service or routeAction must not be set.
	UrlRedirect     *HttpRedirectAction `json:"urlRedirect,omitempty"`
	ForceSendFields []string            `json:"-"`
	NullFields      []string            `json:"-"`
}

PathRule is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type PeerAuthenticationMethod added in v1.6.0

type PeerAuthenticationMethod struct {
	// Set if mTLS is used for peer authentication.
	Mtls            *MutualTls `json:"mtls,omitempty"`
	ForceSendFields []string   `json:"-"`
	NullFields      []string   `json:"-"`
}

PeerAuthenticationMethod is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type Permission added in v1.6.0

type Permission struct {
	// Extra custom constraints. The constraints are ANDed together.
	Constraints []*PermissionConstraint `json:"constraints,omitempty"`
	// Used in Ingress or Egress Gateway cases to specify hosts that the
	// policy applies to. Exact match, prefix match, and suffix match are
	// supported.
	Hosts []string `json:"hosts,omitempty"`
	// HTTP method.
	Methods []string `json:"methods,omitempty"`
	// Negate of hosts. Specifies exclusions.
	NotHosts []string `json:"notHosts,omitempty"`
	// Negate of methods. Specifies exclusions.
	NotMethods []string `json:"notMethods,omitempty"`
	// Negate of paths. Specifies exclusions.
	NotPaths []string `json:"notPaths,omitempty"`
	// Negate of ports. Specifies exclusions.
	NotPorts []string `json:"notPorts,omitempty"`
	// HTTP request paths or gRPC methods. Exact match, prefix match, and
	// suffix match are supported.
	Paths []string `json:"paths,omitempty"`
	// Port names or numbers.
	Ports           []string `json:"ports,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

Permission is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type PermissionConstraint added in v1.6.0

type PermissionConstraint struct {
	// Key of the constraint.
	Key string `json:"key,omitempty"`
	// A list of allowed values.
	Values          []string `json:"values,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

PermissionConstraint is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type Principal added in v1.6.0

type Principal struct {
	// An expression to specify custom condition.
	Condition string `json:"condition,omitempty"`
	// The groups the principal belongs to. Exact match, prefix match, and
	// suffix match are supported.
	Groups []string `json:"groups,omitempty"`
	// IPv4 or IPv6 address or range (In CIDR format)
	Ips []string `json:"ips,omitempty"`
	// The namespaces. Exact match, prefix match, and suffix match are
	// supported.
	Namespaces []string `json:"namespaces,omitempty"`
	// Negate of groups. Specifies exclusions.
	NotGroups []string `json:"notGroups,omitempty"`
	// Negate of IPs. Specifies exclusions.
	NotIps []string `json:"notIps,omitempty"`
	// Negate of namespaces. Specifies exclusions.
	NotNamespaces []string `json:"notNamespaces,omitempty"`
	// Negate of users. Specifies exclusions.
	NotUsers []string `json:"notUsers,omitempty"`
	// A map of Istio attribute to expected values. Exact match, prefix
	// match, and suffix match are supported for values. For example,
	// `request.headers[version]: "v1". The properties are ANDed together.
	Properties map[string]string `json:"properties,omitempty"`
	// The user names/IDs or service accounts. Exact match, prefix match,
	// and suffix match are supported.
	Users           []string `json:"users,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

Principal is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type RbacPolicy added in v1.6.0

type RbacPolicy struct {
	// Name of the RbacPolicy.
	Name string `json:"name,omitempty"`
	// The list of permissions.
	Permissions []*Permission `json:"permissions,omitempty"`
	// The list of principals.
	Principals      []*Principal `json:"principals,omitempty"`
	ForceSendFields []string     `json:"-"`
	NullFields      []string     `json:"-"`
}

RbacPolicy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type RequestMirrorPolicy added in v1.6.0

type RequestMirrorPolicy struct {
	// The full or partial URL to the BackendService resource being mirrored
	// to.
	BackendService  string   `json:"backendService,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

RequestMirrorPolicy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type SSLHealthCheck added in v1.6.0

type SSLHealthCheck struct {
	// The TCP port number for the health check request. The default value
	// is 443. Valid values are 1 through 65535.
	Port int64 `json:"port,omitempty"`
	// Port name as defined in InstanceGroup#NamedPort#name. If both port
	// and port_name are defined, port takes precedence.
	PortName string `json:"portName,omitempty"`
	// Specifies how port is selected for health checking, can be one of
	// following values:
	// USE_FIXED_PORT: The port number in port is used for health
	// checking.
	// USE_NAMED_PORT: The portName is used for health
	// checking.
	// USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for
	// each network endpoint is used for health checking. For other
	// backends, the port or named port specified in the Backend Service is
	// used for health checking.
	//
	//
	// If not specified, SSL health check follows behavior specified in port
	// and portName fields.
	PortSpecification string `json:"portSpecification,omitempty"`
	// Specifies the type of proxy header to append before sending data to
	// the backend, either NONE or PROXY_V1. The default is NONE.
	ProxyHeader string `json:"proxyHeader,omitempty"`
	// The application data to send once the SSL connection has been
	// established (default value is empty). If both request and response
	// are empty, the connection establishment alone will indicate health.
	// The request data can only be ASCII.
	Request string `json:"request,omitempty"`
	// The bytes to match against the beginning of the response data. If
	// left empty (the default value), any response will indicate health.
	// The response data can only be ASCII.
	Response        string   `json:"response,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

SSLHealthCheck is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type SdsConfig added in v1.6.0

type SdsConfig struct {
	// The configuration to access the SDS server over GRPC.
	GrpcServiceConfig *GrpcServiceConfig `json:"grpcServiceConfig,omitempty"`
	ForceSendFields   []string           `json:"-"`
	NullFields        []string           `json:"-"`
}

SdsConfig is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type SecuritySettings added in v1.6.0

type SecuritySettings struct {
	// Authentication policy defines what authentication methods can be
	// accepted on backends, and if authenticated, which method/certificate
	// will set the request principal.
	AuthenticationPolicy *AuthenticationPolicy `json:"authenticationPolicy,omitempty"`
	// Authorization config defines the Role Based Access Control (RBAC)
	// config.
	AuthorizationConfig *AuthorizationConfig `json:"authorizationConfig,omitempty"`
	// TLS Settings for the backend service.
	ClientTlsSettings *ClientTlsSettings `json:"clientTlsSettings,omitempty"`
	ForceSendFields   []string           `json:"-"`
	NullFields        []string           `json:"-"`
}

SecuritySettings is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type TCPHealthCheck added in v1.6.0

type TCPHealthCheck struct {
	// The TCP port number for the health check request. The default value
	// is 80. Valid values are 1 through 65535.
	Port int64 `json:"port,omitempty"`
	// Port name as defined in InstanceGroup#NamedPort#name. If both port
	// and port_name are defined, port takes precedence.
	PortName string `json:"portName,omitempty"`
	// Specifies how port is selected for health checking, can be one of
	// following values:
	// USE_FIXED_PORT: The port number in port is used for health
	// checking.
	// USE_NAMED_PORT: The portName is used for health
	// checking.
	// USE_SERVING_PORT: For NetworkEndpointGroup, the port specified for
	// each network endpoint is used for health checking. For other
	// backends, the port or named port specified in the Backend Service is
	// used for health checking.
	//
	//
	// If not specified, TCP health check follows behavior specified in port
	// and portName fields.
	PortSpecification string `json:"portSpecification,omitempty"`
	// Specifies the type of proxy header to append before sending data to
	// the backend, either NONE or PROXY_V1. The default is NONE.
	ProxyHeader string `json:"proxyHeader,omitempty"`
	// The application data to send once the TCP connection has been
	// established (default value is empty). If both request and response
	// are empty, the connection establishment alone will indicate health.
	// The request data can only be ASCII.
	Request string `json:"request,omitempty"`
	// The bytes to match against the beginning of the response data. If
	// left empty (the default value), any response will indicate health.
	// The response data can only be ASCII.
	Response        string   `json:"response,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

TCPHealthCheck is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type TargetHttpProxy added in v1.6.0

type TargetHttpProxy struct {
	// Version keeps track of the intended compute version for this TargetHttpProxy.
	// Note that the compute API's do not contain this field. It is for our
	// own bookkeeping purposes.
	Version meta.Version `json:"-"`
	// ResourceType keeps track of the intended type of the service (e.g. Global)
	// This is also an internal field purely for bookkeeping purposes
	ResourceType meta.KeyType `json:"-"`

	// [Output Only] Creation timestamp in RFC3339 text format.
	CreationTimestamp string `json:"creationTimestamp,omitempty"`
	// An optional description of this resource. Provide this property when
	// you create the resource.
	Description string `json:"description,omitempty"`
	// [Output Only] The unique identifier for the resource. This identifier
	// is defined by the server.
	Id uint64 `json:"id,omitempty,string"`
	// [Output Only] Type of resource. Always compute#targetHttpProxy for
	// target HTTP proxies.
	Kind string `json:"kind,omitempty"`
	// Name of the resource. Provided by the client when the resource is
	// created. The name must be 1-63 characters long, and comply with
	// RFC1035. 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.
	Name string `json:"name,omitempty"`
	// This field only applies when the loadBalancingScheme is
	// INTERNAL_SELF_MANAGED. When set to true the Envoy binds on the IP
	// address specified by the forwarding rule. Default is false.
	ProxyBind bool `json:"proxyBind,omitempty"`
	// [Output Only] URL of the region where the regional Target HTTP Proxy
	// resides. This field is not applicable to global Target HTTP Proxies.
	Region string `json:"region,omitempty"`
	// [Output Only] Server-defined URL for the resource.
	SelfLink string `json:"selfLink,omitempty"`
	// [Output Only] Server-defined URL for this resource with the resource
	// id.
	SelfLinkWithId string `json:"selfLinkWithId,omitempty"`
	// URL to the UrlMap resource that defines the mapping from URL to the
	// BackendService.
	UrlMap                   string `json:"urlMap,omitempty"`
	googleapi.ServerResponse `json:"-"`
	ForceSendFields          []string `json:"-"`
	NullFields               []string `json:"-"`
}

TargetHttpProxy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

func GetTargetHttpProxy added in v1.6.0

func GetTargetHttpProxy(version meta.Version, cloud *gce.Cloud, key *meta.Key) (*TargetHttpProxy, error)

func ToTargetHttpProxy added in v1.6.0

func ToTargetHttpProxy(obj interface{}) (*TargetHttpProxy, error)

ToTargetHttpProxy converts a compute alpha, beta or GA TargetHttpProxy into our composite type.

func (*TargetHttpProxy) ToAlpha added in v1.6.0

func (targetHttpProxy *TargetHttpProxy) ToAlpha() (*computealpha.TargetHttpProxy, error)

ToAlpha converts our composite type into an alpha type. This alpha type can be used in GCE API calls.

func (*TargetHttpProxy) ToBeta added in v1.6.0

func (targetHttpProxy *TargetHttpProxy) ToBeta() (*computebeta.TargetHttpProxy, error)

ToBeta converts our composite type into an beta type. This beta type can be used in GCE API calls.

func (*TargetHttpProxy) ToGA added in v1.6.0

func (targetHttpProxy *TargetHttpProxy) ToGA() (*compute.TargetHttpProxy, error)

ToGA converts our composite type into an ga type. This ga type can be used in GCE API calls.

type TargetHttpsProxy added in v1.6.0

type TargetHttpsProxy struct {
	// Version keeps track of the intended compute version for this TargetHttpsProxy.
	// Note that the compute API's do not contain this field. It is for our
	// own bookkeeping purposes.
	Version meta.Version `json:"-"`
	// ResourceType keeps track of the intended type of the service (e.g. Global)
	// This is also an internal field purely for bookkeeping purposes
	ResourceType meta.KeyType `json:"-"`

	// [Output Only] Creation timestamp in RFC3339 text format.
	CreationTimestamp string `json:"creationTimestamp,omitempty"`
	// An optional description of this resource. Provide this property when
	// you create the resource.
	Description string `json:"description,omitempty"`
	// [Output Only] The unique identifier for the resource. This identifier
	// is defined by the server.
	Id uint64 `json:"id,omitempty,string"`
	// [Output Only] Type of resource. Always compute#targetHttpsProxy for
	// target HTTPS proxies.
	Kind string `json:"kind,omitempty"`
	// Name of the resource. Provided by the client when the resource is
	// created. The name must be 1-63 characters long, and comply with
	// RFC1035. 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.
	Name string `json:"name,omitempty"`
	// This field only applies when the loadBalancingScheme is
	// INTERNAL_SELF_MANAGED. When set to true the Envoy binds on the IP
	// address specified by the forwarding rule. Default is false.
	ProxyBind bool `json:"proxyBind,omitempty"`
	// Specifies the QUIC override policy for this TargetHttpsProxy
	// resource. This setting determines whether the load balancer attempts
	// to negotiate QUIC with clients. You can specify NONE, ENABLE, or
	// DISABLE.
	// - When quic-override is set to NONE, Google manages whether QUIC is
	// used.
	// - When quic-override is set to ENABLE, the load balancer uses QUIC
	// when possible.
	// - When quic-override is set to DISABLE, the load balancer doesn't use
	// QUIC.
	// - If the quic-override flag is not specified, NONE is implied.
	// -
	QuicOverride string `json:"quicOverride,omitempty"`
	// [Output Only] URL of the region where the regional TargetHttpsProxy
	// resides. This field is not applicable to global TargetHttpsProxies.
	Region string `json:"region,omitempty"`
	// [Output Only] Server-defined URL for the resource.
	SelfLink string `json:"selfLink,omitempty"`
	// [Output Only] Server-defined URL for this resource with the resource
	// id.
	SelfLinkWithId string `json:"selfLinkWithId,omitempty"`
	// URLs to SslCertificate resources that are used to authenticate
	// connections between users and the load balancer. At least one SSL
	// certificate must be specified. Currently, you may specify up to 15
	// SSL certificates.
	SslCertificates []string `json:"sslCertificates,omitempty"`
	// URL of SslPolicy resource that will be associated with the
	// TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource
	// has no SSL policy configured.
	SslPolicy string `json:"sslPolicy,omitempty"`
	// A fully-qualified or valid partial URL to the UrlMap resource that
	// defines the mapping from URL to the BackendService. For example, the
	// following are all valid URLs for specifying a URL map:
	// -
	// https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map
	// - projects/project/global/urlMaps/url-map
	// - global/urlMaps/url-map
	UrlMap                   string `json:"urlMap,omitempty"`
	googleapi.ServerResponse `json:"-"`
	ForceSendFields          []string `json:"-"`
	NullFields               []string `json:"-"`
}

TargetHttpsProxy is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

func GetTargetHttpsProxy added in v1.6.0

func GetTargetHttpsProxy(version meta.Version, cloud *gce.Cloud, key *meta.Key) (*TargetHttpsProxy, error)

func ToTargetHttpsProxy added in v1.6.0

func ToTargetHttpsProxy(obj interface{}) (*TargetHttpsProxy, error)

ToTargetHttpsProxy converts a compute alpha, beta or GA TargetHttpsProxy into our composite type.

func (*TargetHttpsProxy) ToAlpha added in v1.6.0

func (targetHttpsProxy *TargetHttpsProxy) ToAlpha() (*computealpha.TargetHttpsProxy, error)

ToAlpha converts our composite type into an alpha type. This alpha type can be used in GCE API calls.

func (*TargetHttpsProxy) ToBeta added in v1.6.0

func (targetHttpsProxy *TargetHttpsProxy) ToBeta() (*computebeta.TargetHttpsProxy, error)

ToBeta converts our composite type into an beta type. This beta type can be used in GCE API calls.

func (*TargetHttpsProxy) ToGA added in v1.6.0

func (targetHttpsProxy *TargetHttpsProxy) ToGA() (*compute.TargetHttpsProxy, error)

ToGA converts our composite type into an ga type. This ga type can be used in GCE API calls.

type TlsCertificateContext added in v1.6.0

type TlsCertificateContext struct {
	// Specifies the certificate and private key paths. This field is
	// applicable only if tlsCertificateSource is set to USE_PATH.
	CertificatePaths *TlsCertificatePaths `json:"certificatePaths,omitempty"`
	// Defines how TLS certificates are obtained.
	CertificateSource string `json:"certificateSource,omitempty"`
	// Specifies the config to retrieve certificates through SDS. This field
	// is applicable only if tlsCertificateSource is set to USE_SDS.
	SdsConfig       *SdsConfig `json:"sdsConfig,omitempty"`
	ForceSendFields []string   `json:"-"`
	NullFields      []string   `json:"-"`
}

TlsCertificateContext is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type TlsCertificatePaths added in v1.6.0

type TlsCertificatePaths struct {
	// The path to the file holding the client or server TLS certificate to
	// use.
	CertificatePath string `json:"certificatePath,omitempty"`
	// The path to the file holding the client or server private key.
	PrivateKeyPath  string   `json:"privateKeyPath,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

TlsCertificatePaths is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type TlsContext added in v1.6.0

type TlsContext struct {
	// Defines the mechanism to obtain the client or server certificate.
	CertificateContext *TlsCertificateContext `json:"certificateContext,omitempty"`
	// Defines the mechanism to obtain the Certificate Authority certificate
	// to validate the client/server certificate. If omitted, the proxy will
	// not validate the server or client certificate.
	ValidationContext *TlsValidationContext `json:"validationContext,omitempty"`
	ForceSendFields   []string              `json:"-"`
	NullFields        []string              `json:"-"`
}

TlsContext is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type TlsValidationContext added in v1.6.0

type TlsValidationContext struct {
	// The path to the file holding the CA certificate to validate the
	// client or server certificate.
	CertificatePath string `json:"certificatePath,omitempty"`
	// Specifies the config to retrieve certificates through SDS. This field
	// is applicable only if tlsCertificateSource is set to USE_SDS.
	SdsConfig *SdsConfig `json:"sdsConfig,omitempty"`
	// Defines how TLS certificates are obtained.
	ValidationSource string   `json:"validationSource,omitempty"`
	ForceSendFields  []string `json:"-"`
	NullFields       []string `json:"-"`
}

TlsValidationContext is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type UDPHealthCheck added in v1.6.0

type UDPHealthCheck struct {
	// The UDP port number for the health check request. Valid values are 1
	// through 65535.
	Port int64 `json:"port,omitempty"`
	// Port name as defined in InstanceGroup#NamedPort#name. If both port
	// and port_name are defined, port takes precedence.
	PortName string `json:"portName,omitempty"`
	// Raw data of request to send in payload of UDP packet. It is an error
	// if this is empty. The request data can only be ASCII.
	Request string `json:"request,omitempty"`
	// The bytes to match against the beginning of the response data. It is
	// an error if this is empty. The response data can only be ASCII.
	Response        string   `json:"response,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

UDPHealthCheck is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type UrlMap added in v1.6.0

type UrlMap struct {
	// Version keeps track of the intended compute version for this UrlMap.
	// Note that the compute API's do not contain this field. It is for our
	// own bookkeeping purposes.
	Version meta.Version `json:"-"`
	// ResourceType keeps track of the intended type of the service (e.g. Global)
	// This is also an internal field purely for bookkeeping purposes
	ResourceType meta.KeyType `json:"-"`

	// [Output Only] Creation timestamp in RFC3339 text format.
	CreationTimestamp string `json:"creationTimestamp,omitempty"`
	// defaultRouteAction takes effect when none of the  hostRules match.
	// The load balancer performs advanced routing actions like URL
	// rewrites, header transformations, etc. prior to forwarding the
	// request to the selected backend. If defaultRouteAction specifies any
	// weightedBackendServices, defaultService must not be set. Conversely
	// if defaultService is set, defaultRouteAction cannot contain any
	// weightedBackendServices.
	// Only one of defaultRouteAction or defaultUrlRedirect must be set.
	DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"`
	// The full or partial URL of the defaultService resource to which
	// traffic is directed if none of the hostRules match. 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 routeAction specifies any weightedBackendServices,
	// service must not be specified.
	// Only one of defaultService, defaultUrlRedirect  or
	// defaultRouteAction.weightedBackendService must be set.
	DefaultService string `json:"defaultService,omitempty"`
	// When none of the specified hostRules match, the request is redirected
	// to a URL specified by defaultUrlRedirect.
	// If defaultUrlRedirect is specified, defaultService or
	// defaultRouteAction must not be set.
	DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"`
	// An optional description of this resource. Provide this property when
	// you create the resource.
	Description string `json:"description,omitempty"`
	// 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 UrlMap. An up-to-date fingerprint must be
	// provided in order to update the UrlMap, otherwise the request will
	// fail with error 412 conditionNotMet.
	//
	// To see the latest fingerprint, make a get() request to retrieve a
	// UrlMap.
	Fingerprint string `json:"fingerprint,omitempty"`
	// Specifies changes to request and response headers that need to take
	// effect for the selected backendService.
	// The headerAction specified here take effect after headerAction
	// specified under pathMatcher.
	HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"`
	// The list of HostRules to use against the URL.
	HostRules []*HostRule `json:"hostRules,omitempty"`
	// [Output Only] The unique identifier for the resource. This identifier
	// is defined by the server.
	Id uint64 `json:"id,omitempty,string"`
	// [Output Only] Type of the resource. Always compute#urlMaps for url
	// maps.
	Kind string `json:"kind,omitempty"`
	// Name of the resource. Provided by the client when the resource is
	// created. The name must be 1-63 characters long, and comply with
	// RFC1035. 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.
	Name string `json:"name,omitempty"`
	// The list of named PathMatchers to use against the URL.
	PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"`
	// [Output Only] URL of the region where the regional URL map resides.
	// This field is not applicable to global URL maps. You must specify
	// this field as part of the HTTP request URL. It is not settable as a
	// field in the request body.
	Region string `json:"region,omitempty"`
	// [Output Only] Server-defined URL for the resource.
	SelfLink string `json:"selfLink,omitempty"`
	// The list of expected URL mapping tests. Request to update this UrlMap
	// will succeed only if all of the test cases pass. You can specify a
	// maximum of 100 tests per UrlMap.
	Tests                    []*UrlMapTest `json:"tests,omitempty"`
	googleapi.ServerResponse `json:"-"`
	ForceSendFields          []string `json:"-"`
	NullFields               []string `json:"-"`
}

UrlMap is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

func GetUrlMap added in v1.6.0

func GetUrlMap(version meta.Version, cloud *gce.Cloud, key *meta.Key) (*UrlMap, error)

func ToUrlMap added in v1.6.0

func ToUrlMap(obj interface{}) (*UrlMap, error)

ToUrlMap converts a compute alpha, beta or GA UrlMap into our composite type.

func (*UrlMap) ToAlpha added in v1.6.0

func (urlMap *UrlMap) ToAlpha() (*computealpha.UrlMap, error)

ToAlpha converts our composite type into an alpha type. This alpha type can be used in GCE API calls.

func (*UrlMap) ToBeta added in v1.6.0

func (urlMap *UrlMap) ToBeta() (*computebeta.UrlMap, error)

ToBeta converts our composite type into an beta type. This beta type can be used in GCE API calls.

func (*UrlMap) ToGA added in v1.6.0

func (urlMap *UrlMap) ToGA() (*compute.UrlMap, error)

ToGA converts our composite type into an ga type. This ga type can be used in GCE API calls.

type UrlMapTest added in v1.6.0

type UrlMapTest struct {
	// The weight to use for the supplied host and path when using advanced
	// routing rules that involve traffic splitting.
	BackendServiceWeight int64 `json:"backendServiceWeight,omitempty"`
	// Description of this test case.
	Description string `json:"description,omitempty"`
	// The expected URL that should be redirected to for the host and path
	// being tested.
	ExpectedUrlRedirect string `json:"expectedUrlRedirect,omitempty"`
	// Host portion of the URL.
	Host string `json:"host,omitempty"`
	// Path portion of the URL.
	Path string `json:"path,omitempty"`
	// Expected BackendService resource the given URL should be mapped to.
	Service         string   `json:"service,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

UrlMapTest is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type UrlRewrite added in v1.6.0

type UrlRewrite struct {
	// Prior to forwarding the request to the selected service, the
	// request's host header is replaced with contents of hostRewrite.
	// The value must be between 1 and 255 characters.
	HostRewrite string `json:"hostRewrite,omitempty"`
	// Prior to forwarding the request to the selected backend service, the
	// matching portion of the request's path is replaced by
	// pathPrefixRewrite.
	// The value must be between 1 and 1024 characters.
	PathPrefixRewrite string   `json:"pathPrefixRewrite,omitempty"`
	ForceSendFields   []string `json:"-"`
	NullFields        []string `json:"-"`
}

UrlRewrite is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

type WeightedBackendService added in v1.6.0

type WeightedBackendService struct {
	// The full or partial URL to the default BackendService resource.
	// Before forwarding the request to backendService, the loadbalancer
	// applies any relevant headerActions specified as part of this
	// backendServiceWeight.
	BackendService string `json:"backendService,omitempty"`
	// Specifies changes to request and response headers that need to take
	// effect for the selected backendService.
	// headerAction specified here take effect before headerAction in the
	// enclosing HttpRouteRule, PathMatcher and UrlMap.
	HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"`
	// Specifies the fraction of traffic sent to backendService, computed as
	// weight / (sum of all weightedBackendService weights in routeAction)
	// .
	// The selection of a backend service is determined only for new
	// traffic. Once a user's request has been directed to a backendService,
	// subsequent requests will be sent to the same backendService as
	// determined by the BackendService's session affinity policy.
	// The value must be between 0 and 1000
	Weight          int64    `json:"weight,omitempty"`
	ForceSendFields []string `json:"-"`
	NullFields      []string `json:"-"`
}

WeightedBackendService is a composite type wrapping the Alpha, Beta, and GA methods for its GCE equivalent

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL