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

ibm.getCisRulesetRulesByTag

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 rulesets rule by tag 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 test = ibm.getCisRulesetRulesByTag({
        cisId: ibm_cis.instance.id,
        rulesetId: "dcdec3fe0cbe41edac08619503da8de5",
        version: "2",
        rulesetsRuleTag: "wordpress",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test = ibm.get_cis_ruleset_rules_by_tag(cis_id=ibm_cis["instance"]["id"],
        ruleset_id="dcdec3fe0cbe41edac08619503da8de5",
        version="2",
        rulesets_rule_tag="wordpress")
    
    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.GetCisRulesetRulesByTag(ctx, &ibm.GetCisRulesetRulesByTagArgs{
    			CisId:           ibm_cis.Instance.Id,
    			RulesetId:       "dcdec3fe0cbe41edac08619503da8de5",
    			Version:         "2",
    			RulesetsRuleTag: "wordpress",
    		}, 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 test = Ibm.GetCisRulesetRulesByTag.Invoke(new()
        {
            CisId = ibm_cis.Instance.Id,
            RulesetId = "dcdec3fe0cbe41edac08619503da8de5",
            Version = "2",
            RulesetsRuleTag = "wordpress",
        });
    
    });
    
    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.GetCisRulesetRulesByTagArgs;
    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 test = IbmFunctions.getCisRulesetRulesByTag(GetCisRulesetRulesByTagArgs.builder()
                .cisId(ibm_cis.instance().id())
                .rulesetId("dcdec3fe0cbe41edac08619503da8de5")
                .version("2")
                .rulesetsRuleTag("wordpress")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: ibm:getCisRulesetRulesByTag
          arguments:
            cisId: ${ibm_cis.instance.id}
            rulesetId: dcdec3fe0cbe41edac08619503da8de5
            version: '2'
            rulesetsRuleTag: wordpress
    

    Attributes reference

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

    • result - (Map)
      • 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.

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

        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 getCisRulesetRulesByTag

    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 getCisRulesetRulesByTag(args: GetCisRulesetRulesByTagArgs, opts?: InvokeOptions): Promise<GetCisRulesetRulesByTagResult>
    function getCisRulesetRulesByTagOutput(args: GetCisRulesetRulesByTagOutputArgs, opts?: InvokeOptions): Output<GetCisRulesetRulesByTagResult>
    def get_cis_ruleset_rules_by_tag(cis_id: Optional[str] = None,
                                     id: Optional[str] = None,
                                     ruleset_id: Optional[str] = None,
                                     rulesets_rule_tag: Optional[str] = None,
                                     version: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetCisRulesetRulesByTagResult
    def get_cis_ruleset_rules_by_tag_output(cis_id: Optional[pulumi.Input[str]] = None,
                                     id: Optional[pulumi.Input[str]] = None,
                                     ruleset_id: Optional[pulumi.Input[str]] = None,
                                     rulesets_rule_tag: Optional[pulumi.Input[str]] = None,
                                     version: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetCisRulesetRulesByTagResult]
    func GetCisRulesetRulesByTag(ctx *Context, args *GetCisRulesetRulesByTagArgs, opts ...InvokeOption) (*GetCisRulesetRulesByTagResult, error)
    func GetCisRulesetRulesByTagOutput(ctx *Context, args *GetCisRulesetRulesByTagOutputArgs, opts ...InvokeOption) GetCisRulesetRulesByTagResultOutput

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

    public static class GetCisRulesetRulesByTag 
    {
        public static Task<GetCisRulesetRulesByTagResult> InvokeAsync(GetCisRulesetRulesByTagArgs args, InvokeOptions? opts = null)
        public static Output<GetCisRulesetRulesByTagResult> Invoke(GetCisRulesetRulesByTagInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCisRulesetRulesByTagResult> getCisRulesetRulesByTag(GetCisRulesetRulesByTagArgs args, InvokeOptions options)
    public static Output<GetCisRulesetRulesByTagResult> getCisRulesetRulesByTag(GetCisRulesetRulesByTagArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getCisRulesetRulesByTag:getCisRulesetRulesByTag
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CisId string
    The ID of the CIS service instance.
    RulesetId string
    The ID of the ruleset.
    RulesetsRuleTag string
    The tag of the rule.
    Version string
    Version of the ruleset.
    Id string
    CisId string
    The ID of the CIS service instance.
    RulesetId string
    The ID of the ruleset.
    RulesetsRuleTag string
    The tag of the rule.
    Version string
    Version of the ruleset.
    Id string
    cisId String
    The ID of the CIS service instance.
    rulesetId String
    The ID of the ruleset.
    rulesetsRuleTag String
    The tag of the rule.
    version String
    Version of the ruleset.
    id String
    cisId string
    The ID of the CIS service instance.
    rulesetId string
    The ID of the ruleset.
    rulesetsRuleTag string
    The tag of the rule.
    version string
    Version of the ruleset.
    id string
    cis_id str
    The ID of the CIS service instance.
    ruleset_id str
    The ID of the ruleset.
    rulesets_rule_tag str
    The tag of the rule.
    version str
    Version of the ruleset.
    id str
    cisId String
    The ID of the CIS service instance.
    rulesetId String
    The ID of the ruleset.
    rulesetsRuleTag String
    The tag of the rule.
    version String
    Version of the ruleset.
    id String

    getCisRulesetRulesByTag Result

    The following output properties are available:

    Supporting Types

    GetCisRulesetRulesByTagRulesetsList

    Description string
    Kind string
    LastUpdated string
    Name string
    Phase string
    Rules List<GetCisRulesetRulesByTagRulesetsListRule>
    RulesetId string
    The ID of the ruleset.
    Version string
    Version of the ruleset.
    Description string
    Kind string
    LastUpdated string
    Name string
    Phase string
    Rules []GetCisRulesetRulesByTagRulesetsListRule
    RulesetId string
    The ID of the ruleset.
    Version string
    Version of the ruleset.
    description String
    kind String
    lastUpdated String
    name String
    phase String
    rules List<GetCisRulesetRulesByTagRulesetsListRule>
    rulesetId String
    The ID of the ruleset.
    version String
    Version of the ruleset.
    description string
    kind string
    lastUpdated string
    name string
    phase string
    rules GetCisRulesetRulesByTagRulesetsListRule[]
    rulesetId string
    The ID of the ruleset.
    version string
    Version of the ruleset.
    description str
    kind str
    last_updated str
    name str
    phase str
    rules Sequence[GetCisRulesetRulesByTagRulesetsListRule]
    ruleset_id str
    The ID of the ruleset.
    version str
    Version of the ruleset.
    description String
    kind String
    lastUpdated String
    name String
    phase String
    rules List<Property Map>
    rulesetId String
    The ID of the ruleset.
    version String
    Version of the ruleset.

    GetCisRulesetRulesByTagRulesetsListRule

    Action string
    ActionParameters List<GetCisRulesetRulesByTagRulesetsListRuleActionParameter>
    Categories List<string>
    Description string
    Enabled bool
    Expression string
    Id string
    LastUpdatedAt string
    Logging Dictionary<string, bool>
    Ref string
    Version string
    Version of the ruleset.
    Action string
    ActionParameters []GetCisRulesetRulesByTagRulesetsListRuleActionParameter
    Categories []string
    Description string
    Enabled bool
    Expression string
    Id string
    LastUpdatedAt string
    Logging map[string]bool
    Ref string
    Version string
    Version of the ruleset.
    action String
    actionParameters List<GetCisRulesetRulesByTagRulesetsListRuleActionParameter>
    categories List<String>
    description String
    enabled Boolean
    expression String
    id String
    lastUpdatedAt String
    logging Map<String,Boolean>
    ref String
    version String
    Version of the ruleset.
    action string
    actionParameters GetCisRulesetRulesByTagRulesetsListRuleActionParameter[]
    categories string[]
    description string
    enabled boolean
    expression string
    id string
    lastUpdatedAt string
    logging {[key: string]: boolean}
    ref string
    version string
    Version of the ruleset.
    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
    Version of the ruleset.

    GetCisRulesetRulesByTagRulesetsListRuleActionParameter

    id String
    overrides List<Property Map>
    responses List<Property Map>
    ruleset String
    rulesets List<String>
    version String
    Version of the ruleset.

    GetCisRulesetRulesByTagRulesetsListRuleActionParameterOverride

    GetCisRulesetRulesByTagRulesetsListRuleActionParameterOverrideCategory

    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

    GetCisRulesetRulesByTagRulesetsListRuleActionParameterOverrideOverrideRule

    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

    GetCisRulesetRulesByTagRulesetsListRuleActionParameterResponse

    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