1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. threatdetection
  5. BaselineStrategy
Alibaba Cloud v3.49.0 published on Sunday, Feb 4, 2024 by Pulumi

alicloud.threatdetection.BaselineStrategy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.49.0 published on Sunday, Feb 4, 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

    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()
        {
            BaselineStrategyName = "apispec",
            CustomType = "custom",
            CycleDays = 3,
            EndTime = "08:00:00",
            RiskSubTypeName = "hc_exploit_redis",
            StartTime = "05:00:00",
            TargetType = "groupId",
        });
    
    });
    
    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{
    			BaselineStrategyName: pulumi.String("apispec"),
    			CustomType:           pulumi.String("custom"),
    			CycleDays:            pulumi.Int(3),
    			EndTime:              pulumi.String("08:00:00"),
    			RiskSubTypeName:      pulumi.String("hc_exploit_redis"),
    			StartTime:            pulumi.String("05:00:00"),
    			TargetType:           pulumi.String("groupId"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()        
                .baselineStrategyName("apispec")
                .customType("custom")
                .cycleDays(3)
                .endTime("08:00:00")
                .riskSubTypeName("hc_exploit_redis")
                .startTime("05:00:00")
                .targetType("groupId")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.threatdetection.BaselineStrategy("default",
        baseline_strategy_name="apispec",
        custom_type="custom",
        cycle_days=3,
        end_time="08:00:00",
        risk_sub_type_name="hc_exploit_redis",
        start_time="05:00:00",
        target_type="groupId")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.threatdetection.BaselineStrategy("default", {
        baselineStrategyName: "apispec",
        customType: "custom",
        cycleDays: 3,
        endTime: "08:00:00",
        riskSubTypeName: "hc_exploit_redis",
        startTime: "05:00:00",
        targetType: "groupId",
    });
    
    resources:
      default:
        type: alicloud:threatdetection:BaselineStrategy
        properties:
          baselineStrategyName: apispec
          customType: custom
          cycleDays: 3
          endTime: 08:00:00
          riskSubTypeName: hc_exploit_redis
          startTime: 05:00:00
          targetType: groupId
    

    Create BaselineStrategy Resource

    new BaselineStrategy(name: string, args: BaselineStrategyArgs, opts?: CustomResourceOptions);
    @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,
                         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)
    @overload
    def BaselineStrategy(resource_name: str,
                         args: BaselineStrategyArgs,
                         opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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>
    

    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.49.0 published on Sunday, Feb 4, 2024 by Pulumi