All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.redshift.kotlin.SnapshotScheduleArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.redshift.kotlin
import com.pulumi.aws.redshift.SnapshotScheduleArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const _default = new aws.redshift.SnapshotSchedule("default", {
* identifier: "tf-redshift-snapshot-schedule",
* definitions: ["rate(12 hours)"],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* default = aws.redshift.SnapshotSchedule("default",
* identifier="tf-redshift-snapshot-schedule",
* definitions=["rate(12 hours)"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Aws.RedShift.SnapshotSchedule("default", new()
* {
* Identifier = "tf-redshift-snapshot-schedule",
* Definitions = new[]
* {
* "rate(12 hours)",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := redshift.NewSnapshotSchedule(ctx, "default", &redshift.SnapshotScheduleArgs{
* Identifier: pulumi.String("tf-redshift-snapshot-schedule"),
* Definitions: pulumi.StringArray{
* pulumi.String("rate(12 hours)"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.redshift.SnapshotSchedule;
* import com.pulumi.aws.redshift.SnapshotScheduleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var default_ = new SnapshotSchedule("default", SnapshotScheduleArgs.builder()
* .identifier("tf-redshift-snapshot-schedule")
* .definitions("rate(12 hours)")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: aws:redshift:SnapshotSchedule
* properties:
* identifier: tf-redshift-snapshot-schedule
* definitions:
* - rate(12 hours)
* ```
*
* ## Import
* Using `pulumi import`, import Redshift Snapshot Schedule using the `identifier`. For example:
* ```sh
* $ pulumi import aws:redshift/snapshotSchedule:SnapshotSchedule default tf-redshift-snapshot-schedule
* ```
* @property definitions The definition of the snapshot schedule. The definition is made up of schedule expressions, for example `cron(30 12 *)` or `rate(12 hours)`.
* @property description The description of the snapshot schedule.
* @property forceDestroy Whether to destroy all associated clusters with this snapshot schedule on deletion. Must be enabled and applied before attempting deletion.
* @property identifier The snapshot schedule identifier. If omitted, this provider will assign a random, unique identifier.
* @property identifierPrefix Creates a unique
* identifier beginning with the specified prefix. Conflicts with `identifier`.
* @property tags A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public data class SnapshotScheduleArgs(
public val definitions: Output>? = null,
public val description: Output? = null,
public val forceDestroy: Output? = null,
public val identifier: Output? = null,
public val identifierPrefix: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.redshift.SnapshotScheduleArgs =
com.pulumi.aws.redshift.SnapshotScheduleArgs.builder()
.definitions(definitions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.description(description?.applyValue({ args0 -> args0 }))
.forceDestroy(forceDestroy?.applyValue({ args0 -> args0 }))
.identifier(identifier?.applyValue({ args0 -> args0 }))
.identifierPrefix(identifierPrefix?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [SnapshotScheduleArgs].
*/
@PulumiTagMarker
public class SnapshotScheduleArgsBuilder internal constructor() {
private var definitions: Output>? = null
private var description: Output? = null
private var forceDestroy: Output? = null
private var identifier: Output? = null
private var identifierPrefix: Output? = null
private var tags: Output>? = null
/**
* @param value The definition of the snapshot schedule. The definition is made up of schedule expressions, for example `cron(30 12 *)` or `rate(12 hours)`.
*/
@JvmName("lykyshcipjipfuyt")
public suspend fun definitions(`value`: Output>) {
this.definitions = value
}
@JvmName("uciigwstihpqjros")
public suspend fun definitions(vararg values: Output) {
this.definitions = Output.all(values.asList())
}
/**
* @param values The definition of the snapshot schedule. The definition is made up of schedule expressions, for example `cron(30 12 *)` or `rate(12 hours)`.
*/
@JvmName("yloeeolamapjuhrl")
public suspend fun definitions(values: List>) {
this.definitions = Output.all(values)
}
/**
* @param value The description of the snapshot schedule.
*/
@JvmName("bbkpvhyomymsxvnm")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Whether to destroy all associated clusters with this snapshot schedule on deletion. Must be enabled and applied before attempting deletion.
*/
@JvmName("wyhihasmojlcxnxt")
public suspend fun forceDestroy(`value`: Output) {
this.forceDestroy = value
}
/**
* @param value The snapshot schedule identifier. If omitted, this provider will assign a random, unique identifier.
*/
@JvmName("thpqmsqfkeqeaivw")
public suspend fun identifier(`value`: Output) {
this.identifier = value
}
/**
* @param value Creates a unique
* identifier beginning with the specified prefix. Conflicts with `identifier`.
*/
@JvmName("jkeusmnjgfrjvnvk")
public suspend fun identifierPrefix(`value`: Output) {
this.identifierPrefix = value
}
/**
* @param value A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("hnhegexnwhohjfbw")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The definition of the snapshot schedule. The definition is made up of schedule expressions, for example `cron(30 12 *)` or `rate(12 hours)`.
*/
@JvmName("qcycyttlrarlelwj")
public suspend fun definitions(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.definitions = mapped
}
/**
* @param values The definition of the snapshot schedule. The definition is made up of schedule expressions, for example `cron(30 12 *)` or `rate(12 hours)`.
*/
@JvmName("tgtlqyfmxyonuemx")
public suspend fun definitions(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.definitions = mapped
}
/**
* @param value The description of the snapshot schedule.
*/
@JvmName("lkgtyffkwdjyecpw")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Whether to destroy all associated clusters with this snapshot schedule on deletion. Must be enabled and applied before attempting deletion.
*/
@JvmName("lhusnxhpbutpntxr")
public suspend fun forceDestroy(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.forceDestroy = mapped
}
/**
* @param value The snapshot schedule identifier. If omitted, this provider will assign a random, unique identifier.
*/
@JvmName("yqgxqhtsrnqykycf")
public suspend fun identifier(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identifier = mapped
}
/**
* @param value Creates a unique
* identifier beginning with the specified prefix. Conflicts with `identifier`.
*/
@JvmName("nywadkqbgunenbme")
public suspend fun identifierPrefix(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identifierPrefix = mapped
}
/**
* @param value A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("axpqdoipnmggqcpm")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("etuogcgnrkmksaxu")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): SnapshotScheduleArgs = SnapshotScheduleArgs(
definitions = definitions,
description = description,
forceDestroy = forceDestroy,
identifier = identifier,
identifierPrefix = identifierPrefix,
tags = tags,
)
}