Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getReports

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

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testReports = Output.Create(Oci.DataSafe.GetReports.InvokeAsync(new Oci.DataSafe.GetReportsArgs
        {
            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,
        }));
    }

}
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),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

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"])
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,
});

Coming soon!

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,
                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,
                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.

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.

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.

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.

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.

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.

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 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 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 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 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 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 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 excel or pdf

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.

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 time at which the report was generated.

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 excel or pdf

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.

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 time at which the report was generated.

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 excel or pdf

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.

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 time at which the report was generated.

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 excel or pdf

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.

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 time at which the report was generated.

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 excel or pdf

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.

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 time at which the report was generated.

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 excel or pdf

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.

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 time at which the report was generated.

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.