1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. threatdetection
  5. BaselineStrategy
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. BaselineStrategyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. BaselineStrategyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BaselineStrategyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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,
});
Copy
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),
})
Copy
var baselineStrategyResource = new BaselineStrategy("baselineStrategyResource", BaselineStrategyArgs.builder()
    .baselineStrategyName("string")
    .customType("string")
    .cycleDays(0)
    .endTime("string")
    .riskSubTypeName("string")
    .startTime("string")
    .targetType("string")
    .cycleStartTime(0)
    .build());
Copy
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)
Copy
const baselineStrategyResource = new alicloud.threatdetection.BaselineStrategy("baselineStrategyResource", {
    baselineStrategyName: "string",
    customType: "string",
    cycleDays: 0,
    endTime: "string",
    riskSubTypeName: "string",
    startTime: "string",
    targetType: "string",
    cycleStartTime: 0,
});
Copy
type: alicloud:threatdetection:BaselineStrategy
properties:
    baselineStrategyName: string
    customType: string
    cycleDays: 0
    cycleStartTime: 0
    endTime: string
    riskSubTypeName: string
    startTime: string
    targetType: string
Copy

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:

BaselineStrategyName
This property is required.
Changes to this property will trigger replacement.
string
Policy name.
CustomType This property is required. string
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
CycleDays This property is required. int
The detection period of the policy.
EndTime This property is required. string
The baseline check policy execution end time.
RiskSubTypeName This property is required. string
Detection item subtype.
StartTime This property is required. string
The baseline check policy start time.
TargetType This property is required. string
The method of adding assets that take effect from the policy. Value:

  • groupId: Added by asset group.
  • uuid: Add by single asset.
CycleStartTime 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
BaselineStrategyName
This property is required.
Changes to this property will trigger replacement.
string
Policy name.
CustomType This property is required. string
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
CycleDays This property is required. int
The detection period of the policy.
EndTime This property is required. string
The baseline check policy execution end time.
RiskSubTypeName This property is required. string
Detection item subtype.
StartTime This property is required. string
The baseline check policy start time.
TargetType This property is required. string
The method of adding assets that take effect from the policy. Value:

  • groupId: Added by asset group.
  • uuid: Add by single asset.
CycleStartTime 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
baselineStrategyName
This property is required.
Changes to this property will trigger replacement.
String
Policy name.
customType This property is required. String
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
cycleDays This property is required. Integer
The detection period of the policy.
endTime This property is required. String
The baseline check policy execution end time.
riskSubTypeName This property is required. String
Detection item subtype.
startTime This property is required. String
The baseline check policy start time.
targetType This property is required. String
The method of adding assets that take effect from the policy. Value:

  • groupId: Added by asset group.
  • uuid: Add by single asset.
cycleStartTime 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
baselineStrategyName
This property is required.
Changes to this property will trigger replacement.
string
Policy name.
customType This property is required. string
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
cycleDays This property is required. number
The detection period of the policy.
endTime This property is required. string
The baseline check policy execution end time.
riskSubTypeName This property is required. string
Detection item subtype.
startTime This property is required. string
The baseline check policy start time.
targetType This property is required. string
The method of adding assets that take effect from the policy. Value:

  • groupId: Added by asset group.
  • uuid: Add by single asset.
cycleStartTime 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
baseline_strategy_name
This property is required.
Changes to this property will trigger replacement.
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.
end_time This property is required. str
The baseline check policy execution end time.
risk_sub_type_name This property is required. str
Detection item subtype.
start_time This property is required. str
The baseline check policy start time.
target_type This property is required. 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_time 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
baselineStrategyName
This property is required.
Changes to this property will trigger replacement.
String
Policy name.
customType This property is required. String
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
cycleDays This property is required. Number
The detection period of the policy.
endTime This property is required. String
The baseline check policy execution end time.
riskSubTypeName This property is required. String
Detection item subtype.
startTime This property is required. String
The baseline check policy start time.
targetType This property is required. String
The method of adding assets that take effect from the policy. Value:

  • groupId: Added by asset group.
  • uuid: Add by single asset.
cycleStartTime 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

Outputs

All input properties are implicitly available as output properties. Additionally, the BaselineStrategy resource produces the following output properties:

BaselineStrategyId string
The ID of the baseline check policy.
Id string
The provider-assigned unique ID for this managed resource.
BaselineStrategyId string
The ID of the baseline check policy.
Id string
The provider-assigned unique ID for this managed resource.
baselineStrategyId String
The ID of the baseline check policy.
id String
The provider-assigned unique ID for this managed resource.
baselineStrategyId string
The ID of the baseline check policy.
id string
The provider-assigned unique ID for this managed resource.
baseline_strategy_id str
The ID of the baseline check policy.
id str
The provider-assigned unique ID for this managed resource.
baselineStrategyId String
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)
resources:  _:    type: alicloud:threatdetection:BaselineStrategy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
BaselineStrategyId string
The ID of the baseline check policy.
BaselineStrategyName Changes to this property will trigger replacement. string
Policy name.
CustomType string
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
CycleDays int
The detection period of the policy.
CycleStartTime 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
EndTime string
The baseline check policy execution end time.
RiskSubTypeName string
Detection item subtype.
StartTime string
The baseline check policy start time.
TargetType string
The method of adding assets that take effect from the policy. Value:

  • groupId: Added by asset group.
  • uuid: Add by single asset.
BaselineStrategyId string
The ID of the baseline check policy.
BaselineStrategyName Changes to this property will trigger replacement. string
Policy name.
CustomType string
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
CycleDays int
The detection period of the policy.
CycleStartTime 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
EndTime string
The baseline check policy execution end time.
RiskSubTypeName string
Detection item subtype.
StartTime string
The baseline check policy start time.
TargetType string
The method of adding assets that take effect from the policy. Value:

  • groupId: Added by asset group.
  • uuid: Add by single asset.
baselineStrategyId String
The ID of the baseline check policy.
baselineStrategyName Changes to this property will trigger replacement. String
Policy name.
customType String
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
cycleDays Integer
The detection period of the policy.
cycleStartTime 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
endTime String
The baseline check policy execution end time.
riskSubTypeName String
Detection item subtype.
startTime String
The baseline check policy start time.
targetType String
The method of adding assets that take effect from the policy. Value:

  • groupId: Added by asset group.
  • uuid: Add by single asset.
baselineStrategyId string
The ID of the baseline check policy.
baselineStrategyName Changes to this property will trigger replacement. string
Policy name.
customType string
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
cycleDays number
The detection period of the policy.
cycleStartTime 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
endTime string
The baseline check policy execution end time.
riskSubTypeName string
Detection item subtype.
startTime string
The baseline check policy start time.
targetType 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_id str
The ID of the baseline check policy.
baseline_strategy_name Changes to this property will trigger replacement. str
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_time 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 str
The baseline check policy execution end time.
risk_sub_type_name str
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.
baselineStrategyId String
The ID of the baseline check policy.
baselineStrategyName Changes to this property will trigger replacement. String
Policy name.
customType String
The type of policy. Value:

  • common: standard policy
  • custom: custom policy
cycleDays Number
The detection period of the policy.
cycleStartTime 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
endTime String
The baseline check policy execution end time.
riskSubTypeName String
Detection item subtype.
startTime String
The baseline check policy start time.
targetType 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>
Copy

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.