1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getSqlFirewallViolations
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.DataSafe.getSqlFirewallViolations

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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:

    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.
    CompartmentIdInSubtree bool
    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<GetSqlFirewallViolationsFilter>
    ScimQuery 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')

    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.
    CompartmentIdInSubtree bool
    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 []GetSqlFirewallViolationsFilter
    ScimQuery 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')

    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.
    compartmentIdInSubtree Boolean
    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<GetSqlFirewallViolationsFilter>
    scimQuery 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')

    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.
    compartmentIdInSubtree boolean
    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 GetSqlFirewallViolationsFilter[]
    scimQuery 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_in_subtree bool
    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.GetSqlFirewallViolationsFilter]
    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')

    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.
    compartmentIdInSubtree Boolean
    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>
    scimQuery 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:

    CompartmentId string
    The OCID of the compartment containing the SQL violation.
    Id string
    The provider-assigned unique ID for this managed resource.
    SqlFirewallViolationsCollections List<GetSqlFirewallViolationsSqlFirewallViolationsCollection>
    The list of sql_firewall_violations_collection.
    AccessLevel string
    CompartmentIdInSubtree bool
    Filters List<GetSqlFirewallViolationsFilter>
    ScimQuery string
    CompartmentId string
    The OCID of the compartment containing the SQL violation.
    Id string
    The provider-assigned unique ID for this managed resource.
    SqlFirewallViolationsCollections []GetSqlFirewallViolationsSqlFirewallViolationsCollection
    The list of sql_firewall_violations_collection.
    AccessLevel string
    CompartmentIdInSubtree bool
    Filters []GetSqlFirewallViolationsFilter
    ScimQuery string
    compartmentId String
    The OCID of the compartment containing the SQL violation.
    id String
    The provider-assigned unique ID for this managed resource.
    sqlFirewallViolationsCollections List<GetSqlFirewallViolationsSqlFirewallViolationsCollection>
    The list of sql_firewall_violations_collection.
    accessLevel String
    compartmentIdInSubtree Boolean
    filters List<GetSqlFirewallViolationsFilter>
    scimQuery String
    compartmentId string
    The OCID of the compartment containing the SQL violation.
    id string
    The provider-assigned unique ID for this managed resource.
    sqlFirewallViolationsCollections GetSqlFirewallViolationsSqlFirewallViolationsCollection[]
    The list of sql_firewall_violations_collection.
    accessLevel string
    compartmentIdInSubtree boolean
    filters GetSqlFirewallViolationsFilter[]
    scimQuery 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_violations_collections Sequence[datasafe.GetSqlFirewallViolationsSqlFirewallViolationsCollection]
    The list of sql_firewall_violations_collection.
    access_level str
    compartment_id_in_subtree bool
    filters Sequence[datasafe.GetSqlFirewallViolationsFilter]
    scim_query str
    compartmentId String
    The OCID of the compartment containing the SQL violation.
    id String
    The provider-assigned unique ID for this managed resource.
    sqlFirewallViolationsCollections List<Property Map>
    The list of sql_firewall_violations_collection.
    accessLevel String
    compartmentIdInSubtree Boolean
    filters List<Property Map>
    scimQuery String

    Supporting Types

    GetSqlFirewallViolationsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetSqlFirewallViolationsSqlFirewallViolationsCollection

    items List<Property Map>
    Array of SQL violation summary.

    GetSqlFirewallViolationsSqlFirewallViolationsCollectionItem

    ClientIp string
    The IP address of the host machine from which the session was generated.
    ClientOsUserName string
    The name of the operating system user for the database session.
    ClientProgram string
    The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
    CompartmentId string
    A filter to return only resources that match the specified compartment OCID.
    CurrentDbUserName string
    The name of the user that SQL was executed as.
    DbUserName string
    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.
    OperationTime string
    The time of the SQL violation occurrence in the target database.
    SqlAccessedObjects string
    The objects accessed by the SQL.
    SqlLevel 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.
    SqlText string
    The SQL text caught by the firewall.
    TargetId string
    The OCID of the target database.
    TargetName string
    The name of the target database.
    TimeCollected string
    The timestamp when this SQL violation was collected from the target database by Data Safe.
    ViolationAction string
    The action taken for this SQL violation.
    ViolationCause string
    Indicates whether SQL or context violation.
    ClientIp string
    The IP address of the host machine from which the session was generated.
    ClientOsUserName string
    The name of the operating system user for the database session.
    ClientProgram string
    The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
    CompartmentId string
    A filter to return only resources that match the specified compartment OCID.
    CurrentDbUserName string
    The name of the user that SQL was executed as.
    DbUserName string
    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.
    OperationTime string
    The time of the SQL violation occurrence in the target database.
    SqlAccessedObjects string
    The objects accessed by the SQL.
    SqlLevel 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.
    SqlText string
    The SQL text caught by the firewall.
    TargetId string
    The OCID of the target database.
    TargetName string
    The name of the target database.
    TimeCollected string
    The timestamp when this SQL violation was collected from the target database by Data Safe.
    ViolationAction string
    The action taken for this SQL violation.
    ViolationCause string
    Indicates whether SQL or context violation.
    clientIp String
    The IP address of the host machine from which the session was generated.
    clientOsUserName String
    The name of the operating system user for the database session.
    clientProgram String
    The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
    compartmentId String
    A filter to return only resources that match the specified compartment OCID.
    currentDbUserName String
    The name of the user that SQL was executed as.
    dbUserName String
    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.
    operationTime String
    The time of the SQL violation occurrence in the target database.
    sqlAccessedObjects String
    The objects accessed by the SQL.
    sqlLevel 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.
    sqlText String
    The SQL text caught by the firewall.
    targetId String
    The OCID of the target database.
    targetName String
    The name of the target database.
    timeCollected String
    The timestamp when this SQL violation was collected from the target database by Data Safe.
    violationAction String
    The action taken for this SQL violation.
    violationCause String
    Indicates whether SQL or context violation.
    clientIp string
    The IP address of the host machine from which the session was generated.
    clientOsUserName string
    The name of the operating system user for the database session.
    clientProgram string
    The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
    compartmentId string
    A filter to return only resources that match the specified compartment OCID.
    currentDbUserName string
    The name of the user that SQL was executed as.
    dbUserName string
    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.
    operationTime string
    The time of the SQL violation occurrence in the target database.
    sqlAccessedObjects string
    The objects accessed by the SQL.
    sqlLevel 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.
    sqlText string
    The SQL text caught by the firewall.
    targetId string
    The OCID of the target database.
    targetName string
    The name of the target database.
    timeCollected string
    The timestamp when this SQL violation was collected from the target database by Data Safe.
    violationAction string
    The action taken for this SQL violation.
    violationCause 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_user_name str
    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_user_name str
    The name of the user that SQL was executed as.
    db_user_name str
    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_objects str
    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.
    clientIp String
    The IP address of the host machine from which the session was generated.
    clientOsUserName String
    The name of the operating system user for the database session.
    clientProgram String
    The application from which the SQL violation was generated. Examples include SQL Plus or SQL Developer.
    compartmentId String
    A filter to return only resources that match the specified compartment OCID.
    currentDbUserName String
    The name of the user that SQL was executed as.
    dbUserName String
    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.
    operationTime String
    The time of the SQL violation occurrence in the target database.
    sqlAccessedObjects String
    The objects accessed by the SQL.
    sqlLevel 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.
    sqlText String
    The SQL text caught by the firewall.
    targetId String
    The OCID of the target database.
    targetName String
    The name of the target database.
    timeCollected String
    The timestamp when this SQL violation was collected from the target database by Data Safe.
    violationAction String
    The action taken for this SQL violation.
    violationCause 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.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi