com.pulumi.awsnative.configuration.kotlin.ConformancePack.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.configuration.kotlin
import com.pulumi.awsnative.configuration.kotlin.outputs.ConformancePackInputParameter
import com.pulumi.awsnative.configuration.kotlin.outputs.TemplateSsmDocumentDetailsProperties
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
import com.pulumi.awsnative.configuration.kotlin.outputs.ConformancePackInputParameter.Companion.toKotlin as conformancePackInputParameterToKotlin
import com.pulumi.awsnative.configuration.kotlin.outputs.TemplateSsmDocumentDetailsProperties.Companion.toKotlin as templateSsmDocumentDetailsPropertiesToKotlin
/**
* Builder for [ConformancePack].
*/
@PulumiTagMarker
public class ConformancePackResourceBuilder internal constructor() {
public var name: String? = null
public var args: ConformancePackArgs = ConformancePackArgs()
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 ConformancePackArgsBuilder.() -> Unit) {
val builder = ConformancePackArgsBuilder()
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(): ConformancePack {
val builtJavaResource =
com.pulumi.awsnative.configuration.ConformancePack(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ConformancePack(builtJavaResource)
}
}
/**
* A conformance pack is a collection of AWS Config rules and remediation actions that can be easily deployed as a single entity in an account and a region or across an entire AWS Organization.
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class ConformancePack internal constructor(
override val javaResource: com.pulumi.awsnative.configuration.ConformancePack,
) : KotlinCustomResource(javaResource, ConformancePackMapper) {
/**
* A list of ConformancePackInputParameter objects.
*/
public val conformancePackInputParameters: Output>?
get() = javaResource.conformancePackInputParameters().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
conformancePackInputParameterToKotlin(args0)
})
})
}).orElse(null)
})
/**
* Name of the conformance pack which will be assigned as the unique identifier.
*/
public val conformancePackName: Output
get() = javaResource.conformancePackName().applyValue({ args0 -> args0 })
/**
* AWS Config stores intermediate files while processing conformance pack template.
*/
public val deliveryS3Bucket: Output?
get() = javaResource.deliveryS3Bucket().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The prefix for delivery S3 bucket.
*/
public val deliveryS3KeyPrefix: Output?
get() = javaResource.deliveryS3KeyPrefix().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A string containing full conformance pack template body. You can only specify one of the template body or template S3Uri fields.
*/
public val templateBody: Output?
get() = javaResource.templateBody().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Location of file containing the template body which points to the conformance pack template that is located in an Amazon S3 bucket. You can only specify one of the template body or template S3Uri fields.
*/
public val templateS3Uri: Output?
get() = javaResource.templateS3Uri().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The TemplateSSMDocumentDetails object contains the name of the SSM document and the version of the SSM document.
*/
public val templateSsmDocumentDetails: Output?
get() = javaResource.templateSsmDocumentDetails().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> templateSsmDocumentDetailsPropertiesToKotlin(args0) })
}).orElse(null)
})
}
public object ConformancePackMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.configuration.ConformancePack::class == javaResource::class
override fun map(javaResource: Resource): ConformancePack = ConformancePack(
javaResource as
com.pulumi.awsnative.configuration.ConformancePack,
)
}
/**
* @see [ConformancePack].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ConformancePack].
*/
public suspend fun conformancePack(
name: String,
block: suspend ConformancePackResourceBuilder.() -> Unit,
): ConformancePack {
val builder = ConformancePackResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ConformancePack].
* @param name The _unique_ name of the resulting resource.
*/
public fun conformancePack(name: String): ConformancePack {
val builder = ConformancePackResourceBuilder()
builder.name(name)
return builder.build()
}