AuthorizationRule

Manages an Authorization Rule associated with 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,
        });
        var exampleAuthorizationRule = new Azure.NotificationHub.AuthorizationRule("exampleAuthorizationRule", new Azure.NotificationHub.AuthorizationRuleArgs
        {
            NotificationHubName = exampleHub.Name,
            NamespaceName = exampleNamespace.Name,
            ResourceGroupName = exampleResourceGroup.Name,
            Manage = true,
            Send = true,
            Listen = true,
        });
    }

}
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", &notificationhub.NamespaceArgs{
            ResourceGroupName: exampleResourceGroup.Name,
            Location:          exampleResourceGroup.Location,
            NamespaceType:     pulumi.String("NotificationHub"),
            SkuName:           pulumi.String("Free"),
        })
        if err != nil {
            return err
        }
        exampleHub, err := notificationhub.NewHub(ctx, "exampleHub", &notificationhub.HubArgs{
            NamespaceName:     exampleNamespace.Name,
            ResourceGroupName: exampleResourceGroup.Name,
            Location:          exampleResourceGroup.Location,
        })
        if err != nil {
            return err
        }
        _, err = notificationhub.NewAuthorizationRule(ctx, "exampleAuthorizationRule", &notificationhub.AuthorizationRuleArgs{
            NotificationHubName: exampleHub.Name,
            NamespaceName:       exampleNamespace.Name,
            ResourceGroupName:   exampleResourceGroup.Name,
            Manage:              pulumi.Bool(true),
            Send:                pulumi.Bool(true),
            Listen:              pulumi.Bool(true),
        })
        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)
example_authorization_rule = azure.notificationhub.AuthorizationRule("exampleAuthorizationRule",
    notification_hub_name=example_hub.name,
    namespace_name=example_namespace.name,
    resource_group_name=example_resource_group.name,
    manage=True,
    send=True,
    listen=True)
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,
});
const exampleAuthorizationRule = new azure.notificationhub.AuthorizationRule("exampleAuthorizationRule", {
    notificationHubName: exampleHub.name,
    namespaceName: exampleNamespace.name,
    resourceGroupName: exampleResourceGroup.name,
    manage: true,
    send: true,
    listen: true,
});

Create a AuthorizationRule Resource

def AuthorizationRule(resource_name, opts=None, listen=None, manage=None, name=None, namespace_name=None, notification_hub_name=None, resource_group_name=None, send=None, __props__=None);
name string
The unique name of the resource.
args AuthorizationRuleArgs
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 AuthorizationRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuthorizationRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AuthorizationRule Resource Properties

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

Inputs

The AuthorizationRule resource accepts the following input properties:

NamespaceName string

The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created.

NotificationHubName string

The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.

Listen bool

Does this Authorization Rule have Listen access to the Notification Hub? Defaults to false.

Manage bool

Does this Authorization Rule have Manage access to the Notification Hub? Defaults to false.

Name string

The name to use for this Authorization Rule. Changing this forces a new resource to be created.

Send bool

Does this Authorization Rule have Send access to the Notification Hub? Defaults to false.

NamespaceName string

The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created.

NotificationHubName string

The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.

Listen bool

Does this Authorization Rule have Listen access to the Notification Hub? Defaults to false.

Manage bool

Does this Authorization Rule have Manage access to the Notification Hub? Defaults to false.

Name string

The name to use for this Authorization Rule. Changing this forces a new resource to be created.

Send bool

Does this Authorization Rule have Send access to the Notification Hub? Defaults to false.

namespaceName string

The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created.

notificationHubName string

The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created.

resourceGroupName string

The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.

listen boolean

Does this Authorization Rule have Listen access to the Notification Hub? Defaults to false.

manage boolean

Does this Authorization Rule have Manage access to the Notification Hub? Defaults to false.

name string

The name to use for this Authorization Rule. Changing this forces a new resource to be created.

send boolean

Does this Authorization Rule have Send access to the Notification Hub? Defaults to false.

namespace_name str

The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created.

notification_hub_name str

The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created.

resource_group_name str

The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.

listen bool

Does this Authorization Rule have Listen access to the Notification Hub? Defaults to false.

manage bool

Does this Authorization Rule have Manage access to the Notification Hub? Defaults to false.

name str

The name to use for this Authorization Rule. Changing this forces a new resource to be created.

send bool

Does this Authorization Rule have Send access to the Notification Hub? Defaults to false.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
PrimaryAccessKey string

The Primary Access Key associated with this Authorization Rule.

SecondaryAccessKey string

The Secondary Access Key associated with this Authorization Rule.

Id string
The provider-assigned unique ID for this managed resource.
PrimaryAccessKey string

The Primary Access Key associated with this Authorization Rule.

SecondaryAccessKey string

The Secondary Access Key associated with this Authorization Rule.

id string
The provider-assigned unique ID for this managed resource.
primaryAccessKey string

The Primary Access Key associated with this Authorization Rule.

secondaryAccessKey string

The Secondary Access Key associated with this Authorization Rule.

id str
The provider-assigned unique ID for this managed resource.
primary_access_key str

The Primary Access Key associated with this Authorization Rule.

secondary_access_key str

The Secondary Access Key associated with this Authorization Rule.

Look up an Existing AuthorizationRule Resource

Get an existing AuthorizationRule 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?: AuthorizationRuleState, opts?: CustomResourceOptions): AuthorizationRule
static get(resource_name, id, opts=None, listen=None, manage=None, name=None, namespace_name=None, notification_hub_name=None, primary_access_key=None, resource_group_name=None, secondary_access_key=None, send=None, __props__=None);
func GetAuthorizationRule(ctx *Context, name string, id IDInput, state *AuthorizationRuleState, opts ...ResourceOption) (*AuthorizationRule, error)
public static AuthorizationRule Get(string name, Input<string> id, AuthorizationRuleState? 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:

Listen bool

Does this Authorization Rule have Listen access to the Notification Hub? Defaults to false.

Manage bool

Does this Authorization Rule have Manage access to the Notification Hub? Defaults to false.

Name string

The name to use for this Authorization Rule. Changing this forces a new resource to be created.

NamespaceName string

The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created.

NotificationHubName string

The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created.

PrimaryAccessKey string

The Primary Access Key associated with this Authorization Rule.

ResourceGroupName string

The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.

SecondaryAccessKey string

The Secondary Access Key associated with this Authorization Rule.

Send bool

Does this Authorization Rule have Send access to the Notification Hub? Defaults to false.

Listen bool

Does this Authorization Rule have Listen access to the Notification Hub? Defaults to false.

Manage bool

Does this Authorization Rule have Manage access to the Notification Hub? Defaults to false.

Name string

The name to use for this Authorization Rule. Changing this forces a new resource to be created.

NamespaceName string

The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created.

NotificationHubName string

The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created.

PrimaryAccessKey string

The Primary Access Key associated with this Authorization Rule.

ResourceGroupName string

The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.

SecondaryAccessKey string

The Secondary Access Key associated with this Authorization Rule.

Send bool

Does this Authorization Rule have Send access to the Notification Hub? Defaults to false.

listen boolean

Does this Authorization Rule have Listen access to the Notification Hub? Defaults to false.

manage boolean

Does this Authorization Rule have Manage access to the Notification Hub? Defaults to false.

name string

The name to use for this Authorization Rule. Changing this forces a new resource to be created.

namespaceName string

The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created.

notificationHubName string

The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created.

primaryAccessKey string

The Primary Access Key associated with this Authorization Rule.

resourceGroupName string

The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.

secondaryAccessKey string

The Secondary Access Key associated with this Authorization Rule.

send boolean

Does this Authorization Rule have Send access to the Notification Hub? Defaults to false.

listen bool

Does this Authorization Rule have Listen access to the Notification Hub? Defaults to false.

manage bool

Does this Authorization Rule have Manage access to the Notification Hub? Defaults to false.

name str

The name to use for this Authorization Rule. Changing this forces a new resource to be created.

namespace_name str

The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created.

notification_hub_name str

The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created.

primary_access_key str

The Primary Access Key associated with this Authorization Rule.

resource_group_name str

The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created.

secondary_access_key str

The Secondary Access Key associated with this Authorization Rule.

send bool

Does this Authorization Rule have Send access to the Notification Hub? Defaults to false.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.