1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataSafe
  5. getTargetDatabaseGroup
Oracle Cloud Infrastructure v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi

oci.DataSafe.getTargetDatabaseGroup

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi

    This data source provides details about a specific Target Database Group resource in Oracle Cloud Infrastructure Data Safe service.

    Returns the details of the specified target database group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testTargetDatabaseGroup = oci.DataSafe.getTargetDatabaseGroup({
        targetDatabaseGroupId: testTargetDatabaseGroupOciDataSafeTargetDatabaseGroup.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_target_database_group = oci.DataSafe.get_target_database_group(target_database_group_id=test_target_database_group_oci_data_safe_target_database_group["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/datasafe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := datasafe.GetTargetDatabaseGroup(ctx, &datasafe.GetTargetDatabaseGroupArgs{
    			TargetDatabaseGroupId: testTargetDatabaseGroupOciDataSafeTargetDatabaseGroup.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 testTargetDatabaseGroup = Oci.DataSafe.GetTargetDatabaseGroup.Invoke(new()
        {
            TargetDatabaseGroupId = testTargetDatabaseGroupOciDataSafeTargetDatabaseGroup.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.GetTargetDatabaseGroupArgs;
    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 testTargetDatabaseGroup = DataSafeFunctions.getTargetDatabaseGroup(GetTargetDatabaseGroupArgs.builder()
                .targetDatabaseGroupId(testTargetDatabaseGroupOciDataSafeTargetDatabaseGroup.id())
                .build());
    
        }
    }
    
    variables:
      testTargetDatabaseGroup:
        fn::invoke:
          function: oci:DataSafe:getTargetDatabaseGroup
          arguments:
            targetDatabaseGroupId: ${testTargetDatabaseGroupOciDataSafeTargetDatabaseGroup.id}
    

    Using getTargetDatabaseGroup

    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 getTargetDatabaseGroup(args: GetTargetDatabaseGroupArgs, opts?: InvokeOptions): Promise<GetTargetDatabaseGroupResult>
    function getTargetDatabaseGroupOutput(args: GetTargetDatabaseGroupOutputArgs, opts?: InvokeOptions): Output<GetTargetDatabaseGroupResult>
    def get_target_database_group(target_database_group_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetTargetDatabaseGroupResult
    def get_target_database_group_output(target_database_group_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetTargetDatabaseGroupResult]
    func LookupTargetDatabaseGroup(ctx *Context, args *LookupTargetDatabaseGroupArgs, opts ...InvokeOption) (*LookupTargetDatabaseGroupResult, error)
    func LookupTargetDatabaseGroupOutput(ctx *Context, args *LookupTargetDatabaseGroupOutputArgs, opts ...InvokeOption) LookupTargetDatabaseGroupResultOutput

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

    public static class GetTargetDatabaseGroup 
    {
        public static Task<GetTargetDatabaseGroupResult> InvokeAsync(GetTargetDatabaseGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetTargetDatabaseGroupResult> Invoke(GetTargetDatabaseGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTargetDatabaseGroupResult> getTargetDatabaseGroup(GetTargetDatabaseGroupArgs args, InvokeOptions options)
    public static Output<GetTargetDatabaseGroupResult> getTargetDatabaseGroup(GetTargetDatabaseGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:DataSafe/getTargetDatabaseGroup:getTargetDatabaseGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TargetDatabaseGroupId string
    The OCID of the specified target database group.
    TargetDatabaseGroupId string
    The OCID of the specified target database group.
    targetDatabaseGroupId String
    The OCID of the specified target database group.
    targetDatabaseGroupId string
    The OCID of the specified target database group.
    target_database_group_id str
    The OCID of the specified target database group.
    targetDatabaseGroupId String
    The OCID of the specified target database group.

    getTargetDatabaseGroup Result

    The following output properties are available:

    CompartmentId string
    The OCID for the compartment containing the target database group.
    DefinedTags 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
    Description of the target database group.
    DisplayName string
    The name of the target database group.
    FreeformTags 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"}
    Id string
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    LifecycleDetails string
    Details for the lifecycle status of the target database group.
    MatchingCriterias List<GetTargetDatabaseGroupMatchingCriteria>
    Criteria to either include or exclude target databases from the target database group. These criteria can be based on compartments or tags or a list of target databases. See examples below for more details. Include: Target databases will be added to the target database group if they match at least one of the include criteria. Exclude: Target databases that will be excluded from the target database group (even if they match any of the include criteria).
    MembershipCount int
    The number of target databases in the specified target database group.
    MembershipUpdateTime string
    Time when the members of the target database group were last changed, i.e. the list was refreshed, a target database was added or removed.
    State string
    The lifecycle status of the target database group.
    SystemTags 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"}
    TargetDatabaseGroupId string
    TimeCreated string
    Time when the target database group was created.
    TimeUpdated string
    Time when the target database group was last updated.
    CompartmentId string
    The OCID for the compartment containing the target database group.
    DefinedTags 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
    Description of the target database group.
    DisplayName string
    The name of the target database group.
    FreeformTags 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"}
    Id string
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    LifecycleDetails string
    Details for the lifecycle status of the target database group.
    MatchingCriterias []GetTargetDatabaseGroupMatchingCriteria
    Criteria to either include or exclude target databases from the target database group. These criteria can be based on compartments or tags or a list of target databases. See examples below for more details. Include: Target databases will be added to the target database group if they match at least one of the include criteria. Exclude: Target databases that will be excluded from the target database group (even if they match any of the include criteria).
    MembershipCount int
    The number of target databases in the specified target database group.
    MembershipUpdateTime string
    Time when the members of the target database group were last changed, i.e. the list was refreshed, a target database was added or removed.
    State string
    The lifecycle status of the target database group.
    SystemTags 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"}
    TargetDatabaseGroupId string
    TimeCreated string
    Time when the target database group was created.
    TimeUpdated string
    Time when the target database group was last updated.
    compartmentId String
    The OCID for the compartment containing the target database group.
    definedTags 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
    Description of the target database group.
    displayName String
    The name of the target database group.
    freeformTags 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"}
    id String
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    lifecycleDetails String
    Details for the lifecycle status of the target database group.
    matchingCriterias List<GetTargetDatabaseGroupMatchingCriteria>
    Criteria to either include or exclude target databases from the target database group. These criteria can be based on compartments or tags or a list of target databases. See examples below for more details. Include: Target databases will be added to the target database group if they match at least one of the include criteria. Exclude: Target databases that will be excluded from the target database group (even if they match any of the include criteria).
    membershipCount Integer
    The number of target databases in the specified target database group.
    membershipUpdateTime String
    Time when the members of the target database group were last changed, i.e. the list was refreshed, a target database was added or removed.
    state String
    The lifecycle status of the target database group.
    systemTags 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"}
    targetDatabaseGroupId String
    timeCreated String
    Time when the target database group was created.
    timeUpdated String
    Time when the target database group was last updated.
    compartmentId string
    The OCID for the compartment containing the target database group.
    definedTags {[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
    Description of the target database group.
    displayName string
    The name of the target database group.
    freeformTags {[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"}
    id string
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    lifecycleDetails string
    Details for the lifecycle status of the target database group.
    matchingCriterias GetTargetDatabaseGroupMatchingCriteria[]
    Criteria to either include or exclude target databases from the target database group. These criteria can be based on compartments or tags or a list of target databases. See examples below for more details. Include: Target databases will be added to the target database group if they match at least one of the include criteria. Exclude: Target databases that will be excluded from the target database group (even if they match any of the include criteria).
    membershipCount number
    The number of target databases in the specified target database group.
    membershipUpdateTime string
    Time when the members of the target database group were last changed, i.e. the list was refreshed, a target database was added or removed.
    state string
    The lifecycle status of the target database group.
    systemTags {[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"}
    targetDatabaseGroupId string
    timeCreated string
    Time when the target database group was created.
    timeUpdated string
    Time when the target database group was last updated.
    compartment_id str
    The OCID for the compartment containing the target database group.
    defined_tags 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
    Description of the target database group.
    display_name str
    The name of the target database group.
    freeform_tags 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"}
    id str
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    lifecycle_details str
    Details for the lifecycle status of the target database group.
    matching_criterias Sequence[GetTargetDatabaseGroupMatchingCriteria]
    Criteria to either include or exclude target databases from the target database group. These criteria can be based on compartments or tags or a list of target databases. See examples below for more details. Include: Target databases will be added to the target database group if they match at least one of the include criteria. Exclude: Target databases that will be excluded from the target database group (even if they match any of the include criteria).
    membership_count int
    The number of target databases in the specified target database group.
    membership_update_time str
    Time when the members of the target database group were last changed, i.e. the list was refreshed, a target database was added or removed.
    state str
    The lifecycle status of the target database group.
    system_tags 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_database_group_id str
    time_created str
    Time when the target database group was created.
    time_updated str
    Time when the target database group was last updated.
    compartmentId String
    The OCID for the compartment containing the target database group.
    definedTags 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
    Description of the target database group.
    displayName String
    The name of the target database group.
    freeformTags 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"}
    id String
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    lifecycleDetails String
    Details for the lifecycle status of the target database group.
    matchingCriterias List<Property Map>
    Criteria to either include or exclude target databases from the target database group. These criteria can be based on compartments or tags or a list of target databases. See examples below for more details. Include: Target databases will be added to the target database group if they match at least one of the include criteria. Exclude: Target databases that will be excluded from the target database group (even if they match any of the include criteria).
    membershipCount Number
    The number of target databases in the specified target database group.
    membershipUpdateTime String
    Time when the members of the target database group were last changed, i.e. the list was refreshed, a target database was added or removed.
    state String
    The lifecycle status of the target database group.
    systemTags 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"}
    targetDatabaseGroupId String
    timeCreated String
    Time when the target database group was created.
    timeUpdated String
    Time when the target database group was last updated.

    Supporting Types

    GetTargetDatabaseGroupMatchingCriteria

    Excludes List<GetTargetDatabaseGroupMatchingCriteriaExclude>
    Criteria to exclude certain target databases from the target database group.
    Includes List<GetTargetDatabaseGroupMatchingCriteriaInclude>
    Criteria to determine whether a target database should be included in the target database group. If the database satisfies any of compartments, targetDatabaseIds, freeformTags, or definedTags criteria, it qualifies for inclusion in the target database group
    Excludes []GetTargetDatabaseGroupMatchingCriteriaExclude
    Criteria to exclude certain target databases from the target database group.
    Includes []GetTargetDatabaseGroupMatchingCriteriaInclude
    Criteria to determine whether a target database should be included in the target database group. If the database satisfies any of compartments, targetDatabaseIds, freeformTags, or definedTags criteria, it qualifies for inclusion in the target database group
    excludes List<GetTargetDatabaseGroupMatchingCriteriaExclude>
    Criteria to exclude certain target databases from the target database group.
    includes List<GetTargetDatabaseGroupMatchingCriteriaInclude>
    Criteria to determine whether a target database should be included in the target database group. If the database satisfies any of compartments, targetDatabaseIds, freeformTags, or definedTags criteria, it qualifies for inclusion in the target database group
    excludes GetTargetDatabaseGroupMatchingCriteriaExclude[]
    Criteria to exclude certain target databases from the target database group.
    includes GetTargetDatabaseGroupMatchingCriteriaInclude[]
    Criteria to determine whether a target database should be included in the target database group. If the database satisfies any of compartments, targetDatabaseIds, freeformTags, or definedTags criteria, it qualifies for inclusion in the target database group
    excludes Sequence[GetTargetDatabaseGroupMatchingCriteriaExclude]
    Criteria to exclude certain target databases from the target database group.
    includes Sequence[GetTargetDatabaseGroupMatchingCriteriaInclude]
    Criteria to determine whether a target database should be included in the target database group. If the database satisfies any of compartments, targetDatabaseIds, freeformTags, or definedTags criteria, it qualifies for inclusion in the target database group
    excludes List<Property Map>
    Criteria to exclude certain target databases from the target database group.
    includes List<Property Map>
    Criteria to determine whether a target database should be included in the target database group. If the database satisfies any of compartments, targetDatabaseIds, freeformTags, or definedTags criteria, it qualifies for inclusion in the target database group

    GetTargetDatabaseGroupMatchingCriteriaExclude

    TargetDatabaseIds List<string>
    The list of target database OCIDs to be included in the target database group.
    TargetDatabaseIds []string
    The list of target database OCIDs to be included in the target database group.
    targetDatabaseIds List<String>
    The list of target database OCIDs to be included in the target database group.
    targetDatabaseIds string[]
    The list of target database OCIDs to be included in the target database group.
    target_database_ids Sequence[str]
    The list of target database OCIDs to be included in the target database group.
    targetDatabaseIds List<String>
    The list of target database OCIDs to be included in the target database group.

    GetTargetDatabaseGroupMatchingCriteriaInclude

    Compartments List<GetTargetDatabaseGroupMatchingCriteriaIncludeCompartment>
    List of compartment objects, each containing the OCID of the compartment and a boolean value that indicates whether the target databases in the compartments and sub-compartments should also be included in the target database group.
    DefinedTags 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"}
    FreeformTags 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"}
    TargetDatabaseIds List<string>
    The list of target database OCIDs to be included in the target database group.
    Compartments []GetTargetDatabaseGroupMatchingCriteriaIncludeCompartment
    List of compartment objects, each containing the OCID of the compartment and a boolean value that indicates whether the target databases in the compartments and sub-compartments should also be included in the target database group.
    DefinedTags 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"}
    FreeformTags 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"}
    TargetDatabaseIds []string
    The list of target database OCIDs to be included in the target database group.
    compartments List<GetTargetDatabaseGroupMatchingCriteriaIncludeCompartment>
    List of compartment objects, each containing the OCID of the compartment and a boolean value that indicates whether the target databases in the compartments and sub-compartments should also be included in the target database group.
    definedTags 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"}
    freeformTags 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"}
    targetDatabaseIds List<String>
    The list of target database OCIDs to be included in the target database group.
    compartments GetTargetDatabaseGroupMatchingCriteriaIncludeCompartment[]
    List of compartment objects, each containing the OCID of the compartment and a boolean value that indicates whether the target databases in the compartments and sub-compartments should also be included in the target database group.
    definedTags {[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"}
    freeformTags {[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"}
    targetDatabaseIds string[]
    The list of target database OCIDs to be included in the target database group.
    compartments Sequence[GetTargetDatabaseGroupMatchingCriteriaIncludeCompartment]
    List of compartment objects, each containing the OCID of the compartment and a boolean value that indicates whether the target databases in the compartments and sub-compartments should also be included in the target database group.
    defined_tags 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"}
    freeform_tags 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"}
    target_database_ids Sequence[str]
    The list of target database OCIDs to be included in the target database group.
    compartments List<Property Map>
    List of compartment objects, each containing the OCID of the compartment and a boolean value that indicates whether the target databases in the compartments and sub-compartments should also be included in the target database group.
    definedTags 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"}
    freeformTags 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"}
    targetDatabaseIds List<String>
    The list of target database OCIDs to be included in the target database group.

    GetTargetDatabaseGroupMatchingCriteriaIncludeCompartment

    Id string
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    IsIncludeSubtree bool
    This indicates whether the target databases of sub-compartments should also be included in the target database group. By default, this parameter is set to false.
    Id string
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    IsIncludeSubtree bool
    This indicates whether the target databases of sub-compartments should also be included in the target database group. By default, this parameter is set to false.
    id String
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    isIncludeSubtree Boolean
    This indicates whether the target databases of sub-compartments should also be included in the target database group. By default, this parameter is set to false.
    id string
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    isIncludeSubtree boolean
    This indicates whether the target databases of sub-compartments should also be included in the target database group. By default, this parameter is set to false.
    id str
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    is_include_subtree bool
    This indicates whether the target databases of sub-compartments should also be included in the target database group. By default, this parameter is set to false.
    id String
    The OCID of the compartment for including target databases to the target database group. All target databases in the compartment will be members of the target database group.
    isIncludeSubtree Boolean
    This indicates whether the target databases of sub-compartments should also be included in the target database group. By default, this parameter is set to false.

    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 v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi