1. Packages
  2. Azure Classic
  3. API Docs
  4. eventhub
  5. getNamespace

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.eventhub.getNamespace

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Use this data source to access information about an existing EventHub Namespace.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.eventhub.getNamespace({
        name: "search-eventhubns",
        resourceGroupName: "search-service",
    });
    export const eventhubNamespaceId = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.eventhub.get_namespace(name="search-eventhubns",
        resource_group_name="search-service")
    pulumi.export("eventhubNamespaceId", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := eventhub.LookupNamespace(ctx, &eventhub.LookupNamespaceArgs{
    			Name:              "search-eventhubns",
    			ResourceGroupName: "search-service",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("eventhubNamespaceId", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.EventHub.GetNamespace.Invoke(new()
        {
            Name = "search-eventhubns",
            ResourceGroupName = "search-service",
        });
    
        return new Dictionary<string, object?>
        {
            ["eventhubNamespaceId"] = example.Apply(getNamespaceResult => getNamespaceResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.eventhub.EventhubFunctions;
    import com.pulumi.azure.eventhub.inputs.GetNamespaceArgs;
    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) {
            final var example = EventhubFunctions.getNamespace(GetNamespaceArgs.builder()
                .name("search-eventhubns")
                .resourceGroupName("search-service")
                .build());
    
            ctx.export("eventhubNamespaceId", example.applyValue(getNamespaceResult -> getNamespaceResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:eventhub:getNamespace
          Arguments:
            name: search-eventhubns
            resourceGroupName: search-service
    outputs:
      eventhubNamespaceId: ${example.id}
    

    Using getNamespace

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getNamespace(args: GetNamespaceArgs, opts?: InvokeOptions): Promise<GetNamespaceResult>
    function getNamespaceOutput(args: GetNamespaceOutputArgs, opts?: InvokeOptions): Output<GetNamespaceResult>
    def get_namespace(name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetNamespaceResult
    def get_namespace_output(name: Optional[pulumi.Input[str]] = None,
                      resource_group_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceResult]
    func LookupNamespace(ctx *Context, args *LookupNamespaceArgs, opts ...InvokeOption) (*LookupNamespaceResult, error)
    func LookupNamespaceOutput(ctx *Context, args *LookupNamespaceOutputArgs, opts ...InvokeOption) LookupNamespaceResultOutput

    > Note: This function is named LookupNamespace in the Go SDK.

    public static class GetNamespace 
    {
        public static Task<GetNamespaceResult> InvokeAsync(GetNamespaceArgs args, InvokeOptions? opts = null)
        public static Output<GetNamespaceResult> Invoke(GetNamespaceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNamespaceResult> getNamespace(GetNamespaceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:eventhub/getNamespace:getNamespace
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the EventHub Namespace.
    ResourceGroupName string
    The Name of the Resource Group where the EventHub Namespace exists.
    Name string
    The name of the EventHub Namespace.
    ResourceGroupName string
    The Name of the Resource Group where the EventHub Namespace exists.
    name String
    The name of the EventHub Namespace.
    resourceGroupName String
    The Name of the Resource Group where the EventHub Namespace exists.
    name string
    The name of the EventHub Namespace.
    resourceGroupName string
    The Name of the Resource Group where the EventHub Namespace exists.
    name str
    The name of the EventHub Namespace.
    resource_group_name str
    The Name of the Resource Group where the EventHub Namespace exists.
    name String
    The name of the EventHub Namespace.
    resourceGroupName String
    The Name of the Resource Group where the EventHub Namespace exists.

    getNamespace Result

    The following output properties are available:

    AutoInflateEnabled bool
    Is Auto Inflate enabled for the EventHub Namespace?
    Capacity int
    The Capacity / Throughput Units for a Standard SKU namespace.
    DedicatedClusterId string
    The ID of the EventHub Dedicated Cluster where this Namespace exists.
    DefaultPrimaryConnectionString string
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultPrimaryConnectionStringAlias string
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultPrimaryKey string
    The primary access key for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionString string
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionStringAlias string
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryKey string
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    Id string
    The provider-assigned unique ID for this managed resource.
    KafkaEnabled bool
    Location string
    The Azure location where the EventHub Namespace exists
    MaximumThroughputUnits int
    Specifies the maximum number of throughput units when Auto Inflate is Enabled.
    Name string
    ResourceGroupName string
    Sku string
    Defines which tier to use.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the EventHub Namespace.
    ZoneRedundant bool
    Is this EventHub Namespace deployed across Availability Zones?
    AutoInflateEnabled bool
    Is Auto Inflate enabled for the EventHub Namespace?
    Capacity int
    The Capacity / Throughput Units for a Standard SKU namespace.
    DedicatedClusterId string
    The ID of the EventHub Dedicated Cluster where this Namespace exists.
    DefaultPrimaryConnectionString string
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultPrimaryConnectionStringAlias string
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultPrimaryKey string
    The primary access key for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionString string
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionStringAlias string
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryKey string
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    Id string
    The provider-assigned unique ID for this managed resource.
    KafkaEnabled bool
    Location string
    The Azure location where the EventHub Namespace exists
    MaximumThroughputUnits int
    Specifies the maximum number of throughput units when Auto Inflate is Enabled.
    Name string
    ResourceGroupName string
    Sku string
    Defines which tier to use.
    Tags map[string]string
    A mapping of tags to assign to the EventHub Namespace.
    ZoneRedundant bool
    Is this EventHub Namespace deployed across Availability Zones?
    autoInflateEnabled Boolean
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity Integer
    The Capacity / Throughput Units for a Standard SKU namespace.
    dedicatedClusterId String
    The ID of the EventHub Dedicated Cluster where this Namespace exists.
    defaultPrimaryConnectionString String
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryConnectionStringAlias String
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryKey String
    The primary access key for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionString String
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionStringAlias String
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryKey String
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    id String
    The provider-assigned unique ID for this managed resource.
    kafkaEnabled Boolean
    location String
    The Azure location where the EventHub Namespace exists
    maximumThroughputUnits Integer
    Specifies the maximum number of throughput units when Auto Inflate is Enabled.
    name String
    resourceGroupName String
    sku String
    Defines which tier to use.
    tags Map<String,String>
    A mapping of tags to assign to the EventHub Namespace.
    zoneRedundant Boolean
    Is this EventHub Namespace deployed across Availability Zones?
    autoInflateEnabled boolean
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity number
    The Capacity / Throughput Units for a Standard SKU namespace.
    dedicatedClusterId string
    The ID of the EventHub Dedicated Cluster where this Namespace exists.
    defaultPrimaryConnectionString string
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryConnectionStringAlias string
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryKey string
    The primary access key for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionString string
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionStringAlias string
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryKey string
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    id string
    The provider-assigned unique ID for this managed resource.
    kafkaEnabled boolean
    location string
    The Azure location where the EventHub Namespace exists
    maximumThroughputUnits number
    Specifies the maximum number of throughput units when Auto Inflate is Enabled.
    name string
    resourceGroupName string
    sku string
    Defines which tier to use.
    tags {[key: string]: string}
    A mapping of tags to assign to the EventHub Namespace.
    zoneRedundant boolean
    Is this EventHub Namespace deployed across Availability Zones?
    auto_inflate_enabled bool
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity int
    The Capacity / Throughput Units for a Standard SKU namespace.
    dedicated_cluster_id str
    The ID of the EventHub Dedicated Cluster where this Namespace exists.
    default_primary_connection_string str
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    default_primary_connection_string_alias str
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey.
    default_primary_key str
    The primary access key for the authorization rule RootManageSharedAccessKey.
    default_secondary_connection_string str
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    default_secondary_connection_string_alias str
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey.
    default_secondary_key str
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    id str
    The provider-assigned unique ID for this managed resource.
    kafka_enabled bool
    location str
    The Azure location where the EventHub Namespace exists
    maximum_throughput_units int
    Specifies the maximum number of throughput units when Auto Inflate is Enabled.
    name str
    resource_group_name str
    sku str
    Defines which tier to use.
    tags Mapping[str, str]
    A mapping of tags to assign to the EventHub Namespace.
    zone_redundant bool
    Is this EventHub Namespace deployed across Availability Zones?
    autoInflateEnabled Boolean
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity Number
    The Capacity / Throughput Units for a Standard SKU namespace.
    dedicatedClusterId String
    The ID of the EventHub Dedicated Cluster where this Namespace exists.
    defaultPrimaryConnectionString String
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryConnectionStringAlias String
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryKey String
    The primary access key for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionString String
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionStringAlias String
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryKey String
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    id String
    The provider-assigned unique ID for this managed resource.
    kafkaEnabled Boolean
    location String
    The Azure location where the EventHub Namespace exists
    maximumThroughputUnits Number
    Specifies the maximum number of throughput units when Auto Inflate is Enabled.
    name String
    resourceGroupName String
    sku String
    Defines which tier to use.
    tags Map<String>
    A mapping of tags to assign to the EventHub Namespace.
    zoneRedundant Boolean
    Is this EventHub Namespace deployed across Availability Zones?

    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.81.0 published on Monday, Jun 24, 2024 by Pulumi