
com.pulumi.azurenative.network.kotlin.NetworkExperimentProfile.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin
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.Map
/**
* Builder for [NetworkExperimentProfile].
*/
@PulumiTagMarker
public class NetworkExperimentProfileResourceBuilder internal constructor() {
public var name: String? = null
public var args: NetworkExperimentProfileArgs = NetworkExperimentProfileArgs()
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 NetworkExperimentProfileArgsBuilder.() -> Unit) {
val builder = NetworkExperimentProfileArgsBuilder()
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(): NetworkExperimentProfile {
val builtJavaResource =
com.pulumi.azurenative.network.NetworkExperimentProfile(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return NetworkExperimentProfile(builtJavaResource)
}
}
/**
* Defines an Network Experiment Profile and lists of Experiments
* Azure REST API version: 2019-11-01. Prior API version in Azure Native 1.x: 2019-11-01.
* ## Example Usage
* ### Creates an NetworkExperiment Profile in a Resource Group
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var networkExperimentProfile = new AzureNative.Network.NetworkExperimentProfile("networkExperimentProfile", new()
* {
* EnabledState = AzureNative.Network.State.Enabled,
* Location = "WestUs",
* ProfileName = "MyProfile",
* ResourceGroupName = "MyResourceGroup",
* });
* });
* ```
* ```go
* package main
* import (
* network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := network.NewNetworkExperimentProfile(ctx, "networkExperimentProfile", &network.NetworkExperimentProfileArgs{
* EnabledState: pulumi.String(network.StateEnabled),
* Location: pulumi.String("WestUs"),
* ProfileName: pulumi.String("MyProfile"),
* ResourceGroupName: pulumi.String("MyResourceGroup"),
* })
* 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.network.NetworkExperimentProfile;
* import com.pulumi.azurenative.network.NetworkExperimentProfileArgs;
* 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 networkExperimentProfile = new NetworkExperimentProfile("networkExperimentProfile", NetworkExperimentProfileArgs.builder()
* .enabledState("Enabled")
* .location("WestUs")
* .profileName("MyProfile")
* .resourceGroupName("MyResourceGroup")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:network:NetworkExperimentProfile MyProfile /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/NetworkExperimentProfiles/{profileName}
* ```
*/
public class NetworkExperimentProfile internal constructor(
override val javaResource: com.pulumi.azurenative.network.NetworkExperimentProfile,
) : KotlinCustomResource(javaResource, NetworkExperimentProfileMapper) {
/**
* The state of the Experiment
*/
public val enabledState: Output?
get() = javaResource.enabledState().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Gets a unique read-only string that changes whenever the resource is updated.
*/
public val etag: Output?
get() = javaResource.etag().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Resource location.
*/
public val location: Output?
get() = javaResource.location().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Resource name.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Resource status.
*/
public val resourceState: Output
get() = javaResource.resourceState().applyValue({ args0 -> args0 })
/**
* Resource tags.
*/
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy