com.pulumi.awsnative.m2.kotlin.Application.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.m2.kotlin
import com.pulumi.awsnative.m2.kotlin.enums.ApplicationEngineType
import com.pulumi.awsnative.m2.kotlin.enums.ApplicationEngineType.Companion.toKotlin
import com.pulumi.awsnative.m2.kotlin.outputs.ApplicationDefinition0Properties
import com.pulumi.awsnative.m2.kotlin.outputs.ApplicationDefinition1Properties
import com.pulumi.core.Either
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.Map
/**
* Builder for [Application].
*/
@PulumiTagMarker
public class ApplicationResourceBuilder internal constructor() {
public var name: String? = null
public var args: ApplicationArgs = ApplicationArgs()
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 ApplicationArgsBuilder.() -> Unit) {
val builder = ApplicationArgsBuilder()
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(): Application {
val builtJavaResource = com.pulumi.awsnative.m2.Application(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Application(builtJavaResource)
}
}
/**
* Represents an application that runs on an AWS Mainframe Modernization Environment
*/
public class Application internal constructor(
override val javaResource: com.pulumi.awsnative.m2.Application,
) : KotlinCustomResource(javaResource, ApplicationMapper) {
/**
* The Amazon Resource Name (ARN) of the application.
*/
public val applicationArn: Output
get() = javaResource.applicationArn().applyValue({ args0 -> args0 })
/**
* The identifier of the application.
*/
public val applicationId: Output
get() = javaResource.applicationId().applyValue({ args0 -> args0 })
/**
* The application definition for a particular application. You can specify either inline JSON or an Amazon S3 bucket location.
* For information about application definitions, see the [AWS Mainframe Modernization User Guide](https://docs.aws.amazon.com/m2/latest/userguide/applications-m2-definition.html) .
*/
public val definition:
Output>
get() = javaResource.definition().applyValue({ args0 ->
args0.transform(
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.m2.kotlin.outputs.ApplicationDefinition0Properties.Companion.toKotlin(args0)
})
},
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.m2.kotlin.outputs.ApplicationDefinition1Properties.Companion.toKotlin(args0)
})
},
)
})
/**
* The description of the application.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The type of the target platform for this application.
*/
public val engineType: Output
get() = javaResource.engineType().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* The ID or the Amazon Resource Name (ARN) of the customer managed KMS Key used for encrypting application-related resources.
*/
public val kmsKeyId: Output?
get() = javaResource.kmsKeyId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The name of the application.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the role associated with the application.
*/
public val roleArn: Output?
get() = javaResource.roleArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* An array of key-value pairs to apply to this resource.
* For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
*/
public val tags: Output