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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.eventgrid.kotlin
import com.pulumi.azurenative.eventgrid.PermissionBindingArgs.builder
import com.pulumi.azurenative.eventgrid.kotlin.enums.PermissionType
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.jvm.JvmName
/**
* The Permission binding resource.
* Azure REST API version: 2023-06-01-preview.
* Other available API versions: 2023-12-15-preview, 2024-06-01-preview.
* ## Example Usage
* ### PermissionBindings_CreateOrUpdate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var permissionBinding = new AzureNative.EventGrid.PermissionBinding("permissionBinding", new()
* {
* ClientGroupName = "exampleClientGroupName1",
* NamespaceName = "exampleNamespaceName1",
* Permission = AzureNative.EventGrid.PermissionType.Publisher,
* PermissionBindingName = "examplePermissionBindingName1",
* ResourceGroupName = "examplerg",
* TopicSpaceName = "exampleTopicSpaceName1",
* });
* });
* ```
* ```go
* package main
* import (
* eventgrid "github.com/pulumi/pulumi-azure-native-sdk/eventgrid/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := eventgrid.NewPermissionBinding(ctx, "permissionBinding", &eventgrid.PermissionBindingArgs{
* ClientGroupName: pulumi.String("exampleClientGroupName1"),
* NamespaceName: pulumi.String("exampleNamespaceName1"),
* Permission: pulumi.String(eventgrid.PermissionTypePublisher),
* PermissionBindingName: pulumi.String("examplePermissionBindingName1"),
* ResourceGroupName: pulumi.String("examplerg"),
* TopicSpaceName: pulumi.String("exampleTopicSpaceName1"),
* })
* 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.eventgrid.PermissionBinding;
* import com.pulumi.azurenative.eventgrid.PermissionBindingArgs;
* 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 permissionBinding = new PermissionBinding("permissionBinding", PermissionBindingArgs.builder()
* .clientGroupName("exampleClientGroupName1")
* .namespaceName("exampleNamespaceName1")
* .permission("Publisher")
* .permissionBindingName("examplePermissionBindingName1")
* .resourceGroupName("examplerg")
* .topicSpaceName("exampleTopicSpaceName1")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:eventgrid:PermissionBinding examplePermissionBindingName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}
* ```
* @property clientGroupName The name of the client group resource that the permission is bound to.
* The client group needs to be a resource under the same namespace the permission binding is a part of.
* @property description Description for the Permission Binding resource.
* @property namespaceName Name of the namespace.
* @property permission The allowed permission.
* @property permissionBindingName The permission binding name.
* @property resourceGroupName The name of the resource group within the user's subscription.
* @property topicSpaceName The name of the Topic Space resource that the permission is bound to.
* The Topic space needs to be a resource under the same namespace the permission binding is a part of.
*/
public data class PermissionBindingArgs(
public val clientGroupName: Output? = null,
public val description: Output? = null,
public val namespaceName: Output? = null,
public val permission: Output>? = null,
public val permissionBindingName: Output? = null,
public val resourceGroupName: Output? = null,
public val topicSpaceName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.eventgrid.PermissionBindingArgs =
com.pulumi.azurenative.eventgrid.PermissionBindingArgs.builder()
.clientGroupName(clientGroupName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.namespaceName(namespaceName?.applyValue({ args0 -> args0 }))
.permission(
permission?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.permissionBindingName(permissionBindingName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.topicSpaceName(topicSpaceName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [PermissionBindingArgs].
*/
@PulumiTagMarker
public class PermissionBindingArgsBuilder internal constructor() {
private var clientGroupName: Output? = null
private var description: Output? = null
private var namespaceName: Output? = null
private var permission: Output>? = null
private var permissionBindingName: Output? = null
private var resourceGroupName: Output? = null
private var topicSpaceName: Output? = null
/**
* @param value The name of the client group resource that the permission is bound to.
* The client group needs to be a resource under the same namespace the permission binding is a part of.
*/
@JvmName("lncsuqqnfwtdbjfr")
public suspend fun clientGroupName(`value`: Output) {
this.clientGroupName = value
}
/**
* @param value Description for the Permission Binding resource.
*/
@JvmName("svltlkmwhujigpff")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Name of the namespace.
*/
@JvmName("ebniiihogdhxbdnt")
public suspend fun namespaceName(`value`: Output) {
this.namespaceName = value
}
/**
* @param value The allowed permission.
*/
@JvmName("ykhbawlerorjpxrs")
public suspend fun permission(`value`: Output>) {
this.permission = value
}
/**
* @param value The permission binding name.
*/
@JvmName("egwjylcvutlknhqt")
public suspend fun permissionBindingName(`value`: Output) {
this.permissionBindingName = value
}
/**
* @param value The name of the resource group within the user's subscription.
*/
@JvmName("wuwlwrtvqfqgwwxg")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the Topic Space resource that the permission is bound to.
* The Topic space needs to be a resource under the same namespace the permission binding is a part of.
*/
@JvmName("nqnyvoxiexepxaji")
public suspend fun topicSpaceName(`value`: Output) {
this.topicSpaceName = value
}
/**
* @param value The name of the client group resource that the permission is bound to.
* The client group needs to be a resource under the same namespace the permission binding is a part of.
*/
@JvmName("pnipxbdyoudhmrsd")
public suspend fun clientGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clientGroupName = mapped
}
/**
* @param value Description for the Permission Binding resource.
*/
@JvmName("snkhbkudvqiqgcby")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Name of the namespace.
*/
@JvmName("pyqkvypauqfaegrk")
public suspend fun namespaceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespaceName = mapped
}
/**
* @param value The allowed permission.
*/
@JvmName("pudovwwecsujhjdr")
public suspend fun permission(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.permission = mapped
}
/**
* @param value The allowed permission.
*/
@JvmName("okhvdtjdiwcjmbde")
public fun permission(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.permission = mapped
}
/**
* @param value The allowed permission.
*/
@JvmName("mdhhxhiuhbtecpwy")
public fun permission(`value`: PermissionType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.permission = mapped
}
/**
* @param value The permission binding name.
*/
@JvmName("hqcbxgbcjpkhsgvx")
public suspend fun permissionBindingName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.permissionBindingName = mapped
}
/**
* @param value The name of the resource group within the user's subscription.
*/
@JvmName("yeytmjjwbvmndnmo")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The name of the Topic Space resource that the permission is bound to.
* The Topic space needs to be a resource under the same namespace the permission binding is a part of.
*/
@JvmName("xftsqlwxmxregqdv")
public suspend fun topicSpaceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.topicSpaceName = mapped
}
internal fun build(): PermissionBindingArgs = PermissionBindingArgs(
clientGroupName = clientGroupName,
description = description,
namespaceName = namespaceName,
permission = permission,
permissionBindingName = permissionBindingName,
resourceGroupName = resourceGroupName,
topicSpaceName = topicSpaceName,
)
}