com.pulumi.azure.securitycenter.kotlin.Setting.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.securitycenter.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
/**
* Builder for [Setting].
*/
@PulumiTagMarker
public class SettingResourceBuilder internal constructor() {
public var name: String? = null
public var args: SettingArgs = SettingArgs()
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 SettingArgsBuilder.() -> Unit) {
val builder = SettingArgsBuilder()
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(): Setting {
val builtJavaResource = com.pulumi.azure.securitycenter.Setting(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Setting(builtJavaResource)
}
}
/**
* Manages the Data Access Settings for Azure Security Center.
* > **NOTE:** This resource requires the `Owner` permission on the Subscription.
* > **NOTE:** Deletion of this resource disables the setting.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.securitycenter.Setting("example", {
* settingName: "MCAS",
* enabled: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.securitycenter.Setting("example",
* setting_name="MCAS",
* enabled=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.SecurityCenter.Setting("example", new()
* {
* SettingName = "MCAS",
* Enabled = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/securitycenter"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := securitycenter.NewSetting(ctx, "example", &securitycenter.SettingArgs{
* SettingName: pulumi.String("MCAS"),
* Enabled: 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.azure.securitycenter.Setting;
* import com.pulumi.azure.securitycenter.SettingArgs;
* 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 Setting("example", SettingArgs.builder()
* .settingName("MCAS")
* .enabled(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:securitycenter:Setting
* properties:
* settingName: MCAS
* enabled: true
* ```
*
* ## Import
* The setting can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:securitycenter/setting:Setting example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/settings/
* ```
*/
public class Setting internal constructor(
override val javaResource: com.pulumi.azure.securitycenter.Setting,
) : KotlinCustomResource(javaResource, SettingMapper) {
/**
* Boolean flag to enable/disable data access.
*/
public val enabled: Output
get() = javaResource.enabled().applyValue({ args0 -> args0 })
/**
* The setting to manage. Possible values are `MCAS` , `WDATP`, `WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW`, `WDATP_UNIFIED_SOLUTION` and `Sentinel`. Changing this forces a new resource to be created.
*/
public val settingName: Output
get() = javaResource.settingName().applyValue({ args0 -> args0 })
}
public object SettingMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.securitycenter.Setting::class == javaResource::class
override fun map(javaResource: Resource): Setting = Setting(
javaResource as
com.pulumi.azure.securitycenter.Setting,
)
}
/**
* @see [Setting].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Setting].
*/
public suspend fun setting(name: String, block: suspend SettingResourceBuilder.() -> Unit):
Setting {
val builder = SettingResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Setting].
* @param name The _unique_ name of the resulting resource.
*/
public fun setting(name: String): Setting {
val builder = SettingResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy