![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.dashboard.kotlin.Grafana.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.dashboard.kotlin
import com.pulumi.azure.dashboard.kotlin.outputs.GrafanaAzureMonitorWorkspaceIntegration
import com.pulumi.azure.dashboard.kotlin.outputs.GrafanaIdentity
import com.pulumi.azure.dashboard.kotlin.outputs.GrafanaSmtp
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azure.dashboard.kotlin.outputs.GrafanaAzureMonitorWorkspaceIntegration.Companion.toKotlin as grafanaAzureMonitorWorkspaceIntegrationToKotlin
import com.pulumi.azure.dashboard.kotlin.outputs.GrafanaIdentity.Companion.toKotlin as grafanaIdentityToKotlin
import com.pulumi.azure.dashboard.kotlin.outputs.GrafanaSmtp.Companion.toKotlin as grafanaSmtpToKotlin
/**
* Builder for [Grafana].
*/
@PulumiTagMarker
public class GrafanaResourceBuilder internal constructor() {
public var name: String? = null
public var args: GrafanaArgs = GrafanaArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend GrafanaArgsBuilder.() -> Unit) {
val builder = GrafanaArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Grafana {
val builtJavaResource = com.pulumi.azure.dashboard.Grafana(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Grafana(builtJavaResource)
}
}
/**
* Manages a Dashboard Grafana.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleGrafana = new azure.dashboard.Grafana("example", {
* name: "example-dg",
* resourceGroupName: example.name,
* location: "West Europe",
* apiKeyEnabled: true,
* deterministicOutboundIpEnabled: true,
* publicNetworkAccessEnabled: false,
* identity: {
* type: "SystemAssigned",
* },
* tags: {
* key: "value",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_grafana = azure.dashboard.Grafana("example",
* name="example-dg",
* resource_group_name=example.name,
* location="West Europe",
* api_key_enabled=True,
* deterministic_outbound_ip_enabled=True,
* public_network_access_enabled=False,
* identity={
* "type": "SystemAssigned",
* },
* tags={
* "key": "value",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleGrafana = new Azure.Dashboard.Grafana("example", new()
* {
* Name = "example-dg",
* ResourceGroupName = example.Name,
* Location = "West Europe",
* ApiKeyEnabled = true,
* DeterministicOutboundIpEnabled = true,
* PublicNetworkAccessEnabled = false,
* Identity = new Azure.Dashboard.Inputs.GrafanaIdentityArgs
* {
* Type = "SystemAssigned",
* },
* Tags =
* {
* { "key", "value" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dashboard"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = dashboard.NewGrafana(ctx, "example", &dashboard.GrafanaArgs{
* Name: pulumi.String("example-dg"),
* ResourceGroupName: example.Name,
* Location: pulumi.String("West Europe"),
* ApiKeyEnabled: pulumi.Bool(true),
* DeterministicOutboundIpEnabled: pulumi.Bool(true),
* PublicNetworkAccessEnabled: pulumi.Bool(false),
* Identity: &dashboard.GrafanaIdentityArgs{
* Type: pulumi.String("SystemAssigned"),
* },
* Tags: pulumi.StringMap{
* "key": pulumi.String("value"),
* },
* })
* 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.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.dashboard.Grafana;
* import com.pulumi.azure.dashboard.GrafanaArgs;
* import com.pulumi.azure.dashboard.inputs.GrafanaIdentityArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleGrafana = new Grafana("exampleGrafana", GrafanaArgs.builder()
* .name("example-dg")
* .resourceGroupName(example.name())
* .location("West Europe")
* .apiKeyEnabled(true)
* .deterministicOutboundIpEnabled(true)
* .publicNetworkAccessEnabled(false)
* .identity(GrafanaIdentityArgs.builder()
* .type("SystemAssigned")
* .build())
* .tags(Map.of("key", "value"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleGrafana:
* type: azure:dashboard:Grafana
* name: example
* properties:
* name: example-dg
* resourceGroupName: ${example.name}
* location: West Europe
* apiKeyEnabled: true
* deterministicOutboundIpEnabled: true
* publicNetworkAccessEnabled: false
* identity:
* type: SystemAssigned
* tags:
* key: value
* ```
*
* ## Import
* Dashboard Grafana can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:dashboard/grafana:Grafana example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Dashboard/grafana/workspace1
* ```
*/
public class Grafana internal constructor(
override val javaResource: com.pulumi.azure.dashboard.Grafana,
) : KotlinCustomResource(javaResource, GrafanaMapper) {
/**
* Whether to enable the api key setting of the Grafana instance. Defaults to `false`.
*/
public val apiKeyEnabled: Output?
get() = javaResource.apiKeyEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Scope for dns deterministic name hash calculation. The only possible value is `TenantReuse`. Defaults to `TenantReuse`.
*/
public val autoGeneratedDomainNameLabelScope: Output?
get() = javaResource.autoGeneratedDomainNameLabelScope().applyValue({ args0 ->
args0.map({ args0 -> args0 }).orElse(null)
})
/**
* A `azure_monitor_workspace_integrations` block as defined below.
*/
public val azureMonitorWorkspaceIntegrations:
Output>?
get() = javaResource.azureMonitorWorkspaceIntegrations().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
grafanaAzureMonitorWorkspaceIntegrationToKotlin(args0)
})
})
}).orElse(null)
})
/**
* Whether to enable the Grafana instance to use deterministic outbound IPs. Defaults to `false`.
*/
public val deterministicOutboundIpEnabled: Output?
get() = javaResource.deterministicOutboundIpEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The endpoint of the Grafana instance.
*/
public val endpoint: Output
get() = javaResource.endpoint().applyValue({ args0 -> args0 })
/**
* Which major version of Grafana to deploy. Defaults to `9`. Possible values are `9`, `10`. Changing this forces a new resource to be created.
*/
public val grafanaMajorVersion: Output?
get() = javaResource.grafanaMajorVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The full Grafana software semantic version deployed.
*/
public val grafanaVersion: Output
get() = javaResource.grafanaVersion().applyValue({ args0 -> args0 })
/**
* An `identity` block as defined below. Changing this forces a new Dashboard Grafana to be created.
*/
public val identity: Output?
get() = javaResource.identity().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
grafanaIdentityToKotlin(args0)
})
}).orElse(null)
})
/**
* Specifies the Azure Region where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Specifies the name which should be used for this Dashboard Grafana. Changing this forces a new Dashboard Grafana to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* List of outbound IPs if deterministicOutboundIP is enabled.
*/
public val outboundIps: Output>
get() = javaResource.outboundIps().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Whether to enable traffic over the public interface. Defaults to `true`.
*/
public val publicNetworkAccessEnabled: Output?
get() = javaResource.publicNetworkAccessEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the name of the Resource Group where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* The name of the SKU used for the Grafana instance. Possible values are `Standard` and `Essential`. Defaults to `Standard`. Changing this forces a new Dashboard Grafana to be created.
*/
public val sku: Output?
get() = javaResource.sku().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* A `smtp` block as defined below.
*/
public val smtp: Output?
get() = javaResource.smtp().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
grafanaSmtpToKotlin(args0)
})
}).orElse(null)
})
/**
* A mapping of tags which should be assigned to the Dashboard Grafana.
*/
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy