Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.blueprint.kotlin.BlueprintArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.blueprint.kotlin
import com.pulumi.azurenative.blueprint.BlueprintArgs.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.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Represents a Blueprint definition.
* 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
* ### ManagementGroupBlueprint
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var blueprint = new AzureNative.Blueprint.Blueprint("blueprint", new()
* {
* BlueprintName = "simpleBlueprint",
* Description = "blueprint contains all artifact kinds {'template', 'rbac', 'policy'}",
* Parameters =
* {
* { "costCenter", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
* {
* DisplayName = "force cost center tag for all resources under given subscription.",
* Type = AzureNative.Blueprint.TemplateParameterType.@String,
* } },
* { "owners", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
* {
* DisplayName = "assign owners to subscription along with blueprint assignment.",
* Type = AzureNative.Blueprint.TemplateParameterType.Array,
* } },
* { "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
* {
* DisplayName = "storage account type.",
* Type = AzureNative.Blueprint.TemplateParameterType.@String,
* } },
* },
* ResourceGroups =
* {
* { "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupDefinitionArgs
* {
* Description = "Contains storageAccounts that collect all shoebox logs.",
* DisplayName = "storage resource group",
* } },
* },
* ResourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
* TargetScope = AzureNative.Blueprint.BlueprintTargetScope.Subscription,
* });
* });
* ```
* ```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.NewBlueprint(ctx, "blueprint", &blueprint.BlueprintArgs{
* BlueprintName: pulumi.String("simpleBlueprint"),
* Description: pulumi.String("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}"),
* Parameters: blueprint.ParameterDefinitionMap{
* "costCenter": &blueprint.ParameterDefinitionArgs{
* DisplayName: pulumi.String("force cost center tag for all resources under given subscription."),
* Type: pulumi.String(blueprint.TemplateParameterTypeString),
* },
* "owners": &blueprint.ParameterDefinitionArgs{
* DisplayName: pulumi.String("assign owners to subscription along with blueprint assignment."),
* Type: pulumi.String(blueprint.TemplateParameterTypeArray),
* },
* "storageAccountType": &blueprint.ParameterDefinitionArgs{
* DisplayName: pulumi.String("storage account type."),
* Type: pulumi.String(blueprint.TemplateParameterTypeString),
* },
* },
* ResourceGroups: blueprint.ResourceGroupDefinitionMap{
* "storageRG": &blueprint.ResourceGroupDefinitionArgs{
* Description: pulumi.String("Contains storageAccounts that collect all shoebox logs."),
* DisplayName: pulumi.String("storage resource group"),
* },
* },
* ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup"),
* TargetScope: pulumi.String(blueprint.BlueprintTargetScopeSubscription),
* })
* 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.Blueprint;
* import com.pulumi.azurenative.blueprint.BlueprintArgs;
* 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 blueprint = new Blueprint("blueprint", BlueprintArgs.builder()
* .blueprintName("simpleBlueprint")
* .description("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}")
* .parameters(Map.ofEntries(
* Map.entry("costCenter", Map.ofEntries(
* Map.entry("displayName", "force cost center tag for all resources under given subscription."),
* Map.entry("type", "string")
* )),
* Map.entry("owners", Map.ofEntries(
* Map.entry("displayName", "assign owners to subscription along with blueprint assignment."),
* Map.entry("type", "array")
* )),
* Map.entry("storageAccountType", Map.ofEntries(
* Map.entry("displayName", "storage account type."),
* Map.entry("type", "string")
* ))
* ))
* .resourceGroups(Map.of("storageRG", Map.ofEntries(
* Map.entry("description", "Contains storageAccounts that collect all shoebox logs."),
* Map.entry("displayName", "storage resource group")
* )))
* .resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
* .targetScope("subscription")
* .build());
* }
* }
* ```
* ### ResourceGroupWithTags
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var blueprint = new AzureNative.Blueprint.Blueprint("blueprint", new()
* {
* BlueprintName = "simpleBlueprint",
* Description = "An example blueprint containing an RG with two tags.",
* ResourceGroups =
* {
* { "myRGName", new AzureNative.Blueprint.Inputs.ResourceGroupDefinitionArgs
* {
* DisplayName = "My Resource Group",
* Location = "westus",
* Name = "myRGName",
* Tags =
* {
* { "costcenter", "123456" },
* { "nameOnlyTag", "" },
* },
* } },
* },
* ResourceScope = "providers/Microsoft.Management/managementGroups/{ManagementGroupId}",
* TargetScope = AzureNative.Blueprint.BlueprintTargetScope.Subscription,
* });
* });
* ```
* ```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.NewBlueprint(ctx, "blueprint", &blueprint.BlueprintArgs{
* BlueprintName: pulumi.String("simpleBlueprint"),
* Description: pulumi.String("An example blueprint containing an RG with two tags."),
* ResourceGroups: blueprint.ResourceGroupDefinitionMap{
* "myRGName": &blueprint.ResourceGroupDefinitionArgs{
* DisplayName: pulumi.String("My Resource Group"),
* Location: pulumi.String("westus"),
* Name: pulumi.String("myRGName"),
* Tags: pulumi.StringMap{
* "costcenter": pulumi.String("123456"),
* "nameOnlyTag": pulumi.String(""),
* },
* },
* },
* ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/{ManagementGroupId}"),
* TargetScope: pulumi.String(blueprint.BlueprintTargetScopeSubscription),
* })
* 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.Blueprint;
* import com.pulumi.azurenative.blueprint.BlueprintArgs;
* 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 blueprint = new Blueprint("blueprint", BlueprintArgs.builder()
* .blueprintName("simpleBlueprint")
* .description("An example blueprint containing an RG with two tags.")
* .resourceGroups(Map.of("myRGName", Map.ofEntries(
* Map.entry("displayName", "My Resource Group"),
* Map.entry("location", "westus"),
* Map.entry("name", "myRGName"),
* Map.entry("tags", Map.ofEntries(
* Map.entry("costcenter", "123456"),
* Map.entry("nameOnlyTag", "")
* ))
* )))
* .resourceScope("providers/Microsoft.Management/managementGroups/{ManagementGroupId}")
* .targetScope("subscription")
* .build());
* }
* }
* ```
* ### SubscriptionBlueprint
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var blueprint = new AzureNative.Blueprint.Blueprint("blueprint", new()
* {
* BlueprintName = "simpleBlueprint",
* Description = "blueprint contains all artifact kinds {'template', 'rbac', 'policy'}",
* Parameters =
* {
* { "costCenter", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
* {
* DisplayName = "force cost center tag for all resources under given subscription.",
* Type = AzureNative.Blueprint.TemplateParameterType.@String,
* } },
* { "owners", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
* {
* DisplayName = "assign owners to subscription along with blueprint assignment.",
* Type = AzureNative.Blueprint.TemplateParameterType.Array,
* } },
* { "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
* {
* DisplayName = "storage account type.",
* Type = AzureNative.Blueprint.TemplateParameterType.@String,
* } },
* },
* ResourceGroups =
* {
* { "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupDefinitionArgs
* {
* Description = "Contains storageAccounts that collect all shoebox logs.",
* DisplayName = "storage resource group",
* } },
* },
* ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
* TargetScope = AzureNative.Blueprint.BlueprintTargetScope.Subscription,
* });
* });
* ```
* ```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.NewBlueprint(ctx, "blueprint", &blueprint.BlueprintArgs{
* BlueprintName: pulumi.String("simpleBlueprint"),
* Description: pulumi.String("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}"),
* Parameters: blueprint.ParameterDefinitionMap{
* "costCenter": &blueprint.ParameterDefinitionArgs{
* DisplayName: pulumi.String("force cost center tag for all resources under given subscription."),
* Type: pulumi.String(blueprint.TemplateParameterTypeString),
* },
* "owners": &blueprint.ParameterDefinitionArgs{
* DisplayName: pulumi.String("assign owners to subscription along with blueprint assignment."),
* Type: pulumi.String(blueprint.TemplateParameterTypeArray),
* },
* "storageAccountType": &blueprint.ParameterDefinitionArgs{
* DisplayName: pulumi.String("storage account type."),
* Type: pulumi.String(blueprint.TemplateParameterTypeString),
* },
* },
* ResourceGroups: blueprint.ResourceGroupDefinitionMap{
* "storageRG": &blueprint.ResourceGroupDefinitionArgs{
* Description: pulumi.String("Contains storageAccounts that collect all shoebox logs."),
* DisplayName: pulumi.String("storage resource group"),
* },
* },
* ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
* TargetScope: pulumi.String(blueprint.BlueprintTargetScopeSubscription),
* })
* 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.Blueprint;
* import com.pulumi.azurenative.blueprint.BlueprintArgs;
* 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 blueprint = new Blueprint("blueprint", BlueprintArgs.builder()
* .blueprintName("simpleBlueprint")
* .description("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}")
* .parameters(Map.ofEntries(
* Map.entry("costCenter", Map.ofEntries(
* Map.entry("displayName", "force cost center tag for all resources under given subscription."),
* Map.entry("type", "string")
* )),
* Map.entry("owners", Map.ofEntries(
* Map.entry("displayName", "assign owners to subscription along with blueprint assignment."),
* Map.entry("type", "array")
* )),
* Map.entry("storageAccountType", Map.ofEntries(
* Map.entry("displayName", "storage account type."),
* Map.entry("type", "string")
* ))
* ))
* .resourceGroups(Map.of("storageRG", Map.ofEntries(
* Map.entry("description", "Contains storageAccounts that collect all shoebox logs."),
* Map.entry("displayName", "storage resource group")
* )))
* .resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
* .targetScope("subscription")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:blueprint:Blueprint simpleBlueprint /{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}
* ```
* @property blueprintName Name of the blueprint definition.
* @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 versions Published versions of this blueprint definition.
*/
public data class BlueprintArgs(
public val blueprintName: 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 versions: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.blueprint.BlueprintArgs =
com.pulumi.azurenative.blueprint.BlueprintArgs.builder()
.blueprintName(blueprintName?.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() })
})
}),
)
.versions(versions?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [BlueprintArgs].
*/
@PulumiTagMarker
public class BlueprintArgsBuilder internal constructor() {
private var blueprintName: 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 versions: Output? = null
/**
* @param value Name of the blueprint definition.
*/
@JvmName("uqhnbktinrtmpeuh")
public suspend fun blueprintName(`value`: Output) {
this.blueprintName = value
}
/**
* @param value Multi-line explain this resource.
*/
@JvmName("tcgqpbqquofqitku")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value One-liner string explain this resource.
*/
@JvmName("ainypdcqjcrxdrcf")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value Parameters required by this blueprint definition.
*/
@JvmName("pavlgufpeojlhhwy")
public suspend fun parameters(`value`: Output>) {
this.parameters = value
}
/**
* @param value Resource group placeholders defined by this blueprint definition.
*/
@JvmName("sxjtlyxmqikdswln")
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("gkotwlbheisgrmot")
public suspend fun resourceScope(`value`: Output) {
this.resourceScope = value
}
/**
* @param value The scope where this blueprint definition can be assigned.
*/
@JvmName("brvlanqtmgkfkgfr")
public suspend fun targetScope(`value`: Output>) {
this.targetScope = value
}
/**
* @param value Published versions of this blueprint definition.
*/
@JvmName("bpisrawturkusptx")
public suspend fun versions(`value`: Output) {
this.versions = value
}
/**
* @param value Name of the blueprint definition.
*/
@JvmName("xlgeludfkhxsoloo")
public suspend fun blueprintName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.blueprintName = mapped
}
/**
* @param value Multi-line explain this resource.
*/
@JvmName("jtqfxglxhudwcsuu")
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("vmtkjjmffjxurgsx")
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("cbxvlamkbckpxybh")
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("pvxhtbgypflwxixn")
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("lekoxplpycinpchw")
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("ejihlckycbowanun")
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("lmfenwryvkshdedv")
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("yxmjduqqtatahpbb")
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("vgviwwfjqwkhujij")
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("vxsllrqayoilijxg")
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("cxvjeqocimqjlsel")
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("gcqvfuavhcllaseq")
public fun targetScope(`value`: BlueprintTargetScope) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.targetScope = mapped
}
/**
* @param value Published versions of this blueprint definition.
*/
@JvmName("ualsxysgvdkgldum")
public suspend fun versions(`value`: Any?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.versions = mapped
}
internal fun build(): BlueprintArgs = BlueprintArgs(
blueprintName = blueprintName,
description = description,
displayName = displayName,
parameters = parameters,
resourceGroups = resourceGroups,
resourceScope = resourceScope,
targetScope = targetScope,
versions = versions,
)
}