Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Database.getDataGuardAssociations
Explore with Pulumi AI
This data source provides the list of Data Guard Associations in Oracle Cloud Infrastructure Database service.
Lists all Data Guard associations for the specified database.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDataGuardAssociations = oci.Database.getDataGuardAssociations({
    databaseId: testDatabase.id,
});
import pulumi
import pulumi_oci as oci
test_data_guard_associations = oci.Database.get_data_guard_associations(database_id=test_database["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/database"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := database.GetDataGuardAssociations(ctx, &database.GetDataGuardAssociationsArgs{
			DatabaseId: testDatabase.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 testDataGuardAssociations = Oci.Database.GetDataGuardAssociations.Invoke(new()
    {
        DatabaseId = testDatabase.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Database.DatabaseFunctions;
import com.pulumi.oci.Database.inputs.GetDataGuardAssociationsArgs;
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 testDataGuardAssociations = DatabaseFunctions.getDataGuardAssociations(GetDataGuardAssociationsArgs.builder()
            .databaseId(testDatabase.id())
            .build());
    }
}
variables:
  testDataGuardAssociations:
    fn::invoke:
      function: oci:Database:getDataGuardAssociations
      arguments:
        databaseId: ${testDatabase.id}
Using getDataGuardAssociations
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 getDataGuardAssociations(args: GetDataGuardAssociationsArgs, opts?: InvokeOptions): Promise<GetDataGuardAssociationsResult>
function getDataGuardAssociationsOutput(args: GetDataGuardAssociationsOutputArgs, opts?: InvokeOptions): Output<GetDataGuardAssociationsResult>def get_data_guard_associations(database_id: Optional[str] = None,
                                filters: Optional[Sequence[GetDataGuardAssociationsFilter]] = None,
                                opts: Optional[InvokeOptions] = None) -> GetDataGuardAssociationsResult
def get_data_guard_associations_output(database_id: Optional[pulumi.Input[str]] = None,
                                filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDataGuardAssociationsFilterArgs]]]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetDataGuardAssociationsResult]func GetDataGuardAssociations(ctx *Context, args *GetDataGuardAssociationsArgs, opts ...InvokeOption) (*GetDataGuardAssociationsResult, error)
func GetDataGuardAssociationsOutput(ctx *Context, args *GetDataGuardAssociationsOutputArgs, opts ...InvokeOption) GetDataGuardAssociationsResultOutput> Note: This function is named GetDataGuardAssociations in the Go SDK.
public static class GetDataGuardAssociations 
{
    public static Task<GetDataGuardAssociationsResult> InvokeAsync(GetDataGuardAssociationsArgs args, InvokeOptions? opts = null)
    public static Output<GetDataGuardAssociationsResult> Invoke(GetDataGuardAssociationsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDataGuardAssociationsResult> getDataGuardAssociations(GetDataGuardAssociationsArgs args, InvokeOptions options)
public static Output<GetDataGuardAssociationsResult> getDataGuardAssociations(GetDataGuardAssociationsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Database/getDataGuardAssociations:getDataGuardAssociations
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DatabaseId string
- The database OCID.
- Filters
List<GetData Guard Associations Filter> 
- DatabaseId string
- The database OCID.
- Filters
[]GetData Guard Associations Filter 
- databaseId String
- The database OCID.
- filters
List<GetData Guard Associations Filter> 
- databaseId string
- The database OCID.
- filters
GetData Guard Associations Filter[] 
- database_id str
- The database OCID.
- filters
Sequence[GetData Guard Associations Filter] 
- databaseId String
- The database OCID.
- filters List<Property Map>
getDataGuardAssociations Result
The following output properties are available:
- DataGuard List<GetAssociations Data Guard Associations Data Guard Association> 
- The list of data_guard_associations.
- DatabaseId string
- The OCID of the reporting database.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<GetData Guard Associations Filter> 
- DataGuard []GetAssociations Data Guard Associations Data Guard Association 
- The list of data_guard_associations.
- DatabaseId string
- The OCID of the reporting database.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]GetData Guard Associations Filter 
- dataGuard List<GetAssociations Data Guard Associations Data Guard Association> 
- The list of data_guard_associations.
- databaseId String
- The OCID of the reporting database.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<GetData Guard Associations Filter> 
- dataGuard GetAssociations Data Guard Associations Data Guard Association[] 
- The list of data_guard_associations.
- databaseId string
- The OCID of the reporting database.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
GetData Guard Associations Filter[] 
- data_guard_ Sequence[Getassociations Data Guard Associations Data Guard Association] 
- The list of data_guard_associations.
- database_id str
- The OCID of the reporting database.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[GetData Guard Associations Filter] 
- dataGuard List<Property Map>Associations 
- The list of data_guard_associations.
- databaseId String
- The OCID of the reporting database.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
Supporting Types
GetDataGuardAssociationsDataGuardAssociation      
- ApplyLag string
- The lag time between updates to the primary database and application of the redo data on the standby database, as computed by the reporting database. Example: 9 seconds
- ApplyRate string
- The rate at which redo logs are synced between the associated databases. Example: 180 Mb per second
- AvailabilityDomain string
- BackupNetwork List<string>Nsg Ids 
- CpuCore intCount 
- CreateAsync bool
- CreationType string
- DataCollection List<GetOptions Data Guard Associations Data Guard Association Data Collection Option> 
- DatabaseAdmin stringPassword 
- Dictionary<string, string>
- Dictionary<string, string>
- DatabaseId string
- The database OCID.
- DatabaseSoftware stringImage Id 
- Dictionary<string, string>
- Dictionary<string, string>
- DbSystem Dictionary<string, string>Security Attributes 
- DeleteStandby stringDb Home On Delete 
- DisplayName string
- Domain string
- FaultDomains List<string>
- Hostname string
- Id string
- The OCID of the Data Guard association.
- IsActive boolData Guard Enabled 
- True if active Data Guard is enabled.
- LicenseModel string
- LifecycleDetails string
- Additional information about the current lifecycleState, if available.
- MigrateTrigger int
- NodeCount int
- NsgIds List<string>
- PeerData stringGuard Association Id 
- The OCID of the peer database's Data Guard association.
- PeerDatabase stringId 
- The OCID of the associated peer database.
- PeerDb stringHome Id 
- The OCID of the Database Home containing the associated peer database.
- PeerDb stringSystem Id 
- The OCID of the DB system containing the associated peer database.
- PeerDb stringUnique Name 
- PeerRole string
- The role of the peer database in this Data Guard association.
- PeerSid stringPrefix 
- PeerVm stringCluster Id 
- PrivateIp string
- PrivateIp stringV6 
- ProtectionMode string
- The protection mode of this Data Guard association. For more information, see Oracle Data Guard Protection Modes in the Oracle Data Guard documentation.
- Role string
- The role of the reporting database in this Data Guard association.
- Shape string
- State string
- The current state of the Data Guard association.
- StorageVolume stringPerformance Mode 
- SubnetId string
- TimeCreated string
- The date and time the Data Guard association was created.
- TimeZone string
- TransportType string
- The redo transport type used by this Data Guard association. For more information, see Redo Transport Services in the Oracle Data Guard documentation.
- ApplyLag string
- The lag time between updates to the primary database and application of the redo data on the standby database, as computed by the reporting database. Example: 9 seconds
- ApplyRate string
- The rate at which redo logs are synced between the associated databases. Example: 180 Mb per second
- AvailabilityDomain string
- BackupNetwork []stringNsg Ids 
- CpuCore intCount 
- CreateAsync bool
- CreationType string
- DataCollection []GetOptions Data Guard Associations Data Guard Association Data Collection Option 
- DatabaseAdmin stringPassword 
- map[string]string
- map[string]string
- DatabaseId string
- The database OCID.
- DatabaseSoftware stringImage Id 
- map[string]string
- map[string]string
- DbSystem map[string]stringSecurity Attributes 
- DeleteStandby stringDb Home On Delete 
- DisplayName string
- Domain string
- FaultDomains []string
- Hostname string
- Id string
- The OCID of the Data Guard association.
- IsActive boolData Guard Enabled 
- True if active Data Guard is enabled.
- LicenseModel string
- LifecycleDetails string
- Additional information about the current lifecycleState, if available.
- MigrateTrigger int
- NodeCount int
- NsgIds []string
- PeerData stringGuard Association Id 
- The OCID of the peer database's Data Guard association.
- PeerDatabase stringId 
- The OCID of the associated peer database.
- PeerDb stringHome Id 
- The OCID of the Database Home containing the associated peer database.
- PeerDb stringSystem Id 
- The OCID of the DB system containing the associated peer database.
- PeerDb stringUnique Name 
- PeerRole string
- The role of the peer database in this Data Guard association.
- PeerSid stringPrefix 
- PeerVm stringCluster Id 
- PrivateIp string
- PrivateIp stringV6 
- ProtectionMode string
- The protection mode of this Data Guard association. For more information, see Oracle Data Guard Protection Modes in the Oracle Data Guard documentation.
- Role string
- The role of the reporting database in this Data Guard association.
- Shape string
- State string
- The current state of the Data Guard association.
- StorageVolume stringPerformance Mode 
- SubnetId string
- TimeCreated string
- The date and time the Data Guard association was created.
- TimeZone string
- TransportType string
- The redo transport type used by this Data Guard association. For more information, see Redo Transport Services in the Oracle Data Guard documentation.
- applyLag String
- The lag time between updates to the primary database and application of the redo data on the standby database, as computed by the reporting database. Example: 9 seconds
- applyRate String
- The rate at which redo logs are synced between the associated databases. Example: 180 Mb per second
- availabilityDomain String
- backupNetwork List<String>Nsg Ids 
- cpuCore IntegerCount 
- createAsync Boolean
- creationType String
- dataCollection List<GetOptions Data Guard Associations Data Guard Association Data Collection Option> 
- databaseAdmin StringPassword 
- Map<String,String>
- Map<String,String>
- databaseId String
- The database OCID.
- databaseSoftware StringImage Id 
- Map<String,String>
- Map<String,String>
- dbSystem Map<String,String>Security Attributes 
- deleteStandby StringDb Home On Delete 
- displayName String
- domain String
- faultDomains List<String>
- hostname String
- id String
- The OCID of the Data Guard association.
- isActive BooleanData Guard Enabled 
- True if active Data Guard is enabled.
- licenseModel String
- lifecycleDetails String
- Additional information about the current lifecycleState, if available.
- migrateTrigger Integer
- nodeCount Integer
- nsgIds List<String>
- peerData StringGuard Association Id 
- The OCID of the peer database's Data Guard association.
- peerDatabase StringId 
- The OCID of the associated peer database.
- peerDb StringHome Id 
- The OCID of the Database Home containing the associated peer database.
- peerDb StringSystem Id 
- The OCID of the DB system containing the associated peer database.
- peerDb StringUnique Name 
- peerRole String
- The role of the peer database in this Data Guard association.
- peerSid StringPrefix 
- peerVm StringCluster Id 
- privateIp String
- privateIp StringV6 
- protectionMode String
- The protection mode of this Data Guard association. For more information, see Oracle Data Guard Protection Modes in the Oracle Data Guard documentation.
- role String
- The role of the reporting database in this Data Guard association.
- shape String
- state String
- The current state of the Data Guard association.
- storageVolume StringPerformance Mode 
- subnetId String
- timeCreated String
- The date and time the Data Guard association was created.
- timeZone String
- transportType String
- The redo transport type used by this Data Guard association. For more information, see Redo Transport Services in the Oracle Data Guard documentation.
- applyLag string
- The lag time between updates to the primary database and application of the redo data on the standby database, as computed by the reporting database. Example: 9 seconds
- applyRate string
- The rate at which redo logs are synced between the associated databases. Example: 180 Mb per second
- availabilityDomain string
- backupNetwork string[]Nsg Ids 
- cpuCore numberCount 
- createAsync boolean
- creationType string
- dataCollection GetOptions Data Guard Associations Data Guard Association Data Collection Option[] 
- databaseAdmin stringPassword 
- {[key: string]: string}
- {[key: string]: string}
- databaseId string
- The database OCID.
- databaseSoftware stringImage Id 
- {[key: string]: string}
- {[key: string]: string}
- dbSystem {[key: string]: string}Security Attributes 
- deleteStandby stringDb Home On Delete 
- displayName string
- domain string
- faultDomains string[]
- hostname string
- id string
- The OCID of the Data Guard association.
- isActive booleanData Guard Enabled 
- True if active Data Guard is enabled.
- licenseModel string
- lifecycleDetails string
- Additional information about the current lifecycleState, if available.
- migrateTrigger number
- nodeCount number
- nsgIds string[]
- peerData stringGuard Association Id 
- The OCID of the peer database's Data Guard association.
- peerDatabase stringId 
- The OCID of the associated peer database.
- peerDb stringHome Id 
- The OCID of the Database Home containing the associated peer database.
- peerDb stringSystem Id 
- The OCID of the DB system containing the associated peer database.
- peerDb stringUnique Name 
- peerRole string
- The role of the peer database in this Data Guard association.
- peerSid stringPrefix 
- peerVm stringCluster Id 
- privateIp string
- privateIp stringV6 
- protectionMode string
- The protection mode of this Data Guard association. For more information, see Oracle Data Guard Protection Modes in the Oracle Data Guard documentation.
- role string
- The role of the reporting database in this Data Guard association.
- shape string
- state string
- The current state of the Data Guard association.
- storageVolume stringPerformance Mode 
- subnetId string
- timeCreated string
- The date and time the Data Guard association was created.
- timeZone string
- transportType string
- The redo transport type used by this Data Guard association. For more information, see Redo Transport Services in the Oracle Data Guard documentation.
- apply_lag str
- The lag time between updates to the primary database and application of the redo data on the standby database, as computed by the reporting database. Example: 9 seconds
- apply_rate str
- The rate at which redo logs are synced between the associated databases. Example: 180 Mb per second
- availability_domain str
- backup_network_ Sequence[str]nsg_ ids 
- cpu_core_ intcount 
- create_async bool
- creation_type str
- data_collection_ Sequence[Getoptions Data Guard Associations Data Guard Association Data Collection Option] 
- database_admin_ strpassword 
- Mapping[str, str]
- Mapping[str, str]
- database_id str
- The database OCID.
- database_software_ strimage_ id 
- Mapping[str, str]
- Mapping[str, str]
- db_system_ Mapping[str, str]security_ attributes 
- delete_standby_ strdb_ home_ on_ delete 
- display_name str
- domain str
- fault_domains Sequence[str]
- hostname str
- id str
- The OCID of the Data Guard association.
- is_active_ booldata_ guard_ enabled 
- True if active Data Guard is enabled.
- license_model str
- lifecycle_details str
- Additional information about the current lifecycleState, if available.
- migrate_trigger int
- node_count int
- nsg_ids Sequence[str]
- peer_data_ strguard_ association_ id 
- The OCID of the peer database's Data Guard association.
- peer_database_ strid 
- The OCID of the associated peer database.
- peer_db_ strhome_ id 
- The OCID of the Database Home containing the associated peer database.
- peer_db_ strsystem_ id 
- The OCID of the DB system containing the associated peer database.
- peer_db_ strunique_ name 
- peer_role str
- The role of the peer database in this Data Guard association.
- peer_sid_ strprefix 
- peer_vm_ strcluster_ id 
- private_ip str
- private_ip_ strv6 
- protection_mode str
- The protection mode of this Data Guard association. For more information, see Oracle Data Guard Protection Modes in the Oracle Data Guard documentation.
- role str
- The role of the reporting database in this Data Guard association.
- shape str
- state str
- The current state of the Data Guard association.
- storage_volume_ strperformance_ mode 
- subnet_id str
- time_created str
- The date and time the Data Guard association was created.
- time_zone str
- transport_type str
- The redo transport type used by this Data Guard association. For more information, see Redo Transport Services in the Oracle Data Guard documentation.
- applyLag String
- The lag time between updates to the primary database and application of the redo data on the standby database, as computed by the reporting database. Example: 9 seconds
- applyRate String
- The rate at which redo logs are synced between the associated databases. Example: 180 Mb per second
- availabilityDomain String
- backupNetwork List<String>Nsg Ids 
- cpuCore NumberCount 
- createAsync Boolean
- creationType String
- dataCollection List<Property Map>Options 
- databaseAdmin StringPassword 
- Map<String>
- Map<String>
- databaseId String
- The database OCID.
- databaseSoftware StringImage Id 
- Map<String>
- Map<String>
- dbSystem Map<String>Security Attributes 
- deleteStandby StringDb Home On Delete 
- displayName String
- domain String
- faultDomains List<String>
- hostname String
- id String
- The OCID of the Data Guard association.
- isActive BooleanData Guard Enabled 
- True if active Data Guard is enabled.
- licenseModel String
- lifecycleDetails String
- Additional information about the current lifecycleState, if available.
- migrateTrigger Number
- nodeCount Number
- nsgIds List<String>
- peerData StringGuard Association Id 
- The OCID of the peer database's Data Guard association.
- peerDatabase StringId 
- The OCID of the associated peer database.
- peerDb StringHome Id 
- The OCID of the Database Home containing the associated peer database.
- peerDb StringSystem Id 
- The OCID of the DB system containing the associated peer database.
- peerDb StringUnique Name 
- peerRole String
- The role of the peer database in this Data Guard association.
- peerSid StringPrefix 
- peerVm StringCluster Id 
- privateIp String
- privateIp StringV6 
- protectionMode String
- The protection mode of this Data Guard association. For more information, see Oracle Data Guard Protection Modes in the Oracle Data Guard documentation.
- role String
- The role of the reporting database in this Data Guard association.
- shape String
- state String
- The current state of the Data Guard association.
- storageVolume StringPerformance Mode 
- subnetId String
- timeCreated String
- The date and time the Data Guard association was created.
- timeZone String
- transportType String
- The redo transport type used by this Data Guard association. For more information, see Redo Transport Services in the Oracle Data Guard documentation.
GetDataGuardAssociationsDataGuardAssociationDataCollectionOption         
- isDiagnostics BooleanEvents Enabled 
- isHealth BooleanMonitoring Enabled 
- isIncident BooleanLogs Enabled 
- isDiagnostics booleanEvents Enabled 
- isHealth booleanMonitoring Enabled 
- isIncident booleanLogs Enabled 
- isDiagnostics BooleanEvents Enabled 
- isHealth BooleanMonitoring Enabled 
- isIncident BooleanLogs Enabled 
GetDataGuardAssociationsFilter    
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.