1. Packages
  2. Packet
  3. API Docs
  4. getDeviceBgpNeighbors
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

packet.getDeviceBgpNeighbors

Explore with Pulumi AI

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; }
}
Copy
package main

import (
	"github.com/pulumi/pulumi-packet/sdk/v3/go/packet"
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test, err := packet.GetDeviceBgpNeighbors(ctx, &packet.GetDeviceBgpNeighborsArgs{
			DeviceId: "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("bgpNeighborsListing", test.BgpNeighbors)
		return nil
	})
}
Copy

Coming soon!

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

Coming soon!

Using getDeviceBgpNeighbors

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 getDeviceBgpNeighbors(args: GetDeviceBgpNeighborsArgs, opts?: InvokeOptions): Promise<GetDeviceBgpNeighborsResult>
function getDeviceBgpNeighborsOutput(args: GetDeviceBgpNeighborsOutputArgs, opts?: InvokeOptions): Output<GetDeviceBgpNeighborsResult>
Copy
def get_device_bgp_neighbors(device_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetDeviceBgpNeighborsResult
def get_device_bgp_neighbors_output(device_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetDeviceBgpNeighborsResult]
Copy
func GetDeviceBgpNeighbors(ctx *Context, args *GetDeviceBgpNeighborsArgs, opts ...InvokeOption) (*GetDeviceBgpNeighborsResult, error)
func GetDeviceBgpNeighborsOutput(ctx *Context, args *GetDeviceBgpNeighborsOutputArgs, opts ...InvokeOption) GetDeviceBgpNeighborsResultOutput
Copy

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

public static class GetDeviceBgpNeighbors 
{
    public static Task<GetDeviceBgpNeighborsResult> InvokeAsync(GetDeviceBgpNeighborsArgs args, InvokeOptions? opts = null)
    public static Output<GetDeviceBgpNeighborsResult> Invoke(GetDeviceBgpNeighborsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDeviceBgpNeighborsResult> getDeviceBgpNeighbors(GetDeviceBgpNeighborsArgs args, InvokeOptions options)
public static Output<GetDeviceBgpNeighborsResult> getDeviceBgpNeighbors(GetDeviceBgpNeighborsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: packet:index/getDeviceBgpNeighbors:getDeviceBgpNeighbors
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DeviceId This property is required. string
UUID of BGP-enabled device whose neighbors to list
DeviceId This property is required. string
UUID of BGP-enabled device whose neighbors to list
deviceId This property is required. String
UUID of BGP-enabled device whose neighbors to list
deviceId This property is required. string
UUID of BGP-enabled device whose neighbors to list
device_id This property is required. str
UUID of BGP-enabled device whose neighbors to list
deviceId This property is required. String
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 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.
bgp_neighbors Sequence[GetDeviceBgpNeighborsBgpNeighbor]
array of BGP neighbor records with attributes:
device_id str
id str
The provider-assigned unique ID for this managed resource.
bgpNeighbors List<Property Map>
array of BGP neighbor records with attributes:
deviceId String
id String
The provider-assigned unique ID for this managed resource.

Supporting Types

GetDeviceBgpNeighborsBgpNeighbor

AddressFamily This property is required. int
IP address version, 4 or 6
CustomerAs This property is required. int
Local autonomous system number
CustomerIp This property is required. string
Local used peer IP address
Md5Enabled This property is required. bool
Whether BGP session is password enabled
Md5Password This property is required. string
BGP session password in plaintext (not a checksum)
Multihop This property is required. bool
Whether the neighbor is in EBGP multihop session
PeerAs This property is required. int
Peer AS number (different than customer_as for EBGP)
RoutesIns This property is required. List<GetDeviceBgpNeighborsBgpNeighborRoutesIn>
Array of incoming routes. Each route has attributes:
RoutesOuts This property is required. List<GetDeviceBgpNeighborsBgpNeighborRoutesOut>
Array of outgoing routes in the same format
PeerIps List<string>
Array of IP addresses of this neighbor's peers
AddressFamily This property is required. int
IP address version, 4 or 6
CustomerAs This property is required. int
Local autonomous system number
CustomerIp This property is required. string
Local used peer IP address
Md5Enabled This property is required. bool
Whether BGP session is password enabled
Md5Password This property is required. string
BGP session password in plaintext (not a checksum)
Multihop This property is required. bool
Whether the neighbor is in EBGP multihop session
PeerAs This property is required. int
Peer AS number (different than customer_as for EBGP)
RoutesIns This property is required. []GetDeviceBgpNeighborsBgpNeighborRoutesIn
Array of incoming routes. Each route has attributes:
RoutesOuts This property is required. []GetDeviceBgpNeighborsBgpNeighborRoutesOut
Array of outgoing routes in the same format
PeerIps []string
Array of IP addresses of this neighbor's peers
addressFamily This property is required. Integer
IP address version, 4 or 6
customerAs This property is required. Integer
Local autonomous system number
customerIp This property is required. String
Local used peer IP address
md5Enabled This property is required. Boolean
Whether BGP session is password enabled
md5Password This property is required. String
BGP session password in plaintext (not a checksum)
multihop This property is required. Boolean
Whether the neighbor is in EBGP multihop session
peerAs This property is required. Integer
Peer AS number (different than customer_as for EBGP)
routesIns This property is required. List<GetDeviceBgpNeighborsBgpNeighborRoutesIn>
Array of incoming routes. Each route has attributes:
routesOuts This property is required. List<GetDeviceBgpNeighborsBgpNeighborRoutesOut>
Array of outgoing routes in the same format
peerIps List<String>
Array of IP addresses of this neighbor's peers
addressFamily This property is required. number
IP address version, 4 or 6
customerAs This property is required. number
Local autonomous system number
customerIp This property is required. string
Local used peer IP address
md5Enabled This property is required. boolean
Whether BGP session is password enabled
md5Password This property is required. string
BGP session password in plaintext (not a checksum)
multihop This property is required. boolean
Whether the neighbor is in EBGP multihop session
peerAs This property is required. number
Peer AS number (different than customer_as for EBGP)
routesIns This property is required. GetDeviceBgpNeighborsBgpNeighborRoutesIn[]
Array of incoming routes. Each route has attributes:
routesOuts This property is required. GetDeviceBgpNeighborsBgpNeighborRoutesOut[]
Array of outgoing routes in the same format
peerIps string[]
Array of IP addresses of this neighbor's peers
address_family This property is required. int
IP address version, 4 or 6
customer_as This property is required. int
Local autonomous system number
customer_ip This property is required. str
Local used peer IP address
md5_enabled This property is required. bool
Whether BGP session is password enabled
md5_password This property is required. str
BGP session password in plaintext (not a checksum)
multihop This property is required. bool
Whether the neighbor is in EBGP multihop session
peer_as This property is required. int
Peer AS number (different than customer_as for EBGP)
routes_ins This property is required. Sequence[GetDeviceBgpNeighborsBgpNeighborRoutesIn]
Array of incoming routes. Each route has attributes:
routes_outs This property is required. Sequence[GetDeviceBgpNeighborsBgpNeighborRoutesOut]
Array of outgoing routes in the same format
peer_ips Sequence[str]
Array of IP addresses of this neighbor's peers
addressFamily This property is required. Number
IP address version, 4 or 6
customerAs This property is required. Number
Local autonomous system number
customerIp This property is required. String
Local used peer IP address
md5Enabled This property is required. Boolean
Whether BGP session is password enabled
md5Password This property is required. String
BGP session password in plaintext (not a checksum)
multihop This property is required. Boolean
Whether the neighbor is in EBGP multihop session
peerAs This property is required. Number
Peer AS number (different than customer_as for EBGP)
routesIns This property is required. List<Property Map>
Array of incoming routes. Each route has attributes:
routesOuts This property is required. List<Property Map>
Array of outgoing routes in the same format
peerIps List<String>
Array of IP addresses of this neighbor's peers

GetDeviceBgpNeighborsBgpNeighborRoutesIn

Exact This property is required. bool
(bool) Whether the route is exact
Route This property is required. string
CIDR expression of route (ip/mask)
Exact This property is required. bool
(bool) Whether the route is exact
Route This property is required. string
CIDR expression of route (ip/mask)
exact This property is required. Boolean
(bool) Whether the route is exact
route This property is required. String
CIDR expression of route (ip/mask)
exact This property is required. boolean
(bool) Whether the route is exact
route This property is required. string
CIDR expression of route (ip/mask)
exact This property is required. bool
(bool) Whether the route is exact
route This property is required. str
CIDR expression of route (ip/mask)
exact This property is required. Boolean
(bool) Whether the route is exact
route This property is required. String
CIDR expression of route (ip/mask)

GetDeviceBgpNeighborsBgpNeighborRoutesOut

Exact This property is required. bool
(bool) Whether the route is exact
Route This property is required. string
CIDR expression of route (ip/mask)
Exact This property is required. bool
(bool) Whether the route is exact
Route This property is required. string
CIDR expression of route (ip/mask)
exact This property is required. Boolean
(bool) Whether the route is exact
route This property is required. String
CIDR expression of route (ip/mask)
exact This property is required. boolean
(bool) Whether the route is exact
route This property is required. string
CIDR expression of route (ip/mask)
exact This property is required. bool
(bool) Whether the route is exact
route This property is required. str
CIDR expression of route (ip/mask)
exact This property is required. Boolean
(bool) Whether the route is exact
route This property is required. String
CIDR expression of route (ip/mask)

Package Details

Repository
Packet pulumi/pulumi-packet
License
Apache-2.0
Notes
This Pulumi package is based on the packet Terraform Provider.