com.pulumi.gcp.spanner.kotlin.BackupScheduleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
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.gcp.spanner.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.spanner.BackupScheduleArgs.builder
import com.pulumi.gcp.spanner.kotlin.inputs.BackupScheduleFullBackupSpecArgs
import com.pulumi.gcp.spanner.kotlin.inputs.BackupScheduleFullBackupSpecArgsBuilder
import com.pulumi.gcp.spanner.kotlin.inputs.BackupScheduleIncrementalBackupSpecArgs
import com.pulumi.gcp.spanner.kotlin.inputs.BackupScheduleIncrementalBackupSpecArgsBuilder
import com.pulumi.gcp.spanner.kotlin.inputs.BackupScheduleSpecArgs
import com.pulumi.gcp.spanner.kotlin.inputs.BackupScheduleSpecArgsBuilder
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.jvm.JvmName
/**
* A backup schedule for a Cloud Spanner Database.
* This resource is owned by the database it is backing up, and is deleted along with the database.
* The actual backups are not though.
* To get more information about BackupSchedule, see:
* * [API documentation](https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances.databases.backupSchedules)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/spanner/docs/backup)
* > **Warning:** This resource creates a Spanner Backup Schedule on a project that already has
* a Spanner database.
* This resource is owned by the database it is backing up, and is deleted along
* with the database. The actual backups are not though.
* ## Example Usage
* ### Spanner Backup Schedule Daily Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const main = new gcp.spanner.Instance("main", {
* name: "instance-id",
* config: "regional-europe-west1",
* displayName: "main-instance",
* numNodes: 1,
* });
* const database = new gcp.spanner.Database("database", {
* instance: main.name,
* name: "database-id",
* versionRetentionPeriod: "3d",
* ddls: [
* "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)",
* "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)",
* ],
* deletionProtection: true,
* });
* const full_backup = new gcp.spanner.BackupSchedule("full-backup", {
* instance: main.name,
* database: database.name,
* name: "backup-schedule-id",
* retentionDuration: "31620000s",
* spec: {
* cronSpec: {
* text: "0 12 * * *",
* },
* },
* fullBackupSpec: {},
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* main = gcp.spanner.Instance("main",
* name="instance-id",
* config="regional-europe-west1",
* display_name="main-instance",
* num_nodes=1)
* database = gcp.spanner.Database("database",
* instance=main.name,
* name="database-id",
* version_retention_period="3d",
* ddls=[
* "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)",
* "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)",
* ],
* deletion_protection=True)
* full_backup = gcp.spanner.BackupSchedule("full-backup",
* instance=main.name,
* database=database.name,
* name="backup-schedule-id",
* retention_duration="31620000s",
* spec={
* "cron_spec": {
* "text": "0 12 * * *",
* },
* },
* full_backup_spec={})
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var main = new Gcp.Spanner.Instance("main", new()
* {
* Name = "instance-id",
* Config = "regional-europe-west1",
* DisplayName = "main-instance",
* NumNodes = 1,
* });
* var database = new Gcp.Spanner.Database("database", new()
* {
* Instance = main.Name,
* Name = "database-id",
* VersionRetentionPeriod = "3d",
* Ddls = new[]
* {
* "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)",
* "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)",
* },
* DeletionProtection = true,
* });
* var full_backup = new Gcp.Spanner.BackupSchedule("full-backup", new()
* {
* Instance = main.Name,
* Database = database.Name,
* Name = "backup-schedule-id",
* RetentionDuration = "31620000s",
* Spec = new Gcp.Spanner.Inputs.BackupScheduleSpecArgs
* {
* CronSpec = new Gcp.Spanner.Inputs.BackupScheduleSpecCronSpecArgs
* {
* Text = "0 12 * * *",
* },
* },
* FullBackupSpec = null,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/spanner"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* main, err := spanner.NewInstance(ctx, "main", &spanner.InstanceArgs{
* Name: pulumi.String("instance-id"),
* Config: pulumi.String("regional-europe-west1"),
* DisplayName: pulumi.String("main-instance"),
* NumNodes: pulumi.Int(1),
* })
* if err != nil {
* return err
* }
* database, err := spanner.NewDatabase(ctx, "database", &spanner.DatabaseArgs{
* Instance: main.Name,
* Name: pulumi.String("database-id"),
* VersionRetentionPeriod: pulumi.String("3d"),
* Ddls: pulumi.StringArray{
* pulumi.String("CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)"),
* pulumi.String("CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)"),
* },
* DeletionProtection: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = spanner.NewBackupSchedule(ctx, "full-backup", &spanner.BackupScheduleArgs{
* Instance: main.Name,
* Database: database.Name,
* Name: pulumi.String("backup-schedule-id"),
* RetentionDuration: pulumi.String("31620000s"),
* Spec: &spanner.BackupScheduleSpecArgs{
* CronSpec: &spanner.BackupScheduleSpecCronSpecArgs{
* Text: pulumi.String("0 12 * * *"),
* },
* },
* FullBackupSpec: &spanner.BackupScheduleFullBackupSpecArgs{},
* })
* 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.gcp.spanner.Instance;
* import com.pulumi.gcp.spanner.InstanceArgs;
* import com.pulumi.gcp.spanner.Database;
* import com.pulumi.gcp.spanner.DatabaseArgs;
* import com.pulumi.gcp.spanner.BackupSchedule;
* import com.pulumi.gcp.spanner.BackupScheduleArgs;
* import com.pulumi.gcp.spanner.inputs.BackupScheduleSpecArgs;
* import com.pulumi.gcp.spanner.inputs.BackupScheduleSpecCronSpecArgs;
* import com.pulumi.gcp.spanner.inputs.BackupScheduleFullBackupSpecArgs;
* 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 main = new Instance("main", InstanceArgs.builder()
* .name("instance-id")
* .config("regional-europe-west1")
* .displayName("main-instance")
* .numNodes(1)
* .build());
* var database = new Database("database", DatabaseArgs.builder()
* .instance(main.name())
* .name("database-id")
* .versionRetentionPeriod("3d")
* .ddls(
* "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)",
* "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)")
* .deletionProtection(true)
* .build());
* var full_backup = new BackupSchedule("full-backup", BackupScheduleArgs.builder()
* .instance(main.name())
* .database(database.name())
* .name("backup-schedule-id")
* .retentionDuration("31620000s")
* .spec(BackupScheduleSpecArgs.builder()
* .cronSpec(BackupScheduleSpecCronSpecArgs.builder()
* .text("0 12 * * *")
* .build())
* .build())
* .fullBackupSpec()
* .build());
* }
* }
* ```
* ```yaml
* resources:
* main:
* type: gcp:spanner:Instance
* properties:
* name: instance-id
* config: regional-europe-west1
* displayName: main-instance
* numNodes: 1
* database:
* type: gcp:spanner:Database
* properties:
* instance: ${main.name}
* name: database-id
* versionRetentionPeriod: 3d
* ddls:
* - CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)
* - CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)
* deletionProtection: true
* full-backup:
* type: gcp:spanner:BackupSchedule
* properties:
* instance: ${main.name}
* database: ${database.name}
* name: backup-schedule-id
* retentionDuration: 31620000s
* spec:
* cronSpec:
* text: 0 12 * * *
* fullBackupSpec: {}
* ```
*
* ### Spanner Backup Schedule Daily Incremental
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const main = new gcp.spanner.Instance("main", {
* name: "instance-id",
* config: "regional-europe-west1",
* displayName: "main-instance",
* numNodes: 1,
* edition: "ENTERPRISE",
* });
* const database = new gcp.spanner.Database("database", {
* instance: main.name,
* name: "database-id",
* versionRetentionPeriod: "3d",
* ddls: [
* "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)",
* "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)",
* ],
* deletionProtection: true,
* });
* const incremental_backup = new gcp.spanner.BackupSchedule("incremental-backup", {
* instance: main.name,
* database: database.name,
* name: "backup-schedule-id",
* retentionDuration: "31620000s",
* spec: {
* cronSpec: {
* text: "0 12 * * *",
* },
* },
* incrementalBackupSpec: {},
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* main = gcp.spanner.Instance("main",
* name="instance-id",
* config="regional-europe-west1",
* display_name="main-instance",
* num_nodes=1,
* edition="ENTERPRISE")
* database = gcp.spanner.Database("database",
* instance=main.name,
* name="database-id",
* version_retention_period="3d",
* ddls=[
* "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)",
* "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)",
* ],
* deletion_protection=True)
* incremental_backup = gcp.spanner.BackupSchedule("incremental-backup",
* instance=main.name,
* database=database.name,
* name="backup-schedule-id",
* retention_duration="31620000s",
* spec={
* "cron_spec": {
* "text": "0 12 * * *",
* },
* },
* incremental_backup_spec={})
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var main = new Gcp.Spanner.Instance("main", new()
* {
* Name = "instance-id",
* Config = "regional-europe-west1",
* DisplayName = "main-instance",
* NumNodes = 1,
* Edition = "ENTERPRISE",
* });
* var database = new Gcp.Spanner.Database("database", new()
* {
* Instance = main.Name,
* Name = "database-id",
* VersionRetentionPeriod = "3d",
* Ddls = new[]
* {
* "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)",
* "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)",
* },
* DeletionProtection = true,
* });
* var incremental_backup = new Gcp.Spanner.BackupSchedule("incremental-backup", new()
* {
* Instance = main.Name,
* Database = database.Name,
* Name = "backup-schedule-id",
* RetentionDuration = "31620000s",
* Spec = new Gcp.Spanner.Inputs.BackupScheduleSpecArgs
* {
* CronSpec = new Gcp.Spanner.Inputs.BackupScheduleSpecCronSpecArgs
* {
* Text = "0 12 * * *",
* },
* },
* IncrementalBackupSpec = null,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/spanner"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* main, err := spanner.NewInstance(ctx, "main", &spanner.InstanceArgs{
* Name: pulumi.String("instance-id"),
* Config: pulumi.String("regional-europe-west1"),
* DisplayName: pulumi.String("main-instance"),
* NumNodes: pulumi.Int(1),
* Edition: pulumi.String("ENTERPRISE"),
* })
* if err != nil {
* return err
* }
* database, err := spanner.NewDatabase(ctx, "database", &spanner.DatabaseArgs{
* Instance: main.Name,
* Name: pulumi.String("database-id"),
* VersionRetentionPeriod: pulumi.String("3d"),
* Ddls: pulumi.StringArray{
* pulumi.String("CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)"),
* pulumi.String("CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)"),
* },
* DeletionProtection: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = spanner.NewBackupSchedule(ctx, "incremental-backup", &spanner.BackupScheduleArgs{
* Instance: main.Name,
* Database: database.Name,
* Name: pulumi.String("backup-schedule-id"),
* RetentionDuration: pulumi.String("31620000s"),
* Spec: &spanner.BackupScheduleSpecArgs{
* CronSpec: &spanner.BackupScheduleSpecCronSpecArgs{
* Text: pulumi.String("0 12 * * *"),
* },
* },
* IncrementalBackupSpec: &spanner.BackupScheduleIncrementalBackupSpecArgs{},
* })
* 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.gcp.spanner.Instance;
* import com.pulumi.gcp.spanner.InstanceArgs;
* import com.pulumi.gcp.spanner.Database;
* import com.pulumi.gcp.spanner.DatabaseArgs;
* import com.pulumi.gcp.spanner.BackupSchedule;
* import com.pulumi.gcp.spanner.BackupScheduleArgs;
* import com.pulumi.gcp.spanner.inputs.BackupScheduleSpecArgs;
* import com.pulumi.gcp.spanner.inputs.BackupScheduleSpecCronSpecArgs;
* import com.pulumi.gcp.spanner.inputs.BackupScheduleIncrementalBackupSpecArgs;
* 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 main = new Instance("main", InstanceArgs.builder()
* .name("instance-id")
* .config("regional-europe-west1")
* .displayName("main-instance")
* .numNodes(1)
* .edition("ENTERPRISE")
* .build());
* var database = new Database("database", DatabaseArgs.builder()
* .instance(main.name())
* .name("database-id")
* .versionRetentionPeriod("3d")
* .ddls(
* "CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)",
* "CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)")
* .deletionProtection(true)
* .build());
* var incremental_backup = new BackupSchedule("incremental-backup", BackupScheduleArgs.builder()
* .instance(main.name())
* .database(database.name())
* .name("backup-schedule-id")
* .retentionDuration("31620000s")
* .spec(BackupScheduleSpecArgs.builder()
* .cronSpec(BackupScheduleSpecCronSpecArgs.builder()
* .text("0 12 * * *")
* .build())
* .build())
* .incrementalBackupSpec()
* .build());
* }
* }
* ```
* ```yaml
* resources:
* main:
* type: gcp:spanner:Instance
* properties:
* name: instance-id
* config: regional-europe-west1
* displayName: main-instance
* numNodes: 1
* edition: ENTERPRISE
* database:
* type: gcp:spanner:Database
* properties:
* instance: ${main.name}
* name: database-id
* versionRetentionPeriod: 3d
* ddls:
* - CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)
* - CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)
* deletionProtection: true
* incremental-backup:
* type: gcp:spanner:BackupSchedule
* properties:
* instance: ${main.name}
* database: ${database.name}
* name: backup-schedule-id
* retentionDuration: 31620000s
* spec:
* cronSpec:
* text: 0 12 * * *
* incrementalBackupSpec: {}
* ```
*
* ## Import
* BackupSchedule can be imported using any of these accepted formats:
* * `projects/{{project}}/instances/{{instance}}/databases/{{database}}/backupSchedules/{{name}}`
* * `{{project}}/{{instance}}/{{database}}/{{name}}`
* * `{{instance}}/{{database}}/{{name}}`
* When using the `pulumi import` command, BackupSchedule can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:spanner/backupSchedule:BackupSchedule default projects/{{project}}/instances/{{instance}}/databases/{{database}}/backupSchedules/{{name}}
* ```
* ```sh
* $ pulumi import gcp:spanner/backupSchedule:BackupSchedule default {{project}}/{{instance}}/{{database}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:spanner/backupSchedule:BackupSchedule default {{instance}}/{{database}}/{{name}}
* ```
* @property database The database to create the backup schedule on.
* - - -
* @property fullBackupSpec The schedule creates only full backups..
* @property incrementalBackupSpec The schedule creates incremental backup chains.
* @property instance The instance to create the database on.
* @property name A unique identifier for the backup schedule, which cannot be changed after
* the backup schedule is created. Values are of the form [a-z][-a-z0-9]*[a-z0-9].
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property retentionDuration At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days.
* A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'.
* You can set this to a value up to 366 days.
* @property spec Defines specifications of the backup schedule.
* Structure is documented below.
*/
public data class BackupScheduleArgs(
public val database: Output? = null,
public val fullBackupSpec: Output? = null,
public val incrementalBackupSpec: Output? = null,
public val instance: Output? = null,
public val name: Output? = null,
public val project: Output? = null,
public val retentionDuration: Output? = null,
public val spec: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.spanner.BackupScheduleArgs =
com.pulumi.gcp.spanner.BackupScheduleArgs.builder()
.database(database?.applyValue({ args0 -> args0 }))
.fullBackupSpec(fullBackupSpec?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.incrementalBackupSpec(
incrementalBackupSpec?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.instance(instance?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.retentionDuration(retentionDuration?.applyValue({ args0 -> args0 }))
.spec(spec?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [BackupScheduleArgs].
*/
@PulumiTagMarker
public class BackupScheduleArgsBuilder internal constructor() {
private var database: Output? = null
private var fullBackupSpec: Output? = null
private var incrementalBackupSpec: Output? = null
private var instance: Output? = null
private var name: Output? = null
private var project: Output? = null
private var retentionDuration: Output? = null
private var spec: Output? = null
/**
* @param value The database to create the backup schedule on.
* - - -
*/
@JvmName("pjgjewleyilleeal")
public suspend fun database(`value`: Output) {
this.database = value
}
/**
* @param value The schedule creates only full backups..
*/
@JvmName("ocnqtjdvrlqpmbsa")
public suspend fun fullBackupSpec(`value`: Output) {
this.fullBackupSpec = value
}
/**
* @param value The schedule creates incremental backup chains.
*/
@JvmName("mbpmvocyxoylxhts")
public suspend fun incrementalBackupSpec(`value`: Output) {
this.incrementalBackupSpec = value
}
/**
* @param value The instance to create the database on.
*/
@JvmName("pmoxwittbjhnjowg")
public suspend fun instance(`value`: Output) {
this.instance = value
}
/**
* @param value A unique identifier for the backup schedule, which cannot be changed after
* the backup schedule is created. Values are of the form [a-z][-a-z0-9]*[a-z0-9].
*/
@JvmName("jbpnokvvdoaiurtn")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("dqysgfbpfwjnrltx")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days.
* A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'.
* You can set this to a value up to 366 days.
*/
@JvmName("rtuiclcaejeopidb")
public suspend fun retentionDuration(`value`: Output) {
this.retentionDuration = value
}
/**
* @param value Defines specifications of the backup schedule.
* Structure is documented below.
*/
@JvmName("ybvjybhyauhhgsbr")
public suspend fun spec(`value`: Output) {
this.spec = value
}
/**
* @param value The database to create the backup schedule on.
* - - -
*/
@JvmName("aecbxkhnvptitqry")
public suspend fun database(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.database = mapped
}
/**
* @param value The schedule creates only full backups..
*/
@JvmName("ybdofeokjbedpcwa")
public suspend fun fullBackupSpec(`value`: BackupScheduleFullBackupSpecArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.fullBackupSpec = mapped
}
/**
* @param argument The schedule creates only full backups..
*/
@JvmName("uyvcjtpdavwrkmwr")
public suspend fun fullBackupSpec(argument: suspend BackupScheduleFullBackupSpecArgsBuilder.() -> Unit) {
val toBeMapped = BackupScheduleFullBackupSpecArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.fullBackupSpec = mapped
}
/**
* @param value The schedule creates incremental backup chains.
*/
@JvmName("krrcmswmhkrpgxot")
public suspend fun incrementalBackupSpec(`value`: BackupScheduleIncrementalBackupSpecArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.incrementalBackupSpec = mapped
}
/**
* @param argument The schedule creates incremental backup chains.
*/
@JvmName("gskotxbnhervsxeg")
public suspend fun incrementalBackupSpec(argument: suspend BackupScheduleIncrementalBackupSpecArgsBuilder.() -> Unit) {
val toBeMapped = BackupScheduleIncrementalBackupSpecArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.incrementalBackupSpec = mapped
}
/**
* @param value The instance to create the database on.
*/
@JvmName("vmrmrfngeivddxbx")
public suspend fun instance(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.instance = mapped
}
/**
* @param value A unique identifier for the backup schedule, which cannot be changed after
* the backup schedule is created. Values are of the form [a-z][-a-z0-9]*[a-z0-9].
*/
@JvmName("xcldskvnrnmxolid")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("dlqpvhwacdcbbnvp")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days.
* A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'.
* You can set this to a value up to 366 days.
*/
@JvmName("brlhjtgvjbvfovim")
public suspend fun retentionDuration(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.retentionDuration = mapped
}
/**
* @param value Defines specifications of the backup schedule.
* Structure is documented below.
*/
@JvmName("bcteprtlqqpdvdqi")
public suspend fun spec(`value`: BackupScheduleSpecArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.spec = mapped
}
/**
* @param argument Defines specifications of the backup schedule.
* Structure is documented below.
*/
@JvmName("mvneoddrvepgasfk")
public suspend fun spec(argument: suspend BackupScheduleSpecArgsBuilder.() -> Unit) {
val toBeMapped = BackupScheduleSpecArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.spec = mapped
}
internal fun build(): BackupScheduleArgs = BackupScheduleArgs(
database = database,
fullBackupSpec = fullBackupSpec,
incrementalBackupSpec = incrementalBackupSpec,
instance = instance,
name = name,
project = project,
retentionDuration = retentionDuration,
spec = spec,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy