1. Packages
  2. Azure Native v2
  3. API Docs
  4. relay
  5. NamespaceAuthorizationRule
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.relay.NamespaceAuthorizationRule

Explore with Pulumi AI

Single item in a List or Get AuthorizationRule operation Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2017-04-01.

Other available API versions: 2017-04-01, 2024-01-01.

Example Usage

RelayNameSpaceAuthorizationRuleCreate

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

return await Deployment.RunAsync(() => 
{
    var namespaceAuthorizationRule = new AzureNative.Relay.NamespaceAuthorizationRule("namespaceAuthorizationRule", new()
    {
        AuthorizationRuleName = "example-RelayAuthRules-01",
        NamespaceName = "example-RelayNamespace-01",
        ResourceGroupName = "resourcegroup",
        Rights = new[]
        {
            AzureNative.Relay.AccessRights.Listen,
            AzureNative.Relay.AccessRights.Send,
        },
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := relay.NewNamespaceAuthorizationRule(ctx, "namespaceAuthorizationRule", &relay.NamespaceAuthorizationRuleArgs{
			AuthorizationRuleName: pulumi.String("example-RelayAuthRules-01"),
			NamespaceName:         pulumi.String("example-RelayNamespace-01"),
			ResourceGroupName:     pulumi.String("resourcegroup"),
			Rights: pulumi.StringArray{
				pulumi.String(relay.AccessRightsListen),
				pulumi.String(relay.AccessRightsSend),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.relay.NamespaceAuthorizationRule;
import com.pulumi.azurenative.relay.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("example-RelayAuthRules-01")
            .namespaceName("example-RelayNamespace-01")
            .resourceGroupName("resourcegroup")
            .rights(            
                "Listen",
                "Send")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const namespaceAuthorizationRule = new azure_native.relay.NamespaceAuthorizationRule("namespaceAuthorizationRule", {
    authorizationRuleName: "example-RelayAuthRules-01",
    namespaceName: "example-RelayNamespace-01",
    resourceGroupName: "resourcegroup",
    rights: [
        azure_native.relay.AccessRights.Listen,
        azure_native.relay.AccessRights.Send,
    ],
});
Copy
import pulumi
import pulumi_azure_native as azure_native

namespace_authorization_rule = azure_native.relay.NamespaceAuthorizationRule("namespaceAuthorizationRule",
    authorization_rule_name="example-RelayAuthRules-01",
    namespace_name="example-RelayNamespace-01",
    resource_group_name="resourcegroup",
    rights=[
        azure_native.relay.AccessRights.LISTEN,
        azure_native.relay.AccessRights.SEND,
    ])
Copy
resources:
  namespaceAuthorizationRule:
    type: azure-native:relay:NamespaceAuthorizationRule
    properties:
      authorizationRuleName: example-RelayAuthRules-01
      namespaceName: example-RelayNamespace-01
      resourceGroupName: resourcegroup
      rights:
        - Listen
        - Send
Copy

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,
                               rights: Optional[Sequence[Union[str, AccessRights]]] = 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:relay:NamespaceAuthorizationRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NamespaceAuthorizationRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. NamespaceAuthorizationRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NamespaceAuthorizationRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 examplenamespaceAuthorizationRuleResourceResourceFromRelay = new AzureNative.Relay.NamespaceAuthorizationRule("examplenamespaceAuthorizationRuleResourceResourceFromRelay", new()
{
    NamespaceName = "string",
    ResourceGroupName = "string",
    Rights = new[]
    {
        "string",
    },
    AuthorizationRuleName = "string",
});
Copy
example, err := relay.NewNamespaceAuthorizationRule(ctx, "examplenamespaceAuthorizationRuleResourceResourceFromRelay", &relay.NamespaceAuthorizationRuleArgs{
	NamespaceName:     "string",
	ResourceGroupName: "string",
	Rights: []string{
		"string",
	},
	AuthorizationRuleName: "string",
})
Copy
var examplenamespaceAuthorizationRuleResourceResourceFromRelay = new NamespaceAuthorizationRule("examplenamespaceAuthorizationRuleResourceResourceFromRelay", NamespaceAuthorizationRuleArgs.builder()
    .namespaceName("string")
    .resourceGroupName("string")
    .rights("string")
    .authorizationRuleName("string")
    .build());
Copy
examplenamespace_authorization_rule_resource_resource_from_relay = azure_native.relay.NamespaceAuthorizationRule("examplenamespaceAuthorizationRuleResourceResourceFromRelay",
    namespace_name=string,
    resource_group_name=string,
    rights=[string],
    authorization_rule_name=string)
Copy
const examplenamespaceAuthorizationRuleResourceResourceFromRelay = new azure_native.relay.NamespaceAuthorizationRule("examplenamespaceAuthorizationRuleResourceResourceFromRelay", {
    namespaceName: "string",
    resourceGroupName: "string",
    rights: ["string"],
    authorizationRuleName: "string",
});
Copy
type: azure-native:relay:NamespaceAuthorizationRule
properties:
    authorizationRuleName: string
    namespaceName: string
    resourceGroupName: string
    rights:
        - string
Copy

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
This property is required.
Changes to this property will trigger replacement.
string
The namespace name
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Resource group within the Azure subscription.
Rights This property is required. List<Union<string, Pulumi.AzureNative.Relay.AccessRights>>
The rights associated with the rule.
AuthorizationRuleName Changes to this property will trigger replacement. string
The authorization rule name.
NamespaceName
This property is required.
Changes to this property will trigger replacement.
string
The namespace name
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Resource group within the Azure subscription.
Rights This property is required. []string
The rights associated with the rule.
AuthorizationRuleName Changes to this property will trigger replacement. string
The authorization rule name.
namespaceName
This property is required.
Changes to this property will trigger replacement.
String
The namespace name
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Resource group within the Azure subscription.
rights This property is required. List<Either<String,AccessRights>>
The rights associated with the rule.
authorizationRuleName Changes to this property will trigger replacement. String
The authorization rule name.
namespaceName
This property is required.
Changes to this property will trigger replacement.
string
The namespace name
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the Resource group within the Azure subscription.
rights This property is required. (string | AccessRights)[]
The rights associated with the rule.
authorizationRuleName Changes to this property will trigger replacement. string
The authorization rule name.
namespace_name
This property is required.
Changes to this property will trigger replacement.
str
The namespace name
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the Resource group within the Azure subscription.
rights This property is required. Sequence[Union[str, AccessRights]]
The rights associated with the rule.
authorization_rule_name Changes to this property will trigger replacement. str
The authorization rule name.
namespaceName
This property is required.
Changes to this property will trigger replacement.
String
The namespace name
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the Resource group within the Azure subscription.
rights This property is required. List<String | "Manage" | "Send" | "Listen">
The rights associated with the rule.
authorizationRuleName Changes to this property will trigger replacement. String
The authorization rule name.

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.
Location string
The geo-location where the resource lives
Name string
The name of the resource
SystemData Pulumi.AzureNative.Relay.Outputs.SystemDataResponse
The system meta data relating to this resource.
Type string
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
Id string
The provider-assigned unique ID for this managed resource.
Location string
The geo-location where the resource lives
Name string
The name of the resource
SystemData SystemDataResponse
The system meta data relating to this resource.
Type string
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
id String
The provider-assigned unique ID for this managed resource.
location String
The geo-location where the resource lives
name String
The name of the resource
systemData SystemDataResponse
The system meta data relating to this resource.
type String
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
id string
The provider-assigned unique ID for this managed resource.
location string
The geo-location where the resource lives
name string
The name of the resource
systemData SystemDataResponse
The system meta data relating to this resource.
type string
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
id str
The provider-assigned unique ID for this managed resource.
location str
The geo-location where the resource lives
name str
The name of the resource
system_data SystemDataResponse
The system meta data relating to this resource.
type str
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
id String
The provider-assigned unique ID for this managed resource.
location String
The geo-location where the resource lives
name String
The name of the resource
systemData Property Map
The system meta data relating to this resource.
type String
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"

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

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
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.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
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.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
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.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
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_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
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.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
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:relay:NamespaceAuthorizationRule example-RelayAuthRules-01 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName} 
Copy

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0