Namespace
Notification Hubs Namespace Resource. Uses Azure REST API version 2023-10-01-preview. In version 2.x of the Azure Native provider, it used API version 2023-01-01-preview. Other available API versions: 2023-01-01-preview, 2023-09-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native notificationhubs [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Namespaces_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var @namespace = new AzureNative.NotificationHubs.Namespace("namespace", new()
{
Location = "South Central US",
NamespaceName = "nh-sdk-ns",
NetworkAcls = new AzureNative.NotificationHubs.Inputs.NetworkAclsArgs
{
IpRules = new[]
{
new AzureNative.NotificationHubs.Inputs.IpRuleArgs
{
IpMask = "185.48.100.00/24",
Rights = new[]
{
AzureNative.NotificationHubs.AccessRights.Manage,
AzureNative.NotificationHubs.AccessRights.Send,
AzureNative.NotificationHubs.AccessRights.Listen,
},
},
},
PublicNetworkRule = new AzureNative.NotificationHubs.Inputs.PublicInternetAuthorizationRuleArgs
{
Rights = new[]
{
AzureNative.NotificationHubs.AccessRights.Listen,
},
},
},
ResourceGroupName = "5ktrial",
Sku = new AzureNative.NotificationHubs.Inputs.SkuArgs
{
Name = AzureNative.NotificationHubs.SkuName.Standard,
Tier = "Standard",
},
Tags =
{
{ "tag1", "value1" },
{ "tag2", "value2" },
},
ZoneRedundancy = AzureNative.NotificationHubs.ZoneRedundancyPreference.Enabled,
});
});
package main
import (
notificationhubs "github.com/pulumi/pulumi-azure-native-sdk/notificationhubs/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := notificationhubs.NewNamespace(ctx, "namespace", ¬ificationhubs.NamespaceArgs{
Location: pulumi.String("South Central US"),
NamespaceName: pulumi.String("nh-sdk-ns"),
NetworkAcls: ¬ificationhubs.NetworkAclsArgs{
IpRules: notificationhubs.IpRuleArray{
¬ificationhubs.IpRuleArgs{
IpMask: pulumi.String("185.48.100.00/24"),
Rights: pulumi.StringArray{
pulumi.String(notificationhubs.AccessRightsManage),
pulumi.String(notificationhubs.AccessRightsSend),
pulumi.String(notificationhubs.AccessRightsListen),
},
},
},
PublicNetworkRule: ¬ificationhubs.PublicInternetAuthorizationRuleArgs{
Rights: pulumi.StringArray{
pulumi.String(notificationhubs.AccessRightsListen),
},
},
},
ResourceGroupName: pulumi.String("5ktrial"),
Sku: ¬ificationhubs.SkuArgs{
Name: pulumi.String(notificationhubs.SkuNameStandard),
Tier: pulumi.String("Standard"),
},
Tags: pulumi.StringMap{
"tag1": pulumi.String("value1"),
"tag2": pulumi.String("value2"),
},
ZoneRedundancy: pulumi.String(notificationhubs.ZoneRedundancyPreferenceEnabled),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.notificationhubs.Namespace;
import com.pulumi.azurenative.notificationhubs.NamespaceArgs;
import com.pulumi.azurenative.notificationhubs.inputs.NetworkAclsArgs;
import com.pulumi.azurenative.notificationhubs.inputs.PublicInternetAuthorizationRuleArgs;
import com.pulumi.azurenative.notificationhubs.inputs.SkuArgs;
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) {
var namespace = new Namespace("namespace", NamespaceArgs.builder()
.location("South Central US")
.namespaceName("nh-sdk-ns")
.networkAcls(NetworkAclsArgs.builder()
.ipRules(IpRuleArgs.builder()
.ipMask("185.48.100.00/24")
.rights(
"Manage",
"Send",
"Listen")
.build())
.publicNetworkRule(PublicInternetAuthorizationRuleArgs.builder()
.rights("Listen")
.build())
.build())
.resourceGroupName("5ktrial")
.sku(SkuArgs.builder()
.name("Standard")
.tier("Standard")
.build())
.tags(Map.ofEntries(
Map.entry("tag1", "value1"),
Map.entry("tag2", "value2")
))
.zoneRedundancy("Enabled")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:notificationhubs:Namespace nh-sdk-ns /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}
Properties
The Azure API version of the resource.
Deprecated.
Defines values for NamespaceType.
A collection of network authorization rules.
Collection of Notification Hub or Notification Hub Namespace PNS credentials.
Private Endpoint Connections for namespace
Defines values for OperationProvisioningState.
Type of public network access.
Allowed replication region
Gets or sets endpoint you can use to perform NotificationHub operations.
The Sku description for a namespace
Namespace subscription id.
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Namespace SKU name.