1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. MonitorTmpInstance
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.MonitorTmpInstance

Explore with Pulumi AI

Provides a resource to create a monitor tmpInstance

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const subnet = new tencentcloud.Subnet("subnet", {
    vpcId: vpc.vpcId,
    availabilityZone: availabilityZone,
    cidrBlock: "10.0.1.0/24",
});
const example = new tencentcloud.MonitorTmpInstance("example", {
    instanceName: "tf-tmp-instance",
    vpcId: vpc.vpcId,
    subnetId: subnet.subnetId,
    dataRetentionTime: 30,
    zone: availabilityZone,
    tags: {
        createdBy: "terraform",
    },
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
    availability_zone = "ap-guangzhou-4"
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
subnet = tencentcloud.Subnet("subnet",
    vpc_id=vpc.vpc_id,
    availability_zone=availability_zone,
    cidr_block="10.0.1.0/24")
example = tencentcloud.MonitorTmpInstance("example",
    instance_name="tf-tmp-instance",
    vpc_id=vpc.vpc_id,
    subnet_id=subnet.subnet_id,
    data_retention_time=30,
    zone=availability_zone,
    tags={
        "createdBy": "terraform",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		availabilityZone := "ap-guangzhou-4"
		if param := cfg.Get("availabilityZone"); param != "" {
			availabilityZone = param
		}
		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{
			VpcId:            vpc.VpcId,
			AvailabilityZone: pulumi.String(availabilityZone),
			CidrBlock:        pulumi.String("10.0.1.0/24"),
		})
		if err != nil {
			return err
		}
		_, err = tencentcloud.NewMonitorTmpInstance(ctx, "example", &tencentcloud.MonitorTmpInstanceArgs{
			InstanceName:      pulumi.String("tf-tmp-instance"),
			VpcId:             vpc.VpcId,
			SubnetId:          subnet.SubnetId,
			DataRetentionTime: pulumi.Float64(30),
			Zone:              pulumi.String(availabilityZone),
			Tags: pulumi.StringMap{
				"createdBy": pulumi.String("terraform"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
    var vpc = new Tencentcloud.Vpc("vpc", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    var subnet = new Tencentcloud.Subnet("subnet", new()
    {
        VpcId = vpc.VpcId,
        AvailabilityZone = availabilityZone,
        CidrBlock = "10.0.1.0/24",
    });

    var example = new Tencentcloud.MonitorTmpInstance("example", new()
    {
        InstanceName = "tf-tmp-instance",
        VpcId = vpc.VpcId,
        SubnetId = subnet.SubnetId,
        DataRetentionTime = 30,
        Zone = availabilityZone,
        Tags = 
        {
            { "createdBy", "terraform" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.MonitorTmpInstance;
import com.pulumi.tencentcloud.MonitorTmpInstanceArgs;
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 config = ctx.config();
        final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
        var vpc = new Vpc("vpc", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        var subnet = new Subnet("subnet", SubnetArgs.builder()
            .vpcId(vpc.vpcId())
            .availabilityZone(availabilityZone)
            .cidrBlock("10.0.1.0/24")
            .build());

        var example = new MonitorTmpInstance("example", MonitorTmpInstanceArgs.builder()
            .instanceName("tf-tmp-instance")
            .vpcId(vpc.vpcId())
            .subnetId(subnet.subnetId())
            .dataRetentionTime(30)
            .zone(availabilityZone)
            .tags(Map.of("createdBy", "terraform"))
            .build());

    }
}
Copy
configuration:
  availabilityZone:
    type: string
    default: ap-guangzhou-4
resources:
  vpc:
    type: tencentcloud:Vpc
    properties:
      cidrBlock: 10.0.0.0/16
  subnet:
    type: tencentcloud:Subnet
    properties:
      vpcId: ${vpc.vpcId}
      availabilityZone: ${availabilityZone}
      cidrBlock: 10.0.1.0/24
  example:
    type: tencentcloud:MonitorTmpInstance
    properties:
      instanceName: tf-tmp-instance
      vpcId: ${vpc.vpcId}
      subnetId: ${subnet.subnetId}
      dataRetentionTime: 30
      zone: ${availabilityZone}
      tags:
        createdBy: terraform
Copy

Create MonitorTmpInstance Resource

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

Constructor syntax

new MonitorTmpInstance(name: string, args: MonitorTmpInstanceArgs, opts?: CustomResourceOptions);
@overload
def MonitorTmpInstance(resource_name: str,
                       args: MonitorTmpInstanceArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def MonitorTmpInstance(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       data_retention_time: Optional[float] = None,
                       instance_name: Optional[str] = None,
                       subnet_id: Optional[str] = None,
                       vpc_id: Optional[str] = None,
                       zone: Optional[str] = None,
                       monitor_tmp_instance_id: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None)
func NewMonitorTmpInstance(ctx *Context, name string, args MonitorTmpInstanceArgs, opts ...ResourceOption) (*MonitorTmpInstance, error)
public MonitorTmpInstance(string name, MonitorTmpInstanceArgs args, CustomResourceOptions? opts = null)
public MonitorTmpInstance(String name, MonitorTmpInstanceArgs args)
public MonitorTmpInstance(String name, MonitorTmpInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:MonitorTmpInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MonitorTmpInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MonitorTmpInstanceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MonitorTmpInstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MonitorTmpInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MonitorTmpInstanceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

DataRetentionTime This property is required. double
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
InstanceName This property is required. string
Instance name.
SubnetId This property is required. string
Subnet Id.
VpcId This property is required. string
Vpc Id.
Zone This property is required. string
Available zone.
MonitorTmpInstanceId string
ID of the resource.
Tags Dictionary<string, string>
Tag description list.
DataRetentionTime This property is required. float64
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
InstanceName This property is required. string
Instance name.
SubnetId This property is required. string
Subnet Id.
VpcId This property is required. string
Vpc Id.
Zone This property is required. string
Available zone.
MonitorTmpInstanceId string
ID of the resource.
Tags map[string]string
Tag description list.
dataRetentionTime This property is required. Double
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
instanceName This property is required. String
Instance name.
subnetId This property is required. String
Subnet Id.
vpcId This property is required. String
Vpc Id.
zone This property is required. String
Available zone.
monitorTmpInstanceId String
ID of the resource.
tags Map<String,String>
Tag description list.
dataRetentionTime This property is required. number
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
instanceName This property is required. string
Instance name.
subnetId This property is required. string
Subnet Id.
vpcId This property is required. string
Vpc Id.
zone This property is required. string
Available zone.
monitorTmpInstanceId string
ID of the resource.
tags {[key: string]: string}
Tag description list.
data_retention_time This property is required. float
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
instance_name This property is required. str
Instance name.
subnet_id This property is required. str
Subnet Id.
vpc_id This property is required. str
Vpc Id.
zone This property is required. str
Available zone.
monitor_tmp_instance_id str
ID of the resource.
tags Mapping[str, str]
Tag description list.
dataRetentionTime This property is required. Number
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
instanceName This property is required. String
Instance name.
subnetId This property is required. String
Subnet Id.
vpcId This property is required. String
Vpc Id.
zone This property is required. String
Available zone.
monitorTmpInstanceId String
ID of the resource.
tags Map<String>
Tag description list.

Outputs

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

ApiRootPath string
Prometheus HTTP API root address.
Id string
The provider-assigned unique ID for this managed resource.
Ipv4Address string
Instance IPv4 address.
ProxyAddress string
Proxy address.
RemoteWrite string
Prometheus remote write address.
ApiRootPath string
Prometheus HTTP API root address.
Id string
The provider-assigned unique ID for this managed resource.
Ipv4Address string
Instance IPv4 address.
ProxyAddress string
Proxy address.
RemoteWrite string
Prometheus remote write address.
apiRootPath String
Prometheus HTTP API root address.
id String
The provider-assigned unique ID for this managed resource.
ipv4Address String
Instance IPv4 address.
proxyAddress String
Proxy address.
remoteWrite String
Prometheus remote write address.
apiRootPath string
Prometheus HTTP API root address.
id string
The provider-assigned unique ID for this managed resource.
ipv4Address string
Instance IPv4 address.
proxyAddress string
Proxy address.
remoteWrite string
Prometheus remote write address.
api_root_path str
Prometheus HTTP API root address.
id str
The provider-assigned unique ID for this managed resource.
ipv4_address str
Instance IPv4 address.
proxy_address str
Proxy address.
remote_write str
Prometheus remote write address.
apiRootPath String
Prometheus HTTP API root address.
id String
The provider-assigned unique ID for this managed resource.
ipv4Address String
Instance IPv4 address.
proxyAddress String
Proxy address.
remoteWrite String
Prometheus remote write address.

Look up Existing MonitorTmpInstance Resource

Get an existing MonitorTmpInstance 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?: MonitorTmpInstanceState, opts?: CustomResourceOptions): MonitorTmpInstance
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_root_path: Optional[str] = None,
        data_retention_time: Optional[float] = None,
        instance_name: Optional[str] = None,
        ipv4_address: Optional[str] = None,
        monitor_tmp_instance_id: Optional[str] = None,
        proxy_address: Optional[str] = None,
        remote_write: Optional[str] = None,
        subnet_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        vpc_id: Optional[str] = None,
        zone: Optional[str] = None) -> MonitorTmpInstance
func GetMonitorTmpInstance(ctx *Context, name string, id IDInput, state *MonitorTmpInstanceState, opts ...ResourceOption) (*MonitorTmpInstance, error)
public static MonitorTmpInstance Get(string name, Input<string> id, MonitorTmpInstanceState? state, CustomResourceOptions? opts = null)
public static MonitorTmpInstance get(String name, Output<String> id, MonitorTmpInstanceState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:MonitorTmpInstance    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ApiRootPath string
Prometheus HTTP API root address.
DataRetentionTime double
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
InstanceName string
Instance name.
Ipv4Address string
Instance IPv4 address.
MonitorTmpInstanceId string
ID of the resource.
ProxyAddress string
Proxy address.
RemoteWrite string
Prometheus remote write address.
SubnetId string
Subnet Id.
Tags Dictionary<string, string>
Tag description list.
VpcId string
Vpc Id.
Zone string
Available zone.
ApiRootPath string
Prometheus HTTP API root address.
DataRetentionTime float64
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
InstanceName string
Instance name.
Ipv4Address string
Instance IPv4 address.
MonitorTmpInstanceId string
ID of the resource.
ProxyAddress string
Proxy address.
RemoteWrite string
Prometheus remote write address.
SubnetId string
Subnet Id.
Tags map[string]string
Tag description list.
VpcId string
Vpc Id.
Zone string
Available zone.
apiRootPath String
Prometheus HTTP API root address.
dataRetentionTime Double
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
instanceName String
Instance name.
ipv4Address String
Instance IPv4 address.
monitorTmpInstanceId String
ID of the resource.
proxyAddress String
Proxy address.
remoteWrite String
Prometheus remote write address.
subnetId String
Subnet Id.
tags Map<String,String>
Tag description list.
vpcId String
Vpc Id.
zone String
Available zone.
apiRootPath string
Prometheus HTTP API root address.
dataRetentionTime number
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
instanceName string
Instance name.
ipv4Address string
Instance IPv4 address.
monitorTmpInstanceId string
ID of the resource.
proxyAddress string
Proxy address.
remoteWrite string
Prometheus remote write address.
subnetId string
Subnet Id.
tags {[key: string]: string}
Tag description list.
vpcId string
Vpc Id.
zone string
Available zone.
api_root_path str
Prometheus HTTP API root address.
data_retention_time float
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
instance_name str
Instance name.
ipv4_address str
Instance IPv4 address.
monitor_tmp_instance_id str
ID of the resource.
proxy_address str
Proxy address.
remote_write str
Prometheus remote write address.
subnet_id str
Subnet Id.
tags Mapping[str, str]
Tag description list.
vpc_id str
Vpc Id.
zone str
Available zone.
apiRootPath String
Prometheus HTTP API root address.
dataRetentionTime Number
Data retention time(in days). Value range: 15, 30, 45, 90, 180, 360, 720.
instanceName String
Instance name.
ipv4Address String
Instance IPv4 address.
monitorTmpInstanceId String
ID of the resource.
proxyAddress String
Proxy address.
remoteWrite String
Prometheus remote write address.
subnetId String
Subnet Id.
tags Map<String>
Tag description list.
vpcId String
Vpc Id.
zone String
Available zone.

Import

monitor tmpInstance can be imported using the id, e.g.

$ pulumi import tencentcloud:index/monitorTmpInstance:MonitorTmpInstance example prom-1uvo0tjm
Copy

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.