Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getDataMaskRules

This data source provides the list of Data Mask Rules in Oracle Cloud Infrastructure Cloud Guard service.

Returns a list of all Data Mask Rules in the root ‘compartmentId’ passed.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testDataMaskRules = Output.Create(Oci.CloudGuard.GetDataMaskRules.InvokeAsync(new Oci.CloudGuard.GetDataMaskRulesArgs
        {
            CompartmentId = @var.Compartment_id,
            AccessLevel = @var.Data_mask_rule_access_level,
            DataMaskRuleStatus = @var.Data_mask_rule_data_mask_rule_status,
            DisplayName = @var.Data_mask_rule_display_name,
            IamGroupId = oci_identity_group.Test_group.Id,
            State = @var.Data_mask_rule_state,
            TargetId = oci_cloud_guard_target.Test_target.Id,
            TargetType = @var.Data_mask_rule_target_type,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/CloudGuard"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := CloudGuard.GetDataMaskRules(ctx, &cloudguard.GetDataMaskRulesArgs{
			CompartmentId:      _var.Compartment_id,
			AccessLevel:        pulumi.StringRef(_var.Data_mask_rule_access_level),
			DataMaskRuleStatus: pulumi.StringRef(_var.Data_mask_rule_data_mask_rule_status),
			DisplayName:        pulumi.StringRef(_var.Data_mask_rule_display_name),
			IamGroupId:         pulumi.StringRef(oci_identity_group.Test_group.Id),
			State:              pulumi.StringRef(_var.Data_mask_rule_state),
			TargetId:           pulumi.StringRef(oci_cloud_guard_target.Test_target.Id),
			TargetType:         pulumi.StringRef(_var.Data_mask_rule_target_type),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_data_mask_rules = oci.CloudGuard.get_data_mask_rules(compartment_id=var["compartment_id"],
    access_level=var["data_mask_rule_access_level"],
    data_mask_rule_status=var["data_mask_rule_data_mask_rule_status"],
    display_name=var["data_mask_rule_display_name"],
    iam_group_id=oci_identity_group["test_group"]["id"],
    state=var["data_mask_rule_state"],
    target_id=oci_cloud_guard_target["test_target"]["id"],
    target_type=var["data_mask_rule_target_type"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testDataMaskRules = oci.CloudGuard.getDataMaskRules({
    compartmentId: _var.compartment_id,
    accessLevel: _var.data_mask_rule_access_level,
    dataMaskRuleStatus: _var.data_mask_rule_data_mask_rule_status,
    displayName: _var.data_mask_rule_display_name,
    iamGroupId: oci_identity_group.test_group.id,
    state: _var.data_mask_rule_state,
    targetId: oci_cloud_guard_target.test_target.id,
    targetType: _var.data_mask_rule_target_type,
});

Coming soon!

Using getDataMaskRules

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 getDataMaskRules(args: GetDataMaskRulesArgs, opts?: InvokeOptions): Promise<GetDataMaskRulesResult>
function getDataMaskRulesOutput(args: GetDataMaskRulesOutputArgs, opts?: InvokeOptions): Output<GetDataMaskRulesResult>
def get_data_mask_rules(access_level: Optional[str] = None,
                        compartment_id: Optional[str] = None,
                        data_mask_rule_status: Optional[str] = None,
                        display_name: Optional[str] = None,
                        filters: Optional[Sequence[_cloudguard.GetDataMaskRulesFilter]] = None,
                        iam_group_id: Optional[str] = None,
                        state: Optional[str] = None,
                        target_id: Optional[str] = None,
                        target_type: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetDataMaskRulesResult
def get_data_mask_rules_output(access_level: Optional[pulumi.Input[str]] = None,
                        compartment_id: Optional[pulumi.Input[str]] = None,
                        data_mask_rule_status: Optional[pulumi.Input[str]] = None,
                        display_name: Optional[pulumi.Input[str]] = None,
                        filters: Optional[pulumi.Input[Sequence[pulumi.Input[_cloudguard.GetDataMaskRulesFilterArgs]]]] = None,
                        iam_group_id: Optional[pulumi.Input[str]] = None,
                        state: Optional[pulumi.Input[str]] = None,
                        target_id: Optional[pulumi.Input[str]] = None,
                        target_type: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetDataMaskRulesResult]
func GetDataMaskRules(ctx *Context, args *GetDataMaskRulesArgs, opts ...InvokeOption) (*GetDataMaskRulesResult, error)
func GetDataMaskRulesOutput(ctx *Context, args *GetDataMaskRulesOutputArgs, opts ...InvokeOption) GetDataMaskRulesResultOutput

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

public static class GetDataMaskRules 
{
    public static Task<GetDataMaskRulesResult> InvokeAsync(GetDataMaskRulesArgs args, InvokeOptions? opts = null)
    public static Output<GetDataMaskRulesResult> Invoke(GetDataMaskRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDataMaskRulesResult> getDataMaskRules(GetDataMaskRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:CloudGuard/getDataMaskRules:getDataMaskRules
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

The ID of the compartment in which to list resources.

AccessLevel string

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

DataMaskRuleStatus string

The status of the dataMaskRule.

DisplayName string

A filter to return only resources that match the entire display name given.

Filters List<GetDataMaskRulesFilter>
IamGroupId string

OCID of iamGroup

State string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

TargetId string

OCID of target

TargetType string

Type of target

CompartmentId string

The ID of the compartment in which to list resources.

AccessLevel string

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

DataMaskRuleStatus string

The status of the dataMaskRule.

DisplayName string

A filter to return only resources that match the entire display name given.

Filters []GetDataMaskRulesFilter
IamGroupId string

OCID of iamGroup

State string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

TargetId string

OCID of target

TargetType string

Type of target

compartmentId String

The ID of the compartment in which to list resources.

accessLevel String

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

dataMaskRuleStatus String

The status of the dataMaskRule.

displayName String

A filter to return only resources that match the entire display name given.

filters List<GetDataMaskRulesFilter>
iamGroupId String

OCID of iamGroup

state String

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

targetId String

OCID of target

targetType String

Type of target

compartmentId string

The ID of the compartment in which to list resources.

accessLevel string

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

dataMaskRuleStatus string

The status of the dataMaskRule.

displayName string

A filter to return only resources that match the entire display name given.

filters GetDataMaskRulesFilter[]
iamGroupId string

OCID of iamGroup

state string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

targetId string

OCID of target

targetType string

Type of target

compartment_id str

The ID of the compartment in which to list resources.

access_level str

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

data_mask_rule_status str

The status of the dataMaskRule.

display_name str

A filter to return only resources that match the entire display name given.

filters GetDataMaskRulesFilter]
iam_group_id str

OCID of iamGroup

state str

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

target_id str

OCID of target

target_type str

Type of target

compartmentId String

The ID of the compartment in which to list resources.

accessLevel String

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

dataMaskRuleStatus String

The status of the dataMaskRule.

displayName String

A filter to return only resources that match the entire display name given.

filters List<Property Map>
iamGroupId String

OCID of iamGroup

state String

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

targetId String

OCID of target

targetType String

Type of target

getDataMaskRules Result

The following output properties are available:

CompartmentId string

Compartment Identifier where the resource is created

DataMaskRuleCollections List<GetDataMaskRulesDataMaskRuleCollection>

The list of data_mask_rule_collection.

Id string

The provider-assigned unique ID for this managed resource.

AccessLevel string
DataMaskRuleStatus string

The status of the dataMaskRule.

DisplayName string

Data Mask Rule Identifier, can be renamed

Filters List<GetDataMaskRulesFilter>
IamGroupId string

IAM Group id associated with the data mask rule

State string

The current state of the DataMaskRule.

TargetId string
TargetType string
CompartmentId string

Compartment Identifier where the resource is created

DataMaskRuleCollections []GetDataMaskRulesDataMaskRuleCollection

The list of data_mask_rule_collection.

Id string

The provider-assigned unique ID for this managed resource.

AccessLevel string
DataMaskRuleStatus string

The status of the dataMaskRule.

DisplayName string

Data Mask Rule Identifier, can be renamed

Filters []GetDataMaskRulesFilter
IamGroupId string

IAM Group id associated with the data mask rule

State string

The current state of the DataMaskRule.

TargetId string
TargetType string
compartmentId String

Compartment Identifier where the resource is created

dataMaskRuleCollections List<GetDataMaskRulesDataMaskRuleCollection>

The list of data_mask_rule_collection.

id String

The provider-assigned unique ID for this managed resource.

accessLevel String
dataMaskRuleStatus String

The status of the dataMaskRule.

displayName String

Data Mask Rule Identifier, can be renamed

filters List<GetDataMaskRulesFilter>
iamGroupId String

IAM Group id associated with the data mask rule

state String

The current state of the DataMaskRule.

targetId String
targetType String
compartmentId string

Compartment Identifier where the resource is created

dataMaskRuleCollections GetDataMaskRulesDataMaskRuleCollection[]

The list of data_mask_rule_collection.

id string

The provider-assigned unique ID for this managed resource.

accessLevel string
dataMaskRuleStatus string

The status of the dataMaskRule.

displayName string

Data Mask Rule Identifier, can be renamed

filters GetDataMaskRulesFilter[]
iamGroupId string

IAM Group id associated with the data mask rule

state string

The current state of the DataMaskRule.

targetId string
targetType string
compartment_id str

Compartment Identifier where the resource is created

data_mask_rule_collections GetDataMaskRulesDataMaskRuleCollection]

The list of data_mask_rule_collection.

id str

The provider-assigned unique ID for this managed resource.

access_level str
data_mask_rule_status str

The status of the dataMaskRule.

display_name str

Data Mask Rule Identifier, can be renamed

filters GetDataMaskRulesFilter]
iam_group_id str

IAM Group id associated with the data mask rule

state str

The current state of the DataMaskRule.

target_id str
target_type str
compartmentId String

Compartment Identifier where the resource is created

dataMaskRuleCollections List<Property Map>

The list of data_mask_rule_collection.

id String

The provider-assigned unique ID for this managed resource.

accessLevel String
dataMaskRuleStatus String

The status of the dataMaskRule.

displayName String

Data Mask Rule Identifier, can be renamed

filters List<Property Map>
iamGroupId String

IAM Group id associated with the data mask rule

state String

The current state of the DataMaskRule.

targetId String
targetType String

Supporting Types

GetDataMaskRulesDataMaskRuleCollection

GetDataMaskRulesDataMaskRuleCollectionItem

CompartmentId string

The ID of the compartment in which to list resources.

DataMaskCategories List<string>

Data Mask Categories

DataMaskRuleStatus string

The status of the dataMaskRule.

DefinedTags Dictionary<string, object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

The data mask rule description.

DisplayName string

A filter to return only resources that match the entire display name given.

FreeformTags Dictionary<string, object>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

IamGroupId string

OCID of iamGroup

Id string

Unique identifier that is immutable on creation

LifecyleDetails string

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

State string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

SystemTags Dictionary<string, object>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

TargetSelecteds List<GetDataMaskRulesDataMaskRuleCollectionItemTargetSelected>

Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.

TimeCreated string

The date and time the target was created. Format defined by RFC3339.

TimeUpdated string

The date and time the target was updated. Format defined by RFC3339.

CompartmentId string

The ID of the compartment in which to list resources.

DataMaskCategories []string

Data Mask Categories

DataMaskRuleStatus string

The status of the dataMaskRule.

DefinedTags map[string]interface{}

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

The data mask rule description.

DisplayName string

A filter to return only resources that match the entire display name given.

FreeformTags map[string]interface{}

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

IamGroupId string

OCID of iamGroup

Id string

Unique identifier that is immutable on creation

LifecyleDetails string

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

State string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

SystemTags map[string]interface{}

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

TargetSelecteds []GetDataMaskRulesDataMaskRuleCollectionItemTargetSelected

Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.

TimeCreated string

The date and time the target was created. Format defined by RFC3339.

TimeUpdated string

The date and time the target was updated. Format defined by RFC3339.

compartmentId String

The ID of the compartment in which to list resources.

dataMaskCategories List<String>

Data Mask Categories

dataMaskRuleStatus String

The status of the dataMaskRule.

definedTags Map<String,Object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

The data mask rule description.

displayName String

A filter to return only resources that match the entire display name given.

freeformTags Map<String,Object>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

iamGroupId String

OCID of iamGroup

id String

Unique identifier that is immutable on creation

lifecyleDetails String

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

state String

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

systemTags Map<String,Object>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

targetSelecteds List<GetDataMaskRulesDataMaskRuleCollectionItemTargetSelected>

Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.

timeCreated String

The date and time the target was created. Format defined by RFC3339.

timeUpdated String

The date and time the target was updated. Format defined by RFC3339.

compartmentId string

The ID of the compartment in which to list resources.

dataMaskCategories string[]

Data Mask Categories

dataMaskRuleStatus string

The status of the dataMaskRule.

definedTags {[key: string]: any}

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description string

The data mask rule description.

displayName string

A filter to return only resources that match the entire display name given.

freeformTags {[key: string]: any}

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

iamGroupId string

OCID of iamGroup

id string

Unique identifier that is immutable on creation

lifecyleDetails string

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

state string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

systemTags {[key: string]: any}

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

targetSelecteds GetDataMaskRulesDataMaskRuleCollectionItemTargetSelected[]

Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.

timeCreated string

The date and time the target was created. Format defined by RFC3339.

timeUpdated string

The date and time the target was updated. Format defined by RFC3339.

compartment_id str

The ID of the compartment in which to list resources.

data_mask_categories Sequence[str]

Data Mask Categories

data_mask_rule_status str

The status of the dataMaskRule.

defined_tags Mapping[str, Any]

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description str

The data mask rule description.

display_name str

A filter to return only resources that match the entire display name given.

freeform_tags Mapping[str, Any]

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

iam_group_id str

OCID of iamGroup

id str

Unique identifier that is immutable on creation

lifecyle_details str

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

state str

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

system_tags Mapping[str, Any]

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

target_selecteds GetDataMaskRulesDataMaskRuleCollectionItemTargetSelected]

Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.

time_created str

The date and time the target was created. Format defined by RFC3339.

time_updated str

The date and time the target was updated. Format defined by RFC3339.

compartmentId String

The ID of the compartment in which to list resources.

dataMaskCategories List<String>

Data Mask Categories

dataMaskRuleStatus String

The status of the dataMaskRule.

definedTags Map<Any>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

The data mask rule description.

displayName String

A filter to return only resources that match the entire display name given.

freeformTags Map<Any>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

iamGroupId String

OCID of iamGroup

id String

Unique identifier that is immutable on creation

lifecyleDetails String

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

state String

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

systemTags Map<Any>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

targetSelecteds List<Property Map>

Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.

timeCreated String

The date and time the target was created. Format defined by RFC3339.

timeUpdated String

The date and time the target was updated. Format defined by RFC3339.

GetDataMaskRulesDataMaskRuleCollectionItemTargetSelected

Kind string

Target selection.

Values List<string>

Types of Targets

Kind string

Target selection.

Values []string

Types of Targets

kind String

Target selection.

values List<String>

Types of Targets

kind string

Target selection.

values string[]

Types of Targets

kind str

Target selection.

values Sequence[str]

Types of Targets

kind String

Target selection.

values List<String>

Types of Targets

GetDataMaskRulesFilter

Name string
Values List<string>

Types of Targets

Regex bool
Name string
Values []string

Types of Targets

Regex bool
name String
values List<String>

Types of Targets

regex Boolean
name string
values string[]

Types of Targets

regex boolean
name str
values Sequence[str]

Types of Targets

regex bool
name String
values List<String>

Types of Targets

regex Boolean

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.