
com.pulumi.googlenative.sqladmin.v1beta4.kotlin.BackupRun.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-google-native-kotlin Show documentation
Show all versions of pulumi-google-native-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.sqladmin.v1beta4.kotlin
import com.pulumi.core.Output
import com.pulumi.googlenative.sqladmin.v1beta4.kotlin.outputs.DiskEncryptionConfigurationResponse
import com.pulumi.googlenative.sqladmin.v1beta4.kotlin.outputs.DiskEncryptionStatusResponse
import com.pulumi.googlenative.sqladmin.v1beta4.kotlin.outputs.OperationErrorResponse
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 com.pulumi.googlenative.sqladmin.v1beta4.kotlin.outputs.DiskEncryptionConfigurationResponse.Companion.toKotlin as diskEncryptionConfigurationResponseToKotlin
import com.pulumi.googlenative.sqladmin.v1beta4.kotlin.outputs.DiskEncryptionStatusResponse.Companion.toKotlin as diskEncryptionStatusResponseToKotlin
import com.pulumi.googlenative.sqladmin.v1beta4.kotlin.outputs.OperationErrorResponse.Companion.toKotlin as operationErrorResponseToKotlin
/**
* Builder for [BackupRun].
*/
@PulumiTagMarker
public class BackupRunResourceBuilder internal constructor() {
public var name: String? = null
public var args: BackupRunArgs = BackupRunArgs()
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 BackupRunArgsBuilder.() -> Unit) {
val builder = BackupRunArgsBuilder()
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(): BackupRun {
val builtJavaResource =
com.pulumi.googlenative.sqladmin.v1beta4.BackupRun(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return BackupRun(builtJavaResource)
}
}
/**
* Creates a new backup run on demand.
* Auto-naming is currently not supported for this resource.
*/
public class BackupRun internal constructor(
override val javaResource: com.pulumi.googlenative.sqladmin.v1beta4.BackupRun,
) : KotlinCustomResource(javaResource, BackupRunMapper) {
/**
* Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
*/
public val backupKind: Output
get() = javaResource.backupKind().applyValue({ args0 -> args0 })
/**
* The description of this run, only applicable to on-demand backups.
*/
public val description: Output
get() = javaResource.description().applyValue({ args0 -> args0 })
/**
* Encryption configuration specific to a backup.
*/
public val diskEncryptionConfiguration: Output
get() = javaResource.diskEncryptionConfiguration().applyValue({ args0 ->
args0.let({ args0 ->
diskEncryptionConfigurationResponseToKotlin(args0)
})
})
/**
* Encryption status specific to a backup.
*/
public val diskEncryptionStatus: Output
get() = javaResource.diskEncryptionStatus().applyValue({ args0 ->
args0.let({ args0 ->
diskEncryptionStatusResponseToKotlin(args0)
})
})
/**
* The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
public val endTime: Output
get() = javaResource.endTime().applyValue({ args0 -> args0 })
/**
* The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
public val enqueuedTime: Output
get() = javaResource.enqueuedTime().applyValue({ args0 -> args0 })
/**
* Information about why the backup operation failed. This is only present if the run has the FAILED status.
*/
public val error: Output
get() = javaResource.error().applyValue({ args0 ->
args0.let({ args0 ->
operationErrorResponseToKotlin(args0)
})
})
public val instance: Output
get() = javaResource.instance().applyValue({ args0 -> args0 })
/**
* This is always `sql#backupRun`.
*/
public val kind: Output
get() = javaResource.kind().applyValue({ args0 -> args0 })
/**
* Location of the backups.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* The URI of this resource.
*/
public val selfLink: Output
get() = javaResource.selfLink().applyValue({ args0 -> args0 })
/**
* The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
public val startTime: Output
get() = javaResource.startTime().applyValue({ args0 -> args0 })
/**
* The status of this run.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 -> args0 })
/**
* Backup time zone to prevent restores to an instance with a different time zone. Now relevant only for SQL Server.
*/
public val timeZone: Output
get() = javaResource.timeZone().applyValue({ args0 -> args0 })
/**
* The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". This field defaults to "ON_DEMAND" and is ignored, when specified for insert requests.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
*/
public val windowStartTime: Output
get() = javaResource.windowStartTime().applyValue({ args0 -> args0 })
}
public object BackupRunMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.googlenative.sqladmin.v1beta4.BackupRun::class == javaResource::class
override fun map(javaResource: Resource): BackupRun = BackupRun(
javaResource as
com.pulumi.googlenative.sqladmin.v1beta4.BackupRun,
)
}
/**
* @see [BackupRun].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [BackupRun].
*/
public suspend fun backupRun(name: String, block: suspend BackupRunResourceBuilder.() -> Unit): BackupRun {
val builder = BackupRunResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [BackupRun].
* @param name The _unique_ name of the resulting resource.
*/
public fun backupRun(name: String): BackupRun {
val builder = BackupRunResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy