1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ApmAssociationConfig
tencentcloud 1.82.45 published on Tuesday, Dec 16, 2025 by tencentcloudstack
tencentcloud logo
tencentcloud 1.82.45 published on Tuesday, Dec 16, 2025 by tencentcloudstack

    Provides a resource to create a APM association config

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ApmAssociationConfig("example", {
        instanceId: exampleTencentcloudApmInstance.id,
        productName: "Prometheus",
        status: 1,
        peerId: "prom-kx3eqdby",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ApmAssociationConfig("example",
        instance_id=example_tencentcloud_apm_instance["id"],
        product_name="Prometheus",
        status=1,
        peer_id="prom-kx3eqdby")
    
    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.NewApmAssociationConfig(ctx, "example", &tencentcloud.ApmAssociationConfigArgs{
    			InstanceId:  pulumi.Any(exampleTencentcloudApmInstance.Id),
    			ProductName: pulumi.String("Prometheus"),
    			Status:      pulumi.Float64(1),
    			PeerId:      pulumi.String("prom-kx3eqdby"),
    		})
    		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.ApmAssociationConfig("example", new()
        {
            InstanceId = exampleTencentcloudApmInstance.Id,
            ProductName = "Prometheus",
            Status = 1,
            PeerId = "prom-kx3eqdby",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ApmAssociationConfig;
    import com.pulumi.tencentcloud.ApmAssociationConfigArgs;
    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 ApmAssociationConfig("example", ApmAssociationConfigArgs.builder()
                .instanceId(exampleTencentcloudApmInstance.id())
                .productName("Prometheus")
                .status(1.0)
                .peerId("prom-kx3eqdby")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ApmAssociationConfig
        properties:
          instanceId: ${exampleTencentcloudApmInstance.id}
          productName: Prometheus
          status: 1
          peerId: prom-kx3eqdby
    

    Create ApmAssociationConfig Resource

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

    Constructor syntax

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

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

    InstanceId string
    Business system ID.
    ProductName string
    Associated product name. currently only supports Prometheus.
    Status double
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    ApmAssociationConfigId string
    ID of the resource.
    PeerId string
    Associated product instance ID.
    Topic string
    Specifies the CKafka message topic.
    InstanceId string
    Business system ID.
    ProductName string
    Associated product name. currently only supports Prometheus.
    Status float64
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    ApmAssociationConfigId string
    ID of the resource.
    PeerId string
    Associated product instance ID.
    Topic string
    Specifies the CKafka message topic.
    instanceId String
    Business system ID.
    productName String
    Associated product name. currently only supports Prometheus.
    status Double
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    apmAssociationConfigId String
    ID of the resource.
    peerId String
    Associated product instance ID.
    topic String
    Specifies the CKafka message topic.
    instanceId string
    Business system ID.
    productName string
    Associated product name. currently only supports Prometheus.
    status number
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    apmAssociationConfigId string
    ID of the resource.
    peerId string
    Associated product instance ID.
    topic string
    Specifies the CKafka message topic.
    instance_id str
    Business system ID.
    product_name str
    Associated product name. currently only supports Prometheus.
    status float
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    apm_association_config_id str
    ID of the resource.
    peer_id str
    Associated product instance ID.
    topic str
    Specifies the CKafka message topic.
    instanceId String
    Business system ID.
    productName String
    Associated product name. currently only supports Prometheus.
    status Number
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    apmAssociationConfigId String
    ID of the resource.
    peerId String
    Associated product instance ID.
    topic String
    Specifies the CKafka message topic.

    Outputs

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

    Get an existing ApmAssociationConfig 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?: ApmAssociationConfigState, opts?: CustomResourceOptions): ApmAssociationConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            apm_association_config_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            peer_id: Optional[str] = None,
            product_name: Optional[str] = None,
            status: Optional[float] = None,
            topic: Optional[str] = None) -> ApmAssociationConfig
    func GetApmAssociationConfig(ctx *Context, name string, id IDInput, state *ApmAssociationConfigState, opts ...ResourceOption) (*ApmAssociationConfig, error)
    public static ApmAssociationConfig Get(string name, Input<string> id, ApmAssociationConfigState? state, CustomResourceOptions? opts = null)
    public static ApmAssociationConfig get(String name, Output<String> id, ApmAssociationConfigState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ApmAssociationConfig    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:
    ApmAssociationConfigId string
    ID of the resource.
    InstanceId string
    Business system ID.
    PeerId string
    Associated product instance ID.
    ProductName string
    Associated product name. currently only supports Prometheus.
    Status double
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    Topic string
    Specifies the CKafka message topic.
    ApmAssociationConfigId string
    ID of the resource.
    InstanceId string
    Business system ID.
    PeerId string
    Associated product instance ID.
    ProductName string
    Associated product name. currently only supports Prometheus.
    Status float64
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    Topic string
    Specifies the CKafka message topic.
    apmAssociationConfigId String
    ID of the resource.
    instanceId String
    Business system ID.
    peerId String
    Associated product instance ID.
    productName String
    Associated product name. currently only supports Prometheus.
    status Double
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    topic String
    Specifies the CKafka message topic.
    apmAssociationConfigId string
    ID of the resource.
    instanceId string
    Business system ID.
    peerId string
    Associated product instance ID.
    productName string
    Associated product name. currently only supports Prometheus.
    status number
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    topic string
    Specifies the CKafka message topic.
    apm_association_config_id str
    ID of the resource.
    instance_id str
    Business system ID.
    peer_id str
    Associated product instance ID.
    product_name str
    Associated product name. currently only supports Prometheus.
    status float
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    topic str
    Specifies the CKafka message topic.
    apmAssociationConfigId String
    ID of the resource.
    instanceId String
    Business system ID.
    peerId String
    Associated product instance ID.
    productName String
    Associated product name. currently only supports Prometheus.
    status Number
    Status of the association relationship: // association status: 1 (enabled), 2 (disabled).
    topic String
    Specifies the CKafka message topic.

    Import

    APM association config can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/apmAssociationConfig:ApmAssociationConfig example apm-jPr5iQL77#Prometheus
    

    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.82.45 published on Tuesday, Dec 16, 2025 by tencentcloudstack
      Meet Neo: Your AI Platform Teammate