All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.databrew.kotlin.Job.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.databrew.kotlin

import com.pulumi.awsnative.databrew.kotlin.enums.JobEncryptionMode
import com.pulumi.awsnative.databrew.kotlin.enums.JobLogSubscription
import com.pulumi.awsnative.databrew.kotlin.enums.JobType
import com.pulumi.awsnative.databrew.kotlin.outputs.JobDataCatalogOutput
import com.pulumi.awsnative.databrew.kotlin.outputs.JobDatabaseOutput
import com.pulumi.awsnative.databrew.kotlin.outputs.JobOutput
import com.pulumi.awsnative.databrew.kotlin.outputs.JobOutputLocation
import com.pulumi.awsnative.databrew.kotlin.outputs.JobProfileConfiguration
import com.pulumi.awsnative.databrew.kotlin.outputs.JobRecipe
import com.pulumi.awsnative.databrew.kotlin.outputs.JobSample
import com.pulumi.awsnative.databrew.kotlin.outputs.JobValidationConfiguration
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.databrew.kotlin.enums.JobEncryptionMode.Companion.toKotlin as jobEncryptionModeToKotlin
import com.pulumi.awsnative.databrew.kotlin.enums.JobLogSubscription.Companion.toKotlin as jobLogSubscriptionToKotlin
import com.pulumi.awsnative.databrew.kotlin.enums.JobType.Companion.toKotlin as jobTypeToKotlin
import com.pulumi.awsnative.databrew.kotlin.outputs.JobDataCatalogOutput.Companion.toKotlin as jobDataCatalogOutputToKotlin
import com.pulumi.awsnative.databrew.kotlin.outputs.JobDatabaseOutput.Companion.toKotlin as jobDatabaseOutputToKotlin
import com.pulumi.awsnative.databrew.kotlin.outputs.JobOutput.Companion.toKotlin as jobOutputToKotlin
import com.pulumi.awsnative.databrew.kotlin.outputs.JobOutputLocation.Companion.toKotlin as jobOutputLocationToKotlin
import com.pulumi.awsnative.databrew.kotlin.outputs.JobProfileConfiguration.Companion.toKotlin as jobProfileConfigurationToKotlin
import com.pulumi.awsnative.databrew.kotlin.outputs.JobRecipe.Companion.toKotlin as jobRecipeToKotlin
import com.pulumi.awsnative.databrew.kotlin.outputs.JobSample.Companion.toKotlin as jobSampleToKotlin
import com.pulumi.awsnative.databrew.kotlin.outputs.JobValidationConfiguration.Companion.toKotlin as jobValidationConfigurationToKotlin
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag.Companion.toKotlin as createOnlyTagToKotlin

/**
 * Builder for [Job].
 */
@PulumiTagMarker
public class JobResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: JobArgs = JobArgs()

    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 JobArgsBuilder.() -> Unit) {
        val builder = JobArgsBuilder()
        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(): Job {
        val builtJavaResource = com.pulumi.awsnative.databrew.Job(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Job(builtJavaResource)
    }
}

/**
 * Resource schema for AWS::DataBrew::Job.
 * ## Example Usage
 * ### Example
 * No Java example available.
 */
public class Job internal constructor(
    override val javaResource: com.pulumi.awsnative.databrew.Job,
) : KotlinCustomResource(javaResource, JobMapper) {
    /**
     * One or more artifacts that represent the AWS Glue Data Catalog output from running the job.
     */
    public val dataCatalogOutputs: Output>?
        get() = javaResource.dataCatalogOutputs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        jobDataCatalogOutputToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.
     */
    public val databaseOutputs: Output>?
        get() = javaResource.databaseOutputs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        jobDatabaseOutputToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Dataset name
     */
    public val datasetName: Output?
        get() = javaResource.datasetName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Encryption Key Arn
     */
    public val encryptionKeyArn: Output?
        get() = javaResource.encryptionKeyArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Encryption mode
     */
    public val encryptionMode: Output?
        get() = javaResource.encryptionMode().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> jobEncryptionModeToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Job Sample
     */
    public val jobSample: Output?
        get() = javaResource.jobSample().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    jobSampleToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Log subscription
     */
    public val logSubscription: Output?
        get() = javaResource.logSubscription().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> jobLogSubscriptionToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Max capacity
     */
    public val maxCapacity: Output?
        get() = javaResource.maxCapacity().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Max retries
     */
    public val maxRetries: Output?
        get() = javaResource.maxRetries().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Job name
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Output location
     */
    public val outputLocation: Output?
        get() = javaResource.outputLocation().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> jobOutputLocationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * One or more artifacts that represent output from running the job.
     */
    public val outputs: Output>?
        get() = javaResource.outputs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> jobOutputToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Profile Job configuration
     */
    public val profileConfiguration: Output?
        get() = javaResource.profileConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> jobProfileConfigurationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Project name
     */
    public val projectName: Output?
        get() = javaResource.projectName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A series of data transformation steps that the job runs.
     */
    public val recipe: Output?
        get() = javaResource.recipe().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    jobRecipeToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Role arn
     */
    public val roleArn: Output
        get() = javaResource.roleArn().applyValue({ args0 -> args0 })

    /**
     * Metadata tags that have been applied to the job.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> createOnlyTagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Timeout
     */
    public val timeout: Output?
        get() = javaResource.timeout().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Job type
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 -> args0.let({ args0 -> jobTypeToKotlin(args0) }) })

    /**
     * Data quality rules configuration
     */
    public val validationConfigurations: Output>?
        get() = javaResource.validationConfigurations().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        jobValidationConfigurationToKotlin(args0)
                    })
                })
            }).orElse(null)
        })
}

public object JobMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.databrew.Job::class == javaResource::class

    override fun map(javaResource: Resource): Job = Job(
        javaResource as
            com.pulumi.awsnative.databrew.Job,
    )
}

/**
 * @see [Job].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Job].
 */
public suspend fun job(name: String, block: suspend JobResourceBuilder.() -> Unit): Job {
    val builder = JobResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Job].
 * @param name The _unique_ name of the resulting resource.
 */
public fun job(name: String): Job {
    val builder = JobResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy