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

tencentcloud.TdcpgInstance

Explore with Pulumi AI

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

    Provides a resource to create a tdcpg instance.

    NOTE: This resource is still in internal testing. To experience its functions, you need to apply for a whitelist from Tencent Cloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const instance1 = new tencentcloud.TdcpgInstance("instance1", {
        clusterId: "cluster_id",
        cpu: 1,
        instanceName: "instance_name",
        memory: 1,
    });
    const instance2 = new tencentcloud.TdcpgInstance("instance2", {
        clusterId: "cluster_id",
        cpu: 1,
        instanceName: "instance_name",
        memory: 2,
        operationTiming: "IMMEDIATE",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    instance1 = tencentcloud.TdcpgInstance("instance1",
        cluster_id="cluster_id",
        cpu=1,
        instance_name="instance_name",
        memory=1)
    instance2 = tencentcloud.TdcpgInstance("instance2",
        cluster_id="cluster_id",
        cpu=1,
        instance_name="instance_name",
        memory=2,
        operation_timing="IMMEDIATE")
    
    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.NewTdcpgInstance(ctx, "instance1", &tencentcloud.TdcpgInstanceArgs{
    			ClusterId:    pulumi.String("cluster_id"),
    			Cpu:          pulumi.Float64(1),
    			InstanceName: pulumi.String("instance_name"),
    			Memory:       pulumi.Float64(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewTdcpgInstance(ctx, "instance2", &tencentcloud.TdcpgInstanceArgs{
    			ClusterId:       pulumi.String("cluster_id"),
    			Cpu:             pulumi.Float64(1),
    			InstanceName:    pulumi.String("instance_name"),
    			Memory:          pulumi.Float64(2),
    			OperationTiming: pulumi.String("IMMEDIATE"),
    		})
    		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 instance1 = new Tencentcloud.TdcpgInstance("instance1", new()
        {
            ClusterId = "cluster_id",
            Cpu = 1,
            InstanceName = "instance_name",
            Memory = 1,
        });
    
        var instance2 = new Tencentcloud.TdcpgInstance("instance2", new()
        {
            ClusterId = "cluster_id",
            Cpu = 1,
            InstanceName = "instance_name",
            Memory = 2,
            OperationTiming = "IMMEDIATE",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TdcpgInstance;
    import com.pulumi.tencentcloud.TdcpgInstanceArgs;
    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 instance1 = new TdcpgInstance("instance1", TdcpgInstanceArgs.builder()
                .clusterId("cluster_id")
                .cpu(1)
                .instanceName("instance_name")
                .memory(1)
                .build());
    
            var instance2 = new TdcpgInstance("instance2", TdcpgInstanceArgs.builder()
                .clusterId("cluster_id")
                .cpu(1)
                .instanceName("instance_name")
                .memory(2)
                .operationTiming("IMMEDIATE")
                .build());
    
        }
    }
    
    resources:
      instance1:
        type: tencentcloud:TdcpgInstance
        properties:
          clusterId: cluster_id
          cpu: 1
          instanceName: instance_name
          memory: 1
      instance2:
        type: tencentcloud:TdcpgInstance
        properties:
          clusterId: cluster_id
          cpu: 1
          instanceName: instance_name
          memory: 2
          operationTiming: IMMEDIATE
    

    Create TdcpgInstance Resource

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

    Constructor syntax

    new TdcpgInstance(name: string, args: TdcpgInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def TdcpgInstance(resource_name: str,
                      args: TdcpgInstanceArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def TdcpgInstance(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      cluster_id: Optional[str] = None,
                      cpu: Optional[float] = None,
                      memory: Optional[float] = None,
                      instance_name: Optional[str] = None,
                      operation_timing: Optional[str] = None,
                      tdcpg_instance_id: Optional[str] = None)
    func NewTdcpgInstance(ctx *Context, name string, args TdcpgInstanceArgs, opts ...ResourceOption) (*TdcpgInstance, error)
    public TdcpgInstance(string name, TdcpgInstanceArgs args, CustomResourceOptions? opts = null)
    public TdcpgInstance(String name, TdcpgInstanceArgs args)
    public TdcpgInstance(String name, TdcpgInstanceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TdcpgInstance
    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 TdcpgInstanceArgs
    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 TdcpgInstanceArgs
    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 TdcpgInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TdcpgInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TdcpgInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ClusterId string
    cluster id.
    Cpu double
    cpu cores.
    Memory double
    memory size.
    InstanceName string
    instance name.
    OperationTiming string
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    TdcpgInstanceId string
    ID of the resource.
    ClusterId string
    cluster id.
    Cpu float64
    cpu cores.
    Memory float64
    memory size.
    InstanceName string
    instance name.
    OperationTiming string
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    TdcpgInstanceId string
    ID of the resource.
    clusterId String
    cluster id.
    cpu Double
    cpu cores.
    memory Double
    memory size.
    instanceName String
    instance name.
    operationTiming String
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    tdcpgInstanceId String
    ID of the resource.
    clusterId string
    cluster id.
    cpu number
    cpu cores.
    memory number
    memory size.
    instanceName string
    instance name.
    operationTiming string
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    tdcpgInstanceId string
    ID of the resource.
    cluster_id str
    cluster id.
    cpu float
    cpu cores.
    memory float
    memory size.
    instance_name str
    instance name.
    operation_timing str
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    tdcpg_instance_id str
    ID of the resource.
    clusterId String
    cluster id.
    cpu Number
    cpu cores.
    memory Number
    memory size.
    instanceName String
    instance name.
    operationTiming String
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    tdcpgInstanceId String
    ID of the resource.

    Outputs

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

    Get an existing TdcpgInstance 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?: TdcpgInstanceState, opts?: CustomResourceOptions): TdcpgInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            cpu: Optional[float] = None,
            instance_name: Optional[str] = None,
            memory: Optional[float] = None,
            operation_timing: Optional[str] = None,
            tdcpg_instance_id: Optional[str] = None) -> TdcpgInstance
    func GetTdcpgInstance(ctx *Context, name string, id IDInput, state *TdcpgInstanceState, opts ...ResourceOption) (*TdcpgInstance, error)
    public static TdcpgInstance Get(string name, Input<string> id, TdcpgInstanceState? state, CustomResourceOptions? opts = null)
    public static TdcpgInstance get(String name, Output<String> id, TdcpgInstanceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TdcpgInstance    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:
    ClusterId string
    cluster id.
    Cpu double
    cpu cores.
    InstanceName string
    instance name.
    Memory double
    memory size.
    OperationTiming string
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    TdcpgInstanceId string
    ID of the resource.
    ClusterId string
    cluster id.
    Cpu float64
    cpu cores.
    InstanceName string
    instance name.
    Memory float64
    memory size.
    OperationTiming string
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    TdcpgInstanceId string
    ID of the resource.
    clusterId String
    cluster id.
    cpu Double
    cpu cores.
    instanceName String
    instance name.
    memory Double
    memory size.
    operationTiming String
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    tdcpgInstanceId String
    ID of the resource.
    clusterId string
    cluster id.
    cpu number
    cpu cores.
    instanceName string
    instance name.
    memory number
    memory size.
    operationTiming string
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    tdcpgInstanceId string
    ID of the resource.
    cluster_id str
    cluster id.
    cpu float
    cpu cores.
    instance_name str
    instance name.
    memory float
    memory size.
    operation_timing str
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    tdcpg_instance_id str
    ID of the resource.
    clusterId String
    cluster id.
    cpu Number
    cpu cores.
    instanceName String
    instance name.
    memory Number
    memory size.
    operationTiming String
    operation timing, optional value is IMMEDIATE or MAINTAIN_PERIOD.
    tdcpgInstanceId String
    ID of the resource.

    Import

    tdcpg instance can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/tdcpgInstance:TdcpgInstance instance cluster_id#instance_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