getCluster

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)
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 main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/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
})
}
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}

Return

A collection of values returned by getCluster.

Parameters

argument

A collection of arguments for invoking getCluster.


suspend fun getCluster(name: String, resourceGroupName: String): GetClusterResult

Return

A collection of values returned by getCluster.

Parameters

name

The name of this EventHub Cluster.

resourceGroupName

The name of the Resource Group where the EventHub Cluster exists.

See also


suspend fun getCluster(argument: suspend GetClusterPlainArgsBuilder.() -> Unit): GetClusterResult

Return

A collection of values returned by getCluster.

Parameters

argument

Builder for com.pulumi.azure.eventhub.kotlin.inputs.GetClusterPlainArgs.

See also