1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getTargetDatabasesTables
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.DataSafe.getTargetDatabasesTables

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

This data source provides the list of Target Databases Tables in Oracle Cloud Infrastructure Data Safe service.

Returns a list of table metadata objects.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testTargetDatabasesTables = oci.DataSafe.getTargetDatabasesTables({
    targetDatabaseId: testTargetDatabase.id,
    schemaNames: targetDatabasesTableSchemaName,
    schemaNameContains: targetDatabasesTableSchemaNameContains,
    tableNames: testTable.name,
    tableNameContains: targetDatabasesTableTableNameContains,
});
Copy
import pulumi
import pulumi_oci as oci

test_target_databases_tables = oci.DataSafe.get_target_databases_tables(target_database_id=test_target_database["id"],
    schema_names=target_databases_table_schema_name,
    schema_name_contains=target_databases_table_schema_name_contains,
    table_names=test_table["name"],
    table_name_contains=target_databases_table_table_name_contains)
Copy
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.GetTargetDatabasesTables(ctx, &datasafe.GetTargetDatabasesTablesArgs{
			TargetDatabaseId:   testTargetDatabase.Id,
			SchemaNames:        targetDatabasesTableSchemaName,
			SchemaNameContains: pulumi.StringRef(targetDatabasesTableSchemaNameContains),
			TableNames:         testTable.Name,
			TableNameContains:  pulumi.StringRef(targetDatabasesTableTableNameContains),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testTargetDatabasesTables = Oci.DataSafe.GetTargetDatabasesTables.Invoke(new()
    {
        TargetDatabaseId = testTargetDatabase.Id,
        SchemaNames = targetDatabasesTableSchemaName,
        SchemaNameContains = targetDatabasesTableSchemaNameContains,
        TableNames = testTable.Name,
        TableNameContains = targetDatabasesTableTableNameContains,
    });

});
Copy
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.GetTargetDatabasesTablesArgs;
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 testTargetDatabasesTables = DataSafeFunctions.getTargetDatabasesTables(GetTargetDatabasesTablesArgs.builder()
            .targetDatabaseId(testTargetDatabase.id())
            .schemaNames(targetDatabasesTableSchemaName)
            .schemaNameContains(targetDatabasesTableSchemaNameContains)
            .tableNames(testTable.name())
            .tableNameContains(targetDatabasesTableTableNameContains)
            .build());

    }
}
Copy
variables:
  testTargetDatabasesTables:
    fn::invoke:
      function: oci:DataSafe:getTargetDatabasesTables
      arguments:
        targetDatabaseId: ${testTargetDatabase.id}
        schemaNames: ${targetDatabasesTableSchemaName}
        schemaNameContains: ${targetDatabasesTableSchemaNameContains}
        tableNames: ${testTable.name}
        tableNameContains: ${targetDatabasesTableTableNameContains}
Copy

Using getTargetDatabasesTables

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 getTargetDatabasesTables(args: GetTargetDatabasesTablesArgs, opts?: InvokeOptions): Promise<GetTargetDatabasesTablesResult>
function getTargetDatabasesTablesOutput(args: GetTargetDatabasesTablesOutputArgs, opts?: InvokeOptions): Output<GetTargetDatabasesTablesResult>
Copy
def get_target_databases_tables(filters: Optional[Sequence[_datasafe.GetTargetDatabasesTablesFilter]] = None,
                                schema_name_contains: Optional[str] = None,
                                schema_names: Optional[Sequence[str]] = None,
                                table_name_contains: Optional[str] = None,
                                table_names: Optional[Sequence[str]] = None,
                                target_database_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetTargetDatabasesTablesResult
def get_target_databases_tables_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_datasafe.GetTargetDatabasesTablesFilterArgs]]]] = None,
                                schema_name_contains: Optional[pulumi.Input[str]] = None,
                                schema_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                table_name_contains: Optional[pulumi.Input[str]] = None,
                                table_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                target_database_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetTargetDatabasesTablesResult]
Copy
func GetTargetDatabasesTables(ctx *Context, args *GetTargetDatabasesTablesArgs, opts ...InvokeOption) (*GetTargetDatabasesTablesResult, error)
func GetTargetDatabasesTablesOutput(ctx *Context, args *GetTargetDatabasesTablesOutputArgs, opts ...InvokeOption) GetTargetDatabasesTablesResultOutput
Copy

> Note: This function is named GetTargetDatabasesTables in the Go SDK.

public static class GetTargetDatabasesTables 
{
    public static Task<GetTargetDatabasesTablesResult> InvokeAsync(GetTargetDatabasesTablesArgs args, InvokeOptions? opts = null)
    public static Output<GetTargetDatabasesTablesResult> Invoke(GetTargetDatabasesTablesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTargetDatabasesTablesResult> getTargetDatabasesTables(GetTargetDatabasesTablesArgs args, InvokeOptions options)
public static Output<GetTargetDatabasesTablesResult> getTargetDatabasesTables(GetTargetDatabasesTablesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DataSafe/getTargetDatabasesTables:getTargetDatabasesTables
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

TargetDatabaseId This property is required. string
The OCID of the Data Safe target database.
Filters Changes to this property will trigger replacement. List<GetTargetDatabasesTablesFilter>
SchemaNameContains string
A filter to return only items if schema name contains a specific string.
SchemaNames List<string>
A filter to return only items related to specific schema name.
TableNameContains string
A filter to return only items if table name contains a specific string.
TableNames List<string>
A filter to return only items related to specific table name.
TargetDatabaseId This property is required. string
The OCID of the Data Safe target database.
Filters Changes to this property will trigger replacement. []GetTargetDatabasesTablesFilter
SchemaNameContains string
A filter to return only items if schema name contains a specific string.
SchemaNames []string
A filter to return only items related to specific schema name.
TableNameContains string
A filter to return only items if table name contains a specific string.
TableNames []string
A filter to return only items related to specific table name.
targetDatabaseId This property is required. String
The OCID of the Data Safe target database.
filters Changes to this property will trigger replacement. List<GetTargetDatabasesTablesFilter>
schemaNameContains String
A filter to return only items if schema name contains a specific string.
schemaNames List<String>
A filter to return only items related to specific schema name.
tableNameContains String
A filter to return only items if table name contains a specific string.
tableNames List<String>
A filter to return only items related to specific table name.
targetDatabaseId This property is required. string
The OCID of the Data Safe target database.
filters Changes to this property will trigger replacement. GetTargetDatabasesTablesFilter[]
schemaNameContains string
A filter to return only items if schema name contains a specific string.
schemaNames string[]
A filter to return only items related to specific schema name.
tableNameContains string
A filter to return only items if table name contains a specific string.
tableNames string[]
A filter to return only items related to specific table name.
target_database_id This property is required. str
The OCID of the Data Safe target database.
filters Changes to this property will trigger replacement. Sequence[datasafe.GetTargetDatabasesTablesFilter]
schema_name_contains str
A filter to return only items if schema name contains a specific string.
schema_names Sequence[str]
A filter to return only items related to specific schema name.
table_name_contains str
A filter to return only items if table name contains a specific string.
table_names Sequence[str]
A filter to return only items related to specific table name.
targetDatabaseId This property is required. String
The OCID of the Data Safe target database.
filters Changes to this property will trigger replacement. List<Property Map>
schemaNameContains String
A filter to return only items if schema name contains a specific string.
schemaNames List<String>
A filter to return only items related to specific schema name.
tableNameContains String
A filter to return only items if table name contains a specific string.
tableNames List<String>
A filter to return only items related to specific table name.

getTargetDatabasesTables Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Tables List<GetTargetDatabasesTablesTable>
The list of tables.
TargetDatabaseId string
Filters List<GetTargetDatabasesTablesFilter>
SchemaNameContains string
SchemaNames List<string>
Name of the schema.
TableNameContains string
TableNames List<string>
Name of the table.
Id string
The provider-assigned unique ID for this managed resource.
Tables []GetTargetDatabasesTablesTable
The list of tables.
TargetDatabaseId string
Filters []GetTargetDatabasesTablesFilter
SchemaNameContains string
SchemaNames []string
Name of the schema.
TableNameContains string
TableNames []string
Name of the table.
id String
The provider-assigned unique ID for this managed resource.
tables List<GetTargetDatabasesTablesTable>
The list of tables.
targetDatabaseId String
filters List<GetTargetDatabasesTablesFilter>
schemaNameContains String
schemaNames List<String>
Name of the schema.
tableNameContains String
tableNames List<String>
Name of the table.
id string
The provider-assigned unique ID for this managed resource.
tables GetTargetDatabasesTablesTable[]
The list of tables.
targetDatabaseId string
filters GetTargetDatabasesTablesFilter[]
schemaNameContains string
schemaNames string[]
Name of the schema.
tableNameContains string
tableNames string[]
Name of the table.
id str
The provider-assigned unique ID for this managed resource.
tables Sequence[datasafe.GetTargetDatabasesTablesTable]
The list of tables.
target_database_id str
filters Sequence[datasafe.GetTargetDatabasesTablesFilter]
schema_name_contains str
schema_names Sequence[str]
Name of the schema.
table_name_contains str
table_names Sequence[str]
Name of the table.
id String
The provider-assigned unique ID for this managed resource.
tables List<Property Map>
The list of tables.
targetDatabaseId String
filters List<Property Map>
schemaNameContains String
schemaNames List<String>
Name of the schema.
tableNameContains String
tableNames List<String>
Name of the table.

Supporting Types

GetTargetDatabasesTablesFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetTargetDatabasesTablesTable

SchemaName This property is required. string
A filter to return only items related to specific schema name.
TableName This property is required. string
A filter to return only items related to specific table name.
SchemaName This property is required. string
A filter to return only items related to specific schema name.
TableName This property is required. string
A filter to return only items related to specific table name.
schemaName This property is required. String
A filter to return only items related to specific schema name.
tableName This property is required. String
A filter to return only items related to specific table name.
schemaName This property is required. string
A filter to return only items related to specific schema name.
tableName This property is required. string
A filter to return only items related to specific table name.
schema_name This property is required. str
A filter to return only items related to specific schema name.
table_name This property is required. str
A filter to return only items related to specific table name.
schemaName This property is required. String
A filter to return only items related to specific schema name.
tableName This property is required. String
A filter to return only items related to specific table name.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi