azure-native.notificationhubs.NamespaceAuthorizationRule
Explore with Pulumi AI
Response for POST requests that return single SharedAccessAuthorizationRule. Azure REST API version: 2023-01-01-preview. Prior API version in Azure Native 1.x: 2017-04-01.
Other available API versions: 2017-04-01, 2023-09-01, 2023-10-01-preview.
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",
        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/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := notificationhubs.NewNamespaceAuthorizationRule(ctx, "namespaceAuthorizationRule", ¬ificationhubs.NamespaceAuthorizationRuleArgs{
			AuthorizationRuleName: pulumi.String("sdk-AuthRules-1788"),
			NamespaceName:         pulumi.String("nh-sdk-ns"),
			Properties: ¬ificationhubs.SharedAccessAuthorizationRulePropertiesArgs{
				Rights: pulumi.StringArray{
					pulumi.String(notificationhubs.AccessRightsListen),
					pulumi.String(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 com.pulumi.azurenative.notificationhubs.inputs.SharedAccessAuthorizationRulePropertiesArgs;
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(SharedAccessAuthorizationRulePropertiesArgs.builder()
                .rights(                
                    "Listen",
                    "Send")
                .build())
            .resourceGroupName("5ktrial")
            .build());
    }
}
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",
});
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={
        "rights": [
            azure_native.notificationhubs.AccessRights.LISTEN,
            azure_native.notificationhubs.AccessRights.SEND,
        ],
    },
    resource_group_name="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,
                               resource_group_name: Optional[str] = None,
                               authorization_rule_name: Optional[str] = None,
                               location: Optional[str] = None,
                               properties: Optional[SharedAccessAuthorizationRulePropertiesArgs] = None,
                               tags: Optional[Mapping[str, 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",
    ResourceGroupName = "string",
    AuthorizationRuleName = "string",
    Location = "string",
    Properties = new AzureNative.NotificationHubs.Inputs.SharedAccessAuthorizationRulePropertiesArgs
    {
        Rights = new[]
        {
            "string",
        },
        PrimaryKey = "string",
        SecondaryKey = "string",
    },
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := notificationhubs.NewNamespaceAuthorizationRule(ctx, "azure-nativeNamespaceAuthorizationRuleResource", ¬ificationhubs.NamespaceAuthorizationRuleArgs{
	NamespaceName:         pulumi.String("string"),
	ResourceGroupName:     pulumi.String("string"),
	AuthorizationRuleName: pulumi.String("string"),
	Location:              pulumi.String("string"),
	Properties: ¬ificationhubs.SharedAccessAuthorizationRulePropertiesArgs{
		Rights: pulumi.StringArray{
			pulumi.String("string"),
		},
		PrimaryKey:   pulumi.String("string"),
		SecondaryKey: pulumi.String("string"),
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var azure_nativeNamespaceAuthorizationRuleResource = new NamespaceAuthorizationRule("azure-nativeNamespaceAuthorizationRuleResource", NamespaceAuthorizationRuleArgs.builder()
    .namespaceName("string")
    .resourceGroupName("string")
    .authorizationRuleName("string")
    .location("string")
    .properties(SharedAccessAuthorizationRulePropertiesArgs.builder()
        .rights("string")
        .primaryKey("string")
        .secondaryKey("string")
        .build())
    .tags(Map.of("string", "string"))
    .build());
azure_native_namespace_authorization_rule_resource = azure_native.notificationhubs.NamespaceAuthorizationRule("azure-nativeNamespaceAuthorizationRuleResource",
    namespace_name="string",
    resource_group_name="string",
    authorization_rule_name="string",
    location="string",
    properties={
        "rights": ["string"],
        "primary_key": "string",
        "secondary_key": "string",
    },
    tags={
        "string": "string",
    })
const azure_nativeNamespaceAuthorizationRuleResource = new azure_native.notificationhubs.NamespaceAuthorizationRule("azure-nativeNamespaceAuthorizationRuleResource", {
    namespaceName: "string",
    resourceGroupName: "string",
    authorizationRuleName: "string",
    location: "string",
    properties: {
        rights: ["string"],
        primaryKey: "string",
        secondaryKey: "string",
    },
    tags: {
        string: "string",
    },
});
type: azure-native:notificationhubs:NamespaceAuthorizationRule
properties:
    authorizationRuleName: string
    location: string
    namespaceName: string
    properties:
        primaryKey: string
        rights:
            - string
        secondaryKey: string
    resourceGroupName: string
    tags:
        string: 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
- Namespace name
- ResourceGroup stringName 
- The name of the resource group. The name is case insensitive.
- string
- Authorization Rule Name
- Location string
- Deprecated - only for compatibility.
- Properties
Pulumi.Azure Native. Notification Hubs. Inputs. Shared Access Authorization Rule Properties 
- SharedAccessAuthorizationRule properties.
- Dictionary<string, string>
- Deprecated - only for compatibility.
- NamespaceName string
- Namespace name
- ResourceGroup stringName 
- The name of the resource group. The name is case insensitive.
- string
- Authorization Rule Name
- Location string
- Deprecated - only for compatibility.
- Properties
SharedAccess Authorization Rule Properties Args 
- SharedAccessAuthorizationRule properties.
- map[string]string
- Deprecated - only for compatibility.
- namespaceName String
- Namespace name
- resourceGroup StringName 
- The name of the resource group. The name is case insensitive.
- String
- Authorization Rule Name
- location String
- Deprecated - only for compatibility.
- properties
SharedAccess Authorization Rule Properties 
- SharedAccessAuthorizationRule properties.
- Map<String,String>
- Deprecated - only for compatibility.
- namespaceName string
- Namespace name
- resourceGroup stringName 
- The name of the resource group. The name is case insensitive.
- string
- Authorization Rule Name
- location string
- Deprecated - only for compatibility.
- properties
SharedAccess Authorization Rule Properties 
- SharedAccessAuthorizationRule properties.
- {[key: string]: string}
- Deprecated - only for compatibility.
- namespace_name str
- Namespace name
- resource_group_ strname 
- The name of the resource group. The name is case insensitive.
- str
- Authorization Rule Name
- location str
- Deprecated - only for compatibility.
- properties
SharedAccess Authorization Rule Properties Args 
- SharedAccessAuthorizationRule properties.
- Mapping[str, str]
- Deprecated - only for compatibility.
- namespaceName String
- Namespace name
- resourceGroup StringName 
- The name of the resource group. The name is case insensitive.
- String
- Authorization Rule Name
- location String
- Deprecated - only for compatibility.
- properties Property Map
- SharedAccessAuthorizationRule properties.
- Map<String>
- Deprecated - only for compatibility.
Outputs
All input properties are implicitly available as output properties. Additionally, the NamespaceAuthorizationRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- SystemData Pulumi.Azure Native. Notification Hubs. Outputs. System Data Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- SystemData SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- systemData SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- systemData SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- system_data SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- systemData Property Map
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
AccessRights, AccessRightsArgs    
- Manage
- Manage
- Send
- Send
- Listen
- Listen
- AccessRights Manage 
- Manage
- AccessRights Send 
- Send
- AccessRights Listen 
- 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
List<Union<string, Pulumi.Azure Native. Notification Hubs. Access Rights>> 
- Gets or sets the rights associated with the rule.
- PrimaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- SecondaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- Rights []string
- Gets or sets the rights associated with the rule.
- PrimaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- SecondaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- rights
List<Either<String,AccessRights>> 
- Gets or sets the rights associated with the rule.
- primaryKey String
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- secondaryKey String
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- rights
(string | AccessRights)[] 
- Gets or sets the rights associated with the rule.
- primaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- secondaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- rights
Sequence[Union[str, AccessRights]] 
- Gets or sets the rights associated with the rule.
- primary_key str
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- secondary_key str
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- rights List<String | "Manage" | "Send" | "Listen">
- Gets or sets the rights associated with the rule.
- primaryKey String
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- secondaryKey String
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
SharedAccessAuthorizationRulePropertiesResponse, SharedAccessAuthorizationRulePropertiesResponseArgs            
- ClaimType string
- Gets a string that describes the claim type
- ClaimValue string
- Gets a string that describes the claim value
- CreatedTime string
- Gets the created time for this rule
- KeyName string
- Gets a string that describes the authorization rule.
- ModifiedTime string
- Gets the last modified time for this rule
- Revision int
- Gets the revision number for the rule
- Rights List<string>
- Gets or sets the rights associated with the rule.
- PrimaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- SecondaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- ClaimType string
- Gets a string that describes the claim type
- ClaimValue string
- Gets a string that describes the claim value
- CreatedTime string
- Gets the created time for this rule
- KeyName string
- Gets a string that describes the authorization rule.
- ModifiedTime string
- Gets the last modified time for this rule
- Revision int
- Gets the revision number for the rule
- Rights []string
- Gets or sets the rights associated with the rule.
- PrimaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- SecondaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- claimType String
- Gets a string that describes the claim type
- claimValue String
- Gets a string that describes the claim value
- createdTime String
- Gets the created time for this rule
- keyName String
- Gets a string that describes the authorization rule.
- modifiedTime String
- Gets the last modified time for this rule
- revision Integer
- Gets the revision number for the rule
- rights List<String>
- Gets or sets the rights associated with the rule.
- primaryKey String
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- secondaryKey String
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- claimType string
- Gets a string that describes the claim type
- claimValue string
- Gets a string that describes the claim value
- createdTime string
- Gets the created time for this rule
- keyName string
- Gets a string that describes the authorization rule.
- modifiedTime string
- Gets the last modified time for this rule
- revision number
- Gets the revision number for the rule
- rights string[]
- Gets or sets the rights associated with the rule.
- primaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- secondaryKey string
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- claim_type str
- Gets a string that describes the claim type
- claim_value str
- Gets a string that describes the claim value
- created_time str
- Gets the created time for this rule
- key_name str
- Gets a string that describes the authorization rule.
- modified_time str
- Gets the last modified time for this rule
- revision int
- Gets the revision number for the rule
- rights Sequence[str]
- Gets or sets the rights associated with the rule.
- primary_key str
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- secondary_key str
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- claimType String
- Gets a string that describes the claim type
- claimValue String
- Gets a string that describes the claim value
- createdTime String
- Gets the created time for this rule
- keyName String
- Gets a string that describes the authorization rule.
- modifiedTime String
- Gets the last modified time for this rule
- revision Number
- Gets the revision number for the rule
- rights List<String>
- Gets or sets the rights associated with the rule.
- primaryKey String
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
- secondaryKey String
- Gets a base64-encoded 256-bit primary key for signing and validating the SAS token.
SystemDataResponse, SystemDataResponseArgs      
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
- createdAt string
- The timestamp of resource creation (UTC).
- createdBy string
- The identity that created the resource.
- createdBy stringType 
- The type of identity that created the resource.
- lastModified stringAt 
- The timestamp of resource last modification (UTC)
- lastModified stringBy 
- The identity that last modified the resource.
- lastModified stringBy Type 
- The type of identity that last modified the resource.
- created_at str
- The timestamp of resource creation (UTC).
- created_by str
- The identity that created the resource.
- created_by_ strtype 
- The type of identity that created the resource.
- last_modified_ strat 
- The timestamp of resource last modification (UTC)
- last_modified_ strby 
- The identity that last modified the resource.
- last_modified_ strby_ type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
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} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0