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

vkcs.getDbDatastores

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 a list of datastores from VKCS.

    New since v0.2.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const datastores = vkcs.getDbDatastores({});
    export const availableDatastores = datastores.then(datastores => datastores.datastores);
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    datastores = vkcs.get_db_datastores()
    pulumi.export("availableDatastores", datastores.datastores)
    
    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 {
    		datastores, err := vkcs.GetDbDatastores(ctx, &vkcs.GetDbDatastoresArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("availableDatastores", datastores.Datastores)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var datastores = Vkcs.GetDbDatastores.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["availableDatastores"] = datastores.Apply(getDbDatastoresResult => getDbDatastoresResult.Datastores),
        };
    });
    
    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.GetDbDatastoresArgs;
    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 datastores = VkcsFunctions.getDbDatastores();
    
            ctx.export("availableDatastores", datastores.applyValue(getDbDatastoresResult -> getDbDatastoresResult.datastores()));
        }
    }
    
    variables:
      datastores:
        fn::invoke:
          function: vkcs:getDbDatastores
          arguments: {}
    outputs:
      availableDatastores: ${datastores.datastores}
    

    Using getDbDatastores

    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 getDbDatastores(args: GetDbDatastoresArgs, opts?: InvokeOptions): Promise<GetDbDatastoresResult>
    function getDbDatastoresOutput(args: GetDbDatastoresOutputArgs, opts?: InvokeOptions): Output<GetDbDatastoresResult>
    def get_db_datastores(id: Optional[str] = None,
                          region: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetDbDatastoresResult
    def get_db_datastores_output(id: Optional[pulumi.Input[str]] = None,
                          region: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetDbDatastoresResult]
    func GetDbDatastores(ctx *Context, args *GetDbDatastoresArgs, opts ...InvokeOption) (*GetDbDatastoresResult, error)
    func GetDbDatastoresOutput(ctx *Context, args *GetDbDatastoresOutputArgs, opts ...InvokeOption) GetDbDatastoresResultOutput

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

    public static class GetDbDatastores 
    {
        public static Task<GetDbDatastoresResult> InvokeAsync(GetDbDatastoresArgs args, InvokeOptions? opts = null)
        public static Output<GetDbDatastoresResult> Invoke(GetDbDatastoresInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDbDatastoresResult> getDbDatastores(GetDbDatastoresArgs args, InvokeOptions options)
    public static Output<GetDbDatastoresResult> getDbDatastores(GetDbDatastoresArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vkcs:index/getDbDatastores:getDbDatastores
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    string → ID of the resource.
    Region string
    optional string → The region to obtain the service client. If omitted, the region argument of the provider is used.
    Id string
    string → ID of the resource.
    Region string
    optional string → The region to obtain the service client. If omitted, the region argument of the provider is used.
    id String
    string → ID of the resource.
    region String
    optional string → The region to obtain the service client. If omitted, the region argument of the provider is used.
    id string
    string → ID of the resource.
    region string
    optional string → The region to obtain the service client. If omitted, the region argument of the provider is used.
    id str
    string → ID of the resource.
    region str
    optional string → The region to obtain the service client. If omitted, the region argument of the provider is used.
    id String
    string → ID of the resource.
    region String
    optional string → The region to obtain the service client. If omitted, the region argument of the provider is used.

    getDbDatastores Result

    The following output properties are available:

    Datastores List<GetDbDatastoresDatastore>
    list → List of datastores within VKCS.
    Id string
    string → ID of the resource.
    Region string
    Datastores []GetDbDatastoresDatastore
    list → List of datastores within VKCS.
    Id string
    string → ID of the resource.
    Region string
    datastores List<GetDbDatastoresDatastore>
    list → List of datastores within VKCS.
    id String
    string → ID of the resource.
    region String
    datastores GetDbDatastoresDatastore[]
    list → List of datastores within VKCS.
    id string
    string → ID of the resource.
    region string
    datastores Sequence[GetDbDatastoresDatastore]
    list → List of datastores within VKCS.
    id str
    string → ID of the resource.
    region str
    datastores List<Property Map>
    list → List of datastores within VKCS.
    id String
    string → ID of the resource.
    region String

    Supporting Types

    GetDbDatastoresDatastore

    Id string
    string → ID of the resource.
    Name string
    string → Name of a datastore.
    Id string
    string → ID of the resource.
    Name string
    string → Name of a datastore.
    id String
    string → ID of the resource.
    name String
    string → Name of a datastore.
    id string
    string → ID of the resource.
    name string
    string → Name of a datastore.
    id str
    string → ID of the resource.
    name str
    string → Name of a datastore.
    id String
    string → ID of the resource.
    name String
    string → Name of a datastore.

    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