getHub

suspend fun getHub(argument: GetHubPlainArgs): GetHubResult

Use this data source to access information about an existing Notification Hub within a Notification Hub Namespace.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.notificationhub.getHub({
name: "notification-hub",
namespaceName: "namespace-name",
resourceGroupName: "resource-group-name",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.notificationhub.get_hub(name="notification-hub",
namespace_name="namespace-name",
resource_group_name="resource-group-name")
pulumi.export("id", example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.NotificationHub.GetHub.Invoke(new()
{
Name = "notification-hub",
NamespaceName = "namespace-name",
ResourceGroupName = "resource-group-name",
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getHubResult => getHubResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/notificationhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := notificationhub.LookupHub(ctx, &notificationhub.LookupHubArgs{
Name: "notification-hub",
NamespaceName: "namespace-name",
ResourceGroupName: "resource-group-name",
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.notificationhub.NotificationhubFunctions;
import com.pulumi.azure.notificationhub.inputs.GetHubArgs;
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 = NotificationhubFunctions.getHub(GetHubArgs.builder()
.name("notification-hub")
.namespaceName("namespace-name")
.resourceGroupName("resource-group-name")
.build());
ctx.export("id", example.applyValue(getHubResult -> getHubResult.id()));
}
}
variables:
example:
fn::invoke:
function: azure:notificationhub:getHub
arguments:
name: notification-hub
namespaceName: namespace-name
resourceGroupName: resource-group-name
outputs:
id: ${example.id}

Return

A collection of values returned by getHub.

Parameters

argument

A collection of arguments for invoking getHub.


suspend fun getHub(name: String, namespaceName: String, resourceGroupName: String): GetHubResult

Return

A collection of values returned by getHub.

Parameters

name

Specifies the Name of the Notification Hub.

namespaceName

Specifies the Name of the Notification Hub Namespace which contains the Notification Hub.

resourceGroupName

Specifies the Name of the Resource Group within which the Notification Hub exists.

See also


suspend fun getHub(argument: suspend GetHubPlainArgsBuilder.() -> Unit): GetHubResult

Return

A collection of values returned by getHub.

Parameters

argument

Builder for com.pulumi.azure.notificationhub.kotlin.inputs.GetHubPlainArgs.

See also