alicloud.threatdetection.BaselineStrategy
Explore with Pulumi AI
Provides a Threat Detection Baseline Strategy resource.
For information about Threat Detection Baseline Strategy and how to use it, see What is Baseline Strategy.
NOTE: Available since v1.195.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = 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",
});
import pulumi
import pulumi_alicloud as alicloud
default = 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")
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 {
_, 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
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = 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",
});
});
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 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 default_ = new BaselineStrategy("default", BaselineStrategyArgs.builder()
.customType("custom")
.endTime("08:00:00")
.baselineStrategyName("apispec")
.cycleDays(3)
.targetType("groupId")
.startTime("05:00:00")
.riskSubTypeName("hc_exploit_redis")
.build());
}
}
resources:
default:
type: alicloud:threatdetection:BaselineStrategy
properties:
customType: custom
endTime: 08:00:00
baselineStrategyName: apispec
cycleDays: 3
targetType: groupId
startTime: 05:00:00
riskSubTypeName: hc_exploit_redis
Create BaselineStrategy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BaselineStrategy(name: string, args: BaselineStrategyArgs, opts?: CustomResourceOptions);
@overload
def BaselineStrategy(resource_name: str,
args: BaselineStrategyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BaselineStrategy(resource_name: str,
opts: Optional[ResourceOptions] = None,
baseline_strategy_name: Optional[str] = None,
custom_type: Optional[str] = None,
cycle_days: Optional[int] = None,
end_time: Optional[str] = None,
risk_sub_type_name: Optional[str] = None,
start_time: Optional[str] = None,
target_type: Optional[str] = None,
cycle_start_time: Optional[int] = None)
func NewBaselineStrategy(ctx *Context, name string, args BaselineStrategyArgs, opts ...ResourceOption) (*BaselineStrategy, error)
public BaselineStrategy(string name, BaselineStrategyArgs args, CustomResourceOptions? opts = null)
public BaselineStrategy(String name, BaselineStrategyArgs args)
public BaselineStrategy(String name, BaselineStrategyArgs args, CustomResourceOptions options)
type: alicloud:threatdetection:BaselineStrategy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BaselineStrategyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BaselineStrategyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BaselineStrategyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BaselineStrategyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BaselineStrategyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var baselineStrategyResource = new AliCloud.ThreatDetection.BaselineStrategy("baselineStrategyResource", new()
{
BaselineStrategyName = "string",
CustomType = "string",
CycleDays = 0,
EndTime = "string",
RiskSubTypeName = "string",
StartTime = "string",
TargetType = "string",
CycleStartTime = 0,
});
example, err := threatdetection.NewBaselineStrategy(ctx, "baselineStrategyResource", &threatdetection.BaselineStrategyArgs{
BaselineStrategyName: pulumi.String("string"),
CustomType: pulumi.String("string"),
CycleDays: pulumi.Int(0),
EndTime: pulumi.String("string"),
RiskSubTypeName: pulumi.String("string"),
StartTime: pulumi.String("string"),
TargetType: pulumi.String("string"),
CycleStartTime: pulumi.Int(0),
})
var baselineStrategyResource = new BaselineStrategy("baselineStrategyResource", BaselineStrategyArgs.builder()
.baselineStrategyName("string")
.customType("string")
.cycleDays(0)
.endTime("string")
.riskSubTypeName("string")
.startTime("string")
.targetType("string")
.cycleStartTime(0)
.build());
baseline_strategy_resource = alicloud.threatdetection.BaselineStrategy("baselineStrategyResource",
baseline_strategy_name="string",
custom_type="string",
cycle_days=0,
end_time="string",
risk_sub_type_name="string",
start_time="string",
target_type="string",
cycle_start_time=0)
const baselineStrategyResource = new alicloud.threatdetection.BaselineStrategy("baselineStrategyResource", {
baselineStrategyName: "string",
customType: "string",
cycleDays: 0,
endTime: "string",
riskSubTypeName: "string",
startTime: "string",
targetType: "string",
cycleStartTime: 0,
});
type: alicloud:threatdetection:BaselineStrategy
properties:
baselineStrategyName: string
customType: string
cycleDays: 0
cycleStartTime: 0
endTime: string
riskSubTypeName: string
startTime: string
targetType: string
BaselineStrategy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BaselineStrategy resource accepts the following input properties:
- 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.
- End
Time string - The baseline check policy execution end time.
- Risk
Sub stringType Name - Detection item subtype.
- Start
Time string - The baseline check policy start time.
- Target
Type string - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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
- 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.
- End
Time string - The baseline check policy execution end time.
- Risk
Sub stringType Name - Detection item subtype.
- Start
Time string - The baseline check policy start time.
- Target
Type string - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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
- 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.
- end
Time String - The baseline check policy execution end time.
- risk
Sub StringType Name - Detection item subtype.
- start
Time String - The baseline check policy start time.
- target
Type String - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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
- 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.
- end
Time string - The baseline check policy execution end time.
- risk
Sub stringType Name - Detection item subtype.
- start
Time string - The baseline check policy start time.
- target
Type string - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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
- 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.
- end_
time str - The baseline check policy execution end time.
- risk_
sub_ strtype_ name - Detection item subtype.
- start_
time str - The baseline check policy start time.
- target_
type str - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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
- 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.
- end
Time String - The baseline check policy execution end time.
- risk
Sub StringType Name - Detection item subtype.
- start
Time String - The baseline check policy start time.
- target
Type String - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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
Outputs
All input properties are implicitly available as output properties. Additionally, the BaselineStrategy resource produces the following output properties:
- Baseline
Strategy stringId - The ID of the baseline check policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Baseline
Strategy stringId - The ID of the baseline check policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- baseline
Strategy StringId - The ID of the baseline check policy.
- id String
- The provider-assigned unique ID for this managed resource.
- baseline
Strategy stringId - The ID of the baseline check policy.
- id string
- The provider-assigned unique ID for this managed resource.
- baseline_
strategy_ strid - The ID of the baseline check policy.
- id str
- The provider-assigned unique ID for this managed resource.
- baseline
Strategy StringId - The ID of the baseline check policy.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing BaselineStrategy Resource
Get an existing BaselineStrategy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BaselineStrategyState, opts?: CustomResourceOptions): BaselineStrategy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
baseline_strategy_id: Optional[str] = None,
baseline_strategy_name: Optional[str] = None,
custom_type: Optional[str] = None,
cycle_days: Optional[int] = None,
cycle_start_time: Optional[int] = None,
end_time: Optional[str] = None,
risk_sub_type_name: Optional[str] = None,
start_time: Optional[str] = None,
target_type: Optional[str] = None) -> BaselineStrategy
func GetBaselineStrategy(ctx *Context, name string, id IDInput, state *BaselineStrategyState, opts ...ResourceOption) (*BaselineStrategy, error)
public static BaselineStrategy Get(string name, Input<string> id, BaselineStrategyState? state, CustomResourceOptions? opts = null)
public static BaselineStrategy get(String name, Output<String> id, BaselineStrategyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- 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.
- Risk
Sub stringType Name - Detection item subtype.
- Start
Time string - The baseline check policy start time.
- Target
Type string - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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.
- Risk
Sub stringType Name - Detection item subtype.
- Start
Time string - The baseline check policy start time.
- Target
Type string - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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.
- risk
Sub StringType Name - Detection item subtype.
- start
Time String - The baseline check policy start time.
- target
Type String - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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.
- risk
Sub stringType Name - Detection item subtype.
- start
Time string - The baseline check policy start time.
- target
Type string - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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.
- risk_
sub_ strtype_ name - Detection item subtype.
- start_
time str - The baseline check policy start time.
- target_
type str - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
- 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.
- risk
Sub StringType Name - Detection item subtype.
- start
Time String - The baseline check policy start time.
- target
Type String - The method of adding assets that take effect from the policy. Value:
- groupId: Added by asset group.
- uuid: Add by single asset.
Import
Threat Detection Baseline Strategy can be imported using the id, e.g.
$ pulumi import alicloud:threatdetection/baselineStrategy:BaselineStrategy example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.