1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getReports
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

oci.DataSafe.getReports

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

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

    Gets a list of all the reports in the compartment. It contains information such as report generation time.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testReports = oci.DataSafe.getReports({
        compartmentId: _var.compartment_id,
        accessLevel: _var.report_access_level,
        compartmentIdInSubtree: _var.report_compartment_id_in_subtree,
        displayName: _var.report_display_name,
        reportDefinitionId: oci_data_safe_report_definition.test_report_definition.id,
        state: _var.report_state,
        type: _var.report_type,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_reports = oci.DataSafe.get_reports(compartment_id=var["compartment_id"],
        access_level=var["report_access_level"],
        compartment_id_in_subtree=var["report_compartment_id_in_subtree"],
        display_name=var["report_display_name"],
        report_definition_id=oci_data_safe_report_definition["test_report_definition"]["id"],
        state=var["report_state"],
        type=var["report_type"])
    
    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.GetReports(ctx, &datasafe.GetReportsArgs{
    			CompartmentId:          _var.Compartment_id,
    			AccessLevel:            pulumi.StringRef(_var.Report_access_level),
    			CompartmentIdInSubtree: pulumi.BoolRef(_var.Report_compartment_id_in_subtree),
    			DisplayName:            pulumi.StringRef(_var.Report_display_name),
    			ReportDefinitionId:     pulumi.StringRef(oci_data_safe_report_definition.Test_report_definition.Id),
    			State:                  pulumi.StringRef(_var.Report_state),
    			Type:                   pulumi.StringRef(_var.Report_type),
    		}, 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 testReports = Oci.DataSafe.GetReports.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            AccessLevel = @var.Report_access_level,
            CompartmentIdInSubtree = @var.Report_compartment_id_in_subtree,
            DisplayName = @var.Report_display_name,
            ReportDefinitionId = oci_data_safe_report_definition.Test_report_definition.Id,
            State = @var.Report_state,
            Type = @var.Report_type,
        });
    
    });
    
    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.GetReportsArgs;
    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 testReports = DataSafeFunctions.getReports(GetReportsArgs.builder()
                .compartmentId(var_.compartment_id())
                .accessLevel(var_.report_access_level())
                .compartmentIdInSubtree(var_.report_compartment_id_in_subtree())
                .displayName(var_.report_display_name())
                .reportDefinitionId(oci_data_safe_report_definition.test_report_definition().id())
                .state(var_.report_state())
                .type(var_.report_type())
                .build());
    
        }
    }
    
    variables:
      testReports:
        fn::invoke:
          Function: oci:DataSafe:getReports
          Arguments:
            compartmentId: ${var.compartment_id}
            accessLevel: ${var.report_access_level}
            compartmentIdInSubtree: ${var.report_compartment_id_in_subtree}
            displayName: ${var.report_display_name}
            reportDefinitionId: ${oci_data_safe_report_definition.test_report_definition.id}
            state: ${var.report_state}
            type: ${var.report_type}
    

    Using getReports

    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 getReports(args: GetReportsArgs, opts?: InvokeOptions): Promise<GetReportsResult>
    function getReportsOutput(args: GetReportsOutputArgs, opts?: InvokeOptions): Output<GetReportsResult>
    def get_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.GetReportsFilter]] = None,
                    report_definition_id: Optional[str] = None,
                    state: Optional[str] = None,
                    type: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetReportsResult
    def get_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.GetReportsFilterArgs]]]] = None,
                    report_definition_id: Optional[pulumi.Input[str]] = None,
                    state: Optional[pulumi.Input[str]] = None,
                    type: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetReportsResult]
    func GetReports(ctx *Context, args *GetReportsArgs, opts ...InvokeOption) (*GetReportsResult, error)
    func GetReportsOutput(ctx *Context, args *GetReportsOutputArgs, opts ...InvokeOption) GetReportsResultOutput

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

    public static class GetReports 
    {
        public static Task<GetReportsResult> InvokeAsync(GetReportsArgs args, InvokeOptions? opts = null)
        public static Output<GetReportsResult> Invoke(GetReportsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetReportsResult> getReports(GetReportsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DataSafe/getReports:getReports
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId 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.
    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
    The name of the report definition to query.
    Filters List<GetReportsFilter>
    ReportDefinitionId string
    The ID of the report definition to filter the list of reports
    State string
    An optional filter to return only resources that match the specified lifecycle state.
    Type string
    An optional filter to return only resources that match the specified type.
    CompartmentId 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.
    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
    The name of the report definition to query.
    Filters []GetReportsFilter
    ReportDefinitionId string
    The ID of the report definition to filter the list of reports
    State string
    An optional filter to return only resources that match the specified lifecycle state.
    Type string
    An optional filter to return only resources that match the specified type.
    compartmentId 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.
    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
    The name of the report definition to query.
    filters List<GetReportsFilter>
    reportDefinitionId String
    The ID of the report definition to filter the list of reports
    state String
    An optional filter to return only resources that match the specified lifecycle state.
    type String
    An optional filter to return only resources that match the specified type.
    compartmentId 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.
    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
    The name of the report definition to query.
    filters GetReportsFilter[]
    reportDefinitionId string
    The ID of the report definition to filter the list of reports
    state string
    An optional filter to return only resources that match the specified lifecycle state.
    type string
    An optional filter to return only resources that match the specified type.
    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_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
    The name of the report definition to query.
    filters GetReportsFilter]
    report_definition_id str
    The ID of the report definition to filter the list of reports
    state str
    An optional filter to return only resources that match the specified lifecycle state.
    type str
    An optional filter to return only resources that match the specified type.
    compartmentId 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.
    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
    The name of the report definition to query.
    filters List<Property Map>
    reportDefinitionId String
    The ID of the report definition to filter the list of reports
    state String
    An optional filter to return only resources that match the specified lifecycle state.
    type String
    An optional filter to return only resources that match the specified type.

    getReports Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment containing the report.
    Id string
    The provider-assigned unique ID for this managed resource.
    ReportCollections List<GetReportsReportCollection>
    The list of report_collection.
    AccessLevel string
    CompartmentIdInSubtree bool
    DisplayName string
    Name of the report.
    Filters List<GetReportsFilter>
    ReportDefinitionId string
    The OCID of the report definition.
    State string
    The current state of the audit report.
    Type string
    The type of the audit report.
    CompartmentId string
    The OCID of the compartment containing the report.
    Id string
    The provider-assigned unique ID for this managed resource.
    ReportCollections []GetReportsReportCollection
    The list of report_collection.
    AccessLevel string
    CompartmentIdInSubtree bool
    DisplayName string
    Name of the report.
    Filters []GetReportsFilter
    ReportDefinitionId string
    The OCID of the report definition.
    State string
    The current state of the audit report.
    Type string
    The type of the audit report.
    compartmentId String
    The OCID of the compartment containing the report.
    id String
    The provider-assigned unique ID for this managed resource.
    reportCollections List<GetReportsReportCollection>
    The list of report_collection.
    accessLevel String
    compartmentIdInSubtree Boolean
    displayName String
    Name of the report.
    filters List<GetReportsFilter>
    reportDefinitionId String
    The OCID of the report definition.
    state String
    The current state of the audit report.
    type String
    The type of the audit report.
    compartmentId string
    The OCID of the compartment containing the report.
    id string
    The provider-assigned unique ID for this managed resource.
    reportCollections GetReportsReportCollection[]
    The list of report_collection.
    accessLevel string
    compartmentIdInSubtree boolean
    displayName string
    Name of the report.
    filters GetReportsFilter[]
    reportDefinitionId string
    The OCID of the report definition.
    state string
    The current state of the audit report.
    type string
    The type of the audit report.
    compartment_id str
    The OCID of the compartment containing the report.
    id str
    The provider-assigned unique ID for this managed resource.
    report_collections GetReportsReportCollection]
    The list of report_collection.
    access_level str
    compartment_id_in_subtree bool
    display_name str
    Name of the report.
    filters GetReportsFilter]
    report_definition_id str
    The OCID of the report definition.
    state str
    The current state of the audit report.
    type str
    The type of the audit report.
    compartmentId String
    The OCID of the compartment containing the report.
    id String
    The provider-assigned unique ID for this managed resource.
    reportCollections List<Property Map>
    The list of report_collection.
    accessLevel String
    compartmentIdInSubtree Boolean
    displayName String
    Name of the report.
    filters List<Property Map>
    reportDefinitionId String
    The OCID of the report definition.
    state String
    The current state of the audit report.
    type String
    The type of the audit report.

    Supporting Types

    GetReportsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetReportsReportCollection

    GetReportsReportCollectionItem

    CompartmentId string
    A filter to return only resources that match the specified compartment OCID.
    DefinedTags 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
    Specifies a description of the report.
    DisplayName string
    The name of the report definition to query.
    FreeformTags 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 report.
    MimeType string
    Specifies the format of report to be .xls or .pdf
    ReportDefinitionId string
    The ID of the report definition to filter the list of reports
    ReportId string
    State string
    An optional filter to return only resources that match the specified lifecycle state.
    SystemTags 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"}
    TimeGenerated string
    Specifies the date and time the report was generated.
    Type string
    An optional filter to return only resources that match the specified type.
    CompartmentId string
    A filter to return only resources that match the specified compartment OCID.
    DefinedTags 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
    Specifies a description of the report.
    DisplayName string
    The name of the report definition to query.
    FreeformTags 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 report.
    MimeType string
    Specifies the format of report to be .xls or .pdf
    ReportDefinitionId string
    The ID of the report definition to filter the list of reports
    ReportId string
    State string
    An optional filter to return only resources that match the specified lifecycle state.
    SystemTags 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"}
    TimeGenerated string
    Specifies the date and time the report was generated.
    Type string
    An optional filter to return only resources that match the specified type.
    compartmentId String
    A filter to return only resources that match the specified compartment OCID.
    definedTags 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
    Specifies a description of the report.
    displayName String
    The name of the report definition to query.
    freeformTags 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 report.
    mimeType String
    Specifies the format of report to be .xls or .pdf
    reportDefinitionId String
    The ID of the report definition to filter the list of reports
    reportId String
    state String
    An optional filter to return only resources that match the specified lifecycle state.
    systemTags 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"}
    timeGenerated String
    Specifies the date and time the report was generated.
    type String
    An optional filter to return only resources that match the specified type.
    compartmentId string
    A filter to return only resources that match the specified compartment OCID.
    definedTags {[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
    Specifies a description of the report.
    displayName string
    The name of the report definition to query.
    freeformTags {[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 report.
    mimeType string
    Specifies the format of report to be .xls or .pdf
    reportDefinitionId string
    The ID of the report definition to filter the list of reports
    reportId string
    state string
    An optional filter to return only resources that match the specified lifecycle state.
    systemTags {[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"}
    timeGenerated string
    Specifies the date and time the report was generated.
    type string
    An optional filter to return only resources that match the specified type.
    compartment_id str
    A filter to return only resources that match the specified compartment OCID.
    defined_tags 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
    Specifies a description of the report.
    display_name str
    The name of the report definition to query.
    freeform_tags 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 report.
    mime_type str
    Specifies the format of report to be .xls or .pdf
    report_definition_id str
    The ID of the report definition to filter the list of reports
    report_id str
    state str
    An optional filter to return only resources that match the specified lifecycle state.
    system_tags Mapping[str, Any]
    System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_generated str
    Specifies the date and time the report was generated.
    type str
    An optional filter to return only resources that match the specified type.
    compartmentId String
    A filter to return only resources that match the specified compartment OCID.
    definedTags 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
    Specifies a description of the report.
    displayName String
    The name of the report definition to query.
    freeformTags 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 report.
    mimeType String
    Specifies the format of report to be .xls or .pdf
    reportDefinitionId String
    The ID of the report definition to filter the list of reports
    reportId String
    state String
    An optional filter to return only resources that match the specified lifecycle state.
    systemTags 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"}
    timeGenerated String
    Specifies the date and time the report was generated.
    type String
    An optional filter to return only resources that match the specified type.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi