ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getCisWafRules
Explore with Pulumi AI
Retrieve information about an existing IBM Cloud Internet Services WAF rules resource. For more information, see CIS rule sets.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const rules = ibm.getCisWafRules({
cisId: data.ibm_cis.cis.id,
domainId: data.ibm_cis_domain.cis_domain.id,
packageId: "1e334934fd7ae32ad705667f8c1057aa",
});
import pulumi
import pulumi_ibm as ibm
rules = ibm.get_cis_waf_rules(cis_id=data["ibm_cis"]["cis"]["id"],
domain_id=data["ibm_cis_domain"]["cis_domain"]["id"],
package_id="1e334934fd7ae32ad705667f8c1057aa")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.GetCisWafRules(ctx, &ibm.GetCisWafRulesArgs{
CisId: data.Ibm_cis.Cis.Id,
DomainId: data.Ibm_cis_domain.Cis_domain.Id,
PackageId: "1e334934fd7ae32ad705667f8c1057aa",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var rules = Ibm.GetCisWafRules.Invoke(new()
{
CisId = data.Ibm_cis.Cis.Id,
DomainId = data.Ibm_cis_domain.Cis_domain.Id,
PackageId = "1e334934fd7ae32ad705667f8c1057aa",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetCisWafRulesArgs;
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 rules = IbmFunctions.getCisWafRules(GetCisWafRulesArgs.builder()
.cisId(data.ibm_cis().cis().id())
.domainId(data.ibm_cis_domain().cis_domain().id())
.packageId("1e334934fd7ae32ad705667f8c1057aa")
.build());
}
}
variables:
rules:
fn::invoke:
function: ibm:getCisWafRules
arguments:
cisId: ${data.ibm_cis.cis.id}
domainId: ${data.ibm_cis_domain.cis_domain.id}
packageId: 1e334934fd7ae32ad705667f8c1057aa
Using getCisWafRules
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 getCisWafRules(args: GetCisWafRulesArgs, opts?: InvokeOptions): Promise<GetCisWafRulesResult>
function getCisWafRulesOutput(args: GetCisWafRulesOutputArgs, opts?: InvokeOptions): Output<GetCisWafRulesResult>
def get_cis_waf_rules(cis_id: Optional[str] = None,
domain_id: Optional[str] = None,
id: Optional[str] = None,
package_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCisWafRulesResult
def get_cis_waf_rules_output(cis_id: Optional[pulumi.Input[str]] = None,
domain_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
package_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCisWafRulesResult]
func GetCisWafRules(ctx *Context, args *GetCisWafRulesArgs, opts ...InvokeOption) (*GetCisWafRulesResult, error)
func GetCisWafRulesOutput(ctx *Context, args *GetCisWafRulesOutputArgs, opts ...InvokeOption) GetCisWafRulesResultOutput
> Note: This function is named GetCisWafRules
in the Go SDK.
public static class GetCisWafRules
{
public static Task<GetCisWafRulesResult> InvokeAsync(GetCisWafRulesArgs args, InvokeOptions? opts = null)
public static Output<GetCisWafRulesResult> Invoke(GetCisWafRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCisWafRulesResult> getCisWafRules(GetCisWafRulesArgs args, InvokeOptions options)
public static Output<GetCisWafRulesResult> getCisWafRules(GetCisWafRulesArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getCisWafRules:getCisWafRules
arguments:
# arguments dictionary
The following arguments are supported:
- Cis
Id string - The ID of the IBM Cloud Internet Services service instance.
- Domain
Id string - The ID of the domain to add the rate limit rule.
- Package
Id string - The ID of WAF rule package.
- Id string
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character.
- Cis
Id string - The ID of the IBM Cloud Internet Services service instance.
- Domain
Id string - The ID of the domain to add the rate limit rule.
- Package
Id string - The ID of WAF rule package.
- Id string
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character.
- cis
Id String - The ID of the IBM Cloud Internet Services service instance.
- domain
Id String - The ID of the domain to add the rate limit rule.
- package
Id String - The ID of WAF rule package.
- id String
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character.
- cis
Id string - The ID of the IBM Cloud Internet Services service instance.
- domain
Id string - The ID of the domain to add the rate limit rule.
- package
Id string - The ID of WAF rule package.
- id string
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character.
- cis_
id str - The ID of the IBM Cloud Internet Services service instance.
- domain_
id str - The ID of the domain to add the rate limit rule.
- package_
id str - The ID of WAF rule package.
- id str
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character.
- cis
Id String - The ID of the IBM Cloud Internet Services service instance.
- domain
Id String - The ID of the domain to add the rate limit rule.
- package
Id String - The ID of WAF rule package.
- id String
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character.
getCisWafRules Result
The following output properties are available:
- cis_
id str - domain_
id str - id str
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character. - package_
id str - (String) The ID of WAF rule package.
- waf_
rules Sequence[GetCis Waf Rules Waf Rule] - (List) The list of WAF rules.
Supporting Types
GetCisWafRulesWafRule
- Allowed
Modes List<string> - (String) The allowed modes for setting the WAF rule mode.
- Description string
- (String) The WAF rule description.
- Groups
List<Get
Cis Waf Rules Waf Rule Group> - (String) The WAF rule group.
- Id string
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character. - Mode string
- (String) The mode setting that can be set only once. Valid values are
on
,off
,default
,disable
,simulate
,block
,challenge
. - Package
Id string - The ID of WAF rule package.
- Priority string
- (String) The WAF rule priority.
- Rule
Id string - (String) The ID of WAF rule package.
- Allowed
Modes []string - (String) The allowed modes for setting the WAF rule mode.
- Description string
- (String) The WAF rule description.
- Groups
[]Get
Cis Waf Rules Waf Rule Group - (String) The WAF rule group.
- Id string
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character. - Mode string
- (String) The mode setting that can be set only once. Valid values are
on
,off
,default
,disable
,simulate
,block
,challenge
. - Package
Id string - The ID of WAF rule package.
- Priority string
- (String) The WAF rule priority.
- Rule
Id string - (String) The ID of WAF rule package.
- allowed
Modes List<String> - (String) The allowed modes for setting the WAF rule mode.
- description String
- (String) The WAF rule description.
- groups
List<Get
Cis Waf Rules Waf Rule Group> - (String) The WAF rule group.
- id String
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character. - mode String
- (String) The mode setting that can be set only once. Valid values are
on
,off
,default
,disable
,simulate
,block
,challenge
. - package
Id String - The ID of WAF rule package.
- priority String
- (String) The WAF rule priority.
- rule
Id String - (String) The ID of WAF rule package.
- allowed
Modes string[] - (String) The allowed modes for setting the WAF rule mode.
- description string
- (String) The WAF rule description.
- groups
Get
Cis Waf Rules Waf Rule Group[] - (String) The WAF rule group.
- id string
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character. - mode string
- (String) The mode setting that can be set only once. Valid values are
on
,off
,default
,disable
,simulate
,block
,challenge
. - package
Id string - The ID of WAF rule package.
- priority string
- (String) The WAF rule priority.
- rule
Id string - (String) The ID of WAF rule package.
- allowed_
modes Sequence[str] - (String) The allowed modes for setting the WAF rule mode.
- description str
- (String) The WAF rule description.
- groups
Sequence[Get
Cis Waf Rules Waf Rule Group] - (String) The WAF rule group.
- id str
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character. - mode str
- (String) The mode setting that can be set only once. Valid values are
on
,off
,default
,disable
,simulate
,block
,challenge
. - package_
id str - The ID of WAF rule package.
- priority str
- (String) The WAF rule priority.
- rule_
id str - (String) The ID of WAF rule package.
- allowed
Modes List<String> - (String) The allowed modes for setting the WAF rule mode.
- description String
- (String) The WAF rule description.
- groups List<Property Map>
- (String) The WAF rule group.
- id String
- (String) It is a combination of
<rule_id>,<package_id>,<domain_id>,<cis_id>
attributes concatenated with:
character. - mode String
- (String) The mode setting that can be set only once. Valid values are
on
,off
,default
,disable
,simulate
,block
,challenge
. - package
Id String - The ID of WAF rule package.
- priority String
- (String) The WAF rule priority.
- rule
Id String - (String) The ID of WAF rule package.
GetCisWafRulesWafRuleGroup
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.