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.azure.monitoring.kotlin.WorkspaceArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.monitoring.kotlin
import com.pulumi.azure.monitoring.WorkspaceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages an Azure Monitor Workspace.
* ## 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 exampleWorkspace = new azure.monitoring.Workspace("example", {
* name: "example-mamw",
* resourceGroupName: example.name,
* location: "West Europe",
* tags: {
* key: "value",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_workspace = azure.monitoring.Workspace("example",
* name="example-mamw",
* resource_group_name=example.name,
* location="West Europe",
* 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 exampleWorkspace = new Azure.Monitoring.Workspace("example", new()
* {
* Name = "example-mamw",
* ResourceGroupName = example.Name,
* Location = "West Europe",
* 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/monitoring"
* "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 = monitoring.NewWorkspace(ctx, "example", &monitoring.WorkspaceArgs{
* Name: pulumi.String("example-mamw"),
* ResourceGroupName: example.Name,
* Location: pulumi.String("West Europe"),
* 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.monitoring.Workspace;
* import com.pulumi.azure.monitoring.WorkspaceArgs;
* 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 exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
* .name("example-mamw")
* .resourceGroupName(example.name())
* .location("West Europe")
* .tags(Map.of("key", "value"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleWorkspace:
* type: azure:monitoring:Workspace
* name: example
* properties:
* name: example-mamw
* resourceGroupName: ${example.name}
* location: West Europe
* tags:
* key: value
* ```
*
* ## Import
* Azure Monitor Workspace can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:monitoring/workspace:Workspace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Monitor/accounts/azureMonitorWorkspace1
* ```
* @property location Specifies the Azure Region where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created.
* @property name Specifies the name which should be used for this Azure Monitor Workspace. Changing this forces a new resource to be created.
* @property publicNetworkAccessEnabled Is public network access enabled? Defaults to `true`.
* @property resourceGroupName Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created.
* @property tags A mapping of tags which should be assigned to the Azure Monitor Workspace.
*/
public data class WorkspaceArgs(
public val location: Output? = null,
public val name: Output? = null,
public val publicNetworkAccessEnabled: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.monitoring.WorkspaceArgs =
com.pulumi.azure.monitoring.WorkspaceArgs.builder()
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [WorkspaceArgs].
*/
@PulumiTagMarker
public class WorkspaceArgsBuilder internal constructor() {
private var location: Output? = null
private var name: Output? = null
private var publicNetworkAccessEnabled: Output? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
/**
* @param value Specifies the Azure Region where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created.
*/
@JvmName("vauvasigfaieowuu")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Specifies the name which should be used for this Azure Monitor Workspace. Changing this forces a new resource to be created.
*/
@JvmName("akfstirddannnbqd")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Is public network access enabled? Defaults to `true`.
*/
@JvmName("tsjlurxjklryegvn")
public suspend fun publicNetworkAccessEnabled(`value`: Output) {
this.publicNetworkAccessEnabled = value
}
/**
* @param value Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created.
*/
@JvmName("rukxbjofsbmgqidr")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A mapping of tags which should be assigned to the Azure Monitor Workspace.
*/
@JvmName("fsyygtexrhneneui")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Specifies the Azure Region where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created.
*/
@JvmName("xvwoebxdlqhjurwq")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Specifies the name which should be used for this Azure Monitor Workspace. Changing this forces a new resource to be created.
*/
@JvmName("pijlnletwgroqaog")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Is public network access enabled? Defaults to `true`.
*/
@JvmName("lldpwqtgrivxjapq")
public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publicNetworkAccessEnabled = mapped
}
/**
* @param value Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created.
*/
@JvmName("ahuacxrxqlgodasq")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value A mapping of tags which should be assigned to the Azure Monitor Workspace.
*/
@JvmName("jwbdjkovupbrvfyw")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A mapping of tags which should be assigned to the Azure Monitor Workspace.
*/
@JvmName("nwowlcwphqixmrrt")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): WorkspaceArgs = WorkspaceArgs(
location = location,
name = name,
publicNetworkAccessEnabled = publicNetworkAccessEnabled,
resourceGroupName = resourceGroupName,
tags = tags,
)
}