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

tencentcloud.MysqlSsl

Explore with Pulumi AI

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

    Provides a resource to create a mysql ssl

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const ssl = new tencentcloud.MysqlSsl("ssl", {
        instanceId: "cdb-j5rprr8n",
        status: "OFF",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    ssl = tencentcloud.MysqlSsl("ssl",
        instance_id="cdb-j5rprr8n",
        status="OFF")
    
    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.NewMysqlSsl(ctx, "ssl", &tencentcloud.MysqlSslArgs{
    			InstanceId: pulumi.String("cdb-j5rprr8n"),
    			Status:     pulumi.String("OFF"),
    		})
    		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 ssl = new Tencentcloud.MysqlSsl("ssl", new()
        {
            InstanceId = "cdb-j5rprr8n",
            Status = "OFF",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.MysqlSsl;
    import com.pulumi.tencentcloud.MysqlSslArgs;
    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 ssl = new MysqlSsl("ssl", MysqlSslArgs.builder()
                .instanceId("cdb-j5rprr8n")
                .status("OFF")
                .build());
    
        }
    }
    
    resources:
      ssl:
        type: tencentcloud:MysqlSsl
        properties:
          instanceId: cdb-j5rprr8n
          status: OFF
    

    Create MysqlSsl Resource

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

    Constructor syntax

    new MysqlSsl(name: string, args: MysqlSslArgs, opts?: CustomResourceOptions);
    @overload
    def MysqlSsl(resource_name: str,
                 args: MysqlSslArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def MysqlSsl(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 instance_id: Optional[str] = None,
                 status: Optional[str] = None,
                 mysql_ssl_id: Optional[str] = None)
    func NewMysqlSsl(ctx *Context, name string, args MysqlSslArgs, opts ...ResourceOption) (*MysqlSsl, error)
    public MysqlSsl(string name, MysqlSslArgs args, CustomResourceOptions? opts = null)
    public MysqlSsl(String name, MysqlSslArgs args)
    public MysqlSsl(String name, MysqlSslArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MysqlSsl
    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 MysqlSslArgs
    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 MysqlSslArgs
    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 MysqlSslArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MysqlSslArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MysqlSslArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    InstanceId string
    Instance ID. Example value: cdb-c1nl9rpv.
    Status string
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    MysqlSslId string
    ID of the resource.
    InstanceId string
    Instance ID. Example value: cdb-c1nl9rpv.
    Status string
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    MysqlSslId string
    ID of the resource.
    instanceId String
    Instance ID. Example value: cdb-c1nl9rpv.
    status String
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    mysqlSslId String
    ID of the resource.
    instanceId string
    Instance ID. Example value: cdb-c1nl9rpv.
    status string
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    mysqlSslId string
    ID of the resource.
    instance_id str
    Instance ID. Example value: cdb-c1nl9rpv.
    status str
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    mysql_ssl_id str
    ID of the resource.
    instanceId String
    Instance ID. Example value: cdb-c1nl9rpv.
    status String
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    mysqlSslId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Url string
    The certificate download link. Example value: http://testdownload.url.
    Id string
    The provider-assigned unique ID for this managed resource.
    Url string
    The certificate download link. Example value: http://testdownload.url.
    id String
    The provider-assigned unique ID for this managed resource.
    url String
    The certificate download link. Example value: http://testdownload.url.
    id string
    The provider-assigned unique ID for this managed resource.
    url string
    The certificate download link. Example value: http://testdownload.url.
    id str
    The provider-assigned unique ID for this managed resource.
    url str
    The certificate download link. Example value: http://testdownload.url.
    id String
    The provider-assigned unique ID for this managed resource.
    url String
    The certificate download link. Example value: http://testdownload.url.

    Look up Existing MysqlSsl Resource

    Get an existing MysqlSsl 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?: MysqlSslState, opts?: CustomResourceOptions): MysqlSsl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            instance_id: Optional[str] = None,
            mysql_ssl_id: Optional[str] = None,
            status: Optional[str] = None,
            url: Optional[str] = None) -> MysqlSsl
    func GetMysqlSsl(ctx *Context, name string, id IDInput, state *MysqlSslState, opts ...ResourceOption) (*MysqlSsl, error)
    public static MysqlSsl Get(string name, Input<string> id, MysqlSslState? state, CustomResourceOptions? opts = null)
    public static MysqlSsl get(String name, Output<String> id, MysqlSslState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MysqlSsl    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:
    InstanceId string
    Instance ID. Example value: cdb-c1nl9rpv.
    MysqlSslId string
    ID of the resource.
    Status string
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    Url string
    The certificate download link. Example value: http://testdownload.url.
    InstanceId string
    Instance ID. Example value: cdb-c1nl9rpv.
    MysqlSslId string
    ID of the resource.
    Status string
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    Url string
    The certificate download link. Example value: http://testdownload.url.
    instanceId String
    Instance ID. Example value: cdb-c1nl9rpv.
    mysqlSslId String
    ID of the resource.
    status String
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    url String
    The certificate download link. Example value: http://testdownload.url.
    instanceId string
    Instance ID. Example value: cdb-c1nl9rpv.
    mysqlSslId string
    ID of the resource.
    status string
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    url string
    The certificate download link. Example value: http://testdownload.url.
    instance_id str
    Instance ID. Example value: cdb-c1nl9rpv.
    mysql_ssl_id str
    ID of the resource.
    status str
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    url str
    The certificate download link. Example value: http://testdownload.url.
    instanceId String
    Instance ID. Example value: cdb-c1nl9rpv.
    mysqlSslId String
    ID of the resource.
    status String
    Whether to enable SSL. ON means enabled, OFF means not enabled.
    url String
    The certificate download link. Example value: http://testdownload.url.

    Import

    mysql ssl can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/mysqlSsl:MysqlSsl ssl instanceId
    

    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