getBackupPolicies

This data source provides the Threat Detection Backup Policies of the current Alibaba Cloud user.

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.GetBackupPoliciesArgs;
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 ids = ThreatdetectionFunctions.getBackupPolicies(GetBackupPoliciesArgs.builder()
.ids("example_id")
.build());
ctx.export("threatDetectionBackupPoliciesId1", ids.applyValue(getBackupPoliciesResult -> getBackupPoliciesResult.policies()[0].id()));
final var nameRegex = ThreatdetectionFunctions.getBackupPolicies(GetBackupPoliciesArgs.builder()
.nameRegex("tf-example")
.build());
ctx.export("threatDetectionBackupPoliciesId2", nameRegex.applyValue(getBackupPoliciesResult -> getBackupPoliciesResult.policies()[0].id()));
}
}

Return

A collection of values returned by getBackupPolicies.

Parameters

argument

A collection of arguments for invoking getBackupPolicies.


suspend fun getBackupPolicies(currentPage: Int? = null, ids: List<String>? = null, machineRemark: String? = null, name: String? = null, nameRegex: String? = null, outputFile: String? = null, pageSize: Int? = null, status: String? = null): GetBackupPoliciesResult

Return

A collection of values returned by getBackupPolicies.

See also

Parameters

currentPage
ids

A list of Threat Detection Backup Policies IDs.

machineRemark

The information that you want to use to identify the servers protected by the anti-ransomware policy. You can enter the IP address or ID of a server.

name

The name of the anti-ransomware policy that you want to query.

nameRegex

A regex string to filter results by Threat Detection Backup Policies name.

outputFile
pageSize
status

The status of the anti-ransomware policy. Valid Value: enabled, disabled, closed.


Return

A collection of values returned by getBackupPolicies.

See also

Parameters

argument

Builder for com.pulumi.alicloud.threatdetection.kotlin.inputs.GetBackupPoliciesPlainArgs.