com.pulumi.awsnative.imagebuilder.kotlin.Image.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.imagebuilder.kotlin
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ImageScanningConfiguration
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ImageTestsConfiguration
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ImageWorkflowConfiguration
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 kotlin.collections.Map
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ImageScanningConfiguration.Companion.toKotlin as imageScanningConfigurationToKotlin
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ImageTestsConfiguration.Companion.toKotlin as imageTestsConfigurationToKotlin
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ImageWorkflowConfiguration.Companion.toKotlin as imageWorkflowConfigurationToKotlin
/**
* Builder for [Image].
*/
@PulumiTagMarker
public class ImageResourceBuilder internal constructor() {
public var name: String? = null
public var args: ImageArgs = ImageArgs()
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 ImageArgsBuilder.() -> Unit) {
val builder = ImageArgsBuilder()
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(): Image {
val builtJavaResource = com.pulumi.awsnative.imagebuilder.Image(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Image(builtJavaResource)
}
}
/**
* Resource schema for AWS::ImageBuilder::Image
*/
public class Image internal constructor(
override val javaResource: com.pulumi.awsnative.imagebuilder.Image,
) : KotlinCustomResource(javaResource, ImageMapper) {
/**
* The Amazon Resource Name (ARN) of the image.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.
*/
public val containerRecipeArn: Output?
get() = javaResource.containerRecipeArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the distribution configuration.
*/
public val distributionConfigurationArn: Output?
get() = javaResource.distributionConfigurationArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Collects additional information about the image being created, including the operating system (OS) version and package list.
*/
public val enhancedImageMetadataEnabled: Output?
get() = javaResource.enhancedImageMetadataEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The execution role name/ARN for the image build, if provided
*/
public val executionRole: Output?
get() = javaResource.executionRole().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The AMI ID of the EC2 AMI in current region.
*/
public val imageId: Output
get() = javaResource.imageId().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.
*/
public val imageRecipeArn: Output?
get() = javaResource.imageRecipeArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Contains settings for vulnerability scans.
*/
public val imageScanningConfiguration: Output?
get() = javaResource.imageScanningConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> imageScanningConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* The image tests configuration used when creating this image.
*/
public val imageTestsConfiguration: Output?
get() = javaResource.imageTestsConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> imageTestsConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* URI for containers created in current Region with default ECR image tag
*/
public val imageUri: Output
get() = javaResource.imageUri().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the infrastructure configuration.
*/
public val infrastructureConfigurationArn: Output?
get() = javaResource.infrastructureConfigurationArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the image.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The tags associated with the image.
*/
public val tags: Output