Class: Google::Apis::ComputeAlpha::UrlMapTest

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb

Overview

Message for the expected URL mappings.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UrlMapTest

Returns a new instance of UrlMapTest.



80547
80548
80549
# File 'lib/google/apis/compute_alpha/classes.rb', line 80547

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#backend_service_weightFixnum

The weight to use for the supplied host and path when using advanced routing rules that involve traffic splitting. Corresponds to the JSON property backendServiceWeight

Returns:

  • (Fixnum)


80479
80480
80481
# File 'lib/google/apis/compute_alpha/classes.rb', line 80479

def backend_service_weight
  @backend_service_weight
end

#descriptionString

Description of this test case. Corresponds to the JSON property description

Returns:

  • (String)


80484
80485
80486
# File 'lib/google/apis/compute_alpha/classes.rb', line 80484

def description
  @description
end

#expected_output_urlString

The expected output URL evaluated by the load balancer containing the scheme, host, path and query parameters. For rules that forward requests to backends, the test passes only whenexpectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matcheshostRewrite and pathPrefixRewrite in theurlRewrite action. When service is specified, expectedOutputUrls scheme is ignored. For rules with urlRedirect, the test passes only ifexpectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifieshttps_redirect, the test passes only if the scheme inexpectedOutputUrl is also set to HTTPS. If urlRedirect specifies strip_query, the test passes only if expectedOutputUrl does not contain any query parameters. expectedOutputUrl is optional whenservice is specified. Corresponds to the JSON propertyexpectedOutputUrl`

Returns:

  • (String)


80504
80505
80506
# File 'lib/google/apis/compute_alpha/classes.rb', line 80504

def expected_output_url
  @expected_output_url
end

#expected_redirect_response_codeFixnum

For rules with urlRedirect, the test passes only ifexpectedRedirectResponseCode matches the HTTP status code in load balancer's redirect response. expectedRedirectResponseCode cannot be set whenservice is set. Corresponds to the JSON property expectedRedirectResponseCode

Returns:

  • (Fixnum)


80512
80513
80514
# File 'lib/google/apis/compute_alpha/classes.rb', line 80512

def expected_redirect_response_code
  @expected_redirect_response_code
end

#expected_url_redirectString

The expected URL that should be redirected to for the host and path being tested. [Deprecated] This field is deprecated. Use expected_output_url instead. Corresponds to the JSON property expectedUrlRedirect

Returns:

  • (String)


80520
80521
80522
# File 'lib/google/apis/compute_alpha/classes.rb', line 80520

def expected_url_redirect
  @expected_url_redirect
end

#headersArray<Google::Apis::ComputeAlpha::UrlMapTestHeader>

HTTP headers for this request. If headers contains a host header, then host must also match the header value. Corresponds to the JSON property headers



80526
80527
80528
# File 'lib/google/apis/compute_alpha/classes.rb', line 80526

def headers
  @headers
end

#hostString

Host portion of the URL. If headers contains a host header, then host must also match the header value. Corresponds to the JSON property host

Returns:

  • (String)


80532
80533
80534
# File 'lib/google/apis/compute_alpha/classes.rb', line 80532

def host
  @host
end

#pathString

Path portion of the URL. Corresponds to the JSON property path

Returns:

  • (String)


80537
80538
80539
# File 'lib/google/apis/compute_alpha/classes.rb', line 80537

def path
  @path
end

#serviceString

Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set. Corresponds to the JSON property service

Returns:

  • (String)


80545
80546
80547
# File 'lib/google/apis/compute_alpha/classes.rb', line 80545

def service
  @service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



80552
80553
80554
80555
80556
80557
80558
80559
80560
80561
80562
# File 'lib/google/apis/compute_alpha/classes.rb', line 80552

def update!(**args)
  @backend_service_weight = args[:backend_service_weight] if args.key?(:backend_service_weight)
  @description = args[:description] if args.key?(:description)
  @expected_output_url = args[:expected_output_url] if args.key?(:expected_output_url)
  @expected_redirect_response_code = args[:expected_redirect_response_code] if args.key?(:expected_redirect_response_code)
  @expected_url_redirect = args[:expected_url_redirect] if args.key?(:expected_url_redirect)
  @headers = args[:headers] if args.key?(:headers)
  @host = args[:host] if args.key?(:host)
  @path = args[:path] if args.key?(:path)
  @service = args[:service] if args.key?(:service)
end