1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Database
  5. getAutonomousDatabasePeers
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Database.getAutonomousDatabasePeers

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides the list of Autonomous Database Peers in Oracle Cloud Infrastructure Database service.

    Lists the Autonomous Database peers for the specified Autonomous Database.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAutonomousDatabasePeers = oci.Database.getAutonomousDatabasePeers({
        autonomousDatabaseId: testAutonomousDatabase.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_autonomous_database_peers = oci.Database.get_autonomous_database_peers(autonomous_database_id=test_autonomous_database["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Database"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Database.GetAutonomousDatabasePeers(ctx, &database.GetAutonomousDatabasePeersArgs{
    			AutonomousDatabaseId: testAutonomousDatabase.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 testAutonomousDatabasePeers = Oci.Database.GetAutonomousDatabasePeers.Invoke(new()
        {
            AutonomousDatabaseId = testAutonomousDatabase.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.GetAutonomousDatabasePeersArgs;
    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 testAutonomousDatabasePeers = DatabaseFunctions.getAutonomousDatabasePeers(GetAutonomousDatabasePeersArgs.builder()
                .autonomousDatabaseId(testAutonomousDatabase.id())
                .build());
    
        }
    }
    
    variables:
      testAutonomousDatabasePeers:
        fn::invoke:
          Function: oci:Database:getAutonomousDatabasePeers
          Arguments:
            autonomousDatabaseId: ${testAutonomousDatabase.id}
    

    Using getAutonomousDatabasePeers

    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 getAutonomousDatabasePeers(args: GetAutonomousDatabasePeersArgs, opts?: InvokeOptions): Promise<GetAutonomousDatabasePeersResult>
    function getAutonomousDatabasePeersOutput(args: GetAutonomousDatabasePeersOutputArgs, opts?: InvokeOptions): Output<GetAutonomousDatabasePeersResult>
    def get_autonomous_database_peers(autonomous_database_id: Optional[str] = None,
                                      filters: Optional[Sequence[_database.GetAutonomousDatabasePeersFilter]] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetAutonomousDatabasePeersResult
    def get_autonomous_database_peers_output(autonomous_database_id: Optional[pulumi.Input[str]] = None,
                                      filters: Optional[pulumi.Input[Sequence[pulumi.Input[_database.GetAutonomousDatabasePeersFilterArgs]]]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetAutonomousDatabasePeersResult]
    func GetAutonomousDatabasePeers(ctx *Context, args *GetAutonomousDatabasePeersArgs, opts ...InvokeOption) (*GetAutonomousDatabasePeersResult, error)
    func GetAutonomousDatabasePeersOutput(ctx *Context, args *GetAutonomousDatabasePeersOutputArgs, opts ...InvokeOption) GetAutonomousDatabasePeersResultOutput

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

    public static class GetAutonomousDatabasePeers 
    {
        public static Task<GetAutonomousDatabasePeersResult> InvokeAsync(GetAutonomousDatabasePeersArgs args, InvokeOptions? opts = null)
        public static Output<GetAutonomousDatabasePeersResult> Invoke(GetAutonomousDatabasePeersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAutonomousDatabasePeersResult> getAutonomousDatabasePeers(GetAutonomousDatabasePeersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Database/getAutonomousDatabasePeers:getAutonomousDatabasePeers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    getAutonomousDatabasePeers Result

    The following output properties are available:

    AutonomousDatabaseId string
    AutonomousDatabasePeerCollections List<GetAutonomousDatabasePeersAutonomousDatabasePeerCollection>
    The list of autonomous_database_peer_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters List<GetAutonomousDatabasePeersFilter>
    AutonomousDatabaseId string
    AutonomousDatabasePeerCollections []GetAutonomousDatabasePeersAutonomousDatabasePeerCollection
    The list of autonomous_database_peer_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters []GetAutonomousDatabasePeersFilter
    autonomousDatabaseId String
    autonomousDatabasePeerCollections List<GetAutonomousPeersAutonomousPeerCollection>
    The list of autonomous_database_peer_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<GetAutonomousPeersFilter>
    autonomousDatabaseId string
    autonomousDatabasePeerCollections GetAutonomousDatabasePeersAutonomousDatabasePeerCollection[]
    The list of autonomous_database_peer_collection.
    id string
    The provider-assigned unique ID for this managed resource.
    filters GetAutonomousDatabasePeersFilter[]
    autonomousDatabaseId String
    autonomousDatabasePeerCollections List<Property Map>
    The list of autonomous_database_peer_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<Property Map>

    Supporting Types

    GetAutonomousDatabasePeersAutonomousDatabasePeerCollection

    Items List<GetAutonomousDatabasePeersAutonomousDatabasePeerCollectionItem>
    This array holds details about Autonomous Database Peers for Oracle an Autonomous Database.
    Items []GetAutonomousDatabasePeersAutonomousDatabasePeerCollectionItem
    This array holds details about Autonomous Database Peers for Oracle an Autonomous Database.
    items List<GetAutonomousPeersAutonomousPeerCollectionItem>
    This array holds details about Autonomous Database Peers for Oracle an Autonomous Database.
    items GetAutonomousDatabasePeersAutonomousDatabasePeerCollectionItem[]
    This array holds details about Autonomous Database Peers for Oracle an Autonomous Database.
    items Sequence[database.GetAutonomousDatabasePeersAutonomousDatabasePeerCollectionItem]
    This array holds details about Autonomous Database Peers for Oracle an Autonomous Database.
    items List<Property Map>
    This array holds details about Autonomous Database Peers for Oracle an Autonomous Database.

    GetAutonomousDatabasePeersAutonomousDatabasePeerCollectionItem

    Id string
    The OCID of the Autonomous Database.
    Region string
    The name of the region where this peer Autonomous Database clone exists.
    Id string
    The OCID of the Autonomous Database.
    Region string
    The name of the region where this peer Autonomous Database clone exists.
    id String
    The OCID of the Autonomous Database.
    region String
    The name of the region where this peer Autonomous Database clone exists.
    id string
    The OCID of the Autonomous Database.
    region string
    The name of the region where this peer Autonomous Database clone exists.
    id str
    The OCID of the Autonomous Database.
    region str
    The name of the region where this peer Autonomous Database clone exists.
    id String
    The OCID of the Autonomous Database.
    region String
    The name of the region where this peer Autonomous Database clone exists.

    GetAutonomousDatabasePeersFilter

    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

    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.41.0 published on Wednesday, Jun 19, 2024 by Pulumi