BackupPolicy

class BackupPolicy : KotlinCustomResource

Provides a Threat Detection Backup Policy resource. For information about Threat Detection Backup Policy and how to use it, see What is Backup Policy.

NOTE: Available in v1.195.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.threatdetection.ThreatdetectionFunctions;
import com.pulumi.alicloud.threatdetection.inputs.GetAssetsArgs;
import com.pulumi.alicloud.threatdetection.BackupPolicy;
import com.pulumi.alicloud.threatdetection.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) {
final var defaultAssets = ThreatdetectionFunctions.getAssets(GetAssetsArgs.builder()
.machineTypes("ecs")
.build());
var defaultBackupPolicy = new BackupPolicy("defaultBackupPolicy", BackupPolicyArgs.builder()
.backupPolicyName("tf-example-name")
.policy("{\"Exclude\":[\"/bin/\",\"/usr/bin/\",\"/sbin/\",\"/boot/\",\"/proc/\",\"/sys/\",\"/srv/\",\"/lib/\",\"/selinux/\",\"/usr/sbin/\",\"/run/\",\"/lib32/\",\"/lib64/\",\"/lost+found/\",\"/var/lib/kubelet/\",\"/var/lib/ntp/proc\",\"/var/lib/container\"],\"ExcludeSystemPath\":true,\"Include\":[],\"IsDefault\":1,\"Retention\":7,\"Schedule\":\"I|1668703620|PT24H\",\"Source\":[],\"SpeedLimiter\":\"\",\"UseVss\":true}")
.policyVersion("2.0.0")
.uuidLists(defaultAssets.applyValue(getAssetsResult -> getAssetsResult.ids()[0]))
.build());
}
}

Import

Threat Detection Backup Policy can be imported using the id, e.g.

$ pulumi import alicloud:threatdetection/backupPolicy:BackupPolicy example <id>

Properties

Link copied to clipboard

Protection of the Name of the Policy.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val policy: Output<String>

The Specified Protection Policies of the Specific Configuration. see how to use it.

Link copied to clipboard
val policyRegionId: Output<String>?

The region ID of the non-Alibaba cloud server. You can call the DescribeSupportRegion interface to view the region supported by anti-ransomware, and then select the region supported by anti-ransomware according to the region where your non-Alibaba cloud server is located.

Link copied to clipboard
val policyVersion: Output<String>

Anti-Blackmail Policy Version. Valid values: 1.0.0, 2.0.0.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>

The status of the Backup Policy instance.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val uuidLists: Output<List<String>>

Specify the Protection of Server UUID List.