1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CynosdbParamTemplate
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CynosdbParamTemplate

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a cynosdb param_template

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const paramTemplate = new tencentcloud.CynosdbParamTemplate("paramTemplate", {
        dbMode: "SERVERLESS",
        engineVersion: "5.7",
        paramLists: [{
            currentValue: "-1",
            paramName: "optimizer_trace_offset",
        }],
        templateDescription: "terraform-template",
        templateName: "terraform-template",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    param_template = tencentcloud.CynosdbParamTemplate("paramTemplate",
        db_mode="SERVERLESS",
        engine_version="5.7",
        param_lists=[{
            "current_value": "-1",
            "param_name": "optimizer_trace_offset",
        }],
        template_description="terraform-template",
        template_name="terraform-template")
    
    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.NewCynosdbParamTemplate(ctx, "paramTemplate", &tencentcloud.CynosdbParamTemplateArgs{
    			DbMode:        pulumi.String("SERVERLESS"),
    			EngineVersion: pulumi.String("5.7"),
    			ParamLists: tencentcloud.CynosdbParamTemplateParamListArray{
    				&tencentcloud.CynosdbParamTemplateParamListArgs{
    					CurrentValue: pulumi.String("-1"),
    					ParamName:    pulumi.String("optimizer_trace_offset"),
    				},
    			},
    			TemplateDescription: pulumi.String("terraform-template"),
    			TemplateName:        pulumi.String("terraform-template"),
    		})
    		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 paramTemplate = new Tencentcloud.CynosdbParamTemplate("paramTemplate", new()
        {
            DbMode = "SERVERLESS",
            EngineVersion = "5.7",
            ParamLists = new[]
            {
                new Tencentcloud.Inputs.CynosdbParamTemplateParamListArgs
                {
                    CurrentValue = "-1",
                    ParamName = "optimizer_trace_offset",
                },
            },
            TemplateDescription = "terraform-template",
            TemplateName = "terraform-template",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CynosdbParamTemplate;
    import com.pulumi.tencentcloud.CynosdbParamTemplateArgs;
    import com.pulumi.tencentcloud.inputs.CynosdbParamTemplateParamListArgs;
    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 paramTemplate = new CynosdbParamTemplate("paramTemplate", CynosdbParamTemplateArgs.builder()
                .dbMode("SERVERLESS")
                .engineVersion("5.7")
                .paramLists(CynosdbParamTemplateParamListArgs.builder()
                    .currentValue("-1")
                    .paramName("optimizer_trace_offset")
                    .build())
                .templateDescription("terraform-template")
                .templateName("terraform-template")
                .build());
    
        }
    }
    
    resources:
      paramTemplate:
        type: tencentcloud:CynosdbParamTemplate
        properties:
          dbMode: SERVERLESS
          engineVersion: '5.7'
          paramLists:
            - currentValue: '-1'
              paramName: optimizer_trace_offset
          templateDescription: terraform-template
          templateName: terraform-template
    

    Create CynosdbParamTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CynosdbParamTemplate(name: string, args: CynosdbParamTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def CynosdbParamTemplate(resource_name: str,
                             args: CynosdbParamTemplateArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def CynosdbParamTemplate(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             engine_version: Optional[str] = None,
                             template_name: Optional[str] = None,
                             cynosdb_param_template_id: Optional[str] = None,
                             db_mode: Optional[str] = None,
                             param_lists: Optional[Sequence[CynosdbParamTemplateParamListArgs]] = None,
                             template_description: Optional[str] = None,
                             template_id: Optional[float] = None)
    func NewCynosdbParamTemplate(ctx *Context, name string, args CynosdbParamTemplateArgs, opts ...ResourceOption) (*CynosdbParamTemplate, error)
    public CynosdbParamTemplate(string name, CynosdbParamTemplateArgs args, CustomResourceOptions? opts = null)
    public CynosdbParamTemplate(String name, CynosdbParamTemplateArgs args)
    public CynosdbParamTemplate(String name, CynosdbParamTemplateArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CynosdbParamTemplate
    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 CynosdbParamTemplateArgs
    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 CynosdbParamTemplateArgs
    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 CynosdbParamTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CynosdbParamTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CynosdbParamTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CynosdbParamTemplate 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 CynosdbParamTemplate resource accepts the following input properties:

    EngineVersion string
    MySQL version number.
    TemplateName string
    Template Name.
    CynosdbParamTemplateId string
    ID of the resource.
    DbMode string
    Database type, optional values: NORMAL (default), SERVERLESS.
    ParamLists List<CynosdbParamTemplateParamList>
    parameter list.
    TemplateDescription string
    Template Description.
    TemplateId double
    Optional parameter, template ID to be copied.
    EngineVersion string
    MySQL version number.
    TemplateName string
    Template Name.
    CynosdbParamTemplateId string
    ID of the resource.
    DbMode string
    Database type, optional values: NORMAL (default), SERVERLESS.
    ParamLists []CynosdbParamTemplateParamListArgs
    parameter list.
    TemplateDescription string
    Template Description.
    TemplateId float64
    Optional parameter, template ID to be copied.
    engineVersion String
    MySQL version number.
    templateName String
    Template Name.
    cynosdbParamTemplateId String
    ID of the resource.
    dbMode String
    Database type, optional values: NORMAL (default), SERVERLESS.
    paramLists List<CynosdbParamTemplateParamList>
    parameter list.
    templateDescription String
    Template Description.
    templateId Double
    Optional parameter, template ID to be copied.
    engineVersion string
    MySQL version number.
    templateName string
    Template Name.
    cynosdbParamTemplateId string
    ID of the resource.
    dbMode string
    Database type, optional values: NORMAL (default), SERVERLESS.
    paramLists CynosdbParamTemplateParamList[]
    parameter list.
    templateDescription string
    Template Description.
    templateId number
    Optional parameter, template ID to be copied.
    engine_version str
    MySQL version number.
    template_name str
    Template Name.
    cynosdb_param_template_id str
    ID of the resource.
    db_mode str
    Database type, optional values: NORMAL (default), SERVERLESS.
    param_lists Sequence[CynosdbParamTemplateParamListArgs]
    parameter list.
    template_description str
    Template Description.
    template_id float
    Optional parameter, template ID to be copied.
    engineVersion String
    MySQL version number.
    templateName String
    Template Name.
    cynosdbParamTemplateId String
    ID of the resource.
    dbMode String
    Database type, optional values: NORMAL (default), SERVERLESS.
    paramLists List<Property Map>
    parameter list.
    templateDescription String
    Template Description.
    templateId Number
    Optional parameter, template ID to be copied.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CynosdbParamTemplate 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 CynosdbParamTemplate Resource

    Get an existing CynosdbParamTemplate 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?: CynosdbParamTemplateState, opts?: CustomResourceOptions): CynosdbParamTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cynosdb_param_template_id: Optional[str] = None,
            db_mode: Optional[str] = None,
            engine_version: Optional[str] = None,
            param_lists: Optional[Sequence[CynosdbParamTemplateParamListArgs]] = None,
            template_description: Optional[str] = None,
            template_id: Optional[float] = None,
            template_name: Optional[str] = None) -> CynosdbParamTemplate
    func GetCynosdbParamTemplate(ctx *Context, name string, id IDInput, state *CynosdbParamTemplateState, opts ...ResourceOption) (*CynosdbParamTemplate, error)
    public static CynosdbParamTemplate Get(string name, Input<string> id, CynosdbParamTemplateState? state, CustomResourceOptions? opts = null)
    public static CynosdbParamTemplate get(String name, Output<String> id, CynosdbParamTemplateState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CynosdbParamTemplate    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.
    The following state arguments are supported:
    CynosdbParamTemplateId string
    ID of the resource.
    DbMode string
    Database type, optional values: NORMAL (default), SERVERLESS.
    EngineVersion string
    MySQL version number.
    ParamLists List<CynosdbParamTemplateParamList>
    parameter list.
    TemplateDescription string
    Template Description.
    TemplateId double
    Optional parameter, template ID to be copied.
    TemplateName string
    Template Name.
    CynosdbParamTemplateId string
    ID of the resource.
    DbMode string
    Database type, optional values: NORMAL (default), SERVERLESS.
    EngineVersion string
    MySQL version number.
    ParamLists []CynosdbParamTemplateParamListArgs
    parameter list.
    TemplateDescription string
    Template Description.
    TemplateId float64
    Optional parameter, template ID to be copied.
    TemplateName string
    Template Name.
    cynosdbParamTemplateId String
    ID of the resource.
    dbMode String
    Database type, optional values: NORMAL (default), SERVERLESS.
    engineVersion String
    MySQL version number.
    paramLists List<CynosdbParamTemplateParamList>
    parameter list.
    templateDescription String
    Template Description.
    templateId Double
    Optional parameter, template ID to be copied.
    templateName String
    Template Name.
    cynosdbParamTemplateId string
    ID of the resource.
    dbMode string
    Database type, optional values: NORMAL (default), SERVERLESS.
    engineVersion string
    MySQL version number.
    paramLists CynosdbParamTemplateParamList[]
    parameter list.
    templateDescription string
    Template Description.
    templateId number
    Optional parameter, template ID to be copied.
    templateName string
    Template Name.
    cynosdb_param_template_id str
    ID of the resource.
    db_mode str
    Database type, optional values: NORMAL (default), SERVERLESS.
    engine_version str
    MySQL version number.
    param_lists Sequence[CynosdbParamTemplateParamListArgs]
    parameter list.
    template_description str
    Template Description.
    template_id float
    Optional parameter, template ID to be copied.
    template_name str
    Template Name.
    cynosdbParamTemplateId String
    ID of the resource.
    dbMode String
    Database type, optional values: NORMAL (default), SERVERLESS.
    engineVersion String
    MySQL version number.
    paramLists List<Property Map>
    parameter list.
    templateDescription String
    Template Description.
    templateId Number
    Optional parameter, template ID to be copied.
    templateName String
    Template Name.

    Supporting Types

    CynosdbParamTemplateParamList, CynosdbParamTemplateParamListArgs

    CurrentValue string
    Current value.
    ParamName string
    Parameter Name.
    CurrentValue string
    Current value.
    ParamName string
    Parameter Name.
    currentValue String
    Current value.
    paramName String
    Parameter Name.
    currentValue string
    Current value.
    paramName string
    Parameter Name.
    current_value str
    Current value.
    param_name str
    Parameter Name.
    currentValue String
    Current value.
    paramName String
    Parameter Name.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack