nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers
nexus.getRoutingRule
Explore with Pulumi AI
Use this data source to work with routing rules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nexus from "@pulumi/nexus";
const stopLeaks = nexus.getRoutingRule({
name: "stop-leaks",
});
import pulumi
import pulumi_nexus as nexus
stop_leaks = nexus.get_routing_rule(name="stop-leaks")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nexus.LookupRoutingRule(ctx, &nexus.LookupRoutingRuleArgs{
Name: "stop-leaks",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nexus = Pulumi.Nexus;
return await Deployment.RunAsync(() =>
{
var stopLeaks = Nexus.GetRoutingRule.Invoke(new()
{
Name = "stop-leaks",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nexus.NexusFunctions;
import com.pulumi.nexus.inputs.GetRoutingRuleArgs;
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 stopLeaks = NexusFunctions.getRoutingRule(GetRoutingRuleArgs.builder()
.name("stop-leaks")
.build());
}
}
variables:
stopLeaks:
fn::invoke:
function: nexus:getRoutingRule
arguments:
name: stop-leaks
Using getRoutingRule
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 getRoutingRule(args: GetRoutingRuleArgs, opts?: InvokeOptions): Promise<GetRoutingRuleResult>
function getRoutingRuleOutput(args: GetRoutingRuleOutputArgs, opts?: InvokeOptions): Output<GetRoutingRuleResult>
def get_routing_rule(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRoutingRuleResult
def get_routing_rule_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRoutingRuleResult]
func LookupRoutingRule(ctx *Context, args *LookupRoutingRuleArgs, opts ...InvokeOption) (*LookupRoutingRuleResult, error)
func LookupRoutingRuleOutput(ctx *Context, args *LookupRoutingRuleOutputArgs, opts ...InvokeOption) LookupRoutingRuleResultOutput
> Note: This function is named LookupRoutingRule
in the Go SDK.
public static class GetRoutingRule
{
public static Task<GetRoutingRuleResult> InvokeAsync(GetRoutingRuleArgs args, InvokeOptions? opts = null)
public static Output<GetRoutingRuleResult> Invoke(GetRoutingRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRoutingRuleResult> getRoutingRule(GetRoutingRuleArgs args, InvokeOptions options)
public static Output<GetRoutingRuleResult> getRoutingRule(GetRoutingRuleArgs args, InvokeOptions options)
fn::invoke:
function: nexus:index/getRoutingRule:getRoutingRule
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the routing rule
- Name string
- The name of the routing rule
- name String
- The name of the routing rule
- name string
- The name of the routing rule
- name str
- The name of the routing rule
- name String
- The name of the routing rule
getRoutingRule Result
The following output properties are available:
- Description string
- The description of the routing rule
- Id string
- Used to identify data source at nexus
- Matchers List<string>
- Matchers is a list of regular expressions used to identify request paths that are allowed or blocked (depending on above mode)
- Mode string
- The mode describe how to hande with mathing requests. Possible values:
BLOCK
orALLOW
- Name string
- The name of the routing rule
- Description string
- The description of the routing rule
- Id string
- Used to identify data source at nexus
- Matchers []string
- Matchers is a list of regular expressions used to identify request paths that are allowed or blocked (depending on above mode)
- Mode string
- The mode describe how to hande with mathing requests. Possible values:
BLOCK
orALLOW
- Name string
- The name of the routing rule
- description String
- The description of the routing rule
- id String
- Used to identify data source at nexus
- matchers List<String>
- Matchers is a list of regular expressions used to identify request paths that are allowed or blocked (depending on above mode)
- mode String
- The mode describe how to hande with mathing requests. Possible values:
BLOCK
orALLOW
- name String
- The name of the routing rule
- description string
- The description of the routing rule
- id string
- Used to identify data source at nexus
- matchers string[]
- Matchers is a list of regular expressions used to identify request paths that are allowed or blocked (depending on above mode)
- mode string
- The mode describe how to hande with mathing requests. Possible values:
BLOCK
orALLOW
- name string
- The name of the routing rule
- description str
- The description of the routing rule
- id str
- Used to identify data source at nexus
- matchers Sequence[str]
- Matchers is a list of regular expressions used to identify request paths that are allowed or blocked (depending on above mode)
- mode str
- The mode describe how to hande with mathing requests. Possible values:
BLOCK
orALLOW
- name str
- The name of the routing rule
- description String
- The description of the routing rule
- id String
- Used to identify data source at nexus
- matchers List<String>
- Matchers is a list of regular expressions used to identify request paths that are allowed or blocked (depending on above mode)
- mode String
- The mode describe how to hande with mathing requests. Possible values:
BLOCK
orALLOW
- name String
- The name of the routing rule
Package Details
- Repository
- nexus datadrivers/terraform-provider-nexus
- License
- Notes
- This Pulumi package is based on the
nexus
Terraform Provider.