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

com.pulumi.aws.backup.kotlin.RestoreTestingPlanArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.backup.kotlin

import com.pulumi.aws.backup.RestoreTestingPlanArgs.builder
import com.pulumi.aws.backup.kotlin.inputs.RestoreTestingPlanRecoveryPointSelectionArgs
import com.pulumi.aws.backup.kotlin.inputs.RestoreTestingPlanRecoveryPointSelectionArgsBuilder
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource for managing an AWS Backup Restore Testing Plan.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.backup.RestoreTestingPlan("example", {
 *     recoveryPointSelection: {
 *         algorithm: "LATEST_WITHIN_WINDOW",
 *         includeVaults: ["*"],
 *         recoveryPointTypes: ["CONTINUOUS"],
 *     },
 *     scheduleExpression: "cron(0 12 ? * * *)",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.backup.RestoreTestingPlan("example",
 *     recovery_point_selection={
 *         "algorithm": "LATEST_WITHIN_WINDOW",
 *         "include_vaults": ["*"],
 *         "recovery_point_types": ["CONTINUOUS"],
 *     },
 *     schedule_expression="cron(0 12 ? * * *)")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Backup.RestoreTestingPlan("example", new()
 *     {
 *         RecoveryPointSelection = new Aws.Backup.Inputs.RestoreTestingPlanRecoveryPointSelectionArgs
 *         {
 *             Algorithm = "LATEST_WITHIN_WINDOW",
 *             IncludeVaults = new[]
 *             {
 *                 "*",
 *             },
 *             RecoveryPointTypes = new[]
 *             {
 *                 "CONTINUOUS",
 *             },
 *         },
 *         ScheduleExpression = "cron(0 12 ? * * *)",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := backup.NewRestoreTestingPlan(ctx, "example", &backup.RestoreTestingPlanArgs{
 * 			RecoveryPointSelection: &backup.RestoreTestingPlanRecoveryPointSelectionArgs{
 * 				Algorithm: pulumi.String("LATEST_WITHIN_WINDOW"),
 * 				IncludeVaults: pulumi.StringArray{
 * 					pulumi.String("*"),
 * 				},
 * 				RecoveryPointTypes: pulumi.StringArray{
 * 					pulumi.String("CONTINUOUS"),
 * 				},
 * 			},
 * 			ScheduleExpression: pulumi.String("cron(0 12 ? * * *)"),
 * 		})
 * 		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.backup.RestoreTestingPlan;
 * import com.pulumi.aws.backup.RestoreTestingPlanArgs;
 * import com.pulumi.aws.backup.inputs.RestoreTestingPlanRecoveryPointSelectionArgs;
 * 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 example = new RestoreTestingPlan("example", RestoreTestingPlanArgs.builder()
 *             .recoveryPointSelection(RestoreTestingPlanRecoveryPointSelectionArgs.builder()
 *                 .algorithm("LATEST_WITHIN_WINDOW")
 *                 .includeVaults("*")
 *                 .recoveryPointTypes("CONTINUOUS")
 *                 .build())
 *             .scheduleExpression("cron(0 12 ? * * *)")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:backup:RestoreTestingPlan
 *     properties:
 *       recoveryPointSelection:
 *         algorithm: LATEST_WITHIN_WINDOW
 *         includeVaults:
 *           - '*'
 *         recoveryPointTypes:
 *           - CONTINUOUS
 *       scheduleExpression: cron(0 12 ? * * *)
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Backup Restore Testing Plan using the `name`. For example:
 * ```sh
 * $ pulumi import aws:backup/restoreTestingPlan:RestoreTestingPlan example my_testing_plan
 * ```
 * @property name The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
 * @property recoveryPointSelection Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
 * @property scheduleExpression The schedule expression for the restore testing plan.
 * @property scheduleExpressionTimezone The timezone for the schedule expression. If not provided, the state value will be used.
 * @property startWindowHours The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
 * @property tags
 */
public data class RestoreTestingPlanArgs(
    public val name: Output? = null,
    public val recoveryPointSelection: Output? = null,
    public val scheduleExpression: Output? = null,
    public val scheduleExpressionTimezone: Output? = null,
    public val startWindowHours: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.backup.RestoreTestingPlanArgs =
        com.pulumi.aws.backup.RestoreTestingPlanArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .recoveryPointSelection(
                recoveryPointSelection?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .scheduleExpression(scheduleExpression?.applyValue({ args0 -> args0 }))
            .scheduleExpressionTimezone(scheduleExpressionTimezone?.applyValue({ args0 -> args0 }))
            .startWindowHours(startWindowHours?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [RestoreTestingPlanArgs].
 */
@PulumiTagMarker
public class RestoreTestingPlanArgsBuilder internal constructor() {
    private var name: Output? = null

    private var recoveryPointSelection: Output? = null

    private var scheduleExpression: Output? = null

    private var scheduleExpressionTimezone: Output? = null

    private var startWindowHours: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
     */
    @JvmName("rmftwvimjrsmckfj")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
     */
    @JvmName("nndrtllpfbyfdjsq")
    public suspend fun recoveryPointSelection(`value`: Output) {
        this.recoveryPointSelection = value
    }

    /**
     * @param value The schedule expression for the restore testing plan.
     */
    @JvmName("cengtnmkevmlyafr")
    public suspend fun scheduleExpression(`value`: Output) {
        this.scheduleExpression = value
    }

    /**
     * @param value The timezone for the schedule expression. If not provided, the state value will be used.
     */
    @JvmName("bbmfojlhkdadipeh")
    public suspend fun scheduleExpressionTimezone(`value`: Output) {
        this.scheduleExpressionTimezone = value
    }

    /**
     * @param value The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
     */
    @JvmName("tdvthxpwngqbgubp")
    public suspend fun startWindowHours(`value`: Output) {
        this.startWindowHours = value
    }

    /**
     * @param value
     */
    @JvmName("wuvocstejiyvajir")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The name of the restore testing plan. Must be between 1 and 50 characters long and contain only alphanumeric characters and underscores.
     */
    @JvmName("bofxflwmdtstvrvw")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
     */
    @JvmName("asimcokfkhfepqua")
    public suspend fun recoveryPointSelection(`value`: RestoreTestingPlanRecoveryPointSelectionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.recoveryPointSelection = mapped
    }

    /**
     * @param argument Specifies the recovery point selection configuration. See RecoveryPointSelection section for more details.
     */
    @JvmName("mkokwcguapxjktfp")
    public suspend fun recoveryPointSelection(argument: suspend RestoreTestingPlanRecoveryPointSelectionArgsBuilder.() -> Unit) {
        val toBeMapped = RestoreTestingPlanRecoveryPointSelectionArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.recoveryPointSelection = mapped
    }

    /**
     * @param value The schedule expression for the restore testing plan.
     */
    @JvmName("ygrchwwoidcrmdus")
    public suspend fun scheduleExpression(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduleExpression = mapped
    }

    /**
     * @param value The timezone for the schedule expression. If not provided, the state value will be used.
     */
    @JvmName("ebflnfbjwqvlweik")
    public suspend fun scheduleExpressionTimezone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduleExpressionTimezone = mapped
    }

    /**
     * @param value The number of hours in the start window for the restore testing plan. Must be between 1 and 168.
     */
    @JvmName("bulbhngslxoewjvl")
    public suspend fun startWindowHours(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startWindowHours = mapped
    }

    /**
     * @param value
     */
    @JvmName("hlfoudiixxbxwtlf")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values
     */
    @JvmName("kfquqvjmjviewufj")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): RestoreTestingPlanArgs = RestoreTestingPlanArgs(
        name = name,
        recoveryPointSelection = recoveryPointSelection,
        scheduleExpression = scheduleExpression,
        scheduleExpressionTimezone = scheduleExpressionTimezone,
        startWindowHours = startWindowHours,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy