Hub
Manages a Notification Hub within a Notification Hub Namespace.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "Australia East",
});
var exampleNamespace = new Azure.NotificationHub.Namespace("exampleNamespace", new Azure.NotificationHub.NamespaceArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
NamespaceType = "NotificationHub",
SkuName = "Free",
});
var exampleHub = new Azure.NotificationHub.Hub("exampleHub", new Azure.NotificationHub.HubArgs
{
NamespaceName = exampleNamespace.Name,
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"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 {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("Australia East"),
})
if err != nil {
return err
}
exampleNamespace, err := notificationhub.NewNamespace(ctx, "exampleNamespace", ¬ificationhub.NamespaceArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
NamespaceType: pulumi.String("NotificationHub"),
SkuName: pulumi.String("Free"),
})
if err != nil {
return err
}
_, err = notificationhub.NewHub(ctx, "exampleHub", ¬ificationhub.HubArgs{
NamespaceName: exampleNamespace.Name,
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="Australia East")
example_namespace = azure.notificationhub.Namespace("exampleNamespace",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
namespace_type="NotificationHub",
sku_name="Free")
example_hub = azure.notificationhub.Hub("exampleHub",
namespace_name=example_namespace.name,
resource_group_name=example_resource_group.name,
location=example_resource_group.location)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "Australia East"});
const exampleNamespace = new azure.notificationhub.Namespace("exampleNamespace", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
namespaceType: "NotificationHub",
skuName: "Free",
});
const exampleHub = new azure.notificationhub.Hub("exampleHub", {
namespaceName: exampleNamespace.name,
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
});Create a Hub Resource
new Hub(name: string, args: HubArgs, opts?: CustomResourceOptions);def Hub(resource_name, opts=None, apns_credential=None, gcm_credential=None, location=None, name=None, namespace_name=None, resource_group_name=None, tags=None, __props__=None);public Hub(string name, HubArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args HubArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HubArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HubArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Hub Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Hub resource accepts the following input properties:
- Namespace
Name string The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.
- Apns
Credential HubApns Credential Args A
apns_credentialblock as defined below.- Gcm
Credential HubGcm Credential Args A
gcm_credentialblock as defined below.- Location string
The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created.
- Name string
The name to use for this Notification Hub. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Namespace
Name string The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.
- Apns
Credential HubApns Credential A
apns_credentialblock as defined below.- Gcm
Credential HubGcm Credential A
gcm_credentialblock as defined below.- Location string
The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created.
- Name string
The name to use for this Notification Hub. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assign to the resource.
- namespace
Name string The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created.
- resource
Group stringName The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.
- apns
Credential HubApns Credential A
apns_credentialblock as defined below.- gcm
Credential HubGcm Credential A
gcm_credentialblock as defined below.- location string
The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created.
- name string
The name to use for this Notification Hub. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- namespace_
name str The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created.
- resource_
group_ strname The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.
- apns_
credential Dict[HubApns Credential] A
apns_credentialblock as defined below.- gcm_
credential Dict[HubGcm Credential] A
gcm_credentialblock as defined below.- location str
The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created.
- name str
The name to use for this Notification Hub. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Hub resource produces the following output properties:
Look up an Existing Hub Resource
Get an existing Hub resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: HubState, opts?: CustomResourceOptions): Hubstatic get(resource_name, id, opts=None, apns_credential=None, gcm_credential=None, location=None, name=None, namespace_name=None, resource_group_name=None, tags=None, __props__=None);public static Hub Get(string name, Input<string> id, HubState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Apns
Credential HubApns Credential Args A
apns_credentialblock as defined below.- Gcm
Credential HubGcm Credential Args A
gcm_credentialblock as defined below.- Location string
The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created.
- Name string
The name to use for this Notification Hub. Changing this forces a new resource to be created.
- Namespace
Name string The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Apns
Credential HubApns Credential A
apns_credentialblock as defined below.- Gcm
Credential HubGcm Credential A
gcm_credentialblock as defined below.- Location string
The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created.
- Name string
The name to use for this Notification Hub. Changing this forces a new resource to be created.
- Namespace
Name string The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assign to the resource.
- apns
Credential HubApns Credential A
apns_credentialblock as defined below.- gcm
Credential HubGcm Credential A
gcm_credentialblock as defined below.- location string
The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created.
- name string
The name to use for this Notification Hub. Changing this forces a new resource to be created.
- namespace
Name string The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created.
- resource
Group stringName The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assign to the resource.
- apns_
credential Dict[HubApns Credential] A
apns_credentialblock as defined below.- gcm_
credential Dict[HubGcm Credential] A
gcm_credentialblock as defined below.- location str
The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created.
- name str
The name to use for this Notification Hub. Changing this forces a new resource to be created.
- namespace_
name str The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created.
- resource_
group_ strname The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assign to the resource.
Supporting Types
HubApnsCredential
- 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. This is the contents of the
keydownloaded from the Apple Developer Portal between the-----BEGIN PRIVATE KEY-----and-----END PRIVATE KEY-----blocks.
- 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. This is the contents of the
keydownloaded from the Apple Developer Portal between the-----BEGIN PRIVATE KEY-----and-----END PRIVATE KEY-----blocks.
- 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. This is the contents of the
keydownloaded from the Apple Developer Portal between the-----BEGIN PRIVATE KEY-----and-----END PRIVATE KEY-----blocks.
- 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. This is the contents of the
keydownloaded from the Apple Developer Portal between the-----BEGIN PRIVATE KEY-----and-----END PRIVATE KEY-----blocks.
HubGcmCredential
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.