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[_datasafe.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[_datasafe.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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DataSafe/getSqlCollectionAnalytics:getSqlCollectionAnalytics
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.
- Filters
List<Get
Sql Collection Analytics Filter> - Group
Bies List<string> - The group by parameter to summarize SQL collection aggregation.
- State string
- The current state of the SQL collection.
- Target
Id string - A filter to return only items related to a specific target OCID.
- Time
Ended 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.
- Time
Started 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 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.
- Filters
[]Get
Sql Collection Analytics Filter - Group
Bies []string - The group by parameter to summarize SQL collection aggregation.
- State string
- The current state of the SQL collection.
- Target
Id string - A filter to return only items related to a specific target OCID.
- Time
Ended 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.
- Time
Started 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 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.
- filters
List<Get
Sql Collection Analytics Filter> - group
Bies List<String> - The group by parameter to summarize SQL collection aggregation.
- state String
- The current state of the SQL collection.
- target
Id String - A filter to return only items related to a specific target OCID.
- time
Ended 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.
- time
Started 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 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.
- filters
Get
Sql Collection Analytics Filter[] - group
Bies string[] - The group by parameter to summarize SQL collection aggregation.
- state string
- The current state of the SQL collection.
- target
Id string - A filter to return only items related to a specific target OCID.
- time
Ended 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.
- time
Started 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[datasafe.
Get Sql 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.
- 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.
- filters List<Property Map>
- group
Bies List<String> - The group by parameter to summarize SQL collection aggregation.
- state String
- The current state of the SQL collection.
- target
Id String - A filter to return only items related to a specific target OCID.
- time
Ended 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.
- time
Started 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:
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Sql
Collection List<GetAnalytics Collections Sql Collection Analytics Sql Collection Analytics Collection> - The list of sql_collection_analytics_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Filters
List<Get
Sql Collection Analytics Filter> - Group
Bies List<string> - State string
- The current state of the SQL collection.
- Target
Id string - The OCID of the target corresponding to the security policy deployment.
- Time
Ended string - Time
Started string
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Sql
Collection []GetAnalytics Collections Sql Collection Analytics Sql Collection Analytics Collection - The list of sql_collection_analytics_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Filters
[]Get
Sql Collection Analytics Filter - Group
Bies []string - State string
- The current state of the SQL collection.
- Target
Id string - The OCID of the target corresponding to the security policy deployment.
- Time
Ended string - Time
Started string
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- sql
Collection List<GetAnalytics Collections Sql Collection Analytics Sql Collection Analytics Collection> - The list of sql_collection_analytics_collection.
- access
Level String - compartment
Id BooleanIn Subtree - filters
List<Get
Sql Collection Analytics Filter> - group
Bies List<String> - state String
- The current state of the SQL collection.
- target
Id String - The OCID of the target corresponding to the security policy deployment.
- time
Ended String - time
Started String
- compartment
Id string - id string
- The provider-assigned unique ID for this managed resource.
- sql
Collection GetAnalytics Collections Sql Collection Analytics Sql Collection Analytics Collection[] - The list of sql_collection_analytics_collection.
- access
Level string - compartment
Id booleanIn Subtree - filters
Get
Sql Collection Analytics Filter[] - group
Bies string[] - state string
- The current state of the SQL collection.
- target
Id string - The OCID of the target corresponding to the security policy deployment.
- time
Ended string - time
Started string
- compartment_
id str - id str
- The provider-assigned unique ID for this managed resource.
- sql_
collection_ Sequence[datasafe.analytics_ collections Get Sql Collection Analytics Sql Collection Analytics Collection] - The list of sql_collection_analytics_collection.
- access_
level str - compartment_
id_ boolin_ subtree - filters
Sequence[datasafe.
Get Sql 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
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- sql
Collection List<Property Map>Analytics Collections - The list of sql_collection_analytics_collection.
- access
Level String - compartment
Id BooleanIn Subtree - filters List<Property Map>
- group
Bies List<String> - state String
- The current state of the SQL collection.
- target
Id String - The OCID of the target corresponding to the security policy deployment.
- time
Ended String - time
Started String
Supporting Types
GetSqlCollectionAnalyticsFilter
GetSqlCollectionAnalyticsSqlCollectionAnalyticsCollection
- Items
List<Get
Sql Collection Analytics Sql Collection Analytics Collection Item> - The aggregated data point items.
- Items
[]Get
Sql Collection Analytics Sql Collection Analytics Collection Item - The aggregated data point items.
- items
List<Get
Sql Collection Analytics Sql Collection Analytics Collection Item> - The aggregated data point items.
- items
Get
Sql Collection Analytics Sql Collection Analytics Collection Item[] - The aggregated data point items.
- items
Sequence[datasafe.
Get Sql Collection Analytics Sql Collection Analytics Collection Item] - The aggregated data point items.
- items List<Property Map>
- The aggregated data point items.
GetSqlCollectionAnalyticsSqlCollectionAnalyticsCollectionItem
- Dimensions
List<Get
Sql Collection Analytics Sql Collection Analytics Collection Item Dimension> - The dimensions available for SQL collection analytics.
- Sql
Collection stringAnalytic Count - The total count of the aggregated metric.
- Dimensions
[]Get
Sql Collection Analytics Sql Collection Analytics Collection Item Dimension - The dimensions available for SQL collection analytics.
- Sql
Collection stringAnalytic Count - The total count of the aggregated metric.
- dimensions
List<Get
Sql Collection Analytics Sql Collection Analytics Collection Item Dimension> - The dimensions available for SQL collection analytics.
- sql
Collection StringAnalytic Count - The total count of the aggregated metric.
- dimensions
Get
Sql Collection Analytics Sql Collection Analytics Collection Item Dimension[] - The dimensions available for SQL collection analytics.
- sql
Collection stringAnalytic Count - The total count of the aggregated metric.
- dimensions
Sequence[datasafe.
Get Sql 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.
- sql
Collection 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
oci
Terraform Provider.