1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getReports
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.DataSafe.getReports

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 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: compartmentId,
        accessLevel: reportAccessLevel,
        compartmentIdInSubtree: reportCompartmentIdInSubtree,
        displayName: reportDisplayName,
        reportDefinitionId: testReportDefinition.id,
        state: reportState,
        type: reportType,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_reports = oci.DataSafe.get_reports(compartment_id=compartment_id,
        access_level=report_access_level,
        compartment_id_in_subtree=report_compartment_id_in_subtree,
        display_name=report_display_name,
        report_definition_id=test_report_definition["id"],
        state=report_state,
        type=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:          compartmentId,
    			AccessLevel:            pulumi.StringRef(reportAccessLevel),
    			CompartmentIdInSubtree: pulumi.BoolRef(reportCompartmentIdInSubtree),
    			DisplayName:            pulumi.StringRef(reportDisplayName),
    			ReportDefinitionId:     pulumi.StringRef(testReportDefinition.Id),
    			State:                  pulumi.StringRef(reportState),
    			Type:                   pulumi.StringRef(reportType),
    		}, 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 = compartmentId,
            AccessLevel = reportAccessLevel,
            CompartmentIdInSubtree = reportCompartmentIdInSubtree,
            DisplayName = reportDisplayName,
            ReportDefinitionId = testReportDefinition.Id,
            State = reportState,
            Type = reportType,
        });
    
    });
    
    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(compartmentId)
                .accessLevel(reportAccessLevel)
                .compartmentIdInSubtree(reportCompartmentIdInSubtree)
                .displayName(reportDisplayName)
                .reportDefinitionId(testReportDefinition.id())
                .state(reportState)
                .type(reportType)
                .build());
    
        }
    }
    
    variables:
      testReports:
        fn::invoke:
          Function: oci:DataSafe:getReports
          Arguments:
            compartmentId: ${compartmentId}
            accessLevel: ${reportAccessLevel}
            compartmentIdInSubtree: ${reportCompartmentIdInSubtree}
            displayName: ${reportDisplayName}
            reportDefinitionId: ${testReportDefinition.id}
            state: ${reportState}
            type: ${reportType}
    

    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 Sequence[datasafe.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 Sequence[datasafe.GetReportsReportCollection]
    The list of report_collection.
    access_level str
    compartment_id_in_subtree bool
    display_name str
    Name of the report.
    filters Sequence[datasafe.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.41.0 published on Wednesday, Jun 19, 2024 by Pulumi