GetDeviceBgpNeighbors

Use this datasource to retrieve list of BGP neighbors of a device in the Packet host.

To have any BGP neighbors listed, the device must be in BGP-enabled project and have a BGP session assigned.

To learn more about using BGP in Packet, see the packet..BgpSession resource documentation.

Example Usage

using Pulumi;
using Packet = Pulumi.Packet;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Packet.GetDeviceBgpNeighbors.InvokeAsync(new Packet.GetDeviceBgpNeighborsArgs
        {
            DeviceId = "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40",
        }));
        this.BgpNeighborsListing = test.Apply(test => test.BgpNeighbors);
    }

    [Output("bgpNeighborsListing")]
    public Output<string> BgpNeighborsListing { get; set; }
}

Coming soon!

import pulumi
import pulumi_packet as packet

test = packet.get_device_bgp_neighbors(device_id="4c641195-25e5-4c3c-b2b7-4cd7a42c7b40")
pulumi.export("bgpNeighborsListing", test.bgp_neighbors)
import * as pulumi from "@pulumi/pulumi";
import * as packet from "@pulumi/packet";

const test = packet.getDeviceBgpNeighbors({
    deviceId: "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40",
});
export const bgpNeighborsListing = test.then(test => test.bgpNeighbors);

Using GetDeviceBgpNeighbors

function getDeviceBgpNeighbors(args: GetDeviceBgpNeighborsArgs, opts?: InvokeOptions): Promise<GetDeviceBgpNeighborsResult>
function  get_device_bgp_neighbors(device_id=None, opts=None)
func GetDeviceBgpNeighbors(ctx *Context, args *GetDeviceBgpNeighborsArgs, opts ...InvokeOption) (*GetDeviceBgpNeighborsResult, error)
public static class GetDeviceBgpNeighbors {
    public static Task<GetDeviceBgpNeighborsResult> InvokeAsync(GetDeviceBgpNeighborsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DeviceId string

UUID of BGP-enabled device whose neighbors to list

DeviceId string

UUID of BGP-enabled device whose neighbors to list

deviceId string

UUID of BGP-enabled device whose neighbors to list

device_id str

UUID of BGP-enabled device whose neighbors to list

GetDeviceBgpNeighbors Result

The following output properties are available:

BgpNeighbors List<GetDeviceBgpNeighborsBgpNeighbor>

array of BGP neighbor records with attributes:

DeviceId string
Id string

The provider-assigned unique ID for this managed resource.

BgpNeighbors []GetDeviceBgpNeighborsBgpNeighbor

array of BGP neighbor records with attributes:

DeviceId string
Id string

The provider-assigned unique ID for this managed resource.

bgpNeighbors GetDeviceBgpNeighborsBgpNeighbor[]

array of BGP neighbor records with attributes:

deviceId string
id string

The provider-assigned unique ID for this managed resource.

bgp_neighbors List[GetDeviceBgpNeighborsBgpNeighbor]

array of BGP neighbor records with attributes:

device_id str
id str

The provider-assigned unique ID for this managed resource.

Supporting Types

GetDeviceBgpNeighborsBgpNeighbor

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AddressFamily int

IP address version, 4 or 6

CustomerAs int

Local autonomous system number

CustomerIp string

Local used peer IP address

Md5Enabled bool

Whether BGP session is password enabled

Md5Password string

BGP session password in plaintext (not a checksum)

Multihop bool

Whether the neighbor is in EBGP multihop session

PeerAs int

Peer AS number (different than customer_as for EBGP)

RoutesIns List<GetDeviceBgpNeighborsBgpNeighborRoutesInArgs>

Array of incoming routes. Each route has attributes:

RoutesOuts List<GetDeviceBgpNeighborsBgpNeighborRoutesOutArgs>

Array of outgoing routes in the same format

PeerIps List<string>

Array of IP addresses of this neighbor’s peers

AddressFamily int

IP address version, 4 or 6

CustomerAs int

Local autonomous system number

CustomerIp string

Local used peer IP address

Md5Enabled bool

Whether BGP session is password enabled

Md5Password string

BGP session password in plaintext (not a checksum)

Multihop bool

Whether the neighbor is in EBGP multihop session

PeerAs int

Peer AS number (different than customer_as for EBGP)

RoutesIns []GetDeviceBgpNeighborsBgpNeighborRoutesIn

Array of incoming routes. Each route has attributes:

RoutesOuts []GetDeviceBgpNeighborsBgpNeighborRoutesOut

Array of outgoing routes in the same format

PeerIps []string

Array of IP addresses of this neighbor’s peers

addressFamily number

IP address version, 4 or 6

customerAs number

Local autonomous system number

customerIp string

Local used peer IP address

md5Enabled boolean

Whether BGP session is password enabled

md5Password string

BGP session password in plaintext (not a checksum)

multihop boolean

Whether the neighbor is in EBGP multihop session

peerAs number

Peer AS number (different than customer_as for EBGP)

routesIns GetDeviceBgpNeighborsBgpNeighborRoutesIn[]

Array of incoming routes. Each route has attributes:

routesOuts GetDeviceBgpNeighborsBgpNeighborRoutesOut[]

Array of outgoing routes in the same format

peerIps string[]

Array of IP addresses of this neighbor’s peers

address_family float

IP address version, 4 or 6

customerAs float

Local autonomous system number

customerIp str

Local used peer IP address

md5Enabled bool

Whether BGP session is password enabled

md5Password str

BGP session password in plaintext (not a checksum)

multihop bool

Whether the neighbor is in EBGP multihop session

peerAs float

Peer AS number (different than customer_as for EBGP)

routesIns List[GetDeviceBgpNeighborsBgpNeighborRoutesIn]

Array of incoming routes. Each route has attributes:

routesOuts List[GetDeviceBgpNeighborsBgpNeighborRoutesOut]

Array of outgoing routes in the same format

peerIps List[str]

Array of IP addresses of this neighbor’s peers

GetDeviceBgpNeighborsBgpNeighborRoutesIn

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Exact bool

(bool) Whether the route is exact

Route string

CIDR expression of route (ip/mask)

Exact bool

(bool) Whether the route is exact

Route string

CIDR expression of route (ip/mask)

exact boolean

(bool) Whether the route is exact

route string

CIDR expression of route (ip/mask)

exact bool

(bool) Whether the route is exact

route str

CIDR expression of route (ip/mask)

GetDeviceBgpNeighborsBgpNeighborRoutesOut

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Exact bool

(bool) Whether the route is exact

Route string

CIDR expression of route (ip/mask)

Exact bool

(bool) Whether the route is exact

Route string

CIDR expression of route (ip/mask)

exact boolean

(bool) Whether the route is exact

route string

CIDR expression of route (ip/mask)

exact bool

(bool) Whether the route is exact

route str

CIDR expression of route (ip/mask)

Package Details

Repository
https://github.com/pulumi/pulumi-packet
License
Apache-2.0
Notes
This Pulumi package is based on the packet Terraform Provider.