alicloud.kvstore.getInstanceClasses
Explore with Pulumi AI
This data source provides the KVStore instance classes resource available info of Alibaba Cloud.
NOTE: Available in v1.49.0+
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var resourcesZones = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "KVStore",
});
var resourcesInstanceClasses = AliCloud.KVStore.GetInstanceClasses.Invoke(new()
{
Engine = "Redis",
EngineVersion = "5.0",
InstanceChargeType = "PrePaid",
OutputFile = "./classes.txt",
ZoneId = resourcesZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
});
return new Dictionary<string, object?>
{
["firstKvstoreInstanceClass"] = resourcesInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses),
};
});
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, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("KVStore"),
}, nil)
if err != nil {
return err
}
resourcesInstanceClasses, err := kvstore.GetInstanceClasses(ctx, &kvstore.GetInstanceClassesArgs{
Engine: pulumi.StringRef("Redis"),
EngineVersion: pulumi.StringRef("5.0"),
InstanceChargeType: pulumi.StringRef("PrePaid"),
OutputFile: pulumi.StringRef("./classes.txt"),
ZoneId: resourcesZones.Zones[0].Id,
}, nil)
if err != nil {
return err
}
ctx.Export("firstKvstoreInstanceClass", resourcesInstanceClasses.InstanceClasses)
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.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 resourcesZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("KVStore")
.build());
final var resourcesInstanceClasses = KvstoreFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
.engine("Redis")
.engineVersion("5.0")
.instanceChargeType("PrePaid")
.outputFile("./classes.txt")
.zoneId(resourcesZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
ctx.export("firstKvstoreInstanceClass", resourcesInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()));
}
}
import pulumi
import pulumi_alicloud as alicloud
resources_zones = alicloud.get_zones(available_resource_creation="KVStore")
resources_instance_classes = alicloud.kvstore.get_instance_classes(engine="Redis",
engine_version="5.0",
instance_charge_type="PrePaid",
output_file="./classes.txt",
zone_id=resources_zones.zones[0].id)
pulumi.export("firstKvstoreInstanceClass", resources_instance_classes.instance_classes)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const resourcesZones = alicloud.getZones({
availableResourceCreation: "KVStore",
});
const resourcesInstanceClasses = resourcesZones.then(resourcesZones => alicloud.kvstore.getInstanceClasses({
engine: "Redis",
engineVersion: "5.0",
instanceChargeType: "PrePaid",
outputFile: "./classes.txt",
zoneId: resourcesZones.zones?.[0]?.id,
}));
export const firstKvstoreInstanceClass = resourcesInstanceClasses.then(resourcesInstanceClasses => resourcesInstanceClasses.instanceClasses);
variables:
resourcesZones:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableResourceCreation: KVStore
resourcesInstanceClasses:
fn::invoke:
Function: alicloud:kvstore:getInstanceClasses
Arguments:
engine: Redis
engineVersion: '5.0'
instanceChargeType: PrePaid
outputFile: ./classes.txt
zoneId: ${resourcesZones.zones[0].id}
outputs:
firstKvstoreInstanceClass: ${resourcesInstanceClasses.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:
- Zone
Id string The Zone to launch the KVStore instance.
- Architecture string
The KVStore instance system architecture required by the user. Valid values:
standard
,cluster
andrwsplit
.- Edition
Type string The KVStore instance edition type required by the user. Valid values:
Community
andEnterprise
.- Engine string
Database type. Options are
Redis
,Memcache
. Default toRedis
.- Engine
Version 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.- Instance
Charge stringType Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. Default toPrePaid
.- Node
Type string The KVStore instance node type required by the user. Valid values:
double
,single
,readone
,readthree
andreadfive
.- Output
File string File name where to save data source results (after running
pulumi up
).- Package
Type string It has been deprecated from 1.68.0.
The parameter 'package_type' has been deprecated from 1.68.0.
- Performance
Type string It has been deprecated from 1.68.0.
The parameter 'performance_type' has been deprecated from 1.68.0.
- Product
Type string - Series
Type string The KVStore instance series type required by the user. Valid values:
enhanced_performance_type
andhybrid_storage
.- int
The number of shard.Valid values:
1
,2
,4
,8
,16
,32
,64
,128
,256
.- product_type - (Optional, Available in v1.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 string - Storage
Type string It has been deprecated from 1.68.0.
The parameter 'storage_type' has been deprecated from 1.68.0.
- Zone
Id string The Zone to launch the KVStore instance.
- Architecture string
The KVStore instance system architecture required by the user. Valid values:
standard
,cluster
andrwsplit
.- Edition
Type string The KVStore instance edition type required by the user. Valid values:
Community
andEnterprise
.- Engine string
Database type. Options are
Redis
,Memcache
. Default toRedis
.- Engine
Version 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.- Instance
Charge stringType Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. Default toPrePaid
.- Node
Type string The KVStore instance node type required by the user. Valid values:
double
,single
,readone
,readthree
andreadfive
.- Output
File string File name where to save data source results (after running
pulumi up
).- Package
Type string It has been deprecated from 1.68.0.
The parameter 'package_type' has been deprecated from 1.68.0.
- Performance
Type string It has been deprecated from 1.68.0.
The parameter 'performance_type' has been deprecated from 1.68.0.
- Product
Type string - Series
Type string The KVStore instance series type required by the user. Valid values:
enhanced_performance_type
andhybrid_storage
.- int
The number of shard.Valid values:
1
,2
,4
,8
,16
,32
,64
,128
,256
.- product_type - (Optional, Available in v1.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 string - Storage
Type string It has been deprecated from 1.68.0.
The parameter 'storage_type' has been deprecated from 1.68.0.
- zone
Id String The Zone to launch the KVStore instance.
- architecture String
The KVStore instance system architecture required by the user. Valid values:
standard
,cluster
andrwsplit
.- edition
Type String The KVStore instance edition type required by the user. Valid values:
Community
andEnterprise
.- engine String
Database type. Options are
Redis
,Memcache
. Default toRedis
.- engine
Version 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.- instance
Charge StringType Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. Default toPrePaid
.- node
Type String The KVStore instance node type required by the user. Valid values:
double
,single
,readone
,readthree
andreadfive
.- output
File String File name where to save data source results (after running
pulumi up
).- package
Type String It has been deprecated from 1.68.0.
The parameter 'package_type' has been deprecated from 1.68.0.
- performance
Type String It has been deprecated from 1.68.0.
The parameter 'performance_type' has been deprecated from 1.68.0.
- product
Type String - series
Type String The KVStore instance series type required by the user. Valid values:
enhanced_performance_type
andhybrid_storage
.- Integer
The number of shard.Valid values:
1
,2
,4
,8
,16
,32
,64
,128
,256
.- product_type - (Optional, Available in v1.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 String - storage
Type String It has been deprecated from 1.68.0.
The parameter 'storage_type' has been deprecated from 1.68.0.
- zone
Id string The Zone to launch the KVStore instance.
- architecture string
The KVStore instance system architecture required by the user. Valid values:
standard
,cluster
andrwsplit
.- edition
Type string The KVStore instance edition type required by the user. Valid values:
Community
andEnterprise
.- engine string
Database type. Options are
Redis
,Memcache
. Default toRedis
.- engine
Version 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.- instance
Charge stringType Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. Default toPrePaid
.- node
Type string The KVStore instance node type required by the user. Valid values:
double
,single
,readone
,readthree
andreadfive
.- output
File string File name where to save data source results (after running
pulumi up
).- package
Type string It has been deprecated from 1.68.0.
The parameter 'package_type' has been deprecated from 1.68.0.
- performance
Type string It has been deprecated from 1.68.0.
The parameter 'performance_type' has been deprecated from 1.68.0.
- product
Type string - series
Type string The KVStore instance series type required by the user. Valid values:
enhanced_performance_type
andhybrid_storage
.- number
The number of shard.Valid values:
1
,2
,4
,8
,16
,32
,64
,128
,256
.- product_type - (Optional, Available in v1.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 string - storage
Type string It has been deprecated from 1.68.0.
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
andrwsplit
.- edition_
type str The KVStore instance edition type required by the user. Valid values:
Community
andEnterprise
.- engine str
Database type. Options are
Redis
,Memcache
. Default toRedis
.- 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_ strtype Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. Default toPrePaid
.- node_
type str The KVStore instance node type required by the user. Valid values:
double
,single
,readone
,readthree
andreadfive
.- 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.
The parameter 'package_type' has been deprecated from 1.68.0.
- performance_
type str It has been deprecated from 1.68.0.
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
andhybrid_storage
.- int
The number of shard.Valid values:
1
,2
,4
,8
,16
,32
,64
,128
,256
.- product_type - (Optional, Available in v1.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.
The parameter 'storage_type' has been deprecated from 1.68.0.
- zone
Id String The Zone to launch the KVStore instance.
- architecture String
The KVStore instance system architecture required by the user. Valid values:
standard
,cluster
andrwsplit
.- edition
Type String The KVStore instance edition type required by the user. Valid values:
Community
andEnterprise
.- engine String
Database type. Options are
Redis
,Memcache
. Default toRedis
.- engine
Version 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.- instance
Charge StringType Filter the results by charge type. Valid values:
PrePaid
andPostPaid
. Default toPrePaid
.- node
Type String The KVStore instance node type required by the user. Valid values:
double
,single
,readone
,readthree
andreadfive
.- output
File String File name where to save data source results (after running
pulumi up
).- package
Type String It has been deprecated from 1.68.0.
The parameter 'package_type' has been deprecated from 1.68.0.
- performance
Type String It has been deprecated from 1.68.0.
The parameter 'performance_type' has been deprecated from 1.68.0.
- product
Type String - series
Type String The KVStore instance series type required by the user. Valid values:
enhanced_performance_type
andhybrid_storage
.- Number
The number of shard.Valid values:
1
,2
,4
,8
,16
,32
,64
,128
,256
.- product_type - (Optional, Available in v1.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 String - storage
Type String It has been deprecated from 1.68.0.
The parameter 'storage_type' has been deprecated from 1.68.0.
getInstanceClasses Result
The following output properties are available:
- Classes
List<Pulumi.
Ali Cloud. KVStore. Outputs. Get Instance Classes Class> 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.
- Instance
Classes List<string> A list of KVStore available instance classes.
- Zone
Id string - Architecture string
- Edition
Type string - Engine string
- Engine
Version string - Instance
Charge stringType - Node
Type string - Output
File string - Package
Type string The parameter 'package_type' has been deprecated from 1.68.0.
- Performance
Type string The parameter 'performance_type' has been deprecated from 1.68.0.
- Product
Type string - Series
Type string - int
- Sorted
By string - Storage
Type string The parameter 'storage_type' has been deprecated from 1.68.0.
- Classes
[]Get
Instance Classes Class 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.
- Instance
Classes []string A list of KVStore available instance classes.
- Zone
Id string - Architecture string
- Edition
Type string - Engine string
- Engine
Version string - Instance
Charge stringType - Node
Type string - Output
File string - Package
Type string The parameter 'package_type' has been deprecated from 1.68.0.
- Performance
Type string The parameter 'performance_type' has been deprecated from 1.68.0.
- Product
Type string - Series
Type string - int
- Sorted
By string - Storage
Type string The parameter 'storage_type' has been deprecated from 1.68.0.
- classes
List<Get
Instance Classes Class> 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.
- instance
Classes List<String> A list of KVStore available instance classes.
- zone
Id String - architecture String
- edition
Type String - engine String
- engine
Version String - instance
Charge StringType - node
Type String - output
File String - package
Type String The parameter 'package_type' has been deprecated from 1.68.0.
- performance
Type String The parameter 'performance_type' has been deprecated from 1.68.0.
- product
Type String - series
Type String - Integer
- sorted
By String - storage
Type String The parameter 'storage_type' has been deprecated from 1.68.0.
- classes
Get
Instance Classes Class[] 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.
- instance
Classes string[] A list of KVStore available instance classes.
- zone
Id string - architecture string
- edition
Type string - engine string
- engine
Version string - instance
Charge stringType - node
Type string - output
File string - package
Type string The parameter 'package_type' has been deprecated from 1.68.0.
- performance
Type string The parameter 'performance_type' has been deprecated from 1.68.0.
- product
Type string - series
Type string - number
- sorted
By string - storage
Type string The parameter 'storage_type' has been deprecated from 1.68.0.
- classes
Sequence[Get
Instance Classes Class] 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_ strtype - node_
type str - output_
file str - package_
type str The parameter 'package_type' has been deprecated from 1.68.0.
- performance_
type str The parameter 'performance_type' has been deprecated from 1.68.0.
- product_
type str - series_
type str - int
- sorted_
by str - storage_
type str 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.
- instance
Classes List<String> A list of KVStore available instance classes.
- zone
Id String - architecture String
- edition
Type String - engine String
- engine
Version String - instance
Charge StringType - node
Type String - output
File String - package
Type String The parameter 'package_type' has been deprecated from 1.68.0.
- performance
Type String The parameter 'performance_type' has been deprecated from 1.68.0.
- product
Type String - series
Type String - Number
- sorted
By String - storage
Type String The parameter 'storage_type' has been deprecated from 1.68.0.
Supporting Types
GetInstanceClassesClass
- Instance
Class string KVStore available instance class.
- Price string
- Instance
Class string KVStore available instance class.
- Price string
- instance
Class String KVStore available instance class.
- price String
- instance
Class string KVStore available instance class.
- price string
- instance_
class str KVStore available instance class.
- price str
- instance
Class 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.