1. Registry
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. DataSafe
  6. getSubsettingPolicySubsettingRules
Viewing docs for Oracle Cloud Infrastructure v5.5.0
published on Thursday, Oct 22, 2026 by Pulumi
oci logo oci logo
Viewing docs for Oracle Cloud Infrastructure v5.5.0
published on Thursday, Oct 22, 2026 by Pulumi

    This data source provides the list of Subsetting Policy Subsetting Rules in Oracle Cloud Infrastructure Data Safe service.

    Gets a list of subsetting rules present in the specified subsetting policy and based on the specified query parameters. A subsetting rule is the criteria that tells Data Safe which rows to retain from the selected starting table for a subsetting operation. It is the entry point for the subset. Data Safe uses this rule, along with the propagation setting, to determine the related rows that must also be retained across parent and child tables.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSubsettingPolicySubsettingRules = oci.datasafe.getSubsettingPolicySubsettingRules({
        subsettingPolicyId: testSubsettingPolicy.id,
        objects: subsettingPolicySubsettingRuleObject,
        schemaNames: subsettingPolicySubsettingRuleSchemaName,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_subsetting_policy_subsetting_rules = oci.datasafe.get_subsetting_policy_subsetting_rules(subsetting_policy_id=test_subsetting_policy["id"],
        objects=subsetting_policy_subsetting_rule_object,
        schema_names=subsetting_policy_subsetting_rule_schema_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v5/go/oci/datasafe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := datasafe.GetSubsettingPolicySubsettingRules(ctx, &datasafe.GetSubsettingPolicySubsettingRulesArgs{
    			SubsettingPolicyId: testSubsettingPolicy.Id,
    			Objects:            subsettingPolicySubsettingRuleObject,
    			SchemaNames:        subsettingPolicySubsettingRuleSchemaName,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testSubsettingPolicySubsettingRules = Oci.DataSafe.GetSubsettingPolicySubsettingRules.Invoke(new()
        {
            SubsettingPolicyId = testSubsettingPolicy.Id,
            Objects = subsettingPolicySubsettingRuleObject,
            SchemaNames = subsettingPolicySubsettingRuleSchemaName,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DataSafe.DataSafeFunctions;
    import com.pulumi.oci.DataSafe.inputs.GetSubsettingPolicySubsettingRulesArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 testSubsettingPolicySubsettingRules = DataSafeFunctions.getSubsettingPolicySubsettingRules(GetSubsettingPolicySubsettingRulesArgs.builder()
                .subsettingPolicyId(testSubsettingPolicy.get("id"))
                .objects(subsettingPolicySubsettingRuleObject)
                .schemaNames(subsettingPolicySubsettingRuleSchemaName)
                .build());
    
        }
    }
    
    variables:
      testSubsettingPolicySubsettingRules:
        fn::invoke:
          function: oci:DataSafe:getSubsettingPolicySubsettingRules
          arguments:
            subsettingPolicyId: ${testSubsettingPolicy.id}
            objects: ${subsettingPolicySubsettingRuleObject}
            schemaNames: ${subsettingPolicySubsettingRuleSchemaName}
    
    terraform {
      required_providers {
        oci = {
          source = "pulumi/oci"
        }
      }
    }
    
    data "oci_data_safe_subsetting_policy_subsetting_rules" "testSubsettingPolicySubsettingRules" {
      subsetting_policy_id = testSubsettingPolicy.id
      objects              = subsettingPolicySubsettingRuleObject
      schema_names         = subsettingPolicySubsettingRuleSchemaName
    }
    

    Using getSubsettingPolicySubsettingRules

    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 getSubsettingPolicySubsettingRules(args: GetSubsettingPolicySubsettingRulesArgs, opts?: InvokeOptions): Promise<GetSubsettingPolicySubsettingRulesResult>
    function getSubsettingPolicySubsettingRulesOutput(args: GetSubsettingPolicySubsettingRulesOutputArgs, opts?: InvokeOutputOptions): Output<GetSubsettingPolicySubsettingRulesResult>
    def get_subsetting_policy_subsetting_rules(filters: Optional[Sequence[GetSubsettingPolicySubsettingRulesFilter]] = None,
                                               objects: Optional[Sequence[str]] = None,
                                               schema_names: Optional[Sequence[str]] = None,
                                               subsetting_policy_id: Optional[str] = None,
                                               opts: Optional[InvokeOptions] = None) -> GetSubsettingPolicySubsettingRulesResult
    def get_subsetting_policy_subsetting_rules_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetSubsettingPolicySubsettingRulesFilterArgs]]]] = None,
                                               objects: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                                               schema_names: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                                               subsetting_policy_id: pulumi.Input[Optional[str]] = None,
                                               opts: Optional[InvokeOutputOptions] = None) -> Output[GetSubsettingPolicySubsettingRulesResult]
    func GetSubsettingPolicySubsettingRules(ctx *Context, args *GetSubsettingPolicySubsettingRulesArgs, opts ...InvokeOption) (*GetSubsettingPolicySubsettingRulesResult, error)
    func GetSubsettingPolicySubsettingRulesOutput(ctx *Context, args *GetSubsettingPolicySubsettingRulesOutputArgs, opts ...InvokeOption) GetSubsettingPolicySubsettingRulesResultOutput

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

    public static class GetSubsettingPolicySubsettingRules 
    {
        public static Task<GetSubsettingPolicySubsettingRulesResult> InvokeAsync(GetSubsettingPolicySubsettingRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetSubsettingPolicySubsettingRulesResult> Invoke(GetSubsettingPolicySubsettingRulesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetSubsettingPolicySubsettingRulesResult> Invoke(GetSubsettingPolicySubsettingRulesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetSubsettingPolicySubsettingRulesResult> getSubsettingPolicySubsettingRules(GetSubsettingPolicySubsettingRulesArgs args, InvokeOptions options)
    public static Output<GetSubsettingPolicySubsettingRulesResult> getSubsettingPolicySubsettingRules(GetSubsettingPolicySubsettingRulesArgs args, InvokeOptions options)
    public static Output<GetSubsettingPolicySubsettingRulesResult> getSubsettingPolicySubsettingRules(GetSubsettingPolicySubsettingRulesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: oci:DataSafe/getSubsettingPolicySubsettingRules:getSubsettingPolicySubsettingRules
      arguments:
        # arguments dictionary
    data "oci_data_safe_get_subsetting_policy_subsetting_rules" "name" {
        # arguments
    }

    The following arguments are supported:

    SubsettingPolicyId string
    The OCID of the subsetting policy.
    Filters List<GetSubsettingPolicySubsettingRulesFilter>
    Objects List<string>
    A filter to return only items related to a specific object name.
    SchemaNames List<string>
    A filter to return only items related to specific schema name.
    SubsettingPolicyId string
    The OCID of the subsetting policy.
    Filters []GetSubsettingPolicySubsettingRulesFilter
    Objects []string
    A filter to return only items related to a specific object name.
    SchemaNames []string
    A filter to return only items related to specific schema name.
    subsetting_policy_id string
    The OCID of the subsetting policy.
    filters list(object)
    objects list(string)
    A filter to return only items related to a specific object name.
    schema_names list(string)
    A filter to return only items related to specific schema name.
    subsettingPolicyId String
    The OCID of the subsetting policy.
    filters List<GetSubsettingPolicySubsettingRulesFilter>
    objects List<String>
    A filter to return only items related to a specific object name.
    schemaNames List<String>
    A filter to return only items related to specific schema name.
    subsettingPolicyId string
    The OCID of the subsetting policy.
    filters GetSubsettingPolicySubsettingRulesFilter[]
    objects string[]
    A filter to return only items related to a specific object name.
    schemaNames string[]
    A filter to return only items related to specific schema name.
    subsetting_policy_id str
    The OCID of the subsetting policy.
    filters Sequence[GetSubsettingPolicySubsettingRulesFilter]
    objects Sequence[str]
    A filter to return only items related to a specific object name.
    schema_names Sequence[str]
    A filter to return only items related to specific schema name.
    subsettingPolicyId String
    The OCID of the subsetting policy.
    filters List<Property Map>
    objects List<String>
    A filter to return only items related to a specific object name.
    schemaNames List<String>
    A filter to return only items related to specific schema name.

    getSubsettingPolicySubsettingRules Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    SubsettingPolicyId string
    SubsettingRuleCollections List<GetSubsettingPolicySubsettingRulesSubsettingRuleCollection>
    The list of subsetting_rule_collection.
    Filters List<GetSubsettingPolicySubsettingRulesFilter>
    Objects List<string>
    The name of the specific object (e.g., table) to be subsetted
    SchemaNames List<string>
    The name of the schema containing the specific object to be subsetted
    Id string
    The provider-assigned unique ID for this managed resource.
    SubsettingPolicyId string
    SubsettingRuleCollections []GetSubsettingPolicySubsettingRulesSubsettingRuleCollection
    The list of subsetting_rule_collection.
    Filters []GetSubsettingPolicySubsettingRulesFilter
    Objects []string
    The name of the specific object (e.g., table) to be subsetted
    SchemaNames []string
    The name of the schema containing the specific object to be subsetted
    id string
    The provider-assigned unique ID for this managed resource.
    subsetting_policy_id string
    subsetting_rule_collections list(object)
    The list of subsetting_rule_collection.
    filters list(object)
    objects list(string)
    The name of the specific object (e.g., table) to be subsetted
    schema_names list(string)
    The name of the schema containing the specific object to be subsetted
    id String
    The provider-assigned unique ID for this managed resource.
    subsettingPolicyId String
    subsettingRuleCollections List<GetSubsettingPolicySubsettingRulesSubsettingRuleCollection>
    The list of subsetting_rule_collection.
    filters List<GetSubsettingPolicySubsettingRulesFilter>
    objects List<String>
    The name of the specific object (e.g., table) to be subsetted
    schemaNames List<String>
    The name of the schema containing the specific object to be subsetted
    id string
    The provider-assigned unique ID for this managed resource.
    subsettingPolicyId string
    subsettingRuleCollections GetSubsettingPolicySubsettingRulesSubsettingRuleCollection[]
    The list of subsetting_rule_collection.
    filters GetSubsettingPolicySubsettingRulesFilter[]
    objects string[]
    The name of the specific object (e.g., table) to be subsetted
    schemaNames string[]
    The name of the schema containing the specific object to be subsetted
    id str
    The provider-assigned unique ID for this managed resource.
    subsetting_policy_id str
    subsetting_rule_collections Sequence[GetSubsettingPolicySubsettingRulesSubsettingRuleCollection]
    The list of subsetting_rule_collection.
    filters Sequence[GetSubsettingPolicySubsettingRulesFilter]
    objects Sequence[str]
    The name of the specific object (e.g., table) to be subsetted
    schema_names Sequence[str]
    The name of the schema containing the specific object to be subsetted
    id String
    The provider-assigned unique ID for this managed resource.
    subsettingPolicyId String
    subsettingRuleCollections List<Property Map>
    The list of subsetting_rule_collection.
    filters List<Property Map>
    objects List<String>
    The name of the specific object (e.g., table) to be subsetted
    schemaNames List<String>
    The name of the schema containing the specific object to be subsetted

    Supporting Types

    GetSubsettingPolicySubsettingRulesFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name string
    values list(string)
    regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetSubsettingPolicySubsettingRulesSubsettingRuleCollection

    GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItem

    Description string
    The description of the subset rule
    DisplayName string
    The display name of the subset rule
    Key string
    The unique key that identifies a subsetting rule. The key is numeric and unique within a subsetting policy
    PeerTablesAction string
    Strategy to be applied while processing peer tables
    RelatedTablesPropagation string
    Strategy to be applied while propagating subsetting rule to related tables
    RuleCombinationMode string
    Specifies how this rule combines with other rules. UNION evaluates this rule independently and adds matching rows to the result set. SERIAL applies this rule sequentially to filter rows selected by a compatible preceding rule.
    Scope GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemScope
    The scope of the subset rule
    SubsetRuleEntry GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemSubsetRuleEntry
    The details of the subset rule
    SubsettingPolicyId string
    The OCID of the subsetting policy.
    Description string
    The description of the subset rule
    DisplayName string
    The display name of the subset rule
    Key string
    The unique key that identifies a subsetting rule. The key is numeric and unique within a subsetting policy
    PeerTablesAction string
    Strategy to be applied while processing peer tables
    RelatedTablesPropagation string
    Strategy to be applied while propagating subsetting rule to related tables
    RuleCombinationMode string
    Specifies how this rule combines with other rules. UNION evaluates this rule independently and adds matching rows to the result set. SERIAL applies this rule sequentially to filter rows selected by a compatible preceding rule.
    Scope GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemScope
    The scope of the subset rule
    SubsetRuleEntry GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemSubsetRuleEntry
    The details of the subset rule
    SubsettingPolicyId string
    The OCID of the subsetting policy.
    description string
    The description of the subset rule
    display_name string
    The display name of the subset rule
    key string
    The unique key that identifies a subsetting rule. The key is numeric and unique within a subsetting policy
    peer_tables_action string
    Strategy to be applied while processing peer tables
    related_tables_propagation string
    Strategy to be applied while propagating subsetting rule to related tables
    rule_combination_mode string
    Specifies how this rule combines with other rules. UNION evaluates this rule independently and adds matching rows to the result set. SERIAL applies this rule sequentially to filter rows selected by a compatible preceding rule.
    scope object
    The scope of the subset rule
    subset_rule_entry object
    The details of the subset rule
    subsetting_policy_id string
    The OCID of the subsetting policy.
    description String
    The description of the subset rule
    displayName String
    The display name of the subset rule
    key String
    The unique key that identifies a subsetting rule. The key is numeric and unique within a subsetting policy
    peerTablesAction String
    Strategy to be applied while processing peer tables
    relatedTablesPropagation String
    Strategy to be applied while propagating subsetting rule to related tables
    ruleCombinationMode String
    Specifies how this rule combines with other rules. UNION evaluates this rule independently and adds matching rows to the result set. SERIAL applies this rule sequentially to filter rows selected by a compatible preceding rule.
    scope GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemScope
    The scope of the subset rule
    subsetRuleEntry GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemSubsetRuleEntry
    The details of the subset rule
    subsettingPolicyId String
    The OCID of the subsetting policy.
    description string
    The description of the subset rule
    displayName string
    The display name of the subset rule
    key string
    The unique key that identifies a subsetting rule. The key is numeric and unique within a subsetting policy
    peerTablesAction string
    Strategy to be applied while processing peer tables
    relatedTablesPropagation string
    Strategy to be applied while propagating subsetting rule to related tables
    ruleCombinationMode string
    Specifies how this rule combines with other rules. UNION evaluates this rule independently and adds matching rows to the result set. SERIAL applies this rule sequentially to filter rows selected by a compatible preceding rule.
    scope GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemScope
    The scope of the subset rule
    subsetRuleEntry GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemSubsetRuleEntry
    The details of the subset rule
    subsettingPolicyId string
    The OCID of the subsetting policy.
    description str
    The description of the subset rule
    display_name str
    The display name of the subset rule
    key str
    The unique key that identifies a subsetting rule. The key is numeric and unique within a subsetting policy
    peer_tables_action str
    Strategy to be applied while processing peer tables
    related_tables_propagation str
    Strategy to be applied while propagating subsetting rule to related tables
    rule_combination_mode str
    Specifies how this rule combines with other rules. UNION evaluates this rule independently and adds matching rows to the result set. SERIAL applies this rule sequentially to filter rows selected by a compatible preceding rule.
    scope GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemScope
    The scope of the subset rule
    subset_rule_entry GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemSubsetRuleEntry
    The details of the subset rule
    subsetting_policy_id str
    The OCID of the subsetting policy.
    description String
    The description of the subset rule
    displayName String
    The display name of the subset rule
    key String
    The unique key that identifies a subsetting rule. The key is numeric and unique within a subsetting policy
    peerTablesAction String
    Strategy to be applied while processing peer tables
    relatedTablesPropagation String
    Strategy to be applied while propagating subsetting rule to related tables
    ruleCombinationMode String
    Specifies how this rule combines with other rules. UNION evaluates this rule independently and adds matching rows to the result set. SERIAL applies this rule sequentially to filter rows selected by a compatible preceding rule.
    scope Property Map
    The scope of the subset rule
    subsetRuleEntry Property Map
    The details of the subset rule
    subsettingPolicyId String
    The OCID of the subsetting policy.

    GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemScope

    Object string
    A filter to return only items related to a specific object name.
    SchemaName string
    A filter to return only items related to specific schema name.
    ScopeType string
    Scope of a subsetting rule
    Object string
    A filter to return only items related to a specific object name.
    SchemaName string
    A filter to return only items related to specific schema name.
    ScopeType string
    Scope of a subsetting rule
    object string
    A filter to return only items related to a specific object name.
    schema_name string
    A filter to return only items related to specific schema name.
    scope_type string
    Scope of a subsetting rule
    object String
    A filter to return only items related to a specific object name.
    schemaName String
    A filter to return only items related to specific schema name.
    scopeType String
    Scope of a subsetting rule
    object string
    A filter to return only items related to a specific object name.
    schemaName string
    A filter to return only items related to specific schema name.
    scopeType string
    Scope of a subsetting rule
    object str
    A filter to return only items related to a specific object name.
    schema_name str
    A filter to return only items related to specific schema name.
    scope_type str
    Scope of a subsetting rule
    object String
    A filter to return only items related to a specific object name.
    schemaName String
    A filter to return only items related to specific schema name.
    scopeType String
    Scope of a subsetting rule

    GetSubsettingPolicySubsettingRulesSubsettingRuleCollectionItemSubsetRuleEntry

    Condition string
    The SQL WHERE clause condition used to filter rows for the subset
    PartitionsLists List<string>
    A list of partition names which are to be part of the subset data
    Percent int
    The percentage of rows to retain in the subset (between 0 and 100)
    RuleType string
    type of subset rule
    SubPartitionsLists List<string>
    A list of sub-partition names which are to be part of the subset data. The sub-partition names should have the partition name also, separated by a dot
    Condition string
    The SQL WHERE clause condition used to filter rows for the subset
    PartitionsLists []string
    A list of partition names which are to be part of the subset data
    Percent int
    The percentage of rows to retain in the subset (between 0 and 100)
    RuleType string
    type of subset rule
    SubPartitionsLists []string
    A list of sub-partition names which are to be part of the subset data. The sub-partition names should have the partition name also, separated by a dot
    condition string
    The SQL WHERE clause condition used to filter rows for the subset
    partitions_lists list(string)
    A list of partition names which are to be part of the subset data
    percent number
    The percentage of rows to retain in the subset (between 0 and 100)
    rule_type string
    type of subset rule
    sub_partitions_lists list(string)
    A list of sub-partition names which are to be part of the subset data. The sub-partition names should have the partition name also, separated by a dot
    condition String
    The SQL WHERE clause condition used to filter rows for the subset
    partitionsLists List<String>
    A list of partition names which are to be part of the subset data
    percent Integer
    The percentage of rows to retain in the subset (between 0 and 100)
    ruleType String
    type of subset rule
    subPartitionsLists List<String>
    A list of sub-partition names which are to be part of the subset data. The sub-partition names should have the partition name also, separated by a dot
    condition string
    The SQL WHERE clause condition used to filter rows for the subset
    partitionsLists string[]
    A list of partition names which are to be part of the subset data
    percent number
    The percentage of rows to retain in the subset (between 0 and 100)
    ruleType string
    type of subset rule
    subPartitionsLists string[]
    A list of sub-partition names which are to be part of the subset data. The sub-partition names should have the partition name also, separated by a dot
    condition str
    The SQL WHERE clause condition used to filter rows for the subset
    partitions_lists Sequence[str]
    A list of partition names which are to be part of the subset data
    percent int
    The percentage of rows to retain in the subset (between 0 and 100)
    rule_type str
    type of subset rule
    sub_partitions_lists Sequence[str]
    A list of sub-partition names which are to be part of the subset data. The sub-partition names should have the partition name also, separated by a dot
    condition String
    The SQL WHERE clause condition used to filter rows for the subset
    partitionsLists List<String>
    A list of partition names which are to be part of the subset data
    percent Number
    The percentage of rows to retain in the subset (between 0 and 100)
    ruleType String
    type of subset rule
    subPartitionsLists List<String>
    A list of sub-partition names which are to be part of the subset data. The sub-partition names should have the partition name also, separated by a dot

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo oci logo
    Viewing docs for Oracle Cloud Infrastructure v5.5.0
    published on Thursday, Oct 22, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial