Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs
nxos.getRest
Explore with Pulumi AI
This data source can read one NX-OS DME object.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nxos = Pulumi.Nxos;
return await Deployment.RunAsync(() =>
{
var l1PhysIf = Nxos.GetRest.Invoke(new()
{
Dn = "sys/intf/phys-[eth1/1]",
});
});
package main
import (
"github.com/lbrlabs/pulumi-nxos/sdk/go/nxos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nxos.LookupRest(ctx, &nxos.LookupRestArgs{
Dn: "sys/intf/phys-[eth1/1]",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nxos.NxosFunctions;
import com.pulumi.nxos.inputs.GetRestArgs;
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 l1PhysIf = NxosFunctions.getRest(GetRestArgs.builder()
.dn("sys/intf/phys-[eth1/1]")
.build());
}
}
import pulumi
import pulumi_nxos as nxos
l1_phys_if = nxos.get_rest(dn="sys/intf/phys-[eth1/1]")
import * as pulumi from "@pulumi/pulumi";
import * as nxos from "@pulumi/nxos";
const l1PhysIf = nxos.getRest({
dn: "sys/intf/phys-[eth1/1]",
});
variables:
l1PhysIf:
fn::invoke:
Function: nxos:getRest
Arguments:
dn: sys/intf/phys-[eth1/1]
Using getRest
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 getRest(args: GetRestArgs, opts?: InvokeOptions): Promise<GetRestResult>
function getRestOutput(args: GetRestOutputArgs, opts?: InvokeOptions): Output<GetRestResult>
def get_rest(device: Optional[str] = None,
dn: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRestResult
def get_rest_output(device: Optional[pulumi.Input[str]] = None,
dn: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRestResult]
func LookupRest(ctx *Context, args *LookupRestArgs, opts ...InvokeOption) (*LookupRestResult, error)
func LookupRestOutput(ctx *Context, args *LookupRestOutputArgs, opts ...InvokeOption) LookupRestResultOutput
> Note: This function is named LookupRest
in the Go SDK.
public static class GetRest
{
public static Task<GetRestResult> InvokeAsync(GetRestArgs args, InvokeOptions? opts = null)
public static Output<GetRestResult> Invoke(GetRestInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRestResult> getRest(GetRestArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: nxos:index/getRest:getRest
arguments:
# arguments dictionary
The following arguments are supported:
getRest Result
The following output properties are available:
- Class
Name string - Class name of object being retrieved.
- Content Dictionary<string, string>
- Map of key-value pairs which represents the attributes of object being retrieved.
- Dn string
- Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
- Id string
- The distinguished name of the object.
- Device string
- A device name from the provider configuration.
- Class
Name string - Class name of object being retrieved.
- Content map[string]string
- Map of key-value pairs which represents the attributes of object being retrieved.
- Dn string
- Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
- Id string
- The distinguished name of the object.
- Device string
- A device name from the provider configuration.
- class
Name String - Class name of object being retrieved.
- content Map<String,String>
- Map of key-value pairs which represents the attributes of object being retrieved.
- dn String
- Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
- id String
- The distinguished name of the object.
- device String
- A device name from the provider configuration.
- class
Name string - Class name of object being retrieved.
- content {[key: string]: string}
- Map of key-value pairs which represents the attributes of object being retrieved.
- dn string
- Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
- id string
- The distinguished name of the object.
- device string
- A device name from the provider configuration.
- class_
name str - Class name of object being retrieved.
- content Mapping[str, str]
- Map of key-value pairs which represents the attributes of object being retrieved.
- dn str
- Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
- id str
- The distinguished name of the object.
- device str
- A device name from the provider configuration.
- class
Name String - Class name of object being retrieved.
- content Map<String>
- Map of key-value pairs which represents the attributes of object being retrieved.
- dn String
- Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
- id String
- The distinguished name of the object.
- device String
- A device name from the provider configuration.
Package Details
- Repository
- nxos lbrlabs/pulumi-nxos
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nxos
Terraform Provider.