Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.threatdetection.getAntiBruteForceRules
Explore with Pulumi AI
This data source provides Threat Detection Anti Brute Force Rule available to the user.What is Anti Brute Force Rule
NOTE: Available since v1.195.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "example_value";
const defaultAntiBruteForceRule = new alicloud.threatdetection.AntiBruteForceRule("default", {
antiBruteForceRuleName: name,
forbiddenTime: 360,
uuidLists: ["7567806c-4ec5-4597-9543-7c9543381a13"],
failCount: 80,
span: 10,
});
const default = defaultAntiBruteForceRule.id.apply(id => alicloud.threatdetection.getAntiBruteForceRulesOutput({
ids: [id],
nameRegex: defaultAntiBruteForceRule.name,
}));
export const alicloudThreatDetectionAntiBruteForceRuleExampleId = _default.apply(_default => _default.rules?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "example_value"
default_anti_brute_force_rule = alicloud.threatdetection.AntiBruteForceRule("default",
anti_brute_force_rule_name=name,
forbidden_time=360,
uuid_lists=["7567806c-4ec5-4597-9543-7c9543381a13"],
fail_count=80,
span=10)
default = default_anti_brute_force_rule.id.apply(lambda id: alicloud.threatdetection.get_anti_brute_force_rules_output(ids=[id],
name_regex=default_anti_brute_force_rule.name))
pulumi.export("alicloudThreatDetectionAntiBruteForceRuleExampleId", default.rules[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/threatdetection"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "example_value";
if param := cfg.Get("name"); param != ""{
name = param
}
defaultAntiBruteForceRule, err := threatdetection.NewAntiBruteForceRule(ctx, "default", &threatdetection.AntiBruteForceRuleArgs{
AntiBruteForceRuleName: pulumi.String(name),
ForbiddenTime: pulumi.Int(360),
UuidLists: pulumi.StringArray{
pulumi.String("7567806c-4ec5-4597-9543-7c9543381a13"),
},
FailCount: pulumi.Int(80),
Span: pulumi.Int(10),
})
if err != nil {
return err
}
_default := defaultAntiBruteForceRule.ID().ApplyT(func(id string) (threatdetection.GetAntiBruteForceRulesResult, error) {
return threatdetection.GetAntiBruteForceRulesOutput(ctx, threatdetection.GetAntiBruteForceRulesOutputArgs{
Ids: []string{
id,
},
NameRegex: defaultAntiBruteForceRule.Name,
}, nil), nil
}).(threatdetection.GetAntiBruteForceRulesResultOutput)
ctx.Export("alicloudThreatDetectionAntiBruteForceRuleExampleId", _default.ApplyT(func(_default threatdetection.GetAntiBruteForceRulesResult) (*string, error) {
return &default.Rules[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "example_value";
var defaultAntiBruteForceRule = new AliCloud.ThreatDetection.AntiBruteForceRule("default", new()
{
AntiBruteForceRuleName = name,
ForbiddenTime = 360,
UuidLists = new[]
{
"7567806c-4ec5-4597-9543-7c9543381a13",
},
FailCount = 80,
Span = 10,
});
var @default = AliCloud.ThreatDetection.GetAntiBruteForceRules.Invoke(new()
{
Ids = new[]
{
defaultAntiBruteForceRule.Id,
},
NameRegex = defaultAntiBruteForceRule.Name,
});
return new Dictionary<string, object?>
{
["alicloudThreatDetectionAntiBruteForceRuleExampleId"] = @default.Apply(@default => @default.Apply(getAntiBruteForceRulesResult => getAntiBruteForceRulesResult.Rules[0]?.Id)),
};
});
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 com.pulumi.alicloud.threatdetection.ThreatdetectionFunctions;
import com.pulumi.alicloud.threatdetection.inputs.GetAntiBruteForceRulesArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("example_value");
var defaultAntiBruteForceRule = new AntiBruteForceRule("defaultAntiBruteForceRule", AntiBruteForceRuleArgs.builder()
.antiBruteForceRuleName(name)
.forbiddenTime(360)
.uuidLists("7567806c-4ec5-4597-9543-7c9543381a13")
.failCount(80)
.span(10)
.build());
final var default = ThreatdetectionFunctions.getAntiBruteForceRules(GetAntiBruteForceRulesArgs.builder()
.ids(defaultAntiBruteForceRule.id())
.nameRegex(defaultAntiBruteForceRule.name())
.build());
ctx.export("alicloudThreatDetectionAntiBruteForceRuleExampleId", default_.applyValue(default_ -> default_.rules()[0].id()));
}
}
configuration:
name:
type: string
default: example_value
resources:
defaultAntiBruteForceRule:
type: alicloud:threatdetection:AntiBruteForceRule
name: default
properties:
antiBruteForceRuleName: ${name}
forbiddenTime: 360
uuidLists:
- 7567806c-4ec5-4597-9543-7c9543381a13
failCount: 80
span: 10
variables:
default:
fn::invoke:
Function: alicloud:threatdetection:getAntiBruteForceRules
Arguments:
ids:
- ${defaultAntiBruteForceRule.id}
nameRegex: ${defaultAntiBruteForceRule.name}
outputs:
alicloudThreatDetectionAntiBruteForceRuleExampleId: ${default.rules[0].id}
Using getAntiBruteForceRules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAntiBruteForceRules(args: GetAntiBruteForceRulesArgs, opts?: InvokeOptions): Promise<GetAntiBruteForceRulesResult>
function getAntiBruteForceRulesOutput(args: GetAntiBruteForceRulesOutputArgs, opts?: InvokeOptions): Output<GetAntiBruteForceRulesResult>
def get_anti_brute_force_rules(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAntiBruteForceRulesResult
def get_anti_brute_force_rules_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAntiBruteForceRulesResult]
func GetAntiBruteForceRules(ctx *Context, args *GetAntiBruteForceRulesArgs, opts ...InvokeOption) (*GetAntiBruteForceRulesResult, error)
func GetAntiBruteForceRulesOutput(ctx *Context, args *GetAntiBruteForceRulesOutputArgs, opts ...InvokeOption) GetAntiBruteForceRulesResultOutput
> Note: This function is named GetAntiBruteForceRules
in the Go SDK.
public static class GetAntiBruteForceRules
{
public static Task<GetAntiBruteForceRulesResult> InvokeAsync(GetAntiBruteForceRulesArgs args, InvokeOptions? opts = null)
public static Output<GetAntiBruteForceRulesResult> Invoke(GetAntiBruteForceRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAntiBruteForceRulesResult> getAntiBruteForceRules(GetAntiBruteForceRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:threatdetection/getAntiBruteForceRules:getAntiBruteForceRules
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Anti-Brute Force Rule IDs.
- Name
Regex string - A regex string to filter results by the name of the defense rule.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids []string
- A list of Anti-Brute Force Rule IDs.
- Name
Regex string - A regex string to filter results by the name of the defense rule.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Anti-Brute Force Rule IDs.
- name
Regex String - A regex string to filter results by the name of the defense rule.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids string[]
- A list of Anti-Brute Force Rule IDs.
- name
Regex string - A regex string to filter results by the name of the defense rule.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids Sequence[str]
- A list of Anti-Brute Force Rule IDs.
- name_
regex str - A regex string to filter results by the name of the defense rule.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Anti-Brute Force Rule IDs.
- name
Regex String - A regex string to filter results by the name of the defense rule.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getAntiBruteForceRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Anti Brute Force Rule IDs.
- Names List<string>
- A list of name of Anti Brute Force Rules.
- Rules
List<Pulumi.
Ali Cloud. Threat Detection. Outputs. Get Anti Brute Force Rules Rule> - A list of Anti Brute Force Rule Entries. Each element contains the following attributes:
- Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Anti Brute Force Rule IDs.
- Names []string
- A list of name of Anti Brute Force Rules.
- Rules
[]Get
Anti Brute Force Rules Rule - A list of Anti Brute Force Rule Entries. Each element contains the following attributes:
- Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Anti Brute Force Rule IDs.
- names List<String>
- A list of name of Anti Brute Force Rules.
- rules
List<Get
Anti Brute Force Rules Rule> - A list of Anti Brute Force Rule Entries. Each element contains the following attributes:
- name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Anti Brute Force Rule IDs.
- names string[]
- A list of name of Anti Brute Force Rules.
- rules
Get
Anti Brute Force Rules Rule[] - A list of Anti Brute Force Rule Entries. Each element contains the following attributes:
- name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Anti Brute Force Rule IDs.
- names Sequence[str]
- A list of name of Anti Brute Force Rules.
- rules
Sequence[Get
Anti Brute Force Rules Rule] - A list of Anti Brute Force Rule Entries. Each element contains the following attributes:
- name_
regex str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Anti Brute Force Rule IDs.
- names List<String>
- A list of name of Anti Brute Force Rules.
- rules List<Property Map>
- A list of Anti Brute Force Rule Entries. Each element contains the following attributes:
- name
Regex String - output
File String
Supporting Types
GetAntiBruteForceRulesRule
- Anti
Brute stringForce Rule Id - The ID of the defense rule.
- Anti
Brute stringForce Rule Name - The name of the defense rule.
- Default
Rule bool - Specifies whether to set the defense rule as the default rule.
- Fail
Count int - The threshold for the number of failed user logins when the brute-force defense rule takes effect.
- Forbidden
Time int - The period of time during which logons from an account are not allowed. Unit: minutes.
- Id string
- The ID of the defense rule.
- Span int
- The period of time during which logon failures from an account are measured. Unit: minutes. If Span is set to 10, the defense rule takes effect when the logon failures measured within 10 minutes reaches the specified threshold. The IP address of attackers cannot be used to log on to the server in the specified period of time.
- Uuid
Lists List<string> - An array consisting of the UUIDs of servers to which the defense rule is applied.
- Anti
Brute stringForce Rule Id - The ID of the defense rule.
- Anti
Brute stringForce Rule Name - The name of the defense rule.
- Default
Rule bool - Specifies whether to set the defense rule as the default rule.
- Fail
Count int - The threshold for the number of failed user logins when the brute-force defense rule takes effect.
- Forbidden
Time int - The period of time during which logons from an account are not allowed. Unit: minutes.
- Id string
- The ID of the defense rule.
- Span int
- The period of time during which logon failures from an account are measured. Unit: minutes. If Span is set to 10, the defense rule takes effect when the logon failures measured within 10 minutes reaches the specified threshold. The IP address of attackers cannot be used to log on to the server in the specified period of time.
- Uuid
Lists []string - An array consisting of the UUIDs of servers to which the defense rule is applied.
- anti
Brute StringForce Rule Id - The ID of the defense rule.
- anti
Brute StringForce Rule Name - The name of the defense rule.
- default
Rule Boolean - Specifies whether to set the defense rule as the default rule.
- fail
Count Integer - The threshold for the number of failed user logins when the brute-force defense rule takes effect.
- forbidden
Time Integer - The period of time during which logons from an account are not allowed. Unit: minutes.
- id String
- The ID of the defense rule.
- span Integer
- The period of time during which logon failures from an account are measured. Unit: minutes. If Span is set to 10, the defense rule takes effect when the logon failures measured within 10 minutes reaches the specified threshold. The IP address of attackers cannot be used to log on to the server in the specified period of time.
- uuid
Lists List<String> - An array consisting of the UUIDs of servers to which the defense rule is applied.
- anti
Brute stringForce Rule Id - The ID of the defense rule.
- anti
Brute stringForce Rule Name - The name of the defense rule.
- default
Rule boolean - Specifies whether to set the defense rule as the default rule.
- fail
Count number - The threshold for the number of failed user logins when the brute-force defense rule takes effect.
- forbidden
Time number - The period of time during which logons from an account are not allowed. Unit: minutes.
- id string
- The ID of the defense rule.
- span number
- The period of time during which logon failures from an account are measured. Unit: minutes. If Span is set to 10, the defense rule takes effect when the logon failures measured within 10 minutes reaches the specified threshold. The IP address of attackers cannot be used to log on to the server in the specified period of time.
- uuid
Lists string[] - An array consisting of the UUIDs of servers to which the defense rule is applied.
- anti_
brute_ strforce_ rule_ id - The ID of the defense rule.
- anti_
brute_ strforce_ rule_ name - The name of the defense rule.
- default_
rule bool - Specifies whether to set the defense rule as the default rule.
- fail_
count int - The threshold for the number of failed user logins when the brute-force defense rule takes effect.
- forbidden_
time int - The period of time during which logons from an account are not allowed. Unit: minutes.
- id str
- The ID of the defense rule.
- span int
- The period of time during which logon failures from an account are measured. Unit: minutes. If Span is set to 10, the defense rule takes effect when the logon failures measured within 10 minutes reaches the specified threshold. The IP address of attackers cannot be used to log on to the server in the specified period of time.
- uuid_
lists Sequence[str] - An array consisting of the UUIDs of servers to which the defense rule is applied.
- anti
Brute StringForce Rule Id - The ID of the defense rule.
- anti
Brute StringForce Rule Name - The name of the defense rule.
- default
Rule Boolean - Specifies whether to set the defense rule as the default rule.
- fail
Count Number - The threshold for the number of failed user logins when the brute-force defense rule takes effect.
- forbidden
Time Number - The period of time during which logons from an account are not allowed. Unit: minutes.
- id String
- The ID of the defense rule.
- span Number
- The period of time during which logon failures from an account are measured. Unit: minutes. If Span is set to 10, the defense rule takes effect when the logon failures measured within 10 minutes reaches the specified threshold. The IP address of attackers cannot be used to log on to the server in the specified period of time.
- uuid
Lists List<String> - An array consisting of the UUIDs of servers to which the defense rule is applied.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.