Oracle Cloud Infrastructure
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:
- 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 The name of the report definition to query.
- Filters
List<Get
Reports Filter> - Report
Definition stringId 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 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 The name of the report definition to query.
- Filters
[]Get
Reports Filter - Report
Definition stringId 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 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 The name of the report definition to query.
- filters
List<Get
Reports Filter> - report
Definition StringId 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 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 The name of the report definition to query.
- filters
Get
Reports Filter[] - report
Definition stringId 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_ 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 The name of the report definition to query.
- filters
Get
Reports Filter] - report_
definition_ strid 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.
- 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 The name of the report definition to query.
- filters List<Property Map>
- report
Definition StringId 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:
- Compartment
Id string The OCID of the compartment containing the report.
- Id string
The provider-assigned unique ID for this managed resource.
- Report
Collections List<GetReports Report Collection> The list of report_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Display
Name string Name of the report.
- Filters
List<Get
Reports Filter> - Report
Definition stringId The OCID of the report definition.
- State string
The current state of the report.
- Compartment
Id string The OCID of the compartment containing the report.
- Id string
The provider-assigned unique ID for this managed resource.
- Report
Collections []GetReports Report Collection The list of report_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Display
Name string Name of the report.
- Filters
[]Get
Reports Filter - Report
Definition stringId The OCID of the report definition.
- State string
The current state of the report.
- compartment
Id String The OCID of the compartment containing the report.
- id String
The provider-assigned unique ID for this managed resource.
- report
Collections List<GetReports Report Collection> The list of report_collection.
- access
Level String - compartment
Id BooleanIn Subtree - display
Name String Name of the report.
- filters
List<Get
Reports Filter> - report
Definition StringId The OCID of the report definition.
- state String
The current state of the report.
- compartment
Id string The OCID of the compartment containing the report.
- id string
The provider-assigned unique ID for this managed resource.
- report
Collections GetReports Report Collection[] The list of report_collection.
- access
Level string - compartment
Id booleanIn Subtree - display
Name string Name of the report.
- filters
Get
Reports Filter[] - report
Definition stringId 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 GetReports Report Collection] The list of report_collection.
- access_
level str - compartment_
id_ boolin_ subtree - display_
name str Name of the report.
- filters
Get
Reports Filter] - report_
definition_ strid The OCID of the report definition.
- state str
The current state of the report.
- compartment
Id String The OCID of the compartment containing the report.
- id String
The provider-assigned unique ID for this managed resource.
- report
Collections List<Property Map> The list of report_collection.
- access
Level String - compartment
Id BooleanIn Subtree - display
Name String Name of the report.
- filters List<Property Map>
- report
Definition StringId The OCID of the report definition.
- state String
The current state of the report.
Supporting Types
GetReportsFilter
GetReportsReportCollection
GetReportsReportCollectionItem
- 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
Specifies a description of the report.
- Display
Name string The name of the report definition to query.
- 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.
- Mime
Type string Specifies the format of report to be excel or pdf
- Report
Definition stringId 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.
- 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"}
- Time
Generated string Specifies the time at which the report was generated.
- 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
Specifies a description of the report.
- Display
Name string The name of the report definition to query.
- 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.
- Mime
Type string Specifies the format of report to be excel or pdf
- Report
Definition stringId 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.
- 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"}
- Time
Generated string Specifies the time at which the report was generated.
- 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
Specifies a description of the report.
- display
Name String The name of the report definition to query.
- 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.
- mime
Type String Specifies the format of report to be excel or pdf
- report
Definition StringId 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.
- 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"}
- time
Generated String Specifies the time at which the report was generated.
- 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
Specifies a description of the report.
- display
Name string The name of the report definition to query.
- {[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.
- mime
Type string Specifies the format of report to be excel or pdf
- report
Definition stringId 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.
- {[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"}
- time
Generated 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.
- 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.
- 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_ strid 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.
- 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.
- 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
Specifies a description of the report.
- display
Name String The name of the report definition to query.
- 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.
- mime
Type String Specifies the format of report to be excel or pdf
- report
Definition StringId 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.
- 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"}
- time
Generated 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.