1. Registry
  2. Packages
  3. Dynatrace
  4. API Docs
  5. getHubExtensionV2Configs
Viewing docs for Dynatrace v0.45.0
published on Thursday, Nov 5, 2026 by Pulumiverse
dynatrace logo Dynatrace
Viewing docs for Dynatrace v0.45.0
published on Thursday, Nov 5, 2026 by Pulumiverse

    This resource requires the OAuth scopes extensions:configurations:read, and extensions:definitions:read.

    The dynatrace.getHubExtensionV2Configs data source retrieves all matching monitoring configurations of an extension.

    Dynatrace Documentation

    • Extensions 2.0 - https://docs.dynatrace.com/docs/ingest-from/extensions

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@pulumiverse/dynatrace";
    import * as std from "@pulumi/std";
    
    const config1 = dynatrace.getHubExtensionV2Configs({
        name: "com.dynatrace.extension.wmi.iis",
        description: "#name#",
        version: "1.1.1",
        activationContext: "LOCAL",
    });
    const config2 = dynatrace.getHubExtensionV2Configs({
        name: "com.dynatrace.extension.wmi.iis",
        description: "#name#-2",
        version: "2.0.1",
        activationContext: "LOCAL",
    });
    export const description1 = config1.then(config1 => std.jsondecode({
        input: config1.items?.[0]?.value,
    })).then(invoke => invoke.result?.description);
    export const description2 = config2.then(config2 => std.jsondecode({
        input: config2.items?.[0]?.value,
    })).then(invoke => invoke.result?.description);
    const config1HubExtensionV2Config = new dynatrace.HubExtensionV2Config("config1", {
        name: "com.dynatrace.extension.wmi.iis",
        scope: "environment",
        value: JSON.stringify({
            enabled: true,
            description: "#name#",
            version: "1.1.1",
            featureSets: ["IIS Extended Request Metrics"],
            vars: {},
            activationContext: "LOCAL",
            activationTags: [],
        }),
    });
    const config2HubExtensionV2Config = new dynatrace.HubExtensionV2Config("config2", {
        name: "com.dynatrace.extension.wmi.iis",
        scope: "environment",
        value: JSON.stringify({
            enabled: false,
            description: "#name#-2",
            version: "2.0.1",
            featureSets: ["IIS Extended Request Metrics"],
            vars: {
                iis_app_pool: "Name != '_Total'",
                iis_site: "Name != '_Total'",
            },
            activationContext: "LOCAL",
            activationTags: [],
        }),
    });
    
    import pulumi
    import json
    import pulumi_dynatrace as dynatrace
    import pulumi_std as std
    import pulumiverse_dynatrace as dynatrace
    
    config1 = dynatrace.get_hub_extension_v2_configs(name="com.dynatrace.extension.wmi.iis",
        description="#name#",
        version="1.1.1",
        activation_context="LOCAL")
    config2 = dynatrace.get_hub_extension_v2_configs(name="com.dynatrace.extension.wmi.iis",
        description="#name#-2",
        version="2.0.1",
        activation_context="LOCAL")
    pulumi.export("description1", std.jsondecode(input=config1.items[0].value).result["description"])
    pulumi.export("description2", std.jsondecode(input=config2.items[0].value).result["description"])
    config1_hub_extension_v2_config = dynatrace.HubExtensionV2Config("config1",
        name="com.dynatrace.extension.wmi.iis",
        scope="environment",
        value=json.dumps({
            "enabled": True,
            "description": "#name#",
            "version": "1.1.1",
            "featureSets": ["IIS Extended Request Metrics"],
            "vars": {},
            "activationContext": "LOCAL",
            "activationTags": [],
        }))
    config2_hub_extension_v2_config = dynatrace.HubExtensionV2Config("config2",
        name="com.dynatrace.extension.wmi.iis",
        scope="environment",
        value=json.dumps({
            "enabled": False,
            "description": "#name#-2",
            "version": "2.0.1",
            "featureSets": ["IIS Extended Request Metrics"],
            "vars": {
                "iis_app_pool": "Name != '_Total'",
                "iis_site": "Name != '_Total'",
            },
            "activationContext": "LOCAL",
            "activationTags": [],
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-std/sdk/v2/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		config1, err := dynatrace.GetHubExtensionV2Configs(ctx, &dynatrace.GetHubExtensionV2ConfigsArgs{
    			Name:              "com.dynatrace.extension.wmi.iis",
    			Description:       pulumi.StringRef("#name#"),
    			Version:           pulumi.StringRef("1.1.1"),
    			ActivationContext: pulumi.StringRef("LOCAL"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		config2, err := dynatrace.GetHubExtensionV2Configs(ctx, &dynatrace.GetHubExtensionV2ConfigsArgs{
    			Name:              "com.dynatrace.extension.wmi.iis",
    			Description:       pulumi.StringRef("#name#-2"),
    			Version:           pulumi.StringRef("2.0.1"),
    			ActivationContext: pulumi.StringRef("LOCAL"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("description1", pulumi.Any(std.Jsondecode(ctx, &std.JsondecodeArgs{
    			Input: config1.Items[0].Value,
    		}, nil).Result.Description))
    		ctx.Export("description2", pulumi.Any(std.Jsondecode(ctx, &std.JsondecodeArgs{
    			Input: config2.Items[0].Value,
    		}, nil).Result.Description))
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"enabled":     true,
    			"description": "#name#",
    			"version":     "1.1.1",
    			"featureSets": []string{
    				"IIS Extended Request Metrics",
    			},
    			"vars":              map[string]interface{}{},
    			"activationContext": "LOCAL",
    			"activationTags":    []interface{}{},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = dynatrace.NewHubExtensionV2Config(ctx, "config1", &dynatrace.HubExtensionV2ConfigArgs{
    			Name:  pulumi.String("com.dynatrace.extension.wmi.iis"),
    			Scope: pulumi.String("environment"),
    			Value: pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON1, err := json.Marshal(map[string]interface{}{
    			"enabled":     false,
    			"description": "#name#-2",
    			"version":     "2.0.1",
    			"featureSets": []string{
    				"IIS Extended Request Metrics",
    			},
    			"vars": map[string]string{
    				"iis_app_pool": "Name != '_Total'",
    				"iis_site":     "Name != '_Total'",
    			},
    			"activationContext": "LOCAL",
    			"activationTags":    []interface{}{},
    		})
    		if err != nil {
    			return err
    		}
    		json1 := string(tmpJSON1)
    		_, err = dynatrace.NewHubExtensionV2Config(ctx, "config2", &dynatrace.HubExtensionV2ConfigArgs{
    			Name:  pulumi.String("com.dynatrace.extension.wmi.iis"),
    			Scope: pulumi.String("environment"),
    			Value: pulumi.String(json1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Dynatrace = Pulumiverse.Dynatrace;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var config1 = Dynatrace.GetHubExtensionV2Configs.Invoke(new()
        {
            Name = "com.dynatrace.extension.wmi.iis",
            Description = "#name#",
            Version = "1.1.1",
            ActivationContext = "LOCAL",
        });
    
        var config2 = Dynatrace.GetHubExtensionV2Configs.Invoke(new()
        {
            Name = "com.dynatrace.extension.wmi.iis",
            Description = "#name#-2",
            Version = "2.0.1",
            ActivationContext = "LOCAL",
        });
    
        var config1HubExtensionV2Config = new Dynatrace.HubExtensionV2Config("config1", new()
        {
            Name = "com.dynatrace.extension.wmi.iis",
            Scope = "environment",
            Value = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["enabled"] = true,
                ["description"] = "#name#",
                ["version"] = "1.1.1",
                ["featureSets"] = new[]
                {
                    "IIS Extended Request Metrics",
                },
                ["vars"] = new Dictionary<string, object?>
                {
                },
                ["activationContext"] = "LOCAL",
                ["activationTags"] = new[]
                {
                },
            }),
        });
    
        var config2HubExtensionV2Config = new Dynatrace.HubExtensionV2Config("config2", new()
        {
            Name = "com.dynatrace.extension.wmi.iis",
            Scope = "environment",
            Value = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["enabled"] = false,
                ["description"] = "#name#-2",
                ["version"] = "2.0.1",
                ["featureSets"] = new[]
                {
                    "IIS Extended Request Metrics",
                },
                ["vars"] = new Dictionary<string, object?>
                {
                    ["iis_app_pool"] = "Name != '_Total'",
                    ["iis_site"] = "Name != '_Total'",
                },
                ["activationContext"] = "LOCAL",
                ["activationTags"] = new[]
                {
                },
            }),
        });
    
        return new Dictionary<string, object?>
        {
            ["description1"] = Std.Jsondecode.Invoke(new()
            {
                Input = config1.Apply(getHubExtensionV2ConfigsResult => getHubExtensionV2ConfigsResult.Items[0]?.Value),
            }).Apply(invoke => invoke.Result?.Description),
            ["description2"] = Std.Jsondecode.Invoke(new()
            {
                Input = config2.Apply(getHubExtensionV2ConfigsResult => getHubExtensionV2ConfigsResult.Items[0]?.Value),
            }).Apply(invoke => invoke.Result?.Description),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dynatrace.DynatraceFunctions;
    import com.pulumi.dynatrace.inputs.GetHubExtensionV2ConfigsArgs;
    import com.pulumi.std.StdFunctions;
    import com.pulumi.std.inputs.JsondecodeArgs;
    import com.pulumi.dynatrace.HubExtensionV2Config;
    import com.pulumi.dynatrace.HubExtensionV2ConfigArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 config1 = DynatraceFunctions.getHubExtensionV2Configs(GetHubExtensionV2ConfigsArgs.builder()
                .name("com.dynatrace.extension.wmi.iis")
                .description("#name#")
                .version("1.1.1")
                .activationContext("LOCAL")
                .build());
    
            final var config2 = DynatraceFunctions.getHubExtensionV2Configs(GetHubExtensionV2ConfigsArgs.builder()
                .name("com.dynatrace.extension.wmi.iis")
                .description("#name#-2")
                .version("2.0.1")
                .activationContext("LOCAL")
                .build());
    
            ctx.export("description1", StdFunctions.jsondecode(JsondecodeArgs.builder()
                .input(config1.items()[0].value())
                .build()).result().description());
            ctx.export("description2", StdFunctions.jsondecode(JsondecodeArgs.builder()
                .input(config2.items()[0].value())
                .build()).result().description());
            var config1HubExtensionV2Config = new HubExtensionV2Config("config1HubExtensionV2Config", HubExtensionV2ConfigArgs.builder()
                .name("com.dynatrace.extension.wmi.iis")
                .scope("environment")
                .value(serializeJson(
                    jsonObject(
                        jsonProperty("enabled", true),
                        jsonProperty("description", "#name#"),
                        jsonProperty("version", "1.1.1"),
                        jsonProperty("featureSets", jsonArray("IIS Extended Request Metrics")),
                        jsonProperty("vars", jsonObject(
    
                        )),
                        jsonProperty("activationContext", "LOCAL"),
                        jsonProperty("activationTags", jsonArray(
                        ))
                    )))
                .build());
    
            var config2HubExtensionV2Config = new HubExtensionV2Config("config2HubExtensionV2Config", HubExtensionV2ConfigArgs.builder()
                .name("com.dynatrace.extension.wmi.iis")
                .scope("environment")
                .value(serializeJson(
                    jsonObject(
                        jsonProperty("enabled", false),
                        jsonProperty("description", "#name#-2"),
                        jsonProperty("version", "2.0.1"),
                        jsonProperty("featureSets", jsonArray("IIS Extended Request Metrics")),
                        jsonProperty("vars", jsonObject(
                            jsonProperty("iis_app_pool", "Name != '_Total'"),
                            jsonProperty("iis_site", "Name != '_Total'")
                        )),
                        jsonProperty("activationContext", "LOCAL"),
                        jsonProperty("activationTags", jsonArray(
                        ))
                    )))
                .build());
    
        }
    }
    
    resources:
      config1HubExtensionV2Config:
        type: dynatrace:HubExtensionV2Config
        name: config1
        properties:
          name: com.dynatrace.extension.wmi.iis
          scope: environment
          value:
            fn::toJSON:
              enabled: true
              description: '#name#'
              version: 1.1.1
              featureSets:
                - IIS Extended Request Metrics
              vars: {}
              activationContext: LOCAL
              activationTags: []
      config2HubExtensionV2Config:
        type: dynatrace:HubExtensionV2Config
        name: config2
        properties:
          name: com.dynatrace.extension.wmi.iis
          scope: environment
          value:
            fn::toJSON:
              enabled: false
              description: '#name#-2'
              version: 2.0.1
              featureSets:
                - IIS Extended Request Metrics
              vars:
                iis_app_pool: Name != '_Total'
                iis_site: Name != '_Total'
              activationContext: LOCAL
              activationTags: []
    variables:
      config1:
        fn::invoke:
          function: dynatrace:getHubExtensionV2Configs
          arguments:
            name: com.dynatrace.extension.wmi.iis
            description: '#name#'
            version: 1.1.1
            activationContext: LOCAL
      config2:
        fn::invoke:
          function: dynatrace:getHubExtensionV2Configs
          arguments:
            name: com.dynatrace.extension.wmi.iis
            description: '#name#-2'
            version: 2.0.1
            activationContext: LOCAL
    outputs:
      description1:
        fn::invoke:
          function: std:jsondecode
          arguments:
            input: ${config1.items[0].value}
          return: result.description
      description2:
        fn::invoke:
          function: std:jsondecode
          arguments:
            input: ${config2.items[0].value}
          return: result.description
    
    terraform {
      required_providers {
        dynatrace = {
          source = "pulumi/dynatrace"
        }
        std = {
          source = "pulumi/std"
        }
      }
    }
    
    data "dynatrace_hub_extension_v2_configs" "config1" {
      name               = "com.dynatrace.extension.wmi.iis"
      description        = "#name#"
      version            = "1.1.1"
      activation_context = "LOCAL"
    }
    data "dynatrace_hub_extension_v2_configs" "config2" {
      name               = "com.dynatrace.extension.wmi.iis"
      description        = "#name#-2"
      version            = "2.0.1"
      activation_context = "LOCAL"
    }
    
    resource "dynatrace_hub_extension_v2_config" "config1" {
      lifecycle {
        create_before_destroy = true
      }
      name  = "com.dynatrace.extension.wmi.iis"
      scope = "environment"
      value = jsonencode({
        "enabled"           = true
        "description"       = "#name#"
        "version"           = "1.1.1"
        "featureSets"       = ["IIS Extended Request Metrics"]
        "vars"              = {}
        "activationContext" = "LOCAL"
        "activationTags"    = []
      })
    }
    resource "dynatrace_hub_extension_v2_config" "config2" {
      lifecycle {
        create_before_destroy = true
      }
      name  = "com.dynatrace.extension.wmi.iis"
      scope = "environment"
      value = jsonencode({
        "enabled"     = false
        "description" = "#name#-2"
        "version"     = "2.0.1"
        "featureSets" = ["IIS Extended Request Metrics"]
        "vars" = {
          "iis_app_pool" = "Name != '_Total'"
          "iis_site"     = "Name != '_Total'"
        }
        "activationContext" = "LOCAL"
        "activationTags"    = []
      })
    }
    output "description1" {
      value = jsondecode(data.dynatrace_hub_extension_v2_configs.config1.items[0].value).description
    }
    output "description2" {
      value = jsondecode(data.dynatrace_hub_extension_v2_configs.config2.items[0].value).description
    }
    

    Using getHubExtensionV2Configs

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getHubExtensionV2Configs(args: GetHubExtensionV2ConfigsArgs, opts?: InvokeOptions): Promise<GetHubExtensionV2ConfigsResult>
    function getHubExtensionV2ConfigsOutput(args: GetHubExtensionV2ConfigsOutputArgs, opts?: InvokeOutputOptions): Output<GetHubExtensionV2ConfigsResult>
    def get_hub_extension_v2_configs(activation_context: Optional[str] = None,
                                     description: Optional[str] = None,
                                     name: Optional[str] = None,
                                     version: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetHubExtensionV2ConfigsResult
    def get_hub_extension_v2_configs_output(activation_context: pulumi.Input[Optional[str]] = None,
                                     description: pulumi.Input[Optional[str]] = None,
                                     name: pulumi.Input[Optional[str]] = None,
                                     version: pulumi.Input[Optional[str]] = None,
                                     opts: Optional[InvokeOutputOptions] = None) -> Output[GetHubExtensionV2ConfigsResult]
    func GetHubExtensionV2Configs(ctx *Context, args *GetHubExtensionV2ConfigsArgs, opts ...InvokeOption) (*GetHubExtensionV2ConfigsResult, error)
    func GetHubExtensionV2ConfigsOutput(ctx *Context, args *GetHubExtensionV2ConfigsOutputArgs, opts ...InvokeOption) GetHubExtensionV2ConfigsResultOutput

    > Note: This function is named GetHubExtensionV2Configs in the Go SDK.

    public static class GetHubExtensionV2Configs 
    {
        public static Task<GetHubExtensionV2ConfigsResult> InvokeAsync(GetHubExtensionV2ConfigsArgs args, InvokeOptions? opts = null)
        public static Output<GetHubExtensionV2ConfigsResult> Invoke(GetHubExtensionV2ConfigsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetHubExtensionV2ConfigsResult> Invoke(GetHubExtensionV2ConfigsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetHubExtensionV2ConfigsResult> getHubExtensionV2Configs(GetHubExtensionV2ConfigsArgs args, InvokeOptions options)
    public static Output<GetHubExtensionV2ConfigsResult> getHubExtensionV2Configs(GetHubExtensionV2ConfigsArgs args, InvokeOptions options)
    public static Output<GetHubExtensionV2ConfigsResult> getHubExtensionV2Configs(GetHubExtensionV2ConfigsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: dynatrace:index/getHubExtensionV2Configs:getHubExtensionV2Configs
      arguments:
        # arguments dictionary
    data "dynatrace_get_hub_extension_v2_configs" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The name of the extension
    ActivationContext string
    The activation context of the configuration
    Description string
    The description of the configuration
    Version string
    The extension version of the configuration
    Name string
    The name of the extension
    ActivationContext string
    The activation context of the configuration
    Description string
    The description of the configuration
    Version string
    The extension version of the configuration
    name string
    The name of the extension
    activation_context string
    The activation context of the configuration
    description string
    The description of the configuration
    version string
    The extension version of the configuration
    name String
    The name of the extension
    activationContext String
    The activation context of the configuration
    description String
    The description of the configuration
    version String
    The extension version of the configuration
    name string
    The name of the extension
    activationContext string
    The activation context of the configuration
    description string
    The description of the configuration
    version string
    The extension version of the configuration
    name str
    The name of the extension
    activation_context str
    The activation context of the configuration
    description str
    The description of the configuration
    version str
    The extension version of the configuration
    name String
    The name of the extension
    activationContext String
    The activation context of the configuration
    description String
    The description of the configuration
    version String
    The extension version of the configuration

    getHubExtensionV2Configs Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<Pulumiverse.Dynatrace.Outputs.GetHubExtensionV2ConfigsItem>
    An array of the found configurations
    Name string
    The name of the extension
    ActivationContext string
    The activation context of the configuration
    Description string
    The description of the configuration
    Version string
    The extension version of the configuration
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetHubExtensionV2ConfigsItem
    An array of the found configurations
    Name string
    The name of the extension
    ActivationContext string
    The activation context of the configuration
    Description string
    The description of the configuration
    Version string
    The extension version of the configuration
    id string
    The provider-assigned unique ID for this managed resource.
    items list(object)
    An array of the found configurations
    name string
    The name of the extension
    activation_context string
    The activation context of the configuration
    description string
    The description of the configuration
    version string
    The extension version of the configuration
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetHubExtensionV2ConfigsItem>
    An array of the found configurations
    name String
    The name of the extension
    activationContext String
    The activation context of the configuration
    description String
    The description of the configuration
    version String
    The extension version of the configuration
    id string
    The provider-assigned unique ID for this managed resource.
    items GetHubExtensionV2ConfigsItem[]
    An array of the found configurations
    name string
    The name of the extension
    activationContext string
    The activation context of the configuration
    description string
    The description of the configuration
    version string
    The extension version of the configuration
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[GetHubExtensionV2ConfigsItem]
    An array of the found configurations
    name str
    The name of the extension
    activation_context str
    The activation context of the configuration
    description str
    The description of the configuration
    version str
    The extension version of the configuration
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    An array of the found configurations
    name String
    The name of the extension
    activationContext String
    The activation context of the configuration
    description String
    The description of the configuration
    version String
    The extension version of the configuration

    Supporting Types

    GetHubExtensionV2ConfigsItem

    Id string
    The ID of the configuration
    Scope string
    The scope this monitoring configuration will be defined for
    Value string
    The JSON encoded value for this monitoring configuration
    Id string
    The ID of the configuration
    Scope string
    The scope this monitoring configuration will be defined for
    Value string
    The JSON encoded value for this monitoring configuration
    id string
    The ID of the configuration
    scope string
    The scope this monitoring configuration will be defined for
    value string
    The JSON encoded value for this monitoring configuration
    id String
    The ID of the configuration
    scope String
    The scope this monitoring configuration will be defined for
    value String
    The JSON encoded value for this monitoring configuration
    id string
    The ID of the configuration
    scope string
    The scope this monitoring configuration will be defined for
    value string
    The JSON encoded value for this monitoring configuration
    id str
    The ID of the configuration
    scope str
    The scope this monitoring configuration will be defined for
    value str
    The JSON encoded value for this monitoring configuration
    id String
    The ID of the configuration
    scope String
    The scope this monitoring configuration will be defined for
    value String
    The JSON encoded value for this monitoring configuration

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo Dynatrace
    Viewing docs for Dynatrace v0.45.0
    published on Thursday, Nov 5, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial