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.
@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
import kotlin.collections.List
/**
* Builder for [AssessmentPolicy].
*/
@PulumiTagMarker
public class AssessmentPolicyResourceBuilder internal constructor() {
public var name: String? = null
public var args: AssessmentPolicyArgs = AssessmentPolicyArgs()
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 AssessmentPolicyArgsBuilder.() -> Unit) {
val builder = AssessmentPolicyArgsBuilder()
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(): AssessmentPolicy {
val builtJavaResource =
com.pulumi.azure.securitycenter.AssessmentPolicy(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AssessmentPolicy(builtJavaResource)
}
}
/**
* Manages the Security Center Assessment Metadata for Azure Security Center.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.securitycenter.AssessmentPolicy("example", {
* displayName: "Test Display Name",
* severity: "Medium",
* description: "Test Description",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.securitycenter.AssessmentPolicy("example",
* display_name="Test Display Name",
* severity="Medium",
* description="Test Description")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.SecurityCenter.AssessmentPolicy("example", new()
* {
* DisplayName = "Test Display Name",
* Severity = "Medium",
* Description = "Test Description",
* });
* });
* ```
* ```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.NewAssessmentPolicy(ctx, "example", &securitycenter.AssessmentPolicyArgs{
* DisplayName: pulumi.String("Test Display Name"),
* Severity: pulumi.String("Medium"),
* Description: pulumi.String("Test Description"),
* })
* 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.AssessmentPolicy;
* import com.pulumi.azure.securitycenter.AssessmentPolicyArgs;
* 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 AssessmentPolicy("example", AssessmentPolicyArgs.builder()
* .displayName("Test Display Name")
* .severity("Medium")
* .description("Test Description")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:securitycenter:AssessmentPolicy
* properties:
* displayName: Test Display Name
* severity: Medium
* description: Test Description
* ```
*
* ## Import
* Security Assessments Policy can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:securitycenter/assessmentPolicy:AssessmentPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/assessmentMetadata/metadata1
* ```
*/
public class AssessmentPolicy internal constructor(
override val javaResource: com.pulumi.azure.securitycenter.AssessmentPolicy,
) : KotlinCustomResource(javaResource, AssessmentPolicyMapper) {
/**
* A list of the categories of resource that is at risk when the Security Center Assessment is unhealthy. Possible values are `Unknown`, `Compute`, `Data`, `IdentityAndAccess`, `IoT` and `Networking`.
*/
public val categories: Output>
get() = javaResource.categories().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The description of the Security Center Assessment.
*/
public val description: Output
get() = javaResource.description().applyValue({ args0 -> args0 })
/**
* The user-friendly display name of the Security Center Assessment.
*/
public val displayName: Output
get() = javaResource.displayName().applyValue({ args0 -> args0 })
/**
* The implementation effort which is used to remediate the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
*/
public val implementationEffort: Output?
get() = javaResource.implementationEffort().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The GUID as the name of the Security Center Assessment Policy.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The description which is used to mitigate the security issue.
*/
public val remediationDescription: Output?
get() = javaResource.remediationDescription().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The severity level of the Security Center Assessment. Possible values are `Low`, `Medium` and `High`. Defaults to `Medium`.
*/
public val severity: Output?
get() = javaResource.severity().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* A list of the threat impacts for the Security Center Assessment. Possible values are `AccountBreach`, `DataExfiltration`, `DataSpillage`, `DenialOfService`, `ElevationOfPrivilege`, `MaliciousInsider`, `MissingCoverage` and `ThreatResistance`.
*/
public val threats: Output>?
get() = javaResource.threats().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* The user impact of the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
*/
public val userImpact: Output?
get() = javaResource.userImpact().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object AssessmentPolicyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.securitycenter.AssessmentPolicy::class == javaResource::class
override fun map(javaResource: Resource): AssessmentPolicy = AssessmentPolicy(
javaResource as
com.pulumi.azure.securitycenter.AssessmentPolicy,
)
}
/**
* @see [AssessmentPolicy].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AssessmentPolicy].
*/
public suspend fun assessmentPolicy(
name: String,
block: suspend AssessmentPolicyResourceBuilder.() -> Unit,
): AssessmentPolicy {
val builder = AssessmentPolicyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AssessmentPolicy].
* @param name The _unique_ name of the resulting resource.
*/
public fun assessmentPolicy(name: String): AssessmentPolicy {
val builder = AssessmentPolicyResourceBuilder()
builder.name(name)
return builder.build()
}