flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud
flexibleengine.getDcsProductV1
Explore with Pulumi AI
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud
Use this data source to get the ID of an available Flexibleengine DCS product.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const product1 = flexibleengine.getDcsProductV1({
cacheMode: "cluster",
capacity: 8,
engine: "redis",
engineVersion: "4.0;5.0",
replicaCount: 2,
});
const product2 = flexibleengine.getDcsProductV1({
cacheMode: "ha",
capacity: 0.125,
engine: "redis",
engineVersion: "4.0;5.0",
replicaCount: 2,
});
const product3 = flexibleengine.getDcsProductV1({
cacheMode: "single",
capacity: 1,
engine: "redis",
engineVersion: "4.0;5.0",
});
const product4 = flexibleengine.getDcsProductV1({
cacheMode: "proxy",
capacity: 4,
engine: "redis",
engineVersion: "4.0;5.0",
});
const product5 = flexibleengine.getDcsProductV1({
cacheMode: "ha",
engine: "redis",
engineVersion: "3.0",
});
const product6 = flexibleengine.getDcsProductV1({
cacheMode: "single",
engine: "memcached",
});
import pulumi
import pulumi_flexibleengine as flexibleengine
product1 = flexibleengine.get_dcs_product_v1(cache_mode="cluster",
capacity=8,
engine="redis",
engine_version="4.0;5.0",
replica_count=2)
product2 = flexibleengine.get_dcs_product_v1(cache_mode="ha",
capacity=0.125,
engine="redis",
engine_version="4.0;5.0",
replica_count=2)
product3 = flexibleengine.get_dcs_product_v1(cache_mode="single",
capacity=1,
engine="redis",
engine_version="4.0;5.0")
product4 = flexibleengine.get_dcs_product_v1(cache_mode="proxy",
capacity=4,
engine="redis",
engine_version="4.0;5.0")
product5 = flexibleengine.get_dcs_product_v1(cache_mode="ha",
engine="redis",
engine_version="3.0")
product6 = flexibleengine.get_dcs_product_v1(cache_mode="single",
engine="memcached")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.GetDcsProductV1(ctx, &flexibleengine.GetDcsProductV1Args{
CacheMode: pulumi.StringRef("cluster"),
Capacity: pulumi.Float64Ref(8),
Engine: pulumi.StringRef("redis"),
EngineVersion: pulumi.StringRef("4.0;5.0"),
ReplicaCount: pulumi.Float64Ref(2),
}, nil)
if err != nil {
return err
}
_, err = flexibleengine.GetDcsProductV1(ctx, &flexibleengine.GetDcsProductV1Args{
CacheMode: pulumi.StringRef("ha"),
Capacity: pulumi.Float64Ref(0.125),
Engine: pulumi.StringRef("redis"),
EngineVersion: pulumi.StringRef("4.0;5.0"),
ReplicaCount: pulumi.Float64Ref(2),
}, nil)
if err != nil {
return err
}
_, err = flexibleengine.GetDcsProductV1(ctx, &flexibleengine.GetDcsProductV1Args{
CacheMode: pulumi.StringRef("single"),
Capacity: pulumi.Float64Ref(1),
Engine: pulumi.StringRef("redis"),
EngineVersion: pulumi.StringRef("4.0;5.0"),
}, nil)
if err != nil {
return err
}
_, err = flexibleengine.GetDcsProductV1(ctx, &flexibleengine.GetDcsProductV1Args{
CacheMode: pulumi.StringRef("proxy"),
Capacity: pulumi.Float64Ref(4),
Engine: pulumi.StringRef("redis"),
EngineVersion: pulumi.StringRef("4.0;5.0"),
}, nil)
if err != nil {
return err
}
_, err = flexibleengine.GetDcsProductV1(ctx, &flexibleengine.GetDcsProductV1Args{
CacheMode: pulumi.StringRef("ha"),
Engine: pulumi.StringRef("redis"),
EngineVersion: pulumi.StringRef("3.0"),
}, nil)
if err != nil {
return err
}
_, err = flexibleengine.GetDcsProductV1(ctx, &flexibleengine.GetDcsProductV1Args{
CacheMode: pulumi.StringRef("single"),
Engine: pulumi.StringRef("memcached"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var product1 = Flexibleengine.GetDcsProductV1.Invoke(new()
{
CacheMode = "cluster",
Capacity = 8,
Engine = "redis",
EngineVersion = "4.0;5.0",
ReplicaCount = 2,
});
var product2 = Flexibleengine.GetDcsProductV1.Invoke(new()
{
CacheMode = "ha",
Capacity = 0.125,
Engine = "redis",
EngineVersion = "4.0;5.0",
ReplicaCount = 2,
});
var product3 = Flexibleengine.GetDcsProductV1.Invoke(new()
{
CacheMode = "single",
Capacity = 1,
Engine = "redis",
EngineVersion = "4.0;5.0",
});
var product4 = Flexibleengine.GetDcsProductV1.Invoke(new()
{
CacheMode = "proxy",
Capacity = 4,
Engine = "redis",
EngineVersion = "4.0;5.0",
});
var product5 = Flexibleengine.GetDcsProductV1.Invoke(new()
{
CacheMode = "ha",
Engine = "redis",
EngineVersion = "3.0",
});
var product6 = Flexibleengine.GetDcsProductV1.Invoke(new()
{
CacheMode = "single",
Engine = "memcached",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.FlexibleengineFunctions;
import com.pulumi.flexibleengine.inputs.GetDcsProductV1Args;
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 product1 = FlexibleengineFunctions.getDcsProductV1(GetDcsProductV1Args.builder()
.cacheMode("cluster")
.capacity(8)
.engine("redis")
.engineVersion("4.0;5.0")
.replicaCount(2)
.build());
final var product2 = FlexibleengineFunctions.getDcsProductV1(GetDcsProductV1Args.builder()
.cacheMode("ha")
.capacity(0.125)
.engine("redis")
.engineVersion("4.0;5.0")
.replicaCount(2)
.build());
final var product3 = FlexibleengineFunctions.getDcsProductV1(GetDcsProductV1Args.builder()
.cacheMode("single")
.capacity(1)
.engine("redis")
.engineVersion("4.0;5.0")
.build());
final var product4 = FlexibleengineFunctions.getDcsProductV1(GetDcsProductV1Args.builder()
.cacheMode("proxy")
.capacity(4)
.engine("redis")
.engineVersion("4.0;5.0")
.build());
final var product5 = FlexibleengineFunctions.getDcsProductV1(GetDcsProductV1Args.builder()
.cacheMode("ha")
.engine("redis")
.engineVersion("3.0")
.build());
final var product6 = FlexibleengineFunctions.getDcsProductV1(GetDcsProductV1Args.builder()
.cacheMode("single")
.engine("memcached")
.build());
}
}
variables:
product1:
fn::invoke:
function: flexibleengine:getDcsProductV1
arguments:
cacheMode: cluster
capacity: 8
engine: redis
engineVersion: 4.0;5.0
replicaCount: 2
product2:
fn::invoke:
function: flexibleengine:getDcsProductV1
arguments:
cacheMode: ha
capacity: 0.125
engine: redis
engineVersion: 4.0;5.0
replicaCount: 2
product3:
fn::invoke:
function: flexibleengine:getDcsProductV1
arguments:
cacheMode: single
capacity: 1
engine: redis
engineVersion: 4.0;5.0
product4:
fn::invoke:
function: flexibleengine:getDcsProductV1
arguments:
cacheMode: proxy
capacity: 4
engine: redis
engineVersion: 4.0;5.0
product5:
fn::invoke:
function: flexibleengine:getDcsProductV1
arguments:
cacheMode: ha
engine: redis
engineVersion: '3.0'
product6:
fn::invoke:
function: flexibleengine:getDcsProductV1
arguments:
cacheMode: single
engine: memcached
Using getDcsProductV1
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 getDcsProductV1(args: GetDcsProductV1Args, opts?: InvokeOptions): Promise<GetDcsProductV1Result>
function getDcsProductV1Output(args: GetDcsProductV1OutputArgs, opts?: InvokeOptions): Output<GetDcsProductV1Result>
def get_dcs_product_v1(cache_mode: Optional[str] = None,
capacity: Optional[float] = None,
engine: Optional[str] = None,
engine_version: Optional[str] = None,
id: Optional[str] = None,
replica_count: Optional[float] = None,
spec_code: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDcsProductV1Result
def get_dcs_product_v1_output(cache_mode: Optional[pulumi.Input[str]] = None,
capacity: Optional[pulumi.Input[float]] = None,
engine: Optional[pulumi.Input[str]] = None,
engine_version: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
replica_count: Optional[pulumi.Input[float]] = None,
spec_code: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDcsProductV1Result]
func GetDcsProductV1(ctx *Context, args *GetDcsProductV1Args, opts ...InvokeOption) (*GetDcsProductV1Result, error)
func GetDcsProductV1Output(ctx *Context, args *GetDcsProductV1OutputArgs, opts ...InvokeOption) GetDcsProductV1ResultOutput
> Note: This function is named GetDcsProductV1
in the Go SDK.
public static class GetDcsProductV1
{
public static Task<GetDcsProductV1Result> InvokeAsync(GetDcsProductV1Args args, InvokeOptions? opts = null)
public static Output<GetDcsProductV1Result> Invoke(GetDcsProductV1InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDcsProductV1Result> getDcsProductV1(GetDcsProductV1Args args, InvokeOptions options)
public static Output<GetDcsProductV1Result> getDcsProductV1(GetDcsProductV1Args args, InvokeOptions options)
fn::invoke:
function: flexibleengine:index/getDcsProductV1:getDcsProductV1
arguments:
# arguments dictionary
The following arguments are supported:
- Cache
Mode string - The mode of a cache engine. The valid values are as follows:
- Capacity double
- The total memory of the cache, in GB.
It is valid when the engine is redis 4.0/5.0.
- Single-node and Master/Standby instances support:
0.125
,0.25
,0.5
,1
,2
,4
,8
,16
,24
,32
,48
and64
. - Redis Cluster and Proxy Cluster instances support:
4
,8
,16
,24
,32
,48
,64
,96
,128
,192
,256
,384
,512
,768
and1024
.
- Single-node and Master/Standby instances support:
- Engine string
- The engine of the cache instance. Valid values are redis and memcached. Default value is redis.
- Engine
Version string - The version of a cache engine.
It is valid when the engine is redis, the value can be
3.0
or4.0;5.0
. - Id string
- The found product ID.
- Replica
Count double - The number of replicas includes the master. It is valid when the engine is redis 4.0/5.0 with Master/Standby or Redis Cluster type.
- Spec
Code string - Specifies the DCS instance specification code. You can log in to the DCS console, click Buy DCS Instance, and find the corresponding instance specification.
- Cache
Mode string - The mode of a cache engine. The valid values are as follows:
- Capacity float64
- The total memory of the cache, in GB.
It is valid when the engine is redis 4.0/5.0.
- Single-node and Master/Standby instances support:
0.125
,0.25
,0.5
,1
,2
,4
,8
,16
,24
,32
,48
and64
. - Redis Cluster and Proxy Cluster instances support:
4
,8
,16
,24
,32
,48
,64
,96
,128
,192
,256
,384
,512
,768
and1024
.
- Single-node and Master/Standby instances support:
- Engine string
- The engine of the cache instance. Valid values are redis and memcached. Default value is redis.
- Engine
Version string - The version of a cache engine.
It is valid when the engine is redis, the value can be
3.0
or4.0;5.0
. - Id string
- The found product ID.
- Replica
Count float64 - The number of replicas includes the master. It is valid when the engine is redis 4.0/5.0 with Master/Standby or Redis Cluster type.
- Spec
Code string - Specifies the DCS instance specification code. You can log in to the DCS console, click Buy DCS Instance, and find the corresponding instance specification.
- cache
Mode String - The mode of a cache engine. The valid values are as follows:
- capacity Double
- The total memory of the cache, in GB.
It is valid when the engine is redis 4.0/5.0.
- Single-node and Master/Standby instances support:
0.125
,0.25
,0.5
,1
,2
,4
,8
,16
,24
,32
,48
and64
. - Redis Cluster and Proxy Cluster instances support:
4
,8
,16
,24
,32
,48
,64
,96
,128
,192
,256
,384
,512
,768
and1024
.
- Single-node and Master/Standby instances support:
- engine String
- The engine of the cache instance. Valid values are redis and memcached. Default value is redis.
- engine
Version String - The version of a cache engine.
It is valid when the engine is redis, the value can be
3.0
or4.0;5.0
. - id String
- The found product ID.
- replica
Count Double - The number of replicas includes the master. It is valid when the engine is redis 4.0/5.0 with Master/Standby or Redis Cluster type.
- spec
Code String - Specifies the DCS instance specification code. You can log in to the DCS console, click Buy DCS Instance, and find the corresponding instance specification.
- cache
Mode string - The mode of a cache engine. The valid values are as follows:
- capacity number
- The total memory of the cache, in GB.
It is valid when the engine is redis 4.0/5.0.
- Single-node and Master/Standby instances support:
0.125
,0.25
,0.5
,1
,2
,4
,8
,16
,24
,32
,48
and64
. - Redis Cluster and Proxy Cluster instances support:
4
,8
,16
,24
,32
,48
,64
,96
,128
,192
,256
,384
,512
,768
and1024
.
- Single-node and Master/Standby instances support:
- engine string
- The engine of the cache instance. Valid values are redis and memcached. Default value is redis.
- engine
Version string - The version of a cache engine.
It is valid when the engine is redis, the value can be
3.0
or4.0;5.0
. - id string
- The found product ID.
- replica
Count number - The number of replicas includes the master. It is valid when the engine is redis 4.0/5.0 with Master/Standby or Redis Cluster type.
- spec
Code string - Specifies the DCS instance specification code. You can log in to the DCS console, click Buy DCS Instance, and find the corresponding instance specification.
- cache_
mode str - The mode of a cache engine. The valid values are as follows:
- capacity float
- The total memory of the cache, in GB.
It is valid when the engine is redis 4.0/5.0.
- Single-node and Master/Standby instances support:
0.125
,0.25
,0.5
,1
,2
,4
,8
,16
,24
,32
,48
and64
. - Redis Cluster and Proxy Cluster instances support:
4
,8
,16
,24
,32
,48
,64
,96
,128
,192
,256
,384
,512
,768
and1024
.
- Single-node and Master/Standby instances support:
- engine str
- The engine of the cache instance. Valid values are redis and memcached. Default value is redis.
- engine_
version str - The version of a cache engine.
It is valid when the engine is redis, the value can be
3.0
or4.0;5.0
. - id str
- The found product ID.
- replica_
count float - The number of replicas includes the master. It is valid when the engine is redis 4.0/5.0 with Master/Standby or Redis Cluster type.
- spec_
code str - Specifies the DCS instance specification code. You can log in to the DCS console, click Buy DCS Instance, and find the corresponding instance specification.
- cache
Mode String - The mode of a cache engine. The valid values are as follows:
- capacity Number
- The total memory of the cache, in GB.
It is valid when the engine is redis 4.0/5.0.
- Single-node and Master/Standby instances support:
0.125
,0.25
,0.5
,1
,2
,4
,8
,16
,24
,32
,48
and64
. - Redis Cluster and Proxy Cluster instances support:
4
,8
,16
,24
,32
,48
,64
,96
,128
,192
,256
,384
,512
,768
and1024
.
- Single-node and Master/Standby instances support:
- engine String
- The engine of the cache instance. Valid values are redis and memcached. Default value is redis.
- engine
Version String - The version of a cache engine.
It is valid when the engine is redis, the value can be
3.0
or4.0;5.0
. - id String
- The found product ID.
- replica
Count Number - The number of replicas includes the master. It is valid when the engine is redis 4.0/5.0 with Master/Standby or Redis Cluster type.
- spec
Code String - Specifies the DCS instance specification code. You can log in to the DCS console, click Buy DCS Instance, and find the corresponding instance specification.
getDcsProductV1 Result
The following output properties are available:
- Cache
Mode string - Capacity double
- Cpu
Architecture string - The CPU architecture of DCS instance.
- Engine
Version string - Id string
- The found product ID.
- Replica
Count double - Spec
Code string - Engine string
- Cache
Mode string - Capacity float64
- Cpu
Architecture string - The CPU architecture of DCS instance.
- Engine
Version string - Id string
- The found product ID.
- Replica
Count float64 - Spec
Code string - Engine string
- cache
Mode String - capacity Double
- cpu
Architecture String - The CPU architecture of DCS instance.
- engine
Version String - id String
- The found product ID.
- replica
Count Double - spec
Code String - engine String
- cache
Mode string - capacity number
- cpu
Architecture string - The CPU architecture of DCS instance.
- engine
Version string - id string
- The found product ID.
- replica
Count number - spec
Code string - engine string
- cache_
mode str - capacity float
- cpu_
architecture str - The CPU architecture of DCS instance.
- engine_
version str - id str
- The found product ID.
- replica_
count float - spec_
code str - engine str
- cache
Mode String - capacity Number
- cpu
Architecture String - The CPU architecture of DCS instance.
- engine
Version String - id String
- The found product ID.
- replica
Count Number - spec
Code String - engine String
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud