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

ibm.getCisRulesets

Explore with Pulumi AI

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

    Retrieve information about IBM Cloud Internet Services Instance/Zone rulesets data sources. For more information, see [IBM Cloud Internet Services].

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const tests = ibm.getCisRulesets({
        cisId: ibm_cis.instance.id,
        domainId: data.ibm_cis_domain.cis_domain.domain_id,
        rulesetId: data.ibm_cis_ruleset.cis_ruleset.ruleset_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    tests = ibm.get_cis_rulesets(cis_id=ibm_cis["instance"]["id"],
        domain_id=data["ibm_cis_domain"]["cis_domain"]["domain_id"],
        ruleset_id=data["ibm_cis_ruleset"]["cis_ruleset"]["ruleset_id"])
    
    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.GetCisRulesets(ctx, &ibm.GetCisRulesetsArgs{
    			CisId:     ibm_cis.Instance.Id,
    			DomainId:  pulumi.StringRef(data.Ibm_cis_domain.Cis_domain.Domain_id),
    			RulesetId: pulumi.StringRef(data.Ibm_cis_ruleset.Cis_ruleset.Ruleset_id),
    		}, 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 tests = Ibm.GetCisRulesets.Invoke(new()
        {
            CisId = ibm_cis.Instance.Id,
            DomainId = data.Ibm_cis_domain.Cis_domain.Domain_id,
            RulesetId = data.Ibm_cis_ruleset.Cis_ruleset.Ruleset_id,
        });
    
    });
    
    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.GetCisRulesetsArgs;
    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 tests = IbmFunctions.getCisRulesets(GetCisRulesetsArgs.builder()
                .cisId(ibm_cis.instance().id())
                .domainId(data.ibm_cis_domain().cis_domain().domain_id())
                .rulesetId(data.ibm_cis_ruleset().cis_ruleset().ruleset_id())
                .build());
    
        }
    }
    
    variables:
      tests:
        fn::invoke:
          function: ibm:getCisRulesets
          arguments:
            cisId: ${ibm_cis.instance.id}
            domainId: ${data.ibm_cis_domain.cis_domain.domain_id}
            rulesetId: ${data.ibm_cis_ruleset.cis_ruleset.ruleset_id}
    

    Attributes reference

    In addition to the argument reference list, you can access the following attribute references after your data source is created.

    Attribute references when ruleset_id is not provided.

    • result - (List)
      • id - (string) Ruleset ID.
      • description - (string) Description of the ruleset.
      • kind - (string) The kind of the ruleset.
      • Phase - (string) Phase of the ruleset.
      • name - (string) Name of the ruleset.
      • last updated - (string) Last update date of the ruleset.
      • version - (string) Version of the ruleset.

    Extra attribute references when ruleset_id is provided.

    • rules - (List) This list contains the information of rules associated with the ruleset_id.

      Nested scheme of rules

      • id (String). ID of the rule.

      • version (String). Version of the rule.

      • action (String). Action of the rule.

      • description (String) Description of the rule.

      • enable (Boolean) Enables/Disables the rule.

      • expression (String) Expression used by the rule to match the incoming request.

      • ref (String) ID of an referrenced rule.

      • last_updated (String) Date and time of the last update was made on the rule.

      • categories (List) List of categories.

      • logging (Map)

        • enabled (Boolean) Logging is enabled or not.
      • action_parameters (List) Action Parameters of the rule.

        Nested scheme of action_parameters

        • id (String) ID of the managed ruleset to be deployed.

        • overrides (List) Provides the parameters which are overridden.

          Nested scheme of overrides

          • action (String) Action of the rule. Examples: log, block, skip.

          • enabled (Boolean) Enables/Disables the rule.

          • sensitivity_level (String) Defines the sensitivity level of the rule.

          • rules (Optional, List) List of details of the managed rules which are overridden.

            Nested scheme of rules

            • id (String) ID of the rule.
            • enabled (Boolean) Enables/Disables the rule.
            • action (String) Action of the rule.
            • sensitivity_level (String) Defines the sensitivity level of the rule.
          • categories (List)

            Nested scheme of categories

            • category (String) Category of the rule.
            • enabled (Boolean) Enables/Disables the rule.
            • action (String) Action of the rule.
        • version (String) Latest version.

        • ruleset (String) ID of the ruleset.

        • rulesets (List) IDs of the rulesets.

        • response (Map) Custom response from the API.

          • content (String) Content of the response.
          • content_type (string) Content type of the response.
          • status_code (Int) Status code returned by the API.

    Using getCisRulesets

    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 getCisRulesets(args: GetCisRulesetsArgs, opts?: InvokeOptions): Promise<GetCisRulesetsResult>
    function getCisRulesetsOutput(args: GetCisRulesetsOutputArgs, opts?: InvokeOptions): Output<GetCisRulesetsResult>
    def get_cis_rulesets(cis_id: Optional[str] = None,
                         domain_id: Optional[str] = None,
                         id: Optional[str] = None,
                         ruleset_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCisRulesetsResult
    def get_cis_rulesets_output(cis_id: Optional[pulumi.Input[str]] = None,
                         domain_id: Optional[pulumi.Input[str]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         ruleset_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCisRulesetsResult]
    func GetCisRulesets(ctx *Context, args *GetCisRulesetsArgs, opts ...InvokeOption) (*GetCisRulesetsResult, error)
    func GetCisRulesetsOutput(ctx *Context, args *GetCisRulesetsOutputArgs, opts ...InvokeOption) GetCisRulesetsResultOutput

    > Note: This function is named GetCisRulesets in the Go SDK.

    public static class GetCisRulesets 
    {
        public static Task<GetCisRulesetsResult> InvokeAsync(GetCisRulesetsArgs args, InvokeOptions? opts = null)
        public static Output<GetCisRulesetsResult> Invoke(GetCisRulesetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCisRulesetsResult> getCisRulesets(GetCisRulesetsArgs args, InvokeOptions options)
    public static Output<GetCisRulesetsResult> getCisRulesets(GetCisRulesetsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getCisRulesets:getCisRulesets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CisId string
    The ID of the CIS service instance.
    DomainId string
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level, otherwise the request will be made at the instance level.
    Id string
    RulesetId string
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    CisId string
    The ID of the CIS service instance.
    DomainId string
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level, otherwise the request will be made at the instance level.
    Id string
    RulesetId string
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    cisId String
    The ID of the CIS service instance.
    domainId String
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level, otherwise the request will be made at the instance level.
    id String
    rulesetId String
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    cisId string
    The ID of the CIS service instance.
    domainId string
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level, otherwise the request will be made at the instance level.
    id string
    rulesetId string
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    cis_id str
    The ID of the CIS service instance.
    domain_id str
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level, otherwise the request will be made at the instance level.
    id str
    ruleset_id str
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    cisId String
    The ID of the CIS service instance.
    domainId String
    The Domain/Zone ID of the CIS service instance. If domain_id is provided the request will be made at the zone/domain level, otherwise the request will be made at the instance level.
    id String
    rulesetId String
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.

    getCisRulesets Result

    The following output properties are available:

    Supporting Types

    GetCisRulesetsRuleset

    Description string
    Kind string
    LastUpdated string
    Name string
    Phase string
    Rules List<GetCisRulesetsRulesetRule>
    RulesetId string
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    Version string
    Description string
    Kind string
    LastUpdated string
    Name string
    Phase string
    Rules []GetCisRulesetsRulesetRule
    RulesetId string
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    Version string
    description String
    kind String
    lastUpdated String
    name String
    phase String
    rules List<GetCisRulesetsRulesetRule>
    rulesetId String
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    version String
    description string
    kind string
    lastUpdated string
    name string
    phase string
    rules GetCisRulesetsRulesetRule[]
    rulesetId string
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    version string
    description str
    kind str
    last_updated str
    name str
    phase str
    rules Sequence[GetCisRulesetsRulesetRule]
    ruleset_id str
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    version str
    description String
    kind String
    lastUpdated String
    name String
    phase String
    rules List<Property Map>
    rulesetId String
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    version String

    GetCisRulesetsRulesetRule

    Action string
    ActionParameters List<GetCisRulesetsRulesetRuleActionParameter>
    Categories List<string>
    Description string
    Enabled bool
    Expression string
    Id string
    LastUpdatedAt string
    Logging Dictionary<string, bool>
    Ref string
    Version string
    action string
    actionParameters GetCisRulesetsRulesetRuleActionParameter[]
    categories string[]
    description string
    enabled boolean
    expression string
    id string
    lastUpdatedAt string
    logging {[key: string]: boolean}
    ref string
    version string
    action String
    actionParameters List<Property Map>
    categories List<String>
    description String
    enabled Boolean
    expression String
    id String
    lastUpdatedAt String
    logging Map<Boolean>
    ref String
    version String

    GetCisRulesetsRulesetRuleActionParameter

    GetCisRulesetsRulesetRuleActionParameterOverride

    GetCisRulesetsRulesetRuleActionParameterOverrideCategory

    Action string
    Category string
    Enabled bool
    Action string
    Category string
    Enabled bool
    action String
    category String
    enabled Boolean
    action string
    category string
    enabled boolean
    action String
    category String
    enabled Boolean

    GetCisRulesetsRulesetRuleActionParameterOverrideOverrideRule

    Action string
    Enabled bool
    RuleId string
    ScoreThreshold double
    Action string
    Enabled bool
    RuleId string
    ScoreThreshold float64
    action String
    enabled Boolean
    ruleId String
    scoreThreshold Double
    action string
    enabled boolean
    ruleId string
    scoreThreshold number
    action String
    enabled Boolean
    ruleId String
    scoreThreshold Number

    GetCisRulesetsRulesetRuleActionParameterResponse

    Content string
    ContentType string
    StatusCode double
    Content string
    ContentType string
    StatusCode float64
    content String
    contentType String
    statusCode Double
    content string
    contentType string
    statusCode number
    content String
    contentType String
    statusCode Number

    GetCisRulesetsRulesetsList

    Description string
    Kind string
    LastUpdated string
    Name string
    Phase string
    Rules List<GetCisRulesetsRulesetsListRule>
    RulesetId string
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    Version string
    Description string
    Kind string
    LastUpdated string
    Name string
    Phase string
    Rules []GetCisRulesetsRulesetsListRule
    RulesetId string
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    Version string
    description String
    kind String
    lastUpdated String
    name String
    phase String
    rules List<GetCisRulesetsRulesetsListRule>
    rulesetId String
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    version String
    description string
    kind string
    lastUpdated string
    name string
    phase string
    rules GetCisRulesetsRulesetsListRule[]
    rulesetId string
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    version string
    description str
    kind str
    last_updated str
    name str
    phase str
    rules Sequence[GetCisRulesetsRulesetsListRule]
    ruleset_id str
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    version str
    description String
    kind String
    lastUpdated String
    name String
    phase String
    rules List<Property Map>
    rulesetId String
    The ID of the ruleset. If ruleset_id is not provided then the request will be made to get the list of the rulesets. That list will not contain the information about the rules of the ruleset. If the ruleset_id is provided then you will get the information of the ruleset and the associated rules.
    version String

    GetCisRulesetsRulesetsListRule

    action String
    actionParameters List<Property Map>
    categories List<String>
    description String
    enabled Boolean
    expression String
    id String
    lastUpdatedAt String
    logging Map<Boolean>
    ref String
    version String

    GetCisRulesetsRulesetsListRuleActionParameter

    GetCisRulesetsRulesetsListRuleActionParameterOverride

    GetCisRulesetsRulesetsListRuleActionParameterOverrideCategory

    Action string
    Category string
    Enabled bool
    Action string
    Category string
    Enabled bool
    action String
    category String
    enabled Boolean
    action string
    category string
    enabled boolean
    action String
    category String
    enabled Boolean

    GetCisRulesetsRulesetsListRuleActionParameterOverrideOverrideRule

    Action string
    Enabled bool
    RuleId string
    ScoreThreshold double
    Action string
    Enabled bool
    RuleId string
    ScoreThreshold float64
    action String
    enabled Boolean
    ruleId String
    scoreThreshold Double
    action string
    enabled boolean
    ruleId string
    scoreThreshold number
    action String
    enabled Boolean
    ruleId String
    scoreThreshold Number

    GetCisRulesetsRulesetsListRuleActionParameterResponse

    Content string
    ContentType string
    StatusCode double
    Content string
    ContentType string
    StatusCode float64
    content String
    contentType String
    statusCode Double
    content string
    contentType string
    statusCode number
    content String
    contentType String
    statusCode Number

    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