GatewayArgs

data class GatewayArgs(val description: Output<String>? = null, val destinationNetwork: Output<NetworkRefArgs>? = null, val gatewayResourceName: Output<String>? = null, val http: Output<List<HttpConfigArgs>>? = null, val location: Output<String>? = null, val resourceGroupName: Output<String>? = null, val sourceNetwork: Output<NetworkRefArgs>? = null, val tags: Output<Map<String, String>>? = null, val tcp: Output<List<TcpConfigArgs>>? = null) : ConvertibleToJava<GatewayArgs>

This type describes a gateway resource. API Version: 2018-09-01-preview.

Example Usage

CreateOrUpdateGateway

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var gateway = new AzureNative.ServiceFabricMesh.Gateway("gateway", new()
{
Description = "Service Fabric Mesh sample gateway.",
DestinationNetwork = new AzureNative.ServiceFabricMesh.Inputs.NetworkRefArgs
{
Name = "helloWorldNetwork",
},
GatewayResourceName = "sampleGateway",
Http = new[]
{
new AzureNative.ServiceFabricMesh.Inputs.HttpConfigArgs
{
Hosts = new[]
{
new AzureNative.ServiceFabricMesh.Inputs.HttpHostConfigArgs
{
Name = "contoso.com",
Routes = new[]
{
new AzureNative.ServiceFabricMesh.Inputs.HttpRouteConfigArgs
{
Destination = new AzureNative.ServiceFabricMesh.Inputs.GatewayDestinationArgs
{
ApplicationName = "httpHelloWorldApp",
EndpointName = "indexHttpEndpoint",
ServiceName = "indexService",
},
Match = new AzureNative.ServiceFabricMesh.Inputs.HttpRouteMatchRuleArgs
{
Headers = new[]
{
new AzureNative.ServiceFabricMesh.Inputs.HttpRouteMatchHeaderArgs
{
Name = "accept",
Type = "exact",
Value = "application/json",
},
},
Path = new AzureNative.ServiceFabricMesh.Inputs.HttpRouteMatchPathArgs
{
Rewrite = "/",
Type = "prefix",
Value = "/index",
},
},
Name = "index",
},
},
},
},
Name = "contosoWebsite",
Port = 8081,
},
},
Location = "EastUS",
ResourceGroupName = "sbz_demo",
SourceNetwork = new AzureNative.ServiceFabricMesh.Inputs.NetworkRefArgs
{
Name = "Open",
},
Tags = null,
Tcp = new[]
{
new AzureNative.ServiceFabricMesh.Inputs.TcpConfigArgs
{
Destination = new AzureNative.ServiceFabricMesh.Inputs.GatewayDestinationArgs
{
ApplicationName = "helloWorldApp",
EndpointName = "helloWorldListener",
ServiceName = "helloWorldService",
},
Name = "web",
Port = 80,
},
},
});
});
package main
import (
servicefabricmesh "github.com/pulumi/pulumi-azure-native-sdk/servicefabricmesh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicefabricmesh.NewGateway(ctx, "gateway", &servicefabricmesh.GatewayArgs{
Description: pulumi.String("Service Fabric Mesh sample gateway."),
DestinationNetwork: &servicefabricmesh.NetworkRefArgs{
Name: pulumi.String("helloWorldNetwork"),
},
GatewayResourceName: pulumi.String("sampleGateway"),
Http: []servicefabricmesh.HttpConfigArgs{
{
Hosts: servicefabricmesh.HttpHostConfigArray{
{
Name: pulumi.String("contoso.com"),
Routes: servicefabricmesh.HttpRouteConfigArray{
{
Destination: {
ApplicationName: pulumi.String("httpHelloWorldApp"),
EndpointName: pulumi.String("indexHttpEndpoint"),
ServiceName: pulumi.String("indexService"),
},
Match: {
Headers: servicefabricmesh.HttpRouteMatchHeaderArray{
{
Name: pulumi.String("accept"),
Type: pulumi.String("exact"),
Value: pulumi.String("application/json"),
},
},
Path: {
Rewrite: pulumi.String("/"),
Type: pulumi.String("prefix"),
Value: pulumi.String("/index"),
},
},
Name: pulumi.String("index"),
},
},
},
},
Name: pulumi.String("contosoWebsite"),
Port: pulumi.Int(8081),
},
},
Location: pulumi.String("EastUS"),
ResourceGroupName: pulumi.String("sbz_demo"),
SourceNetwork: &servicefabricmesh.NetworkRefArgs{
Name: pulumi.String("Open"),
},
Tags: nil,
Tcp: []servicefabricmesh.TcpConfigArgs{
{
Destination: {
ApplicationName: pulumi.String("helloWorldApp"),
EndpointName: pulumi.String("helloWorldListener"),
ServiceName: pulumi.String("helloWorldService"),
},
Name: pulumi.String("web"),
Port: pulumi.Int(80),
},
},
})
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.azurenative.servicefabricmesh.Gateway;
import com.pulumi.azurenative.servicefabricmesh.GatewayArgs;
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 gateway = new Gateway("gateway", GatewayArgs.builder()
.description("Service Fabric Mesh sample gateway.")
.destinationNetwork(Map.of("name", "helloWorldNetwork"))
.gatewayResourceName("sampleGateway")
.http(Map.ofEntries(
Map.entry("hosts", Map.ofEntries(
Map.entry("name", "contoso.com"),
Map.entry("routes", Map.ofEntries(
Map.entry("destination", Map.ofEntries(
Map.entry("applicationName", "httpHelloWorldApp"),
Map.entry("endpointName", "indexHttpEndpoint"),
Map.entry("serviceName", "indexService")
)),
Map.entry("match", Map.ofEntries(
Map.entry("headers", Map.ofEntries(
Map.entry("name", "accept"),
Map.entry("type", "exact"),
Map.entry("value", "application/json")
)),
Map.entry("path", Map.ofEntries(
Map.entry("rewrite", "/"),
Map.entry("type", "prefix"),
Map.entry("value", "/index")
))
)),
Map.entry("name", "index")
))
)),
Map.entry("name", "contosoWebsite"),
Map.entry("port", 8081)
))
.location("EastUS")
.resourceGroupName("sbz_demo")
.sourceNetwork(Map.of("name", "Open"))
.tags()
.tcp(Map.ofEntries(
Map.entry("destination", Map.ofEntries(
Map.entry("applicationName", "helloWorldApp"),
Map.entry("endpointName", "helloWorldListener"),
Map.entry("serviceName", "helloWorldService")
)),
Map.entry("name", "web"),
Map.entry("port", 80)
))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:servicefabricmesh:Gateway sampleGateway /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/gateways/sampleGateway

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, destinationNetwork: Output<NetworkRefArgs>? = null, gatewayResourceName: Output<String>? = null, http: Output<List<HttpConfigArgs>>? = null, location: Output<String>? = null, resourceGroupName: Output<String>? = null, sourceNetwork: Output<NetworkRefArgs>? = null, tags: Output<Map<String, String>>? = null, tcp: Output<List<TcpConfigArgs>>? = null)

Properties

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

User readable description of the gateway.

Link copied to clipboard
val destinationNetwork: Output<NetworkRefArgs>? = null

Network that the Application is using.

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

The identity of the gateway.

Link copied to clipboard
val http: Output<List<HttpConfigArgs>>? = null

Configuration for http connectivity for this gateway.

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

The geo-location where the resource lives

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

Azure resource group name

Link copied to clipboard
val sourceNetwork: Output<NetworkRefArgs>? = null

Network the gateway should listen on for requests.

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

Resource tags.

Link copied to clipboard
val tcp: Output<List<TcpConfigArgs>>? = null

Configuration for tcp connectivity for this gateway.

Functions

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