gcp.networkservices.GrpcRoute
Explore with Pulumi AI
Example Usage
Network Services Grpc Route Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networkservices.GrpcRoute("default", {
name: "my-grpc-route",
labels: {
foo: "bar",
},
description: "my description",
hostnames: ["example"],
rules: [{
matches: [{
headers: [{
key: "key",
value: "value",
}],
}],
action: {
retryPolicy: {
retryConditions: ["cancelled"],
numRetries: 1,
},
},
}],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networkservices.GrpcRoute("default",
name="my-grpc-route",
labels={
"foo": "bar",
},
description="my description",
hostnames=["example"],
rules=[gcp.networkservices.GrpcRouteRuleArgs(
matches=[gcp.networkservices.GrpcRouteRuleMatchArgs(
headers=[gcp.networkservices.GrpcRouteRuleMatchHeaderArgs(
key="key",
value="value",
)],
)],
action=gcp.networkservices.GrpcRouteRuleActionArgs(
retry_policy=gcp.networkservices.GrpcRouteRuleActionRetryPolicyArgs(
retry_conditions=["cancelled"],
num_retries=1,
),
),
)])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkservices.NewGrpcRoute(ctx, "default", &networkservices.GrpcRouteArgs{
Name: pulumi.String("my-grpc-route"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
Hostnames: pulumi.StringArray{
pulumi.String("example"),
},
Rules: networkservices.GrpcRouteRuleArray{
&networkservices.GrpcRouteRuleArgs{
Matches: networkservices.GrpcRouteRuleMatchArray{
&networkservices.GrpcRouteRuleMatchArgs{
Headers: networkservices.GrpcRouteRuleMatchHeaderArray{
&networkservices.GrpcRouteRuleMatchHeaderArgs{
Key: pulumi.String("key"),
Value: pulumi.String("value"),
},
},
},
},
Action: &networkservices.GrpcRouteRuleActionArgs{
RetryPolicy: &networkservices.GrpcRouteRuleActionRetryPolicyArgs{
RetryConditions: pulumi.StringArray{
pulumi.String("cancelled"),
},
NumRetries: pulumi.Int(1),
},
},
},
},
})
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.GrpcRoute("default", new()
{
Name = "my-grpc-route",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
Hostnames = new[]
{
"example",
},
Rules = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleArgs
{
Matches = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchArgs
{
Headers = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchHeaderArgs
{
Key = "key",
Value = "value",
},
},
},
},
Action = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionArgs
{
RetryPolicy = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionRetryPolicyArgs
{
RetryConditions = new[]
{
"cancelled",
},
NumRetries = 1,
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.GrpcRoute;
import com.pulumi.gcp.networkservices.GrpcRouteArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionRetryPolicyArgs;
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 GrpcRoute("default", GrpcRouteArgs.builder()
.name("my-grpc-route")
.labels(Map.of("foo", "bar"))
.description("my description")
.hostnames("example")
.rules(GrpcRouteRuleArgs.builder()
.matches(GrpcRouteRuleMatchArgs.builder()
.headers(GrpcRouteRuleMatchHeaderArgs.builder()
.key("key")
.value("value")
.build())
.build())
.action(GrpcRouteRuleActionArgs.builder()
.retryPolicy(GrpcRouteRuleActionRetryPolicyArgs.builder()
.retryConditions("cancelled")
.numRetries(1)
.build())
.build())
.build())
.build());
}
}
resources:
default:
type: gcp:networkservices:GrpcRoute
properties:
name: my-grpc-route
labels:
foo: bar
description: my description
hostnames:
- example
rules:
- matches:
- headers:
- key: key
value: value
action:
retryPolicy:
retryConditions:
- cancelled
numRetries: 1
Network Services Grpc Route Matches And Actions
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networkservices.GrpcRoute("default", {
name: "my-grpc-route",
labels: {
foo: "bar",
},
description: "my description",
hostnames: ["example"],
rules: [{
matches: [
{
headers: [{
key: "key",
value: "value",
}],
},
{
headers: [{
key: "key",
value: "value",
}],
method: {
grpcService: "foo",
grpcMethod: "bar",
caseSensitive: true,
},
},
],
action: {
faultInjectionPolicy: {
delay: {
fixedDelay: "1s",
percentage: 1,
},
abort: {
httpStatus: 500,
percentage: 1,
},
},
retryPolicy: {
retryConditions: ["cancelled"],
numRetries: 1,
},
},
}],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networkservices.GrpcRoute("default",
name="my-grpc-route",
labels={
"foo": "bar",
},
description="my description",
hostnames=["example"],
rules=[gcp.networkservices.GrpcRouteRuleArgs(
matches=[
gcp.networkservices.GrpcRouteRuleMatchArgs(
headers=[gcp.networkservices.GrpcRouteRuleMatchHeaderArgs(
key="key",
value="value",
)],
),
gcp.networkservices.GrpcRouteRuleMatchArgs(
headers=[gcp.networkservices.GrpcRouteRuleMatchHeaderArgs(
key="key",
value="value",
)],
method=gcp.networkservices.GrpcRouteRuleMatchMethodArgs(
grpc_service="foo",
grpc_method="bar",
case_sensitive=True,
),
),
],
action=gcp.networkservices.GrpcRouteRuleActionArgs(
fault_injection_policy=gcp.networkservices.GrpcRouteRuleActionFaultInjectionPolicyArgs(
delay=gcp.networkservices.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs(
fixed_delay="1s",
percentage=1,
),
abort=gcp.networkservices.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs(
http_status=500,
percentage=1,
),
),
retry_policy=gcp.networkservices.GrpcRouteRuleActionRetryPolicyArgs(
retry_conditions=["cancelled"],
num_retries=1,
),
),
)])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkservices.NewGrpcRoute(ctx, "default", &networkservices.GrpcRouteArgs{
Name: pulumi.String("my-grpc-route"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
Hostnames: pulumi.StringArray{
pulumi.String("example"),
},
Rules: networkservices.GrpcRouteRuleArray{
&networkservices.GrpcRouteRuleArgs{
Matches: networkservices.GrpcRouteRuleMatchArray{
&networkservices.GrpcRouteRuleMatchArgs{
Headers: networkservices.GrpcRouteRuleMatchHeaderArray{
&networkservices.GrpcRouteRuleMatchHeaderArgs{
Key: pulumi.String("key"),
Value: pulumi.String("value"),
},
},
},
&networkservices.GrpcRouteRuleMatchArgs{
Headers: networkservices.GrpcRouteRuleMatchHeaderArray{
&networkservices.GrpcRouteRuleMatchHeaderArgs{
Key: pulumi.String("key"),
Value: pulumi.String("value"),
},
},
Method: &networkservices.GrpcRouteRuleMatchMethodArgs{
GrpcService: pulumi.String("foo"),
GrpcMethod: pulumi.String("bar"),
CaseSensitive: pulumi.Bool(true),
},
},
},
Action: &networkservices.GrpcRouteRuleActionArgs{
FaultInjectionPolicy: &networkservices.GrpcRouteRuleActionFaultInjectionPolicyArgs{
Delay: &networkservices.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs{
FixedDelay: pulumi.String("1s"),
Percentage: pulumi.Int(1),
},
Abort: &networkservices.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs{
HttpStatus: pulumi.Int(500),
Percentage: pulumi.Int(1),
},
},
RetryPolicy: &networkservices.GrpcRouteRuleActionRetryPolicyArgs{
RetryConditions: pulumi.StringArray{
pulumi.String("cancelled"),
},
NumRetries: pulumi.Int(1),
},
},
},
},
})
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.GrpcRoute("default", new()
{
Name = "my-grpc-route",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
Hostnames = new[]
{
"example",
},
Rules = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleArgs
{
Matches = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchArgs
{
Headers = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchHeaderArgs
{
Key = "key",
Value = "value",
},
},
},
new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchArgs
{
Headers = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchHeaderArgs
{
Key = "key",
Value = "value",
},
},
Method = new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchMethodArgs
{
GrpcService = "foo",
GrpcMethod = "bar",
CaseSensitive = true,
},
},
},
Action = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionArgs
{
FaultInjectionPolicy = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionFaultInjectionPolicyArgs
{
Delay = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs
{
FixedDelay = "1s",
Percentage = 1,
},
Abort = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs
{
HttpStatus = 500,
Percentage = 1,
},
},
RetryPolicy = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionRetryPolicyArgs
{
RetryConditions = new[]
{
"cancelled",
},
NumRetries = 1,
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.GrpcRoute;
import com.pulumi.gcp.networkservices.GrpcRouteArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionFaultInjectionPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionRetryPolicyArgs;
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 GrpcRoute("default", GrpcRouteArgs.builder()
.name("my-grpc-route")
.labels(Map.of("foo", "bar"))
.description("my description")
.hostnames("example")
.rules(GrpcRouteRuleArgs.builder()
.matches(
GrpcRouteRuleMatchArgs.builder()
.headers(GrpcRouteRuleMatchHeaderArgs.builder()
.key("key")
.value("value")
.build())
.build(),
GrpcRouteRuleMatchArgs.builder()
.headers(GrpcRouteRuleMatchHeaderArgs.builder()
.key("key")
.value("value")
.build())
.method(GrpcRouteRuleMatchMethodArgs.builder()
.grpcService("foo")
.grpcMethod("bar")
.caseSensitive(true)
.build())
.build())
.action(GrpcRouteRuleActionArgs.builder()
.faultInjectionPolicy(GrpcRouteRuleActionFaultInjectionPolicyArgs.builder()
.delay(GrpcRouteRuleActionFaultInjectionPolicyDelayArgs.builder()
.fixedDelay("1s")
.percentage(1)
.build())
.abort(GrpcRouteRuleActionFaultInjectionPolicyAbortArgs.builder()
.httpStatus(500)
.percentage(1)
.build())
.build())
.retryPolicy(GrpcRouteRuleActionRetryPolicyArgs.builder()
.retryConditions("cancelled")
.numRetries(1)
.build())
.build())
.build())
.build());
}
}
resources:
default:
type: gcp:networkservices:GrpcRoute
properties:
name: my-grpc-route
labels:
foo: bar
description: my description
hostnames:
- example
rules:
- matches:
- headers:
- key: key
value: value
- headers:
- key: key
value: value
method:
grpcService: foo
grpcMethod: bar
caseSensitive: true
action:
faultInjectionPolicy:
delay:
fixedDelay: 1s
percentage: 1
abort:
httpStatus: 500
percentage: 1
retryPolicy:
retryConditions:
- cancelled
numRetries: 1
Network Services Grpc Route Actions
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networkservices.GrpcRoute("default", {
name: "my-grpc-route",
labels: {
foo: "bar",
},
description: "my description",
hostnames: ["example"],
rules: [{
action: {
faultInjectionPolicy: {
delay: {
fixedDelay: "1s",
percentage: 1,
},
abort: {
httpStatus: 500,
percentage: 1,
},
},
retryPolicy: {
retryConditions: ["cancelled"],
numRetries: 1,
},
},
}],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networkservices.GrpcRoute("default",
name="my-grpc-route",
labels={
"foo": "bar",
},
description="my description",
hostnames=["example"],
rules=[gcp.networkservices.GrpcRouteRuleArgs(
action=gcp.networkservices.GrpcRouteRuleActionArgs(
fault_injection_policy=gcp.networkservices.GrpcRouteRuleActionFaultInjectionPolicyArgs(
delay=gcp.networkservices.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs(
fixed_delay="1s",
percentage=1,
),
abort=gcp.networkservices.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs(
http_status=500,
percentage=1,
),
),
retry_policy=gcp.networkservices.GrpcRouteRuleActionRetryPolicyArgs(
retry_conditions=["cancelled"],
num_retries=1,
),
),
)])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkservices.NewGrpcRoute(ctx, "default", &networkservices.GrpcRouteArgs{
Name: pulumi.String("my-grpc-route"),
Labels: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
Description: pulumi.String("my description"),
Hostnames: pulumi.StringArray{
pulumi.String("example"),
},
Rules: networkservices.GrpcRouteRuleArray{
&networkservices.GrpcRouteRuleArgs{
Action: &networkservices.GrpcRouteRuleActionArgs{
FaultInjectionPolicy: &networkservices.GrpcRouteRuleActionFaultInjectionPolicyArgs{
Delay: &networkservices.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs{
FixedDelay: pulumi.String("1s"),
Percentage: pulumi.Int(1),
},
Abort: &networkservices.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs{
HttpStatus: pulumi.Int(500),
Percentage: pulumi.Int(1),
},
},
RetryPolicy: &networkservices.GrpcRouteRuleActionRetryPolicyArgs{
RetryConditions: pulumi.StringArray{
pulumi.String("cancelled"),
},
NumRetries: pulumi.Int(1),
},
},
},
},
})
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.GrpcRoute("default", new()
{
Name = "my-grpc-route",
Labels =
{
{ "foo", "bar" },
},
Description = "my description",
Hostnames = new[]
{
"example",
},
Rules = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleArgs
{
Action = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionArgs
{
FaultInjectionPolicy = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionFaultInjectionPolicyArgs
{
Delay = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs
{
FixedDelay = "1s",
Percentage = 1,
},
Abort = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs
{
HttpStatus = 500,
Percentage = 1,
},
},
RetryPolicy = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionRetryPolicyArgs
{
RetryConditions = new[]
{
"cancelled",
},
NumRetries = 1,
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networkservices.GrpcRoute;
import com.pulumi.gcp.networkservices.GrpcRouteArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionFaultInjectionPolicyArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionRetryPolicyArgs;
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 GrpcRoute("default", GrpcRouteArgs.builder()
.name("my-grpc-route")
.labels(Map.of("foo", "bar"))
.description("my description")
.hostnames("example")
.rules(GrpcRouteRuleArgs.builder()
.action(GrpcRouteRuleActionArgs.builder()
.faultInjectionPolicy(GrpcRouteRuleActionFaultInjectionPolicyArgs.builder()
.delay(GrpcRouteRuleActionFaultInjectionPolicyDelayArgs.builder()
.fixedDelay("1s")
.percentage(1)
.build())
.abort(GrpcRouteRuleActionFaultInjectionPolicyAbortArgs.builder()
.httpStatus(500)
.percentage(1)
.build())
.build())
.retryPolicy(GrpcRouteRuleActionRetryPolicyArgs.builder()
.retryConditions("cancelled")
.numRetries(1)
.build())
.build())
.build())
.build());
}
}
resources:
default:
type: gcp:networkservices:GrpcRoute
properties:
name: my-grpc-route
labels:
foo: bar
description: my description
hostnames:
- example
rules:
- action:
faultInjectionPolicy:
delay:
fixedDelay: 1s
percentage: 1
abort:
httpStatus: 500
percentage: 1
retryPolicy:
retryConditions:
- cancelled
numRetries: 1
Create GrpcRoute Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GrpcRoute(name: string, args: GrpcRouteArgs, opts?: CustomResourceOptions);
@overload
def GrpcRoute(resource_name: str,
args: GrpcRouteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GrpcRoute(resource_name: str,
opts: Optional[ResourceOptions] = None,
hostnames: Optional[Sequence[str]] = None,
rules: Optional[Sequence[GrpcRouteRuleArgs]] = 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 NewGrpcRoute(ctx *Context, name string, args GrpcRouteArgs, opts ...ResourceOption) (*GrpcRoute, error)
public GrpcRoute(string name, GrpcRouteArgs args, CustomResourceOptions? opts = null)
public GrpcRoute(String name, GrpcRouteArgs args)
public GrpcRoute(String name, GrpcRouteArgs args, CustomResourceOptions options)
type: gcp:networkservices:GrpcRoute
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 GrpcRouteArgs
- 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 GrpcRouteArgs
- 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 GrpcRouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GrpcRouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GrpcRouteArgs
- 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 grpcRouteResource = new Gcp.NetworkServices.GrpcRoute("grpcRouteResource", new()
{
Hostnames = new[]
{
"string",
},
Rules = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleArgs
{
Action = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionArgs
{
Destinations = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionDestinationArgs
{
ServiceName = "string",
Weight = 0,
},
},
FaultInjectionPolicy = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionFaultInjectionPolicyArgs
{
Abort = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs
{
HttpStatus = 0,
Percentage = 0,
},
Delay = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs
{
FixedDelay = "string",
Percentage = 0,
},
},
RetryPolicy = new Gcp.NetworkServices.Inputs.GrpcRouteRuleActionRetryPolicyArgs
{
NumRetries = 0,
RetryConditions = new[]
{
"string",
},
},
Timeout = "string",
},
Matches = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchArgs
{
Headers = new[]
{
new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchHeaderArgs
{
Key = "string",
Value = "string",
Type = "string",
},
},
Method = new Gcp.NetworkServices.Inputs.GrpcRouteRuleMatchMethodArgs
{
GrpcMethod = "string",
GrpcService = "string",
CaseSensitive = false,
},
},
},
},
},
Description = "string",
Gateways = new[]
{
"string",
},
Labels =
{
{ "string", "string" },
},
Meshes = new[]
{
"string",
},
Name = "string",
Project = "string",
});
example, err := networkservices.NewGrpcRoute(ctx, "grpcRouteResource", &networkservices.GrpcRouteArgs{
Hostnames: pulumi.StringArray{
pulumi.String("string"),
},
Rules: networkservices.GrpcRouteRuleArray{
&networkservices.GrpcRouteRuleArgs{
Action: &networkservices.GrpcRouteRuleActionArgs{
Destinations: networkservices.GrpcRouteRuleActionDestinationArray{
&networkservices.GrpcRouteRuleActionDestinationArgs{
ServiceName: pulumi.String("string"),
Weight: pulumi.Int(0),
},
},
FaultInjectionPolicy: &networkservices.GrpcRouteRuleActionFaultInjectionPolicyArgs{
Abort: &networkservices.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs{
HttpStatus: pulumi.Int(0),
Percentage: pulumi.Int(0),
},
Delay: &networkservices.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs{
FixedDelay: pulumi.String("string"),
Percentage: pulumi.Int(0),
},
},
RetryPolicy: &networkservices.GrpcRouteRuleActionRetryPolicyArgs{
NumRetries: pulumi.Int(0),
RetryConditions: pulumi.StringArray{
pulumi.String("string"),
},
},
Timeout: pulumi.String("string"),
},
Matches: networkservices.GrpcRouteRuleMatchArray{
&networkservices.GrpcRouteRuleMatchArgs{
Headers: networkservices.GrpcRouteRuleMatchHeaderArray{
&networkservices.GrpcRouteRuleMatchHeaderArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
Method: &networkservices.GrpcRouteRuleMatchMethodArgs{
GrpcMethod: pulumi.String("string"),
GrpcService: pulumi.String("string"),
CaseSensitive: pulumi.Bool(false),
},
},
},
},
},
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 grpcRouteResource = new GrpcRoute("grpcRouteResource", GrpcRouteArgs.builder()
.hostnames("string")
.rules(GrpcRouteRuleArgs.builder()
.action(GrpcRouteRuleActionArgs.builder()
.destinations(GrpcRouteRuleActionDestinationArgs.builder()
.serviceName("string")
.weight(0)
.build())
.faultInjectionPolicy(GrpcRouteRuleActionFaultInjectionPolicyArgs.builder()
.abort(GrpcRouteRuleActionFaultInjectionPolicyAbortArgs.builder()
.httpStatus(0)
.percentage(0)
.build())
.delay(GrpcRouteRuleActionFaultInjectionPolicyDelayArgs.builder()
.fixedDelay("string")
.percentage(0)
.build())
.build())
.retryPolicy(GrpcRouteRuleActionRetryPolicyArgs.builder()
.numRetries(0)
.retryConditions("string")
.build())
.timeout("string")
.build())
.matches(GrpcRouteRuleMatchArgs.builder()
.headers(GrpcRouteRuleMatchHeaderArgs.builder()
.key("string")
.value("string")
.type("string")
.build())
.method(GrpcRouteRuleMatchMethodArgs.builder()
.grpcMethod("string")
.grpcService("string")
.caseSensitive(false)
.build())
.build())
.build())
.description("string")
.gateways("string")
.labels(Map.of("string", "string"))
.meshes("string")
.name("string")
.project("string")
.build());
grpc_route_resource = gcp.networkservices.GrpcRoute("grpcRouteResource",
hostnames=["string"],
rules=[gcp.networkservices.GrpcRouteRuleArgs(
action=gcp.networkservices.GrpcRouteRuleActionArgs(
destinations=[gcp.networkservices.GrpcRouteRuleActionDestinationArgs(
service_name="string",
weight=0,
)],
fault_injection_policy=gcp.networkservices.GrpcRouteRuleActionFaultInjectionPolicyArgs(
abort=gcp.networkservices.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs(
http_status=0,
percentage=0,
),
delay=gcp.networkservices.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs(
fixed_delay="string",
percentage=0,
),
),
retry_policy=gcp.networkservices.GrpcRouteRuleActionRetryPolicyArgs(
num_retries=0,
retry_conditions=["string"],
),
timeout="string",
),
matches=[gcp.networkservices.GrpcRouteRuleMatchArgs(
headers=[gcp.networkservices.GrpcRouteRuleMatchHeaderArgs(
key="string",
value="string",
type="string",
)],
method=gcp.networkservices.GrpcRouteRuleMatchMethodArgs(
grpc_method="string",
grpc_service="string",
case_sensitive=False,
),
)],
)],
description="string",
gateways=["string"],
labels={
"string": "string",
},
meshes=["string"],
name="string",
project="string")
const grpcRouteResource = new gcp.networkservices.GrpcRoute("grpcRouteResource", {
hostnames: ["string"],
rules: [{
action: {
destinations: [{
serviceName: "string",
weight: 0,
}],
faultInjectionPolicy: {
abort: {
httpStatus: 0,
percentage: 0,
},
delay: {
fixedDelay: "string",
percentage: 0,
},
},
retryPolicy: {
numRetries: 0,
retryConditions: ["string"],
},
timeout: "string",
},
matches: [{
headers: [{
key: "string",
value: "string",
type: "string",
}],
method: {
grpcMethod: "string",
grpcService: "string",
caseSensitive: false,
},
}],
}],
description: "string",
gateways: ["string"],
labels: {
string: "string",
},
meshes: ["string"],
name: "string",
project: "string",
});
type: gcp:networkservices:GrpcRoute
properties:
description: string
gateways:
- string
hostnames:
- string
labels:
string: string
meshes:
- string
name: string
project: string
rules:
- action:
destinations:
- serviceName: string
weight: 0
faultInjectionPolicy:
abort:
httpStatus: 0
percentage: 0
delay:
fixedDelay: string
percentage: 0
retryPolicy:
numRetries: 0
retryConditions:
- string
timeout: string
matches:
- headers:
- key: string
type: string
value: string
method:
caseSensitive: false
grpcMethod: string
grpcService: string
GrpcRoute 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 GrpcRoute resource accepts the following input properties:
- Hostnames List<string>
- Required. Service hostnames with an optional port for which this route describes traffic.
- Rules
List<Grpc
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>
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- Labels Dictionary<string, string>
- Set of label tags associated with the GrpcRoute 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>
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- Name string
- Name of the GrpcRoute resource.
- Project string
- Hostnames []string
- Required. Service hostnames with an optional port for which this route describes traffic.
- Rules
[]Grpc
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
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- Labels map[string]string
- Set of label tags associated with the GrpcRoute 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
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- Name string
- Name of the GrpcRoute resource.
- Project string
- hostnames List<String>
- Required. Service hostnames with an optional port for which this route describes traffic.
- rules
List<Grpc
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>
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- labels Map<String,String>
- Set of label tags associated with the GrpcRoute 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>
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- name String
- Name of the GrpcRoute resource.
- project String
- hostnames string[]
- Required. Service hostnames with an optional port for which this route describes traffic.
- rules
Grpc
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[]
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- labels {[key: string]: string}
- Set of label tags associated with the GrpcRoute 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[]
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- name string
- Name of the GrpcRoute resource.
- project string
- hostnames Sequence[str]
- Required. Service hostnames with an optional port for which this route describes traffic.
- rules
Sequence[Grpc
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]
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- labels Mapping[str, str]
- Set of label tags associated with the GrpcRoute 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]
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- name str
- Name of the GrpcRoute resource.
- project str
- hostnames List<String>
- Required. Service hostnames with an optional port for which this route describes traffic.
- 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>
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- labels Map<String>
- Set of label tags associated with the GrpcRoute 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>
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- name String
- Name of the GrpcRoute resource.
- project String
Outputs
All input properties are implicitly available as output properties. Additionally, the GrpcRoute resource produces the following output properties:
- Create
Time string - Time the GrpcRoute 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 GrpcRoute was updated in UTC.
- Create
Time string - Time the GrpcRoute 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 GrpcRoute was updated in UTC.
- create
Time String - Time the GrpcRoute 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 GrpcRoute was updated in UTC.
- create
Time string - Time the GrpcRoute 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 GrpcRoute was updated in UTC.
- create_
time str - Time the GrpcRoute 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 GrpcRoute was updated in UTC.
- create
Time String - Time the GrpcRoute 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 GrpcRoute was updated in UTC.
Look up Existing GrpcRoute Resource
Get an existing GrpcRoute 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?: GrpcRouteState, opts?: CustomResourceOptions): GrpcRoute
@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[GrpcRouteRuleArgs]] = None,
self_link: Optional[str] = None,
update_time: Optional[str] = None) -> GrpcRoute
func GetGrpcRoute(ctx *Context, name string, id IDInput, state *GrpcRouteState, opts ...ResourceOption) (*GrpcRoute, error)
public static GrpcRoute Get(string name, Input<string> id, GrpcRouteState? state, CustomResourceOptions? opts = null)
public static GrpcRoute get(String name, Output<String> id, GrpcRouteState 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 GrpcRoute 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>
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- Hostnames List<string>
- Required. Service hostnames with an optional port for which this route describes traffic.
- Labels Dictionary<string, string>
- Set of label tags associated with the GrpcRoute 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>
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- Name string
- Name of the GrpcRoute 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<Grpc
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 GrpcRoute was updated in UTC.
- Create
Time string - Time the GrpcRoute 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
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- Hostnames []string
- Required. Service hostnames with an optional port for which this route describes traffic.
- Labels map[string]string
- Set of label tags associated with the GrpcRoute 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
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- Name string
- Name of the GrpcRoute 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
[]Grpc
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 GrpcRoute was updated in UTC.
- create
Time String - Time the GrpcRoute 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>
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- hostnames List<String>
- Required. Service hostnames with an optional port for which this route describes traffic.
- labels Map<String,String>
- Set of label tags associated with the GrpcRoute 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>
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- name String
- Name of the GrpcRoute 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<Grpc
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 GrpcRoute was updated in UTC.
- create
Time string - Time the GrpcRoute 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[]
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- hostnames string[]
- Required. Service hostnames with an optional port for which this route describes traffic.
- labels {[key: string]: string}
- Set of label tags associated with the GrpcRoute 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[]
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- name string
- Name of the GrpcRoute 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
Grpc
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 GrpcRoute was updated in UTC.
- create_
time str - Time the GrpcRoute 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]
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- hostnames Sequence[str]
- Required. Service hostnames with an optional port for which this route describes traffic.
- labels Mapping[str, str]
- Set of label tags associated with the GrpcRoute 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]
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- name str
- Name of the GrpcRoute 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[Grpc
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 GrpcRoute was updated in UTC.
- create
Time String - Time the GrpcRoute 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>
- List of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway.
- hostnames List<String>
- Required. Service hostnames with an optional port for which this route describes traffic.
- labels Map<String>
- Set of label tags associated with the GrpcRoute 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>
- List of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh.
- name String
- Name of the GrpcRoute 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 GrpcRoute was updated in UTC.
Supporting Types
GrpcRouteRule, GrpcRouteRuleArgs
- Action
Grpc
Route Rule Action - Required. A detailed rule defining how to route traffic. Structure is documented below.
- Matches
List<Grpc
Route Rule Match> - Matches define conditions used for matching the rule against incoming gRPC requests. Structure is documented below.
- Action
Grpc
Route Rule Action - Required. A detailed rule defining how to route traffic. Structure is documented below.
- Matches
[]Grpc
Route Rule Match - Matches define conditions used for matching the rule against incoming gRPC requests. Structure is documented below.
- action
Grpc
Route Rule Action - Required. A detailed rule defining how to route traffic. Structure is documented below.
- matches
List<Grpc
Route Rule Match> - Matches define conditions used for matching the rule against incoming gRPC requests. Structure is documented below.
- action
Grpc
Route Rule Action - Required. A detailed rule defining how to route traffic. Structure is documented below.
- matches
Grpc
Route Rule Match[] - Matches define conditions used for matching the rule against incoming gRPC requests. Structure is documented below.
- action
Grpc
Route Rule Action - Required. A detailed rule defining how to route traffic. Structure is documented below.
- matches
Sequence[Grpc
Route Rule Match] - Matches define conditions used for matching the rule against incoming gRPC requests. Structure is documented below.
- action Property Map
- Required. A detailed rule defining how to route traffic. Structure is documented below.
- matches List<Property Map>
- Matches define conditions used for matching the rule against incoming gRPC requests. Structure is documented below.
GrpcRouteRuleAction, GrpcRouteRuleActionArgs
- Destinations
List<Grpc
Route Rule Action Destination> - The destination to which traffic should be forwarded. Structure is documented below.
- Fault
Injection GrpcPolicy 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.
- Retry
Policy GrpcRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- Timeout string
- Specifies the timeout for selected route.
- Destinations
[]Grpc
Route Rule Action Destination - The destination to which traffic should be forwarded. Structure is documented below.
- Fault
Injection GrpcPolicy 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.
- Retry
Policy GrpcRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- Timeout string
- Specifies the timeout for selected route.
- destinations
List<Grpc
Route Rule Action Destination> - The destination to which traffic should be forwarded. Structure is documented below.
- fault
Injection GrpcPolicy 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.
- retry
Policy GrpcRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- timeout String
- Specifies the timeout for selected route.
- destinations
Grpc
Route Rule Action Destination[] - The destination to which traffic should be forwarded. Structure is documented below.
- fault
Injection GrpcPolicy 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.
- retry
Policy GrpcRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- timeout string
- Specifies the timeout for selected route.
- destinations
Sequence[Grpc
Route Rule Action Destination] - The destination to which traffic should be forwarded. Structure is documented below.
- fault_
injection_ Grpcpolicy 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.
- retry_
policy GrpcRoute Rule Action Retry Policy - Specifies the retry policy associated with this route. Structure is documented below.
- timeout str
- Specifies the timeout for selected route.
- 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.
- retry
Policy Property Map - Specifies the retry policy associated with this route. Structure is documented below.
- timeout String
- Specifies the timeout for selected route.
GrpcRouteRuleActionDestination, GrpcRouteRuleActionDestinationArgs
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
GrpcRouteRuleActionFaultInjectionPolicy, GrpcRouteRuleActionFaultInjectionPolicyArgs
- Abort
Grpc
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
Grpc
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
Grpc
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
Grpc
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
Grpc
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
Grpc
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
Grpc
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
Grpc
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
Grpc
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
Grpc
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.
GrpcRouteRuleActionFaultInjectionPolicyAbort, GrpcRouteRuleActionFaultInjectionPolicyAbortArgs
- 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.
GrpcRouteRuleActionFaultInjectionPolicyDelay, GrpcRouteRuleActionFaultInjectionPolicyDelayArgs
- 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.
GrpcRouteRuleActionRetryPolicy, GrpcRouteRuleActionRetryPolicyArgs
- Num
Retries int - Specifies the allowed number of retries.
- Retry
Conditions List<string> - Specifies one or more conditions when this retry policy applies.
Each value may be one of:
connect-failure
,refused-stream
,cancelled
,deadline-exceeded
,resource-exhausted
,unavailable
.
- Num
Retries int - Specifies the allowed number of retries.
- Retry
Conditions []string - Specifies one or more conditions when this retry policy applies.
Each value may be one of:
connect-failure
,refused-stream
,cancelled
,deadline-exceeded
,resource-exhausted
,unavailable
.
- num
Retries Integer - Specifies the allowed number of retries.
- retry
Conditions List<String> - Specifies one or more conditions when this retry policy applies.
Each value may be one of:
connect-failure
,refused-stream
,cancelled
,deadline-exceeded
,resource-exhausted
,unavailable
.
- num
Retries number - Specifies the allowed number of retries.
- retry
Conditions string[] - Specifies one or more conditions when this retry policy applies.
Each value may be one of:
connect-failure
,refused-stream
,cancelled
,deadline-exceeded
,resource-exhausted
,unavailable
.
- num_
retries int - Specifies the allowed number of retries.
- retry_
conditions Sequence[str] - Specifies one or more conditions when this retry policy applies.
Each value may be one of:
connect-failure
,refused-stream
,cancelled
,deadline-exceeded
,resource-exhausted
,unavailable
.
- num
Retries Number - Specifies the allowed number of retries.
- retry
Conditions List<String> - Specifies one or more conditions when this retry policy applies.
Each value may be one of:
connect-failure
,refused-stream
,cancelled
,deadline-exceeded
,resource-exhausted
,unavailable
.
GrpcRouteRuleMatch, GrpcRouteRuleMatchArgs
- Headers
List<Grpc
Route Rule Match Header> - Specifies a list of HTTP request headers to match against. Structure is documented below.
- Method
Grpc
Route Rule Match Method - A gRPC method to match against. If this field is empty or omitted, will match all methods. Structure is documented below.
- Headers
[]Grpc
Route Rule Match Header - Specifies a list of HTTP request headers to match against. Structure is documented below.
- Method
Grpc
Route Rule Match Method - A gRPC method to match against. If this field is empty or omitted, will match all methods. Structure is documented below.
- headers
List<Grpc
Route Rule Match Header> - Specifies a list of HTTP request headers to match against. Structure is documented below.
- method
Grpc
Route Rule Match Method - A gRPC method to match against. If this field is empty or omitted, will match all methods. Structure is documented below.
- headers
Grpc
Route Rule Match Header[] - Specifies a list of HTTP request headers to match against. Structure is documented below.
- method
Grpc
Route Rule Match Method - A gRPC method to match against. If this field is empty or omitted, will match all methods. Structure is documented below.
- headers
Sequence[Grpc
Route Rule Match Header] - Specifies a list of HTTP request headers to match against. Structure is documented below.
- method
Grpc
Route Rule Match Method - A gRPC method to match against. If this field is empty or omitted, will match all methods. Structure is documented below.
- headers List<Property Map>
- Specifies a list of HTTP request headers to match against. Structure is documented below.
- method Property Map
- A gRPC method to match against. If this field is empty or omitted, will match all methods. Structure is documented below.
GrpcRouteRuleMatchHeader, GrpcRouteRuleMatchHeaderArgs
GrpcRouteRuleMatchMethod, GrpcRouteRuleMatchMethodArgs
- Grpc
Method string - Required. Name of the method to match against.
- Grpc
Service string - Required. Name of the service to match against.
- Case
Sensitive bool - Specifies that matches are case sensitive. The default value is true.
- Grpc
Method string - Required. Name of the method to match against.
- Grpc
Service string - Required. Name of the service to match against.
- Case
Sensitive bool - Specifies that matches are case sensitive. The default value is true.
- grpc
Method String - Required. Name of the method to match against.
- grpc
Service String - Required. Name of the service to match against.
- case
Sensitive Boolean - Specifies that matches are case sensitive. The default value is true.
- grpc
Method string - Required. Name of the method to match against.
- grpc
Service string - Required. Name of the service to match against.
- case
Sensitive boolean - Specifies that matches are case sensitive. The default value is true.
- grpc_
method str - Required. Name of the method to match against.
- grpc_
service str - Required. Name of the service to match against.
- case_
sensitive bool - Specifies that matches are case sensitive. The default value is true.
- grpc
Method String - Required. Name of the method to match against.
- grpc
Service String - Required. Name of the service to match against.
- case
Sensitive Boolean - Specifies that matches are case sensitive. The default value is true.
Import
GrpcRoute can be imported using any of these accepted formats:
projects/{{project}}/locations/global/grpcRoutes/{{name}}
{{project}}/{{name}}
{{name}}
When using the pulumi import
command, GrpcRoute can be imported using one of the formats above. For example:
$ pulumi import gcp:networkservices/grpcRoute:GrpcRoute default projects/{{project}}/locations/global/grpcRoutes/{{name}}
$ pulumi import gcp:networkservices/grpcRoute:GrpcRoute default {{project}}/{{name}}
$ pulumi import gcp:networkservices/grpcRoute:GrpcRoute 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.