Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getInstanceEngines

This data source provides the KVStore instance engines resource available info of Alibaba Cloud.

NOTE: Available in v1.51.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var resourcesZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
        {
            AvailableResourceCreation = "KVStore",
        }));
        var resourcesInstanceEngines = resourcesZones.Apply(resourcesZones => Output.Create(AliCloud.KVStore.GetInstanceEngines.InvokeAsync(new AliCloud.KVStore.GetInstanceEnginesArgs
        {
            Engine = "Redis",
            EngineVersion = "5.0",
            InstanceChargeType = "PrePaid",
            OutputFile = "./engines.txt",
            ZoneId = resourcesZones.Zones?[0]?.Id,
        })));
        this.FirstKvstoreInstanceClass = resourcesInstanceEngines.Apply(resourcesInstanceEngines => resourcesInstanceEngines.InstanceEngines?[0]?.Engine);
    }

    [Output("firstKvstoreInstanceClass")]
    public Output<string> FirstKvstoreInstanceClass { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kvstore"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		resourcesZones, err := alicloud.GetZones(ctx, &GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("KVStore"),
		}, nil)
		if err != nil {
			return err
		}
		resourcesInstanceEngines, err := kvstore.GetInstanceEngines(ctx, &kvstore.GetInstanceEnginesArgs{
			Engine:             pulumi.StringRef("Redis"),
			EngineVersion:      pulumi.StringRef("5.0"),
			InstanceChargeType: pulumi.StringRef("PrePaid"),
			OutputFile:         pulumi.StringRef("./engines.txt"),
			ZoneId:             resourcesZones.Zones[0].Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstKvstoreInstanceClass", resourcesInstanceEngines.InstanceEngines[0].Engine)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.adb.inputs.GetZonesArgs;
import com.pulumi.alicloud.kvstore.KvstoreFunctions;
import com.pulumi.alicloud.kvstore.inputs.GetInstanceEnginesArgs;
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 resourcesZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableResourceCreation("KVStore")
            .build());

        final var resourcesInstanceEngines = KvstoreFunctions.getInstanceEngines(GetInstanceEnginesArgs.builder()
            .engine("Redis")
            .engineVersion("5.0")
            .instanceChargeType("PrePaid")
            .outputFile("./engines.txt")
            .zoneId(resourcesZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .build());

        ctx.export("firstKvstoreInstanceClass", resourcesInstanceEngines.applyValue(getInstanceEnginesResult -> getInstanceEnginesResult.instanceEngines()[0].engine()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

resources_zones = alicloud.get_zones(available_resource_creation="KVStore")
resources_instance_engines = alicloud.kvstore.get_instance_engines(engine="Redis",
    engine_version="5.0",
    instance_charge_type="PrePaid",
    output_file="./engines.txt",
    zone_id=resources_zones.zones[0].id)
pulumi.export("firstKvstoreInstanceClass", resources_instance_engines.instance_engines[0].engine)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const resourcesZones = pulumi.output(alicloud.getZones({
    availableResourceCreation: "KVStore",
}));
const resourcesInstanceEngines = resourcesZones.apply(resourcesZones => alicloud.kvstore.getInstanceEngines({
    engine: "Redis",
    engineVersion: "5.0",
    instanceChargeType: "PrePaid",
    outputFile: "./engines.txt",
    zoneId: resourcesZones.zones[0].id,
}));

export const firstKvstoreInstanceClass = resourcesInstanceEngines.instanceEngines[0].engine;
variables:
  resourcesZones:
    Fn::Invoke:
      Function: alicloud:getZones
      Arguments:
        availableResourceCreation: KVStore
  resourcesInstanceEngines:
    Fn::Invoke:
      Function: alicloud:kvstore:getInstanceEngines
      Arguments:
        engine: Redis
        engineVersion: 5.0
        instanceChargeType: PrePaid
        outputFile: ./engines.txt
        zoneId: ${resourcesZones.zones[0].id}
outputs:
  firstKvstoreInstanceClass: ${resourcesInstanceEngines.instanceEngines[0].engine}

Using getInstanceEngines

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 getInstanceEngines(args: GetInstanceEnginesArgs, opts?: InvokeOptions): Promise<GetInstanceEnginesResult>
function getInstanceEnginesOutput(args: GetInstanceEnginesOutputArgs, opts?: InvokeOptions): Output<GetInstanceEnginesResult>
def get_instance_engines(engine: Optional[str] = None,
                         engine_version: Optional[str] = None,
                         instance_charge_type: Optional[str] = None,
                         output_file: Optional[str] = None,
                         zone_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetInstanceEnginesResult
def get_instance_engines_output(engine: Optional[pulumi.Input[str]] = None,
                         engine_version: Optional[pulumi.Input[str]] = None,
                         instance_charge_type: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         zone_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetInstanceEnginesResult]
func GetInstanceEngines(ctx *Context, args *GetInstanceEnginesArgs, opts ...InvokeOption) (*GetInstanceEnginesResult, error)
func GetInstanceEnginesOutput(ctx *Context, args *GetInstanceEnginesOutputArgs, opts ...InvokeOption) GetInstanceEnginesResultOutput

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

public static class GetInstanceEngines 
{
    public static Task<GetInstanceEnginesResult> InvokeAsync(GetInstanceEnginesArgs args, InvokeOptions? opts = null)
    public static Output<GetInstanceEnginesResult> Invoke(GetInstanceEnginesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceEnginesResult> getInstanceEngines(GetInstanceEnginesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:kvstore/getInstanceEngines:getInstanceEngines
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ZoneId string

The Zone to launch the KVStore instance.

Engine string

Database type. Options are Redis, Memcache. Default to Redis.

EngineVersion string

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

InstanceChargeType string

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PrePaid.

OutputFile string
ZoneId string

The Zone to launch the KVStore instance.

Engine string

Database type. Options are Redis, Memcache. Default to Redis.

EngineVersion string

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

InstanceChargeType string

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PrePaid.

OutputFile string
zoneId String

The Zone to launch the KVStore instance.

engine String

Database type. Options are Redis, Memcache. Default to Redis.

engineVersion String

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

instanceChargeType String

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PrePaid.

outputFile String
zoneId string

The Zone to launch the KVStore instance.

engine string

Database type. Options are Redis, Memcache. Default to Redis.

engineVersion string

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

instanceChargeType string

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PrePaid.

outputFile string
zone_id str

The Zone to launch the KVStore instance.

engine str

Database type. Options are Redis, Memcache. Default to Redis.

engine_version str

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

instance_charge_type str

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PrePaid.

output_file str
zoneId String

The Zone to launch the KVStore instance.

engine String

Database type. Options are Redis, Memcache. Default to Redis.

engineVersion String

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

instanceChargeType String

Filter the results by charge type. Valid values: PrePaid and PostPaid. Default to PrePaid.

outputFile String

getInstanceEngines Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

InstanceEngines List<Pulumi.AliCloud.KVStore.Outputs.GetInstanceEnginesInstanceEngine>

A list of KVStore available instance engines. Each element contains the following attributes:

ZoneId string

The Zone to launch the KVStore instance.

Engine string

Database type.

EngineVersion string

KVStore Instance version.

InstanceChargeType string
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

InstanceEngines []GetInstanceEnginesInstanceEngine

A list of KVStore available instance engines. Each element contains the following attributes:

ZoneId string

The Zone to launch the KVStore instance.

Engine string

Database type.

EngineVersion string

KVStore Instance version.

InstanceChargeType string
OutputFile string
id String

The provider-assigned unique ID for this managed resource.

instanceEngines List<GetInstanceEnginesInstanceEngine>

A list of KVStore available instance engines. Each element contains the following attributes:

zoneId String

The Zone to launch the KVStore instance.

engine String

Database type.

engineVersion String

KVStore Instance version.

instanceChargeType String
outputFile String
id string

The provider-assigned unique ID for this managed resource.

instanceEngines GetInstanceEnginesInstanceEngine[]

A list of KVStore available instance engines. Each element contains the following attributes:

zoneId string

The Zone to launch the KVStore instance.

engine string

Database type.

engineVersion string

KVStore Instance version.

instanceChargeType string
outputFile string
id str

The provider-assigned unique ID for this managed resource.

instance_engines Sequence[GetInstanceEnginesInstanceEngine]

A list of KVStore available instance engines. Each element contains the following attributes:

zone_id str

The Zone to launch the KVStore instance.

engine str

Database type.

engine_version str

KVStore Instance version.

instance_charge_type str
output_file str
id String

The provider-assigned unique ID for this managed resource.

instanceEngines List<Property Map>

A list of KVStore available instance engines. Each element contains the following attributes:

zoneId String

The Zone to launch the KVStore instance.

engine String

Database type.

engineVersion String

KVStore Instance version.

instanceChargeType String
outputFile String

Supporting Types

GetInstanceEnginesInstanceEngine

Engine string

Database type. Options are Redis, Memcache. Default to Redis.

EngineVersion string

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

ZoneId string

The Zone to launch the KVStore instance.

Engine string

Database type. Options are Redis, Memcache. Default to Redis.

EngineVersion string

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

ZoneId string

The Zone to launch the KVStore instance.

engine String

Database type. Options are Redis, Memcache. Default to Redis.

engineVersion String

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

zoneId String

The Zone to launch the KVStore instance.

engine string

Database type. Options are Redis, Memcache. Default to Redis.

engineVersion string

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

zoneId string

The Zone to launch the KVStore instance.

engine str

Database type. Options are Redis, Memcache. Default to Redis.

engine_version str

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

zone_id str

The Zone to launch the KVStore instance.

engine String

Database type. Options are Redis, Memcache. Default to Redis.

engineVersion String

Database version required by the user. Value options of Redis can refer to the latest docs detail info EngineVersion. Value of Memcache should be empty.

zoneId String

The Zone to launch the KVStore instance.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.