1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getTargetDatabasesSchemas
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

oci.DataSafe.getTargetDatabasesSchemas

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

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

    Returns list of schema.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testTargetDatabasesSchemas = oci.DataSafe.getTargetDatabasesSchemas({
        targetDatabaseId: oci_data_safe_target_database.test_target_database.id,
        isOracleMaintained: _var.target_databases_schema_is_oracle_maintained,
        schemaNames: _var.target_databases_schema_schema_name,
        schemaNameContains: _var.target_databases_schema_schema_name_contains,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_target_databases_schemas = oci.DataSafe.get_target_databases_schemas(target_database_id=oci_data_safe_target_database["test_target_database"]["id"],
        is_oracle_maintained=var["target_databases_schema_is_oracle_maintained"],
        schema_names=var["target_databases_schema_schema_name"],
        schema_name_contains=var["target_databases_schema_schema_name_contains"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DataSafe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DataSafe.GetTargetDatabasesSchemas(ctx, &datasafe.GetTargetDatabasesSchemasArgs{
    			TargetDatabaseId:   oci_data_safe_target_database.Test_target_database.Id,
    			IsOracleMaintained: pulumi.BoolRef(_var.Target_databases_schema_is_oracle_maintained),
    			SchemaNames:        _var.Target_databases_schema_schema_name,
    			SchemaNameContains: pulumi.StringRef(_var.Target_databases_schema_schema_name_contains),
    		}, 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 testTargetDatabasesSchemas = Oci.DataSafe.GetTargetDatabasesSchemas.Invoke(new()
        {
            TargetDatabaseId = oci_data_safe_target_database.Test_target_database.Id,
            IsOracleMaintained = @var.Target_databases_schema_is_oracle_maintained,
            SchemaNames = @var.Target_databases_schema_schema_name,
            SchemaNameContains = @var.Target_databases_schema_schema_name_contains,
        });
    
    });
    
    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.GetTargetDatabasesSchemasArgs;
    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 testTargetDatabasesSchemas = DataSafeFunctions.getTargetDatabasesSchemas(GetTargetDatabasesSchemasArgs.builder()
                .targetDatabaseId(oci_data_safe_target_database.test_target_database().id())
                .isOracleMaintained(var_.target_databases_schema_is_oracle_maintained())
                .schemaNames(var_.target_databases_schema_schema_name())
                .schemaNameContains(var_.target_databases_schema_schema_name_contains())
                .build());
    
        }
    }
    
    variables:
      testTargetDatabasesSchemas:
        fn::invoke:
          Function: oci:DataSafe:getTargetDatabasesSchemas
          Arguments:
            targetDatabaseId: ${oci_data_safe_target_database.test_target_database.id}
            isOracleMaintained: ${var.target_databases_schema_is_oracle_maintained}
            schemaNames: ${var.target_databases_schema_schema_name}
            schemaNameContains: ${var.target_databases_schema_schema_name_contains}
    

    Using getTargetDatabasesSchemas

    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 getTargetDatabasesSchemas(args: GetTargetDatabasesSchemasArgs, opts?: InvokeOptions): Promise<GetTargetDatabasesSchemasResult>
    function getTargetDatabasesSchemasOutput(args: GetTargetDatabasesSchemasOutputArgs, opts?: InvokeOptions): Output<GetTargetDatabasesSchemasResult>
    def get_target_databases_schemas(filters: Optional[Sequence[_datasafe.GetTargetDatabasesSchemasFilter]] = None,
                                     is_oracle_maintained: Optional[bool] = None,
                                     schema_name_contains: Optional[str] = None,
                                     schema_names: Optional[Sequence[str]] = None,
                                     target_database_id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetTargetDatabasesSchemasResult
    def get_target_databases_schemas_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_datasafe.GetTargetDatabasesSchemasFilterArgs]]]] = None,
                                     is_oracle_maintained: Optional[pulumi.Input[bool]] = None,
                                     schema_name_contains: Optional[pulumi.Input[str]] = None,
                                     schema_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                     target_database_id: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetTargetDatabasesSchemasResult]
    func GetTargetDatabasesSchemas(ctx *Context, args *GetTargetDatabasesSchemasArgs, opts ...InvokeOption) (*GetTargetDatabasesSchemasResult, error)
    func GetTargetDatabasesSchemasOutput(ctx *Context, args *GetTargetDatabasesSchemasOutputArgs, opts ...InvokeOption) GetTargetDatabasesSchemasResultOutput

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

    public static class GetTargetDatabasesSchemas 
    {
        public static Task<GetTargetDatabasesSchemasResult> InvokeAsync(GetTargetDatabasesSchemasArgs args, InvokeOptions? opts = null)
        public static Output<GetTargetDatabasesSchemasResult> Invoke(GetTargetDatabasesSchemasInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTargetDatabasesSchemasResult> getTargetDatabasesSchemas(GetTargetDatabasesSchemasArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DataSafe/getTargetDatabasesSchemas:getTargetDatabasesSchemas
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TargetDatabaseId string
    The OCID of the Data Safe target database.
    Filters List<GetTargetDatabasesSchemasFilter>
    IsOracleMaintained bool
    A filter to return only items related to specific type of schema.
    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.
    TargetDatabaseId string
    The OCID of the Data Safe target database.
    Filters []GetTargetDatabasesSchemasFilter
    IsOracleMaintained bool
    A filter to return only items related to specific type of schema.
    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.
    targetDatabaseId String
    The OCID of the Data Safe target database.
    filters List<GetTargetDatabasesSchemasFilter>
    isOracleMaintained Boolean
    A filter to return only items related to specific type of schema.
    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.
    targetDatabaseId string
    The OCID of the Data Safe target database.
    filters GetTargetDatabasesSchemasFilter[]
    isOracleMaintained boolean
    A filter to return only items related to specific type of schema.
    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.
    target_database_id str
    The OCID of the Data Safe target database.
    filters Sequence[datasafe.GetTargetDatabasesSchemasFilter]
    is_oracle_maintained bool
    A filter to return only items related to specific type of schema.
    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.
    targetDatabaseId String
    The OCID of the Data Safe target database.
    filters List<Property Map>
    isOracleMaintained Boolean
    A filter to return only items related to specific type of schema.
    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.

    getTargetDatabasesSchemas Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Schemas List<GetTargetDatabasesSchemasSchema>
    The list of schemas.
    TargetDatabaseId string
    Filters List<GetTargetDatabasesSchemasFilter>
    IsOracleMaintained bool
    Indicates if the schema is oracle supplied.
    SchemaNameContains string
    SchemaNames List<string>
    Name of the schema.
    Id string
    The provider-assigned unique ID for this managed resource.
    Schemas []GetTargetDatabasesSchemasSchema
    The list of schemas.
    TargetDatabaseId string
    Filters []GetTargetDatabasesSchemasFilter
    IsOracleMaintained bool
    Indicates if the schema is oracle supplied.
    SchemaNameContains string
    SchemaNames []string
    Name of the schema.
    id String
    The provider-assigned unique ID for this managed resource.
    schemas List<GetTargetDatabasesSchemasSchema>
    The list of schemas.
    targetDatabaseId String
    filters List<GetTargetDatabasesSchemasFilter>
    isOracleMaintained Boolean
    Indicates if the schema is oracle supplied.
    schemaNameContains String
    schemaNames List<String>
    Name of the schema.
    id string
    The provider-assigned unique ID for this managed resource.
    schemas GetTargetDatabasesSchemasSchema[]
    The list of schemas.
    targetDatabaseId string
    filters GetTargetDatabasesSchemasFilter[]
    isOracleMaintained boolean
    Indicates if the schema is oracle supplied.
    schemaNameContains string
    schemaNames string[]
    Name of the schema.
    id str
    The provider-assigned unique ID for this managed resource.
    schemas Sequence[datasafe.GetTargetDatabasesSchemasSchema]
    The list of schemas.
    target_database_id str
    filters Sequence[datasafe.GetTargetDatabasesSchemasFilter]
    is_oracle_maintained bool
    Indicates if the schema is oracle supplied.
    schema_name_contains str
    schema_names Sequence[str]
    Name of the schema.
    id String
    The provider-assigned unique ID for this managed resource.
    schemas List<Property Map>
    The list of schemas.
    targetDatabaseId String
    filters List<Property Map>
    isOracleMaintained Boolean
    Indicates if the schema is oracle supplied.
    schemaNameContains String
    schemaNames List<String>
    Name of the schema.

    Supporting Types

    GetTargetDatabasesSchemasFilter

    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

    GetTargetDatabasesSchemasSchema

    IsOracleMaintained bool
    A filter to return only items related to specific type of schema.
    SchemaName string
    A filter to return only items related to specific schema name.
    IsOracleMaintained bool
    A filter to return only items related to specific type of schema.
    SchemaName string
    A filter to return only items related to specific schema name.
    isOracleMaintained Boolean
    A filter to return only items related to specific type of schema.
    schemaName String
    A filter to return only items related to specific schema name.
    isOracleMaintained boolean
    A filter to return only items related to specific type of schema.
    schemaName string
    A filter to return only items related to specific schema name.
    is_oracle_maintained bool
    A filter to return only items related to specific type of schema.
    schema_name str
    A filter to return only items related to specific schema name.
    isOracleMaintained Boolean
    A filter to return only items related to specific type of schema.
    schemaName String
    A filter to return only items related to specific schema name.

    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 v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi