1. Packages
  2. Azure Native v1
  3. API Docs
  4. notificationhubs
  5. NamespaceAuthorizationRule
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.notificationhubs.NamespaceAuthorizationRule

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

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

    Example Usage

    NameSpaceAuthorizationRuleCreate

    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",
            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/notificationhubs"
    	"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"),
    			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.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")
                .properties(Map.of("rights",             
                    "Listen",
                    "Send"))
                .resourceGroupName("5ktrial")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    namespace_authorization_rule = azure_native.notificationhubs.NamespaceAuthorizationRule("namespaceAuthorizationRule",
        authorization_rule_name="sdk-AuthRules-1788",
        namespace_name="nh-sdk-ns",
        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 namespaceAuthorizationRule = new azure_native.notificationhubs.NamespaceAuthorizationRule("namespaceAuthorizationRule", {
        authorizationRuleName: "sdk-AuthRules-1788",
        namespaceName: "nh-sdk-ns",
        properties: {
            rights: [
                azure_native.notificationhubs.AccessRights.Listen,
                azure_native.notificationhubs.AccessRights.Send,
            ],
        },
        resourceGroupName: "5ktrial",
    });
    
    resources:
      namespaceAuthorizationRule:
        type: azure-native:notificationhubs:NamespaceAuthorizationRule
        properties:
          authorizationRuleName: sdk-AuthRules-1788
          namespaceName: nh-sdk-ns
          properties:
            rights:
              - Listen
              - Send
          resourceGroupName: 5ktrial
    

    Create NamespaceAuthorizationRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

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

    Parameters

    name string
    The unique name of the resource.
    args NamespaceAuthorizationRuleArgs
    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 NamespaceAuthorizationRuleArgs
    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 NamespaceAuthorizationRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NamespaceAuthorizationRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NamespaceAuthorizationRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var azure_nativeNamespaceAuthorizationRuleResource = new AzureNative.Notificationhubs.NamespaceAuthorizationRule("azure-nativeNamespaceAuthorizationRuleResource", new()
    {
        NamespaceName = "string",
        Properties = 
        {
            { "rights", new[]
            {
                "Manage",
            } },
        },
        ResourceGroupName = "string",
        AuthorizationRuleName = "string",
    });
    
    example, err := notificationhubs.NewNamespaceAuthorizationRule(ctx, "azure-nativeNamespaceAuthorizationRuleResource", &notificationhubs.NamespaceAuthorizationRuleArgs{
    	NamespaceName: "string",
    	Properties: map[string]interface{}{
    		"rights": []string{
    			"Manage",
    		},
    	},
    	ResourceGroupName:     "string",
    	AuthorizationRuleName: "string",
    })
    
    var azure_nativeNamespaceAuthorizationRuleResource = new NamespaceAuthorizationRule("azure-nativeNamespaceAuthorizationRuleResource", NamespaceAuthorizationRuleArgs.builder()
        .namespaceName("string")
        .properties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .resourceGroupName("string")
        .authorizationRuleName("string")
        .build());
    
    azure_native_namespace_authorization_rule_resource = azure_native.notificationhubs.NamespaceAuthorizationRule("azure-nativeNamespaceAuthorizationRuleResource",
        namespace_name=string,
        properties={
            rights: [Manage],
        },
        resource_group_name=string,
        authorization_rule_name=string)
    
    const azure_nativeNamespaceAuthorizationRuleResource = new azure_native.notificationhubs.NamespaceAuthorizationRule("azure-nativeNamespaceAuthorizationRuleResource", {
        namespaceName: "string",
        properties: {
            rights: ["Manage"],
        },
        resourceGroupName: "string",
        authorizationRuleName: "string",
    });
    
    type: azure-native:notificationhubs:NamespaceAuthorizationRule
    properties:
        authorizationRuleName: string
        namespaceName: string
        properties:
            rights:
                - Manage
        resourceGroupName: string
    

    NamespaceAuthorizationRule Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The NamespaceAuthorizationRule resource accepts the following input properties:

    NamespaceName string
    The namespace name.
    Properties Pulumi.AzureNative.NotificationHubs.Inputs.SharedAccessAuthorizationRuleProperties
    Properties of the Namespace AuthorizationRules.
    ResourceGroupName string
    The name of the resource group.
    AuthorizationRuleName string
    Authorization Rule Name.
    NamespaceName string
    The namespace 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.
    properties SharedAccessAuthorizationRuleProperties
    Properties of the Namespace AuthorizationRules.
    resourceGroupName String
    The name of the resource group.
    authorizationRuleName String
    Authorization Rule Name.
    namespaceName string
    The namespace name.
    properties SharedAccessAuthorizationRuleProperties
    Properties of the Namespace AuthorizationRules.
    resourceGroupName string
    The name of the resource group.
    authorizationRuleName string
    Authorization Rule Name.
    namespace_name str
    The namespace 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.
    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 NamespaceAuthorizationRule 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, AccessRightsArgs

    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, SharedAccessAuthorizationRulePropertiesArgs

    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, SkuResponseArgs

    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:NamespaceAuthorizationRule sdk-AuthRules-1788 /subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/ArunMonocle/providers/Microsoft.NotificationHubs/namespaces/sdk-Namespace-6914/AuthorizationRules/sdk-AuthRules-1788 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi