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

tencentcloud.SsmProductSecret

Explore with Pulumi AI

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

    Provides a resource to create a ssm product_secret

    Example Usage

    Ssm secret for mysql

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const zones = tencentcloud.getAvailabilityZonesByProduct({
        product: "cdb",
    });
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const subnet = new tencentcloud.Subnet("subnet", {
        availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
        vpcId: vpc.vpcId,
        cidrBlock: "10.0.0.0/16",
        isMulticast: false,
    });
    const securityGroup = new tencentcloud.SecurityGroup("securityGroup", {description: "desc."});
    const exampleMysqlInstance = new tencentcloud.MysqlInstance("exampleMysqlInstance", {
        internetService: 1,
        engineVersion: "5.7",
        chargeType: "POSTPAID",
        rootPassword: "PassWord123",
        slaveDeployMode: 0,
        availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
        slaveSyncMode: 1,
        instanceName: "tf-example",
        memSize: 4000,
        volumeSize: 200,
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        intranetPort: 3306,
        securityGroups: [securityGroup.securityGroupId],
        tags: {
            createBy: "terraform",
        },
        parameters: {
            character_set_server: "utf8",
            max_connections: "1000",
        },
    });
    const exampleKmsKey = new tencentcloud.KmsKey("exampleKmsKey", {
        alias: "tf-example-kms-key",
        description: "example of kms key",
        keyRotationEnabled: false,
        isEnabled: true,
        tags: {
            createdBy: "terraform",
        },
    });
    const exampleSsmProductSecret = new tencentcloud.SsmProductSecret("exampleSsmProductSecret", {
        secretName: "tf-example",
        userNamePrefix: "prefix",
        productName: "Mysql",
        instanceId: exampleMysqlInstance.mysqlInstanceId,
        domains: ["10.0.0.0"],
        privilegesLists: [{
            privilegeName: "GlobalPrivileges",
            privileges: ["ALTER ROUTINE"],
        }],
        description: "for ssm product test",
        kmsKeyId: exampleKmsKey.kmsKeyId,
        status: "Enabled",
        enableRotation: true,
        rotationBeginTime: "2023-08-05 20:54:33",
        rotationFrequency: 30,
        tags: {
            createdBy: "terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    zones = tencentcloud.get_availability_zones_by_product(product="cdb")
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    subnet = tencentcloud.Subnet("subnet",
        availability_zone=zones.zones[0].name,
        vpc_id=vpc.vpc_id,
        cidr_block="10.0.0.0/16",
        is_multicast=False)
    security_group = tencentcloud.SecurityGroup("securityGroup", description="desc.")
    example_mysql_instance = tencentcloud.MysqlInstance("exampleMysqlInstance",
        internet_service=1,
        engine_version="5.7",
        charge_type="POSTPAID",
        root_password="PassWord123",
        slave_deploy_mode=0,
        availability_zone=zones.zones[0].name,
        slave_sync_mode=1,
        instance_name="tf-example",
        mem_size=4000,
        volume_size=200,
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        intranet_port=3306,
        security_groups=[security_group.security_group_id],
        tags={
            "createBy": "terraform",
        },
        parameters={
            "character_set_server": "utf8",
            "max_connections": "1000",
        })
    example_kms_key = tencentcloud.KmsKey("exampleKmsKey",
        alias="tf-example-kms-key",
        description="example of kms key",
        key_rotation_enabled=False,
        is_enabled=True,
        tags={
            "createdBy": "terraform",
        })
    example_ssm_product_secret = tencentcloud.SsmProductSecret("exampleSsmProductSecret",
        secret_name="tf-example",
        user_name_prefix="prefix",
        product_name="Mysql",
        instance_id=example_mysql_instance.mysql_instance_id,
        domains=["10.0.0.0"],
        privileges_lists=[{
            "privilege_name": "GlobalPrivileges",
            "privileges": ["ALTER ROUTINE"],
        }],
        description="for ssm product test",
        kms_key_id=example_kms_key.kms_key_id,
        status="Enabled",
        enable_rotation=True,
        rotation_begin_time="2023-08-05 20:54:33",
        rotation_frequency=30,
        tags={
            "createdBy": "terraform",
        })
    
    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 {
    		zones, err := tencentcloud.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
    			Product: "cdb",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			AvailabilityZone: pulumi.String(zones.Zones[0].Name),
    			VpcId:            vpc.VpcId,
    			CidrBlock:        pulumi.String("10.0.0.0/16"),
    			IsMulticast:      pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		securityGroup, err := tencentcloud.NewSecurityGroup(ctx, "securityGroup", &tencentcloud.SecurityGroupArgs{
    			Description: pulumi.String("desc."),
    		})
    		if err != nil {
    			return err
    		}
    		exampleMysqlInstance, err := tencentcloud.NewMysqlInstance(ctx, "exampleMysqlInstance", &tencentcloud.MysqlInstanceArgs{
    			InternetService:  pulumi.Float64(1),
    			EngineVersion:    pulumi.String("5.7"),
    			ChargeType:       pulumi.String("POSTPAID"),
    			RootPassword:     pulumi.String("PassWord123"),
    			SlaveDeployMode:  pulumi.Float64(0),
    			AvailabilityZone: pulumi.String(zones.Zones[0].Name),
    			SlaveSyncMode:    pulumi.Float64(1),
    			InstanceName:     pulumi.String("tf-example"),
    			MemSize:          pulumi.Float64(4000),
    			VolumeSize:       pulumi.Float64(200),
    			VpcId:            vpc.VpcId,
    			SubnetId:         subnet.SubnetId,
    			IntranetPort:     pulumi.Float64(3306),
    			SecurityGroups: pulumi.StringArray{
    				securityGroup.SecurityGroupId,
    			},
    			Tags: pulumi.StringMap{
    				"createBy": pulumi.String("terraform"),
    			},
    			Parameters: pulumi.StringMap{
    				"character_set_server": pulumi.String("utf8"),
    				"max_connections":      pulumi.String("1000"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleKmsKey, err := tencentcloud.NewKmsKey(ctx, "exampleKmsKey", &tencentcloud.KmsKeyArgs{
    			Alias:              pulumi.String("tf-example-kms-key"),
    			Description:        pulumi.String("example of kms key"),
    			KeyRotationEnabled: pulumi.Bool(false),
    			IsEnabled:          pulumi.Bool(true),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewSsmProductSecret(ctx, "exampleSsmProductSecret", &tencentcloud.SsmProductSecretArgs{
    			SecretName:     pulumi.String("tf-example"),
    			UserNamePrefix: pulumi.String("prefix"),
    			ProductName:    pulumi.String("Mysql"),
    			InstanceId:     exampleMysqlInstance.MysqlInstanceId,
    			Domains: pulumi.StringArray{
    				pulumi.String("10.0.0.0"),
    			},
    			PrivilegesLists: tencentcloud.SsmProductSecretPrivilegesListArray{
    				&tencentcloud.SsmProductSecretPrivilegesListArgs{
    					PrivilegeName: pulumi.String("GlobalPrivileges"),
    					Privileges: pulumi.StringArray{
    						pulumi.String("ALTER ROUTINE"),
    					},
    				},
    			},
    			Description:       pulumi.String("for ssm product test"),
    			KmsKeyId:          exampleKmsKey.KmsKeyId,
    			Status:            pulumi.String("Enabled"),
    			EnableRotation:    pulumi.Bool(true),
    			RotationBeginTime: pulumi.String("2023-08-05 20:54:33"),
    			RotationFrequency: pulumi.Float64(30),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    		})
    		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 zones = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
        {
            Product = "cdb",
        });
    
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
            VpcId = vpc.VpcId,
            CidrBlock = "10.0.0.0/16",
            IsMulticast = false,
        });
    
        var securityGroup = new Tencentcloud.SecurityGroup("securityGroup", new()
        {
            Description = "desc.",
        });
    
        var exampleMysqlInstance = new Tencentcloud.MysqlInstance("exampleMysqlInstance", new()
        {
            InternetService = 1,
            EngineVersion = "5.7",
            ChargeType = "POSTPAID",
            RootPassword = "PassWord123",
            SlaveDeployMode = 0,
            AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
            SlaveSyncMode = 1,
            InstanceName = "tf-example",
            MemSize = 4000,
            VolumeSize = 200,
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            IntranetPort = 3306,
            SecurityGroups = new[]
            {
                securityGroup.SecurityGroupId,
            },
            Tags = 
            {
                { "createBy", "terraform" },
            },
            Parameters = 
            {
                { "character_set_server", "utf8" },
                { "max_connections", "1000" },
            },
        });
    
        var exampleKmsKey = new Tencentcloud.KmsKey("exampleKmsKey", new()
        {
            Alias = "tf-example-kms-key",
            Description = "example of kms key",
            KeyRotationEnabled = false,
            IsEnabled = true,
            Tags = 
            {
                { "createdBy", "terraform" },
            },
        });
    
        var exampleSsmProductSecret = new Tencentcloud.SsmProductSecret("exampleSsmProductSecret", new()
        {
            SecretName = "tf-example",
            UserNamePrefix = "prefix",
            ProductName = "Mysql",
            InstanceId = exampleMysqlInstance.MysqlInstanceId,
            Domains = new[]
            {
                "10.0.0.0",
            },
            PrivilegesLists = new[]
            {
                new Tencentcloud.Inputs.SsmProductSecretPrivilegesListArgs
                {
                    PrivilegeName = "GlobalPrivileges",
                    Privileges = new[]
                    {
                        "ALTER ROUTINE",
                    },
                },
            },
            Description = "for ssm product test",
            KmsKeyId = exampleKmsKey.KmsKeyId,
            Status = "Enabled",
            EnableRotation = true,
            RotationBeginTime = "2023-08-05 20:54:33",
            RotationFrequency = 30,
            Tags = 
            {
                { "createdBy", "terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesByProductArgs;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.SecurityGroup;
    import com.pulumi.tencentcloud.SecurityGroupArgs;
    import com.pulumi.tencentcloud.MysqlInstance;
    import com.pulumi.tencentcloud.MysqlInstanceArgs;
    import com.pulumi.tencentcloud.KmsKey;
    import com.pulumi.tencentcloud.KmsKeyArgs;
    import com.pulumi.tencentcloud.SsmProductSecret;
    import com.pulumi.tencentcloud.SsmProductSecretArgs;
    import com.pulumi.tencentcloud.inputs.SsmProductSecretPrivilegesListArgs;
    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 zones = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
                .product("cdb")
                .build());
    
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
                .vpcId(vpc.vpcId())
                .cidrBlock("10.0.0.0/16")
                .isMulticast(false)
                .build());
    
            var securityGroup = new SecurityGroup("securityGroup", SecurityGroupArgs.builder()
                .description("desc.")
                .build());
    
            var exampleMysqlInstance = new MysqlInstance("exampleMysqlInstance", MysqlInstanceArgs.builder()
                .internetService(1)
                .engineVersion("5.7")
                .chargeType("POSTPAID")
                .rootPassword("PassWord123")
                .slaveDeployMode(0)
                .availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
                .slaveSyncMode(1)
                .instanceName("tf-example")
                .memSize(4000)
                .volumeSize(200)
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .intranetPort(3306)
                .securityGroups(securityGroup.securityGroupId())
                .tags(Map.of("createBy", "terraform"))
                .parameters(Map.ofEntries(
                    Map.entry("character_set_server", "utf8"),
                    Map.entry("max_connections", "1000")
                ))
                .build());
    
            var exampleKmsKey = new KmsKey("exampleKmsKey", KmsKeyArgs.builder()
                .alias("tf-example-kms-key")
                .description("example of kms key")
                .keyRotationEnabled(false)
                .isEnabled(true)
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
            var exampleSsmProductSecret = new SsmProductSecret("exampleSsmProductSecret", SsmProductSecretArgs.builder()
                .secretName("tf-example")
                .userNamePrefix("prefix")
                .productName("Mysql")
                .instanceId(exampleMysqlInstance.mysqlInstanceId())
                .domains("10.0.0.0")
                .privilegesLists(SsmProductSecretPrivilegesListArgs.builder()
                    .privilegeName("GlobalPrivileges")
                    .privileges("ALTER ROUTINE")
                    .build())
                .description("for ssm product test")
                .kmsKeyId(exampleKmsKey.kmsKeyId())
                .status("Enabled")
                .enableRotation(true)
                .rotationBeginTime("2023-08-05 20:54:33")
                .rotationFrequency(30)
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      subnet:
        type: tencentcloud:Subnet
        properties:
          availabilityZone: ${zones.zones[0].name}
          vpcId: ${vpc.vpcId}
          cidrBlock: 10.0.0.0/16
          isMulticast: false
      securityGroup:
        type: tencentcloud:SecurityGroup
        properties:
          description: desc.
      exampleMysqlInstance:
        type: tencentcloud:MysqlInstance
        properties:
          internetService: 1
          engineVersion: '5.7'
          chargeType: POSTPAID
          rootPassword: PassWord123
          slaveDeployMode: 0
          availabilityZone: ${zones.zones[0].name}
          slaveSyncMode: 1
          instanceName: tf-example
          memSize: 4000
          volumeSize: 200
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          intranetPort: 3306
          securityGroups:
            - ${securityGroup.securityGroupId}
          tags:
            createBy: terraform
          parameters:
            character_set_server: utf8
            max_connections: '1000'
      exampleKmsKey:
        type: tencentcloud:KmsKey
        properties:
          alias: tf-example-kms-key
          description: example of kms key
          keyRotationEnabled: false
          isEnabled: true
          tags:
            createdBy: terraform
      exampleSsmProductSecret:
        type: tencentcloud:SsmProductSecret
        properties:
          secretName: tf-example
          userNamePrefix: prefix
          productName: Mysql
          instanceId: ${exampleMysqlInstance.mysqlInstanceId}
          domains:
            - 10.0.0.0
          privilegesLists:
            - privilegeName: GlobalPrivileges
              privileges:
                - ALTER ROUTINE
          description: for ssm product test
          kmsKeyId: ${exampleKmsKey.kmsKeyId}
          status: Enabled
          enableRotation: true
          rotationBeginTime: 2023-08-05 20:54:33
          rotationFrequency: 30
          tags:
            createdBy: terraform
    variables:
      zones:
        fn::invoke:
          function: tencentcloud:getAvailabilityZonesByProduct
          arguments:
            product: cdb
    

    Ssm secret for tdsql-c-mysql

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.SsmProductSecret("example", {
        secretName: "tf-tdsql-c-example",
        userNamePrefix: "prefix",
        productName: "Tdsql_C_Mysql",
        instanceId: "cynosdbmysql-xxxxxx",
        domains: ["%"],
        privilegesLists: [
            {
                privilegeName: "GlobalPrivileges",
                privileges: [
                    "ALTER",
                    "CREATE",
                    "DELETE",
                ],
            },
            {
                privilegeName: "DatabasePrivileges",
                database: "test",
                privileges: [
                    "ALTER",
                    "CREATE",
                    "DELETE",
                    "SELECT",
                ],
            },
        ],
        description: "test tdsql-c",
        kmsKeyId: undefined,
        status: "Enabled",
        enableRotation: false,
        rotationBeginTime: "2023-08-05 20:54:33",
        rotationFrequency: 30,
        tags: {
            createdBy: "terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.SsmProductSecret("example",
        secret_name="tf-tdsql-c-example",
        user_name_prefix="prefix",
        product_name="Tdsql_C_Mysql",
        instance_id="cynosdbmysql-xxxxxx",
        domains=["%"],
        privileges_lists=[
            {
                "privilege_name": "GlobalPrivileges",
                "privileges": [
                    "ALTER",
                    "CREATE",
                    "DELETE",
                ],
            },
            {
                "privilege_name": "DatabasePrivileges",
                "database": "test",
                "privileges": [
                    "ALTER",
                    "CREATE",
                    "DELETE",
                    "SELECT",
                ],
            },
        ],
        description="test tdsql-c",
        kms_key_id=None,
        status="Enabled",
        enable_rotation=False,
        rotation_begin_time="2023-08-05 20:54:33",
        rotation_frequency=30,
        tags={
            "createdBy": "terraform",
        })
    
    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.NewSsmProductSecret(ctx, "example", &tencentcloud.SsmProductSecretArgs{
    			SecretName:     pulumi.String("tf-tdsql-c-example"),
    			UserNamePrefix: pulumi.String("prefix"),
    			ProductName:    pulumi.String("Tdsql_C_Mysql"),
    			InstanceId:     pulumi.String("cynosdbmysql-xxxxxx"),
    			Domains: pulumi.StringArray{
    				pulumi.String("%"),
    			},
    			PrivilegesLists: tencentcloud.SsmProductSecretPrivilegesListArray{
    				&tencentcloud.SsmProductSecretPrivilegesListArgs{
    					PrivilegeName: pulumi.String("GlobalPrivileges"),
    					Privileges: pulumi.StringArray{
    						pulumi.String("ALTER"),
    						pulumi.String("CREATE"),
    						pulumi.String("DELETE"),
    					},
    				},
    				&tencentcloud.SsmProductSecretPrivilegesListArgs{
    					PrivilegeName: pulumi.String("DatabasePrivileges"),
    					Database:      pulumi.String("test"),
    					Privileges: pulumi.StringArray{
    						pulumi.String("ALTER"),
    						pulumi.String("CREATE"),
    						pulumi.String("DELETE"),
    						pulumi.String("SELECT"),
    					},
    				},
    			},
    			Description:       pulumi.String("test tdsql-c"),
    			KmsKeyId:          nil,
    			Status:            pulumi.String("Enabled"),
    			EnableRotation:    pulumi.Bool(false),
    			RotationBeginTime: pulumi.String("2023-08-05 20:54:33"),
    			RotationFrequency: pulumi.Float64(30),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    		})
    		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 example = new Tencentcloud.SsmProductSecret("example", new()
        {
            SecretName = "tf-tdsql-c-example",
            UserNamePrefix = "prefix",
            ProductName = "Tdsql_C_Mysql",
            InstanceId = "cynosdbmysql-xxxxxx",
            Domains = new[]
            {
                "%",
            },
            PrivilegesLists = new[]
            {
                new Tencentcloud.Inputs.SsmProductSecretPrivilegesListArgs
                {
                    PrivilegeName = "GlobalPrivileges",
                    Privileges = new[]
                    {
                        "ALTER",
                        "CREATE",
                        "DELETE",
                    },
                },
                new Tencentcloud.Inputs.SsmProductSecretPrivilegesListArgs
                {
                    PrivilegeName = "DatabasePrivileges",
                    Database = "test",
                    Privileges = new[]
                    {
                        "ALTER",
                        "CREATE",
                        "DELETE",
                        "SELECT",
                    },
                },
            },
            Description = "test tdsql-c",
            KmsKeyId = null,
            Status = "Enabled",
            EnableRotation = false,
            RotationBeginTime = "2023-08-05 20:54:33",
            RotationFrequency = 30,
            Tags = 
            {
                { "createdBy", "terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.SsmProductSecret;
    import com.pulumi.tencentcloud.SsmProductSecretArgs;
    import com.pulumi.tencentcloud.inputs.SsmProductSecretPrivilegesListArgs;
    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 example = new SsmProductSecret("example", SsmProductSecretArgs.builder()
                .secretName("tf-tdsql-c-example")
                .userNamePrefix("prefix")
                .productName("Tdsql_C_Mysql")
                .instanceId("cynosdbmysql-xxxxxx")
                .domains("%")
                .privilegesLists(            
                    SsmProductSecretPrivilegesListArgs.builder()
                        .privilegeName("GlobalPrivileges")
                        .privileges(                    
                            "ALTER",
                            "CREATE",
                            "DELETE")
                        .build(),
                    SsmProductSecretPrivilegesListArgs.builder()
                        .privilegeName("DatabasePrivileges")
                        .database("test")
                        .privileges(                    
                            "ALTER",
                            "CREATE",
                            "DELETE",
                            "SELECT")
                        .build())
                .description("test tdsql-c")
                .kmsKeyId(null)
                .status("Enabled")
                .enableRotation(false)
                .rotationBeginTime("2023-08-05 20:54:33")
                .rotationFrequency(30)
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:SsmProductSecret
        properties:
          secretName: tf-tdsql-c-example
          userNamePrefix: prefix
          productName: Tdsql_C_Mysql
          instanceId: cynosdbmysql-xxxxxx
          domains:
            - '%'
          privilegesLists:
            - privilegeName: GlobalPrivileges
              privileges:
                - ALTER
                - CREATE
                - DELETE
            - privilegeName: DatabasePrivileges
              database: test
              privileges:
                - ALTER
                - CREATE
                - DELETE
                - SELECT
          description: test tdsql-c
          kmsKeyId: null
          status: Enabled
          enableRotation: false
          rotationBeginTime: 2023-08-05 20:54:33
          rotationFrequency: 30
          tags:
            createdBy: terraform
    

    Create SsmProductSecret Resource

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

    Constructor syntax

    new SsmProductSecret(name: string, args: SsmProductSecretArgs, opts?: CustomResourceOptions);
    @overload
    def SsmProductSecret(resource_name: str,
                         args: SsmProductSecretArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def SsmProductSecret(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         product_name: Optional[str] = None,
                         domains: Optional[Sequence[str]] = None,
                         user_name_prefix: Optional[str] = None,
                         instance_id: Optional[str] = None,
                         secret_name: Optional[str] = None,
                         privileges_lists: Optional[Sequence[SsmProductSecretPrivilegesListArgs]] = None,
                         tags: Optional[Mapping[str, str]] = None,
                         description: Optional[str] = None,
                         rotation_frequency: Optional[float] = None,
                         kms_key_id: Optional[str] = None,
                         ssm_product_secret_id: Optional[str] = None,
                         status: Optional[str] = None,
                         rotation_begin_time: Optional[str] = None,
                         enable_rotation: Optional[bool] = None)
    func NewSsmProductSecret(ctx *Context, name string, args SsmProductSecretArgs, opts ...ResourceOption) (*SsmProductSecret, error)
    public SsmProductSecret(string name, SsmProductSecretArgs args, CustomResourceOptions? opts = null)
    public SsmProductSecret(String name, SsmProductSecretArgs args)
    public SsmProductSecret(String name, SsmProductSecretArgs args, CustomResourceOptions options)
    
    type: tencentcloud:SsmProductSecret
    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 SsmProductSecretArgs
    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 SsmProductSecretArgs
    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 SsmProductSecretArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SsmProductSecretArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SsmProductSecretArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Domains List<string>
    Domain name of the account in the form of IP. You can enter %.
    InstanceId string
    Tencent Cloud service instance ID.
    PrivilegesLists List<SsmProductSecretPrivilegesList>
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    ProductName string
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    SecretName string
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    UserNamePrefix string
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    Description string
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    EnableRotation bool
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    KmsKeyId string
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    RotationBeginTime string
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    RotationFrequency double
    Rotation frequency in days. Default value: 1 day.
    SsmProductSecretId string
    ID of the resource.
    Status string
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    Tags Dictionary<string, string>
    Tags of secret.
    Domains []string
    Domain name of the account in the form of IP. You can enter %.
    InstanceId string
    Tencent Cloud service instance ID.
    PrivilegesLists []SsmProductSecretPrivilegesListArgs
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    ProductName string
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    SecretName string
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    UserNamePrefix string
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    Description string
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    EnableRotation bool
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    KmsKeyId string
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    RotationBeginTime string
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    RotationFrequency float64
    Rotation frequency in days. Default value: 1 day.
    SsmProductSecretId string
    ID of the resource.
    Status string
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    Tags map[string]string
    Tags of secret.
    domains List<String>
    Domain name of the account in the form of IP. You can enter %.
    instanceId String
    Tencent Cloud service instance ID.
    privilegesLists List<SsmProductSecretPrivilegesList>
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    productName String
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    secretName String
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    userNamePrefix String
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    description String
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    enableRotation Boolean
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    kmsKeyId String
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    rotationBeginTime String
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    rotationFrequency Double
    Rotation frequency in days. Default value: 1 day.
    ssmProductSecretId String
    ID of the resource.
    status String
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    tags Map<String,String>
    Tags of secret.
    domains string[]
    Domain name of the account in the form of IP. You can enter %.
    instanceId string
    Tencent Cloud service instance ID.
    privilegesLists SsmProductSecretPrivilegesList[]
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    productName string
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    secretName string
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    userNamePrefix string
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    description string
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    enableRotation boolean
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    kmsKeyId string
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    rotationBeginTime string
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    rotationFrequency number
    Rotation frequency in days. Default value: 1 day.
    ssmProductSecretId string
    ID of the resource.
    status string
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    tags {[key: string]: string}
    Tags of secret.
    domains Sequence[str]
    Domain name of the account in the form of IP. You can enter %.
    instance_id str
    Tencent Cloud service instance ID.
    privileges_lists Sequence[SsmProductSecretPrivilegesListArgs]
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    product_name str
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    secret_name str
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    user_name_prefix str
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    description str
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    enable_rotation bool
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    kms_key_id str
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    rotation_begin_time str
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    rotation_frequency float
    Rotation frequency in days. Default value: 1 day.
    ssm_product_secret_id str
    ID of the resource.
    status str
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    tags Mapping[str, str]
    Tags of secret.
    domains List<String>
    Domain name of the account in the form of IP. You can enter %.
    instanceId String
    Tencent Cloud service instance ID.
    privilegesLists List<Property Map>
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    productName String
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    secretName String
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    userNamePrefix String
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    description String
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    enableRotation Boolean
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    kmsKeyId String
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    rotationBeginTime String
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    rotationFrequency Number
    Rotation frequency in days. Default value: 1 day.
    ssmProductSecretId String
    ID of the resource.
    status String
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    tags Map<String>
    Tags of secret.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SsmProductSecret resource produces the following output properties:

    CreateTime double
    Credential creation time in UNIX timestamp format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretType double
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    CreateTime float64
    Credential creation time in UNIX timestamp format.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretType float64
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    createTime Double
    Credential creation time in UNIX timestamp format.
    id String
    The provider-assigned unique ID for this managed resource.
    secretType Double
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    createTime number
    Credential creation time in UNIX timestamp format.
    id string
    The provider-assigned unique ID for this managed resource.
    secretType number
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    create_time float
    Credential creation time in UNIX timestamp format.
    id str
    The provider-assigned unique ID for this managed resource.
    secret_type float
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    createTime Number
    Credential creation time in UNIX timestamp format.
    id String
    The provider-assigned unique ID for this managed resource.
    secretType Number
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.

    Look up Existing SsmProductSecret Resource

    Get an existing SsmProductSecret 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?: SsmProductSecretState, opts?: CustomResourceOptions): SsmProductSecret
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[float] = None,
            description: Optional[str] = None,
            domains: Optional[Sequence[str]] = None,
            enable_rotation: Optional[bool] = None,
            instance_id: Optional[str] = None,
            kms_key_id: Optional[str] = None,
            privileges_lists: Optional[Sequence[SsmProductSecretPrivilegesListArgs]] = None,
            product_name: Optional[str] = None,
            rotation_begin_time: Optional[str] = None,
            rotation_frequency: Optional[float] = None,
            secret_name: Optional[str] = None,
            secret_type: Optional[float] = None,
            ssm_product_secret_id: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            user_name_prefix: Optional[str] = None) -> SsmProductSecret
    func GetSsmProductSecret(ctx *Context, name string, id IDInput, state *SsmProductSecretState, opts ...ResourceOption) (*SsmProductSecret, error)
    public static SsmProductSecret Get(string name, Input<string> id, SsmProductSecretState? state, CustomResourceOptions? opts = null)
    public static SsmProductSecret get(String name, Output<String> id, SsmProductSecretState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:SsmProductSecret    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:
    CreateTime double
    Credential creation time in UNIX timestamp format.
    Description string
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    Domains List<string>
    Domain name of the account in the form of IP. You can enter %.
    EnableRotation bool
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    InstanceId string
    Tencent Cloud service instance ID.
    KmsKeyId string
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    PrivilegesLists List<SsmProductSecretPrivilegesList>
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    ProductName string
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    RotationBeginTime string
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    RotationFrequency double
    Rotation frequency in days. Default value: 1 day.
    SecretName string
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    SecretType double
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    SsmProductSecretId string
    ID of the resource.
    Status string
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    Tags Dictionary<string, string>
    Tags of secret.
    UserNamePrefix string
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    CreateTime float64
    Credential creation time in UNIX timestamp format.
    Description string
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    Domains []string
    Domain name of the account in the form of IP. You can enter %.
    EnableRotation bool
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    InstanceId string
    Tencent Cloud service instance ID.
    KmsKeyId string
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    PrivilegesLists []SsmProductSecretPrivilegesListArgs
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    ProductName string
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    RotationBeginTime string
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    RotationFrequency float64
    Rotation frequency in days. Default value: 1 day.
    SecretName string
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    SecretType float64
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    SsmProductSecretId string
    ID of the resource.
    Status string
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    Tags map[string]string
    Tags of secret.
    UserNamePrefix string
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    createTime Double
    Credential creation time in UNIX timestamp format.
    description String
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    domains List<String>
    Domain name of the account in the form of IP. You can enter %.
    enableRotation Boolean
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    instanceId String
    Tencent Cloud service instance ID.
    kmsKeyId String
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    privilegesLists List<SsmProductSecretPrivilegesList>
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    productName String
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    rotationBeginTime String
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    rotationFrequency Double
    Rotation frequency in days. Default value: 1 day.
    secretName String
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    secretType Double
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    ssmProductSecretId String
    ID of the resource.
    status String
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    tags Map<String,String>
    Tags of secret.
    userNamePrefix String
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    createTime number
    Credential creation time in UNIX timestamp format.
    description string
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    domains string[]
    Domain name of the account in the form of IP. You can enter %.
    enableRotation boolean
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    instanceId string
    Tencent Cloud service instance ID.
    kmsKeyId string
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    privilegesLists SsmProductSecretPrivilegesList[]
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    productName string
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    rotationBeginTime string
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    rotationFrequency number
    Rotation frequency in days. Default value: 1 day.
    secretName string
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    secretType number
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    ssmProductSecretId string
    ID of the resource.
    status string
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    tags {[key: string]: string}
    Tags of secret.
    userNamePrefix string
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    create_time float
    Credential creation time in UNIX timestamp format.
    description str
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    domains Sequence[str]
    Domain name of the account in the form of IP. You can enter %.
    enable_rotation bool
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    instance_id str
    Tencent Cloud service instance ID.
    kms_key_id str
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    privileges_lists Sequence[SsmProductSecretPrivilegesListArgs]
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    product_name str
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    rotation_begin_time str
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    rotation_frequency float
    Rotation frequency in days. Default value: 1 day.
    secret_name str
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    secret_type float
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    ssm_product_secret_id str
    ID of the resource.
    status str
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    tags Mapping[str, str]
    Tags of secret.
    user_name_prefix str
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.
    createTime Number
    Credential creation time in UNIX timestamp format.
    description String
    Description, which is used to describe the purpose in detail and can contain up to 2,048 bytes.
    domains List<String>
    Domain name of the account in the form of IP. You can enter %.
    enableRotation Boolean
    Specifies whether to enable rotation, when secret status is Disabled, rotation will be disabled. True - enable, False - do not enable. If this parameter is not specified, False will be used by default.
    instanceId String
    Tencent Cloud service instance ID.
    kmsKeyId String
    Specifies the KMS CMK that encrypts the credential. If this parameter is left empty, the CMK created by Secrets Manager by default will be used for encryption.You can also specify a custom KMS CMK created in the same region for encryption.
    privilegesLists List<Property Map>
    List of permissions that need to be granted when the credential is bound to a Tencent Cloud service.
    productName String
    Name of the Tencent Cloud service bound to the credential, such as Mysql, Tdsql-mysql, Tdsql_C_Mysql. you can use dataSource tencentcloud.getSsmProducts to query supported products.
    rotationBeginTime String
    User-Defined rotation start time in the format of 2006-01-02 15:04:05.When EnableRotation is True, this parameter is required.
    rotationFrequency Number
    Rotation frequency in days. Default value: 1 day.
    secretName String
    Credential name, which must be unique in the same region. It can contain 128 bytes of letters, digits, hyphens, and underscores and must begin with a letter or digit.
    secretType Number
    0: user-defined secret. 1: Tencent Cloud services secret. 2: SSH key secret. 3: Tencent Cloud API key secret. Note: this field may return null, indicating that no valid values can be obtained.
    ssmProductSecretId String
    ID of the resource.
    status String
    Enable or Disable Secret. Valid values is Enabled or Disabled. Default is Enabled.
    tags Map<String>
    Tags of secret.
    userNamePrefix String
    Prefix of the user account name, which is specified by you and can contain up to 8 characters.Supported character sets include:Digits: [0, 9].Lowercase letters: [a, z].Uppercase letters: [A, Z].Special symbols: underscore.The prefix must begin with a letter.

    Supporting Types

    SsmProductSecretPrivilegesList, SsmProductSecretPrivilegesListArgs

    PrivilegeName string
    Permission name. Valid values: GlobalPrivileges, DatabasePrivileges, TablePrivileges, ColumnPrivileges. When the permission is DatabasePrivileges, the database name must be specified by the Database parameter; When the permission is TablePrivileges, the database name and the table name in the database must be specified by the Database and TableName parameters; When the permission is ColumnPrivileges, the database name, table name in the database, and column name in the table must be specified by the Database, TableName, and ColumnName parameters.
    Privileges List<string>
    Permission list. For the Mysql service, optional permission values are: 1. Valid values of GlobalPrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values of DatabasePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values of TablePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values of ColumnPrivileges: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission.
    ColumnName string
    This value takes effect only when PrivilegeName is ColumnPrivileges, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table.
    Database string
    This value takes effect only when PrivilegeName is DatabasePrivileges.
    TableName string
    This value takes effect only when PrivilegeName is TablePrivileges, and the Database parameter is required in this case to explicitly indicate the database instance.
    PrivilegeName string
    Permission name. Valid values: GlobalPrivileges, DatabasePrivileges, TablePrivileges, ColumnPrivileges. When the permission is DatabasePrivileges, the database name must be specified by the Database parameter; When the permission is TablePrivileges, the database name and the table name in the database must be specified by the Database and TableName parameters; When the permission is ColumnPrivileges, the database name, table name in the database, and column name in the table must be specified by the Database, TableName, and ColumnName parameters.
    Privileges []string
    Permission list. For the Mysql service, optional permission values are: 1. Valid values of GlobalPrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values of DatabasePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values of TablePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values of ColumnPrivileges: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission.
    ColumnName string
    This value takes effect only when PrivilegeName is ColumnPrivileges, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table.
    Database string
    This value takes effect only when PrivilegeName is DatabasePrivileges.
    TableName string
    This value takes effect only when PrivilegeName is TablePrivileges, and the Database parameter is required in this case to explicitly indicate the database instance.
    privilegeName String
    Permission name. Valid values: GlobalPrivileges, DatabasePrivileges, TablePrivileges, ColumnPrivileges. When the permission is DatabasePrivileges, the database name must be specified by the Database parameter; When the permission is TablePrivileges, the database name and the table name in the database must be specified by the Database and TableName parameters; When the permission is ColumnPrivileges, the database name, table name in the database, and column name in the table must be specified by the Database, TableName, and ColumnName parameters.
    privileges List<String>
    Permission list. For the Mysql service, optional permission values are: 1. Valid values of GlobalPrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values of DatabasePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values of TablePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values of ColumnPrivileges: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission.
    columnName String
    This value takes effect only when PrivilegeName is ColumnPrivileges, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table.
    database String
    This value takes effect only when PrivilegeName is DatabasePrivileges.
    tableName String
    This value takes effect only when PrivilegeName is TablePrivileges, and the Database parameter is required in this case to explicitly indicate the database instance.
    privilegeName string
    Permission name. Valid values: GlobalPrivileges, DatabasePrivileges, TablePrivileges, ColumnPrivileges. When the permission is DatabasePrivileges, the database name must be specified by the Database parameter; When the permission is TablePrivileges, the database name and the table name in the database must be specified by the Database and TableName parameters; When the permission is ColumnPrivileges, the database name, table name in the database, and column name in the table must be specified by the Database, TableName, and ColumnName parameters.
    privileges string[]
    Permission list. For the Mysql service, optional permission values are: 1. Valid values of GlobalPrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values of DatabasePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values of TablePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values of ColumnPrivileges: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission.
    columnName string
    This value takes effect only when PrivilegeName is ColumnPrivileges, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table.
    database string
    This value takes effect only when PrivilegeName is DatabasePrivileges.
    tableName string
    This value takes effect only when PrivilegeName is TablePrivileges, and the Database parameter is required in this case to explicitly indicate the database instance.
    privilege_name str
    Permission name. Valid values: GlobalPrivileges, DatabasePrivileges, TablePrivileges, ColumnPrivileges. When the permission is DatabasePrivileges, the database name must be specified by the Database parameter; When the permission is TablePrivileges, the database name and the table name in the database must be specified by the Database and TableName parameters; When the permission is ColumnPrivileges, the database name, table name in the database, and column name in the table must be specified by the Database, TableName, and ColumnName parameters.
    privileges Sequence[str]
    Permission list. For the Mysql service, optional permission values are: 1. Valid values of GlobalPrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values of DatabasePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values of TablePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values of ColumnPrivileges: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission.
    column_name str
    This value takes effect only when PrivilegeName is ColumnPrivileges, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table.
    database str
    This value takes effect only when PrivilegeName is DatabasePrivileges.
    table_name str
    This value takes effect only when PrivilegeName is TablePrivileges, and the Database parameter is required in this case to explicitly indicate the database instance.
    privilegeName String
    Permission name. Valid values: GlobalPrivileges, DatabasePrivileges, TablePrivileges, ColumnPrivileges. When the permission is DatabasePrivileges, the database name must be specified by the Database parameter; When the permission is TablePrivileges, the database name and the table name in the database must be specified by the Database and TableName parameters; When the permission is ColumnPrivileges, the database name, table name in the database, and column name in the table must be specified by the Database, TableName, and ColumnName parameters.
    privileges List<String>
    Permission list. For the Mysql service, optional permission values are: 1. Valid values of GlobalPrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, PROCESS, DROP,REFERENCES,INDEX,ALTER,SHOW DATABASES,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 2. Valid values of DatabasePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,EXECUTE,CREATE VIEW,SHOW VIEW,CREATE ROUTINE,ALTER ROUTINE,EVENT,TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 3. Valid values of TablePrivileges: SELECT,INSERT,UPDATE,DELETE,CREATE, DROP,REFERENCES,INDEX,ALTER,CREATE VIEW,SHOW VIEW, TRIGGER. Note: if this parameter is not passed in, it means to clear the permission. 4. Valid values of ColumnPrivileges: SELECT,INSERT,UPDATE,REFERENCES.Note: if this parameter is not passed in, it means to clear the permission.
    columnName String
    This value takes effect only when PrivilegeName is ColumnPrivileges, and the following parameters are required in this case:Database: explicitly indicate the database instance.TableName: explicitly indicate the table.
    database String
    This value takes effect only when PrivilegeName is DatabasePrivileges.
    tableName String
    This value takes effect only when PrivilegeName is TablePrivileges, and the Database parameter is required in this case to explicitly indicate the database instance.

    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