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

alicloud.threatdetection.AntiBruteForceRule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

    Provides a Threat Detection Anti Brute Force Rule resource.

    Anti-brute force cracking rules.

    For information about Threat Detection Anti Brute Force Rule and how to use it, see What is Anti Brute Force Rule.

    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.AntiBruteForceRule("default", {
        antiBruteForceRuleName: "apispec_example",
        forbiddenTime: 360,
        uuidLists: ["032b618f-b220-4a0d-bd37-fbdc6ef58b6a"],
        failCount: 80,
        span: 10,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.threatdetection.AntiBruteForceRule("default",
        anti_brute_force_rule_name="apispec_example",
        forbidden_time=360,
        uuid_lists=["032b618f-b220-4a0d-bd37-fbdc6ef58b6a"],
        fail_count=80,
        span=10)
    
    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.NewAntiBruteForceRule(ctx, "default", &threatdetection.AntiBruteForceRuleArgs{
    			AntiBruteForceRuleName: pulumi.String("apispec_example"),
    			ForbiddenTime:          pulumi.Int(360),
    			UuidLists: pulumi.StringArray{
    				pulumi.String("032b618f-b220-4a0d-bd37-fbdc6ef58b6a"),
    			},
    			FailCount: pulumi.Int(80),
    			Span:      pulumi.Int(10),
    		})
    		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.AntiBruteForceRule("default", new()
        {
            AntiBruteForceRuleName = "apispec_example",
            ForbiddenTime = 360,
            UuidLists = new[]
            {
                "032b618f-b220-4a0d-bd37-fbdc6ef58b6a",
            },
            FailCount = 80,
            Span = 10,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.threatdetection.AntiBruteForceRule;
    import com.pulumi.alicloud.threatdetection.AntiBruteForceRuleArgs;
    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 AntiBruteForceRule("default", AntiBruteForceRuleArgs.builder()
                .antiBruteForceRuleName("apispec_example")
                .forbiddenTime(360)
                .uuidLists("032b618f-b220-4a0d-bd37-fbdc6ef58b6a")
                .failCount(80)
                .span(10)
                .build());
    
        }
    }
    
    resources:
      default:
        type: alicloud:threatdetection:AntiBruteForceRule
        properties:
          antiBruteForceRuleName: apispec_example
          forbiddenTime: 360
          uuidLists:
            - 032b618f-b220-4a0d-bd37-fbdc6ef58b6a
          failCount: 80
          span: 10
    

    Create AntiBruteForceRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AntiBruteForceRule(name: string, args: AntiBruteForceRuleArgs, opts?: CustomResourceOptions);
    @overload
    def AntiBruteForceRule(resource_name: str,
                           args: AntiBruteForceRuleArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def AntiBruteForceRule(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           anti_brute_force_rule_name: Optional[str] = None,
                           fail_count: Optional[int] = None,
                           forbidden_time: Optional[int] = None,
                           span: Optional[int] = None,
                           uuid_lists: Optional[Sequence[str]] = None,
                           default_rule: Optional[bool] = None)
    func NewAntiBruteForceRule(ctx *Context, name string, args AntiBruteForceRuleArgs, opts ...ResourceOption) (*AntiBruteForceRule, error)
    public AntiBruteForceRule(string name, AntiBruteForceRuleArgs args, CustomResourceOptions? opts = null)
    public AntiBruteForceRule(String name, AntiBruteForceRuleArgs args)
    public AntiBruteForceRule(String name, AntiBruteForceRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:threatdetection:AntiBruteForceRule
    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 AntiBruteForceRuleArgs
    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 AntiBruteForceRuleArgs
    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 AntiBruteForceRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AntiBruteForceRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AntiBruteForceRuleArgs
    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 antiBruteForceRuleResource = new AliCloud.ThreatDetection.AntiBruteForceRule("antiBruteForceRuleResource", new()
    {
        AntiBruteForceRuleName = "string",
        FailCount = 0,
        ForbiddenTime = 0,
        Span = 0,
        UuidLists = new[]
        {
            "string",
        },
        DefaultRule = false,
    });
    
    example, err := threatdetection.NewAntiBruteForceRule(ctx, "antiBruteForceRuleResource", &threatdetection.AntiBruteForceRuleArgs{
    	AntiBruteForceRuleName: pulumi.String("string"),
    	FailCount:              pulumi.Int(0),
    	ForbiddenTime:          pulumi.Int(0),
    	Span:                   pulumi.Int(0),
    	UuidLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	DefaultRule: pulumi.Bool(false),
    })
    
    var antiBruteForceRuleResource = new AntiBruteForceRule("antiBruteForceRuleResource", AntiBruteForceRuleArgs.builder()
        .antiBruteForceRuleName("string")
        .failCount(0)
        .forbiddenTime(0)
        .span(0)
        .uuidLists("string")
        .defaultRule(false)
        .build());
    
    anti_brute_force_rule_resource = alicloud.threatdetection.AntiBruteForceRule("antiBruteForceRuleResource",
        anti_brute_force_rule_name="string",
        fail_count=0,
        forbidden_time=0,
        span=0,
        uuid_lists=["string"],
        default_rule=False)
    
    const antiBruteForceRuleResource = new alicloud.threatdetection.AntiBruteForceRule("antiBruteForceRuleResource", {
        antiBruteForceRuleName: "string",
        failCount: 0,
        forbiddenTime: 0,
        span: 0,
        uuidLists: ["string"],
        defaultRule: false,
    });
    
    type: alicloud:threatdetection:AntiBruteForceRule
    properties:
        antiBruteForceRuleName: string
        defaultRule: false
        failCount: 0
        forbiddenTime: 0
        span: 0
        uuidLists:
            - string
    

    AntiBruteForceRule 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 AntiBruteForceRule resource accepts the following input properties:

    AntiBruteForceRuleName string
    The name of the defense rule.
    FailCount int
    FailCount
    ForbiddenTime int
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    Span int
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    UuidLists List<string>
    The UUIDs of the servers to which you want to apply the defense rule.
    DefaultRule bool
    Specifies whether to set the defense rule as the default rule. Valid values:
    AntiBruteForceRuleName string
    The name of the defense rule.
    FailCount int
    FailCount
    ForbiddenTime int
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    Span int
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    UuidLists []string
    The UUIDs of the servers to which you want to apply the defense rule.
    DefaultRule bool
    Specifies whether to set the defense rule as the default rule. Valid values:
    antiBruteForceRuleName String
    The name of the defense rule.
    failCount Integer
    FailCount
    forbiddenTime Integer
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    span Integer
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    uuidLists List<String>
    The UUIDs of the servers to which you want to apply the defense rule.
    defaultRule Boolean
    Specifies whether to set the defense rule as the default rule. Valid values:
    antiBruteForceRuleName string
    The name of the defense rule.
    failCount number
    FailCount
    forbiddenTime number
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    span number
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    uuidLists string[]
    The UUIDs of the servers to which you want to apply the defense rule.
    defaultRule boolean
    Specifies whether to set the defense rule as the default rule. Valid values:
    anti_brute_force_rule_name str
    The name of the defense rule.
    fail_count int
    FailCount
    forbidden_time int
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    span int
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    uuid_lists Sequence[str]
    The UUIDs of the servers to which you want to apply the defense rule.
    default_rule bool
    Specifies whether to set the defense rule as the default rule. Valid values:
    antiBruteForceRuleName String
    The name of the defense rule.
    failCount Number
    FailCount
    forbiddenTime Number
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    span Number
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    uuidLists List<String>
    The UUIDs of the servers to which you want to apply the defense rule.
    defaultRule Boolean
    Specifies whether to set the defense rule as the default rule. Valid values:

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AntiBruteForceRule Resource

    Get an existing AntiBruteForceRule 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?: AntiBruteForceRuleState, opts?: CustomResourceOptions): AntiBruteForceRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            anti_brute_force_rule_name: Optional[str] = None,
            default_rule: Optional[bool] = None,
            fail_count: Optional[int] = None,
            forbidden_time: Optional[int] = None,
            span: Optional[int] = None,
            uuid_lists: Optional[Sequence[str]] = None) -> AntiBruteForceRule
    func GetAntiBruteForceRule(ctx *Context, name string, id IDInput, state *AntiBruteForceRuleState, opts ...ResourceOption) (*AntiBruteForceRule, error)
    public static AntiBruteForceRule Get(string name, Input<string> id, AntiBruteForceRuleState? state, CustomResourceOptions? opts = null)
    public static AntiBruteForceRule get(String name, Output<String> id, AntiBruteForceRuleState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:threatdetection:AntiBruteForceRule    get:      id: ${id}
    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:
    AntiBruteForceRuleName string
    The name of the defense rule.
    DefaultRule bool
    Specifies whether to set the defense rule as the default rule. Valid values:
    FailCount int
    FailCount
    ForbiddenTime int
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    Span int
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    UuidLists List<string>
    The UUIDs of the servers to which you want to apply the defense rule.
    AntiBruteForceRuleName string
    The name of the defense rule.
    DefaultRule bool
    Specifies whether to set the defense rule as the default rule. Valid values:
    FailCount int
    FailCount
    ForbiddenTime int
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    Span int
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    UuidLists []string
    The UUIDs of the servers to which you want to apply the defense rule.
    antiBruteForceRuleName String
    The name of the defense rule.
    defaultRule Boolean
    Specifies whether to set the defense rule as the default rule. Valid values:
    failCount Integer
    FailCount
    forbiddenTime Integer
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    span Integer
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    uuidLists List<String>
    The UUIDs of the servers to which you want to apply the defense rule.
    antiBruteForceRuleName string
    The name of the defense rule.
    defaultRule boolean
    Specifies whether to set the defense rule as the default rule. Valid values:
    failCount number
    FailCount
    forbiddenTime number
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    span number
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    uuidLists string[]
    The UUIDs of the servers to which you want to apply the defense rule.
    anti_brute_force_rule_name str
    The name of the defense rule.
    default_rule bool
    Specifies whether to set the defense rule as the default rule. Valid values:
    fail_count int
    FailCount
    forbidden_time int
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    span int
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    uuid_lists Sequence[str]
    The UUIDs of the servers to which you want to apply the defense rule.
    antiBruteForceRuleName String
    The name of the defense rule.
    defaultRule Boolean
    Specifies whether to set the defense rule as the default rule. Valid values:
    failCount Number
    FailCount
    forbiddenTime Number
    The period of time during which logons from an account are not allowed. Unit: minutes. Valid values:
    span Number
    The maximum period of time during which failed logon attempts from an account can occur. Unit: minutes. Valid values:
    uuidLists List<String>
    The UUIDs of the servers to which you want to apply the defense rule.

    Import

    Threat Detection Anti Brute Force Rule can be imported using the id, e.g.

    $ pulumi import alicloud:threatdetection/antiBruteForceRule:AntiBruteForceRule 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.76.0 published on Tuesday, Apr 8, 2025 by Pulumi