Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:threatdetection/getBaselineStrategies:getBaselineStrategies
arguments:
# arguments dictionary
The following arguments are supported:
- Custom
Type string - The type of policy. Value:-common: standard policy-custom: custom policy
- Ids List<string>
- A list of Baseline Strategy IDs.
- Name
Regex string - 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 string
- Custom
Type string - The type of policy. Value:-common: standard policy-custom: custom policy
- Ids []string
- A list of Baseline Strategy IDs.
- Name
Regex string - 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 string
- custom
Type String - The type of policy. Value:-common: standard policy-custom: custom policy
- ids List<String>
- A list of Baseline Strategy IDs.
- name
Regex String - 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 String
- custom
Type string - The type of policy. Value:-common: standard policy-custom: custom policy
- ids string[]
- A list of Baseline Strategy IDs.
- name
Regex string - 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 string
- custom_
type str - The type of policy. Value:-common: standard policy-custom: custom policy
- ids Sequence[str]
- A list of Baseline Strategy IDs.
- name_
regex str - 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 str
- custom
Type String - The type of policy. Value:-common: standard policy-custom: custom policy
- ids List<String>
- A list of Baseline Strategy IDs.
- name
Regex String - 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 String
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 stringId - The ID of the baseline check policy.
- Baseline
Strategy stringName - Policy name.
- Custom
Type string - The type of policy. Value:-common: standard policy-custom: custom policy
- Cycle
Days int - The detection period of the policy.
- Cycle
Start intTime - 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 string - The baseline check policy execution end time.
- Id string
- The ID of the baseline check policy.
- Risk
Sub stringType Name - Start
Time string - The baseline check policy start time.
- Target
Type string
- Baseline
Strategy stringId - The ID of the baseline check policy.
- Baseline
Strategy stringName - Policy name.
- Custom
Type string - The type of policy. Value:-common: standard policy-custom: custom policy
- Cycle
Days int - The detection period of the policy.
- Cycle
Start intTime - 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 string - The baseline check policy execution end time.
- Id string
- The ID of the baseline check policy.
- Risk
Sub stringType Name - Start
Time string - The baseline check policy start time.
- Target
Type string
- baseline
Strategy StringId - The ID of the baseline check policy.
- baseline
Strategy StringName - Policy name.
- custom
Type String - The type of policy. Value:-common: standard policy-custom: custom policy
- cycle
Days Integer - The detection period of the policy.
- cycle
Start IntegerTime - 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 String - The baseline check policy execution end time.
- id String
- The ID of the baseline check policy.
- risk
Sub StringType Name - start
Time String - The baseline check policy start time.
- target
Type String
- baseline
Strategy stringId - The ID of the baseline check policy.
- baseline
Strategy stringName - Policy name.
- custom
Type string - The type of policy. Value:-common: standard policy-custom: custom policy
- cycle
Days number - The detection period of the policy.
- cycle
Start numberTime - 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 string - The baseline check policy execution end time.
- id string
- The ID of the baseline check policy.
- risk
Sub stringType Name - start
Time string - The baseline check policy start time.
- target
Type string
- baseline_
strategy_ strid - The ID of the baseline check policy.
- baseline_
strategy_ strname - Policy name.
- custom_
type str - The type of policy. Value:-common: standard policy-custom: custom policy
- cycle_
days int - The detection period of the policy.
- cycle_
start_ inttime - 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 str - The baseline check policy execution end time.
- id str
- The ID of the baseline check policy.
- risk_
sub_ strtype_ name - start_
time str - The baseline check policy start time.
- target_
type str
- baseline
Strategy StringId - The ID of the baseline check policy.
- baseline
Strategy StringName - Policy name.
- custom
Type String - The type of policy. Value:-common: standard policy-custom: custom policy
- cycle
Days Number - The detection period of the policy.
- cycle
Start NumberTime - 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 String - The baseline check policy execution end time.
- id String
- The ID of the baseline check policy.
- risk
Sub StringType Name - start
Time String - The baseline check policy start time.
- target
Type String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.