1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. kvstore
  5. getInstanceClasses
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.kvstore.getInstanceClasses

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

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

    NOTE: Available since v1.49.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const resources = alicloud.getZones({
        availableResourceCreation: "KVStore",
    });
    const resourcesGetInstanceClasses = resources.then(resources => alicloud.kvstore.getInstanceClasses({
        zoneId: resources.zones?.[0]?.id,
        instanceChargeType: "PrePaid",
        engine: "Redis",
        engineVersion: "5.0",
        outputFile: "./classes.txt",
    }));
    export const firstKvstoreInstanceClass = resourcesGetInstanceClasses.then(resourcesGetInstanceClasses => resourcesGetInstanceClasses.instanceClasses);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    resources = alicloud.get_zones(available_resource_creation="KVStore")
    resources_get_instance_classes = alicloud.kvstore.get_instance_classes(zone_id=resources.zones[0].id,
        instance_charge_type="PrePaid",
        engine="Redis",
        engine_version="5.0",
        output_file="./classes.txt")
    pulumi.export("firstKvstoreInstanceClass", resources_get_instance_classes.instance_classes)
    
    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 {
    		resources, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("KVStore"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		resourcesGetInstanceClasses, err := kvstore.GetInstanceClasses(ctx, &kvstore.GetInstanceClassesArgs{
    			ZoneId:             resources.Zones[0].Id,
    			InstanceChargeType: pulumi.StringRef("PrePaid"),
    			Engine:             pulumi.StringRef("Redis"),
    			EngineVersion:      pulumi.StringRef("5.0"),
    			OutputFile:         pulumi.StringRef("./classes.txt"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstKvstoreInstanceClass", resourcesGetInstanceClasses.InstanceClasses)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var resources = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "KVStore",
        });
    
        var resourcesGetInstanceClasses = AliCloud.KVStore.GetInstanceClasses.Invoke(new()
        {
            ZoneId = resources.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            InstanceChargeType = "PrePaid",
            Engine = "Redis",
            EngineVersion = "5.0",
            OutputFile = "./classes.txt",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstKvstoreInstanceClass"] = resourcesGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses),
        };
    });
    
    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.inputs.GetZonesArgs;
    import com.pulumi.alicloud.kvstore.KvstoreFunctions;
    import com.pulumi.alicloud.kvstore.inputs.GetInstanceClassesArgs;
    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 resources = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("KVStore")
                .build());
    
            final var resourcesGetInstanceClasses = KvstoreFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
                .zoneId(resources.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceChargeType("PrePaid")
                .engine("Redis")
                .engineVersion("5.0")
                .outputFile("./classes.txt")
                .build());
    
            ctx.export("firstKvstoreInstanceClass", resourcesGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()));
        }
    }
    
    variables:
      resources:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: KVStore
      resourcesGetInstanceClasses:
        fn::invoke:
          Function: alicloud:kvstore:getInstanceClasses
          Arguments:
            zoneId: ${resources.zones[0].id}
            instanceChargeType: PrePaid
            engine: Redis
            engineVersion: '5.0'
            outputFile: ./classes.txt
    outputs:
      firstKvstoreInstanceClass: ${resourcesGetInstanceClasses.instanceClasses}
    

    Using getInstanceClasses

    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 getInstanceClasses(args: GetInstanceClassesArgs, opts?: InvokeOptions): Promise<GetInstanceClassesResult>
    function getInstanceClassesOutput(args: GetInstanceClassesOutputArgs, opts?: InvokeOptions): Output<GetInstanceClassesResult>
    def get_instance_classes(architecture: Optional[str] = None,
                             edition_type: Optional[str] = None,
                             engine: Optional[str] = None,
                             engine_version: Optional[str] = None,
                             instance_charge_type: Optional[str] = None,
                             node_type: Optional[str] = None,
                             output_file: Optional[str] = None,
                             package_type: Optional[str] = None,
                             performance_type: Optional[str] = None,
                             product_type: Optional[str] = None,
                             series_type: Optional[str] = None,
                             shard_number: Optional[int] = None,
                             sorted_by: Optional[str] = None,
                             storage_type: Optional[str] = None,
                             zone_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetInstanceClassesResult
    def get_instance_classes_output(architecture: Optional[pulumi.Input[str]] = None,
                             edition_type: Optional[pulumi.Input[str]] = None,
                             engine: Optional[pulumi.Input[str]] = None,
                             engine_version: Optional[pulumi.Input[str]] = None,
                             instance_charge_type: Optional[pulumi.Input[str]] = None,
                             node_type: Optional[pulumi.Input[str]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             package_type: Optional[pulumi.Input[str]] = None,
                             performance_type: Optional[pulumi.Input[str]] = None,
                             product_type: Optional[pulumi.Input[str]] = None,
                             series_type: Optional[pulumi.Input[str]] = None,
                             shard_number: Optional[pulumi.Input[int]] = None,
                             sorted_by: Optional[pulumi.Input[str]] = None,
                             storage_type: Optional[pulumi.Input[str]] = None,
                             zone_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetInstanceClassesResult]
    func GetInstanceClasses(ctx *Context, args *GetInstanceClassesArgs, opts ...InvokeOption) (*GetInstanceClassesResult, error)
    func GetInstanceClassesOutput(ctx *Context, args *GetInstanceClassesOutputArgs, opts ...InvokeOption) GetInstanceClassesResultOutput

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

    public static class GetInstanceClasses 
    {
        public static Task<GetInstanceClassesResult> InvokeAsync(GetInstanceClassesArgs args, InvokeOptions? opts = null)
        public static Output<GetInstanceClassesResult> Invoke(GetInstanceClassesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstanceClassesResult> getInstanceClasses(GetInstanceClassesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:kvstore/getInstanceClasses:getInstanceClasses
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    The Zone to launch the KVStore instance.
    Architecture string
    The KVStore instance system architecture required by the user. Valid values: standard, cluster and rwsplit.
    EditionType string
    The KVStore instance edition type required by the user. Valid values: Community and Enterprise.
    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.
    NodeType string
    The KVStore instance node type required by the user. Valid values: double, single, readone, readthree and readfive.
    OutputFile string
    File name where to save data source results (after running pulumi up).
    PackageType string
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    PerformanceType string
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    ProductType string
    SeriesType string
    The KVStore instance series type required by the user. Valid values: enhanced_performance_type and hybrid_storage.
    ShardNumber int
    The number of shard.Valid values: 1, 2, 4, 8, 16, 32, 64, 128, 256.

    • product_type - (Optional, Available since 1.130.0) The type of the service. Valid values:
    • Local: an ApsaraDB for Redis instance with a local disk.
    • OnECS: an ApsaraDB for Redis instance with a standard disk. This type is available only on the Alibaba Cloud China site.
    SortedBy string
    StorageType string
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    ZoneId string
    The Zone to launch the KVStore instance.
    Architecture string
    The KVStore instance system architecture required by the user. Valid values: standard, cluster and rwsplit.
    EditionType string
    The KVStore instance edition type required by the user. Valid values: Community and Enterprise.
    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.
    NodeType string
    The KVStore instance node type required by the user. Valid values: double, single, readone, readthree and readfive.
    OutputFile string
    File name where to save data source results (after running pulumi up).
    PackageType string
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    PerformanceType string
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    ProductType string
    SeriesType string
    The KVStore instance series type required by the user. Valid values: enhanced_performance_type and hybrid_storage.
    ShardNumber int
    The number of shard.Valid values: 1, 2, 4, 8, 16, 32, 64, 128, 256.

    • product_type - (Optional, Available since 1.130.0) The type of the service. Valid values:
    • Local: an ApsaraDB for Redis instance with a local disk.
    • OnECS: an ApsaraDB for Redis instance with a standard disk. This type is available only on the Alibaba Cloud China site.
    SortedBy string
    StorageType string
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    zoneId String
    The Zone to launch the KVStore instance.
    architecture String
    The KVStore instance system architecture required by the user. Valid values: standard, cluster and rwsplit.
    editionType String
    The KVStore instance edition type required by the user. Valid values: Community and Enterprise.
    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.
    nodeType String
    The KVStore instance node type required by the user. Valid values: double, single, readone, readthree and readfive.
    outputFile String
    File name where to save data source results (after running pulumi up).
    packageType String
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    performanceType String
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    productType String
    seriesType String
    The KVStore instance series type required by the user. Valid values: enhanced_performance_type and hybrid_storage.
    shardNumber Integer
    The number of shard.Valid values: 1, 2, 4, 8, 16, 32, 64, 128, 256.

    • product_type - (Optional, Available since 1.130.0) The type of the service. Valid values:
    • Local: an ApsaraDB for Redis instance with a local disk.
    • OnECS: an ApsaraDB for Redis instance with a standard disk. This type is available only on the Alibaba Cloud China site.
    sortedBy String
    storageType String
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    zoneId string
    The Zone to launch the KVStore instance.
    architecture string
    The KVStore instance system architecture required by the user. Valid values: standard, cluster and rwsplit.
    editionType string
    The KVStore instance edition type required by the user. Valid values: Community and Enterprise.
    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.
    nodeType string
    The KVStore instance node type required by the user. Valid values: double, single, readone, readthree and readfive.
    outputFile string
    File name where to save data source results (after running pulumi up).
    packageType string
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    performanceType string
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    productType string
    seriesType string
    The KVStore instance series type required by the user. Valid values: enhanced_performance_type and hybrid_storage.
    shardNumber number
    The number of shard.Valid values: 1, 2, 4, 8, 16, 32, 64, 128, 256.

    • product_type - (Optional, Available since 1.130.0) The type of the service. Valid values:
    • Local: an ApsaraDB for Redis instance with a local disk.
    • OnECS: an ApsaraDB for Redis instance with a standard disk. This type is available only on the Alibaba Cloud China site.
    sortedBy string
    storageType string
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    zone_id str
    The Zone to launch the KVStore instance.
    architecture str
    The KVStore instance system architecture required by the user. Valid values: standard, cluster and rwsplit.
    edition_type str
    The KVStore instance edition type required by the user. Valid values: Community and Enterprise.
    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.
    node_type str
    The KVStore instance node type required by the user. Valid values: double, single, readone, readthree and readfive.
    output_file str
    File name where to save data source results (after running pulumi up).
    package_type str
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    performance_type str
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    product_type str
    series_type str
    The KVStore instance series type required by the user. Valid values: enhanced_performance_type and hybrid_storage.
    shard_number int
    The number of shard.Valid values: 1, 2, 4, 8, 16, 32, 64, 128, 256.

    • product_type - (Optional, Available since 1.130.0) The type of the service. Valid values:
    • Local: an ApsaraDB for Redis instance with a local disk.
    • OnECS: an ApsaraDB for Redis instance with a standard disk. This type is available only on the Alibaba Cloud China site.
    sorted_by str
    storage_type str
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    zoneId String
    The Zone to launch the KVStore instance.
    architecture String
    The KVStore instance system architecture required by the user. Valid values: standard, cluster and rwsplit.
    editionType String
    The KVStore instance edition type required by the user. Valid values: Community and Enterprise.
    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.
    nodeType String
    The KVStore instance node type required by the user. Valid values: double, single, readone, readthree and readfive.
    outputFile String
    File name where to save data source results (after running pulumi up).
    packageType String
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    performanceType String
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    productType String
    seriesType String
    The KVStore instance series type required by the user. Valid values: enhanced_performance_type and hybrid_storage.
    shardNumber Number
    The number of shard.Valid values: 1, 2, 4, 8, 16, 32, 64, 128, 256.

    • product_type - (Optional, Available since 1.130.0) The type of the service. Valid values:
    • Local: an ApsaraDB for Redis instance with a local disk.
    • OnECS: an ApsaraDB for Redis instance with a standard disk. This type is available only on the Alibaba Cloud China site.
    sortedBy String
    storageType String
    It has been deprecated from 1.68.0.

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    getInstanceClasses Result

    The following output properties are available:

    Classes List<Pulumi.AliCloud.KVStore.Outputs.GetInstanceClassesClass>
    A list of KVStore available instance classes when the sorted_by is "Price". include:
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceClasses List<string>
    A list of KVStore available instance classes.
    ZoneId string
    Architecture string
    EditionType string
    Engine string
    EngineVersion string
    InstanceChargeType string
    NodeType string
    OutputFile string
    PackageType string

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    PerformanceType string

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    ProductType string
    SeriesType string
    ShardNumber int
    SortedBy string
    StorageType string

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    Classes []GetInstanceClassesClass
    A list of KVStore available instance classes when the sorted_by is "Price". include:
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceClasses []string
    A list of KVStore available instance classes.
    ZoneId string
    Architecture string
    EditionType string
    Engine string
    EngineVersion string
    InstanceChargeType string
    NodeType string
    OutputFile string
    PackageType string

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    PerformanceType string

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    ProductType string
    SeriesType string
    ShardNumber int
    SortedBy string
    StorageType string

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    classes List<GetInstanceClassesClass>
    A list of KVStore available instance classes when the sorted_by is "Price". include:
    id String
    The provider-assigned unique ID for this managed resource.
    instanceClasses List<String>
    A list of KVStore available instance classes.
    zoneId String
    architecture String
    editionType String
    engine String
    engineVersion String
    instanceChargeType String
    nodeType String
    outputFile String
    packageType String

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    performanceType String

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    productType String
    seriesType String
    shardNumber Integer
    sortedBy String
    storageType String

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    classes GetInstanceClassesClass[]
    A list of KVStore available instance classes when the sorted_by is "Price". include:
    id string
    The provider-assigned unique ID for this managed resource.
    instanceClasses string[]
    A list of KVStore available instance classes.
    zoneId string
    architecture string
    editionType string
    engine string
    engineVersion string
    instanceChargeType string
    nodeType string
    outputFile string
    packageType string

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    performanceType string

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    productType string
    seriesType string
    shardNumber number
    sortedBy string
    storageType string

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    classes Sequence[GetInstanceClassesClass]
    A list of KVStore available instance classes when the sorted_by is "Price". include:
    id str
    The provider-assigned unique ID for this managed resource.
    instance_classes Sequence[str]
    A list of KVStore available instance classes.
    zone_id str
    architecture str
    edition_type str
    engine str
    engine_version str
    instance_charge_type str
    node_type str
    output_file str
    package_type str

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    performance_type str

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    product_type str
    series_type str
    shard_number int
    sorted_by str
    storage_type str

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    classes List<Property Map>
    A list of KVStore available instance classes when the sorted_by is "Price". include:
    id String
    The provider-assigned unique ID for this managed resource.
    instanceClasses List<String>
    A list of KVStore available instance classes.
    zoneId String
    architecture String
    editionType String
    engine String
    engineVersion String
    instanceChargeType String
    nodeType String
    outputFile String
    packageType String

    Deprecated: The parameter 'package_type' has been deprecated from 1.68.0.

    performanceType String

    Deprecated: The parameter 'performance_type' has been deprecated from 1.68.0.

    productType String
    seriesType String
    shardNumber Number
    sortedBy String
    storageType String

    Deprecated: The parameter 'storage_type' has been deprecated from 1.68.0.

    Supporting Types

    GetInstanceClassesClass

    InstanceClass string
    KVStore available instance class.
    Price string
    InstanceClass string
    KVStore available instance class.
    Price string
    instanceClass String
    KVStore available instance class.
    price String
    instanceClass string
    KVStore available instance class.
    price string
    instance_class str
    KVStore available instance class.
    price str
    instanceClass String
    KVStore available instance class.
    price String

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi