![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.timestream.kotlin.ScheduledQuery.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.timestream.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.timestream.kotlin.outputs.ScheduledQueryErrorReportConfiguration
import com.pulumi.awsnative.timestream.kotlin.outputs.ScheduledQueryNotificationConfiguration
import com.pulumi.awsnative.timestream.kotlin.outputs.ScheduledQueryScheduleConfiguration
import com.pulumi.awsnative.timestream.kotlin.outputs.ScheduledQueryTargetConfiguration
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.timestream.kotlin.outputs.ScheduledQueryErrorReportConfiguration.Companion.toKotlin as scheduledQueryErrorReportConfigurationToKotlin
import com.pulumi.awsnative.timestream.kotlin.outputs.ScheduledQueryNotificationConfiguration.Companion.toKotlin as scheduledQueryNotificationConfigurationToKotlin
import com.pulumi.awsnative.timestream.kotlin.outputs.ScheduledQueryScheduleConfiguration.Companion.toKotlin as scheduledQueryScheduleConfigurationToKotlin
import com.pulumi.awsnative.timestream.kotlin.outputs.ScheduledQueryTargetConfiguration.Companion.toKotlin as scheduledQueryTargetConfigurationToKotlin
/**
* Builder for [ScheduledQuery].
*/
@PulumiTagMarker
public class ScheduledQueryResourceBuilder internal constructor() {
public var name: String? = null
public var args: ScheduledQueryArgs = ScheduledQueryArgs()
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 ScheduledQueryArgsBuilder.() -> Unit) {
val builder = ScheduledQueryArgsBuilder()
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(): ScheduledQuery {
val builtJavaResource = com.pulumi.awsnative.timestream.ScheduledQuery(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ScheduledQuery(builtJavaResource)
}
}
/**
* The AWS::Timestream::ScheduledQuery resource creates a Timestream Scheduled Query.
*/
public class ScheduledQuery internal constructor(
override val javaResource: com.pulumi.awsnative.timestream.ScheduledQuery,
) : KotlinCustomResource(javaResource, ScheduledQueryMapper) {
/**
* The `ARN` of the scheduled query.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val clientToken: Output?
get() = javaResource.clientToken().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.
*/
public val errorReportConfiguration: Output
get() = javaResource.errorReportConfiguration().applyValue({ args0 ->
args0.let({ args0 ->
scheduledQueryErrorReportConfigurationToKotlin(args0)
})
})
/**
* 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.
* */
*/
public val kmsKeyId: Output?
get() = javaResource.kmsKeyId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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.
*/
public val notificationConfiguration: Output
get() = javaResource.notificationConfiguration().applyValue({ args0 ->
args0.let({ args0 ->
scheduledQueryNotificationConfigurationToKotlin(args0)
})
})
/**
* 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.
*/
public val queryString: Output
get() = javaResource.queryString().applyValue({ args0 -> args0 })
/**
* Schedule configuration.
*/
public val scheduleConfiguration: Output
get() = javaResource.scheduleConfiguration().applyValue({ args0 ->
args0.let({ args0 ->
scheduledQueryScheduleConfigurationToKotlin(args0)
})
})
/**
* The ARN for the IAM role that Timestream will assume when running the scheduled query.
*/
public val scheduledQueryExecutionRoleArn: Output
get() = javaResource.scheduledQueryExecutionRoleArn().applyValue({ args0 -> args0 })
/**
* A name for the query. Scheduled query names must be unique within each Region.
*/
public val scheduledQueryName: Output?
get() = javaResource.scheduledQueryName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.
*/
public val sqErrorReportConfiguration: Output
get() = javaResource.sqErrorReportConfiguration().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val sqKmsKeyId: Output
get() = javaResource.sqKmsKeyId().applyValue({ args0 -> args0 })
/**
* The name of the scheduled query. Scheduled query names must be unique within each Region.
*/
public val sqName: Output
get() = javaResource.sqName().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val sqNotificationConfiguration: Output
get() = javaResource.sqNotificationConfiguration().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val sqQueryString: Output
get() = javaResource.sqQueryString().applyValue({ args0 -> args0 })
/**
* Configuration for when the scheduled query is executed.
*/
public val sqScheduleConfiguration: Output
get() = javaResource.sqScheduleConfiguration().applyValue({ args0 -> args0 })
/**
* The ARN for the IAM role that Timestream will assume when running the scheduled query.
*/
public val sqScheduledQueryExecutionRoleArn: Output
get() = javaResource.sqScheduledQueryExecutionRoleArn().applyValue({ args0 -> args0 })
/**
* Configuration of target store where scheduled query results are written to.
*/
public val sqTargetConfiguration: Output
get() = javaResource.sqTargetConfiguration().applyValue({ args0 -> args0 })
/**
* A list of key-value pairs to label the scheduled query.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* Scheduled query target store configuration.
*/
public val targetConfiguration: Output?
get() = javaResource.targetConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> scheduledQueryTargetConfigurationToKotlin(args0) })
}).orElse(null)
})
}
public object ScheduledQueryMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.timestream.ScheduledQuery::class == javaResource::class
override fun map(javaResource: Resource): ScheduledQuery = ScheduledQuery(
javaResource as
com.pulumi.awsnative.timestream.ScheduledQuery,
)
}
/**
* @see [ScheduledQuery].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ScheduledQuery].
*/
public suspend fun scheduledQuery(
name: String,
block: suspend ScheduledQueryResourceBuilder.() -> Unit,
): ScheduledQuery {
val builder = ScheduledQueryResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ScheduledQuery].
* @param name The _unique_ name of the resulting resource.
*/
public fun scheduledQuery(name: String): ScheduledQuery {
val builder = ScheduledQueryResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy