azure.appservice.WebAppHybridConnection

Manages a Web App Hybrid Connection.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleServicePlan = new Azure.AppService.ServicePlan("exampleServicePlan", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        OsType = "Windows",
        SkuName = "S1",
    });

    var exampleNamespace = new Azure.Relay.Namespace("exampleNamespace", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        SkuName = "Standard",
    });

    var exampleHybridConnection = new Azure.Relay.HybridConnection("exampleHybridConnection", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        RelayNamespaceName = exampleNamespace.Name,
    });

    var exampleWindowsWebApp = new Azure.AppService.WindowsWebApp("exampleWindowsWebApp", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        ServicePlanId = exampleServicePlan.Id,
        SiteConfig = null,
    });

    var exampleWebAppHybridConnection = new Azure.AppService.WebAppHybridConnection("exampleWebAppHybridConnection", new()
    {
        WebAppId = exampleWindowsWebApp.Id,
        RelayId = exampleHybridConnection.Id,
        Hostname = "myhostname.example",
        Port = 8081,
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/relay"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleServicePlan, err := appservice.NewServicePlan(ctx, "exampleServicePlan", &appservice.ServicePlanArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			OsType:            pulumi.String("Windows"),
			SkuName:           pulumi.String("S1"),
		})
		if err != nil {
			return err
		}
		exampleNamespace, err := relay.NewNamespace(ctx, "exampleNamespace", &relay.NamespaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			SkuName:           pulumi.String("Standard"),
		})
		if err != nil {
			return err
		}
		exampleHybridConnection, err := relay.NewHybridConnection(ctx, "exampleHybridConnection", &relay.HybridConnectionArgs{
			ResourceGroupName:  exampleResourceGroup.Name,
			RelayNamespaceName: exampleNamespace.Name,
		})
		if err != nil {
			return err
		}
		exampleWindowsWebApp, err := appservice.NewWindowsWebApp(ctx, "exampleWindowsWebApp", &appservice.WindowsWebAppArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			ServicePlanId:     exampleServicePlan.ID(),
			SiteConfig:        nil,
		})
		if err != nil {
			return err
		}
		_, err = appservice.NewWebAppHybridConnection(ctx, "exampleWebAppHybridConnection", &appservice.WebAppHybridConnectionArgs{
			WebAppId: exampleWindowsWebApp.ID(),
			RelayId:  exampleHybridConnection.ID(),
			Hostname: pulumi.String("myhostname.example"),
			Port:     pulumi.Int(8081),
		})
		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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appservice.ServicePlan;
import com.pulumi.azure.appservice.ServicePlanArgs;
import com.pulumi.azure.relay.Namespace;
import com.pulumi.azure.relay.NamespaceArgs;
import com.pulumi.azure.relay.HybridConnection;
import com.pulumi.azure.relay.HybridConnectionArgs;
import com.pulumi.azure.appservice.WindowsWebApp;
import com.pulumi.azure.appservice.WindowsWebAppArgs;
import com.pulumi.azure.appservice.inputs.WindowsWebAppSiteConfigArgs;
import com.pulumi.azure.appservice.WebAppHybridConnection;
import com.pulumi.azure.appservice.WebAppHybridConnectionArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .osType("Windows")
            .skuName("S1")
            .build());

        var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .skuName("Standard")
            .build());

        var exampleHybridConnection = new HybridConnection("exampleHybridConnection", HybridConnectionArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .relayNamespaceName(exampleNamespace.name())
            .build());

        var exampleWindowsWebApp = new WindowsWebApp("exampleWindowsWebApp", WindowsWebAppArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .servicePlanId(exampleServicePlan.id())
            .siteConfig()
            .build());

        var exampleWebAppHybridConnection = new WebAppHybridConnection("exampleWebAppHybridConnection", WebAppHybridConnectionArgs.builder()        
            .webAppId(exampleWindowsWebApp.id())
            .relayId(exampleHybridConnection.id())
            .hostname("myhostname.example")
            .port(8081)
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_service_plan = azure.appservice.ServicePlan("exampleServicePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    os_type="Windows",
    sku_name="S1")
example_namespace = azure.relay.Namespace("exampleNamespace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku_name="Standard")
example_hybrid_connection = azure.relay.HybridConnection("exampleHybridConnection",
    resource_group_name=example_resource_group.name,
    relay_namespace_name=example_namespace.name)
example_windows_web_app = azure.appservice.WindowsWebApp("exampleWindowsWebApp",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    service_plan_id=example_service_plan.id,
    site_config=azure.appservice.WindowsWebAppSiteConfigArgs())
example_web_app_hybrid_connection = azure.appservice.WebAppHybridConnection("exampleWebAppHybridConnection",
    web_app_id=example_windows_web_app.id,
    relay_id=example_hybrid_connection.id,
    hostname="myhostname.example",
    port=8081)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleServicePlan = new azure.appservice.ServicePlan("exampleServicePlan", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    osType: "Windows",
    skuName: "S1",
});
const exampleNamespace = new azure.relay.Namespace("exampleNamespace", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    skuName: "Standard",
});
const exampleHybridConnection = new azure.relay.HybridConnection("exampleHybridConnection", {
    resourceGroupName: exampleResourceGroup.name,
    relayNamespaceName: exampleNamespace.name,
});
const exampleWindowsWebApp = new azure.appservice.WindowsWebApp("exampleWindowsWebApp", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    servicePlanId: exampleServicePlan.id,
    siteConfig: {},
});
const exampleWebAppHybridConnection = new azure.appservice.WebAppHybridConnection("exampleWebAppHybridConnection", {
    webAppId: exampleWindowsWebApp.id,
    relayId: exampleHybridConnection.id,
    hostname: "myhostname.example",
    port: 8081,
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleServicePlan:
    type: azure:appservice:ServicePlan
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      osType: Windows
      skuName: S1
  exampleNamespace:
    type: azure:relay:Namespace
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      skuName: Standard
  exampleHybridConnection:
    type: azure:relay:HybridConnection
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      relayNamespaceName: ${exampleNamespace.name}
  exampleWindowsWebApp:
    type: azure:appservice:WindowsWebApp
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      servicePlanId: ${exampleServicePlan.id}
      siteConfig: {}
  exampleWebAppHybridConnection:
    type: azure:appservice:WebAppHybridConnection
    properties:
      webAppId: ${exampleWindowsWebApp.id}
      relayId: ${exampleHybridConnection.id}
      hostname: myhostname.example
      port: 8081

Create WebAppHybridConnection Resource

new WebAppHybridConnection(name: string, args: WebAppHybridConnectionArgs, opts?: CustomResourceOptions);
@overload
def WebAppHybridConnection(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           hostname: Optional[str] = None,
                           port: Optional[int] = None,
                           relay_id: Optional[str] = None,
                           send_key_name: Optional[str] = None,
                           web_app_id: Optional[str] = None)
@overload
def WebAppHybridConnection(resource_name: str,
                           args: WebAppHybridConnectionArgs,
                           opts: Optional[ResourceOptions] = None)
func NewWebAppHybridConnection(ctx *Context, name string, args WebAppHybridConnectionArgs, opts ...ResourceOption) (*WebAppHybridConnection, error)
public WebAppHybridConnection(string name, WebAppHybridConnectionArgs args, CustomResourceOptions? opts = null)
public WebAppHybridConnection(String name, WebAppHybridConnectionArgs args)
public WebAppHybridConnection(String name, WebAppHybridConnectionArgs args, CustomResourceOptions options)
type: azure:appservice:WebAppHybridConnection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args WebAppHybridConnectionArgs
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 WebAppHybridConnectionArgs
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 WebAppHybridConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args WebAppHybridConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args WebAppHybridConnectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

WebAppHybridConnection 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 WebAppHybridConnection resource accepts the following input properties:

Hostname string

The hostname of the endpoint.

Port int

The port to use for the endpoint.

RelayId string

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

WebAppId string

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

SendKeyName string

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

Hostname string

The hostname of the endpoint.

Port int

The port to use for the endpoint.

RelayId string

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

WebAppId string

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

SendKeyName string

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

hostname String

The hostname of the endpoint.

port Integer

The port to use for the endpoint.

relayId String

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

webAppId String

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

sendKeyName String

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

hostname string

The hostname of the endpoint.

port number

The port to use for the endpoint.

relayId string

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

webAppId string

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

sendKeyName string

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

hostname str

The hostname of the endpoint.

port int

The port to use for the endpoint.

relay_id str

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

web_app_id str

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

send_key_name str

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

hostname String

The hostname of the endpoint.

port Number

The port to use for the endpoint.

relayId String

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

webAppId String

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

sendKeyName String

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

Outputs

All input properties are implicitly available as output properties. Additionally, the WebAppHybridConnection resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

NamespaceName string

The name of the Relay Namespace.

RelayName string

The name of the Relay in use.

SendKeyValue string

The Primary Access Key for the send_key_name

ServiceBusNamespace string

The Service Bus Namespace.

ServiceBusSuffix string

The suffix for the endpoint.

Id string

The provider-assigned unique ID for this managed resource.

NamespaceName string

The name of the Relay Namespace.

RelayName string

The name of the Relay in use.

SendKeyValue string

The Primary Access Key for the send_key_name

ServiceBusNamespace string

The Service Bus Namespace.

ServiceBusSuffix string

The suffix for the endpoint.

id String

The provider-assigned unique ID for this managed resource.

namespaceName String

The name of the Relay Namespace.

relayName String

The name of the Relay in use.

sendKeyValue String

The Primary Access Key for the send_key_name

serviceBusNamespace String

The Service Bus Namespace.

serviceBusSuffix String

The suffix for the endpoint.

id string

The provider-assigned unique ID for this managed resource.

namespaceName string

The name of the Relay Namespace.

relayName string

The name of the Relay in use.

sendKeyValue string

The Primary Access Key for the send_key_name

serviceBusNamespace string

The Service Bus Namespace.

serviceBusSuffix string

The suffix for the endpoint.

id str

The provider-assigned unique ID for this managed resource.

namespace_name str

The name of the Relay Namespace.

relay_name str

The name of the Relay in use.

send_key_value str

The Primary Access Key for the send_key_name

service_bus_namespace str

The Service Bus Namespace.

service_bus_suffix str

The suffix for the endpoint.

id String

The provider-assigned unique ID for this managed resource.

namespaceName String

The name of the Relay Namespace.

relayName String

The name of the Relay in use.

sendKeyValue String

The Primary Access Key for the send_key_name

serviceBusNamespace String

The Service Bus Namespace.

serviceBusSuffix String

The suffix for the endpoint.

Look up Existing WebAppHybridConnection Resource

Get an existing WebAppHybridConnection 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?: WebAppHybridConnectionState, opts?: CustomResourceOptions): WebAppHybridConnection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        hostname: Optional[str] = None,
        namespace_name: Optional[str] = None,
        port: Optional[int] = None,
        relay_id: Optional[str] = None,
        relay_name: Optional[str] = None,
        send_key_name: Optional[str] = None,
        send_key_value: Optional[str] = None,
        service_bus_namespace: Optional[str] = None,
        service_bus_suffix: Optional[str] = None,
        web_app_id: Optional[str] = None) -> WebAppHybridConnection
func GetWebAppHybridConnection(ctx *Context, name string, id IDInput, state *WebAppHybridConnectionState, opts ...ResourceOption) (*WebAppHybridConnection, error)
public static WebAppHybridConnection Get(string name, Input<string> id, WebAppHybridConnectionState? state, CustomResourceOptions? opts = null)
public static WebAppHybridConnection get(String name, Output<String> id, WebAppHybridConnectionState 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.
The following state arguments are supported:
Hostname string

The hostname of the endpoint.

NamespaceName string

The name of the Relay Namespace.

Port int

The port to use for the endpoint.

RelayId string

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

RelayName string

The name of the Relay in use.

SendKeyName string

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

SendKeyValue string

The Primary Access Key for the send_key_name

ServiceBusNamespace string

The Service Bus Namespace.

ServiceBusSuffix string

The suffix for the endpoint.

WebAppId string

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

Hostname string

The hostname of the endpoint.

NamespaceName string

The name of the Relay Namespace.

Port int

The port to use for the endpoint.

RelayId string

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

RelayName string

The name of the Relay in use.

SendKeyName string

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

SendKeyValue string

The Primary Access Key for the send_key_name

ServiceBusNamespace string

The Service Bus Namespace.

ServiceBusSuffix string

The suffix for the endpoint.

WebAppId string

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

hostname String

The hostname of the endpoint.

namespaceName String

The name of the Relay Namespace.

port Integer

The port to use for the endpoint.

relayId String

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

relayName String

The name of the Relay in use.

sendKeyName String

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

sendKeyValue String

The Primary Access Key for the send_key_name

serviceBusNamespace String

The Service Bus Namespace.

serviceBusSuffix String

The suffix for the endpoint.

webAppId String

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

hostname string

The hostname of the endpoint.

namespaceName string

The name of the Relay Namespace.

port number

The port to use for the endpoint.

relayId string

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

relayName string

The name of the Relay in use.

sendKeyName string

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

sendKeyValue string

The Primary Access Key for the send_key_name

serviceBusNamespace string

The Service Bus Namespace.

serviceBusSuffix string

The suffix for the endpoint.

webAppId string

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

hostname str

The hostname of the endpoint.

namespace_name str

The name of the Relay Namespace.

port int

The port to use for the endpoint.

relay_id str

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

relay_name str

The name of the Relay in use.

send_key_name str

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

send_key_value str

The Primary Access Key for the send_key_name

service_bus_namespace str

The Service Bus Namespace.

service_bus_suffix str

The suffix for the endpoint.

web_app_id str

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

hostname String

The hostname of the endpoint.

namespaceName String

The name of the Relay Namespace.

port Number

The port to use for the endpoint.

relayId String

The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created.

relayName String

The name of the Relay in use.

sendKeyName String

The name of the Relay key with Send permission to use. Defaults to RootManageSharedAccessKey

sendKeyValue String

The Primary Access Key for the send_key_name

serviceBusNamespace String

The Service Bus Namespace.

serviceBusSuffix String

The suffix for the endpoint.

webAppId String

The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created.

Import

a Web App Hybrid Connection can be imported using the resource id, e.g.

 $ pulumi import azure:appservice/webAppHybridConnection:WebAppHybridConnection example "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1/hybridConnectionNamespaces/hybridConnectionNamespace1/relays/relay1"

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.