1. Packages
  2. Cisco IOS XE Resource Provider
  3. API Docs
  4. getRestconf
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

iosxe.getRestconf

Explore with Pulumi AI

iosxe logo
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

    This data source can retrieve one or more attributes via RESTCONF.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Iosxe = Pulumi.Iosxe;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Iosxe.GetRestconf.Invoke(new()
        {
            Path = "Cisco-IOS-XE-native:native/banner/login",
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-iosxe/sdk/go/iosxe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iosxe.LookupRestconf(ctx, &iosxe.LookupRestconfArgs{
    			Path: "Cisco-IOS-XE-native:native/banner/login",
    		}, 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.iosxe.IosxeFunctions;
    import com.pulumi.iosxe.inputs.GetRestconfArgs;
    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 example = IosxeFunctions.getRestconf(GetRestconfArgs.builder()
                .path("Cisco-IOS-XE-native:native/banner/login")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_iosxe as iosxe
    
    example = iosxe.get_restconf(path="Cisco-IOS-XE-native:native/banner/login")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as iosxe from "@pulumi/iosxe";
    
    const example = iosxe.getRestconf({
        path: "Cisco-IOS-XE-native:native/banner/login",
    });
    
    variables:
      example:
        fn::invoke:
          Function: iosxe:getRestconf
          Arguments:
            path: Cisco-IOS-XE-native:native/banner/login
    

    Using getRestconf

    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 getRestconf(args: GetRestconfArgs, opts?: InvokeOptions): Promise<GetRestconfResult>
    function getRestconfOutput(args: GetRestconfOutputArgs, opts?: InvokeOptions): Output<GetRestconfResult>
    def get_restconf(device: Optional[str] = None,
                     path: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetRestconfResult
    def get_restconf_output(device: Optional[pulumi.Input[str]] = None,
                     path: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetRestconfResult]
    func LookupRestconf(ctx *Context, args *LookupRestconfArgs, opts ...InvokeOption) (*LookupRestconfResult, error)
    func LookupRestconfOutput(ctx *Context, args *LookupRestconfOutputArgs, opts ...InvokeOption) LookupRestconfResultOutput

    > Note: This function is named LookupRestconf in the Go SDK.

    public static class GetRestconf 
    {
        public static Task<GetRestconfResult> InvokeAsync(GetRestconfArgs args, InvokeOptions? opts = null)
        public static Output<GetRestconfResult> Invoke(GetRestconfInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRestconfResult> getRestconf(GetRestconfArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: iosxe:index/getRestconf:getRestconf
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Path string
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    Device string
    A device name from the provider configuration.
    Path string
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    Device string
    A device name from the provider configuration.
    path String
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    device String
    A device name from the provider configuration.
    path string
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    device string
    A device name from the provider configuration.
    path str
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    device str
    A device name from the provider configuration.
    path String
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    device String
    A device name from the provider configuration.

    getRestconf Result

    The following output properties are available:

    Attributes Dictionary<string, string>
    Map of key-value pairs which represents the attributes and its values.
    Id string
    The path of the retrieved object.
    Path string
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    Device string
    A device name from the provider configuration.
    Attributes map[string]string
    Map of key-value pairs which represents the attributes and its values.
    Id string
    The path of the retrieved object.
    Path string
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    Device string
    A device name from the provider configuration.
    attributes Map<String,String>
    Map of key-value pairs which represents the attributes and its values.
    id String
    The path of the retrieved object.
    path String
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    device String
    A device name from the provider configuration.
    attributes {[key: string]: string}
    Map of key-value pairs which represents the attributes and its values.
    id string
    The path of the retrieved object.
    path string
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    device string
    A device name from the provider configuration.
    attributes Mapping[str, str]
    Map of key-value pairs which represents the attributes and its values.
    id str
    The path of the retrieved object.
    path str
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    device str
    A device name from the provider configuration.
    attributes Map<String>
    Map of key-value pairs which represents the attributes and its values.
    id String
    The path of the retrieved object.
    path String
    A RESTCONF path, e.g. openconfig-interfaces:interfaces.
    device String
    A device name from the provider configuration.

    Package Details

    Repository
    iosxe lbrlabs/pulumi-iosxe
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the iosxe Terraform Provider.
    iosxe logo
    Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs