com.pulumi.azurenative.portal.kotlin.TenantConfigurationArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.portal.kotlin
import com.pulumi.azurenative.portal.TenantConfigurationArgs.builder
import com.pulumi.azurenative.portal.kotlin.inputs.ConfigurationPropertiesArgs
import com.pulumi.azurenative.portal.kotlin.inputs.ConfigurationPropertiesArgsBuilder
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.jvm.JvmName
/**
* The tenant configuration 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: 2022-12-01-preview.
* ## Example Usage
* ### Create or update Tenant configuration
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var tenantConfiguration = new AzureNative.Portal.TenantConfiguration("tenantConfiguration", new()
* {
* ConfigurationName = "default",
* Properties = new AzureNative.Portal.Inputs.ConfigurationPropertiesArgs
* {
* EnforcePrivateMarkdownStorage = true,
* },
* });
* });
* ```
* ```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.NewTenantConfiguration(ctx, "tenantConfiguration", &portal.TenantConfigurationArgs{
* ConfigurationName: pulumi.String("default"),
* Properties: &portal.ConfigurationPropertiesArgs{
* EnforcePrivateMarkdownStorage: pulumi.Bool(true),
* },
* })
* 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.TenantConfiguration;
* import com.pulumi.azurenative.portal.TenantConfigurationArgs;
* import com.pulumi.azurenative.portal.inputs.ConfigurationPropertiesArgs;
* 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 tenantConfiguration = new TenantConfiguration("tenantConfiguration", TenantConfigurationArgs.builder()
* .configurationName("default")
* .properties(ConfigurationPropertiesArgs.builder()
* .enforcePrivateMarkdownStorage(true)
* .build())
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:portal:TenantConfiguration default /providers/Microsoft.Portal/tenantConfigurations/{configurationName}
* ```
* @property configurationName The name of the Configuration
* @property properties The resource-specific properties for this resource.
*/
public data class TenantConfigurationArgs(
public val configurationName: Output? = null,
public val properties: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.portal.TenantConfigurationArgs =
com.pulumi.azurenative.portal.TenantConfigurationArgs.builder()
.configurationName(configurationName?.applyValue({ args0 -> args0 }))
.properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [TenantConfigurationArgs].
*/
@PulumiTagMarker
public class TenantConfigurationArgsBuilder internal constructor() {
private var configurationName: Output? = null
private var properties: Output? = null
/**
* @param value The name of the Configuration
*/
@JvmName("qersbeytoxwreqnn")
public suspend fun configurationName(`value`: Output) {
this.configurationName = value
}
/**
* @param value The resource-specific properties for this resource.
*/
@JvmName("iuxmocymcyduqxvt")
public suspend fun properties(`value`: Output) {
this.properties = value
}
/**
* @param value The name of the Configuration
*/
@JvmName("odlakogyeusorcyu")
public suspend fun configurationName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.configurationName = mapped
}
/**
* @param value The resource-specific properties for this resource.
*/
@JvmName("wywutwhuwwfqobon")
public suspend fun properties(`value`: ConfigurationPropertiesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.properties = mapped
}
/**
* @param argument The resource-specific properties for this resource.
*/
@JvmName("vjdgodgispakowxj")
public suspend fun properties(argument: suspend ConfigurationPropertiesArgsBuilder.() -> Unit) {
val toBeMapped = ConfigurationPropertiesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.properties = mapped
}
internal fun build(): TenantConfigurationArgs = TenantConfigurationArgs(
configurationName = configurationName,
properties = properties,
)
}