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

We recommend using Azure Native.

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

azure.eventhub.getCluster

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.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.eventhub.getCluster({
        name: "search-eventhub",
        resourceGroupName: "search-service",
    });
    export const eventhubId = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.eventhub.get_cluster(name="search-eventhub",
        resource_group_name="search-service")
    pulumi.export("eventhubId", 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.LookupCluster(ctx, &eventhub.LookupClusterArgs{
    			Name:              "search-eventhub",
    			ResourceGroupName: "search-service",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("eventhubId", 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.GetCluster.Invoke(new()
        {
            Name = "search-eventhub",
            ResourceGroupName = "search-service",
        });
    
        return new Dictionary<string, object?>
        {
            ["eventhubId"] = example.Apply(getClusterResult => getClusterResult.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.GetClusterArgs;
    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.getCluster(GetClusterArgs.builder()
                .name("search-eventhub")
                .resourceGroupName("search-service")
                .build());
    
            ctx.export("eventhubId", example.applyValue(getClusterResult -> getClusterResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:eventhub:getCluster
          Arguments:
            name: search-eventhub
            resourceGroupName: search-service
    outputs:
      eventhubId: ${example.id}
    

    Using getCluster

    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 getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
    function getClusterOutput(args: GetClusterOutputArgs, opts?: InvokeOptions): Output<GetClusterResult>
    def get_cluster(name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetClusterResult
    def get_cluster_output(name: Optional[pulumi.Input[str]] = None,
                    resource_group_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetClusterResult]
    func LookupCluster(ctx *Context, args *LookupClusterArgs, opts ...InvokeOption) (*LookupClusterResult, error)
    func LookupClusterOutput(ctx *Context, args *LookupClusterOutputArgs, opts ...InvokeOption) LookupClusterResultOutput

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

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

    The following arguments are supported:

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

    getCluster Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Location of the EventHub Cluster.
    Name string
    ResourceGroupName string
    SkuName string
    SKU name of the EventHub Cluster.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Location of the EventHub Cluster.
    Name string
    ResourceGroupName string
    SkuName string
    SKU name of the EventHub Cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    Location of the EventHub Cluster.
    name String
    resourceGroupName String
    skuName String
    SKU name of the EventHub Cluster.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    Location of the EventHub Cluster.
    name string
    resourceGroupName string
    skuName string
    SKU name of the EventHub Cluster.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    Location of the EventHub Cluster.
    name str
    resource_group_name str
    sku_name str
    SKU name of the EventHub Cluster.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    Location of the EventHub Cluster.
    name String
    resourceGroupName String
    skuName String
    SKU name of the EventHub Cluster.

    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