1. Packages
  2. Cisco NX OS Resource Provider
  3. API Docs
  4. getRest
Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs

nxos.getRest

Explore with Pulumi AI

Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs

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]",
    });

});
Copy
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
	})
}
Copy
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());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as nxos from "@pulumi/nxos";

const l1PhysIf = nxos.getRest({
    dn: "sys/intf/phys-[eth1/1]",
});
Copy
import pulumi
import pulumi_nxos as nxos

l1_phys_if = nxos.get_rest(dn="sys/intf/phys-[eth1/1]")
Copy
variables:
  l1PhysIf:
    fn::invoke:
      Function: nxos:getRest
      Arguments:
        dn: sys/intf/phys-[eth1/1]
Copy

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>
Copy
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]
Copy
func LookupRest(ctx *Context, args *LookupRestArgs, opts ...InvokeOption) (*LookupRestResult, error)
func LookupRestOutput(ctx *Context, args *LookupRestOutputArgs, opts ...InvokeOption) LookupRestResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetRestResult> getRest(GetRestArgs args, InvokeOptions options)
public static Output<GetRestResult> getRest(GetRestArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: nxos:index/getRest:getRest
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Dn This property is required. string
Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
Device string
A device name from the provider configuration.
Dn This property is required. string
Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
Device string
A device name from the provider configuration.
dn This property is required. String
Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
device String
A device name from the provider configuration.
dn This property is required. string
Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
device string
A device name from the provider configuration.
dn This property is required. str
Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
device str
A device name from the provider configuration.
dn This property is required. String
Distinguished name of object to be retrieved, e.g. sys/intf/phys-[eth1/1].
device String
A device name from the provider configuration.

getRest Result

The following output properties are available:

ClassName 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.
ClassName 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.
className 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.
className 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.
className 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.
Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs