ibm.getCisRulesets
Explore with Pulumi AI
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 theruleset_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:
- Cis
Id string - The ID of the CIS service instance.
- Domain
Id 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
- Ruleset
Id 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 string - The ID of the CIS service instance.
- Domain
Id 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
- Ruleset
Id 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 String - The ID of the CIS service instance.
- domain
Id 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
- ruleset
Id 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 string - The ID of the CIS service instance.
- domain
Id 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
- ruleset
Id 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.
- cis
Id String - The ID of the CIS service instance.
- domain
Id 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
- ruleset
Id 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:
- Cis
Id string - Id string
- Rulesets
List<Get
Cis Rulesets Ruleset> - Rulesets
Lists List<GetCis Rulesets Rulesets List> - Domain
Id string - Ruleset
Id string
- Cis
Id string - Id string
- Rulesets
[]Get
Cis Rulesets Ruleset - Rulesets
Lists []GetCis Rulesets Rulesets List - Domain
Id string - Ruleset
Id string
- cis
Id String - id String
- rulesets
List<Get
Cis Rulesets Ruleset> - rulesets
Lists List<GetCis Rulesets Rulesets List> - domain
Id String - ruleset
Id String
- cis
Id string - id string
- rulesets
Get
Cis Rulesets Ruleset[] - rulesets
Lists GetCis Rulesets Rulesets List[] - domain
Id string - ruleset
Id string
- cis
Id String - id String
- rulesets List<Property Map>
- rulesets
Lists List<Property Map> - domain
Id String - ruleset
Id String
Supporting Types
GetCisRulesetsRuleset
- Description string
- Kind string
- Last
Updated string - Name string
- Phase string
- Rules
List<Get
Cis Rulesets Ruleset Rule> - Ruleset
Id 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
- Last
Updated string - Name string
- Phase string
- Rules
[]Get
Cis Rulesets Ruleset Rule - Ruleset
Id 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
- last
Updated String - name String
- phase String
- rules
List<Get
Cis Rulesets Ruleset Rule> - ruleset
Id 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
- last
Updated string - name string
- phase string
- rules
Get
Cis Rulesets Ruleset Rule[] - ruleset
Id 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[Get
Cis Rulesets Ruleset Rule] - 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
- last
Updated String - name String
- phase String
- rules List<Property Map>
- ruleset
Id 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
- Action
Parameters List<GetCis Rulesets Ruleset Rule Action Parameter> - Categories List<string>
- Description string
- Enabled bool
- Expression string
- Id string
- Last
Updated stringAt - Logging Dictionary<string, bool>
- Ref string
- Version string
- Action string
- Action
Parameters []GetCis Rulesets Ruleset Rule Action Parameter - Categories []string
- Description string
- Enabled bool
- Expression string
- Id string
- Last
Updated stringAt - Logging map[string]bool
- Ref string
- Version string
- action String
- action
Parameters List<GetCis Rulesets Ruleset Rule Action Parameter> - categories List<String>
- description String
- enabled Boolean
- expression String
- id String
- last
Updated StringAt - logging Map<String,Boolean>
- ref String
- version String
- action string
- action
Parameters GetCis Rulesets Ruleset Rule Action Parameter[] - categories string[]
- description string
- enabled boolean
- expression string
- id string
- last
Updated stringAt - logging {[key: string]: boolean}
- ref string
- version string
- action str
- action_
parameters Sequence[GetCis Rulesets Ruleset Rule Action Parameter] - categories Sequence[str]
- description str
- enabled bool
- expression str
- id str
- last_
updated_ strat - logging Mapping[str, bool]
- ref str
- version str
- action String
- action
Parameters List<Property Map> - categories List<String>
- description String
- enabled Boolean
- expression String
- id String
- last
Updated StringAt - logging Map<Boolean>
- ref String
- version String
GetCisRulesetsRulesetRuleActionParameter
- id String
- overrides List<Property Map>
- responses List<Property Map>
- ruleset String
- rulesets List<String>
- version String
GetCisRulesetsRulesetRuleActionParameterOverride
GetCisRulesetsRulesetRuleActionParameterOverrideCategory
GetCisRulesetsRulesetRuleActionParameterOverrideOverrideRule
- Action string
- Enabled bool
- Rule
Id string - Score
Threshold double
- Action string
- Enabled bool
- Rule
Id string - Score
Threshold float64
- action String
- enabled Boolean
- rule
Id String - score
Threshold Double
- action string
- enabled boolean
- rule
Id string - score
Threshold number
- action str
- enabled bool
- rule_
id str - score_
threshold float
- action String
- enabled Boolean
- rule
Id String - score
Threshold Number
GetCisRulesetsRulesetRuleActionParameterResponse
- Content string
- Content
Type string - Status
Code double
- Content string
- Content
Type string - Status
Code float64
- content String
- content
Type String - status
Code Double
- content string
- content
Type string - status
Code number
- content str
- content_
type str - status_
code float
- content String
- content
Type String - status
Code Number
GetCisRulesetsRulesetsList
- Description string
- Kind string
- Last
Updated string - Name string
- Phase string
- Rules
List<Get
Cis Rulesets Rulesets List Rule> - Ruleset
Id 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
- Last
Updated string - Name string
- Phase string
- Rules
[]Get
Cis Rulesets Rulesets List Rule - Ruleset
Id 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
- last
Updated String - name String
- phase String
- rules
List<Get
Cis Rulesets Rulesets List Rule> - ruleset
Id 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
- last
Updated string - name string
- phase string
- rules
Get
Cis Rulesets Rulesets List Rule[] - ruleset
Id 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[Get
Cis Rulesets Rulesets List Rule] - 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
- last
Updated String - name String
- phase String
- rules List<Property Map>
- ruleset
Id 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
- Action
Parameters List<GetCis Rulesets Rulesets List Rule Action Parameter> - Categories List<string>
- Description string
- Enabled bool
- Expression string
- Id string
- Last
Updated stringAt - Logging Dictionary<string, bool>
- Ref string
- Version string
- Action string
- Action
Parameters []GetCis Rulesets Rulesets List Rule Action Parameter - Categories []string
- Description string
- Enabled bool
- Expression string
- Id string
- Last
Updated stringAt - Logging map[string]bool
- Ref string
- Version string
- action String
- action
Parameters List<GetCis Rulesets Rulesets List Rule Action Parameter> - categories List<String>
- description String
- enabled Boolean
- expression String
- id String
- last
Updated StringAt - logging Map<String,Boolean>
- ref String
- version String
- action string
- action
Parameters GetCis Rulesets Rulesets List Rule Action Parameter[] - categories string[]
- description string
- enabled boolean
- expression string
- id string
- last
Updated stringAt - logging {[key: string]: boolean}
- ref string
- version string
- action str
- action_
parameters Sequence[GetCis Rulesets Rulesets List Rule Action Parameter] - categories Sequence[str]
- description str
- enabled bool
- expression str
- id str
- last_
updated_ strat - logging Mapping[str, bool]
- ref str
- version str
- action String
- action
Parameters List<Property Map> - categories List<String>
- description String
- enabled Boolean
- expression String
- id String
- last
Updated StringAt - logging Map<Boolean>
- ref String
- version String
GetCisRulesetsRulesetsListRuleActionParameter
- id String
- overrides List<Property Map>
- responses List<Property Map>
- ruleset String
- rulesets List<String>
- version String
GetCisRulesetsRulesetsListRuleActionParameterOverride
GetCisRulesetsRulesetsListRuleActionParameterOverrideCategory
GetCisRulesetsRulesetsListRuleActionParameterOverrideOverrideRule
- Action string
- Enabled bool
- Rule
Id string - Score
Threshold double
- Action string
- Enabled bool
- Rule
Id string - Score
Threshold float64
- action String
- enabled Boolean
- rule
Id String - score
Threshold Double
- action string
- enabled boolean
- rule
Id string - score
Threshold number
- action str
- enabled bool
- rule_
id str - score_
threshold float
- action String
- enabled Boolean
- rule
Id String - score
Threshold Number
GetCisRulesetsRulesetsListRuleActionParameterResponse
- Content string
- Content
Type string - Status
Code double
- Content string
- Content
Type string - Status
Code float64
- content String
- content
Type String - status
Code Double
- content string
- content
Type string - status
Code number
- content str
- content_
type str - status_
code float
- content String
- content
Type String - status
Code Number
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.