oci.DataSafe.getSqlCollectionAnalytics
Explore with Pulumi AI
This data source provides the list of Sql Collection Analytics in Oracle Cloud Infrastructure Data Safe service.
Retrieves a list of all SQL collection analytics in Data Safe.
The ListSqlCollectionAnalytics operation returns only the analytics for the SQL collections in the specified compartmentId.
The parameter accessLevel specifies whether to return only those compartments for which the
requestor has INSPECT permissions on at least one resource directly
or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if
Principal doesn’t have access to even one of the child compartments. This is valid only when
compartmentIdInSubtree is set to true.
The parameter compartmentIdInSubtree applies when you perform ListSqlCollections on the
compartmentId passed and when it is set to true, the entire hierarchy of compartments can be returned.
To get a full list of all compartments and subcompartments in the tenancy (root compartment),
set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSqlCollectionAnalytics = oci.DataSafe.getSqlCollectionAnalytics({
    compartmentId: compartmentId,
    accessLevel: sqlCollectionAnalyticAccessLevel,
    compartmentIdInSubtree: sqlCollectionAnalyticCompartmentIdInSubtree,
    groupBies: sqlCollectionAnalyticGroupBy,
    state: sqlCollectionAnalyticState,
    targetId: testTarget.id,
    timeEnded: sqlCollectionAnalyticTimeEnded,
    timeStarted: sqlCollectionAnalyticTimeStarted,
});
import pulumi
import pulumi_oci as oci
test_sql_collection_analytics = oci.DataSafe.get_sql_collection_analytics(compartment_id=compartment_id,
    access_level=sql_collection_analytic_access_level,
    compartment_id_in_subtree=sql_collection_analytic_compartment_id_in_subtree,
    group_bies=sql_collection_analytic_group_by,
    state=sql_collection_analytic_state,
    target_id=test_target["id"],
    time_ended=sql_collection_analytic_time_ended,
    time_started=sql_collection_analytic_time_started)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/datasafe"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datasafe.GetSqlCollectionAnalytics(ctx, &datasafe.GetSqlCollectionAnalyticsArgs{
			CompartmentId:          compartmentId,
			AccessLevel:            pulumi.StringRef(sqlCollectionAnalyticAccessLevel),
			CompartmentIdInSubtree: pulumi.BoolRef(sqlCollectionAnalyticCompartmentIdInSubtree),
			GroupBies:              sqlCollectionAnalyticGroupBy,
			State:                  pulumi.StringRef(sqlCollectionAnalyticState),
			TargetId:               pulumi.StringRef(testTarget.Id),
			TimeEnded:              pulumi.StringRef(sqlCollectionAnalyticTimeEnded),
			TimeStarted:            pulumi.StringRef(sqlCollectionAnalyticTimeStarted),
		}, 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 testSqlCollectionAnalytics = Oci.DataSafe.GetSqlCollectionAnalytics.Invoke(new()
    {
        CompartmentId = compartmentId,
        AccessLevel = sqlCollectionAnalyticAccessLevel,
        CompartmentIdInSubtree = sqlCollectionAnalyticCompartmentIdInSubtree,
        GroupBies = sqlCollectionAnalyticGroupBy,
        State = sqlCollectionAnalyticState,
        TargetId = testTarget.Id,
        TimeEnded = sqlCollectionAnalyticTimeEnded,
        TimeStarted = sqlCollectionAnalyticTimeStarted,
    });
});
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.GetSqlCollectionAnalyticsArgs;
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 testSqlCollectionAnalytics = DataSafeFunctions.getSqlCollectionAnalytics(GetSqlCollectionAnalyticsArgs.builder()
            .compartmentId(compartmentId)
            .accessLevel(sqlCollectionAnalyticAccessLevel)
            .compartmentIdInSubtree(sqlCollectionAnalyticCompartmentIdInSubtree)
            .groupBies(sqlCollectionAnalyticGroupBy)
            .state(sqlCollectionAnalyticState)
            .targetId(testTarget.id())
            .timeEnded(sqlCollectionAnalyticTimeEnded)
            .timeStarted(sqlCollectionAnalyticTimeStarted)
            .build());
    }
}
variables:
  testSqlCollectionAnalytics:
    fn::invoke:
      function: oci:DataSafe:getSqlCollectionAnalytics
      arguments:
        compartmentId: ${compartmentId}
        accessLevel: ${sqlCollectionAnalyticAccessLevel}
        compartmentIdInSubtree: ${sqlCollectionAnalyticCompartmentIdInSubtree}
        groupBies: ${sqlCollectionAnalyticGroupBy}
        state: ${sqlCollectionAnalyticState}
        targetId: ${testTarget.id}
        timeEnded: ${sqlCollectionAnalyticTimeEnded}
        timeStarted: ${sqlCollectionAnalyticTimeStarted}
Using getSqlCollectionAnalytics
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 getSqlCollectionAnalytics(args: GetSqlCollectionAnalyticsArgs, opts?: InvokeOptions): Promise<GetSqlCollectionAnalyticsResult>
function getSqlCollectionAnalyticsOutput(args: GetSqlCollectionAnalyticsOutputArgs, opts?: InvokeOptions): Output<GetSqlCollectionAnalyticsResult>def get_sql_collection_analytics(access_level: Optional[str] = None,
                                 compartment_id: Optional[str] = None,
                                 compartment_id_in_subtree: Optional[bool] = None,
                                 filters: Optional[Sequence[GetSqlCollectionAnalyticsFilter]] = None,
                                 group_bies: Optional[Sequence[str]] = None,
                                 state: Optional[str] = None,
                                 target_id: Optional[str] = None,
                                 time_ended: Optional[str] = None,
                                 time_started: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetSqlCollectionAnalyticsResult
def get_sql_collection_analytics_output(access_level: Optional[pulumi.Input[str]] = None,
                                 compartment_id: Optional[pulumi.Input[str]] = None,
                                 compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                                 filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSqlCollectionAnalyticsFilterArgs]]]] = None,
                                 group_bies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                 state: Optional[pulumi.Input[str]] = None,
                                 target_id: Optional[pulumi.Input[str]] = None,
                                 time_ended: Optional[pulumi.Input[str]] = None,
                                 time_started: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetSqlCollectionAnalyticsResult]func GetSqlCollectionAnalytics(ctx *Context, args *GetSqlCollectionAnalyticsArgs, opts ...InvokeOption) (*GetSqlCollectionAnalyticsResult, error)
func GetSqlCollectionAnalyticsOutput(ctx *Context, args *GetSqlCollectionAnalyticsOutputArgs, opts ...InvokeOption) GetSqlCollectionAnalyticsResultOutput> Note: This function is named GetSqlCollectionAnalytics in the Go SDK.
public static class GetSqlCollectionAnalytics 
{
    public static Task<GetSqlCollectionAnalyticsResult> InvokeAsync(GetSqlCollectionAnalyticsArgs args, InvokeOptions? opts = null)
    public static Output<GetSqlCollectionAnalyticsResult> Invoke(GetSqlCollectionAnalyticsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSqlCollectionAnalyticsResult> getSqlCollectionAnalytics(GetSqlCollectionAnalyticsArgs args, InvokeOptions options)
public static Output<GetSqlCollectionAnalyticsResult> getSqlCollectionAnalytics(GetSqlCollectionAnalyticsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DataSafe/getSqlCollectionAnalytics:getSqlCollectionAnalytics
  arguments:
    # arguments dictionaryThe 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.
- CompartmentId 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.
- Filters
List<GetSql Collection Analytics Filter> 
- GroupBies List<string>
- The group by parameter to summarize SQL collection aggregation.
- State string
- The current state of the SQL collection.
- TargetId string
- A filter to return only items related to a specific target OCID.
- TimeEnded string
- An optional filter to return the stats of the SQL collection logs collected before the date-time specified, in the format defined by RFC3339.
- TimeStarted string
- An optional filter to return the stats of the SQL collection logs collected after the date-time specified, in the format defined by RFC3339.
- 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.
- CompartmentId 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.
- Filters
[]GetSql Collection Analytics Filter 
- GroupBies []string
- The group by parameter to summarize SQL collection aggregation.
- State string
- The current state of the SQL collection.
- TargetId string
- A filter to return only items related to a specific target OCID.
- TimeEnded string
- An optional filter to return the stats of the SQL collection logs collected before the date-time specified, in the format defined by RFC3339.
- TimeStarted string
- An optional filter to return the stats of the SQL collection logs collected after the date-time specified, in the format defined by RFC3339.
- 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.
- compartmentId 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.
- filters
List<GetSql Collection Analytics Filter> 
- groupBies List<String>
- The group by parameter to summarize SQL collection aggregation.
- state String
- The current state of the SQL collection.
- targetId String
- A filter to return only items related to a specific target OCID.
- timeEnded String
- An optional filter to return the stats of the SQL collection logs collected before the date-time specified, in the format defined by RFC3339.
- timeStarted String
- An optional filter to return the stats of the SQL collection logs collected after the date-time specified, in the format defined by RFC3339.
- 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.
- compartmentId 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.
- filters
GetSql Collection Analytics Filter[] 
- groupBies string[]
- The group by parameter to summarize SQL collection aggregation.
- state string
- The current state of the SQL collection.
- targetId string
- A filter to return only items related to a specific target OCID.
- timeEnded string
- An optional filter to return the stats of the SQL collection logs collected before the date-time specified, in the format defined by RFC3339.
- timeStarted string
- An optional filter to return the stats of the SQL collection logs collected after the date-time specified, in the format defined by RFC3339.
- 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.
- filters
Sequence[GetSql Collection Analytics Filter] 
- group_bies Sequence[str]
- The group by parameter to summarize SQL collection aggregation.
- state str
- The current state of the SQL collection.
- target_id str
- A filter to return only items related to a specific target OCID.
- time_ended str
- An optional filter to return the stats of the SQL collection logs collected before the date-time specified, in the format defined by RFC3339.
- time_started str
- An optional filter to return the stats of the SQL collection logs collected after the date-time specified, in the format defined by RFC3339.
- 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.
- compartmentId 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.
- filters List<Property Map>
- groupBies List<String>
- The group by parameter to summarize SQL collection aggregation.
- state String
- The current state of the SQL collection.
- targetId String
- A filter to return only items related to a specific target OCID.
- timeEnded String
- An optional filter to return the stats of the SQL collection logs collected before the date-time specified, in the format defined by RFC3339.
- timeStarted String
- An optional filter to return the stats of the SQL collection logs collected after the date-time specified, in the format defined by RFC3339.
getSqlCollectionAnalytics Result
The following output properties are available:
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- SqlCollection List<GetAnalytics Collections Sql Collection Analytics Sql Collection Analytics Collection> 
- The list of sql_collection_analytics_collection.
- AccessLevel string
- CompartmentId boolIn Subtree 
- Filters
List<GetSql Collection Analytics Filter> 
- GroupBies List<string>
- State string
- The current state of the SQL collection.
- TargetId string
- The OCID of the target corresponding to the security policy deployment.
- TimeEnded string
- TimeStarted string
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- SqlCollection []GetAnalytics Collections Sql Collection Analytics Sql Collection Analytics Collection 
- The list of sql_collection_analytics_collection.
- AccessLevel string
- CompartmentId boolIn Subtree 
- Filters
[]GetSql Collection Analytics Filter 
- GroupBies []string
- State string
- The current state of the SQL collection.
- TargetId string
- The OCID of the target corresponding to the security policy deployment.
- TimeEnded string
- TimeStarted string
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- sqlCollection List<GetAnalytics Collections Sql Collection Analytics Sql Collection Analytics Collection> 
- The list of sql_collection_analytics_collection.
- accessLevel String
- compartmentId BooleanIn Subtree 
- filters
List<GetSql Collection Analytics Filter> 
- groupBies List<String>
- state String
- The current state of the SQL collection.
- targetId String
- The OCID of the target corresponding to the security policy deployment.
- timeEnded String
- timeStarted String
- compartmentId string
- id string
- The provider-assigned unique ID for this managed resource.
- sqlCollection GetAnalytics Collections Sql Collection Analytics Sql Collection Analytics Collection[] 
- The list of sql_collection_analytics_collection.
- accessLevel string
- compartmentId booleanIn Subtree 
- filters
GetSql Collection Analytics Filter[] 
- groupBies string[]
- state string
- The current state of the SQL collection.
- targetId string
- The OCID of the target corresponding to the security policy deployment.
- timeEnded string
- timeStarted string
- compartment_id str
- id str
- The provider-assigned unique ID for this managed resource.
- sql_collection_ Sequence[Getanalytics_ collections Sql Collection Analytics Sql Collection Analytics Collection] 
- The list of sql_collection_analytics_collection.
- access_level str
- compartment_id_ boolin_ subtree 
- filters
Sequence[GetSql Collection Analytics Filter] 
- group_bies Sequence[str]
- state str
- The current state of the SQL collection.
- target_id str
- The OCID of the target corresponding to the security policy deployment.
- time_ended str
- time_started str
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- sqlCollection List<Property Map>Analytics Collections 
- The list of sql_collection_analytics_collection.
- accessLevel String
- compartmentId BooleanIn Subtree 
- filters List<Property Map>
- groupBies List<String>
- state String
- The current state of the SQL collection.
- targetId String
- The OCID of the target corresponding to the security policy deployment.
- timeEnded String
- timeStarted String
Supporting Types
GetSqlCollectionAnalyticsFilter    
GetSqlCollectionAnalyticsSqlCollectionAnalyticsCollection       
- Items
List<GetSql Collection Analytics Sql Collection Analytics Collection Item> 
- The aggregated data point items.
- Items
[]GetSql Collection Analytics Sql Collection Analytics Collection Item 
- The aggregated data point items.
- items
List<GetSql Collection Analytics Sql Collection Analytics Collection Item> 
- The aggregated data point items.
- items
GetSql Collection Analytics Sql Collection Analytics Collection Item[] 
- The aggregated data point items.
- items
Sequence[GetSql Collection Analytics Sql Collection Analytics Collection Item] 
- The aggregated data point items.
- items List<Property Map>
- The aggregated data point items.
GetSqlCollectionAnalyticsSqlCollectionAnalyticsCollectionItem        
- Dimensions
List<GetSql Collection Analytics Sql Collection Analytics Collection Item Dimension> 
- The dimensions available for SQL collection analytics.
- SqlCollection stringAnalytic Count 
- The total count of the aggregated metric.
- Dimensions
[]GetSql Collection Analytics Sql Collection Analytics Collection Item Dimension 
- The dimensions available for SQL collection analytics.
- SqlCollection stringAnalytic Count 
- The total count of the aggregated metric.
- dimensions
List<GetSql Collection Analytics Sql Collection Analytics Collection Item Dimension> 
- The dimensions available for SQL collection analytics.
- sqlCollection StringAnalytic Count 
- The total count of the aggregated metric.
- dimensions
GetSql Collection Analytics Sql Collection Analytics Collection Item Dimension[] 
- The dimensions available for SQL collection analytics.
- sqlCollection stringAnalytic Count 
- The total count of the aggregated metric.
- dimensions
Sequence[GetSql Collection Analytics Sql Collection Analytics Collection Item Dimension] 
- The dimensions available for SQL collection analytics.
- sql_collection_ stranalytic_ count 
- The total count of the aggregated metric.
- dimensions List<Property Map>
- The dimensions available for SQL collection analytics.
- sqlCollection StringAnalytic Count 
- The total count of the aggregated metric.
GetSqlCollectionAnalyticsSqlCollectionAnalyticsCollectionItemDimension         
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.