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

com.pulumi.azurenative.blueprint.kotlin.PublishedBlueprintArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.blueprint.kotlin

import com.pulumi.azurenative.blueprint.PublishedBlueprintArgs.builder
import com.pulumi.azurenative.blueprint.kotlin.enums.BlueprintTargetScope
import com.pulumi.azurenative.blueprint.kotlin.inputs.ParameterDefinitionArgs
import com.pulumi.azurenative.blueprint.kotlin.inputs.ParameterDefinitionArgsBuilder
import com.pulumi.azurenative.blueprint.kotlin.inputs.ResourceGroupDefinitionArgs
import com.pulumi.azurenative.blueprint.kotlin.inputs.ResourceGroupDefinitionArgsBuilder
import com.pulumi.core.Either
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

/**
 * Represents a published blueprint.
 * Azure REST API version: 2018-11-01-preview. Prior API version in Azure Native 1.x: 2018-11-01-preview.
 * Other available API versions: 2017-11-11-preview.
 * ## Example Usage
 * ### PublishedManagementGroupBlueprint_Publish
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var publishedBlueprint = new AzureNative.Blueprint.PublishedBlueprint("publishedBlueprint", new()
 *     {
 *         BlueprintName = "simpleBlueprint",
 *         ResourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
 *         VersionId = "v2",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := blueprint.NewPublishedBlueprint(ctx, "publishedBlueprint", &blueprint.PublishedBlueprintArgs{
 * 			BlueprintName: pulumi.String("simpleBlueprint"),
 * 			ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup"),
 * 			VersionId:     pulumi.String("v2"),
 * 		})
 * 		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.blueprint.PublishedBlueprint;
 * import com.pulumi.azurenative.blueprint.PublishedBlueprintArgs;
 * 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 publishedBlueprint = new PublishedBlueprint("publishedBlueprint", PublishedBlueprintArgs.builder()
 *             .blueprintName("simpleBlueprint")
 *             .resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
 *             .versionId("v2")
 *             .build());
 *     }
 * }
 * ```
 * ### PublishedSubscriptionBlueprint_Publish
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var publishedBlueprint = new AzureNative.Blueprint.PublishedBlueprint("publishedBlueprint", new()
 *     {
 *         BlueprintName = "simpleBlueprint",
 *         ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
 *         VersionId = "v2",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := blueprint.NewPublishedBlueprint(ctx, "publishedBlueprint", &blueprint.PublishedBlueprintArgs{
 * 			BlueprintName: pulumi.String("simpleBlueprint"),
 * 			ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
 * 			VersionId:     pulumi.String("v2"),
 * 		})
 * 		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.blueprint.PublishedBlueprint;
 * import com.pulumi.azurenative.blueprint.PublishedBlueprintArgs;
 * 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 publishedBlueprint = new PublishedBlueprint("publishedBlueprint", PublishedBlueprintArgs.builder()
 *             .blueprintName("simpleBlueprint")
 *             .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
 *             .versionId("v2")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:blueprint:PublishedBlueprint v2 /{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/versions/{versionId}
 * ```
 * @property blueprintName Name of the published blueprint definition.
 * @property changeNotes Version-specific change notes.
 * @property description Multi-line explain this resource.
 * @property displayName One-liner string explain this resource.
 * @property parameters Parameters required by this blueprint definition.
 * @property resourceGroups Resource group placeholders defined by this blueprint definition.
 * @property resourceScope The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
 * @property targetScope The scope where this blueprint definition can be assigned.
 * @property versionId Version of the published blueprint definition.
 */
public data class PublishedBlueprintArgs(
    public val blueprintName: Output? = null,
    public val changeNotes: Output? = null,
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val parameters: Output>? = null,
    public val resourceGroups: Output>? = null,
    public val resourceScope: Output? = null,
    public val targetScope: Output>? = null,
    public val versionId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.blueprint.PublishedBlueprintArgs =
        com.pulumi.azurenative.blueprint.PublishedBlueprintArgs.builder()
            .blueprintName(blueprintName?.applyValue({ args0 -> args0 }))
            .changeNotes(changeNotes?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .resourceGroups(
                resourceGroups?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .resourceScope(resourceScope?.applyValue({ args0 -> args0 }))
            .targetScope(
                targetScope?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .versionId(versionId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PublishedBlueprintArgs].
 */
@PulumiTagMarker
public class PublishedBlueprintArgsBuilder internal constructor() {
    private var blueprintName: Output? = null

    private var changeNotes: Output? = null

    private var description: Output? = null

    private var displayName: Output? = null

    private var parameters: Output>? = null

    private var resourceGroups: Output>? = null

    private var resourceScope: Output? = null

    private var targetScope: Output>? = null

    private var versionId: Output? = null

    /**
     * @param value Name of the published blueprint definition.
     */
    @JvmName("dgbeajxqvihilhoe")
    public suspend fun blueprintName(`value`: Output) {
        this.blueprintName = value
    }

    /**
     * @param value Version-specific change notes.
     */
    @JvmName("mjngtuwxsbycaqya")
    public suspend fun changeNotes(`value`: Output) {
        this.changeNotes = value
    }

    /**
     * @param value Multi-line explain this resource.
     */
    @JvmName("vmntwuigwogkdxye")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value One-liner string explain this resource.
     */
    @JvmName("ubrrkdgradhwtlia")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Parameters required by this blueprint definition.
     */
    @JvmName("stcvabfwwkaxvnnn")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value Resource group placeholders defined by this blueprint definition.
     */
    @JvmName("strcwslihnbtyydu")
    public suspend fun resourceGroups(`value`: Output>) {
        this.resourceGroups = value
    }

    /**
     * @param value The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
     */
    @JvmName("hkqjmjmtsfdwrdom")
    public suspend fun resourceScope(`value`: Output) {
        this.resourceScope = value
    }

    /**
     * @param value The scope where this blueprint definition can be assigned.
     */
    @JvmName("aaxoevtxstiquswp")
    public suspend fun targetScope(`value`: Output>) {
        this.targetScope = value
    }

    /**
     * @param value Version of the published blueprint definition.
     */
    @JvmName("tqvduohlfdtjusvk")
    public suspend fun versionId(`value`: Output) {
        this.versionId = value
    }

    /**
     * @param value Name of the published blueprint definition.
     */
    @JvmName("vifcqvppraojmesn")
    public suspend fun blueprintName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blueprintName = mapped
    }

    /**
     * @param value Version-specific change notes.
     */
    @JvmName("vlkyjjbvyflrfmqf")
    public suspend fun changeNotes(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.changeNotes = mapped
    }

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

    /**
     * @param value One-liner string explain this resource.
     */
    @JvmName("mnmxcjybxurjxblm")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Parameters required by this blueprint definition.
     */
    @JvmName("boghwwbulqnhsadh")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument Parameters required by this blueprint definition.
     */
    @JvmName("visaqypdfsxxmhpc")
    public suspend fun parameters(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                ParameterDefinitionArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values Parameters required by this blueprint definition.
     */
    @JvmName("eybsxwbkemsfhhma")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value Resource group placeholders defined by this blueprint definition.
     */
    @JvmName("cwrixcxstrxpxoix")
    public suspend fun resourceGroups(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroups = mapped
    }

    /**
     * @param argument Resource group placeholders defined by this blueprint definition.
     */
    @JvmName("hiifburyqahlemvp")
    public suspend fun resourceGroups(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                ResourceGroupDefinitionArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.resourceGroups = mapped
    }

    /**
     * @param values Resource group placeholders defined by this blueprint definition.
     */
    @JvmName("btddpaenxgutdwrm")
    public fun resourceGroups(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceGroups = mapped
    }

    /**
     * @param value The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
     */
    @JvmName("wxeuvioeunplgxfl")
    public suspend fun resourceScope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceScope = mapped
    }

    /**
     * @param value The scope where this blueprint definition can be assigned.
     */
    @JvmName("xaccirluatixkmmq")
    public suspend fun targetScope(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetScope = mapped
    }

    /**
     * @param value The scope where this blueprint definition can be assigned.
     */
    @JvmName("msdtwckxpqtfgdvk")
    public fun targetScope(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetScope = mapped
    }

    /**
     * @param value The scope where this blueprint definition can be assigned.
     */
    @JvmName("ypycempoxvjmdhsm")
    public fun targetScope(`value`: BlueprintTargetScope) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetScope = mapped
    }

    /**
     * @param value Version of the published blueprint definition.
     */
    @JvmName("ybluprmetrrheico")
    public suspend fun versionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.versionId = mapped
    }

    internal fun build(): PublishedBlueprintArgs = PublishedBlueprintArgs(
        blueprintName = blueprintName,
        changeNotes = changeNotes,
        description = description,
        displayName = displayName,
        parameters = parameters,
        resourceGroups = resourceGroups,
        resourceScope = resourceScope,
        targetScope = targetScope,
        versionId = versionId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy