All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.cognitiveservices.kotlin.RaiBlocklistItemArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.cognitiveservices.kotlin

import com.pulumi.azurenative.cognitiveservices.RaiBlocklistItemArgs.builder
import com.pulumi.azurenative.cognitiveservices.kotlin.inputs.RaiBlocklistItemPropertiesArgs
import com.pulumi.azurenative.cognitiveservices.kotlin.inputs.RaiBlocklistItemPropertiesArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Cognitive Services RaiBlocklist Item.
 * Azure REST API version: 2023-10-01-preview.
 * Other available API versions: 2024-04-01-preview, 2024-06-01-preview.
 * ## Example Usage
 * ### PutRaiBlocklistItem
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var raiBlocklistItem = new AzureNative.CognitiveServices.RaiBlocklistItem("raiBlocklistItem", new()
 *     {
 *         AccountName = "accountName",
 *         Properties = new AzureNative.CognitiveServices.Inputs.RaiBlocklistItemPropertiesArgs
 *         {
 *             IsRegex = false,
 *             Pattern = "Pattern To Block",
 *         },
 *         RaiBlocklistItemName = "raiBlocklistItemName",
 *         RaiBlocklistName = "raiBlocklistName",
 *         ResourceGroupName = "resourceGroupName",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	cognitiveservices "github.com/pulumi/pulumi-azure-native-sdk/cognitiveservices/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cognitiveservices.NewRaiBlocklistItem(ctx, "raiBlocklistItem", &cognitiveservices.RaiBlocklistItemArgs{
 * 			AccountName: pulumi.String("accountName"),
 * 			Properties: &cognitiveservices.RaiBlocklistItemPropertiesArgs{
 * 				IsRegex: pulumi.Bool(false),
 * 				Pattern: pulumi.String("Pattern To Block"),
 * 			},
 * 			RaiBlocklistItemName: pulumi.String("raiBlocklistItemName"),
 * 			RaiBlocklistName:     pulumi.String("raiBlocklistName"),
 * 			ResourceGroupName:    pulumi.String("resourceGroupName"),
 * 		})
 * 		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.cognitiveservices.RaiBlocklistItem;
 * import com.pulumi.azurenative.cognitiveservices.RaiBlocklistItemArgs;
 * import com.pulumi.azurenative.cognitiveservices.inputs.RaiBlocklistItemPropertiesArgs;
 * 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 raiBlocklistItem = new RaiBlocklistItem("raiBlocklistItem", RaiBlocklistItemArgs.builder()
 *             .accountName("accountName")
 *             .properties(RaiBlocklistItemPropertiesArgs.builder()
 *                 .isRegex(false)
 *                 .pattern("Pattern To Block")
 *                 .build())
 *             .raiBlocklistItemName("raiBlocklistItemName")
 *             .raiBlocklistName("raiBlocklistName")
 *             .resourceGroupName("resourceGroupName")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:cognitiveservices:RaiBlocklistItem raiBlocklistItemName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}
 * ```
 * @property accountName The name of Cognitive Services account.
 * @property properties Properties of Cognitive Services RaiBlocklist Item.
 * @property raiBlocklistItemName The name of the RaiBlocklist Item associated with the custom blocklist
 * @property raiBlocklistName The name of the RaiBlocklist associated with the Cognitive Services Account
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property tags Resource tags.
 */
public data class RaiBlocklistItemArgs(
    public val accountName: Output? = null,
    public val properties: Output? = null,
    public val raiBlocklistItemName: Output? = null,
    public val raiBlocklistName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cognitiveservices.RaiBlocklistItemArgs =
        com.pulumi.azurenative.cognitiveservices.RaiBlocklistItemArgs.builder()
            .accountName(accountName?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .raiBlocklistItemName(raiBlocklistItemName?.applyValue({ args0 -> args0 }))
            .raiBlocklistName(raiBlocklistName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [RaiBlocklistItemArgs].
 */
@PulumiTagMarker
public class RaiBlocklistItemArgsBuilder internal constructor() {
    private var accountName: Output? = null

    private var properties: Output? = null

    private var raiBlocklistItemName: Output? = null

    private var raiBlocklistName: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The name of Cognitive Services account.
     */
    @JvmName("yrlgtqctqroxaebj")
    public suspend fun accountName(`value`: Output) {
        this.accountName = value
    }

    /**
     * @param value Properties of Cognitive Services RaiBlocklist Item.
     */
    @JvmName("faflalbsioengehm")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

    /**
     * @param value The name of the RaiBlocklist Item associated with the custom blocklist
     */
    @JvmName("odvbvmeoicykacpe")
    public suspend fun raiBlocklistItemName(`value`: Output) {
        this.raiBlocklistItemName = value
    }

    /**
     * @param value The name of the RaiBlocklist associated with the Cognitive Services Account
     */
    @JvmName("drirsphokdbqylxr")
    public suspend fun raiBlocklistName(`value`: Output) {
        this.raiBlocklistName = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("nlugihvibjnwnwsk")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("gqgketekaebjnpug")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The name of Cognitive Services account.
     */
    @JvmName("sqgmipcdyjugrcif")
    public suspend fun accountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountName = mapped
    }

    /**
     * @param value Properties of Cognitive Services RaiBlocklist Item.
     */
    @JvmName("alfpefgyllcrdrxi")
    public suspend fun properties(`value`: RaiBlocklistItemPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument Properties of Cognitive Services RaiBlocklist Item.
     */
    @JvmName("wdtrnpvdnreqvgnc")
    public suspend fun properties(argument: suspend RaiBlocklistItemPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = RaiBlocklistItemPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

    /**
     * @param value The name of the RaiBlocklist Item associated with the custom blocklist
     */
    @JvmName("hgfkwebwhqrtcgnb")
    public suspend fun raiBlocklistItemName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.raiBlocklistItemName = mapped
    }

    /**
     * @param value The name of the RaiBlocklist associated with the Cognitive Services Account
     */
    @JvmName("eswgwmxrcgxckwqb")
    public suspend fun raiBlocklistName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.raiBlocklistName = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("tvuuxraywcjkginx")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("fxgwblpebwqpmnni")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("uxuswwbgrlawyafn")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): RaiBlocklistItemArgs = RaiBlocklistItemArgs(
        accountName = accountName,
        properties = properties,
        raiBlocklistItemName = raiBlocklistItemName,
        raiBlocklistName = raiBlocklistName,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy