![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.storsimple.kotlin.BackupPolicy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.storsimple.kotlin
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.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [BackupPolicy].
*/
@PulumiTagMarker
public class BackupPolicyResourceBuilder internal constructor() {
public var name: String? = null
public var args: BackupPolicyArgs = BackupPolicyArgs()
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 BackupPolicyArgsBuilder.() -> Unit) {
val builder = BackupPolicyArgsBuilder()
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(): BackupPolicy {
val builtJavaResource = com.pulumi.azurenative.storsimple.BackupPolicy(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return BackupPolicy(builtJavaResource)
}
}
/**
* The backup policy.
* Azure REST API version: 2017-06-01. Prior API version in Azure Native 1.x: 2017-06-01.
* ## Example Usage
* ### BackupPoliciesCreateOrUpdate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var backupPolicy = new AzureNative.StorSimple.BackupPolicy("backupPolicy", new()
* {
* BackupPolicyName = "BkUpPolicy01ForSDKTest",
* DeviceName = "Device05ForSDKTest",
* Kind = AzureNative.StorSimple.Kind.Series8000,
* ManagerName = "ManagerForSDKTest1",
* ResourceGroupName = "ResourceGroupForSDKTest",
* VolumeIds = new[]
* {
* "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.StorSimple/managers/ManagerForSDKTest1/devices/Device05ForSDKTest/volumeContainers/volumeContainerForSDKTest/volumes/Clonedvolume1",
* "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.StorSimple/managers/ManagerForSDKTest1/devices/Device05ForSDKTest/volumeContainers/volumeContainerForSDKTest/volumes/volume1",
* },
* });
* });
* ```
* ```go
* package main
* import (
* storsimple "github.com/pulumi/pulumi-azure-native-sdk/storsimple/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := storsimple.NewBackupPolicy(ctx, "backupPolicy", &storsimple.BackupPolicyArgs{
* BackupPolicyName: pulumi.String("BkUpPolicy01ForSDKTest"),
* DeviceName: pulumi.String("Device05ForSDKTest"),
* Kind: storsimple.KindSeries8000,
* ManagerName: pulumi.String("ManagerForSDKTest1"),
* ResourceGroupName: pulumi.String("ResourceGroupForSDKTest"),
* VolumeIds: pulumi.StringArray{
* pulumi.String("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.StorSimple/managers/ManagerForSDKTest1/devices/Device05ForSDKTest/volumeContainers/volumeContainerForSDKTest/volumes/Clonedvolume1"),
* pulumi.String("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.StorSimple/managers/ManagerForSDKTest1/devices/Device05ForSDKTest/volumeContainers/volumeContainerForSDKTest/volumes/volume1"),
* },
* })
* 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.azurenative.storsimple.BackupPolicy;
* import com.pulumi.azurenative.storsimple.BackupPolicyArgs;
* 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 backupPolicy = new BackupPolicy("backupPolicy", BackupPolicyArgs.builder()
* .backupPolicyName("BkUpPolicy01ForSDKTest")
* .deviceName("Device05ForSDKTest")
* .kind("Series8000")
* .managerName("ManagerForSDKTest1")
* .resourceGroupName("ResourceGroupForSDKTest")
* .volumeIds(
* "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.StorSimple/managers/ManagerForSDKTest1/devices/Device05ForSDKTest/volumeContainers/volumeContainerForSDKTest/volumes/Clonedvolume1",
* "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.StorSimple/managers/ManagerForSDKTest1/devices/Device05ForSDKTest/volumeContainers/volumeContainerForSDKTest/volumes/volume1")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:storsimple:BackupPolicy BkUpPolicy01ForSDKTest /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorSimple/managers/{managerName}/devices/{deviceName}/backupPolicies/{backupPolicyName}
* ```
*/
public class BackupPolicy internal constructor(
override val javaResource: com.pulumi.azurenative.storsimple.BackupPolicy,
) : KotlinCustomResource(javaResource, BackupPolicyMapper) {
/**
* The backup policy creation type. Indicates whether this was created through SaaS or through StorSimple Snapshot Manager.
*/
public val backupPolicyCreationType: Output
get() = javaResource.backupPolicyCreationType().applyValue({ args0 -> args0 })
/**
* The Kind of the object. Currently only Series8000 is supported
*/
public val kind: Output?
get() = javaResource.kind().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The time of the last backup for the backup policy.
*/
public val lastBackupTime: Output
get() = javaResource.lastBackupTime().applyValue({ args0 -> args0 })
/**
* The name of the object.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The time of the next backup for the backup policy.
*/
public val nextBackupTime: Output
get() = javaResource.nextBackupTime().applyValue({ args0 -> args0 })
/**
* Indicates whether at least one of the schedules in the backup policy is active or not.
*/
public val scheduledBackupStatus: Output
get() = javaResource.scheduledBackupStatus().applyValue({ args0 -> args0 })
/**
* The count of schedules the backup policy contains.
*/
public val schedulesCount: Output
get() = javaResource.schedulesCount().applyValue({ args0 -> args0 })
/**
* If the backup policy was created by StorSimple Snapshot Manager, then this field indicates the hostname of the StorSimple Snapshot Manager.
*/
public val ssmHostName: Output
get() = javaResource.ssmHostName().applyValue({ args0 -> args0 })
/**
* The hierarchical type of the object.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* The path IDs of the volumes which are part of the backup policy.
*/
public val volumeIds: Output>
get() = javaResource.volumeIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
}
public object BackupPolicyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azurenative.storsimple.BackupPolicy::class == javaResource::class
override fun map(javaResource: Resource): BackupPolicy = BackupPolicy(
javaResource as
com.pulumi.azurenative.storsimple.BackupPolicy,
)
}
/**
* @see [BackupPolicy].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [BackupPolicy].
*/
public suspend fun backupPolicy(
name: String,
block: suspend BackupPolicyResourceBuilder.() -> Unit,
): BackupPolicy {
val builder = BackupPolicyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [BackupPolicy].
* @param name The _unique_ name of the resulting resource.
*/
public fun backupPolicy(name: String): BackupPolicy {
val builder = BackupPolicyResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy