1. Packages
  2. Cisco NX OS Resource Provider
  3. API Docs
  4. BgpPeerTemplateMaxPrefix
Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs

nxos.BgpPeerTemplateMaxPrefix

Explore with Pulumi AI

nxos logo
Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs

    This resource can manage the BGP peer template Maximum Prefix Policy configuration.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nxos = Lbrlabs.PulumiPackage.Nxos;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Nxos.BgpPeerTemplateMaxPrefix("example", new()
        {
            Action = "log",
            AddressFamily = "ipv4-ucast",
            Asn = "65001",
            MaximumPrefix = 10000,
            RestartTime = 0,
            TemplateName = "SPINE-PEERS",
            Threshold = 30,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-nxos/sdk/go/nxos"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nxos.NewBgpPeerTemplateMaxPrefix(ctx, "example", &nxos.BgpPeerTemplateMaxPrefixArgs{
    			Action:        pulumi.String("log"),
    			AddressFamily: pulumi.String("ipv4-ucast"),
    			Asn:           pulumi.String("65001"),
    			MaximumPrefix: pulumi.Int(10000),
    			RestartTime:   pulumi.Int(0),
    			TemplateName:  pulumi.String("SPINE-PEERS"),
    			Threshold:     pulumi.Int(30),
    		})
    		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.nxos.BgpPeerTemplateMaxPrefix;
    import com.pulumi.nxos.BgpPeerTemplateMaxPrefixArgs;
    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 BgpPeerTemplateMaxPrefix("example", BgpPeerTemplateMaxPrefixArgs.builder()        
                .action("log")
                .addressFamily("ipv4-ucast")
                .asn("65001")
                .maximumPrefix(10000)
                .restartTime(0)
                .templateName("SPINE-PEERS")
                .threshold(30)
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_nxos as nxos
    
    example = nxos.BgpPeerTemplateMaxPrefix("example",
        action="log",
        address_family="ipv4-ucast",
        asn="65001",
        maximum_prefix=10000,
        restart_time=0,
        template_name="SPINE-PEERS",
        threshold=30)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@lbrlabs/pulumi-nxos";
    
    const example = new nxos.BgpPeerTemplateMaxPrefix("example", {
        action: "log",
        addressFamily: "ipv4-ucast",
        asn: "65001",
        maximumPrefix: 10000,
        restartTime: 0,
        templateName: "SPINE-PEERS",
        threshold: 30,
    });
    
    resources:
      example:
        type: nxos:BgpPeerTemplateMaxPrefix
        properties:
          action: log
          addressFamily: ipv4-ucast
          asn: '65001'
          maximumPrefix: 10000
          restartTime: 0
          templateName: SPINE-PEERS
          threshold: 30
    

    Create BgpPeerTemplateMaxPrefix Resource

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

    Constructor syntax

    new BgpPeerTemplateMaxPrefix(name: string, args: BgpPeerTemplateMaxPrefixArgs, opts?: CustomResourceOptions);
    @overload
    def BgpPeerTemplateMaxPrefix(resource_name: str,
                                 args: BgpPeerTemplateMaxPrefixArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def BgpPeerTemplateMaxPrefix(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 address_family: Optional[str] = None,
                                 asn: Optional[str] = None,
                                 template_name: Optional[str] = None,
                                 action: Optional[str] = None,
                                 device: Optional[str] = None,
                                 maximum_prefix: Optional[int] = None,
                                 restart_time: Optional[int] = None,
                                 threshold: Optional[int] = None)
    func NewBgpPeerTemplateMaxPrefix(ctx *Context, name string, args BgpPeerTemplateMaxPrefixArgs, opts ...ResourceOption) (*BgpPeerTemplateMaxPrefix, error)
    public BgpPeerTemplateMaxPrefix(string name, BgpPeerTemplateMaxPrefixArgs args, CustomResourceOptions? opts = null)
    public BgpPeerTemplateMaxPrefix(String name, BgpPeerTemplateMaxPrefixArgs args)
    public BgpPeerTemplateMaxPrefix(String name, BgpPeerTemplateMaxPrefixArgs args, CustomResourceOptions options)
    
    type: nxos:BgpPeerTemplateMaxPrefix
    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 BgpPeerTemplateMaxPrefixArgs
    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 BgpPeerTemplateMaxPrefixArgs
    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 BgpPeerTemplateMaxPrefixArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BgpPeerTemplateMaxPrefixArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BgpPeerTemplateMaxPrefixArgs
    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 bgpPeerTemplateMaxPrefixResource = new Nxos.BgpPeerTemplateMaxPrefix("bgpPeerTemplateMaxPrefixResource", new()
    {
        AddressFamily = "string",
        Asn = "string",
        TemplateName = "string",
        Action = "string",
        Device = "string",
        MaximumPrefix = 0,
        RestartTime = 0,
        Threshold = 0,
    });
    
    example, err := nxos.NewBgpPeerTemplateMaxPrefix(ctx, "bgpPeerTemplateMaxPrefixResource", &nxos.BgpPeerTemplateMaxPrefixArgs{
    	AddressFamily: pulumi.String("string"),
    	Asn:           pulumi.String("string"),
    	TemplateName:  pulumi.String("string"),
    	Action:        pulumi.String("string"),
    	Device:        pulumi.String("string"),
    	MaximumPrefix: pulumi.Int(0),
    	RestartTime:   pulumi.Int(0),
    	Threshold:     pulumi.Int(0),
    })
    
    var bgpPeerTemplateMaxPrefixResource = new BgpPeerTemplateMaxPrefix("bgpPeerTemplateMaxPrefixResource", BgpPeerTemplateMaxPrefixArgs.builder()
        .addressFamily("string")
        .asn("string")
        .templateName("string")
        .action("string")
        .device("string")
        .maximumPrefix(0)
        .restartTime(0)
        .threshold(0)
        .build());
    
    bgp_peer_template_max_prefix_resource = nxos.BgpPeerTemplateMaxPrefix("bgpPeerTemplateMaxPrefixResource",
        address_family="string",
        asn="string",
        template_name="string",
        action="string",
        device="string",
        maximum_prefix=0,
        restart_time=0,
        threshold=0)
    
    const bgpPeerTemplateMaxPrefixResource = new nxos.BgpPeerTemplateMaxPrefix("bgpPeerTemplateMaxPrefixResource", {
        addressFamily: "string",
        asn: "string",
        templateName: "string",
        action: "string",
        device: "string",
        maximumPrefix: 0,
        restartTime: 0,
        threshold: 0,
    });
    
    type: nxos:BgpPeerTemplateMaxPrefix
    properties:
        action: string
        addressFamily: string
        asn: string
        device: string
        maximumPrefix: 0
        restartTime: 0
        templateName: string
        threshold: 0
    

    BgpPeerTemplateMaxPrefix Resource Properties

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

    Inputs

    The BgpPeerTemplateMaxPrefix resource accepts the following input properties:

    AddressFamily string
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    Asn string
    Autonomous system number.
    TemplateName string
    Peer template name.
    Action string
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    Device string
    A device name from the provider configuration.
    MaximumPrefix int
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    RestartTime int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    Threshold int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    AddressFamily string
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    Asn string
    Autonomous system number.
    TemplateName string
    Peer template name.
    Action string
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    Device string
    A device name from the provider configuration.
    MaximumPrefix int
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    RestartTime int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    Threshold int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    addressFamily String
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    asn String
    Autonomous system number.
    templateName String
    Peer template name.
    action String
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    device String
    A device name from the provider configuration.
    maximumPrefix Integer
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    restartTime Integer
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    threshold Integer
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    addressFamily string
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    asn string
    Autonomous system number.
    templateName string
    Peer template name.
    action string
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    device string
    A device name from the provider configuration.
    maximumPrefix number
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    restartTime number
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    threshold number
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    address_family str
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    asn str
    Autonomous system number.
    template_name str
    Peer template name.
    action str
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    device str
    A device name from the provider configuration.
    maximum_prefix int
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    restart_time int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    threshold int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    addressFamily String
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    asn String
    Autonomous system number.
    templateName String
    Peer template name.
    action String
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    device String
    A device name from the provider configuration.
    maximumPrefix Number
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    restartTime Number
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    threshold Number
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BgpPeerTemplateMaxPrefix 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 BgpPeerTemplateMaxPrefix Resource

    Get an existing BgpPeerTemplateMaxPrefix 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?: BgpPeerTemplateMaxPrefixState, opts?: CustomResourceOptions): BgpPeerTemplateMaxPrefix
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            address_family: Optional[str] = None,
            asn: Optional[str] = None,
            device: Optional[str] = None,
            maximum_prefix: Optional[int] = None,
            restart_time: Optional[int] = None,
            template_name: Optional[str] = None,
            threshold: Optional[int] = None) -> BgpPeerTemplateMaxPrefix
    func GetBgpPeerTemplateMaxPrefix(ctx *Context, name string, id IDInput, state *BgpPeerTemplateMaxPrefixState, opts ...ResourceOption) (*BgpPeerTemplateMaxPrefix, error)
    public static BgpPeerTemplateMaxPrefix Get(string name, Input<string> id, BgpPeerTemplateMaxPrefixState? state, CustomResourceOptions? opts = null)
    public static BgpPeerTemplateMaxPrefix get(String name, Output<String> id, BgpPeerTemplateMaxPrefixState 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:
    Action string
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    AddressFamily string
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    Asn string
    Autonomous system number.
    Device string
    A device name from the provider configuration.
    MaximumPrefix int
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    RestartTime int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    TemplateName string
    Peer template name.
    Threshold int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    Action string
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    AddressFamily string
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    Asn string
    Autonomous system number.
    Device string
    A device name from the provider configuration.
    MaximumPrefix int
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    RestartTime int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    TemplateName string
    Peer template name.
    Threshold int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    action String
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    addressFamily String
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    asn String
    Autonomous system number.
    device String
    A device name from the provider configuration.
    maximumPrefix Integer
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    restartTime Integer
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    templateName String
    Peer template name.
    threshold Integer
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    action string
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    addressFamily string
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    asn string
    Autonomous system number.
    device string
    A device name from the provider configuration.
    maximumPrefix number
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    restartTime number
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    templateName string
    Peer template name.
    threshold number
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    action str
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    address_family str
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    asn str
    Autonomous system number.
    device str
    A device name from the provider configuration.
    maximum_prefix int
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    restart_time int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    template_name str
    Peer template name.
    threshold int
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0
    action String
    Action to do when limit is exceeded. - Choices: log, shut, restart - Default value: shut
    addressFamily String
    Address Family. - Choices: ipv4-ucast, ipv4-mcast, vpnv4-ucast, ipv6-ucast, ipv6-mcast, vpnv6-ucast, vpnv6-mcast, l2vpn-evpn, ipv4-lucast, ipv6-lucast, lnkstate, ipv4-mvpn, ipv6-mvpn, l2vpn-vpls, ipv4-mdt - Default value: ipv4-ucast
    asn String
    Autonomous system number.
    device String
    A device name from the provider configuration.
    maximumPrefix Number
    Maximum number of prefixes allowed from the peer. - Range: 0-4294967295
    restartTime Number
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Default value: 0
    templateName String
    Peer template name.
    threshold Number
    The period of time in minutes before restarting the peer when the prefix limit is reached. - Range: 0-100 - Default value: 0

    Import

     $ pulumi import nxos:index/bgpPeerTemplateMaxPrefix:BgpPeerTemplateMaxPrefix example "sys/bgp/inst/dom-[default]/peercont-[SPINE-PEERS]/af-[ipv4-ucast]/maxpfxp"
    

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

    Package Details

    Repository
    nxos lbrlabs/pulumi-nxos
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nxos Terraform Provider.
    nxos logo
    Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs