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

vkcs.getDbDatastore

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 information on a VKCS db datastore.

    New since v0.2.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const datastore = vkcs.getDbDatastore({
        name: "mysql",
    });
    export const mysqlVersions = datastore.then(datastore => datastore.versions);
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    datastore = vkcs.get_db_datastore(name="mysql")
    pulumi.export("mysqlVersions", datastore.versions)
    
    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 {
    		datastore, err := vkcs.GetDbDatastore(ctx, &vkcs.GetDbDatastoreArgs{
    			Name: pulumi.StringRef("mysql"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("mysqlVersions", datastore.Versions)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var datastore = Vkcs.GetDbDatastore.Invoke(new()
        {
            Name = "mysql",
        });
    
        return new Dictionary<string, object?>
        {
            ["mysqlVersions"] = datastore.Apply(getDbDatastoreResult => getDbDatastoreResult.Versions),
        };
    });
    
    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.GetDbDatastoreArgs;
    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 datastore = VkcsFunctions.getDbDatastore(GetDbDatastoreArgs.builder()
                .name("mysql")
                .build());
    
            ctx.export("mysqlVersions", datastore.applyValue(getDbDatastoreResult -> getDbDatastoreResult.versions()));
        }
    }
    
    variables:
      datastore:
        fn::invoke:
          function: vkcs:getDbDatastore
          arguments:
            name: mysql
    outputs:
      mysqlVersions: ${datastore.versions}
    

    Using getDbDatastore

    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 getDbDatastore(args: GetDbDatastoreArgs, opts?: InvokeOptions): Promise<GetDbDatastoreResult>
    function getDbDatastoreOutput(args: GetDbDatastoreOutputArgs, opts?: InvokeOptions): Output<GetDbDatastoreResult>
    def get_db_datastore(id: Optional[str] = None,
                         name: Optional[str] = None,
                         region: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetDbDatastoreResult
    def get_db_datastore_output(id: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         region: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetDbDatastoreResult]
    func GetDbDatastore(ctx *Context, args *GetDbDatastoreArgs, opts ...InvokeOption) (*GetDbDatastoreResult, error)
    func GetDbDatastoreOutput(ctx *Context, args *GetDbDatastoreOutputArgs, opts ...InvokeOption) GetDbDatastoreResultOutput

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

    public static class GetDbDatastore 
    {
        public static Task<GetDbDatastoreResult> InvokeAsync(GetDbDatastoreArgs args, InvokeOptions? opts = null)
        public static Output<GetDbDatastoreResult> Invoke(GetDbDatastoreInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDbDatastoreResult> getDbDatastore(GetDbDatastoreArgs args, InvokeOptions options)
    public static Output<GetDbDatastoreResult> getDbDatastore(GetDbDatastoreArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vkcs:index/getDbDatastore:getDbDatastore
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getDbDatastore Result

    The following output properties are available:

    ClusterVolumeTypes List<string>
    string → Supported volume types for the datastore when used in a cluster.
    Id string
    string → ID of a version of the datastore.
    MinimumCpu double
    number → Minimum CPU required for instance of the datastore.
    MinimumRam double
    number → Minimum RAM required for instance of the datastore.
    Name string
    string → Name of a version of the datastore.
    Region string
    Versions List<GetDbDatastoreVersion>
    list → Versions of the datastore.
    VolumeTypes List<string>
    string → Supported volume types for the datastore.
    ClusterVolumeTypes []string
    string → Supported volume types for the datastore when used in a cluster.
    Id string
    string → ID of a version of the datastore.
    MinimumCpu float64
    number → Minimum CPU required for instance of the datastore.
    MinimumRam float64
    number → Minimum RAM required for instance of the datastore.
    Name string
    string → Name of a version of the datastore.
    Region string
    Versions []GetDbDatastoreVersion
    list → Versions of the datastore.
    VolumeTypes []string
    string → Supported volume types for the datastore.
    clusterVolumeTypes List<String>
    string → Supported volume types for the datastore when used in a cluster.
    id String
    string → ID of a version of the datastore.
    minimumCpu Double
    number → Minimum CPU required for instance of the datastore.
    minimumRam Double
    number → Minimum RAM required for instance of the datastore.
    name String
    string → Name of a version of the datastore.
    region String
    versions List<GetDbDatastoreVersion>
    list → Versions of the datastore.
    volumeTypes List<String>
    string → Supported volume types for the datastore.
    clusterVolumeTypes string[]
    string → Supported volume types for the datastore when used in a cluster.
    id string
    string → ID of a version of the datastore.
    minimumCpu number
    number → Minimum CPU required for instance of the datastore.
    minimumRam number
    number → Minimum RAM required for instance of the datastore.
    name string
    string → Name of a version of the datastore.
    region string
    versions GetDbDatastoreVersion[]
    list → Versions of the datastore.
    volumeTypes string[]
    string → Supported volume types for the datastore.
    cluster_volume_types Sequence[str]
    string → Supported volume types for the datastore when used in a cluster.
    id str
    string → ID of a version of the datastore.
    minimum_cpu float
    number → Minimum CPU required for instance of the datastore.
    minimum_ram float
    number → Minimum RAM required for instance of the datastore.
    name str
    string → Name of a version of the datastore.
    region str
    versions Sequence[GetDbDatastoreVersion]
    list → Versions of the datastore.
    volume_types Sequence[str]
    string → Supported volume types for the datastore.
    clusterVolumeTypes List<String>
    string → Supported volume types for the datastore when used in a cluster.
    id String
    string → ID of a version of the datastore.
    minimumCpu Number
    number → Minimum CPU required for instance of the datastore.
    minimumRam Number
    number → Minimum RAM required for instance of the datastore.
    name String
    string → Name of a version of the datastore.
    region String
    versions List<Property Map>
    list → Versions of the datastore.
    volumeTypes List<String>
    string → Supported volume types for the datastore.

    Supporting Types

    GetDbDatastoreVersion

    Id string
    optional string → The id of the datastore.
    Name string
    optional string → The name of the datastore.
    Id string
    optional string → The id of the datastore.
    Name string
    optional string → The name of the datastore.
    id String
    optional string → The id of the datastore.
    name String
    optional string → The name of the datastore.
    id string
    optional string → The id of the datastore.
    name string
    optional string → The name of the datastore.
    id str
    optional string → The id of the datastore.
    name str
    optional string → The name of the datastore.
    id String
    optional string → The id of the datastore.
    name String
    optional string → The name of the 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