1. Packages
  2. Ibm Provider
  3. API Docs
  4. getSccReportRule
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getSccReportRule

Explore with Pulumi AI

ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

Retrieve information about a report rule from a read-only data source. Then, you can reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

NOTE: Security Compliance Center is a regional service. Please specify the IBM Cloud Provider attribute region to target another region. Else, exporting the environmental variable IBMCLOUD_SCC_API_ENDPOINT will also override which region is being targeted for all ibm providers(ex. export IBMCLOUD_SCC_API_ENDPOINT=https://eu-es.compliance.cloud.ibm.com).

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const sccReportRule = ibm.getSccReportRule({
    instanceId: "00000000-1111-2222-3333-444444444444",
    reportId: "report_id",
    ruleId: "rule-8d444f8c-fd1d-48de-bcaa-f43732568761",
});
Copy
import pulumi
import pulumi_ibm as ibm

scc_report_rule = ibm.get_scc_report_rule(instance_id="00000000-1111-2222-3333-444444444444",
    report_id="report_id",
    rule_id="rule-8d444f8c-fd1d-48de-bcaa-f43732568761")
Copy
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.GetSccReportRule(ctx, &ibm.GetSccReportRuleArgs{
			InstanceId: "00000000-1111-2222-3333-444444444444",
			ReportId:   "report_id",
			RuleId:     "rule-8d444f8c-fd1d-48de-bcaa-f43732568761",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var sccReportRule = Ibm.GetSccReportRule.Invoke(new()
    {
        InstanceId = "00000000-1111-2222-3333-444444444444",
        ReportId = "report_id",
        RuleId = "rule-8d444f8c-fd1d-48de-bcaa-f43732568761",
    });

});
Copy
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.GetSccReportRuleArgs;
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 sccReportRule = IbmFunctions.getSccReportRule(GetSccReportRuleArgs.builder()
            .instanceId("00000000-1111-2222-3333-444444444444")
            .reportId("report_id")
            .ruleId("rule-8d444f8c-fd1d-48de-bcaa-f43732568761")
            .build());

    }
}
Copy
variables:
  sccReportRule:
    fn::invoke:
      function: ibm:getSccReportRule
      arguments:
        instanceId: 00000000-1111-2222-3333-444444444444
        reportId: report_id
        ruleId: rule-8d444f8c-fd1d-48de-bcaa-f43732568761
Copy

Using getSccReportRule

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 getSccReportRule(args: GetSccReportRuleArgs, opts?: InvokeOptions): Promise<GetSccReportRuleResult>
function getSccReportRuleOutput(args: GetSccReportRuleOutputArgs, opts?: InvokeOptions): Output<GetSccReportRuleResult>
Copy
def get_scc_report_rule(instance_id: Optional[str] = None,
                        report_id: Optional[str] = None,
                        rule_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetSccReportRuleResult
def get_scc_report_rule_output(instance_id: Optional[pulumi.Input[str]] = None,
                        report_id: Optional[pulumi.Input[str]] = None,
                        rule_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetSccReportRuleResult]
Copy
func GetSccReportRule(ctx *Context, args *GetSccReportRuleArgs, opts ...InvokeOption) (*GetSccReportRuleResult, error)
func GetSccReportRuleOutput(ctx *Context, args *GetSccReportRuleOutputArgs, opts ...InvokeOption) GetSccReportRuleResultOutput
Copy

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

public static class GetSccReportRule 
{
    public static Task<GetSccReportRuleResult> InvokeAsync(GetSccReportRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetSccReportRuleResult> Invoke(GetSccReportRuleInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSccReportRuleResult> getSccReportRule(GetSccReportRuleArgs args, InvokeOptions options)
public static Output<GetSccReportRuleResult> getSccReportRule(GetSccReportRuleArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getSccReportRule:getSccReportRule
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

InstanceId This property is required. string
The ID of the SCC instance in a particular region.
ReportId This property is required. string
The ID of the scan that is associated with a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
RuleId This property is required. string
The ID of a rule in a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
InstanceId This property is required. string
The ID of the SCC instance in a particular region.
ReportId This property is required. string
The ID of the scan that is associated with a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
RuleId This property is required. string
The ID of a rule in a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
instanceId This property is required. String
The ID of the SCC instance in a particular region.
reportId This property is required. String
The ID of the scan that is associated with a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
ruleId This property is required. String
The ID of a rule in a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
instanceId This property is required. string
The ID of the SCC instance in a particular region.
reportId This property is required. string
The ID of the scan that is associated with a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
ruleId This property is required. string
The ID of a rule in a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
instance_id This property is required. str
The ID of the SCC instance in a particular region.
report_id This property is required. str
The ID of the scan that is associated with a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
rule_id This property is required. str
The ID of a rule in a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
instanceId This property is required. String
The ID of the SCC instance in a particular region.
reportId This property is required. String
The ID of the scan that is associated with a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.
ruleId This property is required. String
The ID of a rule in a report.

  • Constraints: The maximum length is 128 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9\\-]+$/.

getSccReportRule Result

The following output properties are available:

AccountId string
(String) The rule account ID.
CreatedBy string
(String) The ID of the user who created the rule.
CreatedOn string
(String) The date when the rule was created.
Description string
(String) The rule description.
Id string
(String) The rule ID.
InstanceId string
Labels List<string>
(List) The rule labels.

  • Constraints: The maximum length is 100 items. The minimum length is 0 items.
ReportId string
RuleId string
Type string
(String) The rule type.
UpdatedBy string
(String) The ID of the user who updated the rule.
UpdatedOn string
(String) The date when the rule was updated.
Version string
(String) The rule version.
AccountId string
(String) The rule account ID.
CreatedBy string
(String) The ID of the user who created the rule.
CreatedOn string
(String) The date when the rule was created.
Description string
(String) The rule description.
Id string
(String) The rule ID.
InstanceId string
Labels []string
(List) The rule labels.

  • Constraints: The maximum length is 100 items. The minimum length is 0 items.
ReportId string
RuleId string
Type string
(String) The rule type.
UpdatedBy string
(String) The ID of the user who updated the rule.
UpdatedOn string
(String) The date when the rule was updated.
Version string
(String) The rule version.
accountId String
(String) The rule account ID.
createdBy String
(String) The ID of the user who created the rule.
createdOn String
(String) The date when the rule was created.
description String
(String) The rule description.
id String
(String) The rule ID.
instanceId String
labels List<String>
(List) The rule labels.

  • Constraints: The maximum length is 100 items. The minimum length is 0 items.
reportId String
ruleId String
type String
(String) The rule type.
updatedBy String
(String) The ID of the user who updated the rule.
updatedOn String
(String) The date when the rule was updated.
version String
(String) The rule version.
accountId string
(String) The rule account ID.
createdBy string
(String) The ID of the user who created the rule.
createdOn string
(String) The date when the rule was created.
description string
(String) The rule description.
id string
(String) The rule ID.
instanceId string
labels string[]
(List) The rule labels.

  • Constraints: The maximum length is 100 items. The minimum length is 0 items.
reportId string
ruleId string
type string
(String) The rule type.
updatedBy string
(String) The ID of the user who updated the rule.
updatedOn string
(String) The date when the rule was updated.
version string
(String) The rule version.
account_id str
(String) The rule account ID.
created_by str
(String) The ID of the user who created the rule.
created_on str
(String) The date when the rule was created.
description str
(String) The rule description.
id str
(String) The rule ID.
instance_id str
labels Sequence[str]
(List) The rule labels.

  • Constraints: The maximum length is 100 items. The minimum length is 0 items.
report_id str
rule_id str
type str
(String) The rule type.
updated_by str
(String) The ID of the user who updated the rule.
updated_on str
(String) The date when the rule was updated.
version str
(String) The rule version.
accountId String
(String) The rule account ID.
createdBy String
(String) The ID of the user who created the rule.
createdOn String
(String) The date when the rule was created.
description String
(String) The rule description.
id String
(String) The rule ID.
instanceId String
labels List<String>
(List) The rule labels.

  • Constraints: The maximum length is 100 items. The minimum length is 0 items.
reportId String
ruleId String
type String
(String) The rule type.
updatedBy String
(String) The ID of the user who updated the rule.
updatedOn String
(String) The date when the rule was updated.
version String
(String) The rule version.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud