NamespaceAuthorizationRuleArgs

data class NamespaceAuthorizationRuleArgs(val authorizationRuleName: Output<String>? = null, val location: Output<String>? = null, val namespaceName: Output<String>? = null, val primaryKey: Output<String>? = null, val resourceGroupName: Output<String>? = null, val rights: Output<List<Either<String, AccessRights>>>? = null, val secondaryKey: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<NamespaceAuthorizationRuleArgs>

Response for POST requests that return single SharedAccessAuthorizationRule. 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_CreateOrUpdateAuthorizationRule

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var namespaceAuthorizationRule = new AzureNative.NotificationHubs.NamespaceAuthorizationRule("namespaceAuthorizationRule", new()
{
AuthorizationRuleName = "sdk-AuthRules-1788",
NamespaceName = "nh-sdk-ns",
ResourceGroupName = "5ktrial",
Rights = new[]
{
AzureNative.NotificationHubs.AccessRights.Listen,
AzureNative.NotificationHubs.AccessRights.Send,
},
});
});
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.NewNamespaceAuthorizationRule(ctx, "namespaceAuthorizationRule", &notificationhubs.NamespaceAuthorizationRuleArgs{
AuthorizationRuleName: pulumi.String("sdk-AuthRules-1788"),
NamespaceName: pulumi.String("nh-sdk-ns"),
ResourceGroupName: pulumi.String("5ktrial"),
Rights: pulumi.StringArray{
pulumi.String(notificationhubs.AccessRightsListen),
pulumi.String(notificationhubs.AccessRightsSend),
},
})
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.NamespaceAuthorizationRule;
import com.pulumi.azurenative.notificationhubs.NamespaceAuthorizationRuleArgs;
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 namespaceAuthorizationRule = new NamespaceAuthorizationRule("namespaceAuthorizationRule", NamespaceAuthorizationRuleArgs.builder()
.authorizationRuleName("sdk-AuthRules-1788")
.namespaceName("nh-sdk-ns")
.resourceGroupName("5ktrial")
.rights(
"Listen",
"Send")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:notificationhubs:NamespaceAuthorizationRule NewAuthorizationRule /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}

Constructors

Link copied to clipboard
constructor(authorizationRuleName: Output<String>? = null, location: Output<String>? = null, namespaceName: Output<String>? = null, primaryKey: Output<String>? = null, resourceGroupName: Output<String>? = null, rights: Output<List<Either<String, AccessRights>>>? = null, secondaryKey: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

Authorization Rule Name

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

Deprecated - only for compatibility.

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

Namespace name

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

Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.

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 rights: Output<List<Either<String, AccessRights>>>? = null

Gets or sets the rights associated with the rule.

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

Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.

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

Deprecated - only for compatibility.

Functions

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