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

com.pulumi.azurenative.apimanagement.kotlin.GroupArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.apimanagement.kotlin

import com.pulumi.azurenative.apimanagement.GroupArgs.builder
import com.pulumi.azurenative.apimanagement.kotlin.enums.GroupType
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

/**
 * Contract details.
 * Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * Other available API versions: 2016-07-07, 2016-10-10, 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
 * ## Example Usage
 * ### ApiManagementCreateGroup
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @group = new AzureNative.ApiManagement.Group("group", new()
 *     {
 *         DisplayName = "temp group",
 *         GroupId = "tempgroup",
 *         ResourceGroupName = "rg1",
 *         ServiceName = "apimService1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := apimanagement.NewGroup(ctx, "group", &apimanagement.GroupArgs{
 * 			DisplayName:       pulumi.String("temp group"),
 * 			GroupId:           pulumi.String("tempgroup"),
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			ServiceName:       pulumi.String("apimService1"),
 * 		})
 * 		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.apimanagement.Group;
 * import com.pulumi.azurenative.apimanagement.GroupArgs;
 * 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 group = new Group("group", GroupArgs.builder()
 *             .displayName("temp group")
 *             .groupId("tempgroup")
 *             .resourceGroupName("rg1")
 *             .serviceName("apimService1")
 *             .build());
 *     }
 * }
 * ```
 * ### ApiManagementCreateGroupExternal
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @group = new AzureNative.ApiManagement.Group("group", new()
 *     {
 *         Description = "new group to test",
 *         DisplayName = "NewGroup (samiraad.onmicrosoft.com)",
 *         ExternalId = "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d",
 *         GroupId = "aadGroup",
 *         ResourceGroupName = "rg1",
 *         ServiceName = "apimService1",
 *         Type = AzureNative.ApiManagement.GroupType.External,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := apimanagement.NewGroup(ctx, "group", &apimanagement.GroupArgs{
 * 			Description:       pulumi.String("new group to test"),
 * 			DisplayName:       pulumi.String("NewGroup (samiraad.onmicrosoft.com)"),
 * 			ExternalId:        pulumi.String("aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d"),
 * 			GroupId:           pulumi.String("aadGroup"),
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			ServiceName:       pulumi.String("apimService1"),
 * 			Type:              apimanagement.GroupTypeExternal,
 * 		})
 * 		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.apimanagement.Group;
 * import com.pulumi.azurenative.apimanagement.GroupArgs;
 * 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 group = new Group("group", GroupArgs.builder()
 *             .description("new group to test")
 *             .displayName("NewGroup (samiraad.onmicrosoft.com)")
 *             .externalId("aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d")
 *             .groupId("aadGroup")
 *             .resourceGroupName("rg1")
 *             .serviceName("apimService1")
 *             .type("external")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:apimanagement:Group aadGroup /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}
 * ```
 * @property description Group description.
 * @property displayName Group name.
 * @property externalId Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.
 * @property groupId Group identifier. Must be unique in the current API Management service instance.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property serviceName The name of the API Management service.
 * @property type Group type.
 */
public data class GroupArgs(
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val externalId: Output? = null,
    public val groupId: Output? = null,
    public val resourceGroupName: Output? = null,
    public val serviceName: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.apimanagement.GroupArgs =
        com.pulumi.azurenative.apimanagement.GroupArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .externalId(externalId?.applyValue({ args0 -> args0 }))
            .groupId(groupId?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .serviceName(serviceName?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [GroupArgs].
 */
@PulumiTagMarker
public class GroupArgsBuilder internal constructor() {
    private var description: Output? = null

    private var displayName: Output? = null

    private var externalId: Output? = null

    private var groupId: Output? = null

    private var resourceGroupName: Output? = null

    private var serviceName: Output? = null

    private var type: Output? = null

    /**
     * @param value Group description.
     */
    @JvmName("rfvkwpcltyahwtak")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Group name.
     */
    @JvmName("kgwxnvxrqanwjrtd")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.
     */
    @JvmName("vtutpwnnespbmkay")
    public suspend fun externalId(`value`: Output) {
        this.externalId = value
    }

    /**
     * @param value Group identifier. Must be unique in the current API Management service instance.
     */
    @JvmName("unvwrvnixpbpsikh")
    public suspend fun groupId(`value`: Output) {
        this.groupId = value
    }

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

    /**
     * @param value The name of the API Management service.
     */
    @JvmName("owecngosgirbhycd")
    public suspend fun serviceName(`value`: Output) {
        this.serviceName = value
    }

    /**
     * @param value Group type.
     */
    @JvmName("rxjxllwuidthftva")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Group description.
     */
    @JvmName("dgjayrelaqanubcn")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Group name.
     */
    @JvmName("evolqoqkwnhqmbfo")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.
     */
    @JvmName("ncdmogfrnweuudnu")
    public suspend fun externalId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.externalId = mapped
    }

    /**
     * @param value Group identifier. Must be unique in the current API Management service instance.
     */
    @JvmName("afdxplroxjjbkllu")
    public suspend fun groupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupId = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("dxjxvjnmisxkkrpl")
    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 API Management service.
     */
    @JvmName("oukfgmidrskbsekm")
    public suspend fun serviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceName = mapped
    }

    /**
     * @param value Group type.
     */
    @JvmName("ctnoiumvxjbtdqmh")
    public suspend fun type(`value`: GroupType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): GroupArgs = GroupArgs(
        description = description,
        displayName = displayName,
        externalId = externalId,
        groupId = groupId,
        resourceGroupName = resourceGroupName,
        serviceName = serviceName,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy