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

com.pulumi.azurenative.securityinsights.kotlin.WorkspaceManagerAssignmentArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.securityinsights.kotlin

import com.pulumi.azurenative.securityinsights.WorkspaceManagerAssignmentArgs.builder
import com.pulumi.azurenative.securityinsights.kotlin.inputs.AssignmentItemArgs
import com.pulumi.azurenative.securityinsights.kotlin.inputs.AssignmentItemArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The workspace manager assignment
 * Azure REST API version: 2023-06-01-preview.
 * Other available API versions: 2023-07-01-preview, 2023-08-01-preview, 2023-09-01-preview, 2023-10-01-preview, 2023-12-01-preview, 2024-01-01-preview.
 * ## Example Usage
 * ### Creates or updates a workspace manager assignment.
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var workspaceManagerAssignment = new AzureNative.SecurityInsights.WorkspaceManagerAssignment("workspaceManagerAssignment", new()
 *     {
 *         Items = new[]
 *         {
 *             new AzureNative.SecurityInsights.Inputs.AssignmentItemArgs
 *             {
 *                 ResourceId = "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspac-es/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/microsoftSecurityIncidentCreationRuleExampleOne",
 *             },
 *             new AzureNative.SecurityInsights.Inputs.AssignmentItemArgs
 *             {
 *                 ResourceId = "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspac-es/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/microsoftSecurityIncidentCreationRuleExampleTwo",
 *             },
 *         },
 *         ResourceGroupName = "myRg",
 *         TargetResourceName = "37207a7a-3b8a-438f-a559-c7df400e1b96",
 *         WorkspaceManagerAssignmentName = "47cdc5f5-37c4-47b5-bd5f-83c84b8bdd58",
 *         WorkspaceName = "myWorkspace",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	securityinsights "github.com/pulumi/pulumi-azure-native-sdk/securityinsights/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := securityinsights.NewWorkspaceManagerAssignment(ctx, "workspaceManagerAssignment", &securityinsights.WorkspaceManagerAssignmentArgs{
 * 			Items: securityinsights.AssignmentItemArray{
 * 				&securityinsights.AssignmentItemArgs{
 * 					ResourceId: pulumi.String("/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspac-es/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/microsoftSecurityIncidentCreationRuleExampleOne"),
 * 				},
 * 				&securityinsights.AssignmentItemArgs{
 * 					ResourceId: pulumi.String("/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspac-es/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/microsoftSecurityIncidentCreationRuleExampleTwo"),
 * 				},
 * 			},
 * 			ResourceGroupName:              pulumi.String("myRg"),
 * 			TargetResourceName:             pulumi.String("37207a7a-3b8a-438f-a559-c7df400e1b96"),
 * 			WorkspaceManagerAssignmentName: pulumi.String("47cdc5f5-37c4-47b5-bd5f-83c84b8bdd58"),
 * 			WorkspaceName:                  pulumi.String("myWorkspace"),
 * 		})
 * 		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.securityinsights.WorkspaceManagerAssignment;
 * import com.pulumi.azurenative.securityinsights.WorkspaceManagerAssignmentArgs;
 * import com.pulumi.azurenative.securityinsights.inputs.AssignmentItemArgs;
 * 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 workspaceManagerAssignment = new WorkspaceManagerAssignment("workspaceManagerAssignment", WorkspaceManagerAssignmentArgs.builder()
 *             .items(
 *                 AssignmentItemArgs.builder()
 *                     .resourceId("/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspac-es/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/microsoftSecurityIncidentCreationRuleExampleOne")
 *                     .build(),
 *                 AssignmentItemArgs.builder()
 *                     .resourceId("/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspac-es/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/microsoftSecurityIncidentCreationRuleExampleTwo")
 *                     .build())
 *             .resourceGroupName("myRg")
 *             .targetResourceName("37207a7a-3b8a-438f-a559-c7df400e1b96")
 *             .workspaceManagerAssignmentName("47cdc5f5-37c4-47b5-bd5f-83c84b8bdd58")
 *             .workspaceName("myWorkspace")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:securityinsights:WorkspaceManagerAssignment 47cdc5f5-37c4-47b5-bd5f-83c84b8bdd58 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerAssignments/{workspaceManagerAssignmentName}
 * ```
 * @property items List of resources included in this workspace manager assignment
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property targetResourceName The resource name of the workspace manager group targeted by the workspace manager assignment
 * @property workspaceManagerAssignmentName The name of the workspace manager assignment
 * @property workspaceName The name of the workspace.
 */
public data class WorkspaceManagerAssignmentArgs(
    public val items: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val targetResourceName: Output? = null,
    public val workspaceManagerAssignmentName: Output? = null,
    public val workspaceName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.securityinsights.WorkspaceManagerAssignmentArgs =
        com.pulumi.azurenative.securityinsights.WorkspaceManagerAssignmentArgs.builder()
            .items(items?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .targetResourceName(targetResourceName?.applyValue({ args0 -> args0 }))
            .workspaceManagerAssignmentName(workspaceManagerAssignmentName?.applyValue({ args0 -> args0 }))
            .workspaceName(workspaceName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WorkspaceManagerAssignmentArgs].
 */
@PulumiTagMarker
public class WorkspaceManagerAssignmentArgsBuilder internal constructor() {
    private var items: Output>? = null

    private var resourceGroupName: Output? = null

    private var targetResourceName: Output? = null

    private var workspaceManagerAssignmentName: Output? = null

    private var workspaceName: Output? = null

    /**
     * @param value List of resources included in this workspace manager assignment
     */
    @JvmName("efxdypxgrapxihko")
    public suspend fun items(`value`: Output>) {
        this.items = value
    }

    @JvmName("eaerfcecbrltrlmf")
    public suspend fun items(vararg values: Output) {
        this.items = Output.all(values.asList())
    }

    /**
     * @param values List of resources included in this workspace manager assignment
     */
    @JvmName("jaqfoxyimvvpmfbw")
    public suspend fun items(values: List>) {
        this.items = Output.all(values)
    }

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

    /**
     * @param value The resource name of the workspace manager group targeted by the workspace manager assignment
     */
    @JvmName("pousspyaomndsxwh")
    public suspend fun targetResourceName(`value`: Output) {
        this.targetResourceName = value
    }

    /**
     * @param value The name of the workspace manager assignment
     */
    @JvmName("avkbuwdrhgrsyfeb")
    public suspend fun workspaceManagerAssignmentName(`value`: Output) {
        this.workspaceManagerAssignmentName = value
    }

    /**
     * @param value The name of the workspace.
     */
    @JvmName("rqucbpkdfrgraryp")
    public suspend fun workspaceName(`value`: Output) {
        this.workspaceName = value
    }

    /**
     * @param value List of resources included in this workspace manager assignment
     */
    @JvmName("lkoekybwnjofknmb")
    public suspend fun items(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.items = mapped
    }

    /**
     * @param argument List of resources included in this workspace manager assignment
     */
    @JvmName("aylmnoyquqbapdyg")
    public suspend fun items(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AssignmentItemArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.items = mapped
    }

    /**
     * @param argument List of resources included in this workspace manager assignment
     */
    @JvmName("cpfwyilgunqtgwnc")
    public suspend fun items(vararg argument: suspend AssignmentItemArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AssignmentItemArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.items = mapped
    }

    /**
     * @param argument List of resources included in this workspace manager assignment
     */
    @JvmName("adyigeburtqbecne")
    public suspend fun items(argument: suspend AssignmentItemArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AssignmentItemArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.items = mapped
    }

    /**
     * @param values List of resources included in this workspace manager assignment
     */
    @JvmName("daoeqgtskxbyilko")
    public suspend fun items(vararg values: AssignmentItemArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.items = mapped
    }

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

    /**
     * @param value The resource name of the workspace manager group targeted by the workspace manager assignment
     */
    @JvmName("rrjogtfmdpehavnt")
    public suspend fun targetResourceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetResourceName = mapped
    }

    /**
     * @param value The name of the workspace manager assignment
     */
    @JvmName("hjimfyerskgtfiys")
    public suspend fun workspaceManagerAssignmentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workspaceManagerAssignmentName = mapped
    }

    /**
     * @param value The name of the workspace.
     */
    @JvmName("sndvdcwhqkbvfljj")
    public suspend fun workspaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workspaceName = mapped
    }

    internal fun build(): WorkspaceManagerAssignmentArgs = WorkspaceManagerAssignmentArgs(
        items = items,
        resourceGroupName = resourceGroupName,
        targetResourceName = targetResourceName,
        workspaceManagerAssignmentName = workspaceManagerAssignmentName,
        workspaceName = workspaceName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy