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

nxos.getBgpPeer

Explore with Pulumi AI

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

    This data source can read the BGP peer configuration.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nxos = Pulumi.Nxos;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Nxos.GetBgpPeer.Invoke(new()
        {
            Address = "192.168.0.1",
            Asn = "65001",
            Vrf = "default",
        });
    
    });
    
    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.LookupBgpPeer(ctx, &nxos.LookupBgpPeerArgs{
    			Address: "192.168.0.1",
    			Asn:     "65001",
    			Vrf:     "default",
    		}, 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.GetBgpPeerArgs;
    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 = NxosFunctions.getBgpPeer(GetBgpPeerArgs.builder()
                .address("192.168.0.1")
                .asn("65001")
                .vrf("default")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_nxos as nxos
    
    example = nxos.get_bgp_peer(address="192.168.0.1",
        asn="65001",
        vrf="default")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@pulumi/nxos";
    
    const example = nxos.getBgpPeer({
        address: "192.168.0.1",
        asn: "65001",
        vrf: "default",
    });
    
    variables:
      example:
        fn::invoke:
          Function: nxos:getBgpPeer
          Arguments:
            address: 192.168.0.1
            asn: '65001'
            vrf: default
    

    Using getBgpPeer

    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 getBgpPeer(args: GetBgpPeerArgs, opts?: InvokeOptions): Promise<GetBgpPeerResult>
    function getBgpPeerOutput(args: GetBgpPeerOutputArgs, opts?: InvokeOptions): Output<GetBgpPeerResult>
    def get_bgp_peer(address: Optional[str] = None,
                     asn: Optional[str] = None,
                     device: Optional[str] = None,
                     vrf: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetBgpPeerResult
    def get_bgp_peer_output(address: Optional[pulumi.Input[str]] = None,
                     asn: Optional[pulumi.Input[str]] = None,
                     device: Optional[pulumi.Input[str]] = None,
                     vrf: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetBgpPeerResult]
    func LookupBgpPeer(ctx *Context, args *LookupBgpPeerArgs, opts ...InvokeOption) (*LookupBgpPeerResult, error)
    func LookupBgpPeerOutput(ctx *Context, args *LookupBgpPeerOutputArgs, opts ...InvokeOption) LookupBgpPeerResultOutput

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

    public static class GetBgpPeer 
    {
        public static Task<GetBgpPeerResult> InvokeAsync(GetBgpPeerArgs args, InvokeOptions? opts = null)
        public static Output<GetBgpPeerResult> Invoke(GetBgpPeerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBgpPeerResult> getBgpPeer(GetBgpPeerArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nxos:index/getBgpPeer:getBgpPeer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Address string
    Peer address.
    Asn string
    Autonomous system number.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    Address string
    Peer address.
    Asn string
    Autonomous system number.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    address String
    Peer address.
    asn String
    Autonomous system number.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.
    address string
    Peer address.
    asn string
    Autonomous system number.
    vrf string
    VRF name.
    device string
    A device name from the provider configuration.
    address str
    Peer address.
    asn str
    Autonomous system number.
    vrf str
    VRF name.
    device str
    A device name from the provider configuration.
    address String
    Peer address.
    asn String
    Autonomous system number.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.

    getBgpPeer Result

    The following output properties are available:

    Address string
    Peer address.
    Asn string
    Autonomous system number.
    Description string
    Peer description.
    HoldTime int
    BGP Hold Timer in seconds. The value must be greater than the keepalive timer
    Id string
    The distinguished name of the object.
    Keepalive int
    BGP Keepalive Timer in seconds
    PeerTemplate string
    Peer template name.
    PeerType string
    Neighbor Fabric Type.
    RemoteAsn string
    Peer autonomous system number.
    SourceInterface string
    Source Interface. Must match first field in the output of show intf brief.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    Address string
    Peer address.
    Asn string
    Autonomous system number.
    Description string
    Peer description.
    HoldTime int
    BGP Hold Timer in seconds. The value must be greater than the keepalive timer
    Id string
    The distinguished name of the object.
    Keepalive int
    BGP Keepalive Timer in seconds
    PeerTemplate string
    Peer template name.
    PeerType string
    Neighbor Fabric Type.
    RemoteAsn string
    Peer autonomous system number.
    SourceInterface string
    Source Interface. Must match first field in the output of show intf brief.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    address String
    Peer address.
    asn String
    Autonomous system number.
    description String
    Peer description.
    holdTime Integer
    BGP Hold Timer in seconds. The value must be greater than the keepalive timer
    id String
    The distinguished name of the object.
    keepalive Integer
    BGP Keepalive Timer in seconds
    peerTemplate String
    Peer template name.
    peerType String
    Neighbor Fabric Type.
    remoteAsn String
    Peer autonomous system number.
    sourceInterface String
    Source Interface. Must match first field in the output of show intf brief.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.
    address string
    Peer address.
    asn string
    Autonomous system number.
    description string
    Peer description.
    holdTime number
    BGP Hold Timer in seconds. The value must be greater than the keepalive timer
    id string
    The distinguished name of the object.
    keepalive number
    BGP Keepalive Timer in seconds
    peerTemplate string
    Peer template name.
    peerType string
    Neighbor Fabric Type.
    remoteAsn string
    Peer autonomous system number.
    sourceInterface string
    Source Interface. Must match first field in the output of show intf brief.
    vrf string
    VRF name.
    device string
    A device name from the provider configuration.
    address str
    Peer address.
    asn str
    Autonomous system number.
    description str
    Peer description.
    hold_time int
    BGP Hold Timer in seconds. The value must be greater than the keepalive timer
    id str
    The distinguished name of the object.
    keepalive int
    BGP Keepalive Timer in seconds
    peer_template str
    Peer template name.
    peer_type str
    Neighbor Fabric Type.
    remote_asn str
    Peer autonomous system number.
    source_interface str
    Source Interface. Must match first field in the output of show intf brief.
    vrf str
    VRF name.
    device str
    A device name from the provider configuration.
    address String
    Peer address.
    asn String
    Autonomous system number.
    description String
    Peer description.
    holdTime Number
    BGP Hold Timer in seconds. The value must be greater than the keepalive timer
    id String
    The distinguished name of the object.
    keepalive Number
    BGP Keepalive Timer in seconds
    peerTemplate String
    Peer template name.
    peerType String
    Neighbor Fabric Type.
    remoteAsn String
    Peer autonomous system number.
    sourceInterface String
    Source Interface. Must match first field in the output of show intf brief.
    vrf String
    VRF name.
    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.
    nxos logo
    Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs