azure-native.notificationhubs.NamespaceAuthorizationRule
Explore with Pulumi AI
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", ¬ificationhubs.NamespaceAuthorizationRuleArgs{
AuthorizationRuleName: pulumi.String("sdk-AuthRules-1788"),
NamespaceName: pulumi.String("nh-sdk-ns"),
Properties: ¬ificationhubs.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", ¬ificationhubs.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:
- Namespace
Name string - The namespace name.
- Properties
Pulumi.
Azure Native. Notification Hubs. Inputs. Shared Access Authorization Rule Properties - Properties of the Namespace AuthorizationRules.
- Resource
Group stringName - The name of the resource group.
- string
- Authorization Rule Name.
- Namespace
Name string - The namespace name.
- Properties
Shared
Access Authorization Rule Properties Args - Properties of the Namespace AuthorizationRules.
- Resource
Group stringName - The name of the resource group.
- string
- Authorization Rule Name.
- namespace
Name String - The namespace name.
- properties
Shared
Access Authorization Rule Properties - Properties of the Namespace AuthorizationRules.
- resource
Group StringName - The name of the resource group.
- String
- Authorization Rule Name.
- namespace
Name string - The namespace name.
- properties
Shared
Access Authorization Rule Properties - Properties of the Namespace AuthorizationRules.
- resource
Group stringName - The name of the resource group.
- string
- Authorization Rule Name.
- namespace_
name str - The namespace name.
- properties
Shared
Access Authorization Rule Properties Args - Properties of the Namespace AuthorizationRules.
- resource_
group_ strname - The name of the resource group.
- str
- Authorization Rule Name.
- namespace
Name String - The namespace name.
- properties Property Map
- Properties of the Namespace AuthorizationRules.
- resource
Group StringName - The name of the resource group.
- String
- Authorization Rule Name.
Outputs
All input properties are implicitly available as output properties. Additionally, the NamespaceAuthorizationRule resource produces the following output properties:
- Claim
Type string - A string that describes the claim type
- Claim
Value string - A string that describes the claim value
- Created
Time string - The created time for this rule
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Name string - A string that describes the authorization rule.
- Modified
Time string - The last modified time for this rule
- Name string
- Resource name
- Primary
Key string - A base64-encoded 256-bit primary key for signing and validating the SAS token.
- Revision int
- The revision number for the rule
- Secondary
Key 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.
Azure Native. Notification Hubs. Outputs. Sku Response - The sku of the created namespace
- Dictionary<string, string>
- Resource tags
- Claim
Type string - A string that describes the claim type
- Claim
Value string - A string that describes the claim value
- Created
Time string - The created time for this rule
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Name string - A string that describes the authorization rule.
- Modified
Time string - The last modified time for this rule
- Name string
- Resource name
- Primary
Key string - A base64-encoded 256-bit primary key for signing and validating the SAS token.
- Revision int
- The revision number for the rule
- Secondary
Key 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
Sku
Response - The sku of the created namespace
- map[string]string
- Resource tags
- claim
Type String - A string that describes the claim type
- claim
Value String - A string that describes the claim value
- created
Time String - The created time for this rule
- id String
- The provider-assigned unique ID for this managed resource.
- key
Name String - A string that describes the authorization rule.
- modified
Time String - The last modified time for this rule
- name String
- Resource name
- primary
Key String - A base64-encoded 256-bit primary key for signing and validating the SAS token.
- revision Integer
- The revision number for the rule
- secondary
Key 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
Sku
Response - The sku of the created namespace
- Map<String,String>
- Resource tags
- claim
Type string - A string that describes the claim type
- claim
Value string - A string that describes the claim value
- created
Time string - The created time for this rule
- id string
- The provider-assigned unique ID for this managed resource.
- key
Name string - A string that describes the authorization rule.
- modified
Time string - The last modified time for this rule
- name string
- Resource name
- primary
Key string - A base64-encoded 256-bit primary key for signing and validating the SAS token.
- revision number
- The revision number for the rule
- secondary
Key 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
Sku
Response - The sku of the created namespace
- {[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
Sku
Response - The sku of the created namespace
- Mapping[str, str]
- Resource tags
- claim
Type String - A string that describes the claim type
- claim
Value String - A string that describes the claim value
- created
Time String - The created time for this rule
- id String
- The provider-assigned unique ID for this managed resource.
- key
Name String - A string that describes the authorization rule.
- modified
Time String - The last modified time for this rule
- name String
- Resource name
- primary
Key String - A base64-encoded 256-bit primary key for signing and validating the SAS token.
- revision Number
- The revision number for the rule
- secondary
Key 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
- Map<String>
- Resource tags
Supporting Types
AccessRights, AccessRightsArgs
- Manage
- Manage
- Send
- Send
- Listen
- Listen
- Access
Rights Manage - Manage
- Access
Rights Send - Send
- Access
Rights 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<Pulumi.
Azure Native. Notification Hubs. Access Rights> - The rights associated with the rule.
- Rights
[]Access
Rights - The rights associated with the rule.
- rights
List<Access
Rights> - The rights associated with the rule.
- rights
Access
Rights[] - The rights associated with the rule.
- rights
Sequence[Access
Rights] - The rights associated with the rule.
- rights List<"Manage" | "Send" | "Listen">
- The rights associated with the rule.
SkuResponse, SkuResponseArgs
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