All Downloads are FREE. Search and download functionalities are using the official Maven repository.
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.azurenative.eventhub.kotlin.NamespaceAuthorizationRuleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.eventhub.kotlin
import com.pulumi.azurenative.eventhub.NamespaceAuthorizationRuleArgs.builder
import com.pulumi.azurenative.eventhub.kotlin.enums.AccessRights
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Single item in a List or Get AuthorizationRule operation
* Azure REST API version: 2022-10-01-preview. Prior API version in Azure Native 1.x: 2017-04-01.
* Other available API versions: 2015-08-01, 2023-01-01-preview, 2024-01-01, 2024-05-01-preview.
* ## Example Usage
* ### NameSpaceAuthorizationRuleCreate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var namespaceAuthorizationRule = new AzureNative.EventHub.NamespaceAuthorizationRule("namespaceAuthorizationRule", new()
* {
* AuthorizationRuleName = "sdk-Authrules-1746",
* NamespaceName = "sdk-Namespace-2702",
* ResourceGroupName = "ArunMonocle",
* Rights = new[]
* {
* AzureNative.EventHub.AccessRights.Listen,
* AzureNative.EventHub.AccessRights.Send,
* },
* });
* });
* ```
* ```go
* package main
* import (
* eventhub "github.com/pulumi/pulumi-azure-native-sdk/eventhub/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := eventhub.NewNamespaceAuthorizationRule(ctx, "namespaceAuthorizationRule", &eventhub.NamespaceAuthorizationRuleArgs{
* AuthorizationRuleName: pulumi.String("sdk-Authrules-1746"),
* NamespaceName: pulumi.String("sdk-Namespace-2702"),
* ResourceGroupName: pulumi.String("ArunMonocle"),
* Rights: pulumi.StringArray{
* pulumi.String(eventhub.AccessRightsListen),
* pulumi.String(eventhub.AccessRightsSend),
* },
* })
* 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.azurenative.eventhub.NamespaceAuthorizationRule;
* import com.pulumi.azurenative.eventhub.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-1746")
* .namespaceName("sdk-Namespace-2702")
* .resourceGroupName("ArunMonocle")
* .rights(
* "Listen",
* "Send")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:eventhub:NamespaceAuthorizationRule sdk-Authrules-1746 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}
* ```
* @property authorizationRuleName The authorization rule name.
* @property namespaceName The Namespace name
* @property resourceGroupName Name of the resource group within the azure subscription.
* @property rights The rights associated with the rule.
*/
public data class NamespaceAuthorizationRuleArgs(
public val authorizationRuleName: Output? = null,
public val namespaceName: Output? = null,
public val resourceGroupName: Output? = null,
public val rights: Output>>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.eventhub.NamespaceAuthorizationRuleArgs =
com.pulumi.azurenative.eventhub.NamespaceAuthorizationRuleArgs.builder()
.authorizationRuleName(authorizationRuleName?.applyValue({ args0 -> args0 }))
.namespaceName(namespaceName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.rights(
rights?.applyValue({ args0 ->
args0.map({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
})
}),
).build()
}
/**
* Builder for [NamespaceAuthorizationRuleArgs].
*/
@PulumiTagMarker
public class NamespaceAuthorizationRuleArgsBuilder internal constructor() {
private var authorizationRuleName: Output? = null
private var namespaceName: Output? = null
private var resourceGroupName: Output? = null
private var rights: Output>>? = null
/**
* @param value The authorization rule name.
*/
@JvmName("jqlcletbkwdxlbxd")
public suspend fun authorizationRuleName(`value`: Output) {
this.authorizationRuleName = value
}
/**
* @param value The Namespace name
*/
@JvmName("eyshemxknslwlmcb")
public suspend fun namespaceName(`value`: Output) {
this.namespaceName = value
}
/**
* @param value Name of the resource group within the azure subscription.
*/
@JvmName("sridgfprawfdbsvr")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The rights associated with the rule.
*/
@JvmName("alsqtojpbmcafrqv")
public suspend fun rights(`value`: Output>>) {
this.rights = value
}
@JvmName("pikvkdcekbvanmwp")
public suspend fun rights(vararg values: Output>) {
this.rights = Output.all(values.asList())
}
/**
* @param values The rights associated with the rule.
*/
@JvmName("naqkodvhveliqtoh")
public suspend fun rights(values: List>>) {
this.rights = Output.all(values)
}
/**
* @param value The authorization rule name.
*/
@JvmName("kbxwqtifbscamdtr")
public suspend fun authorizationRuleName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.authorizationRuleName = mapped
}
/**
* @param value The Namespace name
*/
@JvmName("xtmndnhcagpnaeqq")
public suspend fun namespaceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespaceName = mapped
}
/**
* @param value Name of the resource group within the azure subscription.
*/
@JvmName("xmkhmuodswdhntpt")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The rights associated with the rule.
*/
@JvmName("soctrpljqomexjig")
public suspend fun rights(`value`: List>?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.rights = mapped
}
/**
* @param values The rights associated with the rule.
*/
@JvmName("gpoualvdpwltqbkp")
public suspend fun rights(vararg values: Either) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.rights = mapped
}
internal fun build(): NamespaceAuthorizationRuleArgs = NamespaceAuthorizationRuleArgs(
authorizationRuleName = authorizationRuleName,
namespaceName = namespaceName,
resourceGroupName = resourceGroupName,
rights = rights,
)
}