1. Packages
  2. Cisco IOS XE Resource Provider
  3. API Docs
  4. Bgp
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

iosxe.Bgp

Explore with Pulumi AI

iosxe logo
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

    This resource can manage the BGP configuration.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Iosxe = Lbrlabs.PulumiPackage.Iosxe;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Iosxe.Bgp("example", new()
        {
            Asn = "65000",
            DefaultIpv4Unicast = false,
            LogNeighborChanges = true,
            RouterIdLoopback = 100,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-iosxe/sdk/go/iosxe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iosxe.NewBgp(ctx, "example", &iosxe.BgpArgs{
    			Asn:                pulumi.String("65000"),
    			DefaultIpv4Unicast: pulumi.Bool(false),
    			LogNeighborChanges: pulumi.Bool(true),
    			RouterIdLoopback:   pulumi.Int(100),
    		})
    		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.iosxe.Bgp;
    import com.pulumi.iosxe.BgpArgs;
    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 example = new Bgp("example", BgpArgs.builder()        
                .asn("65000")
                .defaultIpv4Unicast(false)
                .logNeighborChanges(true)
                .routerIdLoopback(100)
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_iosxe as iosxe
    
    example = iosxe.Bgp("example",
        asn="65000",
        default_ipv4_unicast=False,
        log_neighbor_changes=True,
        router_id_loopback=100)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as iosxe from "@lbrlabs/pulumi-iosxe";
    
    const example = new iosxe.Bgp("example", {
        asn: "65000",
        defaultIpv4Unicast: false,
        logNeighborChanges: true,
        routerIdLoopback: 100,
    });
    
    resources:
      example:
        type: iosxe:Bgp
        properties:
          asn: '65000'
          defaultIpv4Unicast: false
          logNeighborChanges: true
          routerIdLoopback: 100
    

    Create Bgp Resource

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

    Constructor syntax

    new Bgp(name: string, args: BgpArgs, opts?: CustomResourceOptions);
    @overload
    def Bgp(resource_name: str,
            args: BgpArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Bgp(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            asn: Optional[str] = None,
            default_ipv4_unicast: Optional[bool] = None,
            delete_mode: Optional[str] = None,
            device: Optional[str] = None,
            log_neighbor_changes: Optional[bool] = None,
            router_id_loopback: Optional[int] = None)
    func NewBgp(ctx *Context, name string, args BgpArgs, opts ...ResourceOption) (*Bgp, error)
    public Bgp(string name, BgpArgs args, CustomResourceOptions? opts = null)
    public Bgp(String name, BgpArgs args)
    public Bgp(String name, BgpArgs args, CustomResourceOptions options)
    
    type: iosxe:Bgp
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BgpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BgpArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BgpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BgpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BgpArgs
    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 bgpResource = new Iosxe.Bgp("bgpResource", new()
    {
        Asn = "string",
        DefaultIpv4Unicast = false,
        DeleteMode = "string",
        Device = "string",
        LogNeighborChanges = false,
        RouterIdLoopback = 0,
    });
    
    example, err := iosxe.NewBgp(ctx, "bgpResource", &iosxe.BgpArgs{
    	Asn:                pulumi.String("string"),
    	DefaultIpv4Unicast: pulumi.Bool(false),
    	DeleteMode:         pulumi.String("string"),
    	Device:             pulumi.String("string"),
    	LogNeighborChanges: pulumi.Bool(false),
    	RouterIdLoopback:   pulumi.Int(0),
    })
    
    var bgpResource = new Bgp("bgpResource", BgpArgs.builder()
        .asn("string")
        .defaultIpv4Unicast(false)
        .deleteMode("string")
        .device("string")
        .logNeighborChanges(false)
        .routerIdLoopback(0)
        .build());
    
    bgp_resource = iosxe.Bgp("bgpResource",
        asn="string",
        default_ipv4_unicast=False,
        delete_mode="string",
        device="string",
        log_neighbor_changes=False,
        router_id_loopback=0)
    
    const bgpResource = new iosxe.Bgp("bgpResource", {
        asn: "string",
        defaultIpv4Unicast: false,
        deleteMode: "string",
        device: "string",
        logNeighborChanges: false,
        routerIdLoopback: 0,
    });
    
    type: iosxe:Bgp
    properties:
        asn: string
        defaultIpv4Unicast: false
        deleteMode: string
        device: string
        logNeighborChanges: false
        routerIdLoopback: 0
    

    Bgp 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 Bgp resource accepts the following input properties:

    Asn string
    DefaultIpv4Unicast bool
    Activate ipv4-unicast for a peer by default
    DeleteMode string
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    Device string
    A device name from the provider configuration.
    LogNeighborChanges bool
    Log neighbor up/down and reset reason
    RouterIdLoopback int
    Loopback interface - Range: 0-2147483647
    Asn string
    DefaultIpv4Unicast bool
    Activate ipv4-unicast for a peer by default
    DeleteMode string
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    Device string
    A device name from the provider configuration.
    LogNeighborChanges bool
    Log neighbor up/down and reset reason
    RouterIdLoopback int
    Loopback interface - Range: 0-2147483647
    asn String
    defaultIpv4Unicast Boolean
    Activate ipv4-unicast for a peer by default
    deleteMode String
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    device String
    A device name from the provider configuration.
    logNeighborChanges Boolean
    Log neighbor up/down and reset reason
    routerIdLoopback Integer
    Loopback interface - Range: 0-2147483647
    asn string
    defaultIpv4Unicast boolean
    Activate ipv4-unicast for a peer by default
    deleteMode string
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    device string
    A device name from the provider configuration.
    logNeighborChanges boolean
    Log neighbor up/down and reset reason
    routerIdLoopback number
    Loopback interface - Range: 0-2147483647
    asn str
    default_ipv4_unicast bool
    Activate ipv4-unicast for a peer by default
    delete_mode str
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    device str
    A device name from the provider configuration.
    log_neighbor_changes bool
    Log neighbor up/down and reset reason
    router_id_loopback int
    Loopback interface - Range: 0-2147483647
    asn String
    defaultIpv4Unicast Boolean
    Activate ipv4-unicast for a peer by default
    deleteMode String
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    device String
    A device name from the provider configuration.
    logNeighborChanges Boolean
    Log neighbor up/down and reset reason
    routerIdLoopback Number
    Loopback interface - Range: 0-2147483647

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Bgp Resource

    Get an existing Bgp 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?: BgpState, opts?: CustomResourceOptions): Bgp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            asn: Optional[str] = None,
            default_ipv4_unicast: Optional[bool] = None,
            delete_mode: Optional[str] = None,
            device: Optional[str] = None,
            log_neighbor_changes: Optional[bool] = None,
            router_id_loopback: Optional[int] = None) -> Bgp
    func GetBgp(ctx *Context, name string, id IDInput, state *BgpState, opts ...ResourceOption) (*Bgp, error)
    public static Bgp Get(string name, Input<string> id, BgpState? state, CustomResourceOptions? opts = null)
    public static Bgp get(String name, Output<String> id, BgpState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    Asn string
    DefaultIpv4Unicast bool
    Activate ipv4-unicast for a peer by default
    DeleteMode string
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    Device string
    A device name from the provider configuration.
    LogNeighborChanges bool
    Log neighbor up/down and reset reason
    RouterIdLoopback int
    Loopback interface - Range: 0-2147483647
    Asn string
    DefaultIpv4Unicast bool
    Activate ipv4-unicast for a peer by default
    DeleteMode string
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    Device string
    A device name from the provider configuration.
    LogNeighborChanges bool
    Log neighbor up/down and reset reason
    RouterIdLoopback int
    Loopback interface - Range: 0-2147483647
    asn String
    defaultIpv4Unicast Boolean
    Activate ipv4-unicast for a peer by default
    deleteMode String
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    device String
    A device name from the provider configuration.
    logNeighborChanges Boolean
    Log neighbor up/down and reset reason
    routerIdLoopback Integer
    Loopback interface - Range: 0-2147483647
    asn string
    defaultIpv4Unicast boolean
    Activate ipv4-unicast for a peer by default
    deleteMode string
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    device string
    A device name from the provider configuration.
    logNeighborChanges boolean
    Log neighbor up/down and reset reason
    routerIdLoopback number
    Loopback interface - Range: 0-2147483647
    asn str
    default_ipv4_unicast bool
    Activate ipv4-unicast for a peer by default
    delete_mode str
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    device str
    A device name from the provider configuration.
    log_neighbor_changes bool
    Log neighbor up/down and reset reason
    router_id_loopback int
    Loopback interface - Range: 0-2147483647
    asn String
    defaultIpv4Unicast Boolean
    Activate ipv4-unicast for a peer by default
    deleteMode String
    Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is all. - Choices: all, attributes
    device String
    A device name from the provider configuration.
    logNeighborChanges Boolean
    Log neighbor up/down and reset reason
    routerIdLoopback Number
    Loopback interface - Range: 0-2147483647

    Import

     $ pulumi import iosxe:index/bgp:Bgp example "Cisco-IOS-XE-native:native/router/Cisco-IOS-XE-bgp:bgp=65000"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    iosxe lbrlabs/pulumi-iosxe
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the iosxe Terraform Provider.
    iosxe logo
    Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs