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

nxos.getBgpAdvertisedPrefix

Explore with Pulumi AI

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

    This data source can read the BGP (VRF) advertised prefix configuration.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nxos = Pulumi.Nxos;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Nxos.GetBgpAdvertisedPrefix.Invoke(new()
        {
            AddressFamily = "ipv4-ucast",
            Asn = "65001",
            Prefix = "192.168.1.0/24",
            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.LookupBgpAdvertisedPrefix(ctx, &nxos.LookupBgpAdvertisedPrefixArgs{
    			AddressFamily: "ipv4-ucast",
    			Asn:           "65001",
    			Prefix:        "192.168.1.0/24",
    			Vrf:           "default",
    		}, nil)
    		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.NxosFunctions;
    import com.pulumi.nxos.inputs.GetBgpAdvertisedPrefixArgs;
    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) {
            final var example = NxosFunctions.getBgpAdvertisedPrefix(GetBgpAdvertisedPrefixArgs.builder()
                .addressFamily("ipv4-ucast")
                .asn("65001")
                .prefix("192.168.1.0/24")
                .vrf("default")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_nxos as nxos
    
    example = nxos.get_bgp_advertised_prefix(address_family="ipv4-ucast",
        asn="65001",
        prefix="192.168.1.0/24",
        vrf="default")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@pulumi/nxos";
    
    const example = nxos.getBgpAdvertisedPrefix({
        addressFamily: "ipv4-ucast",
        asn: "65001",
        prefix: "192.168.1.0/24",
        vrf: "default",
    });
    
    variables:
      example:
        fn::invoke:
          Function: nxos:getBgpAdvertisedPrefix
          Arguments:
            addressFamily: ipv4-ucast
            asn: '65001'
            prefix: 192.168.1.0/24
            vrf: default
    

    Using getBgpAdvertisedPrefix

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getBgpAdvertisedPrefix(args: GetBgpAdvertisedPrefixArgs, opts?: InvokeOptions): Promise<GetBgpAdvertisedPrefixResult>
    function getBgpAdvertisedPrefixOutput(args: GetBgpAdvertisedPrefixOutputArgs, opts?: InvokeOptions): Output<GetBgpAdvertisedPrefixResult>
    def get_bgp_advertised_prefix(address_family: Optional[str] = None,
                                  asn: Optional[str] = None,
                                  device: Optional[str] = None,
                                  prefix: Optional[str] = None,
                                  vrf: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetBgpAdvertisedPrefixResult
    def get_bgp_advertised_prefix_output(address_family: Optional[pulumi.Input[str]] = None,
                                  asn: Optional[pulumi.Input[str]] = None,
                                  device: Optional[pulumi.Input[str]] = None,
                                  prefix: Optional[pulumi.Input[str]] = None,
                                  vrf: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetBgpAdvertisedPrefixResult]
    func LookupBgpAdvertisedPrefix(ctx *Context, args *LookupBgpAdvertisedPrefixArgs, opts ...InvokeOption) (*LookupBgpAdvertisedPrefixResult, error)
    func LookupBgpAdvertisedPrefixOutput(ctx *Context, args *LookupBgpAdvertisedPrefixOutputArgs, opts ...InvokeOption) LookupBgpAdvertisedPrefixResultOutput

    > Note: This function is named LookupBgpAdvertisedPrefix in the Go SDK.

    public static class GetBgpAdvertisedPrefix 
    {
        public static Task<GetBgpAdvertisedPrefixResult> InvokeAsync(GetBgpAdvertisedPrefixArgs args, InvokeOptions? opts = null)
        public static Output<GetBgpAdvertisedPrefixResult> Invoke(GetBgpAdvertisedPrefixInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBgpAdvertisedPrefixResult> getBgpAdvertisedPrefix(GetBgpAdvertisedPrefixArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nxos:index/getBgpAdvertisedPrefix:getBgpAdvertisedPrefix
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AddressFamily string
    Address Family.
    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.
    AddressFamily string
    Address Family.
    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.
    addressFamily String
    Address Family.
    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.
    addressFamily string
    Address Family.
    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.
    address_family str
    Address Family.
    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.
    addressFamily String
    Address Family.
    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.

    getBgpAdvertisedPrefix Result

    The following output properties are available:

    AddressFamily string
    Address Family.
    Asn string
    Autonomous system number.
    Id string
    The distinguished name of the object.
    Prefix string
    IP address of the network or prefix to advertise.
    RouteMap string
    Route map to modify attributes.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    AddressFamily string
    Address Family.
    Asn string
    Autonomous system number.
    Id string
    The distinguished name of the object.
    Prefix string
    IP address of the network or prefix to advertise.
    RouteMap string
    Route map to modify attributes.
    Vrf string
    VRF name.
    Device string
    A device name from the provider configuration.
    addressFamily String
    Address Family.
    asn String
    Autonomous system number.
    id String
    The distinguished name of the object.
    prefix String
    IP address of the network or prefix to advertise.
    routeMap String
    Route map to modify attributes.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.
    addressFamily string
    Address Family.
    asn string
    Autonomous system number.
    id string
    The distinguished name of the object.
    prefix string
    IP address of the network or prefix to advertise.
    routeMap string
    Route map to modify attributes.
    vrf string
    VRF name.
    device string
    A device name from the provider configuration.
    address_family str
    Address Family.
    asn str
    Autonomous system number.
    id str
    The distinguished name of the object.
    prefix str
    IP address of the network or prefix to advertise.
    route_map str
    Route map to modify attributes.
    vrf str
    VRF name.
    device str
    A device name from the provider configuration.
    addressFamily String
    Address Family.
    asn String
    Autonomous system number.
    id String
    The distinguished name of the object.
    prefix String
    IP address of the network or prefix to advertise.
    routeMap String
    Route map to modify attributes.
    vrf String
    VRF name.
    device String
    A device name from the provider configuration.

    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