Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.DataSafe.getSqlCollection
Explore with Pulumi AI
This data source provides details about a specific Sql Collection resource in Oracle Cloud Infrastructure Data Safe service.
Gets a SQL collection by identifier.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSqlCollection = oci.DataSafe.getSqlCollection({
    sqlCollectionId: testSqlCollectionOciDataSafeSqlCollection.id,
});
import pulumi
import pulumi_oci as oci
test_sql_collection = oci.DataSafe.get_sql_collection(sql_collection_id=test_sql_collection_oci_data_safe_sql_collection["id"])
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.GetSqlCollection(ctx, &datasafe.GetSqlCollectionArgs{
			SqlCollectionId: testSqlCollectionOciDataSafeSqlCollection.Id,
		}, 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 testSqlCollection = Oci.DataSafe.GetSqlCollection.Invoke(new()
    {
        SqlCollectionId = testSqlCollectionOciDataSafeSqlCollection.Id,
    });
});
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.GetSqlCollectionArgs;
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 testSqlCollection = DataSafeFunctions.getSqlCollection(GetSqlCollectionArgs.builder()
            .sqlCollectionId(testSqlCollectionOciDataSafeSqlCollection.id())
            .build());
    }
}
variables:
  testSqlCollection:
    fn::invoke:
      function: oci:DataSafe:getSqlCollection
      arguments:
        sqlCollectionId: ${testSqlCollectionOciDataSafeSqlCollection.id}
Using getSqlCollection
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 getSqlCollection(args: GetSqlCollectionArgs, opts?: InvokeOptions): Promise<GetSqlCollectionResult>
function getSqlCollectionOutput(args: GetSqlCollectionOutputArgs, opts?: InvokeOptions): Output<GetSqlCollectionResult>def get_sql_collection(sql_collection_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetSqlCollectionResult
def get_sql_collection_output(sql_collection_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetSqlCollectionResult]func LookupSqlCollection(ctx *Context, args *LookupSqlCollectionArgs, opts ...InvokeOption) (*LookupSqlCollectionResult, error)
func LookupSqlCollectionOutput(ctx *Context, args *LookupSqlCollectionOutputArgs, opts ...InvokeOption) LookupSqlCollectionResultOutput> Note: This function is named LookupSqlCollection in the Go SDK.
public static class GetSqlCollection 
{
    public static Task<GetSqlCollectionResult> InvokeAsync(GetSqlCollectionArgs args, InvokeOptions? opts = null)
    public static Output<GetSqlCollectionResult> Invoke(GetSqlCollectionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSqlCollectionResult> getSqlCollection(GetSqlCollectionArgs args, InvokeOptions options)
public static Output<GetSqlCollectionResult> getSqlCollection(GetSqlCollectionArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DataSafe/getSqlCollection:getSqlCollection
  arguments:
    # arguments dictionaryThe following arguments are supported:
- SqlCollection stringId 
- The OCID of the SQL collection resource.
- SqlCollection stringId 
- The OCID of the SQL collection resource.
- sqlCollection StringId 
- The OCID of the SQL collection resource.
- sqlCollection stringId 
- The OCID of the SQL collection resource.
- sql_collection_ strid 
- The OCID of the SQL collection resource.
- sqlCollection StringId 
- The OCID of the SQL collection resource.
getSqlCollection Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment containing the SQL collection.
- DbUser stringName 
- The database user name.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
- Description string
- The description of the SQL collection.
- DisplayName string
- The display name of the SQL collection.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
- GenerateSql boolFirewall Policy Trigger 
- Id string
- The OCID of the SQL collection.
- LifecycleDetails string
- Details about the current state of the SQL collection in Data Safe.
- PurgeLogs boolTrigger 
- RefreshLog boolInsights Trigger 
- SqlCollection stringId 
- SqlLevel string
- Specifies the level of SQL that will be collected. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- StartTrigger bool
- State string
- The current state of the SQL collection.
- Status string
- Specifies if the status of the SqlCollection. Enabled indicates that the collecting is in progress.
- StopTrigger bool
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- TargetId string
- The OCID of the target corresponding to the security policy deployment.
- TimeCreated string
- The time that the SQL collection was created, in the format defined by RFC3339.
- TimeLast stringStarted 
- The timestamp of the most recent SqlCollection start operation, in the format defined by RFC3339.
- TimeLast stringStopped 
- The timestamp of the most recent SqlCollection stop operation, in the format defined by RFC3339.
- TimeUpdated string
- The last date and time the SQL collection was updated, in the format defined by RFC3339.
- CompartmentId string
- The OCID of the compartment containing the SQL collection.
- DbUser stringName 
- The database user name.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
- Description string
- The description of the SQL collection.
- DisplayName string
- The display name of the SQL collection.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
- GenerateSql boolFirewall Policy Trigger 
- Id string
- The OCID of the SQL collection.
- LifecycleDetails string
- Details about the current state of the SQL collection in Data Safe.
- PurgeLogs boolTrigger 
- RefreshLog boolInsights Trigger 
- SqlCollection stringId 
- SqlLevel string
- Specifies the level of SQL that will be collected. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- StartTrigger bool
- State string
- The current state of the SQL collection.
- Status string
- Specifies if the status of the SqlCollection. Enabled indicates that the collecting is in progress.
- StopTrigger bool
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- TargetId string
- The OCID of the target corresponding to the security policy deployment.
- TimeCreated string
- The time that the SQL collection was created, in the format defined by RFC3339.
- TimeLast stringStarted 
- The timestamp of the most recent SqlCollection start operation, in the format defined by RFC3339.
- TimeLast stringStopped 
- The timestamp of the most recent SqlCollection stop operation, in the format defined by RFC3339.
- TimeUpdated string
- The last date and time the SQL collection was updated, in the format defined by RFC3339.
- compartmentId String
- The OCID of the compartment containing the SQL collection.
- dbUser StringName 
- The database user name.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
- description String
- The description of the SQL collection.
- displayName String
- The display name of the SQL collection.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
- generateSql BooleanFirewall Policy Trigger 
- id String
- The OCID of the SQL collection.
- lifecycleDetails String
- Details about the current state of the SQL collection in Data Safe.
- purgeLogs BooleanTrigger 
- refreshLog BooleanInsights Trigger 
- sqlCollection StringId 
- sqlLevel String
- Specifies the level of SQL that will be collected. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- startTrigger Boolean
- state String
- The current state of the SQL collection.
- status String
- Specifies if the status of the SqlCollection. Enabled indicates that the collecting is in progress.
- stopTrigger Boolean
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- targetId String
- The OCID of the target corresponding to the security policy deployment.
- timeCreated String
- The time that the SQL collection was created, in the format defined by RFC3339.
- timeLast StringStarted 
- The timestamp of the most recent SqlCollection start operation, in the format defined by RFC3339.
- timeLast StringStopped 
- The timestamp of the most recent SqlCollection stop operation, in the format defined by RFC3339.
- timeUpdated String
- The last date and time the SQL collection was updated, in the format defined by RFC3339.
- compartmentId string
- The OCID of the compartment containing the SQL collection.
- dbUser stringName 
- The database user name.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
- description string
- The description of the SQL collection.
- displayName string
- The display name of the SQL collection.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
- generateSql booleanFirewall Policy Trigger 
- id string
- The OCID of the SQL collection.
- lifecycleDetails string
- Details about the current state of the SQL collection in Data Safe.
- purgeLogs booleanTrigger 
- refreshLog booleanInsights Trigger 
- sqlCollection stringId 
- sqlLevel string
- Specifies the level of SQL that will be collected. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- startTrigger boolean
- state string
- The current state of the SQL collection.
- status string
- Specifies if the status of the SqlCollection. Enabled indicates that the collecting is in progress.
- stopTrigger boolean
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- targetId string
- The OCID of the target corresponding to the security policy deployment.
- timeCreated string
- The time that the SQL collection was created, in the format defined by RFC3339.
- timeLast stringStarted 
- The timestamp of the most recent SqlCollection start operation, in the format defined by RFC3339.
- timeLast stringStopped 
- The timestamp of the most recent SqlCollection stop operation, in the format defined by RFC3339.
- timeUpdated string
- The last date and time the SQL collection was updated, in the format defined by RFC3339.
- compartment_id str
- The OCID of the compartment containing the SQL collection.
- db_user_ strname 
- The database user name.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
- description str
- The description of the SQL collection.
- display_name str
- The display name of the SQL collection.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
- generate_sql_ boolfirewall_ policy_ trigger 
- id str
- The OCID of the SQL collection.
- lifecycle_details str
- Details about the current state of the SQL collection in Data Safe.
- purge_logs_ booltrigger 
- refresh_log_ boolinsights_ trigger 
- sql_collection_ strid 
- sql_level str
- Specifies the level of SQL that will be collected. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- start_trigger bool
- state str
- The current state of the SQL collection.
- status str
- Specifies if the status of the SqlCollection. Enabled indicates that the collecting is in progress.
- stop_trigger bool
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- target_id str
- The OCID of the target corresponding to the security policy deployment.
- time_created str
- The time that the SQL collection was created, in the format defined by RFC3339.
- time_last_ strstarted 
- The timestamp of the most recent SqlCollection start operation, in the format defined by RFC3339.
- time_last_ strstopped 
- The timestamp of the most recent SqlCollection stop operation, in the format defined by RFC3339.
- time_updated str
- The last date and time the SQL collection was updated, in the format defined by RFC3339.
- compartmentId String
- The OCID of the compartment containing the SQL collection.
- dbUser StringName 
- The database user name.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {"Operations.CostCenter": "42"}
- description String
- The description of the SQL collection.
- displayName String
- The display name of the SQL collection.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags Example: {"Department": "Finance"}
- generateSql BooleanFirewall Policy Trigger 
- id String
- The OCID of the SQL collection.
- lifecycleDetails String
- Details about the current state of the SQL collection in Data Safe.
- purgeLogs BooleanTrigger 
- refreshLog BooleanInsights Trigger 
- sqlCollection StringId 
- sqlLevel String
- Specifies the level of SQL that will be collected. USER_ISSUED_SQL - User issued SQL statements only. ALL_SQL - Includes all SQL statements including SQL statement issued inside PL/SQL units.
- startTrigger Boolean
- state String
- The current state of the SQL collection.
- status String
- Specifies if the status of the SqlCollection. Enabled indicates that the collecting is in progress.
- stopTrigger Boolean
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- targetId String
- The OCID of the target corresponding to the security policy deployment.
- timeCreated String
- The time that the SQL collection was created, in the format defined by RFC3339.
- timeLast StringStarted 
- The timestamp of the most recent SqlCollection start operation, in the format defined by RFC3339.
- timeLast StringStopped 
- The timestamp of the most recent SqlCollection stop operation, in the format defined by RFC3339.
- timeUpdated String
- The last date and time the SQL collection was updated, in the format defined by RFC3339.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.