Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.11.0 published on Monday, Jun 27, 2022 by Pulumi

HybridConnection

Import

App Service Hybrid Connections can be imported using the resource id, e.g.

 $ pulumi import azure:appservice/hybridConnection:HybridConnection example /subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/exampleResourceGroup1/providers/Microsoft.Web/sites/exampleAppService1/hybridConnectionNamespaces/exampleRN1/relays/exampleRHC1

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Sku = new Azure.AppService.Inputs.PlanSkuArgs
            {
                Tier = "Standard",
                Size = "S1",
            },
        });
        var exampleAppService = new Azure.AppService.AppService("exampleAppService", new Azure.AppService.AppServiceArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            AppServicePlanId = examplePlan.Id,
        });
        var exampleNamespace = new Azure.Relay.Namespace("exampleNamespace", new Azure.Relay.NamespaceArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            SkuName = "Standard",
        });
        var exampleHybridConnection = new Azure.Relay.HybridConnection("exampleHybridConnection", new Azure.Relay.HybridConnectionArgs
        {
            ResourceGroupName = exampleResourceGroup.Name,
            RelayNamespaceName = exampleNamespace.Name,
            UserMetadata = "examplemetadata",
        });
        var exampleAppservice_hybridConnectionHybridConnection = new Azure.AppService.HybridConnection("exampleAppservice/hybridConnectionHybridConnection", new Azure.AppService.HybridConnectionArgs
        {
            AppServiceName = exampleAppService.Name,
            ResourceGroupName = exampleResourceGroup.Name,
            RelayId = exampleHybridConnection.Id,
            Hostname = "testhostname.example",
            Port = 8080,
            SendKeyName = "exampleSharedAccessKey",
        });
    }

}
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
		}
		examplePlan, err := appservice.NewPlan(ctx, "examplePlan", &appservice.PlanArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku: &appservice.PlanSkuArgs{
				Tier: pulumi.String("Standard"),
				Size: pulumi.String("S1"),
			},
		})
		if err != nil {
			return err
		}
		exampleAppService, err := appservice.NewAppService(ctx, "exampleAppService", &appservice.AppServiceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			AppServicePlanId:  examplePlan.ID(),
		})
		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,
			UserMetadata:       pulumi.String("examplemetadata"),
		})
		if err != nil {
			return err
		}
		_, err = appservice.NewHybridConnection(ctx, "exampleAppservice/hybridConnectionHybridConnection", &appservice.HybridConnectionArgs{
			AppServiceName:    exampleAppService.Name,
			ResourceGroupName: exampleResourceGroup.Name,
			RelayId:           exampleHybridConnection.ID(),
			Hostname:          pulumi.String("testhostname.example"),
			Port:              pulumi.Int(8080),
			SendKeyName:       pulumi.String("exampleSharedAccessKey"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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 examplePlan = new Plan("examplePlan", PlanArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .sku(PlanSkuArgs.builder()
                .tier("Standard")
                .size("S1")
                .build())
            .build());

        var exampleAppService = new AppService("exampleAppService", AppServiceArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .appServicePlanId(examplePlan.id())
            .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())
            .userMetadata("examplemetadata")
            .build());

        var exampleAppservice_hybridConnectionHybridConnection = new HybridConnection("exampleAppservice/hybridConnectionHybridConnection", HybridConnectionArgs.builder()        
            .appServiceName(exampleAppService.name())
            .resourceGroupName(exampleResourceGroup.name())
            .relayId(exampleHybridConnection.id())
            .hostname("testhostname.example")
            .port(8080)
            .sendKeyName("exampleSharedAccessKey")
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku=azure.appservice.PlanSkuArgs(
        tier="Standard",
        size="S1",
    ))
example_app_service = azure.appservice.AppService("exampleAppService",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    app_service_plan_id=example_plan.id)
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,
    user_metadata="examplemetadata")
example_appservice_hybrid_connection_hybrid_connection = azure.appservice.HybridConnection("exampleAppservice/hybridConnectionHybridConnection",
    app_service_name=example_app_service.name,
    resource_group_name=example_resource_group.name,
    relay_id=example_hybrid_connection.id,
    hostname="testhostname.example",
    port=8080,
    send_key_name="exampleSharedAccessKey")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const examplePlan = new azure.appservice.Plan("examplePlan", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: {
        tier: "Standard",
        size: "S1",
    },
});
const exampleAppService = new azure.appservice.AppService("exampleAppService", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    appServicePlanId: examplePlan.id,
});
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,
    userMetadata: "examplemetadata",
});
const exampleAppservice_hybridConnectionHybridConnection = new azure.appservice.HybridConnection("exampleAppservice/hybridConnectionHybridConnection", {
    appServiceName: exampleAppService.name,
    resourceGroupName: exampleResourceGroup.name,
    relayId: exampleHybridConnection.id,
    hostname: "testhostname.example",
    port: 8080,
    sendKeyName: "exampleSharedAccessKey",
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  examplePlan:
    type: azure:appservice:Plan
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      sku:
        tier: Standard
        size: S1
  exampleAppService:
    type: azure:appservice:AppService
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      appServicePlanId: ${examplePlan.id}
  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}
      userMetadata: examplemetadata
  exampleAppservice/hybridConnectionHybridConnection:
    type: azure:appservice:HybridConnection
    properties:
      appServiceName: ${exampleAppService.name}
      resourceGroupName: ${exampleResourceGroup.name}
      relayId: ${exampleHybridConnection.id}
      hostname: testhostname.example
      port: 8080
      sendKeyName: exampleSharedAccessKey

Create a HybridConnection Resource

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

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

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

AppServiceName string

Specifies the name of the App Service. Changing this forces a new resource to be created.

Hostname string

The hostname of the endpoint.

Port int

The port of the endpoint.

RelayId string

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

SendKeyName string

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

AppServiceName string

Specifies the name of the App Service. Changing this forces a new resource to be created.

Hostname string

The hostname of the endpoint.

Port int

The port of the endpoint.

RelayId string

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

SendKeyName string

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

appServiceName String

Specifies the name of the App Service. Changing this forces a new resource to be created.

hostname String

The hostname of the endpoint.

port Integer

The port of the endpoint.

relayId String

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

sendKeyName String

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

appServiceName string

Specifies the name of the App Service. Changing this forces a new resource to be created.

hostname string

The hostname of the endpoint.

port number

The port of the endpoint.

relayId string

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

sendKeyName string

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

app_service_name str

Specifies the name of the App Service. Changing this forces a new resource to be created.

hostname str

The hostname of the endpoint.

port int

The port of the endpoint.

relay_id str

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

send_key_name str

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

appServiceName String

Specifies the name of the App Service. Changing this forces a new resource to be created.

hostname String

The hostname of the endpoint.

port Number

The port of the endpoint.

relayId String

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

sendKeyName String

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

Outputs

All input properties are implicitly available as output properties. Additionally, the HybridConnection 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
SendKeyValue string

The value of the Service Bus Primary Access key.

ServiceBusNamespace string

The name of the Service Bus namespace.

ServiceBusSuffix string

The suffix for the service bus endpoint.

Id string

The provider-assigned unique ID for this managed resource.

NamespaceName string

The name of the Relay Namespace.

RelayName string
SendKeyValue string

The value of the Service Bus Primary Access key.

ServiceBusNamespace string

The name of the Service Bus namespace.

ServiceBusSuffix string

The suffix for the service bus endpoint.

id String

The provider-assigned unique ID for this managed resource.

namespaceName String

The name of the Relay Namespace.

relayName String
sendKeyValue String

The value of the Service Bus Primary Access key.

serviceBusNamespace String

The name of the Service Bus namespace.

serviceBusSuffix String

The suffix for the service bus endpoint.

id string

The provider-assigned unique ID for this managed resource.

namespaceName string

The name of the Relay Namespace.

relayName string
sendKeyValue string

The value of the Service Bus Primary Access key.

serviceBusNamespace string

The name of the Service Bus namespace.

serviceBusSuffix string

The suffix for the service bus endpoint.

id str

The provider-assigned unique ID for this managed resource.

namespace_name str

The name of the Relay Namespace.

relay_name str
send_key_value str

The value of the Service Bus Primary Access key.

service_bus_namespace str

The name of the Service Bus namespace.

service_bus_suffix str

The suffix for the service bus endpoint.

id String

The provider-assigned unique ID for this managed resource.

namespaceName String

The name of the Relay Namespace.

relayName String
sendKeyValue String

The value of the Service Bus Primary Access key.

serviceBusNamespace String

The name of the Service Bus namespace.

serviceBusSuffix String

The suffix for the service bus endpoint.

Look up an Existing HybridConnection Resource

Get an existing HybridConnection 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?: HybridConnectionState, opts?: CustomResourceOptions): HybridConnection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_service_name: Optional[str] = None,
        hostname: Optional[str] = None,
        namespace_name: Optional[str] = None,
        port: Optional[int] = None,
        relay_id: Optional[str] = None,
        relay_name: Optional[str] = None,
        resource_group_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) -> HybridConnection
func GetHybridConnection(ctx *Context, name string, id IDInput, state *HybridConnectionState, opts ...ResourceOption) (*HybridConnection, error)
public static HybridConnection Get(string name, Input<string> id, HybridConnectionState? state, CustomResourceOptions? opts = null)
public static HybridConnection get(String name, Output<String> id, HybridConnectionState 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:
AppServiceName string

Specifies the name of the App Service. 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 of the endpoint.

RelayId string

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

RelayName string
ResourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

SendKeyName string

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

SendKeyValue string

The value of the Service Bus Primary Access key.

ServiceBusNamespace string

The name of the Service Bus namespace.

ServiceBusSuffix string

The suffix for the service bus endpoint.

AppServiceName string

Specifies the name of the App Service. 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 of the endpoint.

RelayId string

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

RelayName string
ResourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

SendKeyName string

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

SendKeyValue string

The value of the Service Bus Primary Access key.

ServiceBusNamespace string

The name of the Service Bus namespace.

ServiceBusSuffix string

The suffix for the service bus endpoint.

appServiceName String

Specifies the name of the App Service. 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 of the endpoint.

relayId String

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

relayName String
resourceGroupName String

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

sendKeyName String

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

sendKeyValue String

The value of the Service Bus Primary Access key.

serviceBusNamespace String

The name of the Service Bus namespace.

serviceBusSuffix String

The suffix for the service bus endpoint.

appServiceName string

Specifies the name of the App Service. 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 of the endpoint.

relayId string

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

relayName string
resourceGroupName string

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

sendKeyName string

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

sendKeyValue string

The value of the Service Bus Primary Access key.

serviceBusNamespace string

The name of the Service Bus namespace.

serviceBusSuffix string

The suffix for the service bus endpoint.

app_service_name str

Specifies the name of the App Service. 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 of the endpoint.

relay_id str

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

relay_name str
resource_group_name str

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

send_key_name str

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

send_key_value str

The value of the Service Bus Primary Access key.

service_bus_namespace str

The name of the Service Bus namespace.

service_bus_suffix str

The suffix for the service bus endpoint.

appServiceName String

Specifies the name of the App Service. 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 of the endpoint.

relayId String

The ID of the Service Bus Relay. Changing this forces a new resource to be created.

relayName String
resourceGroupName String

The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.

sendKeyName String

The name of the Service Bus key which has Send permissions. Defaults to RootManageSharedAccessKey.

sendKeyValue String

The value of the Service Bus Primary Access key.

serviceBusNamespace String

The name of the Service Bus namespace.

serviceBusSuffix String

The suffix for the service bus endpoint.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.