1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getAuditPolicies
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.DataSafe.getAuditPolicies

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Audit Policies in Oracle Cloud Infrastructure Data Safe service.

Retrieves a list of all audited targets with their corresponding provisioned audit policies, and their provisioning conditions.

The ListAuditPolicies operation returns only the audit policies in the specified compartmentId. The list does not include any subcompartments of the compartmentId passed.

The parameter accessLevel specifies whether to return only those compartments for which the requestor has INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if Principal doesn’t have access to even one of the child compartments. This is valid only when compartmentIdInSubtree is set to true.

The parameter compartmentIdInSubtree applies when you perform ListAuditPolicies on the compartmentId passed and when it is set to true, the entire hierarchy of compartments can be returned. To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.

Example Usage

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

const testAuditPolicies = oci.DataSafe.getAuditPolicies({
    compartmentId: compartmentId,
    accessLevel: auditPolicyAccessLevel,
    auditPolicyId: testAuditPolicy.id,
    compartmentIdInSubtree: auditPolicyCompartmentIdInSubtree,
    displayName: auditPolicyDisplayName,
    state: auditPolicyState,
    targetId: testTarget.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_audit_policies = oci.DataSafe.get_audit_policies(compartment_id=compartment_id,
    access_level=audit_policy_access_level,
    audit_policy_id=test_audit_policy["id"],
    compartment_id_in_subtree=audit_policy_compartment_id_in_subtree,
    display_name=audit_policy_display_name,
    state=audit_policy_state,
    target_id=test_target["id"])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datasafe.GetAuditPolicies(ctx, &datasafe.GetAuditPoliciesArgs{
			CompartmentId:          compartmentId,
			AccessLevel:            pulumi.StringRef(auditPolicyAccessLevel),
			AuditPolicyId:          pulumi.StringRef(testAuditPolicy.Id),
			CompartmentIdInSubtree: pulumi.BoolRef(auditPolicyCompartmentIdInSubtree),
			DisplayName:            pulumi.StringRef(auditPolicyDisplayName),
			State:                  pulumi.StringRef(auditPolicyState),
			TargetId:               pulumi.StringRef(testTarget.Id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testAuditPolicies = Oci.DataSafe.GetAuditPolicies.Invoke(new()
    {
        CompartmentId = compartmentId,
        AccessLevel = auditPolicyAccessLevel,
        AuditPolicyId = testAuditPolicy.Id,
        CompartmentIdInSubtree = auditPolicyCompartmentIdInSubtree,
        DisplayName = auditPolicyDisplayName,
        State = auditPolicyState,
        TargetId = testTarget.Id,
    });

});
Copy
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.GetAuditPoliciesArgs;
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 testAuditPolicies = DataSafeFunctions.getAuditPolicies(GetAuditPoliciesArgs.builder()
            .compartmentId(compartmentId)
            .accessLevel(auditPolicyAccessLevel)
            .auditPolicyId(testAuditPolicy.id())
            .compartmentIdInSubtree(auditPolicyCompartmentIdInSubtree)
            .displayName(auditPolicyDisplayName)
            .state(auditPolicyState)
            .targetId(testTarget.id())
            .build());

    }
}
Copy
variables:
  testAuditPolicies:
    fn::invoke:
      function: oci:DataSafe:getAuditPolicies
      arguments:
        compartmentId: ${compartmentId}
        accessLevel: ${auditPolicyAccessLevel}
        auditPolicyId: ${testAuditPolicy.id}
        compartmentIdInSubtree: ${auditPolicyCompartmentIdInSubtree}
        displayName: ${auditPolicyDisplayName}
        state: ${auditPolicyState}
        targetId: ${testTarget.id}
Copy

Using getAuditPolicies

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 getAuditPolicies(args: GetAuditPoliciesArgs, opts?: InvokeOptions): Promise<GetAuditPoliciesResult>
function getAuditPoliciesOutput(args: GetAuditPoliciesOutputArgs, opts?: InvokeOptions): Output<GetAuditPoliciesResult>
Copy
def get_audit_policies(access_level: Optional[str] = None,
                       audit_policy_id: Optional[str] = None,
                       compartment_id: Optional[str] = None,
                       compartment_id_in_subtree: Optional[bool] = None,
                       display_name: Optional[str] = None,
                       filters: Optional[Sequence[_datasafe.GetAuditPoliciesFilter]] = None,
                       state: Optional[str] = None,
                       target_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAuditPoliciesResult
def get_audit_policies_output(access_level: Optional[pulumi.Input[str]] = None,
                       audit_policy_id: Optional[pulumi.Input[str]] = None,
                       compartment_id: Optional[pulumi.Input[str]] = None,
                       compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                       display_name: Optional[pulumi.Input[str]] = None,
                       filters: Optional[pulumi.Input[Sequence[pulumi.Input[_datasafe.GetAuditPoliciesFilterArgs]]]] = None,
                       state: Optional[pulumi.Input[str]] = None,
                       target_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAuditPoliciesResult]
Copy
func GetAuditPolicies(ctx *Context, args *GetAuditPoliciesArgs, opts ...InvokeOption) (*GetAuditPoliciesResult, error)
func GetAuditPoliciesOutput(ctx *Context, args *GetAuditPoliciesOutputArgs, opts ...InvokeOption) GetAuditPoliciesResultOutput
Copy

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

public static class GetAuditPolicies 
{
    public static Task<GetAuditPoliciesResult> InvokeAsync(GetAuditPoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetAuditPoliciesResult> Invoke(GetAuditPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAuditPoliciesResult> getAuditPolicies(GetAuditPoliciesArgs args, InvokeOptions options)
public static Output<GetAuditPoliciesResult> getAuditPolicies(GetAuditPoliciesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DataSafe/getAuditPolicies:getAuditPolicies
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
A filter to return only resources that match the specified compartment OCID.
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.
AuditPolicyId string
An optional filter to return only resources that match the specified id.
CompartmentIdInSubtree bool
Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
DisplayName string
A filter to return only resources that match the specified display name.
Filters Changes to this property will trigger replacement. List<GetAuditPoliciesFilter>
State string
The current state of the audit policy.
TargetId string
A filter to return only items related to a specific target OCID.
CompartmentId This property is required. string
A filter to return only resources that match the specified compartment OCID.
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.
AuditPolicyId string
An optional filter to return only resources that match the specified id.
CompartmentIdInSubtree bool
Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
DisplayName string
A filter to return only resources that match the specified display name.
Filters Changes to this property will trigger replacement. []GetAuditPoliciesFilter
State string
The current state of the audit policy.
TargetId string
A filter to return only items related to a specific target OCID.
compartmentId This property is required. String
A filter to return only resources that match the specified compartment OCID.
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.
auditPolicyId String
An optional filter to return only resources that match the specified id.
compartmentIdInSubtree Boolean
Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
displayName String
A filter to return only resources that match the specified display name.
filters Changes to this property will trigger replacement. List<GetAuditPoliciesFilter>
state String
The current state of the audit policy.
targetId String
A filter to return only items related to a specific target OCID.
compartmentId This property is required. string
A filter to return only resources that match the specified compartment OCID.
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.
auditPolicyId string
An optional filter to return only resources that match the specified id.
compartmentIdInSubtree boolean
Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
displayName string
A filter to return only resources that match the specified display name.
filters Changes to this property will trigger replacement. GetAuditPoliciesFilter[]
state string
The current state of the audit policy.
targetId string
A filter to return only items related to a specific target OCID.
compartment_id This property is required. str
A filter to return only resources that match the specified compartment OCID.
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.
audit_policy_id str
An optional filter to return only resources that match the specified id.
compartment_id_in_subtree bool
Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
display_name str
A filter to return only resources that match the specified display name.
filters Changes to this property will trigger replacement. Sequence[datasafe.GetAuditPoliciesFilter]
state str
The current state of the audit policy.
target_id str
A filter to return only items related to a specific target OCID.
compartmentId This property is required. String
A filter to return only resources that match the specified compartment OCID.
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.
auditPolicyId String
An optional filter to return only resources that match the specified id.
compartmentIdInSubtree Boolean
Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting.
displayName String
A filter to return only resources that match the specified display name.
filters Changes to this property will trigger replacement. List<Property Map>
state String
The current state of the audit policy.
targetId String
A filter to return only items related to a specific target OCID.

getAuditPolicies Result

The following output properties are available:

AuditPolicyCollections List<GetAuditPoliciesAuditPolicyCollection>
The list of audit_policy_collection.
CompartmentId string
The OCID of the compartment containing the audit policy.
Id string
The provider-assigned unique ID for this managed resource.
AccessLevel string
AuditPolicyId string
CompartmentIdInSubtree bool
DisplayName string
The display name of the audit policy.
Filters List<GetAuditPoliciesFilter>
State string
The current state of the audit policy.
TargetId string
The OCID of the target for which the audit policy is created.
AuditPolicyCollections []GetAuditPoliciesAuditPolicyCollection
The list of audit_policy_collection.
CompartmentId string
The OCID of the compartment containing the audit policy.
Id string
The provider-assigned unique ID for this managed resource.
AccessLevel string
AuditPolicyId string
CompartmentIdInSubtree bool
DisplayName string
The display name of the audit policy.
Filters []GetAuditPoliciesFilter
State string
The current state of the audit policy.
TargetId string
The OCID of the target for which the audit policy is created.
auditPolicyCollections List<GetAuditPoliciesAuditPolicyCollection>
The list of audit_policy_collection.
compartmentId String
The OCID of the compartment containing the audit policy.
id String
The provider-assigned unique ID for this managed resource.
accessLevel String
auditPolicyId String
compartmentIdInSubtree Boolean
displayName String
The display name of the audit policy.
filters List<GetAuditPoliciesFilter>
state String
The current state of the audit policy.
targetId String
The OCID of the target for which the audit policy is created.
auditPolicyCollections GetAuditPoliciesAuditPolicyCollection[]
The list of audit_policy_collection.
compartmentId string
The OCID of the compartment containing the audit policy.
id string
The provider-assigned unique ID for this managed resource.
accessLevel string
auditPolicyId string
compartmentIdInSubtree boolean
displayName string
The display name of the audit policy.
filters GetAuditPoliciesFilter[]
state string
The current state of the audit policy.
targetId string
The OCID of the target for which the audit policy is created.
audit_policy_collections Sequence[datasafe.GetAuditPoliciesAuditPolicyCollection]
The list of audit_policy_collection.
compartment_id str
The OCID of the compartment containing the audit policy.
id str
The provider-assigned unique ID for this managed resource.
access_level str
audit_policy_id str
compartment_id_in_subtree bool
display_name str
The display name of the audit policy.
filters Sequence[datasafe.GetAuditPoliciesFilter]
state str
The current state of the audit policy.
target_id str
The OCID of the target for which the audit policy is created.
auditPolicyCollections List<Property Map>
The list of audit_policy_collection.
compartmentId String
The OCID of the compartment containing the audit policy.
id String
The provider-assigned unique ID for this managed resource.
accessLevel String
auditPolicyId String
compartmentIdInSubtree Boolean
displayName String
The display name of the audit policy.
filters List<Property Map>
state String
The current state of the audit policy.
targetId String
The OCID of the target for which the audit policy is created.

Supporting Types

GetAuditPoliciesAuditPolicyCollection

items This property is required. List<Property Map>

GetAuditPoliciesAuditPolicyCollectionItem

AuditConditions This property is required. List<GetAuditPoliciesAuditPolicyCollectionItemAuditCondition>
Lists the audit policy provisioning conditions for the target database.
AuditPolicyId This property is required. string
An optional filter to return only resources that match the specified id.
AuditSpecifications This property is required. List<GetAuditPoliciesAuditPolicyCollectionItemAuditSpecification>
Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to documentation.
CompartmentId This property is required. string
A filter to return only resources that match the specified compartment OCID.
DefinedTags This property is required. Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
Description This property is required. string
Description of the audit policy.
DisplayName This property is required. string
A filter to return only resources that match the specified display name.
FreeformTags This property is required. Dictionary<string, string>
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 Example: {"Department": "Finance"}
Id This property is required. string
The OCID of the audit policy.
IsDataSafeServiceAccountExcluded This property is required. bool
Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies.
LifecycleDetails This property is required. string
Details about the current state of the audit policy in Data Safe.
ProvisionTrigger This property is required. int
RetrieveFromTargetTrigger This property is required. int
State This property is required. string
The current state of the audit policy.
SystemTags This property is required. Dictionary<string, string>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
TargetId This property is required. string
A filter to return only items related to a specific target OCID.
TimeCreated This property is required. string
The time the the audit policy was created, in the format defined by RFC3339.
TimeLastProvisioned This property is required. string
Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339.
TimeLastRetrieved This property is required. string
The time when the audit policies was last retrieved from this target, in the format defined by RFC3339.
TimeUpdated This property is required. string
The last date and time the audit policy was updated, in the format defined by RFC3339.
AuditConditions This property is required. []GetAuditPoliciesAuditPolicyCollectionItemAuditCondition
Lists the audit policy provisioning conditions for the target database.
AuditPolicyId This property is required. string
An optional filter to return only resources that match the specified id.
AuditSpecifications This property is required. []GetAuditPoliciesAuditPolicyCollectionItemAuditSpecification
Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to documentation.
CompartmentId This property is required. string
A filter to return only resources that match the specified compartment OCID.
DefinedTags This property is required. map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
Description This property is required. string
Description of the audit policy.
DisplayName This property is required. string
A filter to return only resources that match the specified display name.
FreeformTags This property is required. map[string]string
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 Example: {"Department": "Finance"}
Id This property is required. string
The OCID of the audit policy.
IsDataSafeServiceAccountExcluded This property is required. bool
Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies.
LifecycleDetails This property is required. string
Details about the current state of the audit policy in Data Safe.
ProvisionTrigger This property is required. int
RetrieveFromTargetTrigger This property is required. int
State This property is required. string
The current state of the audit policy.
SystemTags This property is required. map[string]string
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
TargetId This property is required. string
A filter to return only items related to a specific target OCID.
TimeCreated This property is required. string
The time the the audit policy was created, in the format defined by RFC3339.
TimeLastProvisioned This property is required. string
Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339.
TimeLastRetrieved This property is required. string
The time when the audit policies was last retrieved from this target, in the format defined by RFC3339.
TimeUpdated This property is required. string
The last date and time the audit policy was updated, in the format defined by RFC3339.
auditConditions This property is required. List<GetAuditPoliciesAuditPolicyCollectionItemAuditCondition>
Lists the audit policy provisioning conditions for the target database.
auditPolicyId This property is required. String
An optional filter to return only resources that match the specified id.
auditSpecifications This property is required. List<GetAuditPoliciesAuditPolicyCollectionItemAuditSpecification>
Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to documentation.
compartmentId This property is required. String
A filter to return only resources that match the specified compartment OCID.
definedTags This property is required. Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
description This property is required. String
Description of the audit policy.
displayName This property is required. String
A filter to return only resources that match the specified display name.
freeformTags This property is required. Map<String,String>
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 Example: {"Department": "Finance"}
id This property is required. String
The OCID of the audit policy.
isDataSafeServiceAccountExcluded This property is required. Boolean
Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies.
lifecycleDetails This property is required. String
Details about the current state of the audit policy in Data Safe.
provisionTrigger This property is required. Integer
retrieveFromTargetTrigger This property is required. Integer
state This property is required. String
The current state of the audit policy.
systemTags This property is required. Map<String,String>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
targetId This property is required. String
A filter to return only items related to a specific target OCID.
timeCreated This property is required. String
The time the the audit policy was created, in the format defined by RFC3339.
timeLastProvisioned This property is required. String
Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339.
timeLastRetrieved This property is required. String
The time when the audit policies was last retrieved from this target, in the format defined by RFC3339.
timeUpdated This property is required. String
The last date and time the audit policy was updated, in the format defined by RFC3339.
auditConditions This property is required. GetAuditPoliciesAuditPolicyCollectionItemAuditCondition[]
Lists the audit policy provisioning conditions for the target database.
auditPolicyId This property is required. string
An optional filter to return only resources that match the specified id.
auditSpecifications This property is required. GetAuditPoliciesAuditPolicyCollectionItemAuditSpecification[]
Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to documentation.
compartmentId This property is required. string
A filter to return only resources that match the specified compartment OCID.
definedTags This property is required. {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
description This property is required. string
Description of the audit policy.
displayName This property is required. string
A filter to return only resources that match the specified display name.
freeformTags This property is required. {[key: string]: string}
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 Example: {"Department": "Finance"}
id This property is required. string
The OCID of the audit policy.
isDataSafeServiceAccountExcluded This property is required. boolean
Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies.
lifecycleDetails This property is required. string
Details about the current state of the audit policy in Data Safe.
provisionTrigger This property is required. number
retrieveFromTargetTrigger This property is required. number
state This property is required. string
The current state of the audit policy.
systemTags This property is required. {[key: string]: string}
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
targetId This property is required. string
A filter to return only items related to a specific target OCID.
timeCreated This property is required. string
The time the the audit policy was created, in the format defined by RFC3339.
timeLastProvisioned This property is required. string
Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339.
timeLastRetrieved This property is required. string
The time when the audit policies was last retrieved from this target, in the format defined by RFC3339.
timeUpdated This property is required. string
The last date and time the audit policy was updated, in the format defined by RFC3339.
audit_conditions This property is required. Sequence[datasafe.GetAuditPoliciesAuditPolicyCollectionItemAuditCondition]
Lists the audit policy provisioning conditions for the target database.
audit_policy_id This property is required. str
An optional filter to return only resources that match the specified id.
audit_specifications This property is required. Sequence[datasafe.GetAuditPoliciesAuditPolicyCollectionItemAuditSpecification]
Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to documentation.
compartment_id This property is required. str
A filter to return only resources that match the specified compartment OCID.
defined_tags This property is required. Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
description This property is required. str
Description of the audit policy.
display_name This property is required. str
A filter to return only resources that match the specified display name.
freeform_tags This property is required. Mapping[str, str]
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 Example: {"Department": "Finance"}
id This property is required. str
The OCID of the audit policy.
is_data_safe_service_account_excluded This property is required. bool
Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies.
lifecycle_details This property is required. str
Details about the current state of the audit policy in Data Safe.
provision_trigger This property is required. int
retrieve_from_target_trigger This property is required. int
state This property is required. str
The current state of the audit policy.
system_tags This property is required. Mapping[str, str]
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
target_id This property is required. str
A filter to return only items related to a specific target OCID.
time_created This property is required. str
The time the the audit policy was created, in the format defined by RFC3339.
time_last_provisioned This property is required. str
Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339.
time_last_retrieved This property is required. str
The time when the audit policies was last retrieved from this target, in the format defined by RFC3339.
time_updated This property is required. str
The last date and time the audit policy was updated, in the format defined by RFC3339.
auditConditions This property is required. List<Property Map>
Lists the audit policy provisioning conditions for the target database.
auditPolicyId This property is required. String
An optional filter to return only resources that match the specified id.
auditSpecifications This property is required. List<Property Map>
Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to documentation.
compartmentId This property is required. String
A filter to return only resources that match the specified compartment OCID.
definedTags This property is required. Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
description This property is required. String
Description of the audit policy.
displayName This property is required. String
A filter to return only resources that match the specified display name.
freeformTags This property is required. Map<String>
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 Example: {"Department": "Finance"}
id This property is required. String
The OCID of the audit policy.
isDataSafeServiceAccountExcluded This property is required. Boolean
Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies.
lifecycleDetails This property is required. String
Details about the current state of the audit policy in Data Safe.
provisionTrigger This property is required. Number
retrieveFromTargetTrigger This property is required. Number
state This property is required. String
The current state of the audit policy.
systemTags This property is required. Map<String>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
targetId This property is required. String
A filter to return only items related to a specific target OCID.
timeCreated This property is required. String
The time the the audit policy was created, in the format defined by RFC3339.
timeLastProvisioned This property is required. String
Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339.
timeLastRetrieved This property is required. String
The time when the audit policies was last retrieved from this target, in the format defined by RFC3339.
timeUpdated This property is required. String
The last date and time the audit policy was updated, in the format defined by RFC3339.

GetAuditPoliciesAuditPolicyCollectionItemAuditCondition

AuditPolicyName This property is required. string
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
EnableConditions This property is required. List<GetAuditPoliciesAuditPolicyCollectionItemAuditConditionEnableCondition>
Indicates the users/roles in the target database for which the audit policy is enforced, and the success/failure event condition to generate the audit event..
IsDataSafeServiceAccountAudited This property is required. bool
Indicates whether the Data Safe user activity on the target database will be audited by the policy.
IsPrivUsersManagedByDataSafe This property is required. bool
Indicates whether the privileged user list is managed by Data Safe.
AuditPolicyName This property is required. string
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
EnableConditions This property is required. []GetAuditPoliciesAuditPolicyCollectionItemAuditConditionEnableCondition
Indicates the users/roles in the target database for which the audit policy is enforced, and the success/failure event condition to generate the audit event..
IsDataSafeServiceAccountAudited This property is required. bool
Indicates whether the Data Safe user activity on the target database will be audited by the policy.
IsPrivUsersManagedByDataSafe This property is required. bool
Indicates whether the privileged user list is managed by Data Safe.
auditPolicyName This property is required. String
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
enableConditions This property is required. List<GetAuditPoliciesAuditPolicyCollectionItemAuditConditionEnableCondition>
Indicates the users/roles in the target database for which the audit policy is enforced, and the success/failure event condition to generate the audit event..
isDataSafeServiceAccountAudited This property is required. Boolean
Indicates whether the Data Safe user activity on the target database will be audited by the policy.
isPrivUsersManagedByDataSafe This property is required. Boolean
Indicates whether the privileged user list is managed by Data Safe.
auditPolicyName This property is required. string
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
enableConditions This property is required. GetAuditPoliciesAuditPolicyCollectionItemAuditConditionEnableCondition[]
Indicates the users/roles in the target database for which the audit policy is enforced, and the success/failure event condition to generate the audit event..
isDataSafeServiceAccountAudited This property is required. boolean
Indicates whether the Data Safe user activity on the target database will be audited by the policy.
isPrivUsersManagedByDataSafe This property is required. boolean
Indicates whether the privileged user list is managed by Data Safe.
audit_policy_name This property is required. str
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
enable_conditions This property is required. Sequence[datasafe.GetAuditPoliciesAuditPolicyCollectionItemAuditConditionEnableCondition]
Indicates the users/roles in the target database for which the audit policy is enforced, and the success/failure event condition to generate the audit event..
is_data_safe_service_account_audited This property is required. bool
Indicates whether the Data Safe user activity on the target database will be audited by the policy.
is_priv_users_managed_by_data_safe This property is required. bool
Indicates whether the privileged user list is managed by Data Safe.
auditPolicyName This property is required. String
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
enableConditions This property is required. List<Property Map>
Indicates the users/roles in the target database for which the audit policy is enforced, and the success/failure event condition to generate the audit event..
isDataSafeServiceAccountAudited This property is required. Boolean
Indicates whether the Data Safe user activity on the target database will be audited by the policy.
isPrivUsersManagedByDataSafe This property is required. Boolean
Indicates whether the privileged user list is managed by Data Safe.

GetAuditPoliciesAuditPolicyCollectionItemAuditConditionEnableCondition

EntityNames This property is required. List<string>
List of users or roles that the policy must be enabled for.
EntitySelection This property is required. string
The entity include or exclude selection.
EntityType This property is required. string
The entity type that the policy must be enabled for.
OperationStatus This property is required. string
The operation status that the policy must be enabled for.
EntityNames This property is required. []string
List of users or roles that the policy must be enabled for.
EntitySelection This property is required. string
The entity include or exclude selection.
EntityType This property is required. string
The entity type that the policy must be enabled for.
OperationStatus This property is required. string
The operation status that the policy must be enabled for.
entityNames This property is required. List<String>
List of users or roles that the policy must be enabled for.
entitySelection This property is required. String
The entity include or exclude selection.
entityType This property is required. String
The entity type that the policy must be enabled for.
operationStatus This property is required. String
The operation status that the policy must be enabled for.
entityNames This property is required. string[]
List of users or roles that the policy must be enabled for.
entitySelection This property is required. string
The entity include or exclude selection.
entityType This property is required. string
The entity type that the policy must be enabled for.
operationStatus This property is required. string
The operation status that the policy must be enabled for.
entity_names This property is required. Sequence[str]
List of users or roles that the policy must be enabled for.
entity_selection This property is required. str
The entity include or exclude selection.
entity_type This property is required. str
The entity type that the policy must be enabled for.
operation_status This property is required. str
The operation status that the policy must be enabled for.
entityNames This property is required. List<String>
List of users or roles that the policy must be enabled for.
entitySelection This property is required. String
The entity include or exclude selection.
entityType This property is required. String
The entity type that the policy must be enabled for.
operationStatus This property is required. String
The operation status that the policy must be enabled for.

GetAuditPoliciesAuditPolicyCollectionItemAuditSpecification

AuditPolicyCategory This property is required. string
The category to which the audit policy belongs.
AuditPolicyName This property is required. string
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
DatabasePolicyNames This property is required. List<string>
Indicates the names of corresponding database policy ( or policies) in the target database.
EnableStatus This property is required. string
Indicates whether the policy has been enabled, disabled or partially enabled in the target database. The status is PARTIALLY_ENABLED if any of the constituent database audit policies is not enabled.
EnabledEntities This property is required. string
Indicates on whom the audit policy is enabled.
IsCreated This property is required. bool
Indicates whether the policy is already created on the target database.
IsEnabledForAllUsers This property is required. bool
Indicates whether the policy by default is enabled for all users with no flexibility to alter the enablement conditions.
IsSeededInDataSafe This property is required. bool
Indicates whether the audit policy is one of the seeded policies provided by Oracle Data Safe.
IsSeededInTarget This property is required. bool
Indicates whether the audit policy is one of the predefined policies provided by Oracle Database.
IsViewOnly This property is required. bool
Indicates whether the audit policy is available for provisioning/ de-provisioning from Oracle Data Safe, or is only available for displaying the current provisioning status from the target.
PartiallyEnabledMsg This property is required. string
Provides information about the policy that has been only partially enabled.
AuditPolicyCategory This property is required. string
The category to which the audit policy belongs.
AuditPolicyName This property is required. string
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
DatabasePolicyNames This property is required. []string
Indicates the names of corresponding database policy ( or policies) in the target database.
EnableStatus This property is required. string
Indicates whether the policy has been enabled, disabled or partially enabled in the target database. The status is PARTIALLY_ENABLED if any of the constituent database audit policies is not enabled.
EnabledEntities This property is required. string
Indicates on whom the audit policy is enabled.
IsCreated This property is required. bool
Indicates whether the policy is already created on the target database.
IsEnabledForAllUsers This property is required. bool
Indicates whether the policy by default is enabled for all users with no flexibility to alter the enablement conditions.
IsSeededInDataSafe This property is required. bool
Indicates whether the audit policy is one of the seeded policies provided by Oracle Data Safe.
IsSeededInTarget This property is required. bool
Indicates whether the audit policy is one of the predefined policies provided by Oracle Database.
IsViewOnly This property is required. bool
Indicates whether the audit policy is available for provisioning/ de-provisioning from Oracle Data Safe, or is only available for displaying the current provisioning status from the target.
PartiallyEnabledMsg This property is required. string
Provides information about the policy that has been only partially enabled.
auditPolicyCategory This property is required. String
The category to which the audit policy belongs.
auditPolicyName This property is required. String
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
databasePolicyNames This property is required. List<String>
Indicates the names of corresponding database policy ( or policies) in the target database.
enableStatus This property is required. String
Indicates whether the policy has been enabled, disabled or partially enabled in the target database. The status is PARTIALLY_ENABLED if any of the constituent database audit policies is not enabled.
enabledEntities This property is required. String
Indicates on whom the audit policy is enabled.
isCreated This property is required. Boolean
Indicates whether the policy is already created on the target database.
isEnabledForAllUsers This property is required. Boolean
Indicates whether the policy by default is enabled for all users with no flexibility to alter the enablement conditions.
isSeededInDataSafe This property is required. Boolean
Indicates whether the audit policy is one of the seeded policies provided by Oracle Data Safe.
isSeededInTarget This property is required. Boolean
Indicates whether the audit policy is one of the predefined policies provided by Oracle Database.
isViewOnly This property is required. Boolean
Indicates whether the audit policy is available for provisioning/ de-provisioning from Oracle Data Safe, or is only available for displaying the current provisioning status from the target.
partiallyEnabledMsg This property is required. String
Provides information about the policy that has been only partially enabled.
auditPolicyCategory This property is required. string
The category to which the audit policy belongs.
auditPolicyName This property is required. string
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
databasePolicyNames This property is required. string[]
Indicates the names of corresponding database policy ( or policies) in the target database.
enableStatus This property is required. string
Indicates whether the policy has been enabled, disabled or partially enabled in the target database. The status is PARTIALLY_ENABLED if any of the constituent database audit policies is not enabled.
enabledEntities This property is required. string
Indicates on whom the audit policy is enabled.
isCreated This property is required. boolean
Indicates whether the policy is already created on the target database.
isEnabledForAllUsers This property is required. boolean
Indicates whether the policy by default is enabled for all users with no flexibility to alter the enablement conditions.
isSeededInDataSafe This property is required. boolean
Indicates whether the audit policy is one of the seeded policies provided by Oracle Data Safe.
isSeededInTarget This property is required. boolean
Indicates whether the audit policy is one of the predefined policies provided by Oracle Database.
isViewOnly This property is required. boolean
Indicates whether the audit policy is available for provisioning/ de-provisioning from Oracle Data Safe, or is only available for displaying the current provisioning status from the target.
partiallyEnabledMsg This property is required. string
Provides information about the policy that has been only partially enabled.
audit_policy_category This property is required. str
The category to which the audit policy belongs.
audit_policy_name This property is required. str
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
database_policy_names This property is required. Sequence[str]
Indicates the names of corresponding database policy ( or policies) in the target database.
enable_status This property is required. str
Indicates whether the policy has been enabled, disabled or partially enabled in the target database. The status is PARTIALLY_ENABLED if any of the constituent database audit policies is not enabled.
enabled_entities This property is required. str
Indicates on whom the audit policy is enabled.
is_created This property is required. bool
Indicates whether the policy is already created on the target database.
is_enabled_for_all_users This property is required. bool
Indicates whether the policy by default is enabled for all users with no flexibility to alter the enablement conditions.
is_seeded_in_data_safe This property is required. bool
Indicates whether the audit policy is one of the seeded policies provided by Oracle Data Safe.
is_seeded_in_target This property is required. bool
Indicates whether the audit policy is one of the predefined policies provided by Oracle Database.
is_view_only This property is required. bool
Indicates whether the audit policy is available for provisioning/ de-provisioning from Oracle Data Safe, or is only available for displaying the current provisioning status from the target.
partially_enabled_msg This property is required. str
Provides information about the policy that has been only partially enabled.
auditPolicyCategory This property is required. String
The category to which the audit policy belongs.
auditPolicyName This property is required. String
Indicates the audit policy name. Refer to the documentation for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database.
databasePolicyNames This property is required. List<String>
Indicates the names of corresponding database policy ( or policies) in the target database.
enableStatus This property is required. String
Indicates whether the policy has been enabled, disabled or partially enabled in the target database. The status is PARTIALLY_ENABLED if any of the constituent database audit policies is not enabled.
enabledEntities This property is required. String
Indicates on whom the audit policy is enabled.
isCreated This property is required. Boolean
Indicates whether the policy is already created on the target database.
isEnabledForAllUsers This property is required. Boolean
Indicates whether the policy by default is enabled for all users with no flexibility to alter the enablement conditions.
isSeededInDataSafe This property is required. Boolean
Indicates whether the audit policy is one of the seeded policies provided by Oracle Data Safe.
isSeededInTarget This property is required. Boolean
Indicates whether the audit policy is one of the predefined policies provided by Oracle Database.
isViewOnly This property is required. Boolean
Indicates whether the audit policy is available for provisioning/ de-provisioning from Oracle Data Safe, or is only available for displaying the current provisioning status from the target.
partiallyEnabledMsg This property is required. String
Provides information about the policy that has been only partially enabled.

GetAuditPoliciesFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi