com.pulumi.awsnative.appflow.kotlin.Flow.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.appflow.kotlin
import com.pulumi.awsnative.appflow.kotlin.enums.FlowStatus
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowDestinationFlowConfig
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowMetadataCatalogConfig
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowSourceFlowConfig
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowTask
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowTriggerConfig
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.appflow.kotlin.enums.FlowStatus.Companion.toKotlin as flowStatusToKotlin
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowDestinationFlowConfig.Companion.toKotlin as flowDestinationFlowConfigToKotlin
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowMetadataCatalogConfig.Companion.toKotlin as flowMetadataCatalogConfigToKotlin
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowSourceFlowConfig.Companion.toKotlin as flowSourceFlowConfigToKotlin
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowTask.Companion.toKotlin as flowTaskToKotlin
import com.pulumi.awsnative.appflow.kotlin.outputs.FlowTriggerConfig.Companion.toKotlin as flowTriggerConfigToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Flow].
*/
@PulumiTagMarker
public class FlowResourceBuilder internal constructor() {
public var name: String? = null
public var args: FlowArgs = FlowArgs()
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 FlowArgsBuilder.() -> Unit) {
val builder = FlowArgsBuilder()
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(): Flow {
val builtJavaResource = com.pulumi.awsnative.appflow.Flow(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Flow(builtJavaResource)
}
}
/**
* Resource schema for AWS::AppFlow::Flow.
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class Flow internal constructor(
override val javaResource: com.pulumi.awsnative.appflow.Flow,
) : KotlinCustomResource(javaResource, FlowMapper) {
/**
* Description of the flow.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* List of Destination connectors of the flow.
*/
public val destinationFlowConfigList: Output>
get() = javaResource.destinationFlowConfigList().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> flowDestinationFlowConfigToKotlin(args0) })
})
})
/**
* ARN identifier of the flow.
*/
public val flowArn: Output
get() = javaResource.flowArn().applyValue({ args0 -> args0 })
/**
* Name of the flow.
*/
public val flowName: Output
get() = javaResource.flowName().applyValue({ args0 -> args0 })
/**
* Flow activation status for Scheduled- and Event-triggered flows
*/
public val flowStatus: Output?
get() = javaResource.flowStatus().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
flowStatusToKotlin(args0)
})
}).orElse(null)
})
/**
* The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key.
*/
public val kmsArn: Output?
get() = javaResource.kmsArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Configurations of metadata catalog of the flow.
*/
public val metadataCatalogConfig: Output?
get() = javaResource.metadataCatalogConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> flowMetadataCatalogConfigToKotlin(args0) })
}).orElse(null)
})
/**
* Configurations of Source connector of the flow.
*/
public val sourceFlowConfig: Output
get() = javaResource.sourceFlowConfig().applyValue({ args0 ->
args0.let({ args0 ->
flowSourceFlowConfigToKotlin(args0)
})
})
/**
* List of Tags.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* List of tasks for the flow.
*/
public val tasks: Output>
get() = javaResource.tasks().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
flowTaskToKotlin(args0)
})
})
})
/**
* Trigger settings of the flow.
*/
public val triggerConfig: Output
get() = javaResource.triggerConfig().applyValue({ args0 ->
args0.let({ args0 ->
flowTriggerConfigToKotlin(args0)
})
})
}
public object FlowMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.appflow.Flow::class == javaResource::class
override fun map(javaResource: Resource): Flow = Flow(
javaResource as
com.pulumi.awsnative.appflow.Flow,
)
}
/**
* @see [Flow].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Flow].
*/
public suspend fun flow(name: String, block: suspend FlowResourceBuilder.() -> Unit): Flow {
val builder = FlowResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Flow].
* @param name The _unique_ name of the resulting resource.
*/
public fun flow(name: String): Flow {
val builder = FlowResourceBuilder()
builder.name(name)
return builder.build()
}