1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Psql
  5. getDbSystemPrimaryDbInstance
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Psql.getDbSystemPrimaryDbInstance

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This data source provides details about a specific Db System Primary Db Instance resource in Oracle Cloud Infrastructure Psql service.

    Gets the primary database instance node details.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDbSystemPrimaryDbInstance = oci.Psql.getDbSystemPrimaryDbInstance({
        dbSystemId: testDbSystem.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_db_system_primary_db_instance = oci.Psql.get_db_system_primary_db_instance(db_system_id=test_db_system["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Psql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Psql.GetDbSystemPrimaryDbInstance(ctx, &psql.GetDbSystemPrimaryDbInstanceArgs{
    			DbSystemId: testDbSystem.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 testDbSystemPrimaryDbInstance = Oci.Psql.GetDbSystemPrimaryDbInstance.Invoke(new()
        {
            DbSystemId = testDbSystem.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Psql.PsqlFunctions;
    import com.pulumi.oci.Psql.inputs.GetDbSystemPrimaryDbInstanceArgs;
    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 testDbSystemPrimaryDbInstance = PsqlFunctions.getDbSystemPrimaryDbInstance(GetDbSystemPrimaryDbInstanceArgs.builder()
                .dbSystemId(testDbSystem.id())
                .build());
    
        }
    }
    
    variables:
      testDbSystemPrimaryDbInstance:
        fn::invoke:
          Function: oci:Psql:getDbSystemPrimaryDbInstance
          Arguments:
            dbSystemId: ${testDbSystem.id}
    

    Using getDbSystemPrimaryDbInstance

    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 getDbSystemPrimaryDbInstance(args: GetDbSystemPrimaryDbInstanceArgs, opts?: InvokeOptions): Promise<GetDbSystemPrimaryDbInstanceResult>
    function getDbSystemPrimaryDbInstanceOutput(args: GetDbSystemPrimaryDbInstanceOutputArgs, opts?: InvokeOptions): Output<GetDbSystemPrimaryDbInstanceResult>
    def get_db_system_primary_db_instance(db_system_id: Optional[str] = None,
                                          opts: Optional[InvokeOptions] = None) -> GetDbSystemPrimaryDbInstanceResult
    def get_db_system_primary_db_instance_output(db_system_id: Optional[pulumi.Input[str]] = None,
                                          opts: Optional[InvokeOptions] = None) -> Output[GetDbSystemPrimaryDbInstanceResult]
    func GetDbSystemPrimaryDbInstance(ctx *Context, args *GetDbSystemPrimaryDbInstanceArgs, opts ...InvokeOption) (*GetDbSystemPrimaryDbInstanceResult, error)
    func GetDbSystemPrimaryDbInstanceOutput(ctx *Context, args *GetDbSystemPrimaryDbInstanceOutputArgs, opts ...InvokeOption) GetDbSystemPrimaryDbInstanceResultOutput

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

    public static class GetDbSystemPrimaryDbInstance 
    {
        public static Task<GetDbSystemPrimaryDbInstanceResult> InvokeAsync(GetDbSystemPrimaryDbInstanceArgs args, InvokeOptions? opts = null)
        public static Output<GetDbSystemPrimaryDbInstanceResult> Invoke(GetDbSystemPrimaryDbInstanceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDbSystemPrimaryDbInstanceResult> getDbSystemPrimaryDbInstance(GetDbSystemPrimaryDbInstanceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Psql/getDbSystemPrimaryDbInstance:getDbSystemPrimaryDbInstance
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DbSystemId string
    A unique identifier for the database system.
    DbSystemId string
    A unique identifier for the database system.
    dbSystemId String
    A unique identifier for the database system.
    dbSystemId string
    A unique identifier for the database system.
    db_system_id str
    A unique identifier for the database system.
    dbSystemId String
    A unique identifier for the database system.

    getDbSystemPrimaryDbInstance Result

    The following output properties are available:

    DbInstanceId string
    A unique identifier for the primary database instance node.
    DbSystemId string
    Id string
    The provider-assigned unique ID for this managed resource.
    DbInstanceId string
    A unique identifier for the primary database instance node.
    DbSystemId string
    Id string
    The provider-assigned unique ID for this managed resource.
    dbInstanceId String
    A unique identifier for the primary database instance node.
    dbSystemId String
    id String
    The provider-assigned unique ID for this managed resource.
    dbInstanceId string
    A unique identifier for the primary database instance node.
    dbSystemId string
    id string
    The provider-assigned unique ID for this managed resource.
    db_instance_id str
    A unique identifier for the primary database instance node.
    db_system_id str
    id str
    The provider-assigned unique ID for this managed resource.
    dbInstanceId String
    A unique identifier for the primary database instance node.
    dbSystemId String
    id String
    The provider-assigned unique ID for this managed resource.

    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 v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi