All Downloads are FREE. Search and download functionalities are using the official Maven repository.
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.databoxedge.kotlin.MonitoringConfigArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.databoxedge.kotlin
import com.pulumi.azurenative.databoxedge.MonitoringConfigArgs.builder
import com.pulumi.azurenative.databoxedge.kotlin.inputs.MetricConfigurationArgs
import com.pulumi.azurenative.databoxedge.kotlin.inputs.MetricConfigurationArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* The metric setting details for the role
* Azure REST API version: 2022-03-01. Prior API version in Azure Native 1.x: 2020-12-01.
* Other available API versions: 2023-01-01-preview, 2023-07-01, 2023-12-01.
* ## Example Usage
* ### PutMonitoringConfig
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var monitoringConfig = new AzureNative.DataBoxEdge.MonitoringConfig("monitoringConfig", new()
* {
* DeviceName = "testedgedevice",
* MetricConfigurations = new[]
* {
* new AzureNative.DataBoxEdge.Inputs.MetricConfigurationArgs
* {
* CounterSets = new[]
* {
* new AzureNative.DataBoxEdge.Inputs.MetricCounterSetArgs
* {
* Counters = new[]
* {
* new AzureNative.DataBoxEdge.Inputs.MetricCounterArgs
* {
* Name = "test",
* },
* },
* },
* },
* MdmAccount = "test",
* MetricNameSpace = "test",
* ResourceId = "test",
* },
* },
* ResourceGroupName = "GroupForEdgeAutomation",
* RoleName = "testrole",
* });
* });
* ```
* ```go
* package main
* import (
* databoxedge "github.com/pulumi/pulumi-azure-native-sdk/databoxedge/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := databoxedge.NewMonitoringConfig(ctx, "monitoringConfig", &databoxedge.MonitoringConfigArgs{
* DeviceName: pulumi.String("testedgedevice"),
* MetricConfigurations: databoxedge.MetricConfigurationArray{
* &databoxedge.MetricConfigurationArgs{
* CounterSets: databoxedge.MetricCounterSetArray{
* &databoxedge.MetricCounterSetArgs{
* Counters: databoxedge.MetricCounterArray{
* &databoxedge.MetricCounterArgs{
* Name: pulumi.String("test"),
* },
* },
* },
* },
* MdmAccount: pulumi.String("test"),
* MetricNameSpace: pulumi.String("test"),
* ResourceId: pulumi.String("test"),
* },
* },
* ResourceGroupName: pulumi.String("GroupForEdgeAutomation"),
* RoleName: pulumi.String("testrole"),
* })
* 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.databoxedge.MonitoringConfig;
* import com.pulumi.azurenative.databoxedge.MonitoringConfigArgs;
* import com.pulumi.azurenative.databoxedge.inputs.MetricConfigurationArgs;
* 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 monitoringConfig = new MonitoringConfig("monitoringConfig", MonitoringConfigArgs.builder()
* .deviceName("testedgedevice")
* .metricConfigurations(MetricConfigurationArgs.builder()
* .counterSets(MetricCounterSetArgs.builder()
* .counters(MetricCounterArgs.builder()
* .name("test")
* .build())
* .build())
* .mdmAccount("test")
* .metricNameSpace("test")
* .resourceId("test")
* .build())
* .resourceGroupName("GroupForEdgeAutomation")
* .roleName("testrole")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:databoxedge:MonitoringConfig myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default
* ```
* @property deviceName The device name.
* @property metricConfigurations The metrics configuration details
* @property resourceGroupName The resource group name.
* @property roleName The role name.
*/
public data class MonitoringConfigArgs(
public val deviceName: Output? = null,
public val metricConfigurations: Output>? = null,
public val resourceGroupName: Output? = null,
public val roleName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.databoxedge.MonitoringConfigArgs =
com.pulumi.azurenative.databoxedge.MonitoringConfigArgs.builder()
.deviceName(deviceName?.applyValue({ args0 -> args0 }))
.metricConfigurations(
metricConfigurations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.roleName(roleName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [MonitoringConfigArgs].
*/
@PulumiTagMarker
public class MonitoringConfigArgsBuilder internal constructor() {
private var deviceName: Output? = null
private var metricConfigurations: Output>? = null
private var resourceGroupName: Output? = null
private var roleName: Output? = null
/**
* @param value The device name.
*/
@JvmName("jmekhyocedcupmrk")
public suspend fun deviceName(`value`: Output) {
this.deviceName = value
}
/**
* @param value The metrics configuration details
*/
@JvmName("sakxpwnkhboberkp")
public suspend fun metricConfigurations(`value`: Output>) {
this.metricConfigurations = value
}
@JvmName("rkeordcbpmsjhlxf")
public suspend fun metricConfigurations(vararg values: Output) {
this.metricConfigurations = Output.all(values.asList())
}
/**
* @param values The metrics configuration details
*/
@JvmName("rrpefyasihbthrjl")
public suspend fun metricConfigurations(values: List>) {
this.metricConfigurations = Output.all(values)
}
/**
* @param value The resource group name.
*/
@JvmName("geaujplrxndwjocb")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The role name.
*/
@JvmName("ntsotqlwmucbehbc")
public suspend fun roleName(`value`: Output) {
this.roleName = value
}
/**
* @param value The device name.
*/
@JvmName("egysikgmridihqgq")
public suspend fun deviceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deviceName = mapped
}
/**
* @param value The metrics configuration details
*/
@JvmName("emtufcgubuxgfxct")
public suspend fun metricConfigurations(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metricConfigurations = mapped
}
/**
* @param argument The metrics configuration details
*/
@JvmName("ugybncfrfiucbfme")
public suspend fun metricConfigurations(argument: List Unit>) {
val toBeMapped = argument.toList().map {
MetricConfigurationArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.metricConfigurations = mapped
}
/**
* @param argument The metrics configuration details
*/
@JvmName("xostnraxbgsmmpuv")
public suspend fun metricConfigurations(vararg argument: suspend MetricConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
MetricConfigurationArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.metricConfigurations = mapped
}
/**
* @param argument The metrics configuration details
*/
@JvmName("akumunjvbiblfqrx")
public suspend fun metricConfigurations(argument: suspend MetricConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = listOf(MetricConfigurationArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.metricConfigurations = mapped
}
/**
* @param values The metrics configuration details
*/
@JvmName("tfueejnsbstblpfu")
public suspend fun metricConfigurations(vararg values: MetricConfigurationArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.metricConfigurations = mapped
}
/**
* @param value The resource group name.
*/
@JvmName("xwnqtgmoexauqtbt")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The role name.
*/
@JvmName("umulmnjmnampvkkh")
public suspend fun roleName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.roleName = mapped
}
internal fun build(): MonitoringConfigArgs = MonitoringConfigArgs(
deviceName = deviceName,
metricConfigurations = metricConfigurations,
resourceGroupName = resourceGroupName,
roleName = roleName,
)
}