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.portal.kotlin.DashboardArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.portal.kotlin
import com.pulumi.azurenative.portal.DashboardArgs.builder
import com.pulumi.azurenative.portal.kotlin.inputs.DashboardPropertiesWithProvisioningStateArgs
import com.pulumi.azurenative.portal.kotlin.inputs.DashboardPropertiesWithProvisioningStateArgsBuilder
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
/**
* The shared dashboard resource definition.
* Azure REST API version: 2020-09-01-preview. Prior API version in Azure Native 1.x: 2020-09-01-preview.
* Other available API versions: 2019-01-01-preview, 2022-12-01-preview.
* ## Example Usage
* ### Create or update a Dashboard
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var dashboard = new AzureNative.Portal.Dashboard("dashboard", new()
* {
* DashboardName = "testDashboard",
* Location = "eastus",
* Properties = new AzureNative.Portal.Inputs.DashboardPropertiesWithProvisioningStateArgs
* {
* Lenses = new[]
* {
* new AzureNative.Portal.Inputs.DashboardLensArgs
* {
* Order = 1,
* Parts = new[]
* {
* new AzureNative.Portal.Inputs.DashboardPartsArgs
* {
* Position = new AzureNative.Portal.Inputs.DashboardPartsPositionArgs
* {
* ColSpan = 3,
* RowSpan = 4,
* X = 1,
* Y = 2,
* },
* },
* new AzureNative.Portal.Inputs.DashboardPartsArgs
* {
* Position = new AzureNative.Portal.Inputs.DashboardPartsPositionArgs
* {
* ColSpan = 6,
* RowSpan = 6,
* X = 5,
* Y = 5,
* },
* },
* },
* },
* new AzureNative.Portal.Inputs.DashboardLensArgs
* {
* Order = 2,
* Parts = new() { },
* },
* },
* Metadata = new Dictionary
* {
* ["metadata"] = new Dictionary
* {
* ["ColSpan"] = 2,
* ["RowSpan"] = 1,
* ["X"] = 4,
* ["Y"] = 3,
* },
* },
* },
* ResourceGroupName = "testRG",
* Tags =
* {
* { "aKey", "aValue" },
* { "anotherKey", "anotherValue" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* portal "github.com/pulumi/pulumi-azure-native-sdk/portal/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := portal.NewDashboard(ctx, "dashboard", &portal.DashboardArgs{
* DashboardName: pulumi.String("testDashboard"),
* Location: pulumi.String("eastus"),
* Properties: &portal.DashboardPropertiesWithProvisioningStateArgs{
* Lenses: portal.DashboardLensArray{
* &portal.DashboardLensArgs{
* Order: pulumi.Int(1),
* Parts: portal.DashboardPartsArray{
* &portal.DashboardPartsArgs{
* Position: &portal.DashboardPartsPositionArgs{
* ColSpan: pulumi.Int(3),
* RowSpan: pulumi.Int(4),
* X: pulumi.Int(1),
* Y: pulumi.Int(2),
* },
* },
* &portal.DashboardPartsArgs{
* Position: &portal.DashboardPartsPositionArgs{
* ColSpan: pulumi.Int(6),
* RowSpan: pulumi.Int(6),
* X: pulumi.Int(5),
* Y: pulumi.Int(5),
* },
* },
* },
* },
* &portal.DashboardLensArgs{
* Order: pulumi.Int(2),
* Parts: portal.DashboardPartsArray{},
* },
* },
* Metadata: pulumi.Any(map[string]interface{}{
* "metadata": map[string]interface{}{
* "ColSpan": 2,
* "RowSpan": 1,
* "X": 4,
* "Y": 3,
* },
* }),
* },
* ResourceGroupName: pulumi.String("testRG"),
* Tags: pulumi.StringMap{
* "aKey": pulumi.String("aValue"),
* "anotherKey": pulumi.String("anotherValue"),
* },
* })
* 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.portal.Dashboard;
* import com.pulumi.azurenative.portal.DashboardArgs;
* import com.pulumi.azurenative.portal.inputs.DashboardPropertiesWithProvisioningStateArgs;
* 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 dashboard = new Dashboard("dashboard", DashboardArgs.builder()
* .dashboardName("testDashboard")
* .location("eastus")
* .properties(DashboardPropertiesWithProvisioningStateArgs.builder()
* .lenses(
* DashboardLensArgs.builder()
* .order(1)
* .parts(
* DashboardPartsArgs.builder()
* .position(DashboardPartsPositionArgs.builder()
* .colSpan(3)
* .rowSpan(4)
* .x(1)
* .y(2)
* .build())
* .build(),
* DashboardPartsArgs.builder()
* .position(DashboardPartsPositionArgs.builder()
* .colSpan(6)
* .rowSpan(6)
* .x(5)
* .y(5)
* .build())
* .build())
* .build(),
* DashboardLensArgs.builder()
* .order(2)
* .parts()
* .build())
* .metadata(Map.of("metadata", Map.ofEntries(
* Map.entry("ColSpan", 2),
* Map.entry("RowSpan", 1),
* Map.entry("X", 4),
* Map.entry("Y", 3)
* )))
* .build())
* .resourceGroupName("testRG")
* .tags(Map.ofEntries(
* Map.entry("aKey", "aValue"),
* Map.entry("anotherKey", "anotherValue")
* ))
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:portal:Dashboard testDashboard /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards/{dashboardName}
* ```
* @property dashboardName The name of the dashboard.
* @property location The geo-location where the resource lives
* @property properties The resource-specific properties for this resource.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property tags Resource tags.
*/
public data class DashboardArgs(
public val dashboardName: Output? = null,
public val location: Output? = null,
public val properties: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.portal.DashboardArgs =
com.pulumi.azurenative.portal.DashboardArgs.builder()
.dashboardName(dashboardName?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [DashboardArgs].
*/
@PulumiTagMarker
public class DashboardArgsBuilder internal constructor() {
private var dashboardName: Output? = null
private var location: Output? = null
private var properties: Output? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
/**
* @param value The name of the dashboard.
*/
@JvmName("qxoamcmqmlrakolw")
public suspend fun dashboardName(`value`: Output) {
this.dashboardName = value
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("oxdjkrrmbpnryuvv")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The resource-specific properties for this resource.
*/
@JvmName("eshruaugtlhxumxy")
public suspend fun properties(`value`: Output) {
this.properties = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("ppkiekdhutgqcbks")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Resource tags.
*/
@JvmName("kbypjielmrigsrav")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The name of the dashboard.
*/
@JvmName("httgyuxawvmjdjwg")
public suspend fun dashboardName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.dashboardName = mapped
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("svuligqrxufahvbv")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The resource-specific properties for this resource.
*/
@JvmName("hhxtkefdmhxltkyg")
public suspend fun properties(`value`: DashboardPropertiesWithProvisioningStateArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.properties = mapped
}
/**
* @param argument The resource-specific properties for this resource.
*/
@JvmName("fpthbvjuyufgsiui")
public suspend fun properties(argument: suspend DashboardPropertiesWithProvisioningStateArgsBuilder.() -> Unit) {
val toBeMapped = DashboardPropertiesWithProvisioningStateArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.properties = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("vioxsjfehncksete")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("eroethnstwuhnaan")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("hrewwctombceksci")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): DashboardArgs = DashboardArgs(
dashboardName = dashboardName,
location = location,
properties = properties,
resourceGroupName = resourceGroupName,
tags = tags,
)
}