com.pulumi.awsnative.inspector.kotlin.AssessmentTarget.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.awsnative.inspector.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 [AssessmentTarget].
*/
@PulumiTagMarker
public class AssessmentTargetResourceBuilder internal constructor() {
public var name: String? = null
public var args: AssessmentTargetArgs = AssessmentTargetArgs()
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 AssessmentTargetArgsBuilder.() -> Unit) {
val builder = AssessmentTargetArgsBuilder()
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(): AssessmentTarget {
val builtJavaResource = com.pulumi.awsnative.inspector.AssessmentTarget(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AssessmentTarget(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::Inspector::AssessmentTarget
*/
public class AssessmentTarget internal constructor(
override val javaResource: com.pulumi.awsnative.inspector.AssessmentTarget,
) : KotlinCustomResource(javaResource, AssessmentTargetMapper) {
/**
* The Amazon Resource Name (ARN) that specifies the assessment target that is created.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The name of the Amazon Inspector assessment target. The name must be unique within the AWS account .
*/
public val assessmentTargetName: Output?
get() = javaResource.assessmentTargetName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ARN that specifies the resource group that is used to create the assessment target. If `resourceGroupArn` is not specified, all EC2 instances in the current AWS account and Region are included in the assessment target.
*/
public val resourceGroupArn: Output?
get() = javaResource.resourceGroupArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object AssessmentTargetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.inspector.AssessmentTarget::class == javaResource::class
override fun map(javaResource: Resource): AssessmentTarget = AssessmentTarget(
javaResource as
com.pulumi.awsnative.inspector.AssessmentTarget,
)
}
/**
* @see [AssessmentTarget].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AssessmentTarget].
*/
public suspend fun assessmentTarget(
name: String,
block: suspend AssessmentTargetResourceBuilder.() -> Unit,
): AssessmentTarget {
val builder = AssessmentTargetResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AssessmentTarget].
* @param name The _unique_ name of the resulting resource.
*/
public fun assessmentTarget(name: String): AssessmentTarget {
val builder = AssessmentTargetResourceBuilder()
builder.name(name)
return builder.build()
}