com.pulumi.awsnative.appstream.kotlin.ImageBuilder.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.appstream.kotlin
import com.pulumi.awsnative.appstream.kotlin.outputs.ImageBuilderAccessEndpoint
import com.pulumi.awsnative.appstream.kotlin.outputs.ImageBuilderDomainJoinInfo
import com.pulumi.awsnative.appstream.kotlin.outputs.ImageBuilderVpcConfig
import com.pulumi.awsnative.kotlin.outputs.Tag
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.appstream.kotlin.outputs.ImageBuilderAccessEndpoint.Companion.toKotlin as imageBuilderAccessEndpointToKotlin
import com.pulumi.awsnative.appstream.kotlin.outputs.ImageBuilderDomainJoinInfo.Companion.toKotlin as imageBuilderDomainJoinInfoToKotlin
import com.pulumi.awsnative.appstream.kotlin.outputs.ImageBuilderVpcConfig.Companion.toKotlin as imageBuilderVpcConfigToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [ImageBuilder].
*/
@PulumiTagMarker
public class ImageBuilderResourceBuilder internal constructor() {
public var name: String? = null
public var args: ImageBuilderArgs = ImageBuilderArgs()
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 ImageBuilderArgsBuilder.() -> Unit) {
val builder = ImageBuilderArgsBuilder()
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(): ImageBuilder {
val builtJavaResource = com.pulumi.awsnative.appstream.ImageBuilder(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ImageBuilder(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::AppStream::ImageBuilder
*/
public class ImageBuilder internal constructor(
override val javaResource: com.pulumi.awsnative.appstream.ImageBuilder,
) : KotlinCustomResource(javaResource, ImageBuilderMapper) {
/**
* The list of virtual private cloud (VPC) interface endpoint objects. Administrators can connect to the image builder only through the specified endpoints.
*/
public val accessEndpoints: Output>?
get() = javaResource.accessEndpoints().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
imageBuilderAccessEndpointToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The version of the AppStream 2.0 agent to use for this image builder. To use the latest version of the AppStream 2.0 agent, specify [LATEST].
*/
public val appstreamAgentVersion: Output?
get() = javaResource.appstreamAgentVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The description to display.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The image builder name to display.
*/
public val displayName: Output?
get() = javaResource.displayName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the directory and organizational unit (OU) to use to join the image builder to a Microsoft Active Directory domain.
*/
public val domainJoinInfo: Output?
get() = javaResource.domainJoinInfo().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> imageBuilderDomainJoinInfoToKotlin(args0) })
}).orElse(null)
})
/**
* Enables or disables default internet access for the image builder.
*/
public val enableDefaultInternetAccess: Output?
get() = javaResource.enableDefaultInternetAccess().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ARN of the IAM role that is applied to the image builder. To assume a role, the image builder calls the AWS Security Token Service `AssumeRole` API operation and passes the ARN of the role to use. The operation creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials and creates the *appstream_machine_role* credential profile on the instance.
* For more information, see [Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances](https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html) in the *Amazon AppStream 2.0 Administration Guide* .
*/
public val iamRoleArn: Output?
get() = javaResource.iamRoleArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ARN of the public, private, or shared image to use.
*/
public val imageArn: Output?
get() = javaResource.imageArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The name of the image used to create the image builder.
*/
public val imageName: Output?
get() = javaResource.imageName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The instance type to use when launching the image builder. The following instance types are available:
* - stream.standard.small
* - stream.standard.medium
* - stream.standard.large
* - stream.compute.large
* - stream.compute.xlarge
* - stream.compute.2xlarge
* - stream.compute.4xlarge
* - stream.compute.8xlarge
* - stream.memory.large
* - stream.memory.xlarge
* - stream.memory.2xlarge
* - stream.memory.4xlarge
* - stream.memory.8xlarge
* - stream.memory.z1d.large
* - stream.memory.z1d.xlarge
* - stream.memory.z1d.2xlarge
* - stream.memory.z1d.3xlarge
* - stream.memory.z1d.6xlarge
* - stream.memory.z1d.12xlarge
* - stream.graphics-design.large
* - stream.graphics-design.xlarge
* - stream.graphics-design.2xlarge
* - stream.graphics-design.4xlarge
* - stream.graphics-desktop.2xlarge
* - stream.graphics.g4dn.xlarge
* - stream.graphics.g4dn.2xlarge
* - stream.graphics.g4dn.4xlarge
* - stream.graphics.g4dn.8xlarge
* - stream.graphics.g4dn.12xlarge
* - stream.graphics.g4dn.16xlarge
* - stream.graphics-pro.4xlarge
* - stream.graphics-pro.8xlarge
* - stream.graphics-pro.16xlarge
*/
public val instanceType: Output
get() = javaResource.instanceType().applyValue({ args0 -> args0 })
/**
* A unique name for the image builder.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The URL to start an image builder streaming session, returned as a string.
*/
public val streamingUrl: Output
get() = javaResource.streamingUrl().applyValue({ args0 -> args0 })
/**
* An array of key-value pairs.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The VPC configuration for the image builder. You can specify only one subnet.
*/
public val vpcConfig: Output?
get() = javaResource.vpcConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
imageBuilderVpcConfigToKotlin(args0)
})
}).orElse(null)
})
}
public object ImageBuilderMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.appstream.ImageBuilder::class == javaResource::class
override fun map(javaResource: Resource): ImageBuilder = ImageBuilder(
javaResource as
com.pulumi.awsnative.appstream.ImageBuilder,
)
}
/**
* @see [ImageBuilder].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ImageBuilder].
*/
public suspend fun imageBuilder(
name: String,
block: suspend ImageBuilderResourceBuilder.() -> Unit,
): ImageBuilder {
val builder = ImageBuilderResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ImageBuilder].
* @param name The _unique_ name of the resulting resource.
*/
public fun imageBuilder(name: String): ImageBuilder {
val builder = ImageBuilderResourceBuilder()
builder.name(name)
return builder.build()
}