oci.CloudGuard.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 System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testDataMaskRules = Oci.CloudGuard.GetDataMaskRules.Invoke(new()
{
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CloudGuard.CloudGuardFunctions;
import com.pulumi.oci.CloudGuard.inputs.GetDataMaskRulesArgs;
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 testDataMaskRules = CloudGuardFunctions.getDataMaskRules(GetDataMaskRulesArgs.builder()
.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())
.build());
}
}
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,
});
variables:
testDataMaskRules:
fn::invoke:
Function: oci:CloudGuard:getDataMaskRules
Arguments:
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}
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:
- Compartment
Id string The ID of the compartment in which to list resources.
- Access
Level string Valid values are
RESTRICTED
andACCESSIBLE
. Default isRESTRICTED
. Setting this toACCESSIBLE
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 toRESTRICTED
permissions are checked and no partial results are displayed.- Data
Mask stringRule Status The status of the dataMaskRule.
- Display
Name string A filter to return only resources that match the entire display name given.
- Filters
List<Get
Data Mask Rules Filter> - Iam
Group stringId 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.
- Target
Id string OCID of target
- Target
Type string Type of target
- Compartment
Id string The ID of the compartment in which to list resources.
- Access
Level string Valid values are
RESTRICTED
andACCESSIBLE
. Default isRESTRICTED
. Setting this toACCESSIBLE
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 toRESTRICTED
permissions are checked and no partial results are displayed.- Data
Mask stringRule Status The status of the dataMaskRule.
- Display
Name string A filter to return only resources that match the entire display name given.
- Filters
[]Get
Data Mask Rules Filter - Iam
Group stringId 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.
- Target
Id string OCID of target
- Target
Type string Type of target
- compartment
Id String The ID of the compartment in which to list resources.
- access
Level String Valid values are
RESTRICTED
andACCESSIBLE
. Default isRESTRICTED
. Setting this toACCESSIBLE
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 toRESTRICTED
permissions are checked and no partial results are displayed.- data
Mask StringRule Status The status of the dataMaskRule.
- display
Name String A filter to return only resources that match the entire display name given.
- filters
List<Get
Data Mask Rules Filter> - iam
Group StringId 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.
- target
Id String OCID of target
- target
Type String Type of target
- compartment
Id string The ID of the compartment in which to list resources.
- access
Level string Valid values are
RESTRICTED
andACCESSIBLE
. Default isRESTRICTED
. Setting this toACCESSIBLE
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 toRESTRICTED
permissions are checked and no partial results are displayed.- data
Mask stringRule Status The status of the dataMaskRule.
- display
Name string A filter to return only resources that match the entire display name given.
- filters
Get
Data Mask Rules Filter[] - iam
Group stringId 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.
- target
Id string OCID of target
- target
Type string Type of target
- compartment_
id str The ID of the compartment in which to list resources.
- access_
level str Valid values are
RESTRICTED
andACCESSIBLE
. Default isRESTRICTED
. Setting this toACCESSIBLE
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 toRESTRICTED
permissions are checked and no partial results are displayed.- data_
mask_ strrule_ status The status of the dataMaskRule.
- display_
name str A filter to return only resources that match the entire display name given.
- filters
Get
Data Mask Rules Filter] - iam_
group_ strid 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
- compartment
Id String The ID of the compartment in which to list resources.
- access
Level String Valid values are
RESTRICTED
andACCESSIBLE
. Default isRESTRICTED
. Setting this toACCESSIBLE
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 toRESTRICTED
permissions are checked and no partial results are displayed.- data
Mask StringRule Status The status of the dataMaskRule.
- display
Name String A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- iam
Group StringId 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.
- target
Id String OCID of target
- target
Type String Type of target
getDataMaskRules Result
The following output properties are available:
- Compartment
Id string Compartment Identifier where the resource is created.
- Data
Mask List<GetRule Collections Data Mask Rules Data Mask Rule Collection> The list of data_mask_rule_collection.
- Id string
The provider-assigned unique ID for this managed resource.
- Access
Level string - Data
Mask stringRule Status The status of the dataMaskRule.
- Display
Name string Data Mask Rule Identifier, can be renamed.
- Filters
List<Get
Data Mask Rules Filter> - Iam
Group stringId IAM Group id associated with the data mask rule
- State string
The current state of the DataMaskRule.
- Target
Id string - Target
Type string
- Compartment
Id string Compartment Identifier where the resource is created.
- Data
Mask []GetRule Collections Data Mask Rules Data Mask Rule Collection The list of data_mask_rule_collection.
- Id string
The provider-assigned unique ID for this managed resource.
- Access
Level string - Data
Mask stringRule Status The status of the dataMaskRule.
- Display
Name string Data Mask Rule Identifier, can be renamed.
- Filters
[]Get
Data Mask Rules Filter - Iam
Group stringId IAM Group id associated with the data mask rule
- State string
The current state of the DataMaskRule.
- Target
Id string - Target
Type string
- compartment
Id String Compartment Identifier where the resource is created.
- data
Mask List<GetRule Collections Data Mask Rules Data Mask Rule Collection> The list of data_mask_rule_collection.
- id String
The provider-assigned unique ID for this managed resource.
- access
Level String - data
Mask StringRule Status The status of the dataMaskRule.
- display
Name String Data Mask Rule Identifier, can be renamed.
- filters
List<Get
Data Mask Rules Filter> - iam
Group StringId IAM Group id associated with the data mask rule
- state String
The current state of the DataMaskRule.
- target
Id String - target
Type String
- compartment
Id string Compartment Identifier where the resource is created.
- data
Mask GetRule Collections Data Mask Rules Data Mask Rule Collection[] The list of data_mask_rule_collection.
- id string
The provider-assigned unique ID for this managed resource.
- access
Level string - data
Mask stringRule Status The status of the dataMaskRule.
- display
Name string Data Mask Rule Identifier, can be renamed.
- filters
Get
Data Mask Rules Filter[] - iam
Group stringId IAM Group id associated with the data mask rule
- state string
The current state of the DataMaskRule.
- target
Id string - target
Type string
- compartment_
id str Compartment Identifier where the resource is created.
- data_
mask_ Getrule_ collections Data Mask Rules Data Mask Rule Collection] The list of data_mask_rule_collection.
- id str
The provider-assigned unique ID for this managed resource.
- access_
level str - data_
mask_ strrule_ status The status of the dataMaskRule.
- display_
name str Data Mask Rule Identifier, can be renamed.
- filters
Get
Data Mask Rules Filter] - iam_
group_ strid IAM Group id associated with the data mask rule
- state str
The current state of the DataMaskRule.
- target_
id str - target_
type str
- compartment
Id String Compartment Identifier where the resource is created.
- data
Mask List<Property Map>Rule Collections The list of data_mask_rule_collection.
- id String
The provider-assigned unique ID for this managed resource.
- access
Level String - data
Mask StringRule Status The status of the dataMaskRule.
- display
Name String Data Mask Rule Identifier, can be renamed.
- filters List<Property Map>
- iam
Group StringId IAM Group id associated with the data mask rule
- state String
The current state of the DataMaskRule.
- target
Id String - target
Type String
Supporting Types
GetDataMaskRulesDataMaskRuleCollection
GetDataMaskRulesDataMaskRuleCollectionItem
- Compartment
Id string The ID of the compartment in which to list resources.
- Data
Mask List<string>Categories Data Mask Categories
- Data
Mask stringRule Status The status of the dataMaskRule.
- 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.
- Display
Name string A filter to return only resources that match the entire display name given.
- 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"}
- Iam
Group stringId OCID of iamGroup
- Id string
Unique identifier that is immutable on creation
- Lifecyle
Details 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.
- 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"}
- Target
Selecteds List<GetData Mask Rules Data Mask Rule Collection Item Target Selected> Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.
- Time
Created string The date and time the target was created. Format defined by RFC3339.
- Time
Updated string The date and time the target was updated. Format defined by RFC3339.
- Compartment
Id string The ID of the compartment in which to list resources.
- Data
Mask []stringCategories Data Mask Categories
- Data
Mask stringRule Status The status of the dataMaskRule.
- 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.
- Display
Name string A filter to return only resources that match the entire display name given.
- 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"}
- Iam
Group stringId OCID of iamGroup
- Id string
Unique identifier that is immutable on creation
- Lifecyle
Details 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.
- 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"}
- Target
Selecteds []GetData Mask Rules Data Mask Rule Collection Item Target Selected Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.
- Time
Created string The date and time the target was created. Format defined by RFC3339.
- Time
Updated string The date and time the target was updated. Format defined by RFC3339.
- compartment
Id String The ID of the compartment in which to list resources.
- data
Mask List<String>Categories Data Mask Categories
- data
Mask StringRule Status The status of the dataMaskRule.
- 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.
- display
Name String A filter to return only resources that match the entire display name given.
- 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"}
- iam
Group StringId OCID of iamGroup
- id String
Unique identifier that is immutable on creation
- lifecyle
Details 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.
- 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"}
- target
Selecteds List<GetData Mask Rules Data Mask Rule Collection Item Target Selected> Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.
- time
Created String The date and time the target was created. Format defined by RFC3339.
- time
Updated String The date and time the target was updated. Format defined by RFC3339.
- compartment
Id string The ID of the compartment in which to list resources.
- data
Mask string[]Categories Data Mask Categories
- data
Mask stringRule Status The status of the dataMaskRule.
- {[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.
- display
Name string A filter to return only resources that match the entire display name given.
- {[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"}
- iam
Group stringId OCID of iamGroup
- id string
Unique identifier that is immutable on creation
- lifecyle
Details 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.
- {[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"}
- target
Selecteds GetData Mask Rules Data Mask Rule Collection Item Target Selected[] Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.
- time
Created string The date and time the target was created. Format defined by RFC3339.
- time
Updated 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_ Sequence[str]categories Data Mask Categories
- data_
mask_ strrule_ status The status of the dataMaskRule.
- 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.
- 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_ strid 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.
- 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 GetData Mask Rules Data Mask Rule Collection Item Target Selected] 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.
- compartment
Id String The ID of the compartment in which to list resources.
- data
Mask List<String>Categories Data Mask Categories
- data
Mask StringRule Status The status of the dataMaskRule.
- 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.
- display
Name String A filter to return only resources that match the entire display name given.
- 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"}
- iam
Group StringId OCID of iamGroup
- id String
Unique identifier that is immutable on creation
- lifecyle
Details 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.
- 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"}
- target
Selecteds List<Property Map> Target Selection eg select ALL or select on basis of TargetResourceTypes or TargetIds.
- time
Created String The date and time the target was created. Format defined by RFC3339.
- time
Updated String The date and time the target was updated. Format defined by RFC3339.
GetDataMaskRulesDataMaskRuleCollectionItemTargetSelected
GetDataMaskRulesFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.