![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.stepfunctions.kotlin.Activity.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.stepfunctions.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.stepfunctions.kotlin.outputs.ActivityEncryptionConfiguration
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.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.stepfunctions.kotlin.outputs.ActivityEncryptionConfiguration.Companion.toKotlin as activityEncryptionConfigurationToKotlin
/**
* Builder for [Activity].
*/
@PulumiTagMarker
public class ActivityResourceBuilder internal constructor() {
public var name: String? = null
public var args: ActivityArgs = ActivityArgs()
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 ActivityArgsBuilder.() -> Unit) {
val builder = ActivityArgsBuilder()
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(): Activity {
val builtJavaResource = com.pulumi.awsnative.stepfunctions.Activity(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Activity(builtJavaResource)
}
}
/**
* Resource schema for Activity
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class Activity internal constructor(
override val javaResource: com.pulumi.awsnative.stepfunctions.Activity,
) : KotlinCustomResource(javaResource, ActivityMapper) {
/**
* Returns the ARN of the resource.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Encryption configuration for the activity.
* Activity configuration is immutable, and resource names must be unique. To set customer managed keys for encryption, you must create a *new Activity* . If you attempt to change the configuration in your CFN template for an existing activity, you will receive an `ActivityAlreadyExists` exception.
* To update your activity to include customer managed keys, set a new activity name within your AWS CloudFormation template.
*/
public val encryptionConfiguration: Output?
get() = javaResource.encryptionConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> activityEncryptionConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the activity.
* A name must *not* contain:
* - white space
* - brackets `< > { } [ ]`
* - wildcard characters `? *`
* - special characters `" # % \ ^ | ~ ` $ & , ; : /`
* - control characters ( `U+0000-001F` , `U+007F-009F` )
* To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The list of tags to add to a resource.
* Tags may only contain Unicode letters, digits, white space, or these symbols: `_ . : / = + - @` .
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object ActivityMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.stepfunctions.Activity::class == javaResource::class
override fun map(javaResource: Resource): Activity = Activity(
javaResource as
com.pulumi.awsnative.stepfunctions.Activity,
)
}
/**
* @see [Activity].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Activity].
*/
public suspend fun activity(name: String, block: suspend ActivityResourceBuilder.() -> Unit): Activity {
val builder = ActivityResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Activity].
* @param name The _unique_ name of the resulting resource.
*/
public fun activity(name: String): Activity {
val builder = ActivityResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy