gcp.networkservices.HttpRoute
Explore with Pulumi AI
Example Usage
Network Services Http Route Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networkservices.HttpRoute("default", {
name: "my-http-route",
labels: {
foo: "bar",
},
description: "my description",
hostnames: ["example"],
rules: [{
matches: [{
queryParameters: [{
queryParameter: "key",
exactMatch: "value",
}],
fullPathMatch: "example",
}],
}],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networkservices.HttpRoute("default",
name="my-http-route",
labels={
"foo": "bar",
},
description="my description",
hostnames=["example"],
rules=[{
"matches": [{
"query_parameters": [{
"query_parameter": "key",
"exact_match": "value",
}],
"full_path_match": "example",
}],
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkservices.NewHttpRoute(ctx, "default", &networkservices.HttpRouteArgs{
Name: pulumi.String("my-http-route"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
Hostnames: pulumi.StringArray{
pulumi.String("example"),
},
Rules: networkservices.HttpRouteRuleArray{
&networkservices.HttpRouteRuleArgs{
Matches: networkservices.HttpRouteRuleMatchArray{
&networkservices.HttpRouteRuleMatchArgs{
QueryParameters: networkservices.HttpRouteRuleMatchQueryParameterArray{
&networkservices.HttpRouteRuleMatchQueryParameterArgs{
QueryParameter: pulumi.String("key"),
ExactMatch: pulumi.String("value"),
},
},
FullPathMatch: pulumi.String("example"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.NetworkServices.HttpRoute("default", new()
{
Name = "my-http-route",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
Hostnames = new[]
{
"example",
},
Rules = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleArgs
{
Matches = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchArgs
{
QueryParameters = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchQueryParameterArgs
{
QueryParameter = "key",
ExactMatch = "value",
},
},
FullPathMatch = "example",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.HttpRoute;
import com.pulumi.gcp.networkservices.HttpRouteArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new HttpRoute("default", HttpRouteArgs.builder()
.name("my-http-route")
.labels(Map.of("foo", "bar"))
.description("my description")
.hostnames("example")
.rules(HttpRouteRuleArgs.builder()
.matches(HttpRouteRuleMatchArgs.builder()
.queryParameters(HttpRouteRuleMatchQueryParameterArgs.builder()
.queryParameter("key")
.exactMatch("value")
.build())
.fullPathMatch("example")
.build())
.build())
.build());
}
}
resources:
default:
type: gcp:networkservices:HttpRoute
properties:
name: my-http-route
labels:
foo: bar
description: my description
hostnames:
- example
rules:
- matches:
- queryParameters:
- queryParameter: key
exactMatch: value
fullPathMatch: example
Network Services Http Route Matches And Actions
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networkservices.HttpRoute("default", {
name: "my-http-route",
labels: {
foo: "bar",
},
description: "my description",
hostnames: ["example"],
rules: [{
matches: [
{
headers: [{
header: "header",
invertMatch: false,
regexMatch: "header-value",
}],
queryParameters: [{
queryParameter: "key",
exactMatch: "value",
}],
prefixMatch: "example",
ignoreCase: false,
},
{
headers: [{
header: "header",
invertMatch: false,
presentMatch: true,
}],
queryParameters: [{
queryParameter: "key",
regexMatch: "value",
}],
regexMatch: "example",
ignoreCase: false,
},
{
headers: [{
header: "header",
invertMatch: false,
presentMatch: true,
}],
queryParameters: [{
queryParameter: "key",
presentMatch: true,
}],
fullPathMatch: "example",
ignoreCase: false,
},
],
action: {
redirect: {
hostRedirect: "new-host",
pathRedirect: "new-path",
prefixRewrite: "new-prefix",
httpsRedirect: true,
stripQuery: true,
portRedirect: 8081,
},
urlRewrite: {
pathPrefixRewrite: "new-prefix",
hostRewrite: "new-host",
},
retryPolicy: {
retryConditions: ["server_error"],
numRetries: 1,
perTryTimeout: "1s",
},
requestMirrorPolicy: {
destination: {
serviceName: "new",
weight: 1,
},
},
corsPolicy: {
allowOrigins: ["example"],
allowMethods: [
"GET",
"PUT",
],
allowHeaders: [
"version",
"type",
],
exposeHeaders: [
"version",
"type",
],
maxAge: "1s",
allowCredentials: true,
disabled: false,
},
},
}],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networkservices.HttpRoute("default",
name="my-http-route",
labels={
"foo": "bar",
},
description="my description",
hostnames=["example"],
rules=[{
"matches": [
{
"headers": [{
"header": "header",
"invert_match": False,
"regex_match": "header-value",
}],
"query_parameters": [{
"query_parameter": "key",
"exact_match": "value",
}],
"prefix_match": "example",
"ignore_case": False,
},
{
"headers": [{
"header": "header",
"invert_match": False,
"present_match": True,
}],
"query_parameters": [{
"query_parameter": "key",
"regex_match": "value",
}],
"regex_match": "example",
"ignore_case": False,
},
{
"headers": [{
"header": "header",
"invert_match": False,
"present_match": True,
}],
"query_parameters": [{
"query_parameter": "key",
"present_match": True,
}],
"full_path_match": "example",
"ignore_case": False,
},
],
"action": {
"redirect": {
"host_redirect": "new-host",
"path_redirect": "new-path",
"prefix_rewrite": "new-prefix",
"https_redirect": True,
"strip_query": True,
"port_redirect": 8081,
},
"url_rewrite": {
"path_prefix_rewrite": "new-prefix",
"host_rewrite": "new-host",
},
"retry_policy": {
"retry_conditions": ["server_error"],
"num_retries": 1,
"per_try_timeout": "1s",
},
"request_mirror_policy": {
"destination": {
"service_name": "new",
"weight": 1,
},
},
"cors_policy": {
"allow_origins": ["example"],
"allow_methods": [
"GET",
"PUT",
],
"allow_headers": [
"version",
"type",
],
"expose_headers": [
"version",
"type",
],
"max_age": "1s",
"allow_credentials": True,
"disabled": False,
},
},
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkservices.NewHttpRoute(ctx, "default", &networkservices.HttpRouteArgs{
Name: pulumi.String("my-http-route"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
Hostnames: pulumi.StringArray{
pulumi.String("example"),
},
Rules: networkservices.HttpRouteRuleArray{
&networkservices.HttpRouteRuleArgs{
Matches: networkservices.HttpRouteRuleMatchArray{
&networkservices.HttpRouteRuleMatchArgs{
Headers: networkservices.HttpRouteRuleMatchHeaderArray{
&networkservices.HttpRouteRuleMatchHeaderArgs{
Header: pulumi.String("header"),
InvertMatch: pulumi.Bool(false),
RegexMatch: pulumi.String("header-value"),
},
},
QueryParameters: networkservices.HttpRouteRuleMatchQueryParameterArray{
&networkservices.HttpRouteRuleMatchQueryParameterArgs{
QueryParameter: pulumi.String("key"),
ExactMatch: pulumi.String("value"),
},
},
PrefixMatch: pulumi.String("example"),
IgnoreCase: pulumi.Bool(false),
},
&networkservices.HttpRouteRuleMatchArgs{
Headers: networkservices.HttpRouteRuleMatchHeaderArray{
&networkservices.HttpRouteRuleMatchHeaderArgs{
Header: pulumi.String("header"),
InvertMatch: pulumi.Bool(false),
PresentMatch: pulumi.Bool(true),
},
},
QueryParameters: networkservices.HttpRouteRuleMatchQueryParameterArray{
&networkservices.HttpRouteRuleMatchQueryParameterArgs{
QueryParameter: pulumi.String("key"),
RegexMatch: pulumi.String("value"),
},
},
RegexMatch: pulumi.String("example"),
IgnoreCase: pulumi.Bool(false),
},
&networkservices.HttpRouteRuleMatchArgs{
Headers: networkservices.HttpRouteRuleMatchHeaderArray{
&networkservices.HttpRouteRuleMatchHeaderArgs{
Header: pulumi.String("header"),
InvertMatch: pulumi.Bool(false),
PresentMatch: pulumi.Bool(true),
},
},
QueryParameters: networkservices.HttpRouteRuleMatchQueryParameterArray{
&networkservices.HttpRouteRuleMatchQueryParameterArgs{
QueryParameter: pulumi.String("key"),
PresentMatch: pulumi.Bool(true),
},
},
FullPathMatch: pulumi.String("example"),
IgnoreCase: pulumi.Bool(false),
},
},
Action: &networkservices.HttpRouteRuleActionArgs{
Redirect: &networkservices.HttpRouteRuleActionRedirectArgs{
HostRedirect: pulumi.String("new-host"),
PathRedirect: pulumi.String("new-path"),
PrefixRewrite: pulumi.String("new-prefix"),
HttpsRedirect: pulumi.Bool(true),
StripQuery: pulumi.Bool(true),
PortRedirect: pulumi.Int(8081),
},
UrlRewrite: &networkservices.HttpRouteRuleActionUrlRewriteArgs{
PathPrefixRewrite: pulumi.String("new-prefix"),
HostRewrite: pulumi.String("new-host"),
},
RetryPolicy: &networkservices.HttpRouteRuleActionRetryPolicyArgs{
RetryConditions: pulumi.StringArray{
pulumi.String("server_error"),
},
NumRetries: pulumi.Int(1),
PerTryTimeout: pulumi.String("1s"),
},
RequestMirrorPolicy: &networkservices.HttpRouteRuleActionRequestMirrorPolicyArgs{
Destination: &networkservices.HttpRouteRuleActionRequestMirrorPolicyDestinationArgs{
ServiceName: pulumi.String("new"),
Weight: pulumi.Int(1),
},
},
CorsPolicy: &networkservices.HttpRouteRuleActionCorsPolicyArgs{
AllowOrigins: pulumi.StringArray{
pulumi.String("example"),
},
AllowMethods: pulumi.StringArray{
pulumi.String("GET"),
pulumi.String("PUT"),
},
AllowHeaders: pulumi.StringArray{
pulumi.String("version"),
pulumi.String("type"),
},
ExposeHeaders: pulumi.StringArray{
pulumi.String("version"),
pulumi.String("type"),
},
MaxAge: pulumi.String("1s"),
AllowCredentials: pulumi.Bool(true),
Disabled: pulumi.Bool(false),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.NetworkServices.HttpRoute("default", new()
{
Name = "my-http-route",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
Hostnames = new[]
{
"example",
},
Rules = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleArgs
{
Matches = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchArgs
{
Headers = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchHeaderArgs
{
Header = "header",
InvertMatch = false,
RegexMatch = "header-value",
},
},
QueryParameters = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchQueryParameterArgs
{
QueryParameter = "key",
ExactMatch = "value",
},
},
PrefixMatch = "example",
IgnoreCase = false,
},
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchArgs
{
Headers = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchHeaderArgs
{
Header = "header",
InvertMatch = false,
PresentMatch = true,
},
},
QueryParameters = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchQueryParameterArgs
{
QueryParameter = "key",
RegexMatch = "value",
},
},
RegexMatch = "example",
IgnoreCase = false,
},
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchArgs
{
Headers = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchHeaderArgs
{
Header = "header",
InvertMatch = false,
PresentMatch = true,
},
},
QueryParameters = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchQueryParameterArgs
{
QueryParameter = "key",
PresentMatch = true,
},
},
FullPathMatch = "example",
IgnoreCase = false,
},
},
Action = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionArgs
{
Redirect = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRedirectArgs
{
HostRedirect = "new-host",
PathRedirect = "new-path",
PrefixRewrite = "new-prefix",
HttpsRedirect = true,
StripQuery = true,
PortRedirect = 8081,
},
UrlRewrite = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionUrlRewriteArgs
{
PathPrefixRewrite = "new-prefix",
HostRewrite = "new-host",
},
RetryPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRetryPolicyArgs
{
RetryConditions = new[]
{
"server_error",
},
NumRetries = 1,
PerTryTimeout = "1s",
},
RequestMirrorPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRequestMirrorPolicyArgs
{
Destination = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRequestMirrorPolicyDestinationArgs
{
ServiceName = "new",
Weight = 1,
},
},
CorsPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionCorsPolicyArgs
{
AllowOrigins = new[]
{
"example",
},
AllowMethods = new[]
{
"GET",
"PUT",
},
AllowHeaders = new[]
{
"version",
"type",
},
ExposeHeaders = new[]
{
"version",
"type",
},
MaxAge = "1s",
AllowCredentials = true,
Disabled = false,
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.HttpRoute;
import com.pulumi.gcp.networkservices.HttpRouteArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRedirectArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionUrlRewriteArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRetryPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRequestMirrorPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRequestMirrorPolicyDestinationArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionCorsPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new HttpRoute("default", HttpRouteArgs.builder()
.name("my-http-route")
.labels(Map.of("foo", "bar"))
.description("my description")
.hostnames("example")
.rules(HttpRouteRuleArgs.builder()
.matches(
HttpRouteRuleMatchArgs.builder()
.headers(HttpRouteRuleMatchHeaderArgs.builder()
.header("header")
.invertMatch(false)
.regexMatch("header-value")
.build())
.queryParameters(HttpRouteRuleMatchQueryParameterArgs.builder()
.queryParameter("key")
.exactMatch("value")
.build())
.prefixMatch("example")
.ignoreCase(false)
.build(),
HttpRouteRuleMatchArgs.builder()
.headers(HttpRouteRuleMatchHeaderArgs.builder()
.header("header")
.invertMatch(false)
.presentMatch(true)
.build())
.queryParameters(HttpRouteRuleMatchQueryParameterArgs.builder()
.queryParameter("key")
.regexMatch("value")
.build())
.regexMatch("example")
.ignoreCase(false)
.build(),
HttpRouteRuleMatchArgs.builder()
.headers(HttpRouteRuleMatchHeaderArgs.builder()
.header("header")
.invertMatch(false)
.presentMatch(true)
.build())
.queryParameters(HttpRouteRuleMatchQueryParameterArgs.builder()
.queryParameter("key")
.presentMatch(true)
.build())
.fullPathMatch("example")
.ignoreCase(false)
.build())
.action(HttpRouteRuleActionArgs.builder()
.redirect(HttpRouteRuleActionRedirectArgs.builder()
.hostRedirect("new-host")
.pathRedirect("new-path")
.prefixRewrite("new-prefix")
.httpsRedirect(true)
.stripQuery(true)
.portRedirect(8081)
.build())
.urlRewrite(HttpRouteRuleActionUrlRewriteArgs.builder()
.pathPrefixRewrite("new-prefix")
.hostRewrite("new-host")
.build())
.retryPolicy(HttpRouteRuleActionRetryPolicyArgs.builder()
.retryConditions("server_error")
.numRetries(1)
.perTryTimeout("1s")
.build())
.requestMirrorPolicy(HttpRouteRuleActionRequestMirrorPolicyArgs.builder()
.destination(HttpRouteRuleActionRequestMirrorPolicyDestinationArgs.builder()
.serviceName("new")
.weight(1)
.build())
.build())
.corsPolicy(HttpRouteRuleActionCorsPolicyArgs.builder()
.allowOrigins("example")
.allowMethods(
"GET",
"PUT")
.allowHeaders(
"version",
"type")
.exposeHeaders(
"version",
"type")
.maxAge("1s")
.allowCredentials(true)
.disabled(false)
.build())
.build())
.build())
.build());
}
}
resources:
default:
type: gcp:networkservices:HttpRoute
properties:
name: my-http-route
labels:
foo: bar
description: my description
hostnames:
- example
rules:
- matches:
- headers:
- header: header
invertMatch: false
regexMatch: header-value
queryParameters:
- queryParameter: key
exactMatch: value
prefixMatch: example
ignoreCase: false
- headers:
- header: header
invertMatch: false
presentMatch: true
queryParameters:
- queryParameter: key
regexMatch: value
regexMatch: example
ignoreCase: false
- headers:
- header: header
invertMatch: false
presentMatch: true
queryParameters:
- queryParameter: key
presentMatch: true
fullPathMatch: example
ignoreCase: false
action:
redirect:
hostRedirect: new-host
pathRedirect: new-path
prefixRewrite: new-prefix
httpsRedirect: true
stripQuery: true
portRedirect: 8081
urlRewrite:
pathPrefixRewrite: new-prefix
hostRewrite: new-host
retryPolicy:
retryConditions:
- server_error
numRetries: 1
perTryTimeout: 1s
requestMirrorPolicy:
destination:
serviceName: new
weight: 1
corsPolicy:
allowOrigins:
- example
allowMethods:
- GET
- PUT
allowHeaders:
- version
- type
exposeHeaders:
- version
- type
maxAge: 1s
allowCredentials: true
disabled: false
Network Services Http Route Actions
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networkservices.HttpRoute("default", {
name: "my-http-route",
labels: {
foo: "bar",
},
description: "my description",
hostnames: ["example"],
rules: [{
action: {
faultInjectionPolicy: {
delay: {
fixedDelay: "1s",
percentage: 1,
},
abort: {
httpStatus: 500,
percentage: 1,
},
},
urlRewrite: {
pathPrefixRewrite: "new-prefix",
hostRewrite: "new-host",
},
retryPolicy: {
retryConditions: ["server_error"],
numRetries: 1,
perTryTimeout: "1s",
},
requestMirrorPolicy: {
destination: {
serviceName: "new",
weight: 1,
},
},
corsPolicy: {
allowOrigins: ["example"],
allowMethods: [
"GET",
"PUT",
],
allowHeaders: [
"version",
"type",
],
exposeHeaders: [
"version",
"type",
],
maxAge: "1s",
allowCredentials: true,
disabled: false,
},
requestHeaderModifier: {
set: {
version: "1",
type: "json",
},
add: {
"minor-version": "1",
},
removes: ["arg"],
},
responseHeaderModifier: {
set: {
version: "1",
type: "json",
},
add: {
"minor-version": "1",
},
removes: ["removearg"],
},
},
}],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networkservices.HttpRoute("default",
name="my-http-route",
labels={
"foo": "bar",
},
description="my description",
hostnames=["example"],
rules=[{
"action": {
"fault_injection_policy": {
"delay": {
"fixed_delay": "1s",
"percentage": 1,
},
"abort": {
"http_status": 500,
"percentage": 1,
},
},
"url_rewrite": {
"path_prefix_rewrite": "new-prefix",
"host_rewrite": "new-host",
},
"retry_policy": {
"retry_conditions": ["server_error"],
"num_retries": 1,
"per_try_timeout": "1s",
},
"request_mirror_policy": {
"destination": {
"service_name": "new",
"weight": 1,
},
},
"cors_policy": {
"allow_origins": ["example"],
"allow_methods": [
"GET",
"PUT",
],
"allow_headers": [
"version",
"type",
],
"expose_headers": [
"version",
"type",
],
"max_age": "1s",
"allow_credentials": True,
"disabled": False,
},
"request_header_modifier": {
"set": {
"version": "1",
"type": "json",
},
"add": {
"minor_version": "1",
},
"removes": ["arg"],
},
"response_header_modifier": {
"set": {
"version": "1",
"type": "json",
},
"add": {
"minor_version": "1",
},
"removes": ["removearg"],
},
},
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkservices.NewHttpRoute(ctx, "default", &networkservices.HttpRouteArgs{
Name: pulumi.String("my-http-route"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
Hostnames: pulumi.StringArray{
pulumi.String("example"),
},
Rules: networkservices.HttpRouteRuleArray{
&networkservices.HttpRouteRuleArgs{
Action: &networkservices.HttpRouteRuleActionArgs{
FaultInjectionPolicy: &networkservices.HttpRouteRuleActionFaultInjectionPolicyArgs{
Delay: &networkservices.HttpRouteRuleActionFaultInjectionPolicyDelayArgs{
FixedDelay: pulumi.String("1s"),
Percentage: pulumi.Int(1),
},
Abort: &networkservices.HttpRouteRuleActionFaultInjectionPolicyAbortArgs{
HttpStatus: pulumi.Int(500),
Percentage: pulumi.Int(1),
},
},
UrlRewrite: &networkservices.HttpRouteRuleActionUrlRewriteArgs{
PathPrefixRewrite: pulumi.String("new-prefix"),
HostRewrite: pulumi.String("new-host"),
},
RetryPolicy: &networkservices.HttpRouteRuleActionRetryPolicyArgs{
RetryConditions: pulumi.StringArray{
pulumi.String("server_error"),
},
NumRetries: pulumi.Int(1),
PerTryTimeout: pulumi.String("1s"),
},
RequestMirrorPolicy: &networkservices.HttpRouteRuleActionRequestMirrorPolicyArgs{
Destination: &networkservices.HttpRouteRuleActionRequestMirrorPolicyDestinationArgs{
ServiceName: pulumi.String("new"),
Weight: pulumi.Int(1),
},
},
CorsPolicy: &networkservices.HttpRouteRuleActionCorsPolicyArgs{
AllowOrigins: pulumi.StringArray{
pulumi.String("example"),
},
AllowMethods: pulumi.StringArray{
pulumi.String("GET"),
pulumi.String("PUT"),
},
AllowHeaders: pulumi.StringArray{
pulumi.String("version"),
pulumi.String("type"),
},
ExposeHeaders: pulumi.StringArray{
pulumi.String("version"),
pulumi.String("type"),
},
MaxAge: pulumi.String("1s"),
AllowCredentials: pulumi.Bool(true),
Disabled: pulumi.Bool(false),
},
RequestHeaderModifier: &networkservices.HttpRouteRuleActionRequestHeaderModifierArgs{
Set: pulumi.StringMap{
"version": pulumi.String("1"),
"type": pulumi.String("json"),
},
Add: pulumi.StringMap{
"minor-version": pulumi.String("1"),
},
Removes: pulumi.StringArray{
pulumi.String("arg"),
},
},
ResponseHeaderModifier: &networkservices.HttpRouteRuleActionResponseHeaderModifierArgs{
Set: pulumi.StringMap{
"version": pulumi.String("1"),
"type": pulumi.String("json"),
},
Add: pulumi.StringMap{
"minor-version": pulumi.String("1"),
},
Removes: pulumi.StringArray{
pulumi.String("removearg"),
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.NetworkServices.HttpRoute("default", new()
{
Name = "my-http-route",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
Hostnames = new[]
{
"example",
},
Rules = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleArgs
{
Action = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionArgs
{
FaultInjectionPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionFaultInjectionPolicyArgs
{
Delay = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionFaultInjectionPolicyDelayArgs
{
FixedDelay = "1s",
Percentage = 1,
},
Abort = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionFaultInjectionPolicyAbortArgs
{
HttpStatus = 500,
Percentage = 1,
},
},
UrlRewrite = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionUrlRewriteArgs
{
PathPrefixRewrite = "new-prefix",
HostRewrite = "new-host",
},
RetryPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRetryPolicyArgs
{
RetryConditions = new[]
{
"server_error",
},
NumRetries = 1,
PerTryTimeout = "1s",
},
RequestMirrorPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRequestMirrorPolicyArgs
{
Destination = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRequestMirrorPolicyDestinationArgs
{
ServiceName = "new",
Weight = 1,
},
},
CorsPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionCorsPolicyArgs
{
AllowOrigins = new[]
{
"example",
},
AllowMethods = new[]
{
"GET",
"PUT",
},
AllowHeaders = new[]
{
"version",
"type",
},
ExposeHeaders = new[]
{
"version",
"type",
},
MaxAge = "1s",
AllowCredentials = true,
Disabled = false,
},
RequestHeaderModifier = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRequestHeaderModifierArgs
{
Set =
{
{ "version", "1" },
{ "type", "json" },
},
Add =
{
{ "minor-version", "1" },
},
Removes = new[]
{
"arg",
},
},
ResponseHeaderModifier = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionResponseHeaderModifierArgs
{
Set =
{
{ "version", "1" },
{ "type", "json" },
},
Add =
{
{ "minor-version", "1" },
},
Removes = new[]
{
"removearg",
},
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.HttpRoute;
import com.pulumi.gcp.networkservices.HttpRouteArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionFaultInjectionPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionFaultInjectionPolicyDelayArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionFaultInjectionPolicyAbortArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionUrlRewriteArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRetryPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRequestMirrorPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRequestMirrorPolicyDestinationArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionCorsPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRequestHeaderModifierArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionResponseHeaderModifierArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new HttpRoute("default", HttpRouteArgs.builder()
.name("my-http-route")
.labels(Map.of("foo", "bar"))
.description("my description")
.hostnames("example")
.rules(HttpRouteRuleArgs.builder()
.action(HttpRouteRuleActionArgs.builder()
.faultInjectionPolicy(HttpRouteRuleActionFaultInjectionPolicyArgs.builder()
.delay(HttpRouteRuleActionFaultInjectionPolicyDelayArgs.builder()
.fixedDelay("1s")
.percentage(1)
.build())
.abort(HttpRouteRuleActionFaultInjectionPolicyAbortArgs.builder()
.httpStatus(500)
.percentage(1)
.build())
.build())
.urlRewrite(HttpRouteRuleActionUrlRewriteArgs.builder()
.pathPrefixRewrite("new-prefix")
.hostRewrite("new-host")
.build())
.retryPolicy(HttpRouteRuleActionRetryPolicyArgs.builder()
.retryConditions("server_error")
.numRetries(1)
.perTryTimeout("1s")
.build())
.requestMirrorPolicy(HttpRouteRuleActionRequestMirrorPolicyArgs.builder()
.destination(HttpRouteRuleActionRequestMirrorPolicyDestinationArgs.builder()
.serviceName("new")
.weight(1)
.build())
.build())
.corsPolicy(HttpRouteRuleActionCorsPolicyArgs.builder()
.allowOrigins("example")
.allowMethods(
"GET",
"PUT")
.allowHeaders(
"version",
"type")
.exposeHeaders(
"version",
"type")
.maxAge("1s")
.allowCredentials(true)
.disabled(false)
.build())
.requestHeaderModifier(HttpRouteRuleActionRequestHeaderModifierArgs.builder()
.set(Map.ofEntries(
Map.entry("version", "1"),
Map.entry("type", "json")
))
.add(Map.of("minor-version", "1"))
.removes("arg")
.build())
.responseHeaderModifier(HttpRouteRuleActionResponseHeaderModifierArgs.builder()
.set(Map.ofEntries(
Map.entry("version", "1"),
Map.entry("type", "json")
))
.add(Map.of("minor-version", "1"))
.removes("removearg")
.build())
.build())
.build())
.build());
}
}
resources:
default:
type: gcp:networkservices:HttpRoute
properties:
name: my-http-route
labels:
foo: bar
description: my description
hostnames:
- example
rules:
- action:
faultInjectionPolicy:
delay:
fixedDelay: 1s
percentage: 1
abort:
httpStatus: 500
percentage: 1
urlRewrite:
pathPrefixRewrite: new-prefix
hostRewrite: new-host
retryPolicy:
retryConditions:
- server_error
numRetries: 1
perTryTimeout: 1s
requestMirrorPolicy:
destination:
serviceName: new
weight: 1
corsPolicy:
allowOrigins:
- example
allowMethods:
- GET
- PUT
allowHeaders:
- version
- type
exposeHeaders:
- version
- type
maxAge: 1s
allowCredentials: true
disabled: false
requestHeaderModifier:
set:
version: '1'
type: json
add:
minor-version: '1'
removes:
- arg
responseHeaderModifier:
set:
version: '1'
type: json
add:
minor-version: '1'
removes:
- removearg
Network Services Http Route Mesh Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networkservices.Mesh("default", {
name: "my-http-route",
labels: {
foo: "bar",
},
description: "my description",
});
const defaultHttpRoute = new gcp.networkservices.HttpRoute("default", {
name: "my-http-route",
labels: {
foo: "bar",
},
description: "my description",
hostnames: ["example"],
meshes: [_default.id],
rules: [{
matches: [{
queryParameters: [{
queryParameter: "key",
exactMatch: "value",
}],
fullPathMatch: "example",
}],
}],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networkservices.Mesh("default",
name="my-http-route",
labels={
"foo": "bar",
},
description="my description")
default_http_route = gcp.networkservices.HttpRoute("default",
name="my-http-route",
labels={
"foo": "bar",
},
description="my description",
hostnames=["example"],
meshes=[default.id],
rules=[{
"matches": [{
"query_parameters": [{
"query_parameter": "key",
"exact_match": "value",
}],
"full_path_match": "example",
}],
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkservices.NewMesh(ctx, "default", &networkservices.MeshArgs{
Name: pulumi.String("my-http-route"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
})
if err != nil {
return err
}
_, err = networkservices.NewHttpRoute(ctx, "default", &networkservices.HttpRouteArgs{
Name: pulumi.String("my-http-route"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
Hostnames: pulumi.StringArray{
pulumi.String("example"),
},
Meshes: pulumi.StringArray{
_default.ID(),
},
Rules: networkservices.HttpRouteRuleArray{
&networkservices.HttpRouteRuleArgs{
Matches: networkservices.HttpRouteRuleMatchArray{
&networkservices.HttpRouteRuleMatchArgs{
QueryParameters: networkservices.HttpRouteRuleMatchQueryParameterArray{
&networkservices.HttpRouteRuleMatchQueryParameterArgs{
QueryParameter: pulumi.String("key"),
ExactMatch: pulumi.String("value"),
},
},
FullPathMatch: pulumi.String("example"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.NetworkServices.Mesh("default", new()
{
Name = "my-http-route",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
});
var defaultHttpRoute = new Gcp.NetworkServices.HttpRoute("default", new()
{
Name = "my-http-route",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
Hostnames = new[]
{
"example",
},
Meshes = new[]
{
@default.Id,
},
Rules = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleArgs
{
Matches = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchArgs
{
QueryParameters = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchQueryParameterArgs
{
QueryParameter = "key",
ExactMatch = "value",
},
},
FullPathMatch = "example",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.Mesh;
import com.pulumi.gcp.networkservices.MeshArgs;
import com.pulumi.gcp.networkservices.HttpRoute;
import com.pulumi.gcp.networkservices.HttpRouteArgs;
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new Mesh("default", MeshArgs.builder()
.name("my-http-route")
.labels(Map.of("foo", "bar"))
.description("my description")
.build());
var defaultHttpRoute = new HttpRoute("defaultHttpRoute", HttpRouteArgs.builder()
.name("my-http-route")
.labels(Map.of("foo", "bar"))
.description("my description")
.hostnames("example")
.meshes(default_.id())
.rules(HttpRouteRuleArgs.builder()
.matches(HttpRouteRuleMatchArgs.builder()
.queryParameters(HttpRouteRuleMatchQueryParameterArgs.builder()
.queryParameter("key")
.exactMatch("value")
.build())
.fullPathMatch("example")
.build())
.build())
.build());
}
}
resources:
default:
type: gcp:networkservices:Mesh
properties:
name: my-http-route
labels:
foo: bar
description: my description
defaultHttpRoute:
type: gcp:networkservices:HttpRoute
name: default
properties:
name: my-http-route
labels:
foo: bar
description: my description
hostnames:
- example
meshes:
- ${default.id}
rules:
- matches:
- queryParameters:
- queryParameter: key
exactMatch: value
fullPathMatch: example
Create HttpRoute Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new HttpRoute(name: string, args: HttpRouteArgs, opts?: CustomResourceOptions);
@overload
def HttpRoute(resource_name: str,
args: HttpRouteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def HttpRoute(resource_name: str,
opts: Optional[ResourceOptions] = None,
hostnames: Optional[Sequence[str]] = None,
rules: Optional[Sequence[HttpRouteRuleArgs]] = None,
description: Optional[str] = None,
gateways: Optional[Sequence[str]] = None,
labels: Optional[Mapping[str, str]] = None,
meshes: Optional[Sequence[str]] = None,
name: Optional[str] = None,
project: Optional[str] = None)
func NewHttpRoute(ctx *Context, name string, args HttpRouteArgs, opts ...ResourceOption) (*HttpRoute, error)
public HttpRoute(string name, HttpRouteArgs args, CustomResourceOptions? opts = null)
public HttpRoute(String name, HttpRouteArgs args)
public HttpRoute(String name, HttpRouteArgs args, CustomResourceOptions options)
type: gcp:networkservices:HttpRoute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args HttpRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args HttpRouteArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HttpRouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HttpRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HttpRouteArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var httpRouteResource = new Gcp.NetworkServices.HttpRoute("httpRouteResource", new()
{
Hostnames = new[]
{
"string",
},
Rules = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleArgs
{
Action = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionArgs
{
CorsPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionCorsPolicyArgs
{
AllowCredentials = false,
AllowHeaders = new[]
{
"string",
},
AllowMethods = new[]
{
"string",
},
AllowOriginRegexes = new[]
{
"string",
},
AllowOrigins = new[]
{
"string",
},
Disabled = false,
ExposeHeaders = new[]
{
"string",
},
MaxAge = "string",
},
Destinations = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleActionDestinationArgs
{
ServiceName = "string",
Weight = 0,
},
},
FaultInjectionPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionFaultInjectionPolicyArgs
{
Abort = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionFaultInjectionPolicyAbortArgs
{
HttpStatus = 0,
Percentage = 0,
},
Delay = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionFaultInjectionPolicyDelayArgs
{
FixedDelay = "string",
Percentage = 0,
},
},
Redirect = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRedirectArgs
{
HostRedirect = "string",
HttpsRedirect = false,
PathRedirect = "string",
PortRedirect = 0,
PrefixRewrite = "string",
ResponseCode = "string",
StripQuery = false,
},
RequestHeaderModifier = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRequestHeaderModifierArgs
{
Add =
{
{ "string", "string" },
},
Removes = new[]
{
"string",
},
Set =
{
{ "string", "string" },
},
},
RequestMirrorPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRequestMirrorPolicyArgs
{
Destination = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRequestMirrorPolicyDestinationArgs
{
ServiceName = "string",
Weight = 0,
},
},
ResponseHeaderModifier = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionResponseHeaderModifierArgs
{
Add =
{
{ "string", "string" },
},
Removes = new[]
{
"string",
},
Set =
{
{ "string", "string" },
},
},
RetryPolicy = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionRetryPolicyArgs
{
NumRetries = 0,
PerTryTimeout = "string",
RetryConditions = new[]
{
"string",
},
},
Timeout = "string",
UrlRewrite = new Gcp.NetworkServices.Inputs.HttpRouteRuleActionUrlRewriteArgs
{
HostRewrite = "string",
PathPrefixRewrite = "string",
},
},
Matches = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchArgs
{
FullPathMatch = "string",
Headers = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchHeaderArgs
{
ExactMatch = "string",
Header = "string",
InvertMatch = false,
PrefixMatch = "string",
PresentMatch = false,
RangeMatch = new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchHeaderRangeMatchArgs
{
End = 0,
Start = 0,
},
RegexMatch = "string",
SuffixMatch = "string",
},
},
IgnoreCase = false,
PrefixMatch = "string",
QueryParameters = new[]
{
new Gcp.NetworkServices.Inputs.HttpRouteRuleMatchQueryParameterArgs
{
ExactMatch = "string",
PresentMatch = false,
QueryParameter = "string",
RegexMatch = "string",
},
},
RegexMatch = "string",
},
},
},
},
Description = "string",
Gateways = new[]
{
"string",
},
Labels =
{
{ "string", "string" },
},
Meshes = new[]
{
"string",
},
Name = "string",
Project = "string",
});
example, err := networkservices.NewHttpRoute(ctx, "httpRouteResource", &networkservices.HttpRouteArgs{
Hostnames: pulumi.StringArray{
pulumi.String("string"),
},
Rules: networkservices.HttpRouteRuleArray{
&networkservices.HttpRouteRuleArgs{
Action: &networkservices.HttpRouteRuleActionArgs{
CorsPolicy: &networkservices.HttpRouteRuleActionCorsPolicyArgs{
AllowCredentials: pulumi.Bool(false),
AllowHeaders: pulumi.StringArray{
pulumi.String("string"),
},
AllowMethods: pulumi.StringArray{
pulumi.String("string"),
},
AllowOriginRegexes: pulumi.StringArray{
pulumi.String("string"),
},
AllowOrigins: pulumi.StringArray{
pulumi.String("string"),
},
Disabled: pulumi.Bool(false),
ExposeHeaders: pulumi.StringArray{
pulumi.String("string"),
},
MaxAge: pulumi.String("string"),
},
Destinations: networkservices.HttpRouteRuleActionDestinationArray{
&networkservices.HttpRouteRuleActionDestinationArgs{
ServiceName: pulumi.String("string"),
Weight: pulumi.Int(0),
},
},
FaultInjectionPolicy: &networkservices.HttpRouteRuleActionFaultInjectionPolicyArgs{
Abort: &networkservices.HttpRouteRuleActionFaultInjectionPolicyAbortArgs{
HttpStatus: pulumi.Int(0),
Percentage: pulumi.Int(0),
},
Delay: &networkservices.HttpRouteRuleActionFaultInjectionPolicyDelayArgs{
FixedDelay: pulumi.String("string"),
Percentage: pulumi.Int(0),
},
},
Redirect: &networkservices.HttpRouteRuleActionRedirectArgs{
HostRedirect: pulumi.String("string"),
HttpsRedirect: pulumi.Bool(false),
PathRedirect: pulumi.String("string"),
PortRedirect: pulumi.Int(0),
PrefixRewrite: pulumi.String("string"),
ResponseCode: pulumi.String("string"),
StripQuery: pulumi.Bool(false),
},
RequestHeaderModifier: &networkservices.HttpRouteRuleActionRequestHeaderModifierArgs{
Add: pulumi.StringMap{
"string": pulumi.String("string"),
},
Removes: pulumi.StringArray{
pulumi.String("string"),
},
Set: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
RequestMirrorPolicy: &networkservices.HttpRouteRuleActionRequestMirrorPolicyArgs{
Destination: &networkservices.HttpRouteRuleActionRequestMirrorPolicyDestinationArgs{
ServiceName: pulumi.String("string"),
Weight: pulumi.Int(0),
},
},
ResponseHeaderModifier: &networkservices.HttpRouteRuleActionResponseHeaderModifierArgs{
Add: pulumi.StringMap{
"string": pulumi.String("string"),
},
Removes: pulumi.StringArray{
pulumi.String("string"),
},
Set: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
RetryPolicy: &networkservices.HttpRouteRuleActionRetryPolicyArgs{
NumRetries: pulumi.Int(0),
PerTryTimeout: pulumi.String("string"),
RetryConditions: pulumi.StringArray{
pulumi.String("string"),
},
},
Timeout: pulumi.String("string"),
UrlRewrite: &networkservices.HttpRouteRuleActionUrlRewriteArgs{
HostRewrite: pulumi.String("string"),
PathPrefixRewrite: pulumi.String("string"),
},
},
Matches: networkservices.HttpRouteRuleMatchArray{
&networkservices.HttpRouteRuleMatchArgs{
FullPathMatch: pulumi.String("string"),
Headers: networkservices.HttpRouteRuleMatchHeaderArray{
&networkservices.HttpRouteRuleMatchHeaderArgs{
ExactMatch: pulumi.String("string"),
Header: pulumi.String("string"),
InvertMatch: pulumi.Bool(false),
PrefixMatch: pulumi.String("string"),
PresentMatch: pulumi.Bool(false),
RangeMatch: &networkservices.HttpRouteRuleMatchHeaderRangeMatchArgs{
End: pulumi.Int(0),
Start: pulumi.Int(0),
},
RegexMatch: pulumi.String("string"),
SuffixMatch: pulumi.String("string"),
},
},
IgnoreCase: pulumi.Bool(false),
PrefixMatch: pulumi.String("string"),
QueryParameters: networkservices.HttpRouteRuleMatchQueryParameterArray{
&networkservices.HttpRouteRuleMatchQueryParameterArgs{
ExactMatch: pulumi.String("string"),
PresentMatch: pulumi.Bool(false),
QueryParameter: pulumi.String("string"),
RegexMatch: pulumi.String("string"),
},
},
RegexMatch: pulumi.String("string"),
},
},
},
},
Description: pulumi.String("string"),
Gateways: pulumi.StringArray{
pulumi.String("string"),
},
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Meshes: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
})
var httpRouteResource = new HttpRoute("httpRouteResource", HttpRouteArgs.builder()
.hostnames("string")
.rules(HttpRouteRuleArgs.builder()
.action(HttpRouteRuleActionArgs.builder()
.corsPolicy(HttpRouteRuleActionCorsPolicyArgs.builder()
.allowCredentials(false)
.allowHeaders("string")
.allowMethods("string")
.allowOriginRegexes("string")
.allowOrigins("string")
.disabled(false)
.exposeHeaders("string")
.maxAge("string")
.build())
.destinations(HttpRouteRuleActionDestinationArgs.builder()
.serviceName("string")
.weight(0)
.build())
.faultInjectionPolicy(HttpRouteRuleActionFaultInjectionPolicyArgs.builder()
.abort(HttpRouteRuleActionFaultInjectionPolicyAbortArgs.builder()
.httpStatus(0)
.percentage(0)
.build())
.delay(HttpRouteRuleActionFaultInjectionPolicyDelayArgs.builder()
.fixedDelay("string")
.percentage(0)
.build())
.build())
.redirect(HttpRouteRuleActionRedirectArgs.builder()
.hostRedirect("string")
.httpsRedirect(false)
.pathRedirect("string")
.portRedirect(0)
.prefixRewrite("string")
.responseCode("string")
.stripQuery(false)
.build())
.requestHeaderModifier(HttpRouteRuleActionRequestHeaderModifierArgs.builder()
.add(Map.of("string", "string"))
.removes("string")
.set(Map.of("string", "string"))
.build())
.requestMirrorPolicy(HttpRouteRuleActionRequestMirrorPolicyArgs.builder()
.destination(HttpRouteRuleActionRequestMirrorPolicyDestinationArgs.builder()
.serviceName("string")
.weight(0)
.build())
.build())
.responseHeaderModifier(HttpRouteRuleActionResponseHeaderModifierArgs.builder()
.add(Map.of("string", "string"))
.removes("string")
.set(Map.of("string", "string"))
.build())
.retryPolicy(HttpRouteRuleActionRetryPolicyArgs.builder()
.numRetries(0)
.perTryTimeout("string")
.retryConditions("string")
.build())
.timeout("string")
.urlRewrite(HttpRouteRuleActionUrlRewriteArgs.builder()
.hostRewrite("string")
.pathPrefixRewrite("string")
.build())
.build())
.matches(HttpRouteRuleMatchArgs.builder()
.fullPathMatch("string")
.headers(HttpRouteRuleMatchHeaderArgs.builder()
.exactMatch("string")
.header("string")
.invertMatch(false)
.prefixMatch("string")
.presentMatch(false)
.rangeMatch(HttpRouteRuleMatchHeaderRangeMatchArgs.builder()
.end(0)
.start(0)
.build())
.regexMatch("string")
.suffixMatch("string")
.build())
.ignoreCase(false)
.prefixMatch("string")
.queryParameters(HttpRouteRuleMatchQueryParameterArgs.builder()
.exactMatch("string")
.presentMatch(false)
.queryParameter("string")
.regexMatch("string")
.build())
.regexMatch("string")
.build())
.build())
.description("string")
.gateways("string")
.labels(Map.of("string", "string"))
.meshes("string")
.name("string")
.project("string")
.build());
http_route_resource = gcp.networkservices.HttpRoute("httpRouteResource",
hostnames=["string"],
rules=[{
"action": {
"corsPolicy": {
"allowCredentials": False,
"allowHeaders": ["string"],
"allowMethods": ["string"],
"allowOriginRegexes": ["string"],
"allowOrigins": ["string"],
"disabled": False,
"exposeHeaders": ["string"],
"maxAge": "string",
},
"destinations": [{
"serviceName": "string",
"weight": 0,
}],
"faultInjectionPolicy": {
"abort": {
"httpStatus": 0,
"percentage": 0,
},
"delay": {
"fixedDelay": "string",
"percentage": 0,
},
},
"redirect": {
"hostRedirect": "string",
"httpsRedirect": False,
"pathRedirect": "string",
"portRedirect": 0,
"prefixRewrite": "string",
"responseCode": "string",
"stripQuery": False,
},
"requestHeaderModifier": {
"add": {
"string": "string",
},
"removes": ["string"],
"set": {
"string": "string",
},
},
"requestMirrorPolicy": {
"destination": {
"serviceName": "string",
"weight": 0,
},
},
"responseHeaderModifier": {
"add": {
"string": "string",
},
"removes": ["string"],
"set": {
"string": "string",
},
},
"retryPolicy": {
"numRetries": 0,
"perTryTimeout": "string",
"retryConditions": ["string"],
},
"timeout": "string",
"urlRewrite": {
"hostRewrite": "string",
"pathPrefixRewrite": "string",
},
},
"matches": [{
"fullPathMatch": "string",
"headers": [{
"exactMatch": "string",
"header": "string",
"invertMatch": False,
"prefixMatch": "string",
"presentMatch": False,
"rangeMatch": {
"end": 0,
"start": 0,
},
"regexMatch": "string",
"suffixMatch": "string",
}],
"ignoreCase": False,
"prefixMatch": "string",
"queryParameters": [{
"exactMatch": "string",
"presentMatch": False,
"queryParameter": "string",
"regexMatch": "string",
}],
"regexMatch": "string",
}],
}],
description="string",
gateways=["string"],
labels={
"string": "string",
},
meshes=["string"],
name="string",
project="string")
const httpRouteResource = new gcp.networkservices.HttpRoute("httpRouteResource", {
hostnames: ["string"],
rules: [{
action: {
corsPolicy: {
allowCredentials: false,
allowHeaders: ["string"],
allowMethods: ["string"],
allowOriginRegexes: ["string"],
allowOrigins: ["string"],
disabled: false,
exposeHeaders: ["string"],
maxAge: "string",
},
destinations: [{
serviceName: "string",
weight: 0,
}],
faultInjectionPolicy: {
abort: {
httpStatus: 0,
percentage: 0,
},
delay: {
fixedDelay: "string",
percentage: 0,
},
},
redirect: {
hostRedirect: "string",
httpsRedirect: false,
pathRedirect: "string",
portRedirect: 0,
prefixRewrite: "string",
responseCode: "string",
stripQuery: false,
},
requestHeaderModifier: {
add: {
string: "string",
},
removes: ["string"],
set: {
string: "string",
},
},
requestMirrorPolicy: {
destination: {
serviceName: "string",
weight: 0,
},
},
responseHeaderModifier: {
add: {
string: "string",
},
removes: ["string"],
set: {
string: "string",
},
},
retryPolicy: {
numRetries: 0,
perTryTimeout: "string",
retryConditions: ["string"],
},
timeout: "string",
urlRewrite: {
hostRewrite: "string",
pathPrefixRewrite: "string",
},
},
matches: [{
fullPathMatch: "string",
headers: [{
exactMatch: "string",
header: "string",
invertMatch: false,
prefixMatch: "string",
presentMatch: false,
rangeMatch: {
end: 0,
start: 0,
},
regexMatch: "string",
suffixMatch: "string",
}],
ignoreCase: false,
prefixMatch: "string",
queryParameters: [{
exactMatch: "string",
presentMatch: false,
queryParameter: "string",
regexMatch: "string",
}],
regexMatch: "string",
}],
}],
description: "string",
gateways: ["string"],
labels: {
string: "string",
},
meshes: ["string"],
name: "string",
project: "string",
});
type: gcp:networkservices:HttpRoute
properties:
description: string
gateways:
- string
hostnames:
- string
labels:
string: string
meshes:
- string
name: string
project: string
rules:
- action:
corsPolicy:
allowCredentials: false
allowHeaders:
- string
allowMethods:
- string
allowOriginRegexes:
- string
allowOrigins:
- string
disabled: false
exposeHeaders:
- string
maxAge: string
destinations:
- serviceName: string
weight: 0
faultInjectionPolicy:
abort:
httpStatus: 0
percentage: 0
delay:
fixedDelay: string
percentage: 0
redirect:
hostRedirect: string
httpsRedirect: false
pathRedirect: string
portRedirect: 0
prefixRewrite: string
responseCode: string
stripQuery: false
requestHeaderModifier:
add:
string: string
removes:
- string
set:
string: string
requestMirrorPolicy:
destination:
serviceName: string
weight: 0
responseHeaderModifier:
add:
string: string
removes:
- string
set:
string: string
retryPolicy:
numRetries: 0
perTryTimeout: string
retryConditions:
- string
timeout: string
urlRewrite:
hostRewrite: string
pathPrefixRewrite: string
matches:
- fullPathMatch: string
headers:
- exactMatch: string
header: string
invertMatch: false
prefixMatch: string
presentMatch: false
rangeMatch:
end: 0
start: 0
regexMatch: string
suffixMatch: string
ignoreCase: false
prefixMatch: string
queryParameters:
- exactMatch: string
presentMatch: false
queryParameter: string
regexMatch: string
regexMatch: string
HttpRoute Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The HttpRoute resource accepts the following input properties:
- Hostnames List<string>
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- Rules
List<Http
Route Rule> - Rules that define how traffic is routed and handled. Structure is documented below.
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Gateways List<string>
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- Labels Dictionary<string, string>
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Meshes List<string>
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- Name string
- Name of the HttpRoute resource.
- Project string
- Hostnames []string
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- Rules
[]Http
Route Rule Args - Rules that define how traffic is routed and handled. Structure is documented below.
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Gateways []string
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- Labels map[string]string
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Meshes []string
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- Name string
- Name of the HttpRoute resource.
- Project string
- hostnames List<String>
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- rules
List<Http
Route Rule> - Rules that define how traffic is routed and handled. Structure is documented below.
- description String
- A free-text description of the resource. Max length 1024 characters.
- gateways List<String>
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- labels Map<String,String>
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- meshes List<String>
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- name String
- Name of the HttpRoute resource.
- project String
- hostnames string[]
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- rules
Http
Route Rule[] - Rules that define how traffic is routed and handled. Structure is documented below.
- description string
- A free-text description of the resource. Max length 1024 characters.
- gateways string[]
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- labels {[key: string]: string}
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- meshes string[]
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- name string
- Name of the HttpRoute resource.
- project string
- hostnames Sequence[str]
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- rules
Sequence[Http
Route Rule Args] - Rules that define how traffic is routed and handled. Structure is documented below.
- description str
- A free-text description of the resource. Max length 1024 characters.
- gateways Sequence[str]
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- labels Mapping[str, str]
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- meshes Sequence[str]
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- name str
- Name of the HttpRoute resource.
- project str
- hostnames List<String>
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- rules List<Property Map>
- Rules that define how traffic is routed and handled. Structure is documented below.
- description String
- A free-text description of the resource. Max length 1024 characters.
- gateways List<String>
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- labels Map<String>
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- meshes List<String>
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- name String
- Name of the HttpRoute resource.
- project String
Outputs
All input properties are implicitly available as output properties. Additionally, the HttpRoute resource produces the following output properties:
- Create
Time string - Time the HttpRoute was created in UTC.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - Server-defined URL of this resource.
- Update
Time string - Time the HttpRoute was updated in UTC.
- Create
Time string - Time the HttpRoute was created in UTC.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - Server-defined URL of this resource.
- Update
Time string - Time the HttpRoute was updated in UTC.
- create
Time String - Time the HttpRoute was created in UTC.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - Server-defined URL of this resource.
- update
Time String - Time the HttpRoute was updated in UTC.
- create
Time string - Time the HttpRoute was created in UTC.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link string - Server-defined URL of this resource.
- update
Time string - Time the HttpRoute was updated in UTC.
- create_
time str - Time the HttpRoute was created in UTC.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- self_
link str - Server-defined URL of this resource.
- update_
time str - Time the HttpRoute was updated in UTC.
- create
Time String - Time the HttpRoute was created in UTC.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - Server-defined URL of this resource.
- update
Time String - Time the HttpRoute was updated in UTC.
Look up Existing HttpRoute Resource
Get an existing HttpRoute resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: HttpRouteState, opts?: CustomResourceOptions): HttpRoute
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
gateways: Optional[Sequence[str]] = None,
hostnames: Optional[Sequence[str]] = None,
labels: Optional[Mapping[str, str]] = None,
meshes: Optional[Sequence[str]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
rules: Optional[Sequence[HttpRouteRuleArgs]] = None,
self_link: Optional[str] = None,
update_time: Optional[str] = None) -> HttpRoute
func GetHttpRoute(ctx *Context, name string, id IDInput, state *HttpRouteState, opts ...ResourceOption) (*HttpRoute, error)
public static HttpRoute Get(string name, Input<string> id, HttpRouteState? state, CustomResourceOptions? opts = null)
public static HttpRoute get(String name, Output<String> id, HttpRouteState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Create
Time string - Time the HttpRoute was created in UTC.
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Gateways List<string>
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- Hostnames List<string>
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- Labels Dictionary<string, string>
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Meshes List<string>
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- Name string
- Name of the HttpRoute resource.
- Project string
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Rules
List<Http
Route Rule> - Rules that define how traffic is routed and handled. Structure is documented below.
- Self
Link string - Server-defined URL of this resource.
- Update
Time string - Time the HttpRoute was updated in UTC.
- Create
Time string - Time the HttpRoute was created in UTC.
- Description string
- A free-text description of the resource. Max length 1024 characters.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Gateways []string
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- Hostnames []string
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- Labels map[string]string
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Meshes []string
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- Name string
- Name of the HttpRoute resource.
- Project string
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Rules
[]Http
Route Rule Args - Rules that define how traffic is routed and handled. Structure is documented below.
- Self
Link string - Server-defined URL of this resource.
- Update
Time string - Time the HttpRoute was updated in UTC.
- create
Time String - Time the HttpRoute was created in UTC.
- description String
- A free-text description of the resource. Max length 1024 characters.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gateways List<String>
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- hostnames List<String>
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- labels Map<String,String>
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- meshes List<String>
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- name String
- Name of the HttpRoute resource.
- project String
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- rules
List<Http
Route Rule> - Rules that define how traffic is routed and handled. Structure is documented below.
- self
Link String - Server-defined URL of this resource.
- update
Time String - Time the HttpRoute was updated in UTC.
- create
Time string - Time the HttpRoute was created in UTC.
- description string
- A free-text description of the resource. Max length 1024 characters.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gateways string[]
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- hostnames string[]
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- labels {[key: string]: string}
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- meshes string[]
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- name string
- Name of the HttpRoute resource.
- project string
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- rules
Http
Route Rule[] - Rules that define how traffic is routed and handled. Structure is documented below.
- self
Link string - Server-defined URL of this resource.
- update
Time string - Time the HttpRoute was updated in UTC.
- create_
time str - Time the HttpRoute was created in UTC.
- description str
- A free-text description of the resource. Max length 1024 characters.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gateways Sequence[str]
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- hostnames Sequence[str]
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- labels Mapping[str, str]
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- meshes Sequence[str]
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- name str
- Name of the HttpRoute resource.
- project str
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- rules
Sequence[Http
Route Rule Args] - Rules that define how traffic is routed and handled. Structure is documented below.
- self_
link str - Server-defined URL of this resource.
- update_
time str - Time the HttpRoute was updated in UTC.
- create
Time String - Time the HttpRoute was created in UTC.
- description String
- A free-text description of the resource. Max length 1024 characters.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- gateways List<String>
- Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: projects/*/locations/global/gateways/<gateway_name>
- hostnames List<String>
- Set of hosts that should match against the HTTP host header to select a HttpRoute to process the request.
- labels Map<String>
- Set of label tags associated with the HttpRoute resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- meshes List<String>
- Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: projects/*/locations/global/meshes/<mesh_name>. The attached Mesh should be of a type SIDECAR.
- name String
- Name of the HttpRoute resource.
- project String
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- rules List<Property Map>
- Rules that define how traffic is routed and handled. Structure is documented below.
- self
Link String - Server-defined URL of this resource.
- update
Time String - Time the HttpRoute was updated in UTC.
Supporting Types
HttpRouteRule, HttpRouteRuleArgs
- Action
Http
Route Rule Action - The detailed rule defining how to route matched traffic. Structure is documented below.
- Matches
List<Http
Route Rule Match> - A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list. Structure is documented below.
- Action
Http
Route Rule Action - The detailed rule defining how to route matched traffic. Structure is documented below.
- Matches
[]Http
Route Rule Match - A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list. Structure is documented below.
- action
Http
Route Rule Action - The detailed rule defining how to route matched traffic. Structure is documented below.
- matches
List<Http
Route Rule Match> - A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list. Structure is documented below.
- action
Http
Route Rule Action - The detailed rule defining how to route matched traffic. Structure is documented below.
- matches
Http
Route Rule Match[] - A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list. Structure is documented below.
- action
Http
Route Rule Action - The detailed rule defining how to route matched traffic. Structure is documented below.
- matches
Sequence[Http
Route Rule Match] - A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list. Structure is documented below.
- action Property Map
- The detailed rule defining how to route matched traffic. Structure is documented below.
- matches List<Property Map>
- A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list. Structure is documented below.
HttpRouteRuleAction, HttpRouteRuleActionArgs
- Cors
Policy HttpRoute Rule Action Cors Policy - The specification for allowing client side cross-origin requests. Structure is documented below.
- Destinations
List<Http
Route Rule Action Destination> - The destination to which traffic should be forwarded. Structure is documented below.
- Fault
Injection HttpPolicy Route Rule Action Fault Injection Policy - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. Structure is documented below.
- Redirect
Http
Route Rule Action Redirect - If set, the request is directed as configured by this field. Structure is documented below.
- Request
Header HttpModifier Route Rule Action Request Header Modifier - The specification for modifying the headers of a matching request prior to delivery of the request to the destination. Structure is documented below.
- Request
Mirror HttpPolicy Route Rule Action Request Mirror Policy - Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Structure is documented below.
- Response
Header HttpModifier Route Rule Action Response Header Modifier - The specification for modifying the headers of a response prior to sending the response back to the client. Structure is documented below.
- Retry
Policy HttpRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- Timeout string
- Specifies the timeout for selected route.
- Url
Rewrite HttpRoute Rule Action Url Rewrite - The specification for rewrite URL before forwarding requests to the destination. Structure is documented below.
- Cors
Policy HttpRoute Rule Action Cors Policy - The specification for allowing client side cross-origin requests. Structure is documented below.
- Destinations
[]Http
Route Rule Action Destination - The destination to which traffic should be forwarded. Structure is documented below.
- Fault
Injection HttpPolicy Route Rule Action Fault Injection Policy - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. Structure is documented below.
- Redirect
Http
Route Rule Action Redirect - If set, the request is directed as configured by this field. Structure is documented below.
- Request
Header HttpModifier Route Rule Action Request Header Modifier - The specification for modifying the headers of a matching request prior to delivery of the request to the destination. Structure is documented below.
- Request
Mirror HttpPolicy Route Rule Action Request Mirror Policy - Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Structure is documented below.
- Response
Header HttpModifier Route Rule Action Response Header Modifier - The specification for modifying the headers of a response prior to sending the response back to the client. Structure is documented below.
- Retry
Policy HttpRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- Timeout string
- Specifies the timeout for selected route.
- Url
Rewrite HttpRoute Rule Action Url Rewrite - The specification for rewrite URL before forwarding requests to the destination. Structure is documented below.
- cors
Policy HttpRoute Rule Action Cors Policy - The specification for allowing client side cross-origin requests. Structure is documented below.
- destinations
List<Http
Route Rule Action Destination> - The destination to which traffic should be forwarded. Structure is documented below.
- fault
Injection HttpPolicy Route Rule Action Fault Injection Policy - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. Structure is documented below.
- redirect
Http
Route Rule Action Redirect - If set, the request is directed as configured by this field. Structure is documented below.
- request
Header HttpModifier Route Rule Action Request Header Modifier - The specification for modifying the headers of a matching request prior to delivery of the request to the destination. Structure is documented below.
- request
Mirror HttpPolicy Route Rule Action Request Mirror Policy - Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Structure is documented below.
- response
Header HttpModifier Route Rule Action Response Header Modifier - The specification for modifying the headers of a response prior to sending the response back to the client. Structure is documented below.
- retry
Policy HttpRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- timeout String
- Specifies the timeout for selected route.
- url
Rewrite HttpRoute Rule Action Url Rewrite - The specification for rewrite URL before forwarding requests to the destination. Structure is documented below.
- cors
Policy HttpRoute Rule Action Cors Policy - The specification for allowing client side cross-origin requests. Structure is documented below.
- destinations
Http
Route Rule Action Destination[] - The destination to which traffic should be forwarded. Structure is documented below.
- fault
Injection HttpPolicy Route Rule Action Fault Injection Policy - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. Structure is documented below.
- redirect
Http
Route Rule Action Redirect - If set, the request is directed as configured by this field. Structure is documented below.
- request
Header HttpModifier Route Rule Action Request Header Modifier - The specification for modifying the headers of a matching request prior to delivery of the request to the destination. Structure is documented below.
- request
Mirror HttpPolicy Route Rule Action Request Mirror Policy - Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Structure is documented below.
- response
Header HttpModifier Route Rule Action Response Header Modifier - The specification for modifying the headers of a response prior to sending the response back to the client. Structure is documented below.
- retry
Policy HttpRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- timeout string
- Specifies the timeout for selected route.
- url
Rewrite HttpRoute Rule Action Url Rewrite - The specification for rewrite URL before forwarding requests to the destination. Structure is documented below.
- cors_
policy HttpRoute Rule Action Cors Policy - The specification for allowing client side cross-origin requests. Structure is documented below.
- destinations
Sequence[Http
Route Rule Action Destination] - The destination to which traffic should be forwarded. Structure is documented below.
- fault_
injection_ Httppolicy Route Rule Action Fault Injection Policy - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. Structure is documented below.
- redirect
Http
Route Rule Action Redirect - If set, the request is directed as configured by this field. Structure is documented below.
- request_
header_ Httpmodifier Route Rule Action Request Header Modifier - The specification for modifying the headers of a matching request prior to delivery of the request to the destination. Structure is documented below.
- request_
mirror_ Httppolicy Route Rule Action Request Mirror Policy - Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Structure is documented below.
- response_
header_ Httpmodifier Route Rule Action Response Header Modifier - The specification for modifying the headers of a response prior to sending the response back to the client. Structure is documented below.
- retry_
policy HttpRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- timeout str
- Specifies the timeout for selected route.
- url_
rewrite HttpRoute Rule Action Url Rewrite - The specification for rewrite URL before forwarding requests to the destination. Structure is documented below.
- cors
Policy Property Map - The specification for allowing client side cross-origin requests. Structure is documented below.
- destinations List<Property Map>
- The destination to which traffic should be forwarded. Structure is documented below.
- fault
Injection Property MapPolicy - The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. Structure is documented below.
- redirect Property Map
- If set, the request is directed as configured by this field. Structure is documented below.
- request
Header Property MapModifier - The specification for modifying the headers of a matching request prior to delivery of the request to the destination. Structure is documented below.
- request
Mirror Property MapPolicy - Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Structure is documented below.
- response
Header Property MapModifier - The specification for modifying the headers of a response prior to sending the response back to the client. Structure is documented below.
- retry
Policy Property Map - Specifies the retry policy associated with this route. Structure is documented below.
- timeout String
- Specifies the timeout for selected route.
- url
Rewrite Property Map - The specification for rewrite URL before forwarding requests to the destination. Structure is documented below.
HttpRouteRuleActionCorsPolicy, HttpRouteRuleActionCorsPolicyArgs
- Allow
Credentials bool - In response to a preflight request, setting this to true indicates that the actual request can include user credentials.
- Allow
Headers List<string> - Specifies the content for Access-Control-Allow-Headers header.
- Allow
Methods List<string> - Specifies the content for Access-Control-Allow-Methods header.
- Allow
Origin List<string>Regexes - Specifies the regular expression patterns that match allowed origins.
- Allow
Origins List<string> - Specifies the list of origins that will be allowed to do CORS requests.
- Disabled bool
- If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- Expose
Headers List<string> - Specifies the content for Access-Control-Expose-Headers header.
- Max
Age string - Specifies how long result of a preflight request can be cached in seconds.
- Allow
Credentials bool - In response to a preflight request, setting this to true indicates that the actual request can include user credentials.
- Allow
Headers []string - Specifies the content for Access-Control-Allow-Headers header.
- Allow
Methods []string - Specifies the content for Access-Control-Allow-Methods header.
- Allow
Origin []stringRegexes - Specifies the regular expression patterns that match allowed origins.
- Allow
Origins []string - Specifies the list of origins that will be allowed to do CORS requests.
- Disabled bool
- If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- Expose
Headers []string - Specifies the content for Access-Control-Expose-Headers header.
- Max
Age string - Specifies how long result of a preflight request can be cached in seconds.
- allow
Credentials Boolean - In response to a preflight request, setting this to true indicates that the actual request can include user credentials.
- allow
Headers List<String> - Specifies the content for Access-Control-Allow-Headers header.
- allow
Methods List<String> - Specifies the content for Access-Control-Allow-Methods header.
- allow
Origin List<String>Regexes - Specifies the regular expression patterns that match allowed origins.
- allow
Origins List<String> - Specifies the list of origins that will be allowed to do CORS requests.
- disabled Boolean
- If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- expose
Headers List<String> - Specifies the content for Access-Control-Expose-Headers header.
- max
Age String - Specifies how long result of a preflight request can be cached in seconds.
- allow
Credentials boolean - In response to a preflight request, setting this to true indicates that the actual request can include user credentials.
- allow
Headers string[] - Specifies the content for Access-Control-Allow-Headers header.
- allow
Methods string[] - Specifies the content for Access-Control-Allow-Methods header.
- allow
Origin string[]Regexes - Specifies the regular expression patterns that match allowed origins.
- allow
Origins string[] - Specifies the list of origins that will be allowed to do CORS requests.
- disabled boolean
- If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- expose
Headers string[] - Specifies the content for Access-Control-Expose-Headers header.
- max
Age string - Specifies how long result of a preflight request can be cached in seconds.
- allow_
credentials bool - In response to a preflight request, setting this to true indicates that the actual request can include user credentials.
- allow_
headers Sequence[str] - Specifies the content for Access-Control-Allow-Headers header.
- allow_
methods Sequence[str] - Specifies the content for Access-Control-Allow-Methods header.
- allow_
origin_ Sequence[str]regexes - Specifies the regular expression patterns that match allowed origins.
- allow_
origins Sequence[str] - Specifies the list of origins that will be allowed to do CORS requests.
- disabled bool
- If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- expose_
headers Sequence[str] - Specifies the content for Access-Control-Expose-Headers header.
- max_
age str - Specifies how long result of a preflight request can be cached in seconds.
- allow
Credentials Boolean - In response to a preflight request, setting this to true indicates that the actual request can include user credentials.
- allow
Headers List<String> - Specifies the content for Access-Control-Allow-Headers header.
- allow
Methods List<String> - Specifies the content for Access-Control-Allow-Methods header.
- allow
Origin List<String>Regexes - Specifies the regular expression patterns that match allowed origins.
- allow
Origins List<String> - Specifies the list of origins that will be allowed to do CORS requests.
- disabled Boolean
- If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- expose
Headers List<String> - Specifies the content for Access-Control-Expose-Headers header.
- max
Age String - Specifies how long result of a preflight request can be cached in seconds.
HttpRouteRuleActionDestination, HttpRouteRuleActionDestinationArgs
- Service
Name string - The URL of a BackendService to route traffic to.
- Weight int
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- Service
Name string - The URL of a BackendService to route traffic to.
- Weight int
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- service
Name String - The URL of a BackendService to route traffic to.
- weight Integer
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- service
Name string - The URL of a BackendService to route traffic to.
- weight number
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- service_
name str - The URL of a BackendService to route traffic to.
- weight int
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- service
Name String - The URL of a BackendService to route traffic to.
- weight Number
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
HttpRouteRuleActionFaultInjectionPolicy, HttpRouteRuleActionFaultInjectionPolicyArgs
- Abort
Http
Route Rule Action Fault Injection Policy Abort - Specification of how client requests are aborted as part of fault injection before being sent to a destination. Structure is documented below.
- Delay
Http
Route Rule Action Fault Injection Policy Delay - Specification of how client requests are delayed as part of fault injection before being sent to a destination. Structure is documented below.
- Abort
Http
Route Rule Action Fault Injection Policy Abort - Specification of how client requests are aborted as part of fault injection before being sent to a destination. Structure is documented below.
- Delay
Http
Route Rule Action Fault Injection Policy Delay - Specification of how client requests are delayed as part of fault injection before being sent to a destination. Structure is documented below.
- abort
Http
Route Rule Action Fault Injection Policy Abort - Specification of how client requests are aborted as part of fault injection before being sent to a destination. Structure is documented below.
- delay
Http
Route Rule Action Fault Injection Policy Delay - Specification of how client requests are delayed as part of fault injection before being sent to a destination. Structure is documented below.
- abort
Http
Route Rule Action Fault Injection Policy Abort - Specification of how client requests are aborted as part of fault injection before being sent to a destination. Structure is documented below.
- delay
Http
Route Rule Action Fault Injection Policy Delay - Specification of how client requests are delayed as part of fault injection before being sent to a destination. Structure is documented below.
- abort
Http
Route Rule Action Fault Injection Policy Abort - Specification of how client requests are aborted as part of fault injection before being sent to a destination. Structure is documented below.
- delay
Http
Route Rule Action Fault Injection Policy Delay - Specification of how client requests are delayed as part of fault injection before being sent to a destination. Structure is documented below.
- abort Property Map
- Specification of how client requests are aborted as part of fault injection before being sent to a destination. Structure is documented below.
- delay Property Map
- Specification of how client requests are delayed as part of fault injection before being sent to a destination. Structure is documented below.
HttpRouteRuleActionFaultInjectionPolicyAbort, HttpRouteRuleActionFaultInjectionPolicyAbortArgs
- Http
Status int - The HTTP status code used to abort the request.
- Percentage int
- The percentage of traffic which will be aborted.
- Http
Status int - The HTTP status code used to abort the request.
- Percentage int
- The percentage of traffic which will be aborted.
- http
Status Integer - The HTTP status code used to abort the request.
- percentage Integer
- The percentage of traffic which will be aborted.
- http
Status number - The HTTP status code used to abort the request.
- percentage number
- The percentage of traffic which will be aborted.
- http_
status int - The HTTP status code used to abort the request.
- percentage int
- The percentage of traffic which will be aborted.
- http
Status Number - The HTTP status code used to abort the request.
- percentage Number
- The percentage of traffic which will be aborted.
HttpRouteRuleActionFaultInjectionPolicyDelay, HttpRouteRuleActionFaultInjectionPolicyDelayArgs
- Fixed
Delay string - Specify a fixed delay before forwarding the request.
- Percentage int
- The percentage of traffic on which delay will be injected.
- Fixed
Delay string - Specify a fixed delay before forwarding the request.
- Percentage int
- The percentage of traffic on which delay will be injected.
- fixed
Delay String - Specify a fixed delay before forwarding the request.
- percentage Integer
- The percentage of traffic on which delay will be injected.
- fixed
Delay string - Specify a fixed delay before forwarding the request.
- percentage number
- The percentage of traffic on which delay will be injected.
- fixed_
delay str - Specify a fixed delay before forwarding the request.
- percentage int
- The percentage of traffic on which delay will be injected.
- fixed
Delay String - Specify a fixed delay before forwarding the request.
- percentage Number
- The percentage of traffic on which delay will be injected.
HttpRouteRuleActionRedirect, HttpRouteRuleActionRedirectArgs
- Host
Redirect string - The host that will be used in the redirect response instead of the one that was supplied in the request.
- Https
Redirect bool - If set to true, the URL scheme in the redirected request is set to https.
- Path
Redirect string - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect can not 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.
- Port
Redirect int - The port that will be used in the redirected request instead of the one that was supplied in the request.
- Prefix
Rewrite string - Indicates that during redirection, the matched prefix (or path) should be swapped with this value.
- Response
Code string - The HTTP Status code to use for the redirect.
- Strip
Query bool - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.
- Host
Redirect string - The host that will be used in the redirect response instead of the one that was supplied in the request.
- Https
Redirect bool - If set to true, the URL scheme in the redirected request is set to https.
- Path
Redirect string - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect can not 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.
- Port
Redirect int - The port that will be used in the redirected request instead of the one that was supplied in the request.
- Prefix
Rewrite string - Indicates that during redirection, the matched prefix (or path) should be swapped with this value.
- Response
Code string - The HTTP Status code to use for the redirect.
- Strip
Query bool - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.
- host
Redirect String - The host that will be used in the redirect response instead of the one that was supplied in the request.
- https
Redirect Boolean - If set to true, the URL scheme in the redirected request is set to https.
- path
Redirect String - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect can not 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.
- port
Redirect Integer - The port that will be used in the redirected request instead of the one that was supplied in the request.
- prefix
Rewrite String - Indicates that during redirection, the matched prefix (or path) should be swapped with this value.
- response
Code String - The HTTP Status code to use for the redirect.
- strip
Query Boolean - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.
- host
Redirect string - The host that will be used in the redirect response instead of the one that was supplied in the request.
- https
Redirect boolean - If set to true, the URL scheme in the redirected request is set to https.
- path
Redirect string - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect can not 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.
- port
Redirect number - The port that will be used in the redirected request instead of the one that was supplied in the request.
- prefix
Rewrite string - Indicates that during redirection, the matched prefix (or path) should be swapped with this value.
- response
Code string - The HTTP Status code to use for the redirect.
- strip
Query boolean - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.
- host_
redirect str - The host that will be used in the redirect response instead of the one that was supplied in the request.
- https_
redirect bool - If set to true, the URL scheme in the redirected request is set to https.
- path_
redirect str - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect can not 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.
- port_
redirect int - The port that will be used in the redirected request instead of the one that was supplied in the request.
- prefix_
rewrite str - Indicates that during redirection, the matched prefix (or path) should be swapped with this value.
- response_
code str - The HTTP Status code to use for the redirect.
- strip_
query bool - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.
- host
Redirect String - The host that will be used in the redirect response instead of the one that was supplied in the request.
- https
Redirect Boolean - If set to true, the URL scheme in the redirected request is set to https.
- path
Redirect String - The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect can not 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.
- port
Redirect Number - The port that will be used in the redirected request instead of the one that was supplied in the request.
- prefix
Rewrite String - Indicates that during redirection, the matched prefix (or path) should be swapped with this value.
- response
Code String - The HTTP Status code to use for the redirect.
- strip
Query Boolean - If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request.
HttpRouteRuleActionRequestHeaderModifier, HttpRouteRuleActionRequestHeaderModifierArgs
- Add Dictionary<string, string>
- Add the headers with given map where key is the name of the header, value is the value of the header.
- Removes List<string>
- Remove headers (matching by header names) specified in the list.
- Set Dictionary<string, string>
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- Add map[string]string
- Add the headers with given map where key is the name of the header, value is the value of the header.
- Removes []string
- Remove headers (matching by header names) specified in the list.
- Set map[string]string
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- add Map<String,String>
- Add the headers with given map where key is the name of the header, value is the value of the header.
- removes List<String>
- Remove headers (matching by header names) specified in the list.
- set Map<String,String>
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- add {[key: string]: string}
- Add the headers with given map where key is the name of the header, value is the value of the header.
- removes string[]
- Remove headers (matching by header names) specified in the list.
- set {[key: string]: string}
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- add Mapping[str, str]
- Add the headers with given map where key is the name of the header, value is the value of the header.
- removes Sequence[str]
- Remove headers (matching by header names) specified in the list.
- set Mapping[str, str]
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- add Map<String>
- Add the headers with given map where key is the name of the header, value is the value of the header.
- removes List<String>
- Remove headers (matching by header names) specified in the list.
- set Map<String>
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
HttpRouteRuleActionRequestMirrorPolicy, HttpRouteRuleActionRequestMirrorPolicyArgs
- Destination
Http
Route Rule Action Request Mirror Policy Destination - The destination the requests will be mirrored to. Structure is documented below.
- Destination
Http
Route Rule Action Request Mirror Policy Destination - The destination the requests will be mirrored to. Structure is documented below.
- destination
Http
Route Rule Action Request Mirror Policy Destination - The destination the requests will be mirrored to. Structure is documented below.
- destination
Http
Route Rule Action Request Mirror Policy Destination - The destination the requests will be mirrored to. Structure is documented below.
- destination
Http
Route Rule Action Request Mirror Policy Destination - The destination the requests will be mirrored to. Structure is documented below.
- destination Property Map
- The destination the requests will be mirrored to. Structure is documented below.
HttpRouteRuleActionRequestMirrorPolicyDestination, HttpRouteRuleActionRequestMirrorPolicyDestinationArgs
- Service
Name string - The URL of a BackendService to route traffic to.
- Weight int
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- Service
Name string - The URL of a BackendService to route traffic to.
- Weight int
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- service
Name String - The URL of a BackendService to route traffic to.
- weight Integer
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- service
Name string - The URL of a BackendService to route traffic to.
- weight number
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- service_
name str - The URL of a BackendService to route traffic to.
- weight int
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
- service
Name String - The URL of a BackendService to route traffic to.
- weight Number
- Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
HttpRouteRuleActionResponseHeaderModifier, HttpRouteRuleActionResponseHeaderModifierArgs
- Add Dictionary<string, string>
- Add the headers with given map where key is the name of the header, value is the value of the header.
- Removes List<string>
- Remove headers (matching by header names) specified in the list.
- Set Dictionary<string, string>
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- Add map[string]string
- Add the headers with given map where key is the name of the header, value is the value of the header.
- Removes []string
- Remove headers (matching by header names) specified in the list.
- Set map[string]string
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- add Map<String,String>
- Add the headers with given map where key is the name of the header, value is the value of the header.
- removes List<String>
- Remove headers (matching by header names) specified in the list.
- set Map<String,String>
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- add {[key: string]: string}
- Add the headers with given map where key is the name of the header, value is the value of the header.
- removes string[]
- Remove headers (matching by header names) specified in the list.
- set {[key: string]: string}
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- add Mapping[str, str]
- Add the headers with given map where key is the name of the header, value is the value of the header.
- removes Sequence[str]
- Remove headers (matching by header names) specified in the list.
- set Mapping[str, str]
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
- add Map<String>
- Add the headers with given map where key is the name of the header, value is the value of the header.
- removes List<String>
- Remove headers (matching by header names) specified in the list.
- set Map<String>
- Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
HttpRouteRuleActionRetryPolicy, HttpRouteRuleActionRetryPolicyArgs
- Num
Retries int - Specifies the allowed number of retries.
- Per
Try stringTimeout - Specifies a non-zero timeout per retry attempt. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
- Retry
Conditions List<string> - Specifies one or more conditions when this retry policy applies.
- Num
Retries int - Specifies the allowed number of retries.
- Per
Try stringTimeout - Specifies a non-zero timeout per retry attempt. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
- Retry
Conditions []string - Specifies one or more conditions when this retry policy applies.
- num
Retries Integer - Specifies the allowed number of retries.
- per
Try StringTimeout - Specifies a non-zero timeout per retry attempt. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
- retry
Conditions List<String> - Specifies one or more conditions when this retry policy applies.
- num
Retries number - Specifies the allowed number of retries.
- per
Try stringTimeout - Specifies a non-zero timeout per retry attempt. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
- retry
Conditions string[] - Specifies one or more conditions when this retry policy applies.
- num_
retries int - Specifies the allowed number of retries.
- per_
try_ strtimeout - Specifies a non-zero timeout per retry attempt. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
- retry_
conditions Sequence[str] - Specifies one or more conditions when this retry policy applies.
- num
Retries Number - Specifies the allowed number of retries.
- per
Try StringTimeout - Specifies a non-zero timeout per retry attempt. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
- retry
Conditions List<String> - Specifies one or more conditions when this retry policy applies.
HttpRouteRuleActionUrlRewrite, HttpRouteRuleActionUrlRewriteArgs
- Host
Rewrite string - Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.
- Path
Prefix stringRewrite - Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.
- Host
Rewrite string - Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.
- Path
Prefix stringRewrite - Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.
- host
Rewrite String - Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.
- path
Prefix StringRewrite - Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.
- host
Rewrite string - Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.
- path
Prefix stringRewrite - Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.
- host_
rewrite str - Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.
- path_
prefix_ strrewrite - Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.
- host
Rewrite String - Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.
- path
Prefix StringRewrite - Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.
HttpRouteRuleMatch, HttpRouteRuleMatchArgs
- Full
Path stringMatch - The HTTP request path value should exactly match this value.
- Headers
List<Http
Route Rule Match Header> - Specifies a list of HTTP request headers to match against. Structure is documented below.
- Ignore
Case bool - Specifies if prefixMatch and fullPathMatch matches are case sensitive. The default value is false.
- Prefix
Match string - The HTTP request path value must begin with specified prefixMatch. prefixMatch must begin with a /.
- Query
Parameters List<HttpRoute Rule Match Query Parameter> - Specifies a list of query parameters to match against. Structure is documented below.
- Regex
Match string - The HTTP request path value must satisfy the regular expression specified by regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- Full
Path stringMatch - The HTTP request path value should exactly match this value.
- Headers
[]Http
Route Rule Match Header - Specifies a list of HTTP request headers to match against. Structure is documented below.
- Ignore
Case bool - Specifies if prefixMatch and fullPathMatch matches are case sensitive. The default value is false.
- Prefix
Match string - The HTTP request path value must begin with specified prefixMatch. prefixMatch must begin with a /.
- Query
Parameters []HttpRoute Rule Match Query Parameter - Specifies a list of query parameters to match against. Structure is documented below.
- Regex
Match string - The HTTP request path value must satisfy the regular expression specified by regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- full
Path StringMatch - The HTTP request path value should exactly match this value.
- headers
List<Http
Route Rule Match Header> - Specifies a list of HTTP request headers to match against. Structure is documented below.
- ignore
Case Boolean - Specifies if prefixMatch and fullPathMatch matches are case sensitive. The default value is false.
- prefix
Match String - The HTTP request path value must begin with specified prefixMatch. prefixMatch must begin with a /.
- query
Parameters List<HttpRoute Rule Match Query Parameter> - Specifies a list of query parameters to match against. Structure is documented below.
- regex
Match String - The HTTP request path value must satisfy the regular expression specified by regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- full
Path stringMatch - The HTTP request path value should exactly match this value.
- headers
Http
Route Rule Match Header[] - Specifies a list of HTTP request headers to match against. Structure is documented below.
- ignore
Case boolean - Specifies if prefixMatch and fullPathMatch matches are case sensitive. The default value is false.
- prefix
Match string - The HTTP request path value must begin with specified prefixMatch. prefixMatch must begin with a /.
- query
Parameters HttpRoute Rule Match Query Parameter[] - Specifies a list of query parameters to match against. Structure is documented below.
- regex
Match string - The HTTP request path value must satisfy the regular expression specified by regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- full_
path_ strmatch - The HTTP request path value should exactly match this value.
- headers
Sequence[Http
Route Rule Match Header] - Specifies a list of HTTP request headers to match against. Structure is documented below.
- ignore_
case bool - Specifies if prefixMatch and fullPathMatch matches are case sensitive. The default value is false.
- prefix_
match str - The HTTP request path value must begin with specified prefixMatch. prefixMatch must begin with a /.
- query_
parameters Sequence[HttpRoute Rule Match Query Parameter] - Specifies a list of query parameters to match against. Structure is documented below.
- regex_
match str - The HTTP request path value must satisfy the regular expression specified by regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- full
Path StringMatch - The HTTP request path value should exactly match this value.
- headers List<Property Map>
- Specifies a list of HTTP request headers to match against. Structure is documented below.
- ignore
Case Boolean - Specifies if prefixMatch and fullPathMatch matches are case sensitive. The default value is false.
- prefix
Match String - The HTTP request path value must begin with specified prefixMatch. prefixMatch must begin with a /.
- query
Parameters List<Property Map> - Specifies a list of query parameters to match against. Structure is documented below.
- regex
Match String - The HTTP request path value must satisfy the regular expression specified by regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
HttpRouteRuleMatchHeader, HttpRouteRuleMatchHeaderArgs
- Exact
Match string - The value of the header should match exactly the content of exactMatch.
- Header string
- The name of the HTTP header to match against.
- Invert
Match bool - If specified, the match result will be inverted before checking. Default value is set to false.
- Prefix
Match string - The value of the header must start with the contents of prefixMatch.
- Present
Match bool - A header with headerName must exist. The match takes place whether or not the header has a value.
- Range
Match HttpRoute Rule Match Header Range Match - If specified, the rule will match if the request header value is within the range. Structure is documented below.
- Regex
Match string - The value of the header must match the regular expression specified in regexMatch.
- Suffix
Match string - The value of the header must end with the contents of suffixMatch.
- Exact
Match string - The value of the header should match exactly the content of exactMatch.
- Header string
- The name of the HTTP header to match against.
- Invert
Match bool - If specified, the match result will be inverted before checking. Default value is set to false.
- Prefix
Match string - The value of the header must start with the contents of prefixMatch.
- Present
Match bool - A header with headerName must exist. The match takes place whether or not the header has a value.
- Range
Match HttpRoute Rule Match Header Range Match - If specified, the rule will match if the request header value is within the range. Structure is documented below.
- Regex
Match string - The value of the header must match the regular expression specified in regexMatch.
- Suffix
Match string - The value of the header must end with the contents of suffixMatch.
- exact
Match String - The value of the header should match exactly the content of exactMatch.
- header String
- The name of the HTTP header to match against.
- invert
Match Boolean - If specified, the match result will be inverted before checking. Default value is set to false.
- prefix
Match String - The value of the header must start with the contents of prefixMatch.
- present
Match Boolean - A header with headerName must exist. The match takes place whether or not the header has a value.
- range
Match HttpRoute Rule Match Header Range Match - If specified, the rule will match if the request header value is within the range. Structure is documented below.
- regex
Match String - The value of the header must match the regular expression specified in regexMatch.
- suffix
Match String - The value of the header must end with the contents of suffixMatch.
- exact
Match string - The value of the header should match exactly the content of exactMatch.
- header string
- The name of the HTTP header to match against.
- invert
Match boolean - If specified, the match result will be inverted before checking. Default value is set to false.
- prefix
Match string - The value of the header must start with the contents of prefixMatch.
- present
Match boolean - A header with headerName must exist. The match takes place whether or not the header has a value.
- range
Match HttpRoute Rule Match Header Range Match - If specified, the rule will match if the request header value is within the range. Structure is documented below.
- regex
Match string - The value of the header must match the regular expression specified in regexMatch.
- suffix
Match string - The value of the header must end with the contents of suffixMatch.
- exact_
match str - The value of the header should match exactly the content of exactMatch.
- header str
- The name of the HTTP header to match against.
- invert_
match bool - If specified, the match result will be inverted before checking. Default value is set to false.
- prefix_
match str - The value of the header must start with the contents of prefixMatch.
- present_
match bool - A header with headerName must exist. The match takes place whether or not the header has a value.
- range_
match HttpRoute Rule Match Header Range Match - If specified, the rule will match if the request header value is within the range. Structure is documented below.
- regex_
match str - The value of the header must match the regular expression specified in regexMatch.
- suffix_
match str - The value of the header must end with the contents of suffixMatch.
- exact
Match String - The value of the header should match exactly the content of exactMatch.
- header String
- The name of the HTTP header to match against.
- invert
Match Boolean - If specified, the match result will be inverted before checking. Default value is set to false.
- prefix
Match String - The value of the header must start with the contents of prefixMatch.
- present
Match Boolean - A header with headerName must exist. The match takes place whether or not the header has a value.
- range
Match Property Map - If specified, the rule will match if the request header value is within the range. Structure is documented below.
- regex
Match String - The value of the header must match the regular expression specified in regexMatch.
- suffix
Match String - The value of the header must end with the contents of suffixMatch.
HttpRouteRuleMatchHeaderRangeMatch, HttpRouteRuleMatchHeaderRangeMatchArgs
HttpRouteRuleMatchQueryParameter, HttpRouteRuleMatchQueryParameterArgs
- Exact
Match string - The value of the query parameter must exactly match the contents of exactMatch.
- Present
Match bool - Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not.
- Query
Parameter string - The name of the query parameter to match.
- Regex
Match string - The value of the query parameter must match the regular expression specified by regexMatch.For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- Exact
Match string - The value of the query parameter must exactly match the contents of exactMatch.
- Present
Match bool - Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not.
- Query
Parameter string - The name of the query parameter to match.
- Regex
Match string - The value of the query parameter must match the regular expression specified by regexMatch.For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- exact
Match String - The value of the query parameter must exactly match the contents of exactMatch.
- present
Match Boolean - Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not.
- query
Parameter String - The name of the query parameter to match.
- regex
Match String - The value of the query parameter must match the regular expression specified by regexMatch.For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- exact
Match string - The value of the query parameter must exactly match the contents of exactMatch.
- present
Match boolean - Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not.
- query
Parameter string - The name of the query parameter to match.
- regex
Match string - The value of the query parameter must match the regular expression specified by regexMatch.For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- exact_
match str - The value of the query parameter must exactly match the contents of exactMatch.
- present_
match bool - Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not.
- query_
parameter str - The name of the query parameter to match.
- regex_
match str - The value of the query parameter must match the regular expression specified by regexMatch.For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
- exact
Match String - The value of the query parameter must exactly match the contents of exactMatch.
- present
Match Boolean - Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not.
- query
Parameter String - The name of the query parameter to match.
- regex
Match String - The value of the query parameter must match the regular expression specified by regexMatch.For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax
Import
HttpRoute can be imported using any of these accepted formats:
projects/{{project}}/locations/global/httpRoutes/{{name}}
{{project}}/{{name}}
{{name}}
When using the pulumi import
command, HttpRoute can be imported using one of the formats above. For example:
$ pulumi import gcp:networkservices/httpRoute:HttpRoute default projects/{{project}}/locations/global/httpRoutes/{{name}}
$ pulumi import gcp:networkservices/httpRoute:HttpRoute default {{project}}/{{name}}
$ pulumi import gcp:networkservices/httpRoute:HttpRoute default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.