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

tencentcloud.PostgresqlParameterTemplate

Explore with Pulumi AI

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

    Provides a resource to create a postgresql parameter_template

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const parameterTemplate = new tencentcloud.PostgresqlParameterTemplate("parameterTemplate", {
        dbEngine: "postgresql",
        dbMajorVersion: "13",
        deleteParamSets: ["lc_time"],
        modifyParamEntrySets: [
            {
                expectedValue: "UTC",
                name: "timezone",
            },
            {
                expectedValue: "123",
                name: "lock_timeout",
            },
        ],
        templateDescription: "For_tf_test",
        templateName: "your_temp_name",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    parameter_template = tencentcloud.PostgresqlParameterTemplate("parameterTemplate",
        db_engine="postgresql",
        db_major_version="13",
        delete_param_sets=["lc_time"],
        modify_param_entry_sets=[
            {
                "expected_value": "UTC",
                "name": "timezone",
            },
            {
                "expected_value": "123",
                "name": "lock_timeout",
            },
        ],
        template_description="For_tf_test",
        template_name="your_temp_name")
    
    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.NewPostgresqlParameterTemplate(ctx, "parameterTemplate", &tencentcloud.PostgresqlParameterTemplateArgs{
    			DbEngine:       pulumi.String("postgresql"),
    			DbMajorVersion: pulumi.String("13"),
    			DeleteParamSets: pulumi.StringArray{
    				pulumi.String("lc_time"),
    			},
    			ModifyParamEntrySets: tencentcloud.PostgresqlParameterTemplateModifyParamEntrySetArray{
    				&tencentcloud.PostgresqlParameterTemplateModifyParamEntrySetArgs{
    					ExpectedValue: pulumi.String("UTC"),
    					Name:          pulumi.String("timezone"),
    				},
    				&tencentcloud.PostgresqlParameterTemplateModifyParamEntrySetArgs{
    					ExpectedValue: pulumi.String("123"),
    					Name:          pulumi.String("lock_timeout"),
    				},
    			},
    			TemplateDescription: pulumi.String("For_tf_test"),
    			TemplateName:        pulumi.String("your_temp_name"),
    		})
    		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 parameterTemplate = new Tencentcloud.PostgresqlParameterTemplate("parameterTemplate", new()
        {
            DbEngine = "postgresql",
            DbMajorVersion = "13",
            DeleteParamSets = new[]
            {
                "lc_time",
            },
            ModifyParamEntrySets = new[]
            {
                new Tencentcloud.Inputs.PostgresqlParameterTemplateModifyParamEntrySetArgs
                {
                    ExpectedValue = "UTC",
                    Name = "timezone",
                },
                new Tencentcloud.Inputs.PostgresqlParameterTemplateModifyParamEntrySetArgs
                {
                    ExpectedValue = "123",
                    Name = "lock_timeout",
                },
            },
            TemplateDescription = "For_tf_test",
            TemplateName = "your_temp_name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.PostgresqlParameterTemplate;
    import com.pulumi.tencentcloud.PostgresqlParameterTemplateArgs;
    import com.pulumi.tencentcloud.inputs.PostgresqlParameterTemplateModifyParamEntrySetArgs;
    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 parameterTemplate = new PostgresqlParameterTemplate("parameterTemplate", PostgresqlParameterTemplateArgs.builder()
                .dbEngine("postgresql")
                .dbMajorVersion("13")
                .deleteParamSets("lc_time")
                .modifyParamEntrySets(            
                    PostgresqlParameterTemplateModifyParamEntrySetArgs.builder()
                        .expectedValue("UTC")
                        .name("timezone")
                        .build(),
                    PostgresqlParameterTemplateModifyParamEntrySetArgs.builder()
                        .expectedValue("123")
                        .name("lock_timeout")
                        .build())
                .templateDescription("For_tf_test")
                .templateName("your_temp_name")
                .build());
    
        }
    }
    
    resources:
      parameterTemplate:
        type: tencentcloud:PostgresqlParameterTemplate
        properties:
          dbEngine: postgresql
          dbMajorVersion: '13'
          deleteParamSets:
            - lc_time
          modifyParamEntrySets:
            - expectedValue: UTC
              name: timezone
            - expectedValue: '123'
              name: lock_timeout
          templateDescription: For_tf_test
          templateName: your_temp_name
    

    Create PostgresqlParameterTemplate Resource

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

    Constructor syntax

    new PostgresqlParameterTemplate(name: string, args: PostgresqlParameterTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresqlParameterTemplate(resource_name: str,
                                    args: PostgresqlParameterTemplateArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresqlParameterTemplate(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    db_engine: Optional[str] = None,
                                    db_major_version: Optional[str] = None,
                                    template_name: Optional[str] = None,
                                    delete_param_sets: Optional[Sequence[str]] = None,
                                    modify_param_entry_sets: Optional[Sequence[PostgresqlParameterTemplateModifyParamEntrySetArgs]] = None,
                                    postgresql_parameter_template_id: Optional[str] = None,
                                    template_description: Optional[str] = None)
    func NewPostgresqlParameterTemplate(ctx *Context, name string, args PostgresqlParameterTemplateArgs, opts ...ResourceOption) (*PostgresqlParameterTemplate, error)
    public PostgresqlParameterTemplate(string name, PostgresqlParameterTemplateArgs args, CustomResourceOptions? opts = null)
    public PostgresqlParameterTemplate(String name, PostgresqlParameterTemplateArgs args)
    public PostgresqlParameterTemplate(String name, PostgresqlParameterTemplateArgs args, CustomResourceOptions options)
    
    type: tencentcloud:PostgresqlParameterTemplate
    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 PostgresqlParameterTemplateArgs
    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 PostgresqlParameterTemplateArgs
    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 PostgresqlParameterTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresqlParameterTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresqlParameterTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DbEngine string
    Database engine, such as postgresql, mssql_compatible.
    DbMajorVersion string
    The major database version number, such as 11, 12, 13.
    TemplateName string
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    DeleteParamSets List<string>
    The set of parameters that need to be deleted.
    ModifyParamEntrySets List<PostgresqlParameterTemplateModifyParamEntrySet>
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    PostgresqlParameterTemplateId string
    ID of the resource.
    TemplateDescription string
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    DbEngine string
    Database engine, such as postgresql, mssql_compatible.
    DbMajorVersion string
    The major database version number, such as 11, 12, 13.
    TemplateName string
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    DeleteParamSets []string
    The set of parameters that need to be deleted.
    ModifyParamEntrySets []PostgresqlParameterTemplateModifyParamEntrySetArgs
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    PostgresqlParameterTemplateId string
    ID of the resource.
    TemplateDescription string
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    dbEngine String
    Database engine, such as postgresql, mssql_compatible.
    dbMajorVersion String
    The major database version number, such as 11, 12, 13.
    templateName String
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    deleteParamSets List<String>
    The set of parameters that need to be deleted.
    modifyParamEntrySets List<PostgresqlParameterTemplateModifyParamEntrySet>
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    postgresqlParameterTemplateId String
    ID of the resource.
    templateDescription String
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    dbEngine string
    Database engine, such as postgresql, mssql_compatible.
    dbMajorVersion string
    The major database version number, such as 11, 12, 13.
    templateName string
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    deleteParamSets string[]
    The set of parameters that need to be deleted.
    modifyParamEntrySets PostgresqlParameterTemplateModifyParamEntrySet[]
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    postgresqlParameterTemplateId string
    ID of the resource.
    templateDescription string
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    db_engine str
    Database engine, such as postgresql, mssql_compatible.
    db_major_version str
    The major database version number, such as 11, 12, 13.
    template_name str
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    delete_param_sets Sequence[str]
    The set of parameters that need to be deleted.
    modify_param_entry_sets Sequence[PostgresqlParameterTemplateModifyParamEntrySetArgs]
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    postgresql_parameter_template_id str
    ID of the resource.
    template_description str
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    dbEngine String
    Database engine, such as postgresql, mssql_compatible.
    dbMajorVersion String
    The major database version number, such as 11, 12, 13.
    templateName String
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    deleteParamSets List<String>
    The set of parameters that need to be deleted.
    modifyParamEntrySets List<Property Map>
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    postgresqlParameterTemplateId String
    ID of the resource.
    templateDescription String
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).

    Outputs

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

    Get an existing PostgresqlParameterTemplate 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?: PostgresqlParameterTemplateState, opts?: CustomResourceOptions): PostgresqlParameterTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_engine: Optional[str] = None,
            db_major_version: Optional[str] = None,
            delete_param_sets: Optional[Sequence[str]] = None,
            modify_param_entry_sets: Optional[Sequence[PostgresqlParameterTemplateModifyParamEntrySetArgs]] = None,
            postgresql_parameter_template_id: Optional[str] = None,
            template_description: Optional[str] = None,
            template_name: Optional[str] = None) -> PostgresqlParameterTemplate
    func GetPostgresqlParameterTemplate(ctx *Context, name string, id IDInput, state *PostgresqlParameterTemplateState, opts ...ResourceOption) (*PostgresqlParameterTemplate, error)
    public static PostgresqlParameterTemplate Get(string name, Input<string> id, PostgresqlParameterTemplateState? state, CustomResourceOptions? opts = null)
    public static PostgresqlParameterTemplate get(String name, Output<String> id, PostgresqlParameterTemplateState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:PostgresqlParameterTemplate    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:
    DbEngine string
    Database engine, such as postgresql, mssql_compatible.
    DbMajorVersion string
    The major database version number, such as 11, 12, 13.
    DeleteParamSets List<string>
    The set of parameters that need to be deleted.
    ModifyParamEntrySets List<PostgresqlParameterTemplateModifyParamEntrySet>
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    PostgresqlParameterTemplateId string
    ID of the resource.
    TemplateDescription string
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    TemplateName string
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    DbEngine string
    Database engine, such as postgresql, mssql_compatible.
    DbMajorVersion string
    The major database version number, such as 11, 12, 13.
    DeleteParamSets []string
    The set of parameters that need to be deleted.
    ModifyParamEntrySets []PostgresqlParameterTemplateModifyParamEntrySetArgs
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    PostgresqlParameterTemplateId string
    ID of the resource.
    TemplateDescription string
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    TemplateName string
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    dbEngine String
    Database engine, such as postgresql, mssql_compatible.
    dbMajorVersion String
    The major database version number, such as 11, 12, 13.
    deleteParamSets List<String>
    The set of parameters that need to be deleted.
    modifyParamEntrySets List<PostgresqlParameterTemplateModifyParamEntrySet>
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    postgresqlParameterTemplateId String
    ID of the resource.
    templateDescription String
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    templateName String
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    dbEngine string
    Database engine, such as postgresql, mssql_compatible.
    dbMajorVersion string
    The major database version number, such as 11, 12, 13.
    deleteParamSets string[]
    The set of parameters that need to be deleted.
    modifyParamEntrySets PostgresqlParameterTemplateModifyParamEntrySet[]
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    postgresqlParameterTemplateId string
    ID of the resource.
    templateDescription string
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    templateName string
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    db_engine str
    Database engine, such as postgresql, mssql_compatible.
    db_major_version str
    The major database version number, such as 11, 12, 13.
    delete_param_sets Sequence[str]
    The set of parameters that need to be deleted.
    modify_param_entry_sets Sequence[PostgresqlParameterTemplateModifyParamEntrySetArgs]
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    postgresql_parameter_template_id str
    ID of the resource.
    template_description str
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    template_name str
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    dbEngine String
    Database engine, such as postgresql, mssql_compatible.
    dbMajorVersion String
    The major database version number, such as 11, 12, 13.
    deleteParamSets List<String>
    The set of parameters that need to be deleted.
    modifyParamEntrySets List<Property Map>
    The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
    postgresqlParameterTemplateId String
    ID of the resource.
    templateDescription String
    Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
    templateName String
    Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).

    Supporting Types

    PostgresqlParameterTemplateModifyParamEntrySet, PostgresqlParameterTemplateModifyParamEntrySetArgs

    ExpectedValue string
    Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal 0.1, integer 1000, enumeration replica.
    Name string
    The parameter name.
    ExpectedValue string
    Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal 0.1, integer 1000, enumeration replica.
    Name string
    The parameter name.
    expectedValue String
    Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal 0.1, integer 1000, enumeration replica.
    name String
    The parameter name.
    expectedValue string
    Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal 0.1, integer 1000, enumeration replica.
    name string
    The parameter name.
    expected_value str
    Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal 0.1, integer 1000, enumeration replica.
    name str
    The parameter name.
    expectedValue String
    Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal 0.1, integer 1000, enumeration replica.
    name String
    The parameter name.

    Import

    postgresql parameter_template can be imported using the id, e.g.

    Notice: modify_param_entry_set and delete_param_set do not support import.

    $ pulumi import tencentcloud:index/postgresqlParameterTemplate:PostgresqlParameterTemplate parameter_template parameter_template_id
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack