NamespaceArgs

data class NamespaceArgs(val dataCenter: Output<String>? = null, val location: Output<String>? = null, val namespaceName: Output<String>? = null, val namespaceType: Output<Either<String, NamespaceType>>? = null, val networkAcls: Output<NetworkAclsArgs>? = null, val pnsCredentials: Output<PnsCredentialsArgs>? = null, val provisioningState: Output<Either<String, OperationProvisioningState>>? = null, val publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null, val replicationRegion: Output<Either<String, ReplicationRegion>>? = null, val resourceGroupName: Output<String>? = null, val scaleUnit: Output<String>? = null, val sku: Output<SkuArgs>? = null, val status: Output<Either<String, NamespaceStatus>>? = null, val tags: Output<Map<String, String>>? = null, val zoneRedundancy: Output<Either<String, ZoneRedundancyPreference>>? = null) : ConvertibleToJava<NamespaceArgs>

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", &notificationhubs.NamespaceArgs{
Location: pulumi.String("South Central US"),
NamespaceName: pulumi.String("nh-sdk-ns"),
NetworkAcls: &notificationhubs.NetworkAclsArgs{
IpRules: notificationhubs.IpRuleArray{
&notificationhubs.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: &notificationhubs.PublicInternetAuthorizationRuleArgs{
Rights: pulumi.StringArray{
pulumi.String(notificationhubs.AccessRightsListen),
},
},
},
ResourceGroupName: pulumi.String("5ktrial"),
Sku: &notificationhubs.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}

Constructors

Link copied to clipboard
constructor(dataCenter: Output<String>? = null, location: Output<String>? = null, namespaceName: Output<String>? = null, namespaceType: Output<Either<String, NamespaceType>>? = null, networkAcls: Output<NetworkAclsArgs>? = null, pnsCredentials: Output<PnsCredentialsArgs>? = null, provisioningState: Output<Either<String, OperationProvisioningState>>? = null, publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null, replicationRegion: Output<Either<String, ReplicationRegion>>? = null, resourceGroupName: Output<String>? = null, scaleUnit: Output<String>? = null, sku: Output<SkuArgs>? = null, status: Output<Either<String, NamespaceStatus>>? = null, tags: Output<Map<String, String>>? = null, zoneRedundancy: Output<Either<String, ZoneRedundancyPreference>>? = null)

Properties

Link copied to clipboard
val dataCenter: Output<String>? = null

Deprecated.

Link copied to clipboard
val location: Output<String>? = null

The geo-location where the resource lives

Link copied to clipboard
val namespaceName: Output<String>? = null

Namespace name

Link copied to clipboard
val namespaceType: Output<Either<String, NamespaceType>>? = null

Defines values for NamespaceType.

Link copied to clipboard
val networkAcls: Output<NetworkAclsArgs>? = null

A collection of network authorization rules.

Link copied to clipboard
val pnsCredentials: Output<PnsCredentialsArgs>? = null

Collection of Notification Hub or Notification Hub Namespace PNS credentials.

Link copied to clipboard

Defines values for OperationProvisioningState.

Link copied to clipboard
val publicNetworkAccess: Output<Either<String, PublicNetworkAccess>>? = null

Type of public network access.

Link copied to clipboard
val replicationRegion: Output<Either<String, ReplicationRegion>>? = null

Allowed replication region

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val scaleUnit: Output<String>? = null

Gets or sets scaleUnit where the namespace gets created

Link copied to clipboard
val sku: Output<SkuArgs>? = null

The Sku description for a namespace

Link copied to clipboard
val status: Output<Either<String, NamespaceStatus>>? = null

Namespace status.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val zoneRedundancy: Output<Either<String, ZoneRedundancyPreference>>? = null

Namespace SKU name.

Functions

Link copied to clipboard
open override fun toJava(): NamespaceArgs