Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi
alicloud.threatdetection.getBackupPolicies
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.threatdetection.getBackupPolicies({
ids: ["example_id"],
});
export const threatDetectionBackupPoliciesId1 = ids.then(ids => ids.policies?.[0]?.id);
const nameRegex = alicloud.threatdetection.getBackupPolicies({
nameRegex: "tf-example",
});
export const threatDetectionBackupPoliciesId2 = nameRegex.then(nameRegex => nameRegex.policies?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.threatdetection.get_backup_policies(ids=["example_id"])
pulumi.export("threatDetectionBackupPoliciesId1", ids.policies[0].id)
name_regex = alicloud.threatdetection.get_backup_policies(name_regex="tf-example")
pulumi.export("threatDetectionBackupPoliciesId2", name_regex.policies[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/threatdetection"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := threatdetection.GetBackupPolicies(ctx, &threatdetection.GetBackupPoliciesArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("threatDetectionBackupPoliciesId1", ids.Policies[0].Id)
nameRegex, err := threatdetection.GetBackupPolicies(ctx, &threatdetection.GetBackupPoliciesArgs{
NameRegex: pulumi.StringRef("tf-example"),
}, nil)
if err != nil {
return err
}
ctx.Export("threatDetectionBackupPoliciesId2", nameRegex.Policies[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.ThreatDetection.GetBackupPolicies.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.ThreatDetection.GetBackupPolicies.Invoke(new()
{
NameRegex = "tf-example",
});
return new Dictionary<string, object?>
{
["threatDetectionBackupPoliciesId1"] = ids.Apply(getBackupPoliciesResult => getBackupPoliciesResult.Policies[0]?.Id),
["threatDetectionBackupPoliciesId2"] = nameRegex.Apply(getBackupPoliciesResult => getBackupPoliciesResult.Policies[0]?.Id),
};
});
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()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:threatdetection:getBackupPolicies
Arguments:
ids:
- example_id
nameRegex:
fn::invoke:
Function: alicloud:threatdetection:getBackupPolicies
Arguments:
nameRegex: tf-example
outputs:
threatDetectionBackupPoliciesId1: ${ids.policies[0].id}
threatDetectionBackupPoliciesId2: ${nameRegex.policies[0].id}
Using getBackupPolicies
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBackupPolicies(args: GetBackupPoliciesArgs, opts?: InvokeOptions): Promise<GetBackupPoliciesResult>
function getBackupPoliciesOutput(args: GetBackupPoliciesOutputArgs, opts?: InvokeOptions): Output<GetBackupPoliciesResult>
def get_backup_policies(current_page: Optional[int] = None,
ids: Optional[Sequence[str]] = None,
machine_remark: Optional[str] = None,
name: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
page_size: Optional[int] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBackupPoliciesResult
def get_backup_policies_output(current_page: Optional[pulumi.Input[int]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
machine_remark: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_size: Optional[pulumi.Input[int]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBackupPoliciesResult]
func GetBackupPolicies(ctx *Context, args *GetBackupPoliciesArgs, opts ...InvokeOption) (*GetBackupPoliciesResult, error)
func GetBackupPoliciesOutput(ctx *Context, args *GetBackupPoliciesOutputArgs, opts ...InvokeOption) GetBackupPoliciesResultOutput
> Note: This function is named GetBackupPolicies
in the Go SDK.
public static class GetBackupPolicies
{
public static Task<GetBackupPoliciesResult> InvokeAsync(GetBackupPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetBackupPoliciesResult> Invoke(GetBackupPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBackupPoliciesResult> getBackupPolicies(GetBackupPoliciesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:threatdetection/getBackupPolicies:getBackupPolicies
arguments:
# arguments dictionary
The following arguments are supported:
- Current
Page int - Ids List<string>
- A list of Threat Detection Backup Policies IDs.
- Machine
Remark string - 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 string
- The name of the anti-ransomware policy that you want to query.
- Name
Regex string - A regex string to filter results by Threat Detection Backup Policies name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Size int - Status string
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
.
- Current
Page int - Ids []string
- A list of Threat Detection Backup Policies IDs.
- Machine
Remark string - 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 string
- The name of the anti-ransomware policy that you want to query.
- Name
Regex string - A regex string to filter results by Threat Detection Backup Policies name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Size int - Status string
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
.
- current
Page Integer - ids List<String>
- A list of Threat Detection Backup Policies IDs.
- machine
Remark String - 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 String
- The name of the anti-ransomware policy that you want to query.
- name
Regex String - A regex string to filter results by Threat Detection Backup Policies name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Size Integer - status String
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
.
- current
Page number - ids string[]
- A list of Threat Detection Backup Policies IDs.
- machine
Remark string - 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 string
- The name of the anti-ransomware policy that you want to query.
- name
Regex string - A regex string to filter results by Threat Detection Backup Policies name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - page
Size number - status string
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
.
- current_
page int - ids Sequence[str]
- A list of Threat Detection Backup Policies IDs.
- machine_
remark str - 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 str
- The name of the anti-ransomware policy that you want to query.
- name_
regex str - A regex string to filter results by Threat Detection Backup Policies name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - page_
size int - status str
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
.
- current
Page Number - ids List<String>
- A list of Threat Detection Backup Policies IDs.
- machine
Remark String - 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 String
- The name of the anti-ransomware policy that you want to query.
- name
Regex String - A regex string to filter results by Threat Detection Backup Policies name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Size Number - status String
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
.
getBackupPolicies Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of Threat Detection Backup Policy names.
- Policies
List<Pulumi.
Ali Cloud. Threat Detection. Outputs. Get Backup Policies Policy> - A list of Threat Detection Backup policies. Each element contains the following attributes:
- Current
Page int - Machine
Remark string - Name string
- Name
Regex string - Output
File string - Page
Size int - Status string
- The status of the anti-ransomware policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of Threat Detection Backup Policy names.
- Policies
[]Get
Backup Policies Policy - A list of Threat Detection Backup policies. Each element contains the following attributes:
- Current
Page int - Machine
Remark string - Name string
- Name
Regex string - Output
File string - Page
Size int - Status string
- The status of the anti-ransomware policy.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Threat Detection Backup Policy names.
- policies
List<Get
Backup Policies Policy> - A list of Threat Detection Backup policies. Each element contains the following attributes:
- current
Page Integer - machine
Remark String - name String
- name
Regex String - output
File String - page
Size Integer - status String
- The status of the anti-ransomware policy.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of Threat Detection Backup Policy names.
- policies
Get
Backup Policies Policy[] - A list of Threat Detection Backup policies. Each element contains the following attributes:
- current
Page number - machine
Remark string - name string
- name
Regex string - output
File string - page
Size number - status string
- The status of the anti-ransomware policy.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of Threat Detection Backup Policy names.
- policies
Sequence[Get
Backup Policies Policy] - A list of Threat Detection Backup policies. Each element contains the following attributes:
- current_
page int - machine_
remark str - name str
- name_
regex str - output_
file str - page_
size int - status str
- The status of the anti-ransomware policy.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Threat Detection Backup Policy names.
- policies List<Property Map>
- A list of Threat Detection Backup policies. Each element contains the following attributes:
- current
Page Number - machine
Remark String - name String
- name
Regex String - output
File String - page
Size Number - status String
- The status of the anti-ransomware policy.
Supporting Types
GetBackupPoliciesPolicy
- Backup
Policy intId - The ID of the anti-ransomware policy.
- Backup
Policy stringName - The name of the anti-ransomware policy.
- Id int
- The ID of the anti-ransomware policy.
- Policy string
- The configurations of the anti-ransomware policy.
- Policy
Region stringId - The ID of the region that you specified for data backup when you installed the anti-ransomware agent for the server not deployed on Alibaba Cloud.
- Policy
Version string - The version of the anti-ransomware policy.
- Status string
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
. - Uuid
Lists List<string> - The UUIDs of the servers to which the anti-ransomware policy is applied.
- Backup
Policy intId - The ID of the anti-ransomware policy.
- Backup
Policy stringName - The name of the anti-ransomware policy.
- Id int
- The ID of the anti-ransomware policy.
- Policy string
- The configurations of the anti-ransomware policy.
- Policy
Region stringId - The ID of the region that you specified for data backup when you installed the anti-ransomware agent for the server not deployed on Alibaba Cloud.
- Policy
Version string - The version of the anti-ransomware policy.
- Status string
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
. - Uuid
Lists []string - The UUIDs of the servers to which the anti-ransomware policy is applied.
- backup
Policy IntegerId - The ID of the anti-ransomware policy.
- backup
Policy StringName - The name of the anti-ransomware policy.
- id Integer
- The ID of the anti-ransomware policy.
- policy String
- The configurations of the anti-ransomware policy.
- policy
Region StringId - The ID of the region that you specified for data backup when you installed the anti-ransomware agent for the server not deployed on Alibaba Cloud.
- policy
Version String - The version of the anti-ransomware policy.
- status String
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
. - uuid
Lists List<String> - The UUIDs of the servers to which the anti-ransomware policy is applied.
- backup
Policy numberId - The ID of the anti-ransomware policy.
- backup
Policy stringName - The name of the anti-ransomware policy.
- id number
- The ID of the anti-ransomware policy.
- policy string
- The configurations of the anti-ransomware policy.
- policy
Region stringId - The ID of the region that you specified for data backup when you installed the anti-ransomware agent for the server not deployed on Alibaba Cloud.
- policy
Version string - The version of the anti-ransomware policy.
- status string
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
. - uuid
Lists string[] - The UUIDs of the servers to which the anti-ransomware policy is applied.
- backup_
policy_ intid - The ID of the anti-ransomware policy.
- backup_
policy_ strname - The name of the anti-ransomware policy.
- id int
- The ID of the anti-ransomware policy.
- policy str
- The configurations of the anti-ransomware policy.
- policy_
region_ strid - The ID of the region that you specified for data backup when you installed the anti-ransomware agent for the server not deployed on Alibaba Cloud.
- policy_
version str - The version of the anti-ransomware policy.
- status str
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
. - uuid_
lists Sequence[str] - The UUIDs of the servers to which the anti-ransomware policy is applied.
- backup
Policy NumberId - The ID of the anti-ransomware policy.
- backup
Policy StringName - The name of the anti-ransomware policy.
- id Number
- The ID of the anti-ransomware policy.
- policy String
- The configurations of the anti-ransomware policy.
- policy
Region StringId - The ID of the region that you specified for data backup when you installed the anti-ransomware agent for the server not deployed on Alibaba Cloud.
- policy
Version String - The version of the anti-ransomware policy.
- status String
- The status of the anti-ransomware policy. Valid Value:
enabled
,disabled
,closed
. - uuid
Lists List<String> - The UUIDs of the servers to which the anti-ransomware policy is applied.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.