1. Packages
  2. Packages
  3. Azure Classic
  4. API Docs
  5. relay
  6. HybridConnection

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages an Azure Relay Hybrid Connection.

    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 exampleNamespace = new Azure.Relay.Namespace("exampleNamespace", new Azure.Relay.NamespaceArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                SkuName = "Standard",
                Tags = 
                {
                    { "source", "managed" },
                },
            });
            var exampleHybridConnection = new Azure.Relay.HybridConnection("exampleHybridConnection", new Azure.Relay.HybridConnectionArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                RelayNamespaceName = exampleNamespace.Name,
                RequiresClientAuthorization = false,
                UserMetadata = "testmetadata",
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/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
    		}
    		exampleNamespace, err := relay.NewNamespace(ctx, "exampleNamespace", &relay.NamespaceArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			SkuName:           pulumi.String("Standard"),
    			Tags: pulumi.StringMap{
    				"source": pulumi.String("managed"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = relay.NewHybridConnection(ctx, "exampleHybridConnection", &relay.HybridConnectionArgs{
    			ResourceGroupName:           exampleResourceGroup.Name,
    			RelayNamespaceName:          exampleNamespace.Name,
    			RequiresClientAuthorization: pulumi.Bool(false),
    			UserMetadata:                pulumi.String("testmetadata"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleNamespace = new azure.relay.Namespace("exampleNamespace", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        skuName: "Standard",
        tags: {
            source: "managed",
        },
    });
    const exampleHybridConnection = new azure.relay.HybridConnection("exampleHybridConnection", {
        resourceGroupName: exampleResourceGroup.name,
        relayNamespaceName: exampleNamespace.name,
        requiresClientAuthorization: false,
        userMetadata: "testmetadata",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_namespace = azure.relay.Namespace("exampleNamespace",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        sku_name="Standard",
        tags={
            "source": "managed",
        })
    example_hybrid_connection = azure.relay.HybridConnection("exampleHybridConnection",
        resource_group_name=example_resource_group.name,
        relay_namespace_name=example_namespace.name,
        requires_client_authorization=False,
        user_metadata="testmetadata")
    

    Example coming soon!

    Create HybridConnection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new HybridConnection(name: string, args: HybridConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def HybridConnection(resource_name: str,
                         args: HybridConnectionArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def HybridConnection(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         relay_namespace_name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         name: Optional[str] = None,
                         requires_client_authorization: Optional[bool] = None,
                         user_metadata: Optional[str] = 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:relay:HybridConnection
    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 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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var azureHybridConnectionResource = new Azure.Relay.HybridConnection("azureHybridConnectionResource", new()
    {
        RelayNamespaceName = "string",
        ResourceGroupName = "string",
        Name = "string",
        RequiresClientAuthorization = false,
        UserMetadata = "string",
    });
    
    example, err := relay.NewHybridConnection(ctx, "azureHybridConnectionResource", &relay.HybridConnectionArgs{
    	RelayNamespaceName:          pulumi.String("string"),
    	ResourceGroupName:           pulumi.String("string"),
    	Name:                        pulumi.String("string"),
    	RequiresClientAuthorization: pulumi.Bool(false),
    	UserMetadata:                pulumi.String("string"),
    })
    
    var azureHybridConnectionResource = new com.pulumi.azure.relay.HybridConnection("azureHybridConnectionResource", com.pulumi.azure.relay.HybridConnectionArgs.builder()
        .relayNamespaceName("string")
        .resourceGroupName("string")
        .name("string")
        .requiresClientAuthorization(false)
        .userMetadata("string")
        .build());
    
    azure_hybrid_connection_resource = azure.relay.HybridConnection("azureHybridConnectionResource",
        relay_namespace_name="string",
        resource_group_name="string",
        name="string",
        requires_client_authorization=False,
        user_metadata="string")
    
    const azureHybridConnectionResource = new azure.relay.HybridConnection("azureHybridConnectionResource", {
        relayNamespaceName: "string",
        resourceGroupName: "string",
        name: "string",
        requiresClientAuthorization: false,
        userMetadata: "string",
    });
    
    type: azure:relay:HybridConnection
    properties:
        name: string
        relayNamespaceName: string
        requiresClientAuthorization: false
        resourceGroupName: string
        userMetadata: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The HybridConnection resource accepts the following input properties:

    RelayNamespaceName string
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    RequiresClientAuthorization bool
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    UserMetadata string
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    RelayNamespaceName string
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    RequiresClientAuthorization bool
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    UserMetadata string
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    relayNamespaceName String
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    requiresClientAuthorization Boolean
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    userMetadata String
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    relayNamespaceName string
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    requiresClientAuthorization boolean
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    userMetadata string
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    relay_namespace_name str
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    requires_client_authorization bool
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    user_metadata str
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    relayNamespaceName String
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    requiresClientAuthorization Boolean
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    userMetadata String
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.

    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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,
            name: Optional[str] = None,
            relay_namespace_name: Optional[str] = None,
            requires_client_authorization: Optional[bool] = None,
            resource_group_name: Optional[str] = None,
            user_metadata: 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)
    resources:  _:    type: azure:relay:HybridConnection    get:      id: ${id}
    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:
    Name string
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    RelayNamespaceName string
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    RequiresClientAuthorization bool
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    UserMetadata string
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    Name string
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    RelayNamespaceName string
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    RequiresClientAuthorization bool
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    UserMetadata string
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    name String
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    relayNamespaceName String
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    requiresClientAuthorization Boolean
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    userMetadata String
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    name string
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    relayNamespaceName string
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    requiresClientAuthorization boolean
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    userMetadata string
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    name str
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    relay_namespace_name str
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    requires_client_authorization bool
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    user_metadata str
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
    name String
    Specifies the name of the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    relayNamespaceName String
    The name of the Azure Relay in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    requiresClientAuthorization Boolean
    Specify if client authorization is needed for this hybrid connection. True by default. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the Azure Relay Hybrid Connection. Changing this forces a new resource to be created.
    userMetadata String
    The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.

    Import

    Relay Hybrid Connection’s can be imported using the resource id, e.g.

     $ pulumi import azure:relay/hybridConnection:HybridConnection relay1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Relay/namespaces/relay1/hybridConnections/hconn1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.