Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.servicebus.kotlin.TopicAuthorizationRuleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.servicebus.kotlin
import com.pulumi.azure.servicebus.TopicAuthorizationRuleArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a ServiceBus Topic authorization Rule within a ServiceBus Topic.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "tfex-servicebus",
* location: "West Europe",
* });
* const exampleNamespace = new azure.servicebus.Namespace("example", {
* name: "tfex-servicebus-namespace",
* location: example.location,
* resourceGroupName: example.name,
* sku: "Standard",
* tags: {
* source: "example",
* },
* });
* const exampleTopic = new azure.servicebus.Topic("example", {
* name: "tfex_servicebus_topic",
* namespaceId: exampleNamespace.id,
* });
* const exampleTopicAuthorizationRule = new azure.servicebus.TopicAuthorizationRule("example", {
* name: "tfex_servicebus_topic_sasPolicy",
* topicId: exampleTopic.id,
* listen: true,
* send: false,
* manage: false,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="tfex-servicebus",
* location="West Europe")
* example_namespace = azure.servicebus.Namespace("example",
* name="tfex-servicebus-namespace",
* location=example.location,
* resource_group_name=example.name,
* sku="Standard",
* tags={
* "source": "example",
* })
* example_topic = azure.servicebus.Topic("example",
* name="tfex_servicebus_topic",
* namespace_id=example_namespace.id)
* example_topic_authorization_rule = azure.servicebus.TopicAuthorizationRule("example",
* name="tfex_servicebus_topic_sasPolicy",
* topic_id=example_topic.id,
* listen=True,
* send=False,
* manage=False)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "tfex-servicebus",
* Location = "West Europe",
* });
* var exampleNamespace = new Azure.ServiceBus.Namespace("example", new()
* {
* Name = "tfex-servicebus-namespace",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = "Standard",
* Tags =
* {
* { "source", "example" },
* },
* });
* var exampleTopic = new Azure.ServiceBus.Topic("example", new()
* {
* Name = "tfex_servicebus_topic",
* NamespaceId = exampleNamespace.Id,
* });
* var exampleTopicAuthorizationRule = new Azure.ServiceBus.TopicAuthorizationRule("example", new()
* {
* Name = "tfex_servicebus_topic_sasPolicy",
* TopicId = exampleTopic.Id,
* Listen = true,
* Send = false,
* Manage = false,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/servicebus"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("tfex-servicebus"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
* Name: pulumi.String("tfex-servicebus-namespace"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: pulumi.String("Standard"),
* Tags: pulumi.StringMap{
* "source": pulumi.String("example"),
* },
* })
* if err != nil {
* return err
* }
* exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
* Name: pulumi.String("tfex_servicebus_topic"),
* NamespaceId: exampleNamespace.ID(),
* })
* if err != nil {
* return err
* }
* _, err = servicebus.NewTopicAuthorizationRule(ctx, "example", &servicebus.TopicAuthorizationRuleArgs{
* Name: pulumi.String("tfex_servicebus_topic_sasPolicy"),
* TopicId: exampleTopic.ID(),
* Listen: pulumi.Bool(true),
* Send: pulumi.Bool(false),
* Manage: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.servicebus.Namespace;
* import com.pulumi.azure.servicebus.NamespaceArgs;
* import com.pulumi.azure.servicebus.Topic;
* import com.pulumi.azure.servicebus.TopicArgs;
* import com.pulumi.azure.servicebus.TopicAuthorizationRule;
* import com.pulumi.azure.servicebus.TopicAuthorizationRuleArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("tfex-servicebus")
* .location("West Europe")
* .build());
* var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
* .name("tfex-servicebus-namespace")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku("Standard")
* .tags(Map.of("source", "example"))
* .build());
* var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()
* .name("tfex_servicebus_topic")
* .namespaceId(exampleNamespace.id())
* .build());
* var exampleTopicAuthorizationRule = new TopicAuthorizationRule("exampleTopicAuthorizationRule", TopicAuthorizationRuleArgs.builder()
* .name("tfex_servicebus_topic_sasPolicy")
* .topicId(exampleTopic.id())
* .listen(true)
* .send(false)
* .manage(false)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: tfex-servicebus
* location: West Europe
* exampleNamespace:
* type: azure:servicebus:Namespace
* name: example
* properties:
* name: tfex-servicebus-namespace
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku: Standard
* tags:
* source: example
* exampleTopic:
* type: azure:servicebus:Topic
* name: example
* properties:
* name: tfex_servicebus_topic
* namespaceId: ${exampleNamespace.id}
* exampleTopicAuthorizationRule:
* type: azure:servicebus:TopicAuthorizationRule
* name: example
* properties:
* name: tfex_servicebus_topic_sasPolicy
* topicId: ${exampleTopic.id}
* listen: true
* send: false
* manage: false
* ```
*
* ## Import
* ServiceBus Topic authorization rules can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:servicebus/topicAuthorizationRule:TopicAuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/topics/topic1/authorizationRules/rule1
* ```
* @property listen Grants listen access to this this Authorization Rule. Defaults to `false`.
* @property manage Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
* @property name Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
* @property send Grants send access to this this Authorization Rule. Defaults to `false`.
* @property topicId Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
* > **NOTE** At least one of the 3 permissions below needs to be set.
*/
public data class TopicAuthorizationRuleArgs(
public val listen: Output? = null,
public val manage: Output? = null,
public val name: Output? = null,
public val send: Output? = null,
public val topicId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.servicebus.TopicAuthorizationRuleArgs =
com.pulumi.azure.servicebus.TopicAuthorizationRuleArgs.builder()
.listen(listen?.applyValue({ args0 -> args0 }))
.manage(manage?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.send(send?.applyValue({ args0 -> args0 }))
.topicId(topicId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [TopicAuthorizationRuleArgs].
*/
@PulumiTagMarker
public class TopicAuthorizationRuleArgsBuilder internal constructor() {
private var listen: Output? = null
private var manage: Output? = null
private var name: Output? = null
private var send: Output? = null
private var topicId: Output? = null
/**
* @param value Grants listen access to this this Authorization Rule. Defaults to `false`.
*/
@JvmName("pkoqegqrayonnqra")
public suspend fun listen(`value`: Output) {
this.listen = value
}
/**
* @param value Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
*/
@JvmName("gohbegdmknvtjixx")
public suspend fun manage(`value`: Output) {
this.manage = value
}
/**
* @param value Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
*/
@JvmName("wksstfnfwrsbsses")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Grants send access to this this Authorization Rule. Defaults to `false`.
*/
@JvmName("qttbjekrfrnnefxx")
public suspend fun send(`value`: Output) {
this.send = value
}
/**
* @param value Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
* > **NOTE** At least one of the 3 permissions below needs to be set.
*/
@JvmName("qfrlmcdjxggvfnvv")
public suspend fun topicId(`value`: Output) {
this.topicId = value
}
/**
* @param value Grants listen access to this this Authorization Rule. Defaults to `false`.
*/
@JvmName("nkqsoqsddkcfehbe")
public suspend fun listen(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.listen = mapped
}
/**
* @param value Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
*/
@JvmName("wjocvququucqssrj")
public suspend fun manage(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.manage = mapped
}
/**
* @param value Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
*/
@JvmName("rciqyxnllystkkfu")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Grants send access to this this Authorization Rule. Defaults to `false`.
*/
@JvmName("sjxvdpfhcctfwlff")
public suspend fun send(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.send = mapped
}
/**
* @param value Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
* > **NOTE** At least one of the 3 permissions below needs to be set.
*/
@JvmName("sdjehswmsyygmdre")
public suspend fun topicId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.topicId = mapped
}
internal fun build(): TopicAuthorizationRuleArgs = TopicAuthorizationRuleArgs(
listen = listen,
manage = manage,
name = name,
send = send,
topicId = topicId,
)
}