Reference documentation and code samples for the Compute V1 Client class UrlMapTest.
Message for the expected URL mappings.
Generated from protobuf message google.cloud.compute.v1.UrlMapTest
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ description |
string
Description of this test case. |
↳ expected_output_url |
string
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 when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl 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 when service is specified. |
↳ expected_redirect_response_code |
int
For rules with urlRedirect, the test passes only if expectedRedirectResponseCode matches the HTTP status code in load balancer's redirect response. expectedRedirectResponseCode cannot be set when service is set. |
↳ headers |
array<Google\Cloud\Compute\V1\UrlMapTestHeader>
HTTP headers for this request. If headers contains a host header, then host must also match the header value. |
↳ host |
string
Host portion of the URL. If headers contains a host header, then host must also match the header value. |
↳ path |
string
Path portion of the URL. |
↳ service |
string
Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set. |
getDescription
Description of this test case.
Generated from protobuf field optional string description = 422937596;
Returns | |
---|---|
Type | Description |
string |
hasDescription
clearDescription
setDescription
Description of this test case.
Generated from protobuf field optional string description = 422937596;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getExpectedOutputUrl
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 when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl 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 when service is specified.
Generated from protobuf field optional string expected_output_url = 433967384;
Returns | |
---|---|
Type | Description |
string |
hasExpectedOutputUrl
clearExpectedOutputUrl
setExpectedOutputUrl
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 when expectedOutputUrl matches the request forwarded by the load balancer to backends. For rules with urlRewrite, the test verifies that the forwarded request matches hostRewrite and pathPrefixRewrite in the urlRewrite action. When service is specified, expectedOutputUrl`s scheme is ignored. For rules with urlRedirect, the test passes only if expectedOutputUrl matches the URL in the load balancer's redirect response. If urlRedirect specifies https_redirect, the test passes only if the scheme in expectedOutputUrl 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 when service is specified.
Generated from protobuf field optional string expected_output_url = 433967384;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getExpectedRedirectResponseCode
For rules with urlRedirect, the test passes only if expectedRedirectResponseCode matches the HTTP status code in load balancer's redirect response. expectedRedirectResponseCode cannot be set when service is set.
Generated from protobuf field optional int32 expected_redirect_response_code = 18888047;
Returns | |
---|---|
Type | Description |
int |
hasExpectedRedirectResponseCode
clearExpectedRedirectResponseCode
setExpectedRedirectResponseCode
For rules with urlRedirect, the test passes only if expectedRedirectResponseCode matches the HTTP status code in load balancer's redirect response. expectedRedirectResponseCode cannot be set when service is set.
Generated from protobuf field optional int32 expected_redirect_response_code = 18888047;
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getHeaders
HTTP headers for this request. If headers contains a host header, then host must also match the header value.
Generated from protobuf field repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setHeaders
HTTP headers for this request. If headers contains a host header, then host must also match the header value.
Generated from protobuf field repeated .google.cloud.compute.v1.UrlMapTestHeader headers = 258436998;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Compute\V1\UrlMapTestHeader>
|
Returns | |
---|---|
Type | Description |
$this |
getHost
Host portion of the URL. If headers contains a host header, then host must also match the header value.
Generated from protobuf field optional string host = 3208616;
Returns | |
---|---|
Type | Description |
string |
hasHost
clearHost
setHost
Host portion of the URL. If headers contains a host header, then host must also match the header value.
Generated from protobuf field optional string host = 3208616;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getPath
Path portion of the URL.
Generated from protobuf field optional string path = 3433509;
Returns | |
---|---|
Type | Description |
string |
hasPath
clearPath
setPath
Path portion of the URL.
Generated from protobuf field optional string path = 3433509;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getService
Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set.
Generated from protobuf field optional string service = 373540533;
Returns | |
---|---|
Type | Description |
string |
hasService
clearService
setService
Expected BackendService or BackendBucket resource the given URL should be mapped to. The service field cannot be set if expectedRedirectResponseCode is set.
Generated from protobuf field optional string service = 373540533;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |