We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.notificationhub.getHub
Explore with Pulumi AI
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)
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, ¬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
})
}
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 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}
Using getHub
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 getHub(args: GetHubArgs, opts?: InvokeOptions): Promise<GetHubResult>
function getHubOutput(args: GetHubOutputArgs, opts?: InvokeOptions): Output<GetHubResult>
def get_hub(name: Optional[str] = None,
namespace_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetHubResult
def get_hub_output(name: Optional[pulumi.Input[str]] = None,
namespace_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetHubResult]
func LookupHub(ctx *Context, args *LookupHubArgs, opts ...InvokeOption) (*LookupHubResult, error)
func LookupHubOutput(ctx *Context, args *LookupHubOutputArgs, opts ...InvokeOption) LookupHubResultOutput
> Note: This function is named LookupHub
in the Go SDK.
public static class GetHub
{
public static Task<GetHubResult> InvokeAsync(GetHubArgs args, InvokeOptions? opts = null)
public static Output<GetHubResult> Invoke(GetHubInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHubResult> getHub(GetHubArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:notificationhub/getHub:getHub
arguments:
# arguments dictionary
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 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.
- 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.
getHub Result
The following output properties are available:
- Apns
Credentials List<GetHub Apns Credential> - A
apns_credential
block as defined below. - Gcm
Credentials List<GetHub Gcm Credential> - 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
- 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_credential
block as defined below. - Gcm
Credentials []GetHub Gcm Credential - 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
- Namespace
Name string - Resource
Group stringName - map[string]string
- A mapping of tags to assign to the resource.
- apns
Credentials List<GetHub Apns Credential> - A
apns_credential
block as defined below. - gcm
Credentials List<GetHub Gcm Credential> - 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
- 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_credential
block as defined below. - gcm
Credentials GetHub Gcm Credential[] - 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
- namespace
Name string - resource
Group stringName - {[key: string]: string}
- A mapping of tags to assign to the resource.
- apns_
credentials Sequence[GetHub Apns Credential] - A
apns_credential
block as defined below. - gcm_
credentials Sequence[GetHub Gcm Credential] - 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_ strname - Mapping[str, str]
- A mapping of tags to assign to the resource.
- apns
Credentials List<Property Map> - A
apns_credential
block as defined below. - gcm
Credentials List<Property Map> - 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
- namespace
Name String - resource
Group StringName - Map<String>
- A mapping of tags to assign to the resource.
Supporting Types
GetHubApnsCredential
- Application
Mode string - The Application Mode which defines which server the APNS Messages should be sent to. Possible values are
Production
andSandbox
. - 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
Production
andSandbox
. - 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
Production
andSandbox
. - 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
Production
andSandbox
. - 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
Production
andSandbox
. - 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.
- application
Mode String - The Application Mode which defines which server the APNS Messages should be sent to. Possible values are
Production
andSandbox
. - 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.
GetHubGcmCredential
- Api
Key string - The API Key associated with the Google Cloud Messaging service.
- Api
Key string - The API Key associated with the Google Cloud Messaging service.
- api
Key String - The API Key associated with the Google Cloud Messaging service.
- api
Key string - The API Key associated with the Google Cloud Messaging service.
- api_
key str - The API Key associated with the Google Cloud Messaging service.
- api
Key String - The API Key associated with the Google Cloud Messaging service.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.