nxos.BgpAdvertisedPrefix
Explore with Pulumi AI
This resource can manage the BGP (VRF) advertised prefix configuration.
- API Documentation: bgpAdvPrefix
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
})
}
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 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")
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",
});
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.
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"),
})
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:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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 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)
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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.