GetHub

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

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.NotificationHub.GetHub.InvokeAsync(new Azure.NotificationHub.GetHubArgs
        {
            Name = "notification-hub",
            NamespaceName = "namespace-name",
            ResourceGroupName = "resource-group-name",
        }));
        this.Id = example.Apply(example => example.Id);
    }

    [Output("id")]
    public Output<string> Id { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/notificationhub"
    "github.com/pulumi/pulumi/sdk/v2/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
    })
}
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)
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);

Using GetHub

function getHub(args: GetHubArgs, opts?: InvokeOptions): Promise<GetHubResult>
function  get_hub(name=None, namespace_name=None, resource_group_name=None, opts=None)
func LookupHub(ctx *Context, args *LookupHubArgs, opts ...InvokeOption) (*LookupHubResult, error)

Note: This function is named LookupHub in the Go SDK.

public static class GetHub {
    public static Task<GetHubResult> InvokeAsync(GetHubArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

Specifies the Name of the Notification Hub.

NamespaceName string

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

ResourceGroupName string

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

Name string

Specifies the Name of the Notification Hub.

NamespaceName string

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

ResourceGroupName string

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

name string

Specifies the Name of the Notification Hub.

namespaceName string

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

resourceGroupName string

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

name str

Specifies the Name of the Notification Hub.

namespace_name str

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

resource_group_name str

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

GetHub Result

The following output properties are available:

ApnsCredentials List<GetHubApnsCredential>

A apns_credential block as defined below.

GcmCredentials List<GetHubGcmCredential>

A gcm_credential block as defined below.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure Region in which this Notification Hub exists.

Name string
NamespaceName string
ResourceGroupName string
Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

ApnsCredentials []GetHubApnsCredential

A apns_credential block as defined below.

GcmCredentials []GetHubGcmCredential

A gcm_credential block as defined below.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure Region in which this Notification Hub exists.

Name string
NamespaceName string
ResourceGroupName string
Tags map[string]string

A mapping of tags to assign to the resource.

apnsCredentials GetHubApnsCredential[]

A apns_credential block as defined below.

gcmCredentials GetHubGcmCredential[]

A gcm_credential block as defined below.

id string

The provider-assigned unique ID for this managed resource.

location string

The Azure Region in which this Notification Hub exists.

name string
namespaceName string
resourceGroupName string
tags {[key: string]: string}

A mapping of tags to assign to the resource.

apns_credentials List[GetHubApnsCredential]

A apns_credential block as defined below.

gcm_credentials List[GetHubGcmCredential]

A gcm_credential block as defined below.

id str

The provider-assigned unique ID for this managed resource.

location str

The Azure Region in which this Notification Hub exists.

name str
namespace_name str
resource_group_name str
tags Dict[str, str]

A mapping of tags to assign to the resource.

Supporting Types

GetHubApnsCredential

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ApplicationMode string

The Application Mode which defines which server the APNS Messages should be sent to. Possible values are Production and Sandbox.

BundleId string

The Bundle ID of the iOS/macOS application to send push notifications for, such as com.org.example.

KeyId string

The Apple Push Notifications Service (APNS) Key.

TeamId string

The ID of the team the Token.

Token string

The Push Token associated with the Apple Developer Account.

ApplicationMode string

The Application Mode which defines which server the APNS Messages should be sent to. Possible values are Production and Sandbox.

BundleId string

The Bundle ID of the iOS/macOS application to send push notifications for, such as com.org.example.

KeyId string

The Apple Push Notifications Service (APNS) Key.

TeamId string

The ID of the team the Token.

Token string

The Push Token associated with the Apple Developer Account.

applicationMode string

The Application Mode which defines which server the APNS Messages should be sent to. Possible values are Production and Sandbox.

bundleId string

The Bundle ID of the iOS/macOS application to send push notifications for, such as com.org.example.

keyId string

The Apple Push Notifications Service (APNS) Key.

teamId string

The ID of the team the Token.

token string

The Push Token associated with the Apple Developer Account.

applicationMode str

The Application Mode which defines which server the APNS Messages should be sent to. Possible values are Production and Sandbox.

bundleId str

The Bundle ID of the iOS/macOS application to send push notifications for, such as com.org.example.

keyId str

The Apple Push Notifications Service (APNS) Key.

teamId str

The ID of the team the Token.

token str

The Push Token associated with the Apple Developer Account.

GetHubGcmCredential

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ApiKey string

The API Key associated with the Google Cloud Messaging service.

ApiKey string

The API Key associated with the Google Cloud Messaging service.

apiKey string

The API Key associated with the Google Cloud Messaging service.

api_key str

The API Key associated with the Google Cloud Messaging service.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.