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

We recommend using Azure Native.

Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi

azure.relay.HybridConnection

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi

    Manages an Azure Relay Hybrid Connection.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleNamespace = new azure.relay.Namespace("example", {
        name: "example-relay",
        location: example.location,
        resourceGroupName: example.name,
        skuName: "Standard",
        tags: {
            source: "managed",
        },
    });
    const exampleHybridConnection = new azure.relay.HybridConnection("example", {
        name: "acctestrnhc-%d",
        resourceGroupName: example.name,
        relayNamespaceName: exampleNamespace.name,
        requiresClientAuthorization: false,
        userMetadata: "testmetadata",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_namespace = azure.relay.Namespace("example",
        name="example-relay",
        location=example.location,
        resource_group_name=example.name,
        sku_name="Standard",
        tags={
            "source": "managed",
        })
    example_hybrid_connection = azure.relay.HybridConnection("example",
        name="acctestrnhc-%d",
        resource_group_name=example.name,
        relay_namespace_name=example_namespace.name,
        requires_client_authorization=False,
        user_metadata="testmetadata")
    
    package main
    
    import (
    	"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 {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNamespace, err := relay.NewNamespace(ctx, "example", &relay.NamespaceArgs{
    			Name:              pulumi.String("example-relay"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			SkuName:           pulumi.String("Standard"),
    			Tags: pulumi.StringMap{
    				"source": pulumi.String("managed"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = relay.NewHybridConnection(ctx, "example", &relay.HybridConnectionArgs{
    			Name:                        pulumi.String("acctestrnhc-%d"),
    			ResourceGroupName:           example.Name,
    			RelayNamespaceName:          exampleNamespace.Name,
    			RequiresClientAuthorization: pulumi.Bool(false),
    			UserMetadata:                pulumi.String("testmetadata"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleNamespace = new Azure.Relay.Namespace("example", new()
        {
            Name = "example-relay",
            Location = example.Location,
            ResourceGroupName = example.Name,
            SkuName = "Standard",
            Tags = 
            {
                { "source", "managed" },
            },
        });
    
        var exampleHybridConnection = new Azure.Relay.HybridConnection("example", new()
        {
            Name = "acctestrnhc-%d",
            ResourceGroupName = example.Name,
            RelayNamespaceName = exampleNamespace.Name,
            RequiresClientAuthorization = false,
            UserMetadata = "testmetadata",
        });
    
    });
    
    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.relay.Namespace;
    import com.pulumi.azure.relay.NamespaceArgs;
    import com.pulumi.azure.relay.HybridConnection;
    import com.pulumi.azure.relay.HybridConnectionArgs;
    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 ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
                .name("example-relay")
                .location(example.location())
                .resourceGroupName(example.name())
                .skuName("Standard")
                .tags(Map.of("source", "managed"))
                .build());
    
            var exampleHybridConnection = new HybridConnection("exampleHybridConnection", HybridConnectionArgs.builder()
                .name("acctestrnhc-%d")
                .resourceGroupName(example.name())
                .relayNamespaceName(exampleNamespace.name())
                .requiresClientAuthorization(false)
                .userMetadata("testmetadata")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleNamespace:
        type: azure:relay:Namespace
        name: example
        properties:
          name: example-relay
          location: ${example.location}
          resourceGroupName: ${example.name}
          skuName: Standard
          tags:
            source: managed
      exampleHybridConnection:
        type: azure:relay:HybridConnection
        name: example
        properties:
          name: acctestrnhc-%d
          resourceGroupName: ${example.name}
          relayNamespaceName: ${exampleNamespace.name}
          requiresClientAuthorization: false
          userMetadata: testmetadata
    

    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 HybridConnection("azureHybridConnectionResource", 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

    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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)
    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:
    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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. Changing this forces a new resource to be created. Defaults to true.
    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.

    Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi