netbox.getRir
Explore with Pulumi AI
From the official documentation:
Regional Internet registries are responsible for the allocation of globally-routable address space. The five RIRs are ARIN, RIPE, APNIC, LACNIC, and AFRINIC. However, some address space has been set aside for internal use, such as defined in RFCs 1918 and 6598. NetBox considers these RFCs as a sort of RIR as well; that is, an authority which “owns” certain address space.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const rir1 = netbox.getRir({
name: "ARIN",
});
const rir2 = netbox.getRir({
slug: "arin",
});
import pulumi
import pulumi_netbox as netbox
rir1 = netbox.get_rir(name="ARIN")
rir2 = netbox.get_rir(slug="arin")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v5/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netbox.LookupRir(ctx, &netbox.LookupRirArgs{
Name: pulumi.StringRef("ARIN"),
}, nil)
if err != nil {
return err
}
_, err = netbox.LookupRir(ctx, &netbox.LookupRirArgs{
Slug: pulumi.StringRef("arin"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var rir1 = Netbox.GetRir.Invoke(new()
{
Name = "ARIN",
});
var rir2 = Netbox.GetRir.Invoke(new()
{
Slug = "arin",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.NetboxFunctions;
import com.pulumi.netbox.inputs.GetRirArgs;
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 rir1 = NetboxFunctions.getRir(GetRirArgs.builder()
.name("ARIN")
.build());
final var rir2 = NetboxFunctions.getRir(GetRirArgs.builder()
.slug("arin")
.build());
}
}
variables:
rir1:
fn::invoke:
function: netbox:getRir
arguments:
name: ARIN
rir2:
fn::invoke:
function: netbox:getRir
arguments:
slug: arin
Using getRir
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 getRir(args: GetRirArgs, opts?: InvokeOptions): Promise<GetRirResult>
function getRirOutput(args: GetRirOutputArgs, opts?: InvokeOptions): Output<GetRirResult>
def get_rir(name: Optional[str] = None,
slug: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRirResult
def get_rir_output(name: Optional[pulumi.Input[str]] = None,
slug: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRirResult]
func LookupRir(ctx *Context, args *LookupRirArgs, opts ...InvokeOption) (*LookupRirResult, error)
func LookupRirOutput(ctx *Context, args *LookupRirOutputArgs, opts ...InvokeOption) LookupRirResultOutput
> Note: This function is named LookupRir
in the Go SDK.
public static class GetRir
{
public static Task<GetRirResult> InvokeAsync(GetRirArgs args, InvokeOptions? opts = null)
public static Output<GetRirResult> Invoke(GetRirInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRirResult> getRir(GetRirArgs args, InvokeOptions options)
public static Output<GetRirResult> getRir(GetRirArgs args, InvokeOptions options)
fn::invoke:
function: netbox:index/getRir:getRir
arguments:
# arguments dictionary
The following arguments are supported:
getRir Result
The following output properties are available:
- Description string
- Id double
- The ID of this resource.
- Is
Private bool - Name string
- At least one of
name
orslug
must be given. - Slug string
- At least one of
name
orslug
must be given.
- Description string
- Id float64
- The ID of this resource.
- Is
Private bool - Name string
- At least one of
name
orslug
must be given. - Slug string
- At least one of
name
orslug
must be given.
- description String
- id Double
- The ID of this resource.
- is
Private Boolean - name String
- At least one of
name
orslug
must be given. - slug String
- At least one of
name
orslug
must be given.
- description string
- id number
- The ID of this resource.
- is
Private boolean - name string
- At least one of
name
orslug
must be given. - slug string
- At least one of
name
orslug
must be given.
- description str
- id float
- The ID of this resource.
- is_
private bool - name str
- At least one of
name
orslug
must be given. - slug str
- At least one of
name
orslug
must be given.
- description String
- id Number
- The ID of this resource.
- is
Private Boolean - name String
- At least one of
name
orslug
must be given. - slug String
- At least one of
name
orslug
must be given.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.