1. Packages
  2. Ibm Provider
  3. API Docs
  4. getMetricsRouterTargets
ibm 1.87.1 published on Wednesday, Jan 14, 2026 by ibm-cloud
ibm logo
ibm 1.87.1 published on Wednesday, Jan 14, 2026 by ibm-cloud

    Provides a read-only data source to retrieve information about metrics_router_targets. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const metricsRouterTargets = ibm.getMetricsRouterTargets({
        name: metricsRouterTargetInstance.name,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    metrics_router_targets = ibm.get_metrics_router_targets(name=metrics_router_target_instance["name"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetMetricsRouterTargets(ctx, &ibm.GetMetricsRouterTargetsArgs{
    			Name: pulumi.StringRef(metricsRouterTargetInstance.Name),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var metricsRouterTargets = Ibm.GetMetricsRouterTargets.Invoke(new()
        {
            Name = metricsRouterTargetInstance.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetMetricsRouterTargetsArgs;
    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 metricsRouterTargets = IbmFunctions.getMetricsRouterTargets(GetMetricsRouterTargetsArgs.builder()
                .name(metricsRouterTargetInstance.name())
                .build());
    
        }
    }
    
    variables:
      metricsRouterTargets:
        fn::invoke:
          function: ibm:getMetricsRouterTargets
          arguments:
            name: ${metricsRouterTargetInstance.name}
    

    Using getMetricsRouterTargets

    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 getMetricsRouterTargets(args: GetMetricsRouterTargetsArgs, opts?: InvokeOptions): Promise<GetMetricsRouterTargetsResult>
    function getMetricsRouterTargetsOutput(args: GetMetricsRouterTargetsOutputArgs, opts?: InvokeOptions): Output<GetMetricsRouterTargetsResult>
    def get_metrics_router_targets(id: Optional[str] = None,
                                   name: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetMetricsRouterTargetsResult
    def get_metrics_router_targets_output(id: Optional[pulumi.Input[str]] = None,
                                   name: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetMetricsRouterTargetsResult]
    func GetMetricsRouterTargets(ctx *Context, args *GetMetricsRouterTargetsArgs, opts ...InvokeOption) (*GetMetricsRouterTargetsResult, error)
    func GetMetricsRouterTargetsOutput(ctx *Context, args *GetMetricsRouterTargetsOutputArgs, opts ...InvokeOption) GetMetricsRouterTargetsResultOutput

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

    public static class GetMetricsRouterTargets 
    {
        public static Task<GetMetricsRouterTargetsResult> InvokeAsync(GetMetricsRouterTargetsArgs args, InvokeOptions? opts = null)
        public static Output<GetMetricsRouterTargetsResult> Invoke(GetMetricsRouterTargetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMetricsRouterTargetsResult> getMetricsRouterTargets(GetMetricsRouterTargetsArgs args, InvokeOptions options)
    public static Output<GetMetricsRouterTargetsResult> getMetricsRouterTargets(GetMetricsRouterTargetsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getMetricsRouterTargets:getMetricsRouterTargets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    Name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    Name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    name String
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    id str
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    name str
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    name String
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.

    getMetricsRouterTargets Result

    The following output properties are available:

    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    Targets List<GetMetricsRouterTargetsTarget>
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    Name string
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    Targets []GetMetricsRouterTargetsTarget
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    Name string
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    targets List<GetMetricsRouterTargetsTarget>
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    name String
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    targets GetMetricsRouterTargetsTarget[]
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    name string
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    id str
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    targets Sequence[GetMetricsRouterTargetsTarget]
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    name str
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    targets List<Property Map>
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    name String
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.

    Supporting Types

    GetMetricsRouterTargetsTarget

    CreatedAt string
    (String) The timestamp of the target creation time.
    Crn string
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    DestinationCrn string
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    ManagedBy string
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    Name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    TargetType string
    (String) The type of the target.

    • Constraints: Allowable values are: sysdig_monitor.
    UpdatedAt string
    (String) The timestamp of the target last updated time.
    CreatedAt string
    (String) The timestamp of the target creation time.
    Crn string
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    DestinationCrn string
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    ManagedBy string
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    Name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    TargetType string
    (String) The type of the target.

    • Constraints: Allowable values are: sysdig_monitor.
    UpdatedAt string
    (String) The timestamp of the target last updated time.
    createdAt String
    (String) The timestamp of the target creation time.
    crn String
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    destinationCrn String
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    managedBy String
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    name String
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region String
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    targetType String
    (String) The type of the target.

    • Constraints: Allowable values are: sysdig_monitor.
    updatedAt String
    (String) The timestamp of the target last updated time.
    createdAt string
    (String) The timestamp of the target creation time.
    crn string
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    destinationCrn string
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    managedBy string
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    targetType string
    (String) The type of the target.

    • Constraints: Allowable values are: sysdig_monitor.
    updatedAt string
    (String) The timestamp of the target last updated time.
    created_at str
    (String) The timestamp of the target creation time.
    crn str
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    destination_crn str
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    id str
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    managed_by str
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    name str
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region str
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    target_type str
    (String) The type of the target.

    • Constraints: Allowable values are: sysdig_monitor.
    updated_at str
    (String) The timestamp of the target last updated time.
    createdAt String
    (String) The timestamp of the target creation time.
    crn String
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    destinationCrn String
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    managedBy String
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    name String
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region String
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    targetType String
    (String) The type of the target.

    • Constraints: Allowable values are: sysdig_monitor.
    updatedAt String
    (String) The timestamp of the target last updated time.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.87.1 published on Wednesday, Jan 14, 2026 by ibm-cloud
      Meet Neo: Your AI Platform Teammate