1. Packages
  2. Ibm Provider
  3. API Docs
  4. getCisWafRules
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getCisWafRules

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    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:

    CisId string
    The ID of the IBM Cloud Internet Services service instance.
    DomainId string
    The ID of the domain to add the rate limit rule.
    PackageId 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.
    CisId string
    The ID of the IBM Cloud Internet Services service instance.
    DomainId string
    The ID of the domain to add the rate limit rule.
    PackageId 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.
    cisId String
    The ID of the IBM Cloud Internet Services service instance.
    domainId String
    The ID of the domain to add the rate limit rule.
    packageId 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.
    cisId string
    The ID of the IBM Cloud Internet Services service instance.
    domainId string
    The ID of the domain to add the rate limit rule.
    packageId 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.
    cisId String
    The ID of the IBM Cloud Internet Services service instance.
    domainId String
    The ID of the domain to add the rate limit rule.
    packageId 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:

    CisId string
    DomainId string
    Id string
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    PackageId string
    (String) The ID of WAF rule package.
    WafRules List<GetCisWafRulesWafRule>
    (List) The list of WAF rules.
    CisId string
    DomainId string
    Id string
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    PackageId string
    (String) The ID of WAF rule package.
    WafRules []GetCisWafRulesWafRule
    (List) The list of WAF rules.
    cisId String
    domainId String
    id String
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    packageId String
    (String) The ID of WAF rule package.
    wafRules List<GetCisWafRulesWafRule>
    (List) The list of WAF rules.
    cisId string
    domainId string
    id string
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    packageId string
    (String) The ID of WAF rule package.
    wafRules GetCisWafRulesWafRule[]
    (List) The list of WAF rules.
    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[GetCisWafRulesWafRule]
    (List) The list of WAF rules.
    cisId String
    domainId String
    id String
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    packageId String
    (String) The ID of WAF rule package.
    wafRules List<Property Map>
    (List) The list of WAF rules.

    Supporting Types

    GetCisWafRulesWafRule

    AllowedModes List<string>
    (String) The allowed modes for setting the WAF rule mode.
    Description string
    (String) The WAF rule description.
    Groups List<GetCisWafRulesWafRuleGroup>
    (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.
    PackageId string
    The ID of WAF rule package.
    Priority string
    (String) The WAF rule priority.
    RuleId string
    (String) The ID of WAF rule package.
    AllowedModes []string
    (String) The allowed modes for setting the WAF rule mode.
    Description string
    (String) The WAF rule description.
    Groups []GetCisWafRulesWafRuleGroup
    (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.
    PackageId string
    The ID of WAF rule package.
    Priority string
    (String) The WAF rule priority.
    RuleId string
    (String) The ID of WAF rule package.
    allowedModes List<String>
    (String) The allowed modes for setting the WAF rule mode.
    description String
    (String) The WAF rule description.
    groups List<GetCisWafRulesWafRuleGroup>
    (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.
    packageId String
    The ID of WAF rule package.
    priority String
    (String) The WAF rule priority.
    ruleId String
    (String) The ID of WAF rule package.
    allowedModes string[]
    (String) The allowed modes for setting the WAF rule mode.
    description string
    (String) The WAF rule description.
    groups GetCisWafRulesWafRuleGroup[]
    (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.
    packageId string
    The ID of WAF rule package.
    priority string
    (String) The WAF rule priority.
    ruleId 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[GetCisWafRulesWafRuleGroup]
    (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.
    allowedModes 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.
    packageId String
    The ID of WAF rule package.
    priority String
    (String) The WAF rule priority.
    ruleId String
    (String) The ID of WAF rule package.

    GetCisWafRulesWafRuleGroup

    Id string
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    Name string
    (String) The name of the WAF rule group.
    Id string
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    Name string
    (String) The name of the WAF rule group.
    id String
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    name String
    (String) The name of the WAF rule group.
    id string
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    name string
    (String) The name of the WAF rule group.
    id str
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    name str
    (String) The name of the WAF rule group.
    id String
    (String) It is a combination of <rule_id>,<package_id>,<domain_id>,<cis_id> attributes concatenated with : character.
    name String
    (String) The name of the WAF rule group.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud