GatewayRouteArgs

data class GatewayRouteArgs(val meshName: Output<String>? = null, val meshOwner: Output<String>? = null, val name: Output<String>? = null, val spec: Output<GatewayRouteSpecArgs>? = null, val tags: Output<Map<String, String>>? = null, val virtualGatewayName: Output<String>? = null) : ConvertibleToJava<GatewayRouteArgs>

Provides an AWS App Mesh gateway route resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.appmesh.GatewayRoute("example", {
name: "example-gateway-route",
meshName: "example-service-mesh",
virtualGatewayName: exampleAwsAppmeshVirtualGateway.name,
spec: {
httpRoute: {
action: {
target: {
virtualService: {
virtualServiceName: exampleAwsAppmeshVirtualService.name,
},
},
},
match: {
prefix: "/",
},
},
},
tags: {
Environment: "test",
},
});
import pulumi
import pulumi_aws as aws
example = aws.appmesh.GatewayRoute("example",
name="example-gateway-route",
mesh_name="example-service-mesh",
virtual_gateway_name=example_aws_appmesh_virtual_gateway["name"],
spec={
"http_route": {
"action": {
"target": {
"virtual_service": {
"virtual_service_name": example_aws_appmesh_virtual_service["name"],
},
},
},
"match": {
"prefix": "/",
},
},
},
tags={
"Environment": "test",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.AppMesh.GatewayRoute("example", new()
{
Name = "example-gateway-route",
MeshName = "example-service-mesh",
VirtualGatewayName = exampleAwsAppmeshVirtualGateway.Name,
Spec = new Aws.AppMesh.Inputs.GatewayRouteSpecArgs
{
HttpRoute = new Aws.AppMesh.Inputs.GatewayRouteSpecHttpRouteArgs
{
Action = new Aws.AppMesh.Inputs.GatewayRouteSpecHttpRouteActionArgs
{
Target = new Aws.AppMesh.Inputs.GatewayRouteSpecHttpRouteActionTargetArgs
{
VirtualService = new Aws.AppMesh.Inputs.GatewayRouteSpecHttpRouteActionTargetVirtualServiceArgs
{
VirtualServiceName = exampleAwsAppmeshVirtualService.Name,
},
},
},
Match = new Aws.AppMesh.Inputs.GatewayRouteSpecHttpRouteMatchArgs
{
Prefix = "/",
},
},
},
Tags =
{
{ "Environment", "test" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appmesh.NewGatewayRoute(ctx, "example", &appmesh.GatewayRouteArgs{
Name: pulumi.String("example-gateway-route"),
MeshName: pulumi.String("example-service-mesh"),
VirtualGatewayName: pulumi.Any(exampleAwsAppmeshVirtualGateway.Name),
Spec: &appmesh.GatewayRouteSpecArgs{
HttpRoute: &appmesh.GatewayRouteSpecHttpRouteArgs{
Action: &appmesh.GatewayRouteSpecHttpRouteActionArgs{
Target: &appmesh.GatewayRouteSpecHttpRouteActionTargetArgs{
VirtualService: &appmesh.GatewayRouteSpecHttpRouteActionTargetVirtualServiceArgs{
VirtualServiceName: pulumi.Any(exampleAwsAppmeshVirtualService.Name),
},
},
},
Match: &appmesh.GatewayRouteSpecHttpRouteMatchArgs{
Prefix: pulumi.String("/"),
},
},
},
Tags: pulumi.StringMap{
"Environment": pulumi.String("test"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appmesh.GatewayRoute;
import com.pulumi.aws.appmesh.GatewayRouteArgs;
import com.pulumi.aws.appmesh.inputs.GatewayRouteSpecArgs;
import com.pulumi.aws.appmesh.inputs.GatewayRouteSpecHttpRouteArgs;
import com.pulumi.aws.appmesh.inputs.GatewayRouteSpecHttpRouteActionArgs;
import com.pulumi.aws.appmesh.inputs.GatewayRouteSpecHttpRouteActionTargetArgs;
import com.pulumi.aws.appmesh.inputs.GatewayRouteSpecHttpRouteActionTargetVirtualServiceArgs;
import com.pulumi.aws.appmesh.inputs.GatewayRouteSpecHttpRouteMatchArgs;
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 example = new GatewayRoute("example", GatewayRouteArgs.builder()
.name("example-gateway-route")
.meshName("example-service-mesh")
.virtualGatewayName(exampleAwsAppmeshVirtualGateway.name())
.spec(GatewayRouteSpecArgs.builder()
.httpRoute(GatewayRouteSpecHttpRouteArgs.builder()
.action(GatewayRouteSpecHttpRouteActionArgs.builder()
.target(GatewayRouteSpecHttpRouteActionTargetArgs.builder()
.virtualService(GatewayRouteSpecHttpRouteActionTargetVirtualServiceArgs.builder()
.virtualServiceName(exampleAwsAppmeshVirtualService.name())
.build())
.build())
.build())
.match(GatewayRouteSpecHttpRouteMatchArgs.builder()
.prefix("/")
.build())
.build())
.build())
.tags(Map.of("Environment", "test"))
.build());
}
}
resources:
example:
type: aws:appmesh:GatewayRoute
properties:
name: example-gateway-route
meshName: example-service-mesh
virtualGatewayName: ${exampleAwsAppmeshVirtualGateway.name}
spec:
httpRoute:
action:
target:
virtualService:
virtualServiceName: ${exampleAwsAppmeshVirtualService.name}
match:
prefix: /
tags:
Environment: test

Import

Using pulumi import, import App Mesh gateway routes using mesh_name and virtual_gateway_name together with the gateway route's name. For example:

$ pulumi import aws:appmesh/gatewayRoute:GatewayRoute example mesh/gw1/example-gateway-route

Constructors

Link copied to clipboard
constructor(meshName: Output<String>? = null, meshOwner: Output<String>? = null, name: Output<String>? = null, spec: Output<GatewayRouteSpecArgs>? = null, tags: Output<Map<String, String>>? = null, virtualGatewayName: Output<String>? = null)

Properties

Link copied to clipboard
val meshName: Output<String>? = null

Name of the service mesh in which to create the gateway route. Must be between 1 and 255 characters in length.

Link copied to clipboard
val meshOwner: Output<String>? = null

AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.

Link copied to clipboard
val name: Output<String>? = null

Name to use for the gateway route. Must be between 1 and 255 characters in length.

Link copied to clipboard
val spec: Output<GatewayRouteSpecArgs>? = null

Gateway route specification to apply.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val virtualGatewayName: Output<String>? = null

Name of the virtual gateway to associate the gateway route with. Must be between 1 and 255 characters in length.

Functions

Link copied to clipboard
open override fun toJava(): GatewayRouteArgs