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, ¬ificationhub.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
LookupHubin 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.
- Namespace
Name string Specifies the Name of the Notification Hub Namespace which contains the Notification Hub.
- Resource
Group stringName Specifies the Name of the Resource Group within which the Notification Hub exists.
- Name string
Specifies the Name of the Notification Hub.
- Namespace
Name string Specifies the Name of the Notification Hub Namespace which contains the Notification Hub.
- Resource
Group stringName Specifies the Name of the Resource Group within which the Notification Hub exists.
- name string
Specifies the Name of the Notification Hub.
- namespace
Name string Specifies the Name of the Notification Hub Namespace which contains the Notification Hub.
- resource
Group stringName 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_ strname Specifies the Name of the Resource Group within which the Notification Hub exists.
GetHub Result
The following output properties are available:
- Apns
Credentials List<GetHub Apns Credential> A
apns_credentialblock as defined below.- Gcm
Credentials List<GetHub Gcm Credential> A
gcm_credentialblock 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
- Namespace
Name string - Resource
Group stringName - Dictionary<string, string>
A mapping of tags to assign to the resource.
- Apns
Credentials []GetHub Apns Credential A
apns_credentialblock as defined below.- Gcm
Credentials []GetHub Gcm Credential A
gcm_credentialblock 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
- Namespace
Name string - Resource
Group stringName - map[string]string
A mapping of tags to assign to the resource.
- apns
Credentials GetHub Apns Credential[] A
apns_credentialblock as defined below.- gcm
Credentials GetHub Gcm Credential[] A
gcm_credentialblock 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
- namespace
Name string - resource
Group stringName - {[key: string]: string}
A mapping of tags to assign to the resource.
- apns_
credentials List[GetHub Apns Credential] A
apns_credentialblock as defined below.- gcm_
credentials List[GetHub Gcm Credential] A
gcm_credentialblock 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_ strname - 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.
- Application
Mode string The Application Mode which defines which server the APNS Messages should be sent to. Possible values are
ProductionandSandbox.- Bundle
Id string The Bundle ID of the iOS/macOS application to send push notifications for, such as
com.org.example.- Key
Id string The Apple Push Notifications Service (APNS) Key.
- Team
Id string The ID of the team the Token.
- Token string
The Push Token associated with the Apple Developer Account.
- Application
Mode string The Application Mode which defines which server the APNS Messages should be sent to. Possible values are
ProductionandSandbox.- Bundle
Id string The Bundle ID of the iOS/macOS application to send push notifications for, such as
com.org.example.- Key
Id string The Apple Push Notifications Service (APNS) Key.
- Team
Id string The ID of the team the Token.
- Token string
The Push Token associated with the Apple Developer Account.
- application
Mode string The Application Mode which defines which server the APNS Messages should be sent to. Possible values are
ProductionandSandbox.- bundle
Id string The Bundle ID of the iOS/macOS application to send push notifications for, such as
com.org.example.- key
Id string The Apple Push Notifications Service (APNS) Key.
- team
Id string The ID of the team the Token.
- token string
The Push Token associated with the Apple Developer Account.
- application
Mode str The Application Mode which defines which server the APNS Messages should be sent to. Possible values are
ProductionandSandbox.- bundle
Id str The Bundle ID of the iOS/macOS application to send push notifications for, such as
com.org.example.- key
Id str The Apple Push Notifications Service (APNS) Key.
- team
Id 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.