com.pulumi.azure.securitycenter.kotlin.ServerVulnerabilityAssessmentsSetting.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 [ServerVulnerabilityAssessmentsSetting].
*/
@PulumiTagMarker
public class ServerVulnerabilityAssessmentsSettingResourceBuilder internal constructor() {
public var name: String? = null
public var args: ServerVulnerabilityAssessmentsSettingArgs =
ServerVulnerabilityAssessmentsSettingArgs()
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 ServerVulnerabilityAssessmentsSettingArgsBuilder.() -> Unit) {
val builder = ServerVulnerabilityAssessmentsSettingArgsBuilder()
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(): ServerVulnerabilityAssessmentsSetting {
val builtJavaResource =
com.pulumi.azure.securitycenter.ServerVulnerabilityAssessmentsSetting(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ServerVulnerabilityAssessmentsSetting(builtJavaResource)
}
}
/**
* Manages the Server Vulnerability Assesments Setting 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.ServerVulnerabilityAssessmentsSetting("example", {vulnerabilityAssessmentProvider: "MdeTvm"});
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.securitycenter.ServerVulnerabilityAssessmentsSetting("example", vulnerability_assessment_provider="MdeTvm")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.SecurityCenter.ServerVulnerabilityAssessmentsSetting("example", new()
* {
* VulnerabilityAssessmentProvider = "MdeTvm",
* });
* });
* ```
* ```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.NewServerVulnerabilityAssessmentsSetting(ctx, "example", &securitycenter.ServerVulnerabilityAssessmentsSettingArgs{
* VulnerabilityAssessmentProvider: pulumi.String("MdeTvm"),
* })
* 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.ServerVulnerabilityAssessmentsSetting;
* import com.pulumi.azure.securitycenter.ServerVulnerabilityAssessmentsSettingArgs;
* 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 ServerVulnerabilityAssessmentsSetting("example", ServerVulnerabilityAssessmentsSettingArgs.builder()
* .vulnerabilityAssessmentProvider("MdeTvm")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:securitycenter:ServerVulnerabilityAssessmentsSetting
* properties:
* vulnerabilityAssessmentProvider: MdeTvm
* ```
*
* ## Import
* The setting can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:securitycenter/serverVulnerabilityAssessmentsSetting:ServerVulnerabilityAssessmentsSetting example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/AzureServersSetting
* ```
*/
public class ServerVulnerabilityAssessmentsSetting internal constructor(
override val javaResource: com.pulumi.azure.securitycenter.ServerVulnerabilityAssessmentsSetting,
) : KotlinCustomResource(javaResource, ServerVulnerabilityAssessmentsSettingMapper) {
/**
* The vulnerability assesment provider to use. The only possible values is `MdeTvm`.
*/
public val vulnerabilityAssessmentProvider: Output
get() = javaResource.vulnerabilityAssessmentProvider().applyValue({ args0 -> args0 })
}
public object ServerVulnerabilityAssessmentsSettingMapper :
ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.securitycenter.ServerVulnerabilityAssessmentsSetting::class == javaResource::class
override fun map(javaResource: Resource): ServerVulnerabilityAssessmentsSetting =
ServerVulnerabilityAssessmentsSetting(
javaResource as
com.pulumi.azure.securitycenter.ServerVulnerabilityAssessmentsSetting,
)
}
/**
* @see [ServerVulnerabilityAssessmentsSetting].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ServerVulnerabilityAssessmentsSetting].
*/
public suspend fun serverVulnerabilityAssessmentsSetting(
name: String,
block: suspend ServerVulnerabilityAssessmentsSettingResourceBuilder.() -> Unit,
):
ServerVulnerabilityAssessmentsSetting {
val builder = ServerVulnerabilityAssessmentsSettingResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ServerVulnerabilityAssessmentsSetting].
* @param name The _unique_ name of the resulting resource.
*/
public fun serverVulnerabilityAssessmentsSetting(name: String):
ServerVulnerabilityAssessmentsSetting {
val builder = ServerVulnerabilityAssessmentsSettingResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy