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

nxos.BgpPeerTemplate

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 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.BgpPeerTemplate("example", new()
        {
            Asn = "65001",
            Description = "My Description",
            PeerType = "fabric-internal",
            RemoteAsn = "65002",
            SourceInterface = "lo0",
            TemplateName = "SPINE-PEERS",
        });
    
    });
    
    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.NewBgpPeerTemplate(ctx, "example", &nxos.BgpPeerTemplateArgs{
    			Asn:             pulumi.String("65001"),
    			Description:     pulumi.String("My Description"),
    			PeerType:        pulumi.String("fabric-internal"),
    			RemoteAsn:       pulumi.String("65002"),
    			SourceInterface: pulumi.String("lo0"),
    			TemplateName:    pulumi.String("SPINE-PEERS"),
    		})
    		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.BgpPeerTemplate;
    import com.pulumi.nxos.BgpPeerTemplateArgs;
    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 BgpPeerTemplate("example", BgpPeerTemplateArgs.builder()        
                .asn("65001")
                .description("My Description")
                .peerType("fabric-internal")
                .remoteAsn("65002")
                .sourceInterface("lo0")
                .templateName("SPINE-PEERS")
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_nxos as nxos
    
    example = nxos.BgpPeerTemplate("example",
        asn="65001",
        description="My Description",
        peer_type="fabric-internal",
        remote_asn="65002",
        source_interface="lo0",
        template_name="SPINE-PEERS")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@lbrlabs/pulumi-nxos";
    
    const example = new nxos.BgpPeerTemplate("example", {
        asn: "65001",
        description: "My Description",
        peerType: "fabric-internal",
        remoteAsn: "65002",
        sourceInterface: "lo0",
        templateName: "SPINE-PEERS",
    });
    
    resources:
      example:
        type: nxos:BgpPeerTemplate
        properties:
          asn: '65001'
          description: My Description
          peerType: fabric-internal
          remoteAsn: '65002'
          sourceInterface: lo0
          templateName: SPINE-PEERS
    

    Create BgpPeerTemplate Resource

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

    Constructor syntax

    new BgpPeerTemplate(name: string, args: BgpPeerTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def BgpPeerTemplate(resource_name: str,
                        args: BgpPeerTemplateArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def BgpPeerTemplate(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        asn: Optional[str] = None,
                        template_name: Optional[str] = None,
                        description: Optional[str] = None,
                        device: Optional[str] = None,
                        peer_type: Optional[str] = None,
                        remote_asn: Optional[str] = None,
                        source_interface: Optional[str] = None)
    func NewBgpPeerTemplate(ctx *Context, name string, args BgpPeerTemplateArgs, opts ...ResourceOption) (*BgpPeerTemplate, error)
    public BgpPeerTemplate(string name, BgpPeerTemplateArgs args, CustomResourceOptions? opts = null)
    public BgpPeerTemplate(String name, BgpPeerTemplateArgs args)
    public BgpPeerTemplate(String name, BgpPeerTemplateArgs args, CustomResourceOptions options)
    
    type: nxos:BgpPeerTemplate
    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 BgpPeerTemplateArgs
    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 BgpPeerTemplateArgs
    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 BgpPeerTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BgpPeerTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BgpPeerTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var bgpPeerTemplateResource = new Nxos.BgpPeerTemplate("bgpPeerTemplateResource", new()
    {
        Asn = "string",
        TemplateName = "string",
        Description = "string",
        Device = "string",
        PeerType = "string",
        RemoteAsn = "string",
        SourceInterface = "string",
    });
    
    example, err := nxos.NewBgpPeerTemplate(ctx, "bgpPeerTemplateResource", &nxos.BgpPeerTemplateArgs{
    	Asn:             pulumi.String("string"),
    	TemplateName:    pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	Device:          pulumi.String("string"),
    	PeerType:        pulumi.String("string"),
    	RemoteAsn:       pulumi.String("string"),
    	SourceInterface: pulumi.String("string"),
    })
    
    var bgpPeerTemplateResource = new BgpPeerTemplate("bgpPeerTemplateResource", BgpPeerTemplateArgs.builder()
        .asn("string")
        .templateName("string")
        .description("string")
        .device("string")
        .peerType("string")
        .remoteAsn("string")
        .sourceInterface("string")
        .build());
    
    bgp_peer_template_resource = nxos.BgpPeerTemplate("bgpPeerTemplateResource",
        asn="string",
        template_name="string",
        description="string",
        device="string",
        peer_type="string",
        remote_asn="string",
        source_interface="string")
    
    const bgpPeerTemplateResource = new nxos.BgpPeerTemplate("bgpPeerTemplateResource", {
        asn: "string",
        templateName: "string",
        description: "string",
        device: "string",
        peerType: "string",
        remoteAsn: "string",
        sourceInterface: "string",
    });
    
    type: nxos:BgpPeerTemplate
    properties:
        asn: string
        description: string
        device: string
        peerType: string
        remoteAsn: string
        sourceInterface: string
        templateName: string
    

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

    Asn string
    Autonomous system number.
    TemplateName string
    Peer template name.
    Description string
    Peer template description.
    Device string
    A device name from the provider configuration.
    PeerType string
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    RemoteAsn string
    Peer template autonomous system number.
    SourceInterface string
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    Asn string
    Autonomous system number.
    TemplateName string
    Peer template name.
    Description string
    Peer template description.
    Device string
    A device name from the provider configuration.
    PeerType string
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    RemoteAsn string
    Peer template autonomous system number.
    SourceInterface string
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    asn String
    Autonomous system number.
    templateName String
    Peer template name.
    description String
    Peer template description.
    device String
    A device name from the provider configuration.
    peerType String
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    remoteAsn String
    Peer template autonomous system number.
    sourceInterface String
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    asn string
    Autonomous system number.
    templateName string
    Peer template name.
    description string
    Peer template description.
    device string
    A device name from the provider configuration.
    peerType string
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    remoteAsn string
    Peer template autonomous system number.
    sourceInterface string
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    asn str
    Autonomous system number.
    template_name str
    Peer template name.
    description str
    Peer template description.
    device str
    A device name from the provider configuration.
    peer_type str
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    remote_asn str
    Peer template autonomous system number.
    source_interface str
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    asn String
    Autonomous system number.
    templateName String
    Peer template name.
    description String
    Peer template description.
    device String
    A device name from the provider configuration.
    peerType String
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    remoteAsn String
    Peer template autonomous system number.
    sourceInterface String
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified

    Outputs

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

    Get an existing BgpPeerTemplate 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?: BgpPeerTemplateState, opts?: CustomResourceOptions): BgpPeerTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            asn: Optional[str] = None,
            description: Optional[str] = None,
            device: Optional[str] = None,
            peer_type: Optional[str] = None,
            remote_asn: Optional[str] = None,
            source_interface: Optional[str] = None,
            template_name: Optional[str] = None) -> BgpPeerTemplate
    func GetBgpPeerTemplate(ctx *Context, name string, id IDInput, state *BgpPeerTemplateState, opts ...ResourceOption) (*BgpPeerTemplate, error)
    public static BgpPeerTemplate Get(string name, Input<string> id, BgpPeerTemplateState? state, CustomResourceOptions? opts = null)
    public static BgpPeerTemplate get(String name, Output<String> id, BgpPeerTemplateState 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
    Autonomous system number.
    Description string
    Peer template description.
    Device string
    A device name from the provider configuration.
    PeerType string
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    RemoteAsn string
    Peer template autonomous system number.
    SourceInterface string
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    TemplateName string
    Peer template name.
    Asn string
    Autonomous system number.
    Description string
    Peer template description.
    Device string
    A device name from the provider configuration.
    PeerType string
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    RemoteAsn string
    Peer template autonomous system number.
    SourceInterface string
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    TemplateName string
    Peer template name.
    asn String
    Autonomous system number.
    description String
    Peer template description.
    device String
    A device name from the provider configuration.
    peerType String
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    remoteAsn String
    Peer template autonomous system number.
    sourceInterface String
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    templateName String
    Peer template name.
    asn string
    Autonomous system number.
    description string
    Peer template description.
    device string
    A device name from the provider configuration.
    peerType string
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    remoteAsn string
    Peer template autonomous system number.
    sourceInterface string
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    templateName string
    Peer template name.
    asn str
    Autonomous system number.
    description str
    Peer template description.
    device str
    A device name from the provider configuration.
    peer_type str
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    remote_asn str
    Peer template autonomous system number.
    source_interface str
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    template_name str
    Peer template name.
    asn String
    Autonomous system number.
    description String
    Peer template description.
    device String
    A device name from the provider configuration.
    peerType String
    Neighbor Fabric Type. - Choices: fabric-internal, fabric-external, fabric-border-leaf - Default value: fabric-internal
    remoteAsn String
    Peer template autonomous system number.
    sourceInterface String
    Source Interface. Must match first field in the output of show intf brief. - Default value: unspecified
    templateName String
    Peer template name.

    Import

     $ pulumi import nxos:index/bgpPeerTemplate:BgpPeerTemplate example "sys/bgp/inst/dom-[default]/peercont-[SPINE-PEERS]"
    

    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