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

com.pulumi.awsnative.timestream.kotlin.ScheduledQueryArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.timestream.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.timestream.ScheduledQueryArgs.builder
import com.pulumi.awsnative.timestream.kotlin.inputs.ScheduledQueryErrorReportConfigurationArgs
import com.pulumi.awsnative.timestream.kotlin.inputs.ScheduledQueryErrorReportConfigurationArgsBuilder
import com.pulumi.awsnative.timestream.kotlin.inputs.ScheduledQueryNotificationConfigurationArgs
import com.pulumi.awsnative.timestream.kotlin.inputs.ScheduledQueryNotificationConfigurationArgsBuilder
import com.pulumi.awsnative.timestream.kotlin.inputs.ScheduledQueryScheduleConfigurationArgs
import com.pulumi.awsnative.timestream.kotlin.inputs.ScheduledQueryScheduleConfigurationArgsBuilder
import com.pulumi.awsnative.timestream.kotlin.inputs.ScheduledQueryTargetConfigurationArgs
import com.pulumi.awsnative.timestream.kotlin.inputs.ScheduledQueryTargetConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::Timestream::ScheduledQuery resource creates a Timestream Scheduled Query.
 * @property clientToken Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making multiple identical CreateScheduledQuery requests has the same effect as making a single request.
 * - If CreateScheduledQuery is called without a `ClientToken` , the Query SDK generates a `ClientToken` on your behalf.
 * - After 8 hours, any request with the same `ClientToken` is treated as a new request.
 * @property errorReportConfiguration Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.
 * @property kmsKeyId The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS key is not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with *alias/*
 * If ErrorReportConfiguration uses `SSE_KMS` as encryption type, the same KmsKeyId is used to encrypt the error report at rest.
 * @property notificationConfiguration Notification configuration for the scheduled query. A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
 * @property queryString The query string to run. Parameter names can be specified in the query string `@` character followed by an identifier. The named Parameter `@scheduled_runtime` is reserved and can be used in the query to get the time at which the query is scheduled to run.
 * The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of `@scheduled_runtime` paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the `@scheduled_runtime` parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
 * @property scheduleConfiguration Schedule configuration.
 * @property scheduledQueryExecutionRoleArn The ARN for the IAM role that Timestream will assume when running the scheduled query.
 * @property scheduledQueryName A name for the query. Scheduled query names must be unique within each Region.
 * @property tags A list of key-value pairs to label the scheduled query.
 * @property targetConfiguration Scheduled query target store configuration.
 * */
 */
public data class ScheduledQueryArgs(
    public val clientToken: Output? = null,
    public val errorReportConfiguration: Output? = null,
    public val kmsKeyId: Output? = null,
    public val notificationConfiguration: Output? = null,
    public val queryString: Output? = null,
    public val scheduleConfiguration: Output? = null,
    public val scheduledQueryExecutionRoleArn: Output? = null,
    public val scheduledQueryName: Output? = null,
    public val tags: Output>? = null,
    public val targetConfiguration: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.timestream.ScheduledQueryArgs =
        com.pulumi.awsnative.timestream.ScheduledQueryArgs.builder()
            .clientToken(clientToken?.applyValue({ args0 -> args0 }))
            .errorReportConfiguration(
                errorReportConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .kmsKeyId(kmsKeyId?.applyValue({ args0 -> args0 }))
            .notificationConfiguration(
                notificationConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .queryString(queryString?.applyValue({ args0 -> args0 }))
            .scheduleConfiguration(
                scheduleConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .scheduledQueryExecutionRoleArn(scheduledQueryExecutionRoleArn?.applyValue({ args0 -> args0 }))
            .scheduledQueryName(scheduledQueryName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .targetConfiguration(
                targetConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [ScheduledQueryArgs].
 */
@PulumiTagMarker
public class ScheduledQueryArgsBuilder internal constructor() {
    private var clientToken: Output? = null

    private var errorReportConfiguration: Output? = null

    private var kmsKeyId: Output? = null

    private var notificationConfiguration: Output? = null

    private var queryString: Output? = null

    private var scheduleConfiguration: Output? = null

    private var scheduledQueryExecutionRoleArn: Output? = null

    private var scheduledQueryName: Output? = null

    private var tags: Output>? = null

    private var targetConfiguration: Output? = null

    /**
     * @param value Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making multiple identical CreateScheduledQuery requests has the same effect as making a single request.
     * - If CreateScheduledQuery is called without a `ClientToken` , the Query SDK generates a `ClientToken` on your behalf.
     * - After 8 hours, any request with the same `ClientToken` is treated as a new request.
     */
    @JvmName("beruyhfwedmpgapl")
    public suspend fun clientToken(`value`: Output) {
        this.clientToken = value
    }

    /**
     * @param value Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.
     */
    @JvmName("lskiereyylpyctvp")
    public suspend fun errorReportConfiguration(`value`: Output) {
        this.errorReportConfiguration = value
    }

    /**
     * @param value The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS key is not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with *alias/*
     * If ErrorReportConfiguration uses `SSE_KMS` as encryption type, the same KmsKeyId is used to encrypt the error report at rest.
     * */
     */
    @JvmName("emwlvfisnwkeuyfp")
    public suspend fun kmsKeyId(`value`: Output) {
        this.kmsKeyId = value
    }

    /**
     * @param value Notification configuration for the scheduled query. A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
     */
    @JvmName("lhmkhmicvctheyco")
    public suspend fun notificationConfiguration(`value`: Output) {
        this.notificationConfiguration = value
    }

    /**
     * @param value The query string to run. Parameter names can be specified in the query string `@` character followed by an identifier. The named Parameter `@scheduled_runtime` is reserved and can be used in the query to get the time at which the query is scheduled to run.
     * The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of `@scheduled_runtime` paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the `@scheduled_runtime` parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
     */
    @JvmName("xubwqcwqshaobwje")
    public suspend fun queryString(`value`: Output) {
        this.queryString = value
    }

    /**
     * @param value Schedule configuration.
     */
    @JvmName("bsahfbyxqboprdeq")
    public suspend fun scheduleConfiguration(`value`: Output) {
        this.scheduleConfiguration = value
    }

    /**
     * @param value The ARN for the IAM role that Timestream will assume when running the scheduled query.
     */
    @JvmName("uswyotldgqoetyyv")
    public suspend fun scheduledQueryExecutionRoleArn(`value`: Output) {
        this.scheduledQueryExecutionRoleArn = value
    }

    /**
     * @param value A name for the query. Scheduled query names must be unique within each Region.
     */
    @JvmName("jqbjjyaroydxggom")
    public suspend fun scheduledQueryName(`value`: Output) {
        this.scheduledQueryName = value
    }

    /**
     * @param value A list of key-value pairs to label the scheduled query.
     */
    @JvmName("mcbnkcbbdxhhunnh")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("odfecxpllgomiihy")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values A list of key-value pairs to label the scheduled query.
     */
    @JvmName("yrftnqxdewnyqfqx")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Scheduled query target store configuration.
     */
    @JvmName("adoankcmytixggwc")
    public suspend fun targetConfiguration(`value`: Output) {
        this.targetConfiguration = value
    }

    /**
     * @param value Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making multiple identical CreateScheduledQuery requests has the same effect as making a single request.
     * - If CreateScheduledQuery is called without a `ClientToken` , the Query SDK generates a `ClientToken` on your behalf.
     * - After 8 hours, any request with the same `ClientToken` is treated as a new request.
     */
    @JvmName("dnucdcshlpoipibv")
    public suspend fun clientToken(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientToken = mapped
    }

    /**
     * @param value Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.
     */
    @JvmName("lldslnfmxawnxusp")
    public suspend fun errorReportConfiguration(`value`: ScheduledQueryErrorReportConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.errorReportConfiguration = mapped
    }

    /**
     * @param argument Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.
     */
    @JvmName("ruhaejfqqftthqfh")
    public suspend fun errorReportConfiguration(argument: suspend ScheduledQueryErrorReportConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ScheduledQueryErrorReportConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.errorReportConfiguration = mapped
    }

    /**
     * @param value The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS key is not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with *alias/*
     * If ErrorReportConfiguration uses `SSE_KMS` as encryption type, the same KmsKeyId is used to encrypt the error report at rest.
     * */
     */
    @JvmName("enetdkgxhgvfdbbj")
    public suspend fun kmsKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyId = mapped
    }

    /**
     * @param value Notification configuration for the scheduled query. A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
     */
    @JvmName("xkbqrrgfxgcpeixh")
    public suspend fun notificationConfiguration(`value`: ScheduledQueryNotificationConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationConfiguration = mapped
    }

    /**
     * @param argument Notification configuration for the scheduled query. A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.
     */
    @JvmName("suqhssjfugdnrncj")
    public suspend fun notificationConfiguration(argument: suspend ScheduledQueryNotificationConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ScheduledQueryNotificationConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.notificationConfiguration = mapped
    }

    /**
     * @param value The query string to run. Parameter names can be specified in the query string `@` character followed by an identifier. The named Parameter `@scheduled_runtime` is reserved and can be used in the query to get the time at which the query is scheduled to run.
     * The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of `@scheduled_runtime` paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the `@scheduled_runtime` parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
     */
    @JvmName("svdfyqmyxtmwijlf")
    public suspend fun queryString(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queryString = mapped
    }

    /**
     * @param value Schedule configuration.
     */
    @JvmName("wdtvmrxvonraubge")
    public suspend fun scheduleConfiguration(`value`: ScheduledQueryScheduleConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduleConfiguration = mapped
    }

    /**
     * @param argument Schedule configuration.
     */
    @JvmName("jgkpsoqaebsxdtta")
    public suspend fun scheduleConfiguration(argument: suspend ScheduledQueryScheduleConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ScheduledQueryScheduleConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.scheduleConfiguration = mapped
    }

    /**
     * @param value The ARN for the IAM role that Timestream will assume when running the scheduled query.
     */
    @JvmName("rqilglvhnpcxabhl")
    public suspend fun scheduledQueryExecutionRoleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduledQueryExecutionRoleArn = mapped
    }

    /**
     * @param value A name for the query. Scheduled query names must be unique within each Region.
     */
    @JvmName("ojjgylcufknnnxsu")
    public suspend fun scheduledQueryName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduledQueryName = mapped
    }

    /**
     * @param value A list of key-value pairs to label the scheduled query.
     */
    @JvmName("kghdxcsaqoxfweit")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument A list of key-value pairs to label the scheduled query.
     */
    @JvmName("gctsgecwlbkqvrug")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of key-value pairs to label the scheduled query.
     */
    @JvmName("lxeslmqbrsasehcv")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of key-value pairs to label the scheduled query.
     */
    @JvmName("sgqxestsqpeuhymw")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values A list of key-value pairs to label the scheduled query.
     */
    @JvmName("nvlmfumvmplnkfip")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Scheduled query target store configuration.
     */
    @JvmName("cesosavdakthmbus")
    public suspend fun targetConfiguration(`value`: ScheduledQueryTargetConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetConfiguration = mapped
    }

    /**
     * @param argument Scheduled query target store configuration.
     */
    @JvmName("muwgahrmnqlweqcr")
    public suspend fun targetConfiguration(argument: suspend ScheduledQueryTargetConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ScheduledQueryTargetConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.targetConfiguration = mapped
    }

    internal fun build(): ScheduledQueryArgs = ScheduledQueryArgs(
        clientToken = clientToken,
        errorReportConfiguration = errorReportConfiguration,
        kmsKeyId = kmsKeyId,
        notificationConfiguration = notificationConfiguration,
        queryString = queryString,
        scheduleConfiguration = scheduleConfiguration,
        scheduledQueryExecutionRoleArn = scheduledQueryExecutionRoleArn,
        scheduledQueryName = scheduledQueryName,
        tags = tags,
        targetConfiguration = targetConfiguration,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy