oci.Waas.getCustomProtectionRules
Explore with Pulumi AI
This data source provides the list of Custom Protection Rules in Oracle Cloud Infrastructure Web Application Acceleration and Security service.
Gets a list of custom protection rules for the specified Web Application Firewall.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testCustomProtectionRules = Oci.Waas.GetCustomProtectionRules.Invoke(new()
{
CompartmentId = @var.Compartment_id,
DisplayNames = @var.Custom_protection_rule_display_names,
Ids = @var.Custom_protection_rule_ids,
States = @var.Custom_protection_rule_states,
TimeCreatedGreaterThanOrEqualTo = @var.Custom_protection_rule_time_created_greater_than_or_equal_to,
TimeCreatedLessThan = @var.Custom_protection_rule_time_created_less_than,
});
});
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Waas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Waas.GetCustomProtectionRules(ctx, &waas.GetCustomProtectionRulesArgs{
CompartmentId: _var.Compartment_id,
DisplayNames: _var.Custom_protection_rule_display_names,
Ids: _var.Custom_protection_rule_ids,
States: _var.Custom_protection_rule_states,
TimeCreatedGreaterThanOrEqualTo: pulumi.StringRef(_var.Custom_protection_rule_time_created_greater_than_or_equal_to),
TimeCreatedLessThan: pulumi.StringRef(_var.Custom_protection_rule_time_created_less_than),
}, nil)
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.oci.Waas.WaasFunctions;
import com.pulumi.oci.Waas.inputs.GetCustomProtectionRulesArgs;
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 testCustomProtectionRules = WaasFunctions.getCustomProtectionRules(GetCustomProtectionRulesArgs.builder()
.compartmentId(var_.compartment_id())
.displayNames(var_.custom_protection_rule_display_names())
.ids(var_.custom_protection_rule_ids())
.states(var_.custom_protection_rule_states())
.timeCreatedGreaterThanOrEqualTo(var_.custom_protection_rule_time_created_greater_than_or_equal_to())
.timeCreatedLessThan(var_.custom_protection_rule_time_created_less_than())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_custom_protection_rules = oci.Waas.get_custom_protection_rules(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
display_names=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
ids=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
states=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
time_created_greater_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
time_created_less_than=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testCustomProtectionRules = oci.Waas.getCustomProtectionRules({
compartmentId: _var.compartment_id,
displayNames: _var.custom_protection_rule_display_names,
ids: _var.custom_protection_rule_ids,
states: _var.custom_protection_rule_states,
timeCreatedGreaterThanOrEqualTo: _var.custom_protection_rule_time_created_greater_than_or_equal_to,
timeCreatedLessThan: _var.custom_protection_rule_time_created_less_than,
});
variables:
testCustomProtectionRules:
fn::invoke:
Function: oci:Waas:getCustomProtectionRules
Arguments:
compartmentId: ${var.compartment_id}
displayNames: ${var.custom_protection_rule_display_names}
ids: ${var.custom_protection_rule_ids}
states: ${var.custom_protection_rule_states}
timeCreatedGreaterThanOrEqualTo: ${var.custom_protection_rule_time_created_greater_than_or_equal_to}
timeCreatedLessThan: ${var.custom_protection_rule_time_created_less_than}
Using getCustomProtectionRules
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 getCustomProtectionRules(args: GetCustomProtectionRulesArgs, opts?: InvokeOptions): Promise<GetCustomProtectionRulesResult>
function getCustomProtectionRulesOutput(args: GetCustomProtectionRulesOutputArgs, opts?: InvokeOptions): Output<GetCustomProtectionRulesResult>
def get_custom_protection_rules(compartment_id: Optional[str] = None,
display_names: Optional[Sequence[str]] = None,
filters: Optional[Sequence[_waas.GetCustomProtectionRulesFilter]] = None,
ids: Optional[Sequence[str]] = None,
states: Optional[Sequence[str]] = None,
time_created_greater_than_or_equal_to: Optional[str] = None,
time_created_less_than: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCustomProtectionRulesResult
def get_custom_protection_rules_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_waas.GetCustomProtectionRulesFilterArgs]]]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
states: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
time_created_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
time_created_less_than: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCustomProtectionRulesResult]
func GetCustomProtectionRules(ctx *Context, args *GetCustomProtectionRulesArgs, opts ...InvokeOption) (*GetCustomProtectionRulesResult, error)
func GetCustomProtectionRulesOutput(ctx *Context, args *GetCustomProtectionRulesOutputArgs, opts ...InvokeOption) GetCustomProtectionRulesResultOutput
> Note: This function is named GetCustomProtectionRules
in the Go SDK.
public static class GetCustomProtectionRules
{
public static Task<GetCustomProtectionRulesResult> InvokeAsync(GetCustomProtectionRulesArgs args, InvokeOptions? opts = null)
public static Output<GetCustomProtectionRulesResult> Invoke(GetCustomProtectionRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCustomProtectionRulesResult> getCustomProtectionRules(GetCustomProtectionRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Waas/getCustomProtectionRules:getCustomProtectionRules
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string The OCID of the compartment. This number is generated when the compartment is created.
- Display
Names List<string> Filter custom protection rules using a list of display names.
- Filters
List<Get
Custom Protection Rules Filter> - Ids List<string>
Filter custom protection rules using a list of custom protection rule OCIDs.
- States List<string>
Filter Custom Protection rules using a list of lifecycle states.
- Time
Created stringGreater Than Or Equal To A filter that matches Custom Protection rules created on or after the specified date-time.
- Time
Created stringLess Than A filter that matches custom protection rules created before the specified date-time.
- Compartment
Id string The OCID of the compartment. This number is generated when the compartment is created.
- Display
Names []string Filter custom protection rules using a list of display names.
- Filters
[]Get
Custom Protection Rules Filter - Ids []string
Filter custom protection rules using a list of custom protection rule OCIDs.
- States []string
Filter Custom Protection rules using a list of lifecycle states.
- Time
Created stringGreater Than Or Equal To A filter that matches Custom Protection rules created on or after the specified date-time.
- Time
Created stringLess Than A filter that matches custom protection rules created before the specified date-time.
- compartment
Id String The OCID of the compartment. This number is generated when the compartment is created.
- display
Names List<String> Filter custom protection rules using a list of display names.
- filters
List<Get
Custom Protection Rules Filter> - ids List<String>
Filter custom protection rules using a list of custom protection rule OCIDs.
- states List<String>
Filter Custom Protection rules using a list of lifecycle states.
- time
Created StringGreater Than Or Equal To A filter that matches Custom Protection rules created on or after the specified date-time.
- time
Created StringLess Than A filter that matches custom protection rules created before the specified date-time.
- compartment
Id string The OCID of the compartment. This number is generated when the compartment is created.
- display
Names string[] Filter custom protection rules using a list of display names.
- filters
Get
Custom Protection Rules Filter[] - ids string[]
Filter custom protection rules using a list of custom protection rule OCIDs.
- states string[]
Filter Custom Protection rules using a list of lifecycle states.
- time
Created stringGreater Than Or Equal To A filter that matches Custom Protection rules created on or after the specified date-time.
- time
Created stringLess Than A filter that matches custom protection rules created before the specified date-time.
- compartment_
id str The OCID of the compartment. This number is generated when the compartment is created.
- display_
names Sequence[str] Filter custom protection rules using a list of display names.
- filters
Get
Custom Protection Rules Filter] - ids Sequence[str]
Filter custom protection rules using a list of custom protection rule OCIDs.
- states Sequence[str]
Filter Custom Protection rules using a list of lifecycle states.
- time_
created_ strgreater_ than_ or_ equal_ to A filter that matches Custom Protection rules created on or after the specified date-time.
- time_
created_ strless_ than A filter that matches custom protection rules created before the specified date-time.
- compartment
Id String The OCID of the compartment. This number is generated when the compartment is created.
- display
Names List<String> Filter custom protection rules using a list of display names.
- filters List<Property Map>
- ids List<String>
Filter custom protection rules using a list of custom protection rule OCIDs.
- states List<String>
Filter Custom Protection rules using a list of lifecycle states.
- time
Created StringGreater Than Or Equal To A filter that matches Custom Protection rules created on or after the specified date-time.
- time
Created StringLess Than A filter that matches custom protection rules created before the specified date-time.
getCustomProtectionRules Result
The following output properties are available:
- Compartment
Id string The OCID of the custom protection rule's compartment.
- Custom
Protection List<GetRules Custom Protection Rules Custom Protection Rule> The list of custom_protection_rules.
- Id string
The provider-assigned unique ID for this managed resource.
- Display
Names List<string> - Filters
List<Get
Custom Protection Rules Filter> - Ids List<string>
- States List<string>
- Time
Created stringGreater Than Or Equal To - Time
Created stringLess Than
- Compartment
Id string The OCID of the custom protection rule's compartment.
- Custom
Protection []GetRules Custom Protection Rules Custom Protection Rule The list of custom_protection_rules.
- Id string
The provider-assigned unique ID for this managed resource.
- Display
Names []string - Filters
[]Get
Custom Protection Rules Filter - Ids []string
- States []string
- Time
Created stringGreater Than Or Equal To - Time
Created stringLess Than
- compartment
Id String The OCID of the custom protection rule's compartment.
- custom
Protection List<GetRules Custom Protection Rules Custom Protection Rule> The list of custom_protection_rules.
- id String
The provider-assigned unique ID for this managed resource.
- display
Names List<String> - filters
List<Get
Custom Protection Rules Filter> - ids List<String>
- states List<String>
- time
Created StringGreater Than Or Equal To - time
Created StringLess Than
- compartment
Id string The OCID of the custom protection rule's compartment.
- custom
Protection GetRules Custom Protection Rules Custom Protection Rule[] The list of custom_protection_rules.
- id string
The provider-assigned unique ID for this managed resource.
- display
Names string[] - filters
Get
Custom Protection Rules Filter[] - ids string[]
- states string[]
- time
Created stringGreater Than Or Equal To - time
Created stringLess Than
- compartment_
id str The OCID of the custom protection rule's compartment.
- custom_
protection_ Getrules Custom Protection Rules Custom Protection Rule] The list of custom_protection_rules.
- id str
The provider-assigned unique ID for this managed resource.
- display_
names Sequence[str] - filters
Get
Custom Protection Rules Filter] - ids Sequence[str]
- states Sequence[str]
- time_
created_ strgreater_ than_ or_ equal_ to - time_
created_ strless_ than
- compartment
Id String The OCID of the custom protection rule's compartment.
- custom
Protection List<Property Map>Rules The list of custom_protection_rules.
- id String
The provider-assigned unique ID for this managed resource.
- display
Names List<String> - filters List<Property Map>
- ids List<String>
- states List<String>
- time
Created StringGreater Than Or Equal To - time
Created StringLess Than
Supporting Types
GetCustomProtectionRulesCustomProtectionRule
- Compartment
Id string The OCID of the compartment. This number is generated when the compartment is created.
- Dictionary<string, object>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
The description of the custom protection rule.
- Display
Name string The user-friendly name of the custom protection rule.
- Dictionary<string, object>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
The OCID of the custom protection rule.
- Mod
Security List<string>Rule Ids The auto-generated ID for the custom protection rule. These IDs are referenced in logs.
- State string
The current lifecycle state of the custom protection rule.
- Template string
The template text of the custom protection rule. All custom protection rules are expressed in ModSecurity Rule Language.
- Time
Created string The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
- Compartment
Id string The OCID of the compartment. This number is generated when the compartment is created.
- map[string]interface{}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
The description of the custom protection rule.
- Display
Name string The user-friendly name of the custom protection rule.
- map[string]interface{}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
The OCID of the custom protection rule.
- Mod
Security []stringRule Ids The auto-generated ID for the custom protection rule. These IDs are referenced in logs.
- State string
The current lifecycle state of the custom protection rule.
- Template string
The template text of the custom protection rule. All custom protection rules are expressed in ModSecurity Rule Language.
- Time
Created string The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
- compartment
Id String The OCID of the compartment. This number is generated when the compartment is created.
- Map<String,Object>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
The description of the custom protection rule.
- display
Name String The user-friendly name of the custom protection rule.
- Map<String,Object>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
The OCID of the custom protection rule.
- mod
Security List<String>Rule Ids The auto-generated ID for the custom protection rule. These IDs are referenced in logs.
- state String
The current lifecycle state of the custom protection rule.
- template String
The template text of the custom protection rule. All custom protection rules are expressed in ModSecurity Rule Language.
- time
Created String The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
- compartment
Id string The OCID of the compartment. This number is generated when the compartment is created.
- {[key: string]: any}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description string
The description of the custom protection rule.
- display
Name string The user-friendly name of the custom protection rule.
- {[key: string]: any}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id string
The OCID of the custom protection rule.
- mod
Security string[]Rule Ids The auto-generated ID for the custom protection rule. These IDs are referenced in logs.
- state string
The current lifecycle state of the custom protection rule.
- template string
The template text of the custom protection rule. All custom protection rules are expressed in ModSecurity Rule Language.
- time
Created string The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
- compartment_
id str The OCID of the compartment. This number is generated when the compartment is created.
- Mapping[str, Any]
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description str
The description of the custom protection rule.
- display_
name str The user-friendly name of the custom protection rule.
- Mapping[str, Any]
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id str
The OCID of the custom protection rule.
- mod_
security_ Sequence[str]rule_ ids The auto-generated ID for the custom protection rule. These IDs are referenced in logs.
- state str
The current lifecycle state of the custom protection rule.
- template str
The template text of the custom protection rule. All custom protection rules are expressed in ModSecurity Rule Language.
- time_
created str The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
- compartment
Id String The OCID of the compartment. This number is generated when the compartment is created.
- Map<Any>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
The description of the custom protection rule.
- display
Name String The user-friendly name of the custom protection rule.
- Map<Any>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
The OCID of the custom protection rule.
- mod
Security List<String>Rule Ids The auto-generated ID for the custom protection rule. These IDs are referenced in logs.
- state String
The current lifecycle state of the custom protection rule.
- template String
The template text of the custom protection rule. All custom protection rules are expressed in ModSecurity Rule Language.
- time
Created String The date and time the protection rule was created, expressed in RFC 3339 timestamp format.
GetCustomProtectionRulesFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.