Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.threatdetection.getBaselineStrategies
Explore with Pulumi AI
This data source provides Threat Detection Baseline Strategy available to the user.What is Baseline Strategy
NOTE: Available in 1.195.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultBaselineStrategy = new alicloud.threatdetection.BaselineStrategy("default", {
customType: "custom",
endTime: "08:00:00",
baselineStrategyName: "apispec",
cycleDays: 3,
targetType: "groupId",
startTime: "05:00:00",
riskSubTypeName: "hc_exploit_redis",
});
const _default = defaultBaselineStrategy.id.apply(id => alicloud.threatdetection.getBaselineStrategiesOutput({
ids: [id],
nameRegex: defaultBaselineStrategy.name,
customType: "custom",
}));
export const alicloudThreatDetectionBaselineStrategyExampleId = defaultAlicloudThreatDetectionBaselineStrategys.strategys[0].id;
import pulumi
import pulumi_alicloud as alicloud
default_baseline_strategy = alicloud.threatdetection.BaselineStrategy("default",
custom_type="custom",
end_time="08:00:00",
baseline_strategy_name="apispec",
cycle_days=3,
target_type="groupId",
start_time="05:00:00",
risk_sub_type_name="hc_exploit_redis")
default = default_baseline_strategy.id.apply(lambda id: alicloud.threatdetection.get_baseline_strategies_output(ids=[id],
name_regex=default_baseline_strategy.name,
custom_type="custom"))
pulumi.export("alicloudThreatDetectionBaselineStrategyExampleId", default_alicloud_threat_detection_baseline_strategys["strategys"][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 {
defaultBaselineStrategy, err := threatdetection.NewBaselineStrategy(ctx, "default", &threatdetection.BaselineStrategyArgs{
CustomType: pulumi.String("custom"),
EndTime: pulumi.String("08:00:00"),
BaselineStrategyName: pulumi.String("apispec"),
CycleDays: pulumi.Int(3),
TargetType: pulumi.String("groupId"),
StartTime: pulumi.String("05:00:00"),
RiskSubTypeName: pulumi.String("hc_exploit_redis"),
})
if err != nil {
return err
}
_ = defaultBaselineStrategy.ID().ApplyT(func(id string) (threatdetection.GetBaselineStrategiesResult, error) {
return threatdetection.GetBaselineStrategiesResult(interface{}(threatdetection.GetBaselineStrategiesOutput(ctx, threatdetection.GetBaselineStrategiesOutputArgs{
Ids: []string{
id,
},
NameRegex: defaultBaselineStrategy.Name,
CustomType: "custom",
}, nil))), nil
}).(threatdetection.GetBaselineStrategiesResultOutput)
ctx.Export("alicloudThreatDetectionBaselineStrategyExampleId", defaultAlicloudThreatDetectionBaselineStrategys.Strategys[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var defaultBaselineStrategy = new AliCloud.ThreatDetection.BaselineStrategy("default", new()
{
CustomType = "custom",
EndTime = "08:00:00",
BaselineStrategyName = "apispec",
CycleDays = 3,
TargetType = "groupId",
StartTime = "05:00:00",
RiskSubTypeName = "hc_exploit_redis",
});
var @default = AliCloud.ThreatDetection.GetBaselineStrategies.Invoke(new()
{
Ids = new[]
{
defaultBaselineStrategy.Id,
},
NameRegex = defaultBaselineStrategy.Name,
CustomType = "custom",
});
return new Dictionary<string, object?>
{
["alicloudThreatDetectionBaselineStrategyExampleId"] = defaultAlicloudThreatDetectionBaselineStrategys.Strategys[0].Id,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.threatdetection.BaselineStrategy;
import com.pulumi.alicloud.threatdetection.BaselineStrategyArgs;
import com.pulumi.alicloud.threatdetection.ThreatdetectionFunctions;
import com.pulumi.alicloud.threatdetection.inputs.GetBaselineStrategiesArgs;
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 defaultBaselineStrategy = new BaselineStrategy("defaultBaselineStrategy", BaselineStrategyArgs.builder()
.customType("custom")
.endTime("08:00:00")
.baselineStrategyName("apispec")
.cycleDays(3)
.targetType("groupId")
.startTime("05:00:00")
.riskSubTypeName("hc_exploit_redis")
.build());
final var default = ThreatdetectionFunctions.getBaselineStrategies(GetBaselineStrategiesArgs.builder()
.ids(defaultBaselineStrategy.id())
.nameRegex(defaultBaselineStrategy.name())
.customType("custom")
.build());
ctx.export("alicloudThreatDetectionBaselineStrategyExampleId", defaultAlicloudThreatDetectionBaselineStrategys.strategys()[0].id());
}
}
resources:
defaultBaselineStrategy:
type: alicloud:threatdetection:BaselineStrategy
name: default
properties:
customType: custom
endTime: 08:00:00
baselineStrategyName: apispec
cycleDays: 3
targetType: groupId
startTime: 05:00:00
riskSubTypeName: hc_exploit_redis
variables:
default:
fn::invoke:
function: alicloud:threatdetection:getBaselineStrategies
arguments:
ids:
- ${defaultBaselineStrategy.id}
nameRegex: ${defaultBaselineStrategy.name}
customType: custom
outputs:
alicloudThreatDetectionBaselineStrategyExampleId: ${defaultAlicloudThreatDetectionBaselineStrategys.strategys[0].id}
Using getBaselineStrategies
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 getBaselineStrategies(args: GetBaselineStrategiesArgs, opts?: InvokeOptions): Promise<GetBaselineStrategiesResult>
function getBaselineStrategiesOutput(args: GetBaselineStrategiesOutputArgs, opts?: InvokeOptions): Output<GetBaselineStrategiesResult>
def get_baseline_strategies(custom_type: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
strategy_ids: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBaselineStrategiesResult
def get_baseline_strategies_output(custom_type: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
strategy_ids: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBaselineStrategiesResult]
func GetBaselineStrategies(ctx *Context, args *GetBaselineStrategiesArgs, opts ...InvokeOption) (*GetBaselineStrategiesResult, error)
func GetBaselineStrategiesOutput(ctx *Context, args *GetBaselineStrategiesOutputArgs, opts ...InvokeOption) GetBaselineStrategiesResultOutput
> Note: This function is named GetBaselineStrategies
in the Go SDK.
public static class GetBaselineStrategies
{
public static Task<GetBaselineStrategiesResult> InvokeAsync(GetBaselineStrategiesArgs args, InvokeOptions? opts = null)
public static Output<GetBaselineStrategiesResult> Invoke(GetBaselineStrategiesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBaselineStrategiesResult> getBaselineStrategies(GetBaselineStrategiesArgs args, InvokeOptions options)
public static Output<GetBaselineStrategiesResult> getBaselineStrategies(GetBaselineStrategiesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:threatdetection/getBaselineStrategies:getBaselineStrategies
arguments:
# arguments dictionary
The following arguments are supported:
- Custom
Type Changes to this property will trigger replacement.
- The type of policy. Value:-common: standard policy-custom: custom policy
- Ids List<string>
- A list of Baseline Strategy IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Strategy
Ids Changes to this property will trigger replacement.
- Custom
Type Changes to this property will trigger replacement.
- The type of policy. Value:-common: standard policy-custom: custom policy
- Ids []string
- A list of Baseline Strategy IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Strategy
Ids Changes to this property will trigger replacement.
- custom
Type Changes to this property will trigger replacement.
- The type of policy. Value:-common: standard policy-custom: custom policy
- ids List<String>
- A list of Baseline Strategy IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - strategy
Ids Changes to this property will trigger replacement.
- custom
Type Changes to this property will trigger replacement.
- The type of policy. Value:-common: standard policy-custom: custom policy
- ids string[]
- A list of Baseline Strategy IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Group Metric Rule name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - strategy
Ids Changes to this property will trigger replacement.
- custom_
type Changes to this property will trigger replacement.
- The type of policy. Value:-common: standard policy-custom: custom policy
- ids Sequence[str]
- A list of Baseline Strategy IDs.
- name_
regex Changes to this property will trigger replacement.
- A regex string to filter results by Group Metric Rule name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - strategy_
ids Changes to this property will trigger replacement.
- custom
Type Changes to this property will trigger replacement.
- The type of policy. Value:-common: standard policy-custom: custom policy
- ids List<String>
- A list of Baseline Strategy IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - strategy
Ids Changes to this property will trigger replacement.
getBaselineStrategies Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Baseline Strategy IDs.
- Names List<string>
- A list of name of Baseline Strategys.
- Strategies
List<Pulumi.
Ali Cloud. Threat Detection. Outputs. Get Baseline Strategies Strategy> - Custom
Type string - The type of policy. Value:
- common: standard policy
- custom: custom policy
- Name
Regex string - Output
File string - Strategy
Ids string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Baseline Strategy IDs.
- Names []string
- A list of name of Baseline Strategys.
- Strategies
[]Get
Baseline Strategies Strategy - Custom
Type string - The type of policy. Value:
- common: standard policy
- custom: custom policy
- Name
Regex string - Output
File string - Strategy
Ids string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Baseline Strategy IDs.
- names List<String>
- A list of name of Baseline Strategys.
- strategies
List<Get
Baseline Strategies Strategy> - custom
Type String - The type of policy. Value:
- common: standard policy
- custom: custom policy
- name
Regex String - output
File String - strategy
Ids String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Baseline Strategy IDs.
- names string[]
- A list of name of Baseline Strategys.
- strategies
Get
Baseline Strategies Strategy[] - custom
Type string - The type of policy. Value:
- common: standard policy
- custom: custom policy
- name
Regex string - output
File string - strategy
Ids string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Baseline Strategy IDs.
- names Sequence[str]
- A list of name of Baseline Strategys.
- strategies
Sequence[Get
Baseline Strategies Strategy] - custom_
type str - The type of policy. Value:
- common: standard policy
- custom: custom policy
- name_
regex str - output_
file str - strategy_
ids str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Baseline Strategy IDs.
- names List<String>
- A list of name of Baseline Strategys.
- strategies List<Property Map>
- custom
Type String - The type of policy. Value:
- common: standard policy
- custom: custom policy
- name
Regex String - output
File String - strategy
Ids String
Supporting Types
GetBaselineStrategiesStrategy
- Baseline
Strategy Id This property is required. string - The ID of the baseline check policy.
- Baseline
Strategy Name This property is required. string - Policy name.
- Custom
Type This property is required. string - The type of policy. Value:-common: standard policy-custom: custom policy
- Cycle
Days This property is required. int - The detection period of the policy.
- Cycle
Start Time This property is required. int - The detection period of the policy. Value:
- 0: 0:00~06:00
- 6: 6:00~12:00
- 12*: 12:00~18:00
- 18: 18:00~24:00
- End
Time This property is required. string - The baseline check policy execution end time.
- Id
This property is required. string - The ID of the baseline check policy.
- Risk
Sub Type Name This property is required. string - Start
Time This property is required. string - The baseline check policy start time.
- Target
Type This property is required. string
- Baseline
Strategy Id This property is required. string - The ID of the baseline check policy.
- Baseline
Strategy Name This property is required. string - Policy name.
- Custom
Type This property is required. string - The type of policy. Value:-common: standard policy-custom: custom policy
- Cycle
Days This property is required. int - The detection period of the policy.
- Cycle
Start Time This property is required. int - The detection period of the policy. Value:
- 0: 0:00~06:00
- 6: 6:00~12:00
- 12*: 12:00~18:00
- 18: 18:00~24:00
- End
Time This property is required. string - The baseline check policy execution end time.
- Id
This property is required. string - The ID of the baseline check policy.
- Risk
Sub Type Name This property is required. string - Start
Time This property is required. string - The baseline check policy start time.
- Target
Type This property is required. string
- baseline
Strategy Id This property is required. String - The ID of the baseline check policy.
- baseline
Strategy Name This property is required. String - Policy name.
- custom
Type This property is required. String - The type of policy. Value:-common: standard policy-custom: custom policy
- cycle
Days This property is required. Integer - The detection period of the policy.
- cycle
Start Time This property is required. Integer - The detection period of the policy. Value:
- 0: 0:00~06:00
- 6: 6:00~12:00
- 12*: 12:00~18:00
- 18: 18:00~24:00
- end
Time This property is required. String - The baseline check policy execution end time.
- id
This property is required. String - The ID of the baseline check policy.
- risk
Sub Type Name This property is required. String - start
Time This property is required. String - The baseline check policy start time.
- target
Type This property is required. String
- baseline
Strategy Id This property is required. string - The ID of the baseline check policy.
- baseline
Strategy Name This property is required. string - Policy name.
- custom
Type This property is required. string - The type of policy. Value:-common: standard policy-custom: custom policy
- cycle
Days This property is required. number - The detection period of the policy.
- cycle
Start Time This property is required. number - The detection period of the policy. Value:
- 0: 0:00~06:00
- 6: 6:00~12:00
- 12*: 12:00~18:00
- 18: 18:00~24:00
- end
Time This property is required. string - The baseline check policy execution end time.
- id
This property is required. string - The ID of the baseline check policy.
- risk
Sub Type Name This property is required. string - start
Time This property is required. string - The baseline check policy start time.
- target
Type This property is required. string
- baseline_
strategy_ id This property is required. str - The ID of the baseline check policy.
- baseline_
strategy_ name This property is required. str - Policy name.
- custom_
type This property is required. str - The type of policy. Value:-common: standard policy-custom: custom policy
- cycle_
days This property is required. int - The detection period of the policy.
- cycle_
start_ time This property is required. int - The detection period of the policy. Value:
- 0: 0:00~06:00
- 6: 6:00~12:00
- 12*: 12:00~18:00
- 18: 18:00~24:00
- end_
time This property is required. str - The baseline check policy execution end time.
- id
This property is required. str - The ID of the baseline check policy.
- risk_
sub_ type_ name This property is required. str - start_
time This property is required. str - The baseline check policy start time.
- target_
type This property is required. str
- baseline
Strategy Id This property is required. String - The ID of the baseline check policy.
- baseline
Strategy Name This property is required. String - Policy name.
- custom
Type This property is required. String - The type of policy. Value:-common: standard policy-custom: custom policy
- cycle
Days This property is required. Number - The detection period of the policy.
- cycle
Start Time This property is required. Number - The detection period of the policy. Value:
- 0: 0:00~06:00
- 6: 6:00~12:00
- 12*: 12:00~18:00
- 18: 18:00~24:00
- end
Time This property is required. String - The baseline check policy execution end time.
- id
This property is required. String - The ID of the baseline check policy.
- risk
Sub Type Name This property is required. String - start
Time This property is required. String - The baseline check policy start time.
- target
Type This property is required. String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.