oci.DataSafe.getSecurityPolicyReports
Explore with Pulumi AI
This data source provides the list of Security Policy Reports in Oracle Cloud Infrastructure Data Safe service.
Retrieves a list of all security policy reports in Data Safe.
The ListSecurityPolicyReports operation returns only the security policy reports in the specified compartmentId
.
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 ListSecurityPolicyReports 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 testSecurityPolicyReports = oci.DataSafe.getSecurityPolicyReports({
compartmentId: compartmentId,
accessLevel: securityPolicyReportAccessLevel,
compartmentIdInSubtree: securityPolicyReportCompartmentIdInSubtree,
displayName: securityPolicyReportDisplayName,
securityPolicyReportId: testSecurityPolicyReport.id,
state: securityPolicyReportState,
targetId: testTarget.id,
});
import pulumi
import pulumi_oci as oci
test_security_policy_reports = oci.DataSafe.get_security_policy_reports(compartment_id=compartment_id,
access_level=security_policy_report_access_level,
compartment_id_in_subtree=security_policy_report_compartment_id_in_subtree,
display_name=security_policy_report_display_name,
security_policy_report_id=test_security_policy_report["id"],
state=security_policy_report_state,
target_id=test_target["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/DataSafe"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := DataSafe.GetSecurityPolicyReports(ctx, &datasafe.GetSecurityPolicyReportsArgs{
CompartmentId: compartmentId,
AccessLevel: pulumi.StringRef(securityPolicyReportAccessLevel),
CompartmentIdInSubtree: pulumi.BoolRef(securityPolicyReportCompartmentIdInSubtree),
DisplayName: pulumi.StringRef(securityPolicyReportDisplayName),
SecurityPolicyReportId: pulumi.StringRef(testSecurityPolicyReport.Id),
State: pulumi.StringRef(securityPolicyReportState),
TargetId: pulumi.StringRef(testTarget.Id),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testSecurityPolicyReports = Oci.DataSafe.GetSecurityPolicyReports.Invoke(new()
{
CompartmentId = compartmentId,
AccessLevel = securityPolicyReportAccessLevel,
CompartmentIdInSubtree = securityPolicyReportCompartmentIdInSubtree,
DisplayName = securityPolicyReportDisplayName,
SecurityPolicyReportId = testSecurityPolicyReport.Id,
State = securityPolicyReportState,
TargetId = testTarget.Id,
});
});
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.GetSecurityPolicyReportsArgs;
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 testSecurityPolicyReports = DataSafeFunctions.getSecurityPolicyReports(GetSecurityPolicyReportsArgs.builder()
.compartmentId(compartmentId)
.accessLevel(securityPolicyReportAccessLevel)
.compartmentIdInSubtree(securityPolicyReportCompartmentIdInSubtree)
.displayName(securityPolicyReportDisplayName)
.securityPolicyReportId(testSecurityPolicyReport.id())
.state(securityPolicyReportState)
.targetId(testTarget.id())
.build());
}
}
variables:
testSecurityPolicyReports:
fn::invoke:
Function: oci:DataSafe:getSecurityPolicyReports
Arguments:
compartmentId: ${compartmentId}
accessLevel: ${securityPolicyReportAccessLevel}
compartmentIdInSubtree: ${securityPolicyReportCompartmentIdInSubtree}
displayName: ${securityPolicyReportDisplayName}
securityPolicyReportId: ${testSecurityPolicyReport.id}
state: ${securityPolicyReportState}
targetId: ${testTarget.id}
Using getSecurityPolicyReports
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 getSecurityPolicyReports(args: GetSecurityPolicyReportsArgs, opts?: InvokeOptions): Promise<GetSecurityPolicyReportsResult>
function getSecurityPolicyReportsOutput(args: GetSecurityPolicyReportsOutputArgs, opts?: InvokeOptions): Output<GetSecurityPolicyReportsResult>
def get_security_policy_reports(access_level: Optional[str] = None,
compartment_id: Optional[str] = None,
compartment_id_in_subtree: Optional[bool] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_datasafe.GetSecurityPolicyReportsFilter]] = None,
security_policy_report_id: Optional[str] = None,
state: Optional[str] = None,
target_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecurityPolicyReportsResult
def get_security_policy_reports_output(access_level: 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.GetSecurityPolicyReportsFilterArgs]]]] = None,
security_policy_report_id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
target_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecurityPolicyReportsResult]
func GetSecurityPolicyReports(ctx *Context, args *GetSecurityPolicyReportsArgs, opts ...InvokeOption) (*GetSecurityPolicyReportsResult, error)
func GetSecurityPolicyReportsOutput(ctx *Context, args *GetSecurityPolicyReportsOutputArgs, opts ...InvokeOption) GetSecurityPolicyReportsResultOutput
> Note: This function is named GetSecurityPolicyReports
in the Go SDK.
public static class GetSecurityPolicyReports
{
public static Task<GetSecurityPolicyReportsResult> InvokeAsync(GetSecurityPolicyReportsArgs args, InvokeOptions? opts = null)
public static Output<GetSecurityPolicyReportsResult> Invoke(GetSecurityPolicyReportsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecurityPolicyReportsResult> getSecurityPolicyReports(GetSecurityPolicyReportsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DataSafe/getSecurityPolicyReports:getSecurityPolicyReports
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- Access
Level 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.
- Compartment
Id boolIn Subtree - 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 string - A filter to return only resources that match the specified display name.
- Filters
List<Get
Security Policy Reports Filter> - Security
Policy stringReport Id - An optional filter to return only resources that match the specified OCID of the security policy report resource.
- State string
- The current state of the security policy report.
- Target
Id string - A filter to return only items related to a specific target OCID.
- Compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- Access
Level 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.
- Compartment
Id boolIn Subtree - 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 string - A filter to return only resources that match the specified display name.
- Filters
[]Get
Security Policy Reports Filter - Security
Policy stringReport Id - An optional filter to return only resources that match the specified OCID of the security policy report resource.
- State string
- The current state of the security policy report.
- Target
Id string - A filter to return only items related to a specific target OCID.
- compartment
Id String - A filter to return only resources that match the specified compartment OCID.
- access
Level 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.
- compartment
Id BooleanIn Subtree - 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 String - A filter to return only resources that match the specified display name.
- filters
List<Get
Security Policy Reports Filter> - security
Policy StringReport Id - An optional filter to return only resources that match the specified OCID of the security policy report resource.
- state String
- The current state of the security policy report.
- target
Id String - A filter to return only items related to a specific target OCID.
- compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- access
Level 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.
- compartment
Id booleanIn Subtree - 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 string - A filter to return only resources that match the specified display name.
- filters
Get
Security Policy Reports Filter[] - security
Policy stringReport Id - An optional filter to return only resources that match the specified OCID of the security policy report resource.
- state string
- The current state of the security policy report.
- target
Id string - A filter to return only items related to a specific target OCID.
- compartment_
id 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.
- compartment_
id_ boolin_ subtree - 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
Sequence[datasafe.
Get Security Policy Reports Filter] - security_
policy_ strreport_ id - An optional filter to return only resources that match the specified OCID of the security policy report resource.
- state str
- The current state of the security policy report.
- target_
id str - A filter to return only items related to a specific target OCID.
- compartment
Id String - A filter to return only resources that match the specified compartment OCID.
- access
Level 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.
- compartment
Id BooleanIn Subtree - 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 String - A filter to return only resources that match the specified display name.
- filters List<Property Map>
- security
Policy StringReport Id - An optional filter to return only resources that match the specified OCID of the security policy report resource.
- state String
- The current state of the security policy report.
- target
Id String - A filter to return only items related to a specific target OCID.
getSecurityPolicyReports Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment that contains the security policy report.
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Policy List<GetReport Collections Security Policy Reports Security Policy Report Collection> - The list of security_policy_report_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Display
Name string - The display name of the security policy report.
- Filters
List<Get
Security Policy Reports Filter> - Security
Policy stringReport Id - State string
- The current state of the security policy report.
- Target
Id string - The OCID of the of the target database.
- Compartment
Id string - The OCID of the compartment that contains the security policy report.
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Policy []GetReport Collections Security Policy Reports Security Policy Report Collection - The list of security_policy_report_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Display
Name string - The display name of the security policy report.
- Filters
[]Get
Security Policy Reports Filter - Security
Policy stringReport Id - State string
- The current state of the security policy report.
- Target
Id string - The OCID of the of the target database.
- compartment
Id String - The OCID of the compartment that contains the security policy report.
- id String
- The provider-assigned unique ID for this managed resource.
- security
Policy List<GetReport Collections Security Policy Reports Security Policy Report Collection> - The list of security_policy_report_collection.
- access
Level String - compartment
Id BooleanIn Subtree - display
Name String - The display name of the security policy report.
- filters
List<Get
Security Policy Reports Filter> - security
Policy StringReport Id - state String
- The current state of the security policy report.
- target
Id String - The OCID of the of the target database.
- compartment
Id string - The OCID of the compartment that contains the security policy report.
- id string
- The provider-assigned unique ID for this managed resource.
- security
Policy GetReport Collections Security Policy Reports Security Policy Report Collection[] - The list of security_policy_report_collection.
- access
Level string - compartment
Id booleanIn Subtree - display
Name string - The display name of the security policy report.
- filters
Get
Security Policy Reports Filter[] - security
Policy stringReport Id - state string
- The current state of the security policy report.
- target
Id string - The OCID of the of the target database.
- compartment_
id str - The OCID of the compartment that contains the security policy report.
- id str
- The provider-assigned unique ID for this managed resource.
- security_
policy_ Sequence[datasafe.report_ collections Get Security Policy Reports Security Policy Report Collection] - The list of security_policy_report_collection.
- access_
level str - compartment_
id_ boolin_ subtree - display_
name str - The display name of the security policy report.
- filters
Sequence[datasafe.
Get Security Policy Reports Filter] - security_
policy_ strreport_ id - state str
- The current state of the security policy report.
- target_
id str - The OCID of the of the target database.
- compartment
Id String - The OCID of the compartment that contains the security policy report.
- id String
- The provider-assigned unique ID for this managed resource.
- security
Policy List<Property Map>Report Collections - The list of security_policy_report_collection.
- access
Level String - compartment
Id BooleanIn Subtree - display
Name String - The display name of the security policy report.
- filters List<Property Map>
- security
Policy StringReport Id - state String
- The current state of the security policy report.
- target
Id String - The OCID of the of the target database.
Supporting Types
GetSecurityPolicyReportsFilter
GetSecurityPolicyReportsSecurityPolicyReportCollection
GetSecurityPolicyReportsSecurityPolicyReportCollectionItem
- Compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- Dictionary<string, object>
- 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 string
- The description of the security policy report.
- Display
Name string - A filter to return only resources that match the specified display name.
- Dictionary<string, object>
- 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 string
- The OCID of the security policy report.
- Lifecycle
Details string - Details about the current state of the security policy report.
- State string
- The current state of the security policy report.
- Dictionary<string, object>
- 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 string - A filter to return only items related to a specific target OCID.
- Time
Created string - The date and time the security policy report was created, in the format defined by RFC3339.
- Time
Updated string - The date and time the security policy report was last updated, in the format defined by RFC3339.
- Compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- map[string]interface{}
- 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 string
- The description of the security policy report.
- Display
Name string - A filter to return only resources that match the specified display name.
- map[string]interface{}
- 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 string
- The OCID of the security policy report.
- Lifecycle
Details string - Details about the current state of the security policy report.
- State string
- The current state of the security policy report.
- map[string]interface{}
- 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 string - A filter to return only items related to a specific target OCID.
- Time
Created string - The date and time the security policy report was created, in the format defined by RFC3339.
- Time
Updated string - The date and time the security policy report was last updated, in the format defined by RFC3339.
- compartment
Id String - A filter to return only resources that match the specified compartment OCID.
- Map<String,Object>
- 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 String
- The description of the security policy report.
- display
Name String - A filter to return only resources that match the specified display name.
- Map<String,Object>
- 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 String
- The OCID of the security policy report.
- lifecycle
Details String - Details about the current state of the security policy report.
- state String
- The current state of the security policy report.
- Map<String,Object>
- 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 String - A filter to return only items related to a specific target OCID.
- time
Created String - The date and time the security policy report was created, in the format defined by RFC3339.
- time
Updated String - The date and time the security policy report was last updated, in the format defined by RFC3339.
- compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- {[key: string]: any}
- 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 string
- The description of the security policy report.
- display
Name string - A filter to return only resources that match the specified display name.
- {[key: string]: any}
- 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 string
- The OCID of the security policy report.
- lifecycle
Details string - Details about the current state of the security policy report.
- state string
- The current state of the security policy report.
- {[key: string]: any}
- 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 string - A filter to return only items related to a specific target OCID.
- time
Created string - The date and time the security policy report was created, in the format defined by RFC3339.
- time
Updated string - The date and time the security policy report was last updated, in the format defined by RFC3339.
- compartment_
id str - A filter to return only resources that match the specified compartment OCID.
- Mapping[str, Any]
- 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 str
- The description of the security policy report.
- display_
name str - A filter to return only resources that match the specified display name.
- Mapping[str, Any]
- 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 str
- The OCID of the security policy report.
- lifecycle_
details str - Details about the current state of the security policy report.
- state str
- The current state of the security policy report.
- Mapping[str, Any]
- 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 str - A filter to return only items related to a specific target OCID.
- time_
created str - The date and time the security policy report was created, in the format defined by RFC3339.
- time_
updated str - The date and time the security policy report was last updated, in the format defined by RFC3339.
- compartment
Id String - A filter to return only resources that match the specified compartment OCID.
- Map<Any>
- 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 String
- The description of the security policy report.
- display
Name String - A filter to return only resources that match the specified display name.
- Map<Any>
- 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 String
- The OCID of the security policy report.
- lifecycle
Details String - Details about the current state of the security policy report.
- state String
- The current state of the security policy report.
- Map<Any>
- 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 String - A filter to return only items related to a specific target OCID.
- time
Created String - The date and time the security policy report was created, in the format defined by RFC3339.
- time
Updated String - The date and time the security policy report was last updated, in the format defined by RFC3339.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.