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

com.pulumi.azurenative.devcenter.kotlin.CurationProfileArgs.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.devcenter.kotlin

import com.pulumi.azurenative.devcenter.CurationProfileArgs.builder
import com.pulumi.azurenative.devcenter.kotlin.inputs.ResourcePolicyArgs
import com.pulumi.azurenative.devcenter.kotlin.inputs.ResourcePolicyArgsBuilder
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

/**
 * Represents an curation profile resource.
 * Azure REST API version: 2024-08-01-preview.
 * ## Example Usage
 * ### CurationProfiles_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var curationProfile = new AzureNative.DevCenter.CurationProfile("curationProfile", new()
 *     {
 *         CurationProfileName = "DevOnlyResources",
 *         DevCenterName = "Contoso",
 *         ResourceGroupName = "rg1",
 *         ResourcePolicies = new[]
 *         {
 *             new AzureNative.DevCenter.Inputs.ResourcePolicyArgs
 *             {
 *                 Resources = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff1/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-westus3",
 *             },
 *         },
 *         Scopes = new[]
 *         {
 *             "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff1/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	devcenter "github.com/pulumi/pulumi-azure-native-sdk/devcenter/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := devcenter.NewCurationProfile(ctx, "curationProfile", &devcenter.CurationProfileArgs{
 * 			CurationProfileName: pulumi.String("DevOnlyResources"),
 * 			DevCenterName:       pulumi.String("Contoso"),
 * 			ResourceGroupName:   pulumi.String("rg1"),
 * 			ResourcePolicies: devcenter.ResourcePolicyArray{
 * 				&devcenter.ResourcePolicyArgs{
 * 					Resources: pulumi.String("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff1/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-westus3"),
 * 				},
 * 			},
 * 			Scopes: pulumi.StringArray{
 * 				pulumi.String("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff1/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject"),
 * 			},
 * 		})
 * 		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.devcenter.CurationProfile;
 * import com.pulumi.azurenative.devcenter.CurationProfileArgs;
 * import com.pulumi.azurenative.devcenter.inputs.ResourcePolicyArgs;
 * 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 curationProfile = new CurationProfile("curationProfile", CurationProfileArgs.builder()
 *             .curationProfileName("DevOnlyResources")
 *             .devCenterName("Contoso")
 *             .resourceGroupName("rg1")
 *             .resourcePolicies(ResourcePolicyArgs.builder()
 *                 .resources("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff1/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-westus3")
 *                 .build())
 *             .scopes("/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff1/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:devcenter:CurationProfile DevOnlyResources /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/curationProfiles/{curationProfileName}
 * ```
 * @property curationProfileName The name of the curation profile.
 * @property devCenterName The name of the devcenter.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property resourcePolicies Resource policies that are a part of this curation profile.
 * @property scopes Resources that have access to the shared resources that are a part of this curation profile.
 */
public data class CurationProfileArgs(
    public val curationProfileName: Output? = null,
    public val devCenterName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val resourcePolicies: Output>? = null,
    public val scopes: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.devcenter.CurationProfileArgs =
        com.pulumi.azurenative.devcenter.CurationProfileArgs.builder()
            .curationProfileName(curationProfileName?.applyValue({ args0 -> args0 }))
            .devCenterName(devCenterName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .resourcePolicies(
                resourcePolicies?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .scopes(scopes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [CurationProfileArgs].
 */
@PulumiTagMarker
public class CurationProfileArgsBuilder internal constructor() {
    private var curationProfileName: Output? = null

    private var devCenterName: Output? = null

    private var resourceGroupName: Output? = null

    private var resourcePolicies: Output>? = null

    private var scopes: Output>? = null

    /**
     * @param value The name of the curation profile.
     */
    @JvmName("yuksvamrxiuaxfmr")
    public suspend fun curationProfileName(`value`: Output) {
        this.curationProfileName = value
    }

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

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

    /**
     * @param value Resource policies that are a part of this curation profile.
     */
    @JvmName("tyxkuolubpsbnkkk")
    public suspend fun resourcePolicies(`value`: Output>) {
        this.resourcePolicies = value
    }

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

    /**
     * @param values Resource policies that are a part of this curation profile.
     */
    @JvmName("iaomnpakcowgeqxx")
    public suspend fun resourcePolicies(values: List>) {
        this.resourcePolicies = Output.all(values)
    }

    /**
     * @param value Resources that have access to the shared resources that are a part of this curation profile.
     */
    @JvmName("ltvbnmuhuaytusik")
    public suspend fun scopes(`value`: Output>) {
        this.scopes = value
    }

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

    /**
     * @param values Resources that have access to the shared resources that are a part of this curation profile.
     */
    @JvmName("efpukyiyqjibatnm")
    public suspend fun scopes(values: List>) {
        this.scopes = Output.all(values)
    }

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

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

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

    /**
     * @param value Resource policies that are a part of this curation profile.
     */
    @JvmName("hremhmhuyqptfbec")
    public suspend fun resourcePolicies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourcePolicies = mapped
    }

    /**
     * @param argument Resource policies that are a part of this curation profile.
     */
    @JvmName("ksndraihyyorxktc")
    public suspend fun resourcePolicies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ResourcePolicyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.resourcePolicies = mapped
    }

    /**
     * @param argument Resource policies that are a part of this curation profile.
     */
    @JvmName("qedqkcxrsgntualy")
    public suspend fun resourcePolicies(vararg argument: suspend ResourcePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ResourcePolicyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.resourcePolicies = mapped
    }

    /**
     * @param argument Resource policies that are a part of this curation profile.
     */
    @JvmName("kvbixnhhdchmabwq")
    public suspend fun resourcePolicies(argument: suspend ResourcePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ResourcePolicyArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.resourcePolicies = mapped
    }

    /**
     * @param values Resource policies that are a part of this curation profile.
     */
    @JvmName("hmffkbhpcmvjoqdx")
    public suspend fun resourcePolicies(vararg values: ResourcePolicyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourcePolicies = mapped
    }

    /**
     * @param value Resources that have access to the shared resources that are a part of this curation profile.
     */
    @JvmName("aypttjqhpxyqbuhj")
    public suspend fun scopes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scopes = mapped
    }

    /**
     * @param values Resources that have access to the shared resources that are a part of this curation profile.
     */
    @JvmName("ksfmnqxwmdnbkely")
    public suspend fun scopes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scopes = mapped
    }

    internal fun build(): CurationProfileArgs = CurationProfileArgs(
        curationProfileName = curationProfileName,
        devCenterName = devCenterName,
        resourceGroupName = resourceGroupName,
        resourcePolicies = resourcePolicies,
        scopes = scopes,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy