Azure Native

v1.87.0 published on Tuesday, Nov 22, 2022 by Pulumi

NotificationHubAuthorizationRule

Description of a Namespace AuthorizationRules. API Version: 2017-04-01.

Example Usage

NotificationHubAuthorizationRuleCreate

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var notificationHubAuthorizationRule = new AzureNative.NotificationHubs.NotificationHubAuthorizationRule("notificationHubAuthorizationRule", new()
    {
        AuthorizationRuleName = "DefaultListenSharedAccessSignature",
        NamespaceName = "nh-sdk-ns",
        NotificationHubName = "nh-sdk-hub",
        Properties = new AzureNative.NotificationHubs.Inputs.SharedAccessAuthorizationRulePropertiesArgs
        {
            Rights = new[]
            {
                AzureNative.NotificationHubs.AccessRights.Listen,
                AzureNative.NotificationHubs.AccessRights.Send,
            },
        },
        ResourceGroupName = "5ktrial",
    });

});
package main

import (
	notificationhubs "github.com/pulumi/pulumi-azure-native/sdk/go/azure/notificationhubs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := notificationhubs.NewNotificationHubAuthorizationRule(ctx, "notificationHubAuthorizationRule", &notificationhubs.NotificationHubAuthorizationRuleArgs{
			AuthorizationRuleName: pulumi.String("DefaultListenSharedAccessSignature"),
			NamespaceName:         pulumi.String("nh-sdk-ns"),
			NotificationHubName:   pulumi.String("nh-sdk-hub"),
			Properties: &notificationhubs.SharedAccessAuthorizationRulePropertiesArgs{
				Rights: notificationhubs.AccessRightsArray{
					notificationhubs.AccessRightsListen,
					notificationhubs.AccessRightsSend,
				},
			},
			ResourceGroupName: pulumi.String("5ktrial"),
		})
		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.NotificationHubAuthorizationRule;
import com.pulumi.azurenative.notificationhubs.NotificationHubAuthorizationRuleArgs;
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 notificationHubAuthorizationRule = new NotificationHubAuthorizationRule("notificationHubAuthorizationRule", NotificationHubAuthorizationRuleArgs.builder()        
            .authorizationRuleName("DefaultListenSharedAccessSignature")
            .namespaceName("nh-sdk-ns")
            .notificationHubName("nh-sdk-hub")
            .properties(Map.of("rights",             
                "Listen",
                "Send"))
            .resourceGroupName("5ktrial")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

notification_hub_authorization_rule = azure_native.notificationhubs.NotificationHubAuthorizationRule("notificationHubAuthorizationRule",
    authorization_rule_name="DefaultListenSharedAccessSignature",
    namespace_name="nh-sdk-ns",
    notification_hub_name="nh-sdk-hub",
    properties=azure_native.notificationhubs.SharedAccessAuthorizationRulePropertiesArgs(
        rights=[
            azure_native.notificationhubs.AccessRights.LISTEN,
            azure_native.notificationhubs.AccessRights.SEND,
        ],
    ),
    resource_group_name="5ktrial")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const notificationHubAuthorizationRule = new azure_native.notificationhubs.NotificationHubAuthorizationRule("notificationHubAuthorizationRule", {
    authorizationRuleName: "DefaultListenSharedAccessSignature",
    namespaceName: "nh-sdk-ns",
    notificationHubName: "nh-sdk-hub",
    properties: {
        rights: [
            azure_native.notificationhubs.AccessRights.Listen,
            azure_native.notificationhubs.AccessRights.Send,
        ],
    },
    resourceGroupName: "5ktrial",
});
resources:
  notificationHubAuthorizationRule:
    type: azure-native:notificationhubs:NotificationHubAuthorizationRule
    properties:
      authorizationRuleName: DefaultListenSharedAccessSignature
      namespaceName: nh-sdk-ns
      notificationHubName: nh-sdk-hub
      properties:
        rights:
          - Listen
          - Send
      resourceGroupName: 5ktrial

Create NotificationHubAuthorizationRule Resource

new NotificationHubAuthorizationRule(name: string, args: NotificationHubAuthorizationRuleArgs, opts?: CustomResourceOptions);
@overload
def NotificationHubAuthorizationRule(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     authorization_rule_name: Optional[str] = None,
                                     namespace_name: Optional[str] = None,
                                     notification_hub_name: Optional[str] = None,
                                     properties: Optional[SharedAccessAuthorizationRulePropertiesArgs] = None,
                                     resource_group_name: Optional[str] = None)
@overload
def NotificationHubAuthorizationRule(resource_name: str,
                                     args: NotificationHubAuthorizationRuleArgs,
                                     opts: Optional[ResourceOptions] = None)
func NewNotificationHubAuthorizationRule(ctx *Context, name string, args NotificationHubAuthorizationRuleArgs, opts ...ResourceOption) (*NotificationHubAuthorizationRule, error)
public NotificationHubAuthorizationRule(string name, NotificationHubAuthorizationRuleArgs args, CustomResourceOptions? opts = null)
public NotificationHubAuthorizationRule(String name, NotificationHubAuthorizationRuleArgs args)
public NotificationHubAuthorizationRule(String name, NotificationHubAuthorizationRuleArgs args, CustomResourceOptions options)
type: azure-native:notificationhubs:NotificationHubAuthorizationRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args NotificationHubAuthorizationRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args NotificationHubAuthorizationRuleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args NotificationHubAuthorizationRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args NotificationHubAuthorizationRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args NotificationHubAuthorizationRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

NotificationHubAuthorizationRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The NotificationHubAuthorizationRule resource accepts the following input properties:

NamespaceName string

The namespace name.

NotificationHubName string

The notification hub name.

Properties Pulumi.AzureNative.NotificationHubs.Inputs.SharedAccessAuthorizationRulePropertiesArgs

Properties of the Namespace AuthorizationRules.

ResourceGroupName string

The name of the resource group.

AuthorizationRuleName string

Authorization Rule Name.

NamespaceName string

The namespace name.

NotificationHubName string

The notification hub name.

Properties SharedAccessAuthorizationRulePropertiesArgs

Properties of the Namespace AuthorizationRules.

ResourceGroupName string

The name of the resource group.

AuthorizationRuleName string

Authorization Rule Name.

namespaceName String

The namespace name.

notificationHubName String

The notification hub name.

properties SharedAccessAuthorizationRulePropertiesArgs

Properties of the Namespace AuthorizationRules.

resourceGroupName String

The name of the resource group.

authorizationRuleName String

Authorization Rule Name.

namespaceName string

The namespace name.

notificationHubName string

The notification hub name.

properties SharedAccessAuthorizationRulePropertiesArgs

Properties of the Namespace AuthorizationRules.

resourceGroupName string

The name of the resource group.

authorizationRuleName string

Authorization Rule Name.

namespace_name str

The namespace name.

notification_hub_name str

The notification hub name.

properties SharedAccessAuthorizationRulePropertiesArgs

Properties of the Namespace AuthorizationRules.

resource_group_name str

The name of the resource group.

authorization_rule_name str

Authorization Rule Name.

namespaceName String

The namespace name.

notificationHubName String

The notification hub name.

properties Property Map

Properties of the Namespace AuthorizationRules.

resourceGroupName String

The name of the resource group.

authorizationRuleName String

Authorization Rule Name.

Outputs

All input properties are implicitly available as output properties. Additionally, the NotificationHubAuthorizationRule resource produces the following output properties:

ClaimType string

A string that describes the claim type

ClaimValue string

A string that describes the claim value

CreatedTime string

The created time for this rule

Id string

The provider-assigned unique ID for this managed resource.

KeyName string

A string that describes the authorization rule.

ModifiedTime string

The last modified time for this rule

Name string

Resource name

PrimaryKey string

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

Revision int

The revision number for the rule

SecondaryKey string

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

Type string

Resource type

Location string

Resource location

Rights List<string>

The rights associated with the rule.

Sku Pulumi.AzureNative.NotificationHubs.Outputs.SkuResponse

The sku of the created namespace

Tags Dictionary<string, string>

Resource tags

ClaimType string

A string that describes the claim type

ClaimValue string

A string that describes the claim value

CreatedTime string

The created time for this rule

Id string

The provider-assigned unique ID for this managed resource.

KeyName string

A string that describes the authorization rule.

ModifiedTime string

The last modified time for this rule

Name string

Resource name

PrimaryKey string

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

Revision int

The revision number for the rule

SecondaryKey string

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

Type string

Resource type

Location string

Resource location

Rights []string

The rights associated with the rule.

Sku SkuResponse

The sku of the created namespace

Tags map[string]string

Resource tags

claimType String

A string that describes the claim type

claimValue String

A string that describes the claim value

createdTime String

The created time for this rule

id String

The provider-assigned unique ID for this managed resource.

keyName String

A string that describes the authorization rule.

modifiedTime String

The last modified time for this rule

name String

Resource name

primaryKey String

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

revision Integer

The revision number for the rule

secondaryKey String

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

type String

Resource type

location String

Resource location

rights List<String>

The rights associated with the rule.

sku SkuResponse

The sku of the created namespace

tags Map<String,String>

Resource tags

claimType string

A string that describes the claim type

claimValue string

A string that describes the claim value

createdTime string

The created time for this rule

id string

The provider-assigned unique ID for this managed resource.

keyName string

A string that describes the authorization rule.

modifiedTime string

The last modified time for this rule

name string

Resource name

primaryKey string

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

revision number

The revision number for the rule

secondaryKey string

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

type string

Resource type

location string

Resource location

rights string[]

The rights associated with the rule.

sku SkuResponse

The sku of the created namespace

tags {[key: string]: string}

Resource tags

claim_type str

A string that describes the claim type

claim_value str

A string that describes the claim value

created_time str

The created time for this rule

id str

The provider-assigned unique ID for this managed resource.

key_name str

A string that describes the authorization rule.

modified_time str

The last modified time for this rule

name str

Resource name

primary_key str

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

revision int

The revision number for the rule

secondary_key str

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

type str

Resource type

location str

Resource location

rights Sequence[str]

The rights associated with the rule.

sku SkuResponse

The sku of the created namespace

tags Mapping[str, str]

Resource tags

claimType String

A string that describes the claim type

claimValue String

A string that describes the claim value

createdTime String

The created time for this rule

id String

The provider-assigned unique ID for this managed resource.

keyName String

A string that describes the authorization rule.

modifiedTime String

The last modified time for this rule

name String

Resource name

primaryKey String

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

revision Number

The revision number for the rule

secondaryKey String

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

type String

Resource type

location String

Resource location

rights List<String>

The rights associated with the rule.

sku Property Map

The sku of the created namespace

tags Map<String>

Resource tags

Supporting Types

AccessRights

Manage
Manage
Send
Send
Listen
Listen
AccessRightsManage
Manage
AccessRightsSend
Send
AccessRightsListen
Listen
Manage
Manage
Send
Send
Listen
Listen
Manage
Manage
Send
Send
Listen
Listen
MANAGE
Manage
SEND
Send
LISTEN
Listen
"Manage"
Manage
"Send"
Send
"Listen"
Listen

SharedAccessAuthorizationRuleProperties

Rights []AccessRights

The rights associated with the rule.

rights List<AccessRights>

The rights associated with the rule.

rights AccessRights[]

The rights associated with the rule.

rights Sequence[AccessRights]

The rights associated with the rule.

rights List<"Manage" | "Send" | "Listen">

The rights associated with the rule.

SkuResponse

Name string

Name of the notification hub sku

Capacity int

The capacity of the resource

Family string

The Sku Family

Size string

The Sku size

Tier string

The tier of particular sku

Name string

Name of the notification hub sku

Capacity int

The capacity of the resource

Family string

The Sku Family

Size string

The Sku size

Tier string

The tier of particular sku

name String

Name of the notification hub sku

capacity Integer

The capacity of the resource

family String

The Sku Family

size String

The Sku size

tier String

The tier of particular sku

name string

Name of the notification hub sku

capacity number

The capacity of the resource

family string

The Sku Family

size string

The Sku size

tier string

The tier of particular sku

name str

Name of the notification hub sku

capacity int

The capacity of the resource

family str

The Sku Family

size str

The Sku size

tier str

The tier of particular sku

name String

Name of the notification hub sku

capacity Number

The capacity of the resource

family String

The Sku Family

size String

The Sku size

tier String

The tier of particular sku

Import

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

$ pulumi import azure-native:notificationhubs:NotificationHubAuthorizationRule DefaultListenSharedAccessSignature /subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/NotificationHubs/nh-sdk-hub/AuthorizationRules/DefaultListenSharedAccessSignature 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0