oci.DataSafe.getSqlFirewallPolicyAnalytics
Explore with Pulumi AI
This data source provides the list of Sql Firewall Policy Analytics in Oracle Cloud Infrastructure Data Safe service.
Gets a list of aggregated SQL Firewall policy details.
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 SummarizedSqlFirewallPolicyInfo on the specified
compartmentId
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 testSqlFirewallPolicyAnalytics = oci.DataSafe.getSqlFirewallPolicyAnalytics({
compartmentId: compartmentId,
accessLevel: sqlFirewallPolicyAnalyticAccessLevel,
compartmentIdInSubtree: sqlFirewallPolicyAnalyticCompartmentIdInSubtree,
groupBies: sqlFirewallPolicyAnalyticGroupBy,
securityPolicyId: testSecurityPolicy.id,
state: sqlFirewallPolicyAnalyticState,
timeEnded: sqlFirewallPolicyAnalyticTimeEnded,
timeStarted: sqlFirewallPolicyAnalyticTimeStarted,
});
import pulumi
import pulumi_oci as oci
test_sql_firewall_policy_analytics = oci.DataSafe.get_sql_firewall_policy_analytics(compartment_id=compartment_id,
access_level=sql_firewall_policy_analytic_access_level,
compartment_id_in_subtree=sql_firewall_policy_analytic_compartment_id_in_subtree,
group_bies=sql_firewall_policy_analytic_group_by,
security_policy_id=test_security_policy["id"],
state=sql_firewall_policy_analytic_state,
time_ended=sql_firewall_policy_analytic_time_ended,
time_started=sql_firewall_policy_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.GetSqlFirewallPolicyAnalytics(ctx, &datasafe.GetSqlFirewallPolicyAnalyticsArgs{
CompartmentId: compartmentId,
AccessLevel: pulumi.StringRef(sqlFirewallPolicyAnalyticAccessLevel),
CompartmentIdInSubtree: pulumi.BoolRef(sqlFirewallPolicyAnalyticCompartmentIdInSubtree),
GroupBies: sqlFirewallPolicyAnalyticGroupBy,
SecurityPolicyId: pulumi.StringRef(testSecurityPolicy.Id),
State: pulumi.StringRef(sqlFirewallPolicyAnalyticState),
TimeEnded: pulumi.StringRef(sqlFirewallPolicyAnalyticTimeEnded),
TimeStarted: pulumi.StringRef(sqlFirewallPolicyAnalyticTimeStarted),
}, 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 testSqlFirewallPolicyAnalytics = Oci.DataSafe.GetSqlFirewallPolicyAnalytics.Invoke(new()
{
CompartmentId = compartmentId,
AccessLevel = sqlFirewallPolicyAnalyticAccessLevel,
CompartmentIdInSubtree = sqlFirewallPolicyAnalyticCompartmentIdInSubtree,
GroupBies = sqlFirewallPolicyAnalyticGroupBy,
SecurityPolicyId = testSecurityPolicy.Id,
State = sqlFirewallPolicyAnalyticState,
TimeEnded = sqlFirewallPolicyAnalyticTimeEnded,
TimeStarted = sqlFirewallPolicyAnalyticTimeStarted,
});
});
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.GetSqlFirewallPolicyAnalyticsArgs;
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 testSqlFirewallPolicyAnalytics = DataSafeFunctions.getSqlFirewallPolicyAnalytics(GetSqlFirewallPolicyAnalyticsArgs.builder()
.compartmentId(compartmentId)
.accessLevel(sqlFirewallPolicyAnalyticAccessLevel)
.compartmentIdInSubtree(sqlFirewallPolicyAnalyticCompartmentIdInSubtree)
.groupBies(sqlFirewallPolicyAnalyticGroupBy)
.securityPolicyId(testSecurityPolicy.id())
.state(sqlFirewallPolicyAnalyticState)
.timeEnded(sqlFirewallPolicyAnalyticTimeEnded)
.timeStarted(sqlFirewallPolicyAnalyticTimeStarted)
.build());
}
}
variables:
testSqlFirewallPolicyAnalytics:
fn::invoke:
Function: oci:DataSafe:getSqlFirewallPolicyAnalytics
Arguments:
compartmentId: ${compartmentId}
accessLevel: ${sqlFirewallPolicyAnalyticAccessLevel}
compartmentIdInSubtree: ${sqlFirewallPolicyAnalyticCompartmentIdInSubtree}
groupBies: ${sqlFirewallPolicyAnalyticGroupBy}
securityPolicyId: ${testSecurityPolicy.id}
state: ${sqlFirewallPolicyAnalyticState}
timeEnded: ${sqlFirewallPolicyAnalyticTimeEnded}
timeStarted: ${sqlFirewallPolicyAnalyticTimeStarted}
Using getSqlFirewallPolicyAnalytics
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 getSqlFirewallPolicyAnalytics(args: GetSqlFirewallPolicyAnalyticsArgs, opts?: InvokeOptions): Promise<GetSqlFirewallPolicyAnalyticsResult>
function getSqlFirewallPolicyAnalyticsOutput(args: GetSqlFirewallPolicyAnalyticsOutputArgs, opts?: InvokeOptions): Output<GetSqlFirewallPolicyAnalyticsResult>
def get_sql_firewall_policy_analytics(access_level: Optional[str] = None,
compartment_id: Optional[str] = None,
compartment_id_in_subtree: Optional[bool] = None,
filters: Optional[Sequence[_datasafe.GetSqlFirewallPolicyAnalyticsFilter]] = None,
group_bies: Optional[Sequence[str]] = None,
security_policy_id: Optional[str] = None,
state: Optional[str] = None,
time_ended: Optional[str] = None,
time_started: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSqlFirewallPolicyAnalyticsResult
def get_sql_firewall_policy_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.GetSqlFirewallPolicyAnalyticsFilterArgs]]]] = None,
group_bies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
security_policy_id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
time_ended: Optional[pulumi.Input[str]] = None,
time_started: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSqlFirewallPolicyAnalyticsResult]
func GetSqlFirewallPolicyAnalytics(ctx *Context, args *GetSqlFirewallPolicyAnalyticsArgs, opts ...InvokeOption) (*GetSqlFirewallPolicyAnalyticsResult, error)
func GetSqlFirewallPolicyAnalyticsOutput(ctx *Context, args *GetSqlFirewallPolicyAnalyticsOutputArgs, opts ...InvokeOption) GetSqlFirewallPolicyAnalyticsResultOutput
> Note: This function is named GetSqlFirewallPolicyAnalytics
in the Go SDK.
public static class GetSqlFirewallPolicyAnalytics
{
public static Task<GetSqlFirewallPolicyAnalyticsResult> InvokeAsync(GetSqlFirewallPolicyAnalyticsArgs args, InvokeOptions? opts = null)
public static Output<GetSqlFirewallPolicyAnalyticsResult> Invoke(GetSqlFirewallPolicyAnalyticsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSqlFirewallPolicyAnalyticsResult> getSqlFirewallPolicyAnalytics(GetSqlFirewallPolicyAnalyticsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DataSafe/getSqlFirewallPolicyAnalytics:getSqlFirewallPolicyAnalytics
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 Firewall Policy Analytics Filter> - Group
Bies List<string> - The group by parameter to summarize SQL Firewall policy aggregation.
- Security
Policy stringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- State string
- The current state of the SQL Firewall policy.
- Time
Ended string - An optional filter to return the summary of the SQL Firewall policies created before the date-time specified, in the format defined by RFC3339.
- Time
Started string - An optional filter to return the summary of the SQL Firewall policies created 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 Firewall Policy Analytics Filter - Group
Bies []string - The group by parameter to summarize SQL Firewall policy aggregation.
- Security
Policy stringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- State string
- The current state of the SQL Firewall policy.
- Time
Ended string - An optional filter to return the summary of the SQL Firewall policies created before the date-time specified, in the format defined by RFC3339.
- Time
Started string - An optional filter to return the summary of the SQL Firewall policies created 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 Firewall Policy Analytics Filter> - group
Bies List<String> - The group by parameter to summarize SQL Firewall policy aggregation.
- security
Policy StringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- state String
- The current state of the SQL Firewall policy.
- time
Ended String - An optional filter to return the summary of the SQL Firewall policies created before the date-time specified, in the format defined by RFC3339.
- time
Started String - An optional filter to return the summary of the SQL Firewall policies created 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 Firewall Policy Analytics Filter[] - group
Bies string[] - The group by parameter to summarize SQL Firewall policy aggregation.
- security
Policy stringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- state string
- The current state of the SQL Firewall policy.
- time
Ended string - An optional filter to return the summary of the SQL Firewall policies created before the date-time specified, in the format defined by RFC3339.
- time
Started string - An optional filter to return the summary of the SQL Firewall policies created 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 Firewall Policy Analytics Filter] - group_
bies Sequence[str] - The group by parameter to summarize SQL Firewall policy aggregation.
- security_
policy_ strid - An optional filter to return only resources that match the specified OCID of the security policy resource.
- state str
- The current state of the SQL Firewall policy.
- time_
ended str - An optional filter to return the summary of the SQL Firewall policies created before the date-time specified, in the format defined by RFC3339.
- time_
started str - An optional filter to return the summary of the SQL Firewall policies created 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 Firewall policy aggregation.
- security
Policy StringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- state String
- The current state of the SQL Firewall policy.
- time
Ended String - An optional filter to return the summary of the SQL Firewall policies created before the date-time specified, in the format defined by RFC3339.
- time
Started String - An optional filter to return the summary of the SQL Firewall policies created after the date-time specified, in the format defined by RFC3339.
getSqlFirewallPolicyAnalytics Result
The following output properties are available:
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Sql
Firewall List<GetPolicy Analytics Collections Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection> - The list of sql_firewall_policy_analytics_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Filters
List<Get
Sql Firewall Policy Analytics Filter> - Group
Bies List<string> - Security
Policy stringId - The OCID of the security policy corresponding to the SQL Firewall policy.
- State string
- The current state of the SQL Firewall policy.
- Time
Ended string - Time
Started string
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Sql
Firewall []GetPolicy Analytics Collections Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection - The list of sql_firewall_policy_analytics_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Filters
[]Get
Sql Firewall Policy Analytics Filter - Group
Bies []string - Security
Policy stringId - The OCID of the security policy corresponding to the SQL Firewall policy.
- State string
- The current state of the SQL Firewall policy.
- Time
Ended string - Time
Started string
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- sql
Firewall List<GetPolicy Analytics Collections Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection> - The list of sql_firewall_policy_analytics_collection.
- access
Level String - compartment
Id BooleanIn Subtree - filters
List<Get
Sql Firewall Policy Analytics Filter> - group
Bies List<String> - security
Policy StringId - The OCID of the security policy corresponding to the SQL Firewall policy.
- state String
- The current state of the SQL Firewall policy.
- time
Ended String - time
Started String
- compartment
Id string - id string
- The provider-assigned unique ID for this managed resource.
- sql
Firewall GetPolicy Analytics Collections Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection[] - The list of sql_firewall_policy_analytics_collection.
- access
Level string - compartment
Id booleanIn Subtree - filters
Get
Sql Firewall Policy Analytics Filter[] - group
Bies string[] - security
Policy stringId - The OCID of the security policy corresponding to the SQL Firewall policy.
- state string
- The current state of the SQL Firewall policy.
- time
Ended string - time
Started string
- compartment_
id str - id str
- The provider-assigned unique ID for this managed resource.
- sql_
firewall_ Sequence[datasafe.policy_ analytics_ collections Get Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection] - The list of sql_firewall_policy_analytics_collection.
- access_
level str - compartment_
id_ boolin_ subtree - filters
Sequence[datasafe.
Get Sql Firewall Policy Analytics Filter] - group_
bies Sequence[str] - security_
policy_ strid - The OCID of the security policy corresponding to the SQL Firewall policy.
- state str
- The current state of the SQL Firewall policy.
- time_
ended str - time_
started str
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- sql
Firewall List<Property Map>Policy Analytics Collections - The list of sql_firewall_policy_analytics_collection.
- access
Level String - compartment
Id BooleanIn Subtree - filters List<Property Map>
- group
Bies List<String> - security
Policy StringId - The OCID of the security policy corresponding to the SQL Firewall policy.
- state String
- The current state of the SQL Firewall policy.
- time
Ended String - time
Started String
Supporting Types
GetSqlFirewallPolicyAnalyticsFilter
GetSqlFirewallPolicyAnalyticsSqlFirewallPolicyAnalyticsCollection
- Items
List<Get
Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item> - The aggregated data point items.
- Items
[]Get
Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item - The aggregated data point items.
- items
List<Get
Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item> - The aggregated data point items.
- items
Get
Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item[] - The aggregated data point items.
- items
Sequence[datasafe.
Get Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item] - The aggregated data point items.
- items List<Property Map>
- The aggregated data point items.
GetSqlFirewallPolicyAnalyticsSqlFirewallPolicyAnalyticsCollectionItem
- Dimensions
List<Get
Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item Dimension> - The dimensions available for SQL Firewall policy analytics.
- Sql
Firewall stringPolicy Analytic Count - The total count of the aggregated metric.
- Dimensions
[]Get
Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item Dimension - The dimensions available for SQL Firewall policy analytics.
- Sql
Firewall stringPolicy Analytic Count - The total count of the aggregated metric.
- dimensions
List<Get
Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item Dimension> - The dimensions available for SQL Firewall policy analytics.
- sql
Firewall StringPolicy Analytic Count - The total count of the aggregated metric.
- dimensions
Get
Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item Dimension[] - The dimensions available for SQL Firewall policy analytics.
- sql
Firewall stringPolicy Analytic Count - The total count of the aggregated metric.
- dimensions
Sequence[datasafe.
Get Sql Firewall Policy Analytics Sql Firewall Policy Analytics Collection Item Dimension] - The dimensions available for SQL Firewall policy analytics.
- sql_
firewall_ strpolicy_ analytic_ count - The total count of the aggregated metric.
- dimensions List<Property Map>
- The dimensions available for SQL Firewall policy analytics.
- sql
Firewall StringPolicy Analytic Count - The total count of the aggregated metric.
GetSqlFirewallPolicyAnalyticsSqlFirewallPolicyAnalyticsCollectionItemDimension
- Enforcement
Scope string - Specifies the SQL Firewall policy enforcement option.
- Security
Policy stringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- State string
- The current state of the SQL Firewall policy.
- Violation
Action string - Specifies the mode in which the SQL Firewall policy is enabled.
- Enforcement
Scope string - Specifies the SQL Firewall policy enforcement option.
- Security
Policy stringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- State string
- The current state of the SQL Firewall policy.
- Violation
Action string - Specifies the mode in which the SQL Firewall policy is enabled.
- enforcement
Scope String - Specifies the SQL Firewall policy enforcement option.
- security
Policy StringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- state String
- The current state of the SQL Firewall policy.
- violation
Action String - Specifies the mode in which the SQL Firewall policy is enabled.
- enforcement
Scope string - Specifies the SQL Firewall policy enforcement option.
- security
Policy stringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- state string
- The current state of the SQL Firewall policy.
- violation
Action string - Specifies the mode in which the SQL Firewall policy is enabled.
- enforcement_
scope str - Specifies the SQL Firewall policy enforcement option.
- security_
policy_ strid - An optional filter to return only resources that match the specified OCID of the security policy resource.
- state str
- The current state of the SQL Firewall policy.
- violation_
action str - Specifies the mode in which the SQL Firewall policy is enabled.
- enforcement
Scope String - Specifies the SQL Firewall policy enforcement option.
- security
Policy StringId - An optional filter to return only resources that match the specified OCID of the security policy resource.
- state String
- The current state of the SQL Firewall policy.
- violation
Action String - Specifies the mode in which the SQL Firewall policy is enabled.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.