tencentcloud.RedisParam
Explore with Pulumi AI
Provides a resource to create a redis param
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const param = new tencentcloud.RedisParam("param", {
instanceId: "crs-c1nl9rpv",
instanceParams: {
"cluster-node-timeout": "15000",
"disable-command-list": "\"\"",
"hash-max-ziplist-entries": "512",
"hash-max-ziplist-value": "64",
hz: "10",
"lazyfree-lazy-eviction": "yes",
"lazyfree-lazy-expire": "yes",
"lazyfree-lazy-server-del": "yes",
"maxmemory-policy": "noeviction",
"notify-keyspace-events": "\"\"",
"proxy-slowlog-log-slower-than": "500",
"replica-lazy-flush": "yes",
sentineauth: "no",
"set-max-intset-entries": "512",
"slowlog-log-slower-than": "10",
timeout: "31536000",
"zset-max-ziplist-entries": "128",
"zset-max-ziplist-value": "64",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
param = tencentcloud.RedisParam("param",
instance_id="crs-c1nl9rpv",
instance_params={
"cluster-node-timeout": "15000",
"disable-command-list": "\"\"",
"hash-max-ziplist-entries": "512",
"hash-max-ziplist-value": "64",
"hz": "10",
"lazyfree-lazy-eviction": "yes",
"lazyfree-lazy-expire": "yes",
"lazyfree-lazy-server-del": "yes",
"maxmemory-policy": "noeviction",
"notify-keyspace-events": "\"\"",
"proxy-slowlog-log-slower-than": "500",
"replica-lazy-flush": "yes",
"sentineauth": "no",
"set-max-intset-entries": "512",
"slowlog-log-slower-than": "10",
"timeout": "31536000",
"zset-max-ziplist-entries": "128",
"zset-max-ziplist-value": "64",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewRedisParam(ctx, "param", &tencentcloud.RedisParamArgs{
InstanceId: pulumi.String("crs-c1nl9rpv"),
InstanceParams: pulumi.StringMap{
"cluster-node-timeout": pulumi.String("15000"),
"disable-command-list": pulumi.String("\"\""),
"hash-max-ziplist-entries": pulumi.String("512"),
"hash-max-ziplist-value": pulumi.String("64"),
"hz": pulumi.String("10"),
"lazyfree-lazy-eviction": pulumi.String("yes"),
"lazyfree-lazy-expire": pulumi.String("yes"),
"lazyfree-lazy-server-del": pulumi.String("yes"),
"maxmemory-policy": pulumi.String("noeviction"),
"notify-keyspace-events": pulumi.String("\"\""),
"proxy-slowlog-log-slower-than": pulumi.String("500"),
"replica-lazy-flush": pulumi.String("yes"),
"sentineauth": pulumi.String("no"),
"set-max-intset-entries": pulumi.String("512"),
"slowlog-log-slower-than": pulumi.String("10"),
"timeout": pulumi.String("31536000"),
"zset-max-ziplist-entries": pulumi.String("128"),
"zset-max-ziplist-value": pulumi.String("64"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var param = new Tencentcloud.RedisParam("param", new()
{
InstanceId = "crs-c1nl9rpv",
InstanceParams =
{
{ "cluster-node-timeout", "15000" },
{ "disable-command-list", "\"\"" },
{ "hash-max-ziplist-entries", "512" },
{ "hash-max-ziplist-value", "64" },
{ "hz", "10" },
{ "lazyfree-lazy-eviction", "yes" },
{ "lazyfree-lazy-expire", "yes" },
{ "lazyfree-lazy-server-del", "yes" },
{ "maxmemory-policy", "noeviction" },
{ "notify-keyspace-events", "\"\"" },
{ "proxy-slowlog-log-slower-than", "500" },
{ "replica-lazy-flush", "yes" },
{ "sentineauth", "no" },
{ "set-max-intset-entries", "512" },
{ "slowlog-log-slower-than", "10" },
{ "timeout", "31536000" },
{ "zset-max-ziplist-entries", "128" },
{ "zset-max-ziplist-value", "64" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.RedisParam;
import com.pulumi.tencentcloud.RedisParamArgs;
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) {
var param = new RedisParam("param", RedisParamArgs.builder()
.instanceId("crs-c1nl9rpv")
.instanceParams(Map.ofEntries(
Map.entry("cluster-node-timeout", "15000"),
Map.entry("disable-command-list", "\"\""),
Map.entry("hash-max-ziplist-entries", "512"),
Map.entry("hash-max-ziplist-value", "64"),
Map.entry("hz", "10"),
Map.entry("lazyfree-lazy-eviction", "yes"),
Map.entry("lazyfree-lazy-expire", "yes"),
Map.entry("lazyfree-lazy-server-del", "yes"),
Map.entry("maxmemory-policy", "noeviction"),
Map.entry("notify-keyspace-events", "\"\""),
Map.entry("proxy-slowlog-log-slower-than", "500"),
Map.entry("replica-lazy-flush", "yes"),
Map.entry("sentineauth", "no"),
Map.entry("set-max-intset-entries", "512"),
Map.entry("slowlog-log-slower-than", "10"),
Map.entry("timeout", "31536000"),
Map.entry("zset-max-ziplist-entries", "128"),
Map.entry("zset-max-ziplist-value", "64")
))
.build());
}
}
resources:
param:
type: tencentcloud:RedisParam
properties:
instanceId: crs-c1nl9rpv
instanceParams:
cluster-node-timeout: '15000'
disable-command-list: '""'
hash-max-ziplist-entries: '512'
hash-max-ziplist-value: '64'
hz: '10'
lazyfree-lazy-eviction: yes
lazyfree-lazy-expire: yes
lazyfree-lazy-server-del: yes
maxmemory-policy: noeviction
notify-keyspace-events: '""'
proxy-slowlog-log-slower-than: '500'
replica-lazy-flush: yes
sentineauth: no
set-max-intset-entries: '512'
slowlog-log-slower-than: '10'
timeout: '31536000'
zset-max-ziplist-entries: '128'
zset-max-ziplist-value: '64'
Create RedisParam Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RedisParam(name: string, args: RedisParamArgs, opts?: CustomResourceOptions);
@overload
def RedisParam(resource_name: str,
args: RedisParamArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RedisParam(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
instance_params: Optional[Mapping[str, str]] = None,
redis_param_id: Optional[str] = None)
func NewRedisParam(ctx *Context, name string, args RedisParamArgs, opts ...ResourceOption) (*RedisParam, error)
public RedisParam(string name, RedisParamArgs args, CustomResourceOptions? opts = null)
public RedisParam(String name, RedisParamArgs args)
public RedisParam(String name, RedisParamArgs args, CustomResourceOptions options)
type: tencentcloud:RedisParam
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RedisParamArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RedisParamArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RedisParamArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RedisParamArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RedisParamArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
RedisParam Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RedisParam resource accepts the following input properties:
- Instance
Id string - The ID of instance.
- Instance
Params Dictionary<string, string> - A list of parameters modified by the instance.
- Redis
Param stringId - ID of the resource.
- Instance
Id string - The ID of instance.
- Instance
Params map[string]string - A list of parameters modified by the instance.
- Redis
Param stringId - ID of the resource.
- instance
Id String - The ID of instance.
- instance
Params Map<String,String> - A list of parameters modified by the instance.
- redis
Param StringId - ID of the resource.
- instance
Id string - The ID of instance.
- instance
Params {[key: string]: string} - A list of parameters modified by the instance.
- redis
Param stringId - ID of the resource.
- instance_
id str - The ID of instance.
- instance_
params Mapping[str, str] - A list of parameters modified by the instance.
- redis_
param_ strid - ID of the resource.
- instance
Id String - The ID of instance.
- instance
Params Map<String> - A list of parameters modified by the instance.
- redis
Param StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the RedisParam resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RedisParam Resource
Get an existing RedisParam resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RedisParamState, opts?: CustomResourceOptions): RedisParam
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
instance_params: Optional[Mapping[str, str]] = None,
redis_param_id: Optional[str] = None) -> RedisParam
func GetRedisParam(ctx *Context, name string, id IDInput, state *RedisParamState, opts ...ResourceOption) (*RedisParam, error)
public static RedisParam Get(string name, Input<string> id, RedisParamState? state, CustomResourceOptions? opts = null)
public static RedisParam get(String name, Output<String> id, RedisParamState state, CustomResourceOptions options)
resources: _: type: tencentcloud:RedisParam get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Instance
Id string - The ID of instance.
- Instance
Params Dictionary<string, string> - A list of parameters modified by the instance.
- Redis
Param stringId - ID of the resource.
- Instance
Id string - The ID of instance.
- Instance
Params map[string]string - A list of parameters modified by the instance.
- Redis
Param stringId - ID of the resource.
- instance
Id String - The ID of instance.
- instance
Params Map<String,String> - A list of parameters modified by the instance.
- redis
Param StringId - ID of the resource.
- instance
Id string - The ID of instance.
- instance
Params {[key: string]: string} - A list of parameters modified by the instance.
- redis
Param stringId - ID of the resource.
- instance_
id str - The ID of instance.
- instance_
params Mapping[str, str] - A list of parameters modified by the instance.
- redis_
param_ strid - ID of the resource.
- instance
Id String - The ID of instance.
- instance
Params Map<String> - A list of parameters modified by the instance.
- redis
Param StringId - ID of the resource.
Import
redis param can be imported using the instanceId, e.g.
$ pulumi import tencentcloud:index/redisParam:RedisParam param crs-c1nl9rpv
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.