import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Masking Policy resource in Oracle Cloud Infrastructure Data Safe service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/data-safe/latest/MaskingPolicy * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/datasafe * * Creates a new masking policy and associates it with a sensitive data model or a target database. * * To use a sensitive data model as the source of masking columns, set the columnSource attribute to * SENSITIVE_DATA_MODEL and provide the sensitiveDataModelId attribute. After creating a masking policy, * you can use the AddMaskingColumnsFromSdm operation to automatically add all the columns from * the associated sensitive data model. In this case, the target database associated with the * sensitive data model is used for column and masking format validations. * * You can also create a masking policy without using a sensitive data model. In this case, * you need to associate your masking policy with a target database by setting the columnSource * attribute to TARGET and providing the targetId attribute. The specified target database * is used for column and masking format validations. * * After creating a masking policy, you can use the CreateMaskingColumn or PatchMaskingColumns * operation to manually add columns to the policy. You need to add the parent columns only, * and it automatically adds the child columns (in referential relationship with the parent columns) * from the associated sensitive data model or target database. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testMaskingPolicy = new oci.datasafe.MaskingPolicy("test_masking_policy", { * columnSources: [{ * columnSource: maskingPolicyColumnSourceColumnSource, * sensitiveDataModelId: testSensitiveDataModel.id, * targetId: testTarget.id, * }], * compartmentId: compartmentId, * definedTags: { * "Operations.CostCenter": "42", * }, * description: maskingPolicyDescription, * displayName: maskingPolicyDisplayName, * freeformTags: { * Department: "Finance", * }, * isDropTempTablesEnabled: maskingPolicyIsDropTempTablesEnabled === "true", * isRedoLoggingEnabled: maskingPolicyIsRedoLoggingEnabled === "true", * isRefreshStatsEnabled: maskingPolicyIsRefreshStatsEnabled === "true", * parallelDegree: maskingPolicyParallelDegree, * postMaskingScript: maskingPolicyPostMaskingScript, * preMaskingScript: maskingPolicyPreMaskingScript, * recompile: maskingPolicyRecompile, * }); * ``` * * ## Import * * MaskingPolicies can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:DataSafe/maskingPolicy:MaskingPolicy test_masking_policy "id" * ``` */ export declare class MaskingPolicy extends pulumi.CustomResource { /** * Get an existing MaskingPolicy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: MaskingPolicyState, opts?: pulumi.CustomResourceOptions): MaskingPolicy; /** * Returns true if the given object is an instance of MaskingPolicy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is MaskingPolicy; /** * (Updatable) An optional property when incremented triggers Add Masking Columns From Sdm. Could be set to any integer value. */ readonly addMaskingColumnsFromSdmTrigger: pulumi.Output; /** * Specifies whether target database credentials are required to perform masking with this policy */ readonly areTargetCredentialsRequired: pulumi.Output; /** * (Updatable) Details to associate a column source with a masking policy. */ readonly columnSources: pulumi.Output; /** * (Updatable) The OCID of the compartment where the masking policy should be created. */ readonly compartmentId: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Operations.CostCenter": "42"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) The description of the masking policy. */ readonly description: pulumi.Output; /** * (Updatable) The display name of the masking policy. The name does not have to be unique, and it's changeable. */ readonly displayName: pulumi.Output; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) An optional property when incremented triggers Generate Health Report. Could be set to any integer value. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly generateHealthReportTrigger: pulumi.Output; /** * (Updatable) Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive data values to mask values. By default, these temporary tables are dropped after masking. But, in some cases, you may want to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables must be dropped before the database is available for unprivileged users. */ readonly isDropTempTablesEnabled: pulumi.Output; /** * (Updatable) Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to enable redo logging. By default, masking disables redo logging and flashback logging to purge any original unmasked data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. */ readonly isRedoLoggingEnabled: pulumi.Output; /** * (Updatable) Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics gathering. The masking process gathers statistics on masked database tables after masking completes. */ readonly isRefreshStatsEnabled: pulumi.Output; /** * (Updatable) Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree of parallelism. Parallel execution helps effectively use multiple CPUs and improve masking performance. Refer to the Oracle Database parallel execution framework when choosing an explicit degree of parallelism. */ readonly parallelDegree: pulumi.Output; /** * (Updatable) A post-masking script, which can contain SQL and PL/SQL statements. It's executed after the core masking script generated using the masking policy. It's usually used to perform additional transformation or cleanup work after masking. */ readonly postMaskingScript: pulumi.Output; /** * (Updatable) A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before the core masking script generated using the masking policy. It's usually used to perform any preparation or prerequisite work before masking data. */ readonly preMaskingScript: pulumi.Output; /** * (Updatable) Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree attribute is used. Use the built-in UTL_RECOMP package to recompile any remaining invalid objects after masking completes. */ readonly recompile: pulumi.Output; /** * The current state of the masking policy. */ readonly state: pulumi.Output; /** * The date and time the masking policy was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). */ readonly timeCreated: pulumi.Output; /** * The date and time the masking policy was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339) */ readonly timeUpdated: pulumi.Output; /** * Create a MaskingPolicy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: MaskingPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MaskingPolicy resources. */ export interface MaskingPolicyState { /** * (Updatable) An optional property when incremented triggers Add Masking Columns From Sdm. Could be set to any integer value. */ addMaskingColumnsFromSdmTrigger?: pulumi.Input; /** * Specifies whether target database credentials are required to perform masking with this policy */ areTargetCredentialsRequired?: pulumi.Input; /** * (Updatable) Details to associate a column source with a masking policy. */ columnSources?: pulumi.Input[] | undefined>; /** * (Updatable) The OCID of the compartment where the masking policy should be created. */ compartmentId?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) The description of the masking policy. */ description?: pulumi.Input; /** * (Updatable) The display name of the masking policy. The name does not have to be unique, and it's changeable. */ displayName?: pulumi.Input; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) An optional property when incremented triggers Generate Health Report. Could be set to any integer value. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ generateHealthReportTrigger?: pulumi.Input; /** * (Updatable) Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive data values to mask values. By default, these temporary tables are dropped after masking. But, in some cases, you may want to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables must be dropped before the database is available for unprivileged users. */ isDropTempTablesEnabled?: pulumi.Input; /** * (Updatable) Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to enable redo logging. By default, masking disables redo logging and flashback logging to purge any original unmasked data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. */ isRedoLoggingEnabled?: pulumi.Input; /** * (Updatable) Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics gathering. The masking process gathers statistics on masked database tables after masking completes. */ isRefreshStatsEnabled?: pulumi.Input; /** * (Updatable) Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree of parallelism. Parallel execution helps effectively use multiple CPUs and improve masking performance. Refer to the Oracle Database parallel execution framework when choosing an explicit degree of parallelism. */ parallelDegree?: pulumi.Input; /** * (Updatable) A post-masking script, which can contain SQL and PL/SQL statements. It's executed after the core masking script generated using the masking policy. It's usually used to perform additional transformation or cleanup work after masking. */ postMaskingScript?: pulumi.Input; /** * (Updatable) A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before the core masking script generated using the masking policy. It's usually used to perform any preparation or prerequisite work before masking data. */ preMaskingScript?: pulumi.Input; /** * (Updatable) Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree attribute is used. Use the built-in UTL_RECOMP package to recompile any remaining invalid objects after masking completes. */ recompile?: pulumi.Input; /** * The current state of the masking policy. */ state?: pulumi.Input; /** * The date and time the masking policy was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). */ timeCreated?: pulumi.Input; /** * The date and time the masking policy was last updated, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339) */ timeUpdated?: pulumi.Input; } /** * The set of arguments for constructing a MaskingPolicy resource. */ export interface MaskingPolicyArgs { /** * (Updatable) An optional property when incremented triggers Add Masking Columns From Sdm. Could be set to any integer value. */ addMaskingColumnsFromSdmTrigger?: pulumi.Input; /** * (Updatable) Details to associate a column source with a masking policy. */ columnSources: pulumi.Input[]>; /** * (Updatable) The OCID of the compartment where the masking policy should be created. */ compartmentId: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) The description of the masking policy. */ description?: pulumi.Input; /** * (Updatable) The display name of the masking policy. The name does not have to be unique, and it's changeable. */ displayName?: pulumi.Input; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm) Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) An optional property when incremented triggers Generate Health Report. Could be set to any integer value. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ generateHealthReportTrigger?: pulumi.Input; /** * (Updatable) Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive data values to mask values. By default, these temporary tables are dropped after masking. But, in some cases, you may want to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables must be dropped before the database is available for unprivileged users. */ isDropTempTablesEnabled?: pulumi.Input; /** * (Updatable) Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to enable redo logging. By default, masking disables redo logging and flashback logging to purge any original unmasked data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. */ isRedoLoggingEnabled?: pulumi.Input; /** * (Updatable) Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics gathering. The masking process gathers statistics on masked database tables after masking completes. */ isRefreshStatsEnabled?: pulumi.Input; /** * (Updatable) Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree of parallelism. Parallel execution helps effectively use multiple CPUs and improve masking performance. Refer to the Oracle Database parallel execution framework when choosing an explicit degree of parallelism. */ parallelDegree?: pulumi.Input; /** * (Updatable) A post-masking script, which can contain SQL and PL/SQL statements. It's executed after the core masking script generated using the masking policy. It's usually used to perform additional transformation or cleanup work after masking. */ postMaskingScript?: pulumi.Input; /** * (Updatable) A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before the core masking script generated using the masking policy. It's usually used to perform any preparation or prerequisite work before masking data. */ preMaskingScript?: pulumi.Input; /** * (Updatable) Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree attribute is used. Use the built-in UTL_RECOMP package to recompile any remaining invalid objects after masking completes. */ recompile?: pulumi.Input; } //# sourceMappingURL=maskingPolicy.d.ts.map