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; }
}
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
})
}
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);
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>
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]
func GetDeviceBgpNeighbors(ctx *Context, args *GetDeviceBgpNeighborsArgs, opts ...InvokeOption) (*GetDeviceBgpNeighborsResult, error)
func GetDeviceBgpNeighborsOutput(ctx *Context, args *GetDeviceBgpNeighborsOutputArgs, opts ...InvokeOption) GetDeviceBgpNeighborsResultOutput
> 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)
}
public static CompletableFuture<GetDeviceBgpNeighborsResult> getDeviceBgpNeighbors(GetDeviceBgpNeighborsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: packet:index/getDeviceBgpNeighbors:getDeviceBgpNeighbors
arguments:
# arguments dictionary
The following arguments are supported:
- Device
Id string - UUID of BGP-enabled device whose neighbors to list
- Device
Id string - UUID of BGP-enabled device whose neighbors to list
- device
Id String - UUID of BGP-enabled device whose neighbors to list
- device
Id string - UUID of BGP-enabled device whose neighbors to list
- device_
id str - UUID of BGP-enabled device whose neighbors to list
- device
Id String - UUID of BGP-enabled device whose neighbors to list
getDeviceBgpNeighbors Result
The following output properties are available:
- Bgp
Neighbors List<GetDevice Bgp Neighbors Bgp Neighbor> - array of BGP neighbor records with attributes:
- Device
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Bgp
Neighbors []GetDevice Bgp Neighbors Bgp Neighbor - array of BGP neighbor records with attributes:
- Device
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- bgp
Neighbors List<GetDevice Bgp Neighbors Bgp Neighbor> - array of BGP neighbor records with attributes:
- device
Id String - id String
- The provider-assigned unique ID for this managed resource.
- bgp
Neighbors GetDevice Bgp Neighbors Bgp Neighbor[] - array of BGP neighbor records with attributes:
- device
Id string - id string
- The provider-assigned unique ID for this managed resource.
- bgp_
neighbors Sequence[GetDevice Bgp Neighbors Bgp Neighbor] - array of BGP neighbor records with attributes:
- device_
id str - id str
- The provider-assigned unique ID for this managed resource.
- bgp
Neighbors List<Property Map> - array of BGP neighbor records with attributes:
- device
Id String - id String
- The provider-assigned unique ID for this managed resource.
Supporting Types
GetDeviceBgpNeighborsBgpNeighbor
- Address
Family int - IP address version, 4 or 6
- Customer
As int - Local autonomous system number
- Customer
Ip 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
- Peer
As int - Peer AS number (different than customer_as for EBGP)
- Routes
Ins List<GetDevice Bgp Neighbors Bgp Neighbor Routes In> - Array of incoming routes. Each route has attributes:
- Routes
Outs List<GetDevice Bgp Neighbors Bgp Neighbor Routes Out> - Array of outgoing routes in the same format
- Peer
Ips List<string> - Array of IP addresses of this neighbor's peers
- Address
Family int - IP address version, 4 or 6
- Customer
As int - Local autonomous system number
- Customer
Ip 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
- Peer
As int - Peer AS number (different than customer_as for EBGP)
- Routes
Ins []GetDevice Bgp Neighbors Bgp Neighbor Routes In - Array of incoming routes. Each route has attributes:
- Routes
Outs []GetDevice Bgp Neighbors Bgp Neighbor Routes Out - Array of outgoing routes in the same format
- Peer
Ips []string - Array of IP addresses of this neighbor's peers
- address
Family Integer - IP address version, 4 or 6
- customer
As Integer - Local autonomous system number
- customer
Ip 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
- peer
As Integer - Peer AS number (different than customer_as for EBGP)
- routes
Ins List<GetDevice Bgp Neighbors Bgp Neighbor Routes In> - Array of incoming routes. Each route has attributes:
- routes
Outs List<GetDevice Bgp Neighbors Bgp Neighbor Routes Out> - Array of outgoing routes in the same format
- peer
Ips List<String> - Array of IP addresses of this neighbor's peers
- address
Family number - IP address version, 4 or 6
- customer
As number - Local autonomous system number
- customer
Ip 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
- peer
As number - Peer AS number (different than customer_as for EBGP)
- routes
Ins GetDevice Bgp Neighbors Bgp Neighbor Routes In[] - Array of incoming routes. Each route has attributes:
- routes
Outs GetDevice Bgp Neighbors Bgp Neighbor Routes Out[] - Array of outgoing routes in the same format
- peer
Ips string[] - Array of IP addresses of this neighbor's peers
- address_
family int - IP address version, 4 or 6
- customer_
as int - Local autonomous system number
- customer_
ip str - Local used peer IP address
- md5_
enabled bool - Whether BGP session is password enabled
- md5_
password str - BGP session password in plaintext (not a checksum)
- multihop bool
- Whether the neighbor is in EBGP multihop session
- peer_
as int - Peer AS number (different than customer_as for EBGP)
- routes_
ins Sequence[GetDevice Bgp Neighbors Bgp Neighbor Routes In] - Array of incoming routes. Each route has attributes:
- routes_
outs Sequence[GetDevice Bgp Neighbors Bgp Neighbor Routes Out] - Array of outgoing routes in the same format
- peer_
ips Sequence[str] - Array of IP addresses of this neighbor's peers
- address
Family Number - IP address version, 4 or 6
- customer
As Number - Local autonomous system number
- customer
Ip 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
- peer
As Number - Peer AS number (different than customer_as for EBGP)
- routes
Ins List<Property Map> - Array of incoming routes. Each route has attributes:
- routes
Outs List<Property Map> - Array of outgoing routes in the same format
- peer
Ips List<String> - Array of IP addresses of this neighbor's peers
GetDeviceBgpNeighborsBgpNeighborRoutesIn
GetDeviceBgpNeighborsBgpNeighborRoutesOut
Package Details
- Repository
- Packet pulumi/pulumi-packet
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
packet
Terraform Provider.