netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger
netbox.getAsns
Explore with Pulumi AI
netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const asns = netbox.getAsns({
filters: [
{
name: "asn__gte",
value: "1000",
},
{
name: "asn__lte",
value: "2000",
},
],
});
import pulumi
import pulumi_netbox as netbox
asns = netbox.get_asns(filters=[
{
"name": "asn__gte",
"value": "1000",
},
{
"name": "asn__lte",
"value": "2000",
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netbox.GetAsns(ctx, &netbox.GetAsnsArgs{
Filters: []netbox.GetAsnsFilter{
{
Name: "asn__gte",
Value: "1000",
},
{
Name: "asn__lte",
Value: "2000",
},
},
}, 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 asns = Netbox.GetAsns.Invoke(new()
{
Filters = new[]
{
new Netbox.Inputs.GetAsnsFilterInputArgs
{
Name = "asn__gte",
Value = "1000",
},
new Netbox.Inputs.GetAsnsFilterInputArgs
{
Name = "asn__lte",
Value = "2000",
},
},
});
});
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.GetAsnsArgs;
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 asns = NetboxFunctions.getAsns(GetAsnsArgs.builder()
.filters(
GetAsnsFilterArgs.builder()
.name("asn__gte")
.value("1000")
.build(),
GetAsnsFilterArgs.builder()
.name("asn__lte")
.value("2000")
.build())
.build());
}
}
variables:
asns:
fn::invoke:
function: netbox:getAsns
arguments:
filters:
- name: asn__gte
value: '1000'
- name: asn__lte
value: '2000'
Using getAsns
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 getAsns(args: GetAsnsArgs, opts?: InvokeOptions): Promise<GetAsnsResult>
function getAsnsOutput(args: GetAsnsOutputArgs, opts?: InvokeOptions): Output<GetAsnsResult>
def get_asns(filters: Optional[Sequence[GetAsnsFilter]] = None,
id: Optional[str] = None,
limit: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetAsnsResult
def get_asns_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAsnsFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
limit: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAsnsResult]
func GetAsns(ctx *Context, args *GetAsnsArgs, opts ...InvokeOption) (*GetAsnsResult, error)
func GetAsnsOutput(ctx *Context, args *GetAsnsOutputArgs, opts ...InvokeOption) GetAsnsResultOutput
> Note: This function is named GetAsns
in the Go SDK.
public static class GetAsns
{
public static Task<GetAsnsResult> InvokeAsync(GetAsnsArgs args, InvokeOptions? opts = null)
public static Output<GetAsnsResult> Invoke(GetAsnsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAsnsResult> getAsns(GetAsnsArgs args, InvokeOptions options)
public static Output<GetAsnsResult> getAsns(GetAsnsArgs args, InvokeOptions options)
fn::invoke:
function: netbox:index/getAsns:getAsns
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Asns Filter> - Id string
- The ID of this resource.
- Limit double
- Defaults to
0
.
- Filters
[]Get
Asns Filter - Id string
- The ID of this resource.
- Limit float64
- Defaults to
0
.
- filters
List<Get
Asns Filter> - id String
- The ID of this resource.
- limit Double
- Defaults to
0
.
- filters
Get
Asns Filter[] - id string
- The ID of this resource.
- limit number
- Defaults to
0
.
- filters
Sequence[Get
Asns Filter] - id str
- The ID of this resource.
- limit float
- Defaults to
0
.
- filters List<Property Map>
- id String
- The ID of this resource.
- limit Number
- Defaults to
0
.
getAsns Result
The following output properties are available:
- Asns
List<Get
Asns Asn> - Id string
- The ID of this resource.
- Filters
List<Get
Asns Filter> - Limit double
- Defaults to
0
.
- Asns
[]Get
Asns Asn - Id string
- The ID of this resource.
- Filters
[]Get
Asns Filter - Limit float64
- Defaults to
0
.
- asns
List<Get
Asns Asn> - id String
- The ID of this resource.
- filters
List<Get
Asns Filter> - limit Double
- Defaults to
0
.
- asns
Get
Asns Asn[] - id string
- The ID of this resource.
- filters
Get
Asns Filter[] - limit number
- Defaults to
0
.
- asns
Sequence[Get
Asns Asn] - id str
- The ID of this resource.
- filters
Sequence[Get
Asns Filter] - limit float
- Defaults to
0
.
- asns List<Property Map>
- id String
- The ID of this resource.
- filters List<Property Map>
- limit Number
- Defaults to
0
.
Supporting Types
GetAsnsAsn
GetAsnsFilter
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.
netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger