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

ibm.MetricsRouterRoute

Explore with Pulumi AI

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

    Provides a resource for metrics_router_route. This allows metrics_router_route to be created, updated and deleted.

    Example Usage

    Example for a single rule and single inclusion_filter

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const metricsRouterRouteInstance = new ibm.MetricsRouterRoute("metricsRouterRouteInstance", {rules: [{
        action: "send",
        inclusionFilters: [{
            operand: "location",
            operator: "is",
            values: ["us-south"],
        }],
        targets: [{
            id: "c3af557f-fb0e-4476-85c3-0889e7fe7bc4",
        }],
    }]});
    
    import pulumi
    import pulumi_ibm as ibm
    
    metrics_router_route_instance = ibm.MetricsRouterRoute("metricsRouterRouteInstance", rules=[{
        "action": "send",
        "inclusion_filters": [{
            "operand": "location",
            "operator": "is",
            "values": ["us-south"],
        }],
        "targets": [{
            "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4",
        }],
    }])
    
    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.NewMetricsRouterRoute(ctx, "metricsRouterRouteInstance", &ibm.MetricsRouterRouteArgs{
    			Rules: ibm.MetricsRouterRouteRuleArray{
    				&ibm.MetricsRouterRouteRuleArgs{
    					Action: pulumi.String("send"),
    					InclusionFilters: ibm.MetricsRouterRouteRuleInclusionFilterArray{
    						&ibm.MetricsRouterRouteRuleInclusionFilterArgs{
    							Operand:  pulumi.String("location"),
    							Operator: pulumi.String("is"),
    							Values: pulumi.StringArray{
    								pulumi.String("us-south"),
    							},
    						},
    					},
    					Targets: ibm.MetricsRouterRouteRuleTargetArray{
    						&ibm.MetricsRouterRouteRuleTargetArgs{
    							Id: pulumi.String("c3af557f-fb0e-4476-85c3-0889e7fe7bc4"),
    						},
    					},
    				},
    			},
    		})
    		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 metricsRouterRouteInstance = new Ibm.MetricsRouterRoute("metricsRouterRouteInstance", new()
        {
            Rules = new[]
            {
                new Ibm.Inputs.MetricsRouterRouteRuleArgs
                {
                    Action = "send",
                    InclusionFilters = new[]
                    {
                        new Ibm.Inputs.MetricsRouterRouteRuleInclusionFilterArgs
                        {
                            Operand = "location",
                            Operator = "is",
                            Values = new[]
                            {
                                "us-south",
                            },
                        },
                    },
                    Targets = new[]
                    {
                        new Ibm.Inputs.MetricsRouterRouteRuleTargetArgs
                        {
                            Id = "c3af557f-fb0e-4476-85c3-0889e7fe7bc4",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.MetricsRouterRoute;
    import com.pulumi.ibm.MetricsRouterRouteArgs;
    import com.pulumi.ibm.inputs.MetricsRouterRouteRuleArgs;
    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 metricsRouterRouteInstance = new MetricsRouterRoute("metricsRouterRouteInstance", MetricsRouterRouteArgs.builder()
                .rules(MetricsRouterRouteRuleArgs.builder()
                    .action("send")
                    .inclusionFilters(MetricsRouterRouteRuleInclusionFilterArgs.builder()
                        .operand("location")
                        .operator("is")
                        .values("us-south")
                        .build())
                    .targets(MetricsRouterRouteRuleTargetArgs.builder()
                        .id("c3af557f-fb0e-4476-85c3-0889e7fe7bc4")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      metricsRouterRouteInstance:
        type: ibm:MetricsRouterRoute
        properties:
          rules:
            - action: send
              inclusionFilters:
                - operand: location
                  operator: is
                  values:
                    - us-south
              targets:
                - id: c3af557f-fb0e-4476-85c3-0889e7fe7bc4
    

    Example for multiple rules and multiple inclusion_filters

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const metricsRouterRouteInstance = new ibm.MetricsRouterRoute("metricsRouterRouteInstance", {rules: [
        {
            action: "send",
            inclusionFilters: [
                {
                    operand: "location",
                    operator: "is",
                    values: ["us-south"],
                },
                {
                    operand: "service_name",
                    operator: "in",
                    values: ["metrics-router"],
                },
            ],
            targets: [{
                id: "c3af557f-fb0e-4476-85c3-0889e7fe7bc4",
            }],
        },
        {
            action: "send",
            inclusionFilters: [{
                operand: "resource_type",
                operator: "is",
                values: ["worker"],
            }],
            targets: [{
                id: "c3af557f-fb0e-4476-85c3-0889e7fe7bc4",
            }],
        },
    ]});
    
    import pulumi
    import pulumi_ibm as ibm
    
    metrics_router_route_instance = ibm.MetricsRouterRoute("metricsRouterRouteInstance", rules=[
        {
            "action": "send",
            "inclusion_filters": [
                {
                    "operand": "location",
                    "operator": "is",
                    "values": ["us-south"],
                },
                {
                    "operand": "service_name",
                    "operator": "in",
                    "values": ["metrics-router"],
                },
            ],
            "targets": [{
                "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4",
            }],
        },
        {
            "action": "send",
            "inclusion_filters": [{
                "operand": "resource_type",
                "operator": "is",
                "values": ["worker"],
            }],
            "targets": [{
                "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4",
            }],
        },
    ])
    
    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.NewMetricsRouterRoute(ctx, "metricsRouterRouteInstance", &ibm.MetricsRouterRouteArgs{
    			Rules: ibm.MetricsRouterRouteRuleArray{
    				&ibm.MetricsRouterRouteRuleArgs{
    					Action: pulumi.String("send"),
    					InclusionFilters: ibm.MetricsRouterRouteRuleInclusionFilterArray{
    						&ibm.MetricsRouterRouteRuleInclusionFilterArgs{
    							Operand:  pulumi.String("location"),
    							Operator: pulumi.String("is"),
    							Values: pulumi.StringArray{
    								pulumi.String("us-south"),
    							},
    						},
    						&ibm.MetricsRouterRouteRuleInclusionFilterArgs{
    							Operand:  pulumi.String("service_name"),
    							Operator: pulumi.String("in"),
    							Values: pulumi.StringArray{
    								pulumi.String("metrics-router"),
    							},
    						},
    					},
    					Targets: ibm.MetricsRouterRouteRuleTargetArray{
    						&ibm.MetricsRouterRouteRuleTargetArgs{
    							Id: pulumi.String("c3af557f-fb0e-4476-85c3-0889e7fe7bc4"),
    						},
    					},
    				},
    				&ibm.MetricsRouterRouteRuleArgs{
    					Action: pulumi.String("send"),
    					InclusionFilters: ibm.MetricsRouterRouteRuleInclusionFilterArray{
    						&ibm.MetricsRouterRouteRuleInclusionFilterArgs{
    							Operand:  pulumi.String("resource_type"),
    							Operator: pulumi.String("is"),
    							Values: pulumi.StringArray{
    								pulumi.String("worker"),
    							},
    						},
    					},
    					Targets: ibm.MetricsRouterRouteRuleTargetArray{
    						&ibm.MetricsRouterRouteRuleTargetArgs{
    							Id: pulumi.String("c3af557f-fb0e-4476-85c3-0889e7fe7bc4"),
    						},
    					},
    				},
    			},
    		})
    		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 metricsRouterRouteInstance = new Ibm.MetricsRouterRoute("metricsRouterRouteInstance", new()
        {
            Rules = new[]
            {
                new Ibm.Inputs.MetricsRouterRouteRuleArgs
                {
                    Action = "send",
                    InclusionFilters = new[]
                    {
                        new Ibm.Inputs.MetricsRouterRouteRuleInclusionFilterArgs
                        {
                            Operand = "location",
                            Operator = "is",
                            Values = new[]
                            {
                                "us-south",
                            },
                        },
                        new Ibm.Inputs.MetricsRouterRouteRuleInclusionFilterArgs
                        {
                            Operand = "service_name",
                            Operator = "in",
                            Values = new[]
                            {
                                "metrics-router",
                            },
                        },
                    },
                    Targets = new[]
                    {
                        new Ibm.Inputs.MetricsRouterRouteRuleTargetArgs
                        {
                            Id = "c3af557f-fb0e-4476-85c3-0889e7fe7bc4",
                        },
                    },
                },
                new Ibm.Inputs.MetricsRouterRouteRuleArgs
                {
                    Action = "send",
                    InclusionFilters = new[]
                    {
                        new Ibm.Inputs.MetricsRouterRouteRuleInclusionFilterArgs
                        {
                            Operand = "resource_type",
                            Operator = "is",
                            Values = new[]
                            {
                                "worker",
                            },
                        },
                    },
                    Targets = new[]
                    {
                        new Ibm.Inputs.MetricsRouterRouteRuleTargetArgs
                        {
                            Id = "c3af557f-fb0e-4476-85c3-0889e7fe7bc4",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.MetricsRouterRoute;
    import com.pulumi.ibm.MetricsRouterRouteArgs;
    import com.pulumi.ibm.inputs.MetricsRouterRouteRuleArgs;
    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 metricsRouterRouteInstance = new MetricsRouterRoute("metricsRouterRouteInstance", MetricsRouterRouteArgs.builder()
                .rules(            
                    MetricsRouterRouteRuleArgs.builder()
                        .action("send")
                        .inclusionFilters(                    
                            MetricsRouterRouteRuleInclusionFilterArgs.builder()
                                .operand("location")
                                .operator("is")
                                .values("us-south")
                                .build(),
                            MetricsRouterRouteRuleInclusionFilterArgs.builder()
                                .operand("service_name")
                                .operator("in")
                                .values("metrics-router")
                                .build())
                        .targets(MetricsRouterRouteRuleTargetArgs.builder()
                            .id("c3af557f-fb0e-4476-85c3-0889e7fe7bc4")
                            .build())
                        .build(),
                    MetricsRouterRouteRuleArgs.builder()
                        .action("send")
                        .inclusionFilters(MetricsRouterRouteRuleInclusionFilterArgs.builder()
                            .operand("resource_type")
                            .operator("is")
                            .values("worker")
                            .build())
                        .targets(MetricsRouterRouteRuleTargetArgs.builder()
                            .id("c3af557f-fb0e-4476-85c3-0889e7fe7bc4")
                            .build())
                        .build())
                .build());
    
        }
    }
    
    resources:
      metricsRouterRouteInstance:
        type: ibm:MetricsRouterRoute
        properties:
          rules:
            - action: send
              inclusionFilters:
                - operand: location
                  operator: is
                  values:
                    - us-south
                - operand: service_name
                  operator: in
                  values:
                    - metrics-router
              targets:
                - id: c3af557f-fb0e-4476-85c3-0889e7fe7bc4
            - action: send
              inclusionFilters:
                - operand: resource_type
                  operator: is
                  values:
                    - worker
              targets:
                - id: c3af557f-fb0e-4476-85c3-0889e7fe7bc4
    

    Example of route with drop action

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const metricsRouterRouteInstance = new ibm.MetricsRouterRoute("metricsRouterRouteInstance", {rules: [{
        action: "drop",
        inclusionFilters: [{
            operand: "location",
            operator: "is",
            values: ["us-south"],
        }],
    }]});
    
    import pulumi
    import pulumi_ibm as ibm
    
    metrics_router_route_instance = ibm.MetricsRouterRoute("metricsRouterRouteInstance", rules=[{
        "action": "drop",
        "inclusion_filters": [{
            "operand": "location",
            "operator": "is",
            "values": ["us-south"],
        }],
    }])
    
    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.NewMetricsRouterRoute(ctx, "metricsRouterRouteInstance", &ibm.MetricsRouterRouteArgs{
    			Rules: ibm.MetricsRouterRouteRuleArray{
    				&ibm.MetricsRouterRouteRuleArgs{
    					Action: pulumi.String("drop"),
    					InclusionFilters: ibm.MetricsRouterRouteRuleInclusionFilterArray{
    						&ibm.MetricsRouterRouteRuleInclusionFilterArgs{
    							Operand:  pulumi.String("location"),
    							Operator: pulumi.String("is"),
    							Values: pulumi.StringArray{
    								pulumi.String("us-south"),
    							},
    						},
    					},
    				},
    			},
    		})
    		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 metricsRouterRouteInstance = new Ibm.MetricsRouterRoute("metricsRouterRouteInstance", new()
        {
            Rules = new[]
            {
                new Ibm.Inputs.MetricsRouterRouteRuleArgs
                {
                    Action = "drop",
                    InclusionFilters = new[]
                    {
                        new Ibm.Inputs.MetricsRouterRouteRuleInclusionFilterArgs
                        {
                            Operand = "location",
                            Operator = "is",
                            Values = new[]
                            {
                                "us-south",
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.MetricsRouterRoute;
    import com.pulumi.ibm.MetricsRouterRouteArgs;
    import com.pulumi.ibm.inputs.MetricsRouterRouteRuleArgs;
    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 metricsRouterRouteInstance = new MetricsRouterRoute("metricsRouterRouteInstance", MetricsRouterRouteArgs.builder()
                .rules(MetricsRouterRouteRuleArgs.builder()
                    .action("drop")
                    .inclusionFilters(MetricsRouterRouteRuleInclusionFilterArgs.builder()
                        .operand("location")
                        .operator("is")
                        .values("us-south")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      metricsRouterRouteInstance:
        type: ibm:MetricsRouterRoute
        properties:
          rules:
            - action: drop
              inclusionFilters:
                - operand: location
                  operator: is
                  values:
                    - us-south
    

    Provider Configuration

    The IBM Cloud provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below:

    • Static credentials
    • Environment variables

    To find which credentials are required for this resource, see the service table here.

    Static credentials

    You can provide your static credentials by adding the ibmcloud_api_key, iaas_classic_username, and iaas_classic_api_key arguments in the IBM Cloud provider block.

    Usage:

    provider "ibm" {
        ibmcloud_api_key = ""
        iaas_classic_username = ""
        iaas_classic_api_key = ""
    }
    

    Environment variables

    You can provide your credentials by exporting the IC_API_KEY, IAAS_CLASSIC_USERNAME, and IAAS_CLASSIC_API_KEY environment variables, representing your IBM Cloud platform API key, IBM Cloud Classic Infrastructure (SoftLayer) user name, and IBM Cloud infrastructure API key, respectively.

    provider "ibm" {}
    

    Usage:

    export IC_API_KEY="ibmcloud_api_key"
    export IAAS_CLASSIC_USERNAME="iaas_classic_username"
    export IAAS_CLASSIC_API_KEY="iaas_classic_api_key"
    pulumi preview
    

    Note:

    1. Create or find your ibmcloud_api_key and iaas_classic_api_key here.
    • Select My IBM Cloud API Keys option from view dropdown for ibmcloud_api_key
    • Select Classic Infrastructure API Keys option from view dropdown for iaas_classic_api_key
    1. For iaas_classic_username
    • Go to Users
    • Click on user.
    • Find user name in the VPN password section under User Details tab

    For more informaton, see here.

    Create MetricsRouterRoute Resource

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

    Constructor syntax

    new MetricsRouterRoute(name: string, args: MetricsRouterRouteArgs, opts?: CustomResourceOptions);
    @overload
    def MetricsRouterRoute(resource_name: str,
                           args: MetricsRouterRouteArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricsRouterRoute(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           rules: Optional[Sequence[MetricsRouterRouteRuleArgs]] = None,
                           metrics_router_route_id: Optional[str] = None,
                           name: Optional[str] = None)
    func NewMetricsRouterRoute(ctx *Context, name string, args MetricsRouterRouteArgs, opts ...ResourceOption) (*MetricsRouterRoute, error)
    public MetricsRouterRoute(string name, MetricsRouterRouteArgs args, CustomResourceOptions? opts = null)
    public MetricsRouterRoute(String name, MetricsRouterRouteArgs args)
    public MetricsRouterRoute(String name, MetricsRouterRouteArgs args, CustomResourceOptions options)
    
    type: ibm:MetricsRouterRoute
    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 MetricsRouterRouteArgs
    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 MetricsRouterRouteArgs
    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 MetricsRouterRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricsRouterRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricsRouterRouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var metricsRouterRouteResource = new Ibm.MetricsRouterRoute("metricsRouterRouteResource", new()
    {
        Rules = new[]
        {
            new Ibm.Inputs.MetricsRouterRouteRuleArgs
            {
                Action = "string",
                InclusionFilters = new[]
                {
                    new Ibm.Inputs.MetricsRouterRouteRuleInclusionFilterArgs
                    {
                        Operand = "string",
                        Operator = "string",
                        Values = new[]
                        {
                            "string",
                        },
                    },
                },
                Targets = new[]
                {
                    new Ibm.Inputs.MetricsRouterRouteRuleTargetArgs
                    {
                        Id = "string",
                    },
                },
            },
        },
        MetricsRouterRouteId = "string",
        Name = "string",
    });
    
    example, err := ibm.NewMetricsRouterRoute(ctx, "metricsRouterRouteResource", &ibm.MetricsRouterRouteArgs{
    	Rules: ibm.MetricsRouterRouteRuleArray{
    		&ibm.MetricsRouterRouteRuleArgs{
    			Action: pulumi.String("string"),
    			InclusionFilters: ibm.MetricsRouterRouteRuleInclusionFilterArray{
    				&ibm.MetricsRouterRouteRuleInclusionFilterArgs{
    					Operand:  pulumi.String("string"),
    					Operator: pulumi.String("string"),
    					Values: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    			Targets: ibm.MetricsRouterRouteRuleTargetArray{
    				&ibm.MetricsRouterRouteRuleTargetArgs{
    					Id: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	MetricsRouterRouteId: pulumi.String("string"),
    	Name:                 pulumi.String("string"),
    })
    
    var metricsRouterRouteResource = new MetricsRouterRoute("metricsRouterRouteResource", MetricsRouterRouteArgs.builder()
        .rules(MetricsRouterRouteRuleArgs.builder()
            .action("string")
            .inclusionFilters(MetricsRouterRouteRuleInclusionFilterArgs.builder()
                .operand("string")
                .operator("string")
                .values("string")
                .build())
            .targets(MetricsRouterRouteRuleTargetArgs.builder()
                .id("string")
                .build())
            .build())
        .metricsRouterRouteId("string")
        .name("string")
        .build());
    
    metrics_router_route_resource = ibm.MetricsRouterRoute("metricsRouterRouteResource",
        rules=[{
            "action": "string",
            "inclusion_filters": [{
                "operand": "string",
                "operator": "string",
                "values": ["string"],
            }],
            "targets": [{
                "id": "string",
            }],
        }],
        metrics_router_route_id="string",
        name="string")
    
    const metricsRouterRouteResource = new ibm.MetricsRouterRoute("metricsRouterRouteResource", {
        rules: [{
            action: "string",
            inclusionFilters: [{
                operand: "string",
                operator: "string",
                values: ["string"],
            }],
            targets: [{
                id: "string",
            }],
        }],
        metricsRouterRouteId: "string",
        name: "string",
    });
    
    type: ibm:MetricsRouterRoute
    properties:
        metricsRouterRouteId: string
        name: string
        rules:
            - action: string
              inclusionFilters:
                - operand: string
                  operator: string
                  values:
                    - string
              targets:
                - id: string
    

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

    Rules List<MetricsRouterRouteRule>
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    MetricsRouterRouteId string
    The unique identifier of the metrics_router_route.
    Name string
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    Rules []MetricsRouterRouteRuleArgs
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    MetricsRouterRouteId string
    The unique identifier of the metrics_router_route.
    Name string
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    rules List<MetricsRouterRouteRule>
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    metricsRouterRouteId String
    The unique identifier of the metrics_router_route.
    name String
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    rules MetricsRouterRouteRule[]
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    metricsRouterRouteId string
    The unique identifier of the metrics_router_route.
    name string
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    rules Sequence[MetricsRouterRouteRuleArgs]
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    metrics_router_route_id str
    The unique identifier of the metrics_router_route.
    name str
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    rules List<Property Map>
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    metricsRouterRouteId String
    The unique identifier of the metrics_router_route.
    name String
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.

    Outputs

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

    CreatedAt string
    (String) The timestamp of the route creation time.
    Crn string
    (String) The crn of the route resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    (String) The timestamp of the route last updated time.
    CreatedAt string
    (String) The timestamp of the route creation time.
    Crn string
    (String) The crn of the route resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    (String) The timestamp of the route last updated time.
    createdAt String
    (String) The timestamp of the route creation time.
    crn String
    (String) The crn of the route resource.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    (String) The timestamp of the route last updated time.
    createdAt string
    (String) The timestamp of the route creation time.
    crn string
    (String) The crn of the route resource.
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    (String) The timestamp of the route last updated time.
    created_at str
    (String) The timestamp of the route creation time.
    crn str
    (String) The crn of the route resource.
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    (String) The timestamp of the route last updated time.
    createdAt String
    (String) The timestamp of the route creation time.
    crn String
    (String) The crn of the route resource.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    (String) The timestamp of the route last updated time.

    Look up Existing MetricsRouterRoute Resource

    Get an existing MetricsRouterRoute 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?: MetricsRouterRouteState, opts?: CustomResourceOptions): MetricsRouterRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            crn: Optional[str] = None,
            metrics_router_route_id: Optional[str] = None,
            name: Optional[str] = None,
            rules: Optional[Sequence[MetricsRouterRouteRuleArgs]] = None,
            updated_at: Optional[str] = None) -> MetricsRouterRoute
    func GetMetricsRouterRoute(ctx *Context, name string, id IDInput, state *MetricsRouterRouteState, opts ...ResourceOption) (*MetricsRouterRoute, error)
    public static MetricsRouterRoute Get(string name, Input<string> id, MetricsRouterRouteState? state, CustomResourceOptions? opts = null)
    public static MetricsRouterRoute get(String name, Output<String> id, MetricsRouterRouteState state, CustomResourceOptions options)
    resources:  _:    type: ibm:MetricsRouterRoute    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:
    CreatedAt string
    (String) The timestamp of the route creation time.
    Crn string
    (String) The crn of the route resource.
    MetricsRouterRouteId string
    The unique identifier of the metrics_router_route.
    Name string
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    Rules List<MetricsRouterRouteRule>
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    UpdatedAt string
    (String) The timestamp of the route last updated time.
    CreatedAt string
    (String) The timestamp of the route creation time.
    Crn string
    (String) The crn of the route resource.
    MetricsRouterRouteId string
    The unique identifier of the metrics_router_route.
    Name string
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    Rules []MetricsRouterRouteRuleArgs
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    UpdatedAt string
    (String) The timestamp of the route last updated time.
    createdAt String
    (String) The timestamp of the route creation time.
    crn String
    (String) The crn of the route resource.
    metricsRouterRouteId String
    The unique identifier of the metrics_router_route.
    name String
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    rules List<MetricsRouterRouteRule>
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    updatedAt String
    (String) The timestamp of the route last updated time.
    createdAt string
    (String) The timestamp of the route creation time.
    crn string
    (String) The crn of the route resource.
    metricsRouterRouteId string
    The unique identifier of the metrics_router_route.
    name string
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    rules MetricsRouterRouteRule[]
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    updatedAt string
    (String) The timestamp of the route last updated time.
    created_at str
    (String) The timestamp of the route creation time.
    crn str
    (String) The crn of the route resource.
    metrics_router_route_id str
    The unique identifier of the metrics_router_route.
    name str
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    rules Sequence[MetricsRouterRouteRuleArgs]
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    updated_at str
    (String) The timestamp of the route last updated time.
    createdAt String
    (String) The timestamp of the route creation time.
    crn String
    (String) The crn of the route resource.
    metricsRouterRouteId String
    The unique identifier of the metrics_router_route.
    name String
    The name of the route. The name must be 1000 characters or less and cannot include any special characters other than (space) - . _ :. Do not include any personal identifying information (PII) in any resource names.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.
    rules List<Property Map>
    Routing rules that will be evaluated in their order of the array.

    • Constraints: The maximum length is 4 items. The minimum length is 0 items. Nested scheme for rules:
    updatedAt String
    (String) The timestamp of the route last updated time.

    Supporting Types

    MetricsRouterRouteRule, MetricsRouterRouteRuleArgs

    Action string
    The action if the inclusion_filters matches, default is send action.

    • Constraints: Allowable values are: send, drop.
    InclusionFilters List<MetricsRouterRouteRuleInclusionFilter>
    A list of conditions to be satisfied for routing metrics to pre-defined target.

    • Constraints: The maximum length is 7 items. The minimum length is 0 items. Nested scheme for inclusion_filters:
    Targets List<MetricsRouterRouteRuleTarget>
    A collection of targets with ID in the request.

    • Constraints: The maximum length is 3 items. The minimum length is 0 items. Nested scheme for targets:
    Action string
    The action if the inclusion_filters matches, default is send action.

    • Constraints: Allowable values are: send, drop.
    InclusionFilters []MetricsRouterRouteRuleInclusionFilter
    A list of conditions to be satisfied for routing metrics to pre-defined target.

    • Constraints: The maximum length is 7 items. The minimum length is 0 items. Nested scheme for inclusion_filters:
    Targets []MetricsRouterRouteRuleTarget
    A collection of targets with ID in the request.

    • Constraints: The maximum length is 3 items. The minimum length is 0 items. Nested scheme for targets:
    action String
    The action if the inclusion_filters matches, default is send action.

    • Constraints: Allowable values are: send, drop.
    inclusionFilters List<MetricsRouterRouteRuleInclusionFilter>
    A list of conditions to be satisfied for routing metrics to pre-defined target.

    • Constraints: The maximum length is 7 items. The minimum length is 0 items. Nested scheme for inclusion_filters:
    targets List<MetricsRouterRouteRuleTarget>
    A collection of targets with ID in the request.

    • Constraints: The maximum length is 3 items. The minimum length is 0 items. Nested scheme for targets:
    action string
    The action if the inclusion_filters matches, default is send action.

    • Constraints: Allowable values are: send, drop.
    inclusionFilters MetricsRouterRouteRuleInclusionFilter[]
    A list of conditions to be satisfied for routing metrics to pre-defined target.

    • Constraints: The maximum length is 7 items. The minimum length is 0 items. Nested scheme for inclusion_filters:
    targets MetricsRouterRouteRuleTarget[]
    A collection of targets with ID in the request.

    • Constraints: The maximum length is 3 items. The minimum length is 0 items. Nested scheme for targets:
    action str
    The action if the inclusion_filters matches, default is send action.

    • Constraints: Allowable values are: send, drop.
    inclusion_filters Sequence[MetricsRouterRouteRuleInclusionFilter]
    A list of conditions to be satisfied for routing metrics to pre-defined target.

    • Constraints: The maximum length is 7 items. The minimum length is 0 items. Nested scheme for inclusion_filters:
    targets Sequence[MetricsRouterRouteRuleTarget]
    A collection of targets with ID in the request.

    • Constraints: The maximum length is 3 items. The minimum length is 0 items. Nested scheme for targets:
    action String
    The action if the inclusion_filters matches, default is send action.

    • Constraints: Allowable values are: send, drop.
    inclusionFilters List<Property Map>
    A list of conditions to be satisfied for routing metrics to pre-defined target.

    • Constraints: The maximum length is 7 items. The minimum length is 0 items. Nested scheme for inclusion_filters:
    targets List<Property Map>
    A collection of targets with ID in the request.

    • Constraints: The maximum length is 3 items. The minimum length is 0 items. Nested scheme for targets:

    MetricsRouterRouteRuleInclusionFilter, MetricsRouterRouteRuleInclusionFilterArgs

    Operand string
    Part of CRN that can be compared with values.

    • Constraints: Allowable values are: location, service_name, service_instance, resource_type, resource.
    Operator string
    The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can support upto 20 values in the array.

    • Constraints: Allowable values are: is, in.
    Values List<string>
    The provided string values of the operand to be compared with.

    • Constraints: The maximum length is 20 items. The minimum length is 1 item.
    Operand string
    Part of CRN that can be compared with values.

    • Constraints: Allowable values are: location, service_name, service_instance, resource_type, resource.
    Operator string
    The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can support upto 20 values in the array.

    • Constraints: Allowable values are: is, in.
    Values []string
    The provided string values of the operand to be compared with.

    • Constraints: The maximum length is 20 items. The minimum length is 1 item.
    operand String
    Part of CRN that can be compared with values.

    • Constraints: Allowable values are: location, service_name, service_instance, resource_type, resource.
    operator String
    The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can support upto 20 values in the array.

    • Constraints: Allowable values are: is, in.
    values List<String>
    The provided string values of the operand to be compared with.

    • Constraints: The maximum length is 20 items. The minimum length is 1 item.
    operand string
    Part of CRN that can be compared with values.

    • Constraints: Allowable values are: location, service_name, service_instance, resource_type, resource.
    operator string
    The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can support upto 20 values in the array.

    • Constraints: Allowable values are: is, in.
    values string[]
    The provided string values of the operand to be compared with.

    • Constraints: The maximum length is 20 items. The minimum length is 1 item.
    operand str
    Part of CRN that can be compared with values.

    • Constraints: Allowable values are: location, service_name, service_instance, resource_type, resource.
    operator str
    The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can support upto 20 values in the array.

    • Constraints: Allowable values are: is, in.
    values Sequence[str]
    The provided string values of the operand to be compared with.

    • Constraints: The maximum length is 20 items. The minimum length is 1 item.
    operand String
    Part of CRN that can be compared with values.

    • Constraints: Allowable values are: location, service_name, service_instance, resource_type, resource.
    operator String
    The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can support upto 20 values in the array.

    • Constraints: Allowable values are: is, in.
    values List<String>
    The provided string values of the operand to be compared with.

    • Constraints: The maximum length is 20 items. The minimum length is 1 item.

    MetricsRouterRouteRuleTarget, MetricsRouterRouteRuleTargetArgs

    Id string
    The target uuid for a pre-defined metrics router target.

    • 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
    The target uuid for a pre-defined metrics router target.

    • 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
    The target uuid for a pre-defined metrics router target.

    • 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
    The target uuid for a pre-defined metrics router target.

    • 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
    The target uuid for a pre-defined metrics router target.

    • 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
    The target uuid for a pre-defined metrics router target.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:]+$/.

    Import

    You can import the ibm_metrics_router_route resource by using id. The UUID of the route resource.

    Syntax

    $ pulumi import ibm:index/metricsRouterRoute:MetricsRouterRoute metrics_router_route <id>
    

    Example

    $ pulumi import ibm:index/metricsRouterRoute:MetricsRouterRoute metrics_router_route c3af557f-fb0e-4476-85c3-0889e7fe7bc4
    

    To learn more about importing existing cloud resources, see Importing resources.

    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