oci.DataSafe.getSqlFirewallViolations
Explore with Pulumi AI
This data source provides the list of Sql Firewall Violations in Oracle Cloud Infrastructure Data Safe service.
Gets a list of all the SQL Firewall violations captured by the firewall.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSqlFirewallViolations = oci.DataSafe.getSqlFirewallViolations({
compartmentId: compartmentId,
accessLevel: sqlFirewallViolationAccessLevel,
compartmentIdInSubtree: sqlFirewallViolationCompartmentIdInSubtree,
scimQuery: sqlFirewallViolationScimQuery,
});
import pulumi
import pulumi_oci as oci
test_sql_firewall_violations = oci.DataSafe.get_sql_firewall_violations(compartment_id=compartment_id,
access_level=sql_firewall_violation_access_level,
compartment_id_in_subtree=sql_firewall_violation_compartment_id_in_subtree,
scim_query=sql_firewall_violation_scim_query)
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.GetSqlFirewallViolations(ctx, &datasafe.GetSqlFirewallViolationsArgs{
CompartmentId: compartmentId,
AccessLevel: pulumi.StringRef(sqlFirewallViolationAccessLevel),
CompartmentIdInSubtree: pulumi.BoolRef(sqlFirewallViolationCompartmentIdInSubtree),
ScimQuery: pulumi.StringRef(sqlFirewallViolationScimQuery),
}, 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 testSqlFirewallViolations = Oci.DataSafe.GetSqlFirewallViolations.Invoke(new()
{
CompartmentId = compartmentId,
AccessLevel = sqlFirewallViolationAccessLevel,
CompartmentIdInSubtree = sqlFirewallViolationCompartmentIdInSubtree,
ScimQuery = sqlFirewallViolationScimQuery,
});
});
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.GetSqlFirewallViolationsArgs;
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 testSqlFirewallViolations = DataSafeFunctions.getSqlFirewallViolations(GetSqlFirewallViolationsArgs.builder()
.compartmentId(compartmentId)
.accessLevel(sqlFirewallViolationAccessLevel)
.compartmentIdInSubtree(sqlFirewallViolationCompartmentIdInSubtree)
.scimQuery(sqlFirewallViolationScimQuery)
.build());
}
}
variables:
testSqlFirewallViolations:
fn::invoke:
Function: oci:DataSafe:getSqlFirewallViolations
Arguments:
compartmentId: ${compartmentId}
accessLevel: ${sqlFirewallViolationAccessLevel}
compartmentIdInSubtree: ${sqlFirewallViolationCompartmentIdInSubtree}
scimQuery: ${sqlFirewallViolationScimQuery}
Using getSqlFirewallViolations
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 getSqlFirewallViolations(args: GetSqlFirewallViolationsArgs, opts?: InvokeOptions): Promise<GetSqlFirewallViolationsResult>
function getSqlFirewallViolationsOutput(args: GetSqlFirewallViolationsOutputArgs, opts?: InvokeOptions): Output<GetSqlFirewallViolationsResult>
def get_sql_firewall_violations(access_level: Optional[str] = None,
compartment_id: Optional[str] = None,
compartment_id_in_subtree: Optional[bool] = None,
filters: Optional[Sequence[_datasafe.GetSqlFirewallViolationsFilter]] = None,
scim_query: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSqlFirewallViolationsResult
def get_sql_firewall_violations_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.GetSqlFirewallViolationsFilterArgs]]]] = None,
scim_query: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSqlFirewallViolationsResult]
func GetSqlFirewallViolations(ctx *Context, args *GetSqlFirewallViolationsArgs, opts ...InvokeOption) (*GetSqlFirewallViolationsResult, error)
func GetSqlFirewallViolationsOutput(ctx *Context, args *GetSqlFirewallViolationsOutputArgs, opts ...InvokeOption) GetSqlFirewallViolationsResultOutput
> Note: This function is named GetSqlFirewallViolations
in the Go SDK.
public static class GetSqlFirewallViolations
{
public static Task<GetSqlFirewallViolationsResult> InvokeAsync(GetSqlFirewallViolationsArgs args, InvokeOptions? opts = null)
public static Output<GetSqlFirewallViolationsResult> Invoke(GetSqlFirewallViolationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSqlFirewallViolationsResult> getSqlFirewallViolations(GetSqlFirewallViolationsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DataSafe/getSqlFirewallViolations:getSqlFirewallViolations
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 Violations Filter> - Scim
Query string The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 of the System for Cross-Domain Identity Management (SCIM) specification, which is available at RFC3339. In SCIM filtering expressions, text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. (Numeric and boolean values should not be quoted.)
Example: query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
- 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 Violations Filter - Scim
Query string The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 of the System for Cross-Domain Identity Management (SCIM) specification, which is available at RFC3339. In SCIM filtering expressions, text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. (Numeric and boolean values should not be quoted.)
Example: query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
- 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 Violations Filter> - scim
Query String The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 of the System for Cross-Domain Identity Management (SCIM) specification, which is available at RFC3339. In SCIM filtering expressions, text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. (Numeric and boolean values should not be quoted.)
Example: query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
- 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 Violations Filter[] - scim
Query string The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 of the System for Cross-Domain Identity Management (SCIM) specification, which is available at RFC3339. In SCIM filtering expressions, text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. (Numeric and boolean values should not be quoted.)
Example: query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
- 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 Violations Filter] - scim_
query str The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 of the System for Cross-Domain Identity Management (SCIM) specification, which is available at RFC3339. In SCIM filtering expressions, text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. (Numeric and boolean values should not be quoted.)
Example: query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
- 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>
- scim
Query String The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 of the System for Cross-Domain Identity Management (SCIM) specification, which is available at RFC3339. In SCIM filtering expressions, text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. (Numeric and boolean values should not be quoted.)
Example: query=(operationTime ge '2021-06-04T01-00-26') and (violationAction eq 'BLOCKED')
getSqlFirewallViolations Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment containing the SQL violation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Sql
Firewall List<GetViolations Collections Sql Firewall Violations Sql Firewall Violations Collection> - The list of sql_firewall_violations_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Filters
List<Get
Sql Firewall Violations Filter> - Scim
Query string
- Compartment
Id string - The OCID of the compartment containing the SQL violation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Sql
Firewall []GetViolations Collections Sql Firewall Violations Sql Firewall Violations Collection - The list of sql_firewall_violations_collection.
- Access
Level string - Compartment
Id boolIn Subtree - Filters
[]Get
Sql Firewall Violations Filter - Scim
Query string
- compartment
Id String - The OCID of the compartment containing the SQL violation.
- id String
- The provider-assigned unique ID for this managed resource.
- sql
Firewall List<GetViolations Collections Sql Firewall Violations Sql Firewall Violations Collection> - The list of sql_firewall_violations_collection.
- access
Level String - compartment
Id BooleanIn Subtree - filters
List<Get
Sql Firewall Violations Filter> - scim
Query String
- compartment
Id string - The OCID of the compartment containing the SQL violation.
- id string
- The provider-assigned unique ID for this managed resource.
- sql
Firewall GetViolations Collections Sql Firewall Violations Sql Firewall Violations Collection[] - The list of sql_firewall_violations_collection.
- access
Level string - compartment
Id booleanIn Subtree - filters
Get
Sql Firewall Violations Filter[] - scim
Query string
- compartment_
id str - The OCID of the compartment containing the SQL violation.
- id str
- The provider-assigned unique ID for this managed resource.
- sql_
firewall_ Sequence[datasafe.violations_ collections Get Sql Firewall Violations Sql Firewall Violations Collection] - The list of sql_firewall_violations_collection.
- access_
level str - compartment_
id_ boolin_ subtree - filters
Sequence[datasafe.
Get Sql Firewall Violations Filter] - scim_
query str
- compartment
Id String - The OCID of the compartment containing the SQL violation.
- id String
- The provider-assigned unique ID for this managed resource.
- sql
Firewall List<Property Map>Violations Collections - The list of sql_firewall_violations_collection.
- access
Level String - compartment
Id BooleanIn Subtree - filters List<Property Map>
- scim
Query String
Supporting Types
GetSqlFirewallViolationsFilter
GetSqlFirewallViolationsSqlFirewallViolationsCollection
- Items
List<Get
Sql Firewall Violations Sql Firewall Violations Collection Item> - Array of SQL violation summary.
- Items
[]Get
Sql Firewall Violations Sql Firewall Violations Collection Item - Array of SQL violation summary.
- items
List<Get
Sql Firewall Violations Sql Firewall Violations Collection Item> - Array of SQL violation summary.
- items
Get
Sql Firewall Violations Sql Firewall Violations Collection Item[] - Array of SQL violation summary.
- items
Sequence[datasafe.
Get Sql Firewall Violations Sql Firewall Violations Collection Item] - Array of SQL violation summary.
- items List<Property Map>
- Array of SQL violation summary.
GetSqlFirewallViolationsSqlFirewallViolationsCollectionItem
- Client
Ip string - The IP address of the host machine from which the session was generated.
- Client
Os stringUser Name - The name of the operating system user for the database session.
- Client
Program string - The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
- Compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- Current
Db stringUser Name - The name of the user that SQL was executed as.
- Db
User stringName - The name of the database user.
- Id string
- The OCID of the SQL violation.
- Operation string
- The name of the action executed by the user on the target database. For example, ALTER, CREATE, DROP.
- Operation
Time string - The time of the SQL violation occurrence in the target database.
- Sql
Accessed stringObjects - The objects accessed by the SQL.
- Sql
Level string - Specifies the level of SQL for this violation. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- Sql
Text string - The SQL text caught by the firewall.
- Target
Id string - The OCID of the target database.
- Target
Name string - The name of the target database.
- Time
Collected string - The timestamp when this SQL violation was collected from the target database by Data Safe.
- Violation
Action string - The action taken for this SQL violation.
- Violation
Cause string - Indicates whether SQL or context violation.
- Client
Ip string - The IP address of the host machine from which the session was generated.
- Client
Os stringUser Name - The name of the operating system user for the database session.
- Client
Program string - The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
- Compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- Current
Db stringUser Name - The name of the user that SQL was executed as.
- Db
User stringName - The name of the database user.
- Id string
- The OCID of the SQL violation.
- Operation string
- The name of the action executed by the user on the target database. For example, ALTER, CREATE, DROP.
- Operation
Time string - The time of the SQL violation occurrence in the target database.
- Sql
Accessed stringObjects - The objects accessed by the SQL.
- Sql
Level string - Specifies the level of SQL for this violation. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- Sql
Text string - The SQL text caught by the firewall.
- Target
Id string - The OCID of the target database.
- Target
Name string - The name of the target database.
- Time
Collected string - The timestamp when this SQL violation was collected from the target database by Data Safe.
- Violation
Action string - The action taken for this SQL violation.
- Violation
Cause string - Indicates whether SQL or context violation.
- client
Ip String - The IP address of the host machine from which the session was generated.
- client
Os StringUser Name - The name of the operating system user for the database session.
- client
Program String - The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
- compartment
Id String - A filter to return only resources that match the specified compartment OCID.
- current
Db StringUser Name - The name of the user that SQL was executed as.
- db
User StringName - The name of the database user.
- id String
- The OCID of the SQL violation.
- operation String
- The name of the action executed by the user on the target database. For example, ALTER, CREATE, DROP.
- operation
Time String - The time of the SQL violation occurrence in the target database.
- sql
Accessed StringObjects - The objects accessed by the SQL.
- sql
Level String - Specifies the level of SQL for this violation. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- sql
Text String - The SQL text caught by the firewall.
- target
Id String - The OCID of the target database.
- target
Name String - The name of the target database.
- time
Collected String - The timestamp when this SQL violation was collected from the target database by Data Safe.
- violation
Action String - The action taken for this SQL violation.
- violation
Cause String - Indicates whether SQL or context violation.
- client
Ip string - The IP address of the host machine from which the session was generated.
- client
Os stringUser Name - The name of the operating system user for the database session.
- client
Program string - The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
- compartment
Id string - A filter to return only resources that match the specified compartment OCID.
- current
Db stringUser Name - The name of the user that SQL was executed as.
- db
User stringName - The name of the database user.
- id string
- The OCID of the SQL violation.
- operation string
- The name of the action executed by the user on the target database. For example, ALTER, CREATE, DROP.
- operation
Time string - The time of the SQL violation occurrence in the target database.
- sql
Accessed stringObjects - The objects accessed by the SQL.
- sql
Level string - Specifies the level of SQL for this violation. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- sql
Text string - The SQL text caught by the firewall.
- target
Id string - The OCID of the target database.
- target
Name string - The name of the target database.
- time
Collected string - The timestamp when this SQL violation was collected from the target database by Data Safe.
- violation
Action string - The action taken for this SQL violation.
- violation
Cause string - Indicates whether SQL or context violation.
- client_
ip str - The IP address of the host machine from which the session was generated.
- client_
os_ struser_ name - The name of the operating system user for the database session.
- client_
program str - The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
- compartment_
id str - A filter to return only resources that match the specified compartment OCID.
- current_
db_ struser_ name - The name of the user that SQL was executed as.
- db_
user_ strname - The name of the database user.
- id str
- The OCID of the SQL violation.
- operation str
- The name of the action executed by the user on the target database. For example, ALTER, CREATE, DROP.
- operation_
time str - The time of the SQL violation occurrence in the target database.
- sql_
accessed_ strobjects - The objects accessed by the SQL.
- sql_
level str - Specifies the level of SQL for this violation. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- sql_
text str - The SQL text caught by the firewall.
- target_
id str - The OCID of the target database.
- target_
name str - The name of the target database.
- time_
collected str - The timestamp when this SQL violation was collected from the target database by Data Safe.
- violation_
action str - The action taken for this SQL violation.
- violation_
cause str - Indicates whether SQL or context violation.
- client
Ip String - The IP address of the host machine from which the session was generated.
- client
Os StringUser Name - The name of the operating system user for the database session.
- client
Program String - The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
- compartment
Id String - A filter to return only resources that match the specified compartment OCID.
- current
Db StringUser Name - The name of the user that SQL was executed as.
- db
User StringName - The name of the database user.
- id String
- The OCID of the SQL violation.
- operation String
- The name of the action executed by the user on the target database. For example, ALTER, CREATE, DROP.
- operation
Time String - The time of the SQL violation occurrence in the target database.
- sql
Accessed StringObjects - The objects accessed by the SQL.
- sql
Level String - Specifies the level of SQL for this violation. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- sql
Text String - The SQL text caught by the firewall.
- target
Id String - The OCID of the target database.
- target
Name String - The name of the target database.
- time
Collected String - The timestamp when this SQL violation was collected from the target database by Data Safe.
- violation
Action String - The action taken for this SQL violation.
- violation
Cause String - Indicates whether SQL or context violation.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.