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

com.pulumi.azure.apimanagement.kotlin.GroupUserArgs.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: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.apimanagement.kotlin

import com.pulumi.azure.apimanagement.GroupUserArgs.builder
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

/**
 * Manages an API Management User Assignment to a Group.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = azure.apimanagement.getUser({
 *     userId: "my-user",
 *     apiManagementName: "example-apim",
 *     resourceGroupName: "search-service",
 * });
 * const exampleGroupUser = new azure.apimanagement.GroupUser("example", {
 *     userId: example.then(example => example.id),
 *     groupName: "example-group",
 *     resourceGroupName: example.then(example => example.resourceGroupName),
 *     apiManagementName: example.then(example => example.apiManagementName),
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.apimanagement.get_user(user_id="my-user",
 *     api_management_name="example-apim",
 *     resource_group_name="search-service")
 * example_group_user = azure.apimanagement.GroupUser("example",
 *     user_id=example.id,
 *     group_name="example-group",
 *     resource_group_name=example.resource_group_name,
 *     api_management_name=example.api_management_name)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = Azure.ApiManagement.GetUser.Invoke(new()
 *     {
 *         UserId = "my-user",
 *         ApiManagementName = "example-apim",
 *         ResourceGroupName = "search-service",
 *     });
 *     var exampleGroupUser = new Azure.ApiManagement.GroupUser("example", new()
 *     {
 *         UserId = example.Apply(getUserResult => getUserResult.Id),
 *         GroupName = "example-group",
 *         ResourceGroupName = example.Apply(getUserResult => getUserResult.ResourceGroupName),
 *         ApiManagementName = example.Apply(getUserResult => getUserResult.ApiManagementName),
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := apimanagement.LookupUser(ctx, &apimanagement.LookupUserArgs{
 * 			UserId:            "my-user",
 * 			ApiManagementName: "example-apim",
 * 			ResourceGroupName: "search-service",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = apimanagement.NewGroupUser(ctx, "example", &apimanagement.GroupUserArgs{
 * 			UserId:            pulumi.String(example.Id),
 * 			GroupName:         pulumi.String("example-group"),
 * 			ResourceGroupName: pulumi.String(example.ResourceGroupName),
 * 			ApiManagementName: pulumi.String(example.ApiManagementName),
 * 		})
 * 		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.apimanagement.ApimanagementFunctions;
 * import com.pulumi.azure.apimanagement.inputs.GetUserArgs;
 * import com.pulumi.azure.apimanagement.GroupUser;
 * import com.pulumi.azure.apimanagement.GroupUserArgs;
 * 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) {
 *         final var example = ApimanagementFunctions.getUser(GetUserArgs.builder()
 *             .userId("my-user")
 *             .apiManagementName("example-apim")
 *             .resourceGroupName("search-service")
 *             .build());
 *         var exampleGroupUser = new GroupUser("exampleGroupUser", GroupUserArgs.builder()
 *             .userId(example.applyValue(getUserResult -> getUserResult.id()))
 *             .groupName("example-group")
 *             .resourceGroupName(example.applyValue(getUserResult -> getUserResult.resourceGroupName()))
 *             .apiManagementName(example.applyValue(getUserResult -> getUserResult.apiManagementName()))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   exampleGroupUser:
 *     type: azure:apimanagement:GroupUser
 *     name: example
 *     properties:
 *       userId: ${example.id}
 *       groupName: example-group
 *       resourceGroupName: ${example.resourceGroupName}
 *       apiManagementName: ${example.apiManagementName}
 * variables:
 *   example:
 *     fn::invoke:
 *       Function: azure:apimanagement:getUser
 *       Arguments:
 *         userId: my-user
 *         apiManagementName: example-apim
 *         resourceGroupName: search-service
 * ```
 * 
 * ## Import
 * API Management Group Users can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:apimanagement/groupUser:GroupUser example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/groups/groupId/users/user123
 * ```
 * @property apiManagementName The name of the API Management Service. Changing this forces a new resource to be created.
 * @property groupName The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
 * @property userId The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
 */
public data class GroupUserArgs(
    public val apiManagementName: Output? = null,
    public val groupName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val userId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.apimanagement.GroupUserArgs =
        com.pulumi.azure.apimanagement.GroupUserArgs.builder()
            .apiManagementName(apiManagementName?.applyValue({ args0 -> args0 }))
            .groupName(groupName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .userId(userId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GroupUserArgs].
 */
@PulumiTagMarker
public class GroupUserArgsBuilder internal constructor() {
    private var apiManagementName: Output? = null

    private var groupName: Output? = null

    private var resourceGroupName: Output? = null

    private var userId: Output? = null

    /**
     * @param value The name of the API Management Service. Changing this forces a new resource to be created.
     */
    @JvmName("enlculvwykedpjvc")
    public suspend fun apiManagementName(`value`: Output) {
        this.apiManagementName = value
    }

    /**
     * @param value The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
     */
    @JvmName("punwkutuqdqxkunc")
    public suspend fun groupName(`value`: Output) {
        this.groupName = value
    }

    /**
     * @param value The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
     */
    @JvmName("sjwobxhmtthyotmt")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
     */
    @JvmName("sbbqigaqvsltkxhe")
    public suspend fun userId(`value`: Output) {
        this.userId = value
    }

    /**
     * @param value The name of the API Management Service. Changing this forces a new resource to be created.
     */
    @JvmName("qihkfurjpmsremch")
    public suspend fun apiManagementName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiManagementName = mapped
    }

    /**
     * @param value The Name of the API Management Group within the API Management Service. Changing this forces a new resource to be created.
     */
    @JvmName("ieomomtqhdskohhp")
    public suspend fun groupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupName = mapped
    }

    /**
     * @param value The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
     */
    @JvmName("bjdvxfdxhiaybotr")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The ID of the API Management User which should be assigned to this API Management Group. Changing this forces a new resource to be created.
     */
    @JvmName("opttrhokdjctjfep")
    public suspend fun userId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userId = mapped
    }

    internal fun build(): GroupUserArgs = GroupUserArgs(
        apiManagementName = apiManagementName,
        groupName = groupName,
        resourceGroupName = resourceGroupName,
        userId = userId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy