1. Registry
  2. Packages
  3. Cisco NX OS Resource Provider
  4. API Docs
  5. BgpAdvertisedPrefix

This package is deprecated. Active development has stopped.

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

This package is deprecated. Active development has stopped.

Viewing docs for Cisco NX-OS v0.0.2
published on Friday, Sep 29, 2023 by lbrlabs

    This resource can manage the BGP (VRF) advertised prefix 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.BgpAdvertisedPrefix("example", new()
        {
            AddressFamily = "ipv4-ucast",
            Asn = "65001",
            Prefix = "192.168.1.0/24",
            RouteMap = "rt-map",
            Vrf = "default",
        });
    
    });
    
    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.NewBgpAdvertisedPrefix(ctx, "example", &nxos.BgpAdvertisedPrefixArgs{
    			AddressFamily: pulumi.String("ipv4-ucast"),
    			Asn:           pulumi.String("65001"),
    			Prefix:        pulumi.String("192.168.1.0/24"),
    			RouteMap:      pulumi.String("rt-map"),
    			Vrf:           pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nxos.BgpAdvertisedPrefix;
    import com.pulumi.nxos.BgpAdvertisedPrefixArgs;
    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 BgpAdvertisedPrefix("example", BgpAdvertisedPrefixArgs.builder()        
                .addressFamily("ipv4-ucast")
                .asn("65001")
                .prefix("192.168.1.0/24")
                .routeMap("rt-map")
                .vrf("default")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@lbrlabs/pulumi-nxos";
    
    const example = new nxos.BgpAdvertisedPrefix("example", {
        addressFamily: "ipv4-ucast",
        asn: "65001",
        prefix: "192.168.1.0/24",
        routeMap: "rt-map",
        vrf: "default",
    });
    
    import pulumi
    import lbrlabs_pulumi_nxos as nxos
    
    example = nxos.BgpAdvertisedPrefix("example",
        address_family="ipv4-ucast",
        asn="65001",
        prefix="192.168.1.0/24",
        route_map="rt-map",
        vrf="default")
    
    resources:
      example:
        type: nxos:BgpAdvertisedPrefix
        properties:
          addressFamily: ipv4-ucast
          asn: '65001'
          prefix: 192.168.1.0/24
          routeMap: rt-map
          vrf: default
    

    Create BgpAdvertisedPrefix Resource

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

    Constructor syntax

    new BgpAdvertisedPrefix(name: string, args: BgpAdvertisedPrefixArgs, opts?: CustomResourceOptions);
    @overload
    def BgpAdvertisedPrefix(resource_name: str,
                            args: BgpAdvertisedPrefixArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def BgpAdvertisedPrefix(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            address_family: Optional[str] = None,
                            asn: Optional[str] = None,
                            prefix: Optional[str] = None,
                            vrf: Optional[str] = None,
                            device: Optional[str] = None,
                            route_map: Optional[str] = None)
    func NewBgpAdvertisedPrefix(ctx *Context, name string, args BgpAdvertisedPrefixArgs, opts ...ResourceOption) (*BgpAdvertisedPrefix, error)
    public BgpAdvertisedPrefix(string name, BgpAdvertisedPrefixArgs args, CustomResourceOptions? opts = null)
    public BgpAdvertisedPrefix(String name, BgpAdvertisedPrefixArgs args)
    public BgpAdvertisedPrefix(String name, BgpAdvertisedPrefixArgs args, CustomResourceOptions options)
    
    type: nxos:BgpAdvertisedPrefix
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "nxos_bgp_advertised_prefix" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args BgpAdvertisedPrefixArgs
    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 BgpAdvertisedPrefixArgs
    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 BgpAdvertisedPrefixArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BgpAdvertisedPrefixArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BgpAdvertisedPrefixArgs
    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 bgpAdvertisedPrefixResource = new Nxos.BgpAdvertisedPrefix("bgpAdvertisedPrefixResource", new()
    {
        AddressFamily = "string",
        Asn = "string",
        Prefix = "string",
        Vrf = "string",
        Device = "string",
        RouteMap = "string",
    });
    
    example, err := nxos.NewBgpAdvertisedPrefix(ctx, "bgpAdvertisedPrefixResource", &nxos.BgpAdvertisedPrefixArgs{
    	AddressFamily: pulumi.String("string"),
    	Asn:           pulumi.String("string"),
    	Prefix:        pulumi.String("string"),
    	Vrf:           pulumi.String("string"),
    	Device:        pulumi.String("string"),
    	RouteMap:      pulumi.String("string"),
    })
    
    resource "nxos_bgp_advertised_prefix" "bgpAdvertisedPrefixResource" {
      lifecycle {
        create_before_destroy = true
      }
      address_family = "string"
      asn            = "string"
      prefix         = "string"
      vrf            = "string"
      device         = "string"
      route_map      = "string"
    }
    
    var bgpAdvertisedPrefixResource = new BgpAdvertisedPrefix("bgpAdvertisedPrefixResource", BgpAdvertisedPrefixArgs.builder()
        .addressFamily("string")
        .asn("string")
        .prefix("string")
        .vrf("string")
        .device("string")
        .routeMap("string")
        .build());
    
    bgp_advertised_prefix_resource = nxos.BgpAdvertisedPrefix("bgpAdvertisedPrefixResource",
        address_family="string",
        asn="string",
        prefix="string",
        vrf="string",
        device="string",
        route_map="string")
    
    const bgpAdvertisedPrefixResource = new nxos.BgpAdvertisedPrefix("bgpAdvertisedPrefixResource", {
        addressFamily: "string",
        asn: "string",
        prefix: "string",
        vrf: "string",
        device: "string",
        routeMap: "string",
    });
    
    type: nxos:BgpAdvertisedPrefix
    properties:
        addressFamily: string
        asn: string
        device: string
        prefix: string
        routeMap: string
        vrf: string
    

    BgpAdvertisedPrefix 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 BgpAdvertisedPrefix 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.
    Prefix string
    IP address of the network or prefix to advertise.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    RouteMap string
    Route map to modify attributes.
    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.
    Prefix string
    IP address of the network or prefix to advertise.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    RouteMap string
    Route map to modify attributes.
    address_family 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.
    prefix string
    IP address of the network or prefix to advertise.
    vrf string
    VRF name.
    device string
    A device name from the provider configuration.
    route_map string
    Route map to modify attributes.
    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.
    prefix String
    IP address of the network or prefix to advertise.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.
    routeMap String
    Route map to modify attributes.
    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.
    prefix string
    IP address of the network or prefix to advertise.
    vrf string
    VRF name.
    device string
    A device name from the provider configuration.
    routeMap string
    Route map to modify attributes.
    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.
    prefix str
    IP address of the network or prefix to advertise.
    vrf str
    VRF name.
    device str
    A device name from the provider configuration.
    route_map str
    Route map to modify attributes.
    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.
    prefix String
    IP address of the network or prefix to advertise.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.
    routeMap String
    Route map to modify attributes.

    Outputs

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

    Get an existing BgpAdvertisedPrefix 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?: BgpAdvertisedPrefixState, opts?: CustomResourceOptions): BgpAdvertisedPrefix
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address_family: Optional[str] = None,
            asn: Optional[str] = None,
            device: Optional[str] = None,
            prefix: Optional[str] = None,
            route_map: Optional[str] = None,
            vrf: Optional[str] = None) -> BgpAdvertisedPrefix
    func GetBgpAdvertisedPrefix(ctx *Context, name string, id IDInput, state *BgpAdvertisedPrefixState, opts ...ResourceOption) (*BgpAdvertisedPrefix, error)
    public static BgpAdvertisedPrefix Get(string name, Input<string> id, BgpAdvertisedPrefixState? state, CustomResourceOptions? opts = null)
    public static BgpAdvertisedPrefix get(String name, Output<String> id, BgpAdvertisedPrefixState state, CustomResourceOptions options)
    resources:  existingBgpAdvertisedPrefix:    type: nxos:BgpAdvertisedPrefix    get:      id: ${id}
    import {
      to = nxos_bgp_advertised_prefix.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state BgpAdvertisedPrefixState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state BgpAdvertisedPrefixState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state BgpAdvertisedPrefixState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state BgpAdvertisedPrefixState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    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.
    Prefix string
    IP address of the network or prefix to advertise.
    RouteMap string
    Route map to modify attributes.
    Vrf string
    VRF name.
    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.
    Prefix string
    IP address of the network or prefix to advertise.
    RouteMap string
    Route map to modify attributes.
    Vrf string
    VRF name.
    address_family 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.
    prefix string
    IP address of the network or prefix to advertise.
    route_map string
    Route map to modify attributes.
    vrf string
    VRF name.
    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.
    prefix String
    IP address of the network or prefix to advertise.
    routeMap String
    Route map to modify attributes.
    vrf String
    VRF name.
    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.
    prefix string
    IP address of the network or prefix to advertise.
    routeMap string
    Route map to modify attributes.
    vrf string
    VRF name.
    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.
    prefix str
    IP address of the network or prefix to advertise.
    route_map str
    Route map to modify attributes.
    vrf str
    VRF name.
    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.
    prefix String
    IP address of the network or prefix to advertise.
    routeMap String
    Route map to modify attributes.
    vrf String
    VRF name.

    Import

     $ pulumi import nxos:index/bgpAdvertisedPrefix:BgpAdvertisedPrefix example "sys/bgp/inst/dom-[default]/af-[ipv4-ucast]/prefix-[192.168.1.0/24]"
    

    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

    This package is deprecated. Active development has stopped.

    Viewing docs for Cisco NX-OS v0.0.2
    published on Friday, Sep 29, 2023 by lbrlabs

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial