1. Packages
  2. Azure Native
  3. API Docs
  4. eventhub
  5. NamespaceVirtualNetworkRule
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

azure-native.eventhub.NamespaceVirtualNetworkRule

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

    Single item in a List or Get VirtualNetworkRules operation Azure REST API version: 2018-01-01-preview. Prior API version in Azure Native 1.x: 2018-01-01-preview.

    Example Usage

    NameSpaceVirtualNetworkRuleCreate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var namespaceVirtualNetworkRule = new AzureNative.EventHub.NamespaceVirtualNetworkRule("namespaceVirtualNetworkRule", new()
        {
            NamespaceName = "sdk-Namespace-6019",
            ResourceGroupName = "ResourceGroup",
            VirtualNetworkRuleName = "sdk-VirtualNetworkRules-9191",
            VirtualNetworkSubnetId = "/subscriptions/Subscription/resourceGroups/sbehvnettest/providers/Microsoft.Network/virtualNetworks/sbehvnettest/subnets/default",
        });
    
    });
    
    package main
    
    import (
    	eventhub "github.com/pulumi/pulumi-azure-native-sdk/eventhub/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eventhub.NewNamespaceVirtualNetworkRule(ctx, "namespaceVirtualNetworkRule", &eventhub.NamespaceVirtualNetworkRuleArgs{
    			NamespaceName:          pulumi.String("sdk-Namespace-6019"),
    			ResourceGroupName:      pulumi.String("ResourceGroup"),
    			VirtualNetworkRuleName: pulumi.String("sdk-VirtualNetworkRules-9191"),
    			VirtualNetworkSubnetId: pulumi.String("/subscriptions/Subscription/resourceGroups/sbehvnettest/providers/Microsoft.Network/virtualNetworks/sbehvnettest/subnets/default"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.eventhub.NamespaceVirtualNetworkRule;
    import com.pulumi.azurenative.eventhub.NamespaceVirtualNetworkRuleArgs;
    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 namespaceVirtualNetworkRule = new NamespaceVirtualNetworkRule("namespaceVirtualNetworkRule", NamespaceVirtualNetworkRuleArgs.builder()
                .namespaceName("sdk-Namespace-6019")
                .resourceGroupName("ResourceGroup")
                .virtualNetworkRuleName("sdk-VirtualNetworkRules-9191")
                .virtualNetworkSubnetId("/subscriptions/Subscription/resourceGroups/sbehvnettest/providers/Microsoft.Network/virtualNetworks/sbehvnettest/subnets/default")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    namespace_virtual_network_rule = azure_native.eventhub.NamespaceVirtualNetworkRule("namespaceVirtualNetworkRule",
        namespace_name="sdk-Namespace-6019",
        resource_group_name="ResourceGroup",
        virtual_network_rule_name="sdk-VirtualNetworkRules-9191",
        virtual_network_subnet_id="/subscriptions/Subscription/resourceGroups/sbehvnettest/providers/Microsoft.Network/virtualNetworks/sbehvnettest/subnets/default")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const namespaceVirtualNetworkRule = new azure_native.eventhub.NamespaceVirtualNetworkRule("namespaceVirtualNetworkRule", {
        namespaceName: "sdk-Namespace-6019",
        resourceGroupName: "ResourceGroup",
        virtualNetworkRuleName: "sdk-VirtualNetworkRules-9191",
        virtualNetworkSubnetId: "/subscriptions/Subscription/resourceGroups/sbehvnettest/providers/Microsoft.Network/virtualNetworks/sbehvnettest/subnets/default",
    });
    
    resources:
      namespaceVirtualNetworkRule:
        type: azure-native:eventhub:NamespaceVirtualNetworkRule
        properties:
          namespaceName: sdk-Namespace-6019
          resourceGroupName: ResourceGroup
          virtualNetworkRuleName: sdk-VirtualNetworkRules-9191
          virtualNetworkSubnetId: /subscriptions/Subscription/resourceGroups/sbehvnettest/providers/Microsoft.Network/virtualNetworks/sbehvnettest/subnets/default
    

    Create NamespaceVirtualNetworkRule Resource

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

    Constructor syntax

    new NamespaceVirtualNetworkRule(name: string, args: NamespaceVirtualNetworkRuleArgs, opts?: CustomResourceOptions);
    @overload
    def NamespaceVirtualNetworkRule(resource_name: str,
                                    args: NamespaceVirtualNetworkRuleArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def NamespaceVirtualNetworkRule(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    namespace_name: Optional[str] = None,
                                    resource_group_name: Optional[str] = None,
                                    virtual_network_rule_name: Optional[str] = None,
                                    virtual_network_subnet_id: Optional[str] = None)
    func NewNamespaceVirtualNetworkRule(ctx *Context, name string, args NamespaceVirtualNetworkRuleArgs, opts ...ResourceOption) (*NamespaceVirtualNetworkRule, error)
    public NamespaceVirtualNetworkRule(string name, NamespaceVirtualNetworkRuleArgs args, CustomResourceOptions? opts = null)
    public NamespaceVirtualNetworkRule(String name, NamespaceVirtualNetworkRuleArgs args)
    public NamespaceVirtualNetworkRule(String name, NamespaceVirtualNetworkRuleArgs args, CustomResourceOptions options)
    
    type: azure-native:eventhub:NamespaceVirtualNetworkRule
    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 NamespaceVirtualNetworkRuleArgs
    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 NamespaceVirtualNetworkRuleArgs
    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 NamespaceVirtualNetworkRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NamespaceVirtualNetworkRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NamespaceVirtualNetworkRuleArgs
    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 namespaceVirtualNetworkRuleResource = new AzureNative.EventHub.NamespaceVirtualNetworkRule("namespaceVirtualNetworkRuleResource", new()
    {
        NamespaceName = "string",
        ResourceGroupName = "string",
        VirtualNetworkRuleName = "string",
        VirtualNetworkSubnetId = "string",
    });
    
    example, err := eventhub.NewNamespaceVirtualNetworkRule(ctx, "namespaceVirtualNetworkRuleResource", &eventhub.NamespaceVirtualNetworkRuleArgs{
    	NamespaceName:          pulumi.String("string"),
    	ResourceGroupName:      pulumi.String("string"),
    	VirtualNetworkRuleName: pulumi.String("string"),
    	VirtualNetworkSubnetId: pulumi.String("string"),
    })
    
    var namespaceVirtualNetworkRuleResource = new NamespaceVirtualNetworkRule("namespaceVirtualNetworkRuleResource", NamespaceVirtualNetworkRuleArgs.builder()
        .namespaceName("string")
        .resourceGroupName("string")
        .virtualNetworkRuleName("string")
        .virtualNetworkSubnetId("string")
        .build());
    
    namespace_virtual_network_rule_resource = azure_native.eventhub.NamespaceVirtualNetworkRule("namespaceVirtualNetworkRuleResource",
        namespace_name="string",
        resource_group_name="string",
        virtual_network_rule_name="string",
        virtual_network_subnet_id="string")
    
    const namespaceVirtualNetworkRuleResource = new azure_native.eventhub.NamespaceVirtualNetworkRule("namespaceVirtualNetworkRuleResource", {
        namespaceName: "string",
        resourceGroupName: "string",
        virtualNetworkRuleName: "string",
        virtualNetworkSubnetId: "string",
    });
    
    type: azure-native:eventhub:NamespaceVirtualNetworkRule
    properties:
        namespaceName: string
        resourceGroupName: string
        virtualNetworkRuleName: string
        virtualNetworkSubnetId: string
    

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

    NamespaceName string
    The Namespace name
    ResourceGroupName string
    Name of the resource group within the azure subscription.
    VirtualNetworkRuleName string
    The Virtual Network Rule name.
    VirtualNetworkSubnetId string
    ARM ID of Virtual Network Subnet
    NamespaceName string
    The Namespace name
    ResourceGroupName string
    Name of the resource group within the azure subscription.
    VirtualNetworkRuleName string
    The Virtual Network Rule name.
    VirtualNetworkSubnetId string
    ARM ID of Virtual Network Subnet
    namespaceName String
    The Namespace name
    resourceGroupName String
    Name of the resource group within the azure subscription.
    virtualNetworkRuleName String
    The Virtual Network Rule name.
    virtualNetworkSubnetId String
    ARM ID of Virtual Network Subnet
    namespaceName string
    The Namespace name
    resourceGroupName string
    Name of the resource group within the azure subscription.
    virtualNetworkRuleName string
    The Virtual Network Rule name.
    virtualNetworkSubnetId string
    ARM ID of Virtual Network Subnet
    namespace_name str
    The Namespace name
    resource_group_name str
    Name of the resource group within the azure subscription.
    virtual_network_rule_name str
    The Virtual Network Rule name.
    virtual_network_subnet_id str
    ARM ID of Virtual Network Subnet
    namespaceName String
    The Namespace name
    resourceGroupName String
    Name of the resource group within the azure subscription.
    virtualNetworkRuleName String
    The Virtual Network Rule name.
    virtualNetworkSubnetId String
    ARM ID of Virtual Network Subnet

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Import

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

    $ pulumi import azure-native:eventhub:NamespaceVirtualNetworkRule sdk-VirtualNetworkRules-9191 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/virtualnetworkrules/{virtualNetworkRuleName} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi