import * as pulumi from "@pulumi/pulumi"; /** * Manages a Event Hubs authorization Rule within an Event Hub. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleEventHubNamespace = new azure.eventhub.EventHubNamespace("example", { * name: "acceptanceTestEventHubNamespace", * location: example.location, * resourceGroupName: example.name, * sku: "Basic", * capacity: 2, * tags: { * environment: "Production", * }, * }); * const exampleEventHub = new azure.eventhub.EventHub("example", { * name: "acceptanceTestEventHub", * namespaceId: exampleEventHubNamespace.id, * partitionCount: 2, * messageRetention: 2, * }); * const exampleAuthorizationRule = new azure.eventhub.AuthorizationRule("example", { * name: "navi", * namespaceName: exampleEventHubNamespace.name, * eventhubName: exampleEventHub.name, * resourceGroupName: example.name, * listen: true, * send: false, * manage: false, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.EventHub` - 2024-01-01 * * ## Import * * EventHub Authorization Rules can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:eventhub/authorizationRule:AuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/eventhubs/eventhub1/authorizationRules/rule1 * ``` */ export declare class AuthorizationRule extends pulumi.CustomResource { /** * Get an existing AuthorizationRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AuthorizationRuleState, opts?: pulumi.CustomResourceOptions): AuthorizationRule; /** * Returns true if the given object is an instance of AuthorizationRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AuthorizationRule; /** * Specifies the name of the EventHub. Changing this forces a new resource to be created. */ readonly eventhubName: pulumi.Output; /** * Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`. */ readonly listen: pulumi.Output; /** * Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`. */ readonly manage: pulumi.Output; /** * Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created. */ readonly namespaceName: pulumi.Output; /** * The Primary Connection String for the Event Hubs authorization Rule. */ readonly primaryConnectionString: pulumi.Output; /** * The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled. */ readonly primaryConnectionStringAlias: pulumi.Output; /** * The Primary Key for the Event Hubs authorization Rule. */ readonly primaryKey: pulumi.Output; /** * The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created. * * > **Note:** At least one of the 3 permissions below needs to be set. */ readonly resourceGroupName: pulumi.Output; /** * The Secondary Connection String for the Event Hubs Authorization Rule. */ readonly secondaryConnectionString: pulumi.Output; /** * The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled. */ readonly secondaryConnectionStringAlias: pulumi.Output; /** * The Secondary Key for the Event Hubs Authorization Rule. */ readonly secondaryKey: pulumi.Output; /** * Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`. */ readonly send: pulumi.Output; /** * Create a AuthorizationRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AuthorizationRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AuthorizationRule resources. */ export interface AuthorizationRuleState { /** * Specifies the name of the EventHub. Changing this forces a new resource to be created. */ eventhubName?: pulumi.Input; /** * Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`. */ listen?: pulumi.Input; /** * Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`. */ manage?: pulumi.Input; /** * Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created. */ namespaceName?: pulumi.Input; /** * The Primary Connection String for the Event Hubs authorization Rule. */ primaryConnectionString?: pulumi.Input; /** * The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled. */ primaryConnectionStringAlias?: pulumi.Input; /** * The Primary Key for the Event Hubs authorization Rule. */ primaryKey?: pulumi.Input; /** * The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created. * * > **Note:** At least one of the 3 permissions below needs to be set. */ resourceGroupName?: pulumi.Input; /** * The Secondary Connection String for the Event Hubs Authorization Rule. */ secondaryConnectionString?: pulumi.Input; /** * The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled. */ secondaryConnectionStringAlias?: pulumi.Input; /** * The Secondary Key for the Event Hubs Authorization Rule. */ secondaryKey?: pulumi.Input; /** * Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`. */ send?: pulumi.Input; } /** * The set of arguments for constructing a AuthorizationRule resource. */ export interface AuthorizationRuleArgs { /** * Specifies the name of the EventHub. Changing this forces a new resource to be created. */ eventhubName: pulumi.Input; /** * Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`. */ listen?: pulumi.Input; /** * Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`. */ manage?: pulumi.Input; /** * Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created. */ namespaceName: pulumi.Input; /** * The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created. * * > **Note:** At least one of the 3 permissions below needs to be set. */ resourceGroupName: pulumi.Input; /** * Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`. */ send?: pulumi.Input; }