vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs
vkcs.getDbInstance
Explore with Pulumi AI
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.
- Backup
Schedules List<GetDb Instance Backup Schedule> - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- Datastore
Get
Db Instance Datastore - optional → Object that represents datastore of the instance.
- Flavor
Id 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
Get
Db Instance Volume - optional → Object that describes volume of the instance.
- Id string
- required string → The id of the instance.
- Backup
Schedules []GetDb Instance Backup Schedule - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- Datastore
Get
Db Instance Datastore - optional → Object that represents datastore of the instance.
- Flavor
Id 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
Get
Db Instance Volume - optional → Object that describes volume of the instance.
- id String
- required string → The id of the instance.
- backup
Schedules List<GetDb Instance Backup Schedule> - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- datastore
Get
Db Instance Datastore - optional → Object that represents datastore of the instance.
- flavor
Id 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
Get
Db Instance Volume - optional → Object that describes volume of the instance.
- id string
- required string → The id of the instance.
- backup
Schedules GetDb Instance Backup Schedule[] - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- datastore
Get
Db Instance Datastore - optional → Object that represents datastore of the instance.
- flavor
Id 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
Get
Db Instance Volume - optional → Object that describes volume of the instance.
- id str
- required string → The id of the instance.
- backup_
schedules Sequence[GetDb Instance Backup Schedule] - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- datastore
Get
Db Instance Datastore - 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
Get
Db Instance Volume - optional → Object that describes volume of the instance.
- id String
- required string → The id of the instance.
- backup
Schedules 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.
- flavor
Id 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:
- Id string
- Backup
Schedules List<GetDb Instance Backup Schedule> - Datastore
Get
Db Instance Datastore - Flavor
Id string - Hostname string
- Ips List<string>
- Name string
- Region string
- Status string
- Volume
Get
Db Instance Volume
- Id string
- Backup
Schedules []GetDb Instance Backup Schedule - Datastore
Get
Db Instance Datastore - Flavor
Id string - Hostname string
- Ips []string
- Name string
- Region string
- Status string
- Volume
Get
Db Instance Volume
- id String
- backup
Schedules List<GetDb Instance Backup Schedule> - datastore
Get
Db Instance Datastore - flavor
Id String - hostname String
- ips List<String>
- name String
- region String
- status String
- volume
Get
Db Instance Volume
- id string
- backup
Schedules GetDb Instance Backup Schedule[] - datastore
Get
Db Instance Datastore - flavor
Id string - hostname string
- ips string[]
- name string
- region string
- status string
- volume
Get
Db Instance Volume
- id str
- backup_
schedules Sequence[GetDb Instance Backup Schedule] - datastore
Get
Db Instance Datastore - flavor_
id str - hostname str
- ips Sequence[str]
- name str
- region str
- status str
- volume
Get
Db Instance Volume
- id String
- backup
Schedules List<Property Map> - datastore Property Map
- flavor
Id String - hostname String
- ips List<String>
- name String
- region String
- status String
- volume Property Map
Supporting Types
GetDbInstanceBackupSchedule
- Interval
Hours double - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- Keep
Count double - required number → Number of backups to be stored.
- Name string
- required string → Name of the schedule.
- Start
Hours double - required number → Hours part of timestamp of initial backup.
- Start
Minutes double - required number → Minutes part of timestamp of initial backup.
- Interval
Hours float64 - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- Keep
Count float64 - required number → Number of backups to be stored.
- Name string
- required string → Name of the schedule.
- Start
Hours float64 - required number → Hours part of timestamp of initial backup.
- Start
Minutes float64 - required number → Minutes part of timestamp of initial backup.
- interval
Hours Double - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- keep
Count Double - required number → Number of backups to be stored.
- name String
- required string → Name of the schedule.
- start
Hours Double - required number → Hours part of timestamp of initial backup.
- start
Minutes Double - required number → Minutes part of timestamp of initial backup.
- interval
Hours number - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- keep
Count number - required number → Number of backups to be stored.
- name string
- required string → Name of the schedule.
- start
Hours number - required number → Hours part of timestamp of initial backup.
- start
Minutes 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.
- interval
Hours Number - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- keep
Count Number - required number → Number of backups to be stored.
- name String
- required string → Name of the schedule.
- start
Hours Number - required number → Hours part of timestamp of initial backup.
- start
Minutes Number - required number → Minutes part of timestamp of initial backup.
GetDbInstanceDatastore
GetDbInstanceVolume
- Size double
- required number → Size of the instance volume.
- Used double
- required number → Size of the used volume space.
- Volume
Id string - required string → ID of the instance volume.
- Volume
Type 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.
- Volume
Id string - required string → ID of the instance volume.
- Volume
Type 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.
- volume
Id String - required string → ID of the instance volume.
- volume
Type 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.
- volume
Id string - required string → ID of the instance volume.
- volume
Type 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.
- volume
Id String - required string → ID of the instance volume.
- volume
Type 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.