Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.DataSafe.getReports
Explore with Pulumi AI
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:
- 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.
- Type string
- An optional filter to return only resources that match the specified type.
- 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.
- Type string
- An optional filter to return only resources that match the specified type.
- 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.
- type String
- An optional filter to return only resources that match the specified type.
- 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.
- 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_ 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
Sequence[datasafe.
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.
- type str
- An optional filter to return only resources that match the specified type.
- 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.
- type String
- An optional filter to return only resources that match the specified type.
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 audit report.
- Type string
- The type of the audit 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 audit report.
- Type string
- The type of the audit 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 audit report.
- type String
- The type of the audit 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 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.Get Reports Report Collection] - The list of report_collection.
- access_
level str - compartment_
id_ boolin_ subtree - display_
name str - Name of the report.
- filters
Sequence[datasafe.
Get Reports Filter] - report_
definition_ strid - The OCID of the report definition.
- state str
- The current state of the audit report.
- type str
- The type of the audit 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 audit report.
- type String
- The type of the audit 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 .xls or .pdf
- Report
Definition stringId - The ID of the report definition to filter the list of reports
- Report
Id string - 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 date and time the report was generated.
- Type string
- An optional filter to return only resources that match the specified type.
- 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 .xls or .pdf
- Report
Definition stringId - The ID of the report definition to filter the list of reports
- Report
Id string - 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 date and time the report was generated.
- Type string
- An optional filter to return only resources that match the specified type.
- 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 .xls or .pdf
- report
Definition StringId - The ID of the report definition to filter the list of reports
- report
Id String - 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 date and time the report was generated.
- type String
- An optional filter to return only resources that match the specified type.
- 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 .xls or .pdf
- report
Definition stringId - The ID of the report definition to filter the list of reports
- report
Id string - 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 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.
- 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 .xls or .pdf
- report_
definition_ strid - 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.
- 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.
- 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 .xls or .pdf
- report
Definition StringId - The ID of the report definition to filter the list of reports
- report
Id String - 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 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.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi