1. Packages
  2. Alicloud Provider
  3. API Docs
  4. threatdetection
  5. BaselineStrategy
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.threatdetection.BaselineStrategy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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

    The BaselineStrategy resource accepts the following input properties:

    BaselineStrategyName string
    Policy name.
    CustomType string
    The type of policy. Value:

    • common: standard policy
    • custom: custom policy
    CycleDays int
    The detection period of the policy.
    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.
    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 string
    Policy name.
    CustomType string
    The type of policy. Value:

    • common: standard policy
    • custom: custom policy
    CycleDays int
    The detection period of the policy.
    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.
    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 String
    Policy name.
    customType String
    The type of policy. Value:

    • common: standard policy
    • custom: custom policy
    cycleDays Integer
    The detection period of the policy.
    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.
    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 string
    Policy name.
    customType string
    The type of policy. Value:

    • common: standard policy
    • custom: custom policy
    cycleDays number
    The detection period of the policy.
    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.
    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 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.
    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.
    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 String
    Policy name.
    customType String
    The type of policy. Value:

    • common: standard policy
    • custom: custom policy
    cycleDays Number
    The detection period of the policy.
    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.
    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)
    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.
    The following state arguments are supported:
    BaselineStrategyId string
    The ID of the baseline check policy.
    BaselineStrategyName 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 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 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 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 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 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>
    

    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.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi