1. Packages
  2. Vkcs Provider
  3. API Docs
  4. getDbInstance
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.getDbInstance

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Use this data source to get the information on a db instance resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const dbInstance = vkcs.getDbInstance({
        id: "e7da2869-2ae2-4900-99e3-a44fec2b11ac",
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    db_instance = vkcs.get_db_instance(id="e7da2869-2ae2-4900-99e3-a44fec2b11ac")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.LookupDbInstance(ctx, &vkcs.LookupDbInstanceArgs{
    			Id: "e7da2869-2ae2-4900-99e3-a44fec2b11ac",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var dbInstance = Vkcs.GetDbInstance.Invoke(new()
        {
            Id = "e7da2869-2ae2-4900-99e3-a44fec2b11ac",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.VkcsFunctions;
    import com.pulumi.vkcs.inputs.GetDbInstanceArgs;
    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 dbInstance = VkcsFunctions.getDbInstance(GetDbInstanceArgs.builder()
                .id("e7da2869-2ae2-4900-99e3-a44fec2b11ac")
                .build());
    
        }
    }
    
    variables:
      dbInstance:
        fn::invoke:
          function: vkcs:getDbInstance
          arguments:
            id: e7da2869-2ae2-4900-99e3-a44fec2b11ac
    

    Using getDbInstance

    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 getDbInstance(args: GetDbInstanceArgs, opts?: InvokeOptions): Promise<GetDbInstanceResult>
    function getDbInstanceOutput(args: GetDbInstanceOutputArgs, opts?: InvokeOptions): Output<GetDbInstanceResult>
    def get_db_instance(backup_schedules: Optional[Sequence[GetDbInstanceBackupSchedule]] = None,
                        datastore: Optional[GetDbInstanceDatastore] = None,
                        flavor_id: Optional[str] = None,
                        hostname: Optional[str] = None,
                        id: Optional[str] = None,
                        ips: Optional[Sequence[str]] = None,
                        name: Optional[str] = None,
                        region: Optional[str] = None,
                        status: Optional[str] = None,
                        volume: Optional[GetDbInstanceVolume] = None,
                        opts: Optional[InvokeOptions] = None) -> GetDbInstanceResult
    def get_db_instance_output(backup_schedules: Optional[pulumi.Input[Sequence[pulumi.Input[GetDbInstanceBackupScheduleArgs]]]] = None,
                        datastore: Optional[pulumi.Input[GetDbInstanceDatastoreArgs]] = None,
                        flavor_id: Optional[pulumi.Input[str]] = None,
                        hostname: Optional[pulumi.Input[str]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        region: Optional[pulumi.Input[str]] = None,
                        status: Optional[pulumi.Input[str]] = None,
                        volume: Optional[pulumi.Input[GetDbInstanceVolumeArgs]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetDbInstanceResult]
    func LookupDbInstance(ctx *Context, args *LookupDbInstanceArgs, opts ...InvokeOption) (*LookupDbInstanceResult, error)
    func LookupDbInstanceOutput(ctx *Context, args *LookupDbInstanceOutputArgs, opts ...InvokeOption) LookupDbInstanceResultOutput

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

    public static class GetDbInstance 
    {
        public static Task<GetDbInstanceResult> InvokeAsync(GetDbInstanceArgs args, InvokeOptions? opts = null)
        public static Output<GetDbInstanceResult> Invoke(GetDbInstanceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDbInstanceResult> getDbInstance(GetDbInstanceArgs args, InvokeOptions options)
    public static Output<GetDbInstanceResult> getDbInstance(GetDbInstanceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vkcs:index/getDbInstance:getDbInstance
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    required string → The id of the instance.
    BackupSchedules List<GetDbInstanceBackupSchedule>
    optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
    Datastore GetDbInstanceDatastore
    optional → Object that represents datastore of the instance.
    FlavorId string
    optional string → The ID of flavor for the instance.
    Hostname string
    optional string → The hostname of the instance.
    Ips List<string>
    optional string → IP address of the instance.
    Name string
    optional string → The name of the instance.
    Region string
    optional string → Region of the resource.
    Status string
    optional string → Instance status.
    Volume GetDbInstanceVolume
    optional → Object that describes volume of the instance.
    Id string
    required string → The id of the instance.
    BackupSchedules []GetDbInstanceBackupSchedule
    optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
    Datastore GetDbInstanceDatastore
    optional → Object that represents datastore of the instance.
    FlavorId string
    optional string → The ID of flavor for the instance.
    Hostname string
    optional string → The hostname of the instance.
    Ips []string
    optional string → IP address of the instance.
    Name string
    optional string → The name of the instance.
    Region string
    optional string → Region of the resource.
    Status string
    optional string → Instance status.
    Volume GetDbInstanceVolume
    optional → Object that describes volume of the instance.
    id String
    required string → The id of the instance.
    backupSchedules List<GetDbInstanceBackupSchedule>
    optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
    datastore GetDbInstanceDatastore
    optional → Object that represents datastore of the instance.
    flavorId String
    optional string → The ID of flavor for the instance.
    hostname String
    optional string → The hostname of the instance.
    ips List<String>
    optional string → IP address of the instance.
    name String
    optional string → The name of the instance.
    region String
    optional string → Region of the resource.
    status String
    optional string → Instance status.
    volume GetDbInstanceVolume
    optional → Object that describes volume of the instance.
    id string
    required string → The id of the instance.
    backupSchedules GetDbInstanceBackupSchedule[]
    optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
    datastore GetDbInstanceDatastore
    optional → Object that represents datastore of the instance.
    flavorId string
    optional string → The ID of flavor for the instance.
    hostname string
    optional string → The hostname of the instance.
    ips string[]
    optional string → IP address of the instance.
    name string
    optional string → The name of the instance.
    region string
    optional string → Region of the resource.
    status string
    optional string → Instance status.
    volume GetDbInstanceVolume
    optional → Object that describes volume of the instance.
    id str
    required string → The id of the instance.
    backup_schedules Sequence[GetDbInstanceBackupSchedule]
    optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
    datastore GetDbInstanceDatastore
    optional → Object that represents datastore of the instance.
    flavor_id str
    optional string → The ID of flavor for the instance.
    hostname str
    optional string → The hostname of the instance.
    ips Sequence[str]
    optional string → IP address of the instance.
    name str
    optional string → The name of the instance.
    region str
    optional string → Region of the resource.
    status str
    optional string → Instance status.
    volume GetDbInstanceVolume
    optional → Object that describes volume of the instance.
    id String
    required string → The id of the instance.
    backupSchedules List<Property Map>
    optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
    datastore Property Map
    optional → Object that represents datastore of the instance.
    flavorId String
    optional string → The ID of flavor for the instance.
    hostname String
    optional string → The hostname of the instance.
    ips List<String>
    optional string → IP address of the instance.
    name String
    optional string → The name of the instance.
    region String
    optional string → Region of the resource.
    status String
    optional string → Instance status.
    volume Property Map
    optional → Object that describes volume of the instance.

    getDbInstance Result

    The following output properties are available:

    Supporting Types

    GetDbInstanceBackupSchedule

    IntervalHours double
    required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
    KeepCount double
    required number → Number of backups to be stored.
    Name string
    required string → Name of the schedule.
    StartHours double
    required number → Hours part of timestamp of initial backup.
    StartMinutes double
    required number → Minutes part of timestamp of initial backup.
    IntervalHours float64
    required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
    KeepCount float64
    required number → Number of backups to be stored.
    Name string
    required string → Name of the schedule.
    StartHours float64
    required number → Hours part of timestamp of initial backup.
    StartMinutes float64
    required number → Minutes part of timestamp of initial backup.
    intervalHours Double
    required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
    keepCount Double
    required number → Number of backups to be stored.
    name String
    required string → Name of the schedule.
    startHours Double
    required number → Hours part of timestamp of initial backup.
    startMinutes Double
    required number → Minutes part of timestamp of initial backup.
    intervalHours number
    required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
    keepCount number
    required number → Number of backups to be stored.
    name string
    required string → Name of the schedule.
    startHours number
    required number → Hours part of timestamp of initial backup.
    startMinutes number
    required number → Minutes part of timestamp of initial backup.
    interval_hours float
    required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
    keep_count float
    required number → Number of backups to be stored.
    name str
    required string → Name of the schedule.
    start_hours float
    required number → Hours part of timestamp of initial backup.
    start_minutes float
    required number → Minutes part of timestamp of initial backup.
    intervalHours Number
    required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
    keepCount Number
    required number → Number of backups to be stored.
    name String
    required string → Name of the schedule.
    startHours Number
    required number → Hours part of timestamp of initial backup.
    startMinutes Number
    required number → Minutes part of timestamp of initial backup.

    GetDbInstanceDatastore

    Type string
    required string → Type of the datastore.
    Version string
    required string → Version of the datastore.
    Type string
    required string → Type of the datastore.
    Version string
    required string → Version of the datastore.
    type String
    required string → Type of the datastore.
    version String
    required string → Version of the datastore.
    type string
    required string → Type of the datastore.
    version string
    required string → Version of the datastore.
    type str
    required string → Type of the datastore.
    version str
    required string → Version of the datastore.
    type String
    required string → Type of the datastore.
    version String
    required string → Version of the datastore.

    GetDbInstanceVolume

    Size double
    required number → Size of the instance volume.
    Used double
    required number → Size of the used volume space.
    VolumeId string
    required string → ID of the instance volume.
    VolumeType string
    required string → Type of the instance volume.
    Size float64
    required number → Size of the instance volume.
    Used float64
    required number → Size of the used volume space.
    VolumeId string
    required string → ID of the instance volume.
    VolumeType string
    required string → Type of the instance volume.
    size Double
    required number → Size of the instance volume.
    used Double
    required number → Size of the used volume space.
    volumeId String
    required string → ID of the instance volume.
    volumeType String
    required string → Type of the instance volume.
    size number
    required number → Size of the instance volume.
    used number
    required number → Size of the used volume space.
    volumeId string
    required string → ID of the instance volume.
    volumeType string
    required string → Type of the instance volume.
    size float
    required number → Size of the instance volume.
    used float
    required number → Size of the used volume space.
    volume_id str
    required string → ID of the instance volume.
    volume_type str
    required string → Type of the instance volume.
    size Number
    required number → Size of the instance volume.
    used Number
    required number → Size of the used volume space.
    volumeId String
    required string → ID of the instance volume.
    volumeType String
    required string → Type of the instance volume.

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs