1. Packages
  2. AWS
  3. API Docs
  4. directconnect
  5. BgpPeer
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.directconnect.BgpPeer

Explore with Pulumi AI

Provides a Direct Connect BGP peer resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const peer = new aws.directconnect.BgpPeer("peer", {
    virtualInterfaceId: foo.id,
    addressFamily: "ipv6",
    bgpAsn: 65351,
});
Copy
import pulumi
import pulumi_aws as aws

peer = aws.directconnect.BgpPeer("peer",
    virtual_interface_id=foo["id"],
    address_family="ipv6",
    bgp_asn=65351)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := directconnect.NewBgpPeer(ctx, "peer", &directconnect.BgpPeerArgs{
			VirtualInterfaceId: pulumi.Any(foo.Id),
			AddressFamily:      pulumi.String("ipv6"),
			BgpAsn:             pulumi.Int(65351),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var peer = new Aws.DirectConnect.BgpPeer("peer", new()
    {
        VirtualInterfaceId = foo.Id,
        AddressFamily = "ipv6",
        BgpAsn = 65351,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.directconnect.BgpPeer;
import com.pulumi.aws.directconnect.BgpPeerArgs;
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) {
        var peer = new BgpPeer("peer", BgpPeerArgs.builder()
            .virtualInterfaceId(foo.id())
            .addressFamily("ipv6")
            .bgpAsn(65351)
            .build());

    }
}
Copy
resources:
  peer:
    type: aws:directconnect:BgpPeer
    properties:
      virtualInterfaceId: ${foo.id}
      addressFamily: ipv6
      bgpAsn: 65351
Copy

Create BgpPeer Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new BgpPeer(name: string, args: BgpPeerArgs, opts?: CustomResourceOptions);
@overload
def BgpPeer(resource_name: str,
            args: BgpPeerArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def BgpPeer(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            address_family: Optional[str] = None,
            bgp_asn: Optional[int] = None,
            virtual_interface_id: Optional[str] = None,
            amazon_address: Optional[str] = None,
            bgp_auth_key: Optional[str] = None,
            customer_address: Optional[str] = None)
func NewBgpPeer(ctx *Context, name string, args BgpPeerArgs, opts ...ResourceOption) (*BgpPeer, error)
public BgpPeer(string name, BgpPeerArgs args, CustomResourceOptions? opts = null)
public BgpPeer(String name, BgpPeerArgs args)
public BgpPeer(String name, BgpPeerArgs args, CustomResourceOptions options)
type: aws:directconnect:BgpPeer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. BgpPeerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. BgpPeerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. BgpPeerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BgpPeerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BgpPeerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var bgpPeerResource = new Aws.DirectConnect.BgpPeer("bgpPeerResource", new()
{
    AddressFamily = "string",
    BgpAsn = 0,
    VirtualInterfaceId = "string",
    AmazonAddress = "string",
    BgpAuthKey = "string",
    CustomerAddress = "string",
});
Copy
example, err := directconnect.NewBgpPeer(ctx, "bgpPeerResource", &directconnect.BgpPeerArgs{
	AddressFamily:      pulumi.String("string"),
	BgpAsn:             pulumi.Int(0),
	VirtualInterfaceId: pulumi.String("string"),
	AmazonAddress:      pulumi.String("string"),
	BgpAuthKey:         pulumi.String("string"),
	CustomerAddress:    pulumi.String("string"),
})
Copy
var bgpPeerResource = new BgpPeer("bgpPeerResource", BgpPeerArgs.builder()
    .addressFamily("string")
    .bgpAsn(0)
    .virtualInterfaceId("string")
    .amazonAddress("string")
    .bgpAuthKey("string")
    .customerAddress("string")
    .build());
Copy
bgp_peer_resource = aws.directconnect.BgpPeer("bgpPeerResource",
    address_family="string",
    bgp_asn=0,
    virtual_interface_id="string",
    amazon_address="string",
    bgp_auth_key="string",
    customer_address="string")
Copy
const bgpPeerResource = new aws.directconnect.BgpPeer("bgpPeerResource", {
    addressFamily: "string",
    bgpAsn: 0,
    virtualInterfaceId: "string",
    amazonAddress: "string",
    bgpAuthKey: "string",
    customerAddress: "string",
});
Copy
type: aws:directconnect:BgpPeer
properties:
    addressFamily: string
    amazonAddress: string
    bgpAsn: 0
    bgpAuthKey: string
    customerAddress: string
    virtualInterfaceId: string
Copy

BgpPeer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The BgpPeer resource accepts the following input properties:

AddressFamily
This property is required.
Changes to this property will trigger replacement.
string
The address family for the BGP peer. ipv4 or ipv6.
BgpAsn
This property is required.
Changes to this property will trigger replacement.
int
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
VirtualInterfaceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Direct Connect virtual interface on which to create the BGP peer.
AmazonAddress Changes to this property will trigger replacement. string
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
BgpAuthKey Changes to this property will trigger replacement. string
The authentication key for BGP configuration.
CustomerAddress Changes to this property will trigger replacement. string
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
AddressFamily
This property is required.
Changes to this property will trigger replacement.
string
The address family for the BGP peer. ipv4 or ipv6.
BgpAsn
This property is required.
Changes to this property will trigger replacement.
int
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
VirtualInterfaceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Direct Connect virtual interface on which to create the BGP peer.
AmazonAddress Changes to this property will trigger replacement. string
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
BgpAuthKey Changes to this property will trigger replacement. string
The authentication key for BGP configuration.
CustomerAddress Changes to this property will trigger replacement. string
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
addressFamily
This property is required.
Changes to this property will trigger replacement.
String
The address family for the BGP peer. ipv4 or ipv6.
bgpAsn
This property is required.
Changes to this property will trigger replacement.
Integer
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
virtualInterfaceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Direct Connect virtual interface on which to create the BGP peer.
amazonAddress Changes to this property will trigger replacement. String
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
bgpAuthKey Changes to this property will trigger replacement. String
The authentication key for BGP configuration.
customerAddress Changes to this property will trigger replacement. String
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
addressFamily
This property is required.
Changes to this property will trigger replacement.
string
The address family for the BGP peer. ipv4 or ipv6.
bgpAsn
This property is required.
Changes to this property will trigger replacement.
number
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
virtualInterfaceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Direct Connect virtual interface on which to create the BGP peer.
amazonAddress Changes to this property will trigger replacement. string
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
bgpAuthKey Changes to this property will trigger replacement. string
The authentication key for BGP configuration.
customerAddress Changes to this property will trigger replacement. string
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
address_family
This property is required.
Changes to this property will trigger replacement.
str
The address family for the BGP peer. ipv4 or ipv6.
bgp_asn
This property is required.
Changes to this property will trigger replacement.
int
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
virtual_interface_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Direct Connect virtual interface on which to create the BGP peer.
amazon_address Changes to this property will trigger replacement. str
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
bgp_auth_key Changes to this property will trigger replacement. str
The authentication key for BGP configuration.
customer_address Changes to this property will trigger replacement. str
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
addressFamily
This property is required.
Changes to this property will trigger replacement.
String
The address family for the BGP peer. ipv4 or ipv6.
bgpAsn
This property is required.
Changes to this property will trigger replacement.
Number
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
virtualInterfaceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Direct Connect virtual interface on which to create the BGP peer.
amazonAddress Changes to this property will trigger replacement. String
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
bgpAuthKey Changes to this property will trigger replacement. String
The authentication key for BGP configuration.
customerAddress Changes to this property will trigger replacement. String
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.

Outputs

All input properties are implicitly available as output properties. Additionally, the BgpPeer resource produces the following output properties:

AwsDevice string
The Direct Connect endpoint on which the BGP peer terminates.
BgpPeerId string
The ID of the BGP peer.
BgpStatus string
The Up/Down state of the BGP peer.
Id string
The provider-assigned unique ID for this managed resource.
AwsDevice string
The Direct Connect endpoint on which the BGP peer terminates.
BgpPeerId string
The ID of the BGP peer.
BgpStatus string
The Up/Down state of the BGP peer.
Id string
The provider-assigned unique ID for this managed resource.
awsDevice String
The Direct Connect endpoint on which the BGP peer terminates.
bgpPeerId String
The ID of the BGP peer.
bgpStatus String
The Up/Down state of the BGP peer.
id String
The provider-assigned unique ID for this managed resource.
awsDevice string
The Direct Connect endpoint on which the BGP peer terminates.
bgpPeerId string
The ID of the BGP peer.
bgpStatus string
The Up/Down state of the BGP peer.
id string
The provider-assigned unique ID for this managed resource.
aws_device str
The Direct Connect endpoint on which the BGP peer terminates.
bgp_peer_id str
The ID of the BGP peer.
bgp_status str
The Up/Down state of the BGP peer.
id str
The provider-assigned unique ID for this managed resource.
awsDevice String
The Direct Connect endpoint on which the BGP peer terminates.
bgpPeerId String
The ID of the BGP peer.
bgpStatus String
The Up/Down state of the BGP peer.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing BgpPeer Resource

Get an existing BgpPeer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BgpPeerState, opts?: CustomResourceOptions): BgpPeer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        address_family: Optional[str] = None,
        amazon_address: Optional[str] = None,
        aws_device: Optional[str] = None,
        bgp_asn: Optional[int] = None,
        bgp_auth_key: Optional[str] = None,
        bgp_peer_id: Optional[str] = None,
        bgp_status: Optional[str] = None,
        customer_address: Optional[str] = None,
        virtual_interface_id: Optional[str] = None) -> BgpPeer
func GetBgpPeer(ctx *Context, name string, id IDInput, state *BgpPeerState, opts ...ResourceOption) (*BgpPeer, error)
public static BgpPeer Get(string name, Input<string> id, BgpPeerState? state, CustomResourceOptions? opts = null)
public static BgpPeer get(String name, Output<String> id, BgpPeerState state, CustomResourceOptions options)
resources:  _:    type: aws:directconnect:BgpPeer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AddressFamily Changes to this property will trigger replacement. string
The address family for the BGP peer. ipv4 or ipv6.
AmazonAddress Changes to this property will trigger replacement. string
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
AwsDevice string
The Direct Connect endpoint on which the BGP peer terminates.
BgpAsn Changes to this property will trigger replacement. int
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
BgpAuthKey Changes to this property will trigger replacement. string
The authentication key for BGP configuration.
BgpPeerId string
The ID of the BGP peer.
BgpStatus string
The Up/Down state of the BGP peer.
CustomerAddress Changes to this property will trigger replacement. string
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
VirtualInterfaceId Changes to this property will trigger replacement. string
The ID of the Direct Connect virtual interface on which to create the BGP peer.
AddressFamily Changes to this property will trigger replacement. string
The address family for the BGP peer. ipv4 or ipv6.
AmazonAddress Changes to this property will trigger replacement. string
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
AwsDevice string
The Direct Connect endpoint on which the BGP peer terminates.
BgpAsn Changes to this property will trigger replacement. int
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
BgpAuthKey Changes to this property will trigger replacement. string
The authentication key for BGP configuration.
BgpPeerId string
The ID of the BGP peer.
BgpStatus string
The Up/Down state of the BGP peer.
CustomerAddress Changes to this property will trigger replacement. string
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
VirtualInterfaceId Changes to this property will trigger replacement. string
The ID of the Direct Connect virtual interface on which to create the BGP peer.
addressFamily Changes to this property will trigger replacement. String
The address family for the BGP peer. ipv4 or ipv6.
amazonAddress Changes to this property will trigger replacement. String
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
awsDevice String
The Direct Connect endpoint on which the BGP peer terminates.
bgpAsn Changes to this property will trigger replacement. Integer
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
bgpAuthKey Changes to this property will trigger replacement. String
The authentication key for BGP configuration.
bgpPeerId String
The ID of the BGP peer.
bgpStatus String
The Up/Down state of the BGP peer.
customerAddress Changes to this property will trigger replacement. String
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
virtualInterfaceId Changes to this property will trigger replacement. String
The ID of the Direct Connect virtual interface on which to create the BGP peer.
addressFamily Changes to this property will trigger replacement. string
The address family for the BGP peer. ipv4 or ipv6.
amazonAddress Changes to this property will trigger replacement. string
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
awsDevice string
The Direct Connect endpoint on which the BGP peer terminates.
bgpAsn Changes to this property will trigger replacement. number
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
bgpAuthKey Changes to this property will trigger replacement. string
The authentication key for BGP configuration.
bgpPeerId string
The ID of the BGP peer.
bgpStatus string
The Up/Down state of the BGP peer.
customerAddress Changes to this property will trigger replacement. string
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
virtualInterfaceId Changes to this property will trigger replacement. string
The ID of the Direct Connect virtual interface on which to create the BGP peer.
address_family Changes to this property will trigger replacement. str
The address family for the BGP peer. ipv4 or ipv6.
amazon_address Changes to this property will trigger replacement. str
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
aws_device str
The Direct Connect endpoint on which the BGP peer terminates.
bgp_asn Changes to this property will trigger replacement. int
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
bgp_auth_key Changes to this property will trigger replacement. str
The authentication key for BGP configuration.
bgp_peer_id str
The ID of the BGP peer.
bgp_status str
The Up/Down state of the BGP peer.
customer_address Changes to this property will trigger replacement. str
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
virtual_interface_id Changes to this property will trigger replacement. str
The ID of the Direct Connect virtual interface on which to create the BGP peer.
addressFamily Changes to this property will trigger replacement. String
The address family for the BGP peer. ipv4 or ipv6.
amazonAddress Changes to this property will trigger replacement. String
The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers on public virtual interfaces.
awsDevice String
The Direct Connect endpoint on which the BGP peer terminates.
bgpAsn Changes to this property will trigger replacement. Number
The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
bgpAuthKey Changes to this property will trigger replacement. String
The authentication key for BGP configuration.
bgpPeerId String
The ID of the BGP peer.
bgpStatus String
The Up/Down state of the BGP peer.
customerAddress Changes to this property will trigger replacement. String
The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers on public virtual interfaces.
virtualInterfaceId Changes to this property will trigger replacement. String
The ID of the Direct Connect virtual interface on which to create the BGP peer.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.