1. Packages
  2. Ibm Provider
  3. API Docs
  4. getMetricsRouterTargets
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getMetricsRouterTargets

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const metricsRouterTargets = ibm.getMetricsRouterTargets({
        name: ibm_metrics_router_target.metrics_router_target.name,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    metrics_router_targets = ibm.get_metrics_router_targets(name=ibm_metrics_router_target["metrics_router_target"]["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(ibm_metrics_router_target.Metrics_router_target.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 = ibm_metrics_router_target.Metrics_router_target.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(ibm_metrics_router_target.metrics_router_target().name())
                .build());
    
        }
    }
    
    variables:
      metricsRouterTargets:
        fn::invoke:
          function: ibm:getMetricsRouterTargets
          arguments:
            name: ${ibm_metrics_router_target.metrics_router_target.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.
    Name string
    The name of the target resource.
    Id string
    (String) The UUID of the target resource.
    Name string
    The name of the target resource.
    id String
    (String) The UUID of the target resource.
    name String
    The name of the target resource.
    id string
    (String) The UUID of the target resource.
    name string
    The name of the target resource.
    id str
    (String) The UUID of the target resource.
    name str
    The name of the target resource.
    id String
    (String) The UUID of the target resource.
    name String
    The name of the target resource.

    getMetricsRouterTargets Result

    The following output properties are available:

    Id string
    (String) The UUID of the target resource.
    Targets List<GetMetricsRouterTargetsTarget>
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested scheme for targets:
    Name string
    (String) The name of the target resource.
    Id string
    (String) The UUID of the target resource.
    Targets []GetMetricsRouterTargetsTarget
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested scheme for targets:
    Name string
    (String) The name of the target resource.
    id String
    (String) The UUID of the target resource.
    targets List<GetMetricsRouterTargetsTarget>
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested scheme for targets:
    name String
    (String) The name of the target resource.
    id string
    (String) The UUID of the target resource.
    targets GetMetricsRouterTargetsTarget[]
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested scheme for targets:
    name string
    (String) The name of the target resource.
    id str
    (String) The UUID of the target resource.
    targets Sequence[GetMetricsRouterTargetsTarget]
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested scheme for targets:
    name str
    (String) The name of the target resource.
    id String
    (String) The UUID of the target resource.
    targets List<Property Map>
    (List) A list of target resources.

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

    Supporting Types

    GetMetricsRouterTargetsTarget

    CreatedAt string
    (String) The timestamp of the target creation time.
    Crn string
    (String) The crn of the target resource.
    DestinationCrn string
    (String) The CRN of the destination service instance or resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. Read S2S 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.
    Name string
    The name of the target resource.
    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.
    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.
    DestinationCrn string
    (String) The CRN of the destination service instance or resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. Read S2S 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.
    Name string
    The name of the target resource.
    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.
    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.
    destinationCrn String
    (String) The CRN of the destination service instance or resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. Read S2S 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.
    name String
    The name of the target resource.
    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.
    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.
    destinationCrn string
    (String) The CRN of the destination service instance or resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. Read S2S 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.
    name string
    The name of the target resource.
    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.
    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.
    destination_crn str
    (String) The CRN of the destination service instance or resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. Read S2S 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.
    name str
    The name of the target resource.
    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.
    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.
    destinationCrn String
    (String) The CRN of the destination service instance or resource. Ensure you have a service authorization between IBM Cloud Metrics Routing and your Cloud resource. Read S2S 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.
    name String
    The name of the target resource.
    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.
    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.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud