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

nxos.NtpServer

Explore with Pulumi AI

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

    This resource can manage an ntp server or peer.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nxos = Lbrlabs.PulumiPackage.Nxos;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Nxos.NtpServer("example", new()
        {
            KeyId = 10,
            MaxPoll = 6,
            MinPoll = 4,
            Type = "server",
            Vrf = "management",
        });
    
    });
    
    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.NewNtpServer(ctx, "example", &nxos.NtpServerArgs{
    			KeyId:   pulumi.Int(10),
    			MaxPoll: pulumi.Int(6),
    			MinPoll: pulumi.Int(4),
    			Type:    pulumi.String("server"),
    			Vrf:     pulumi.String("management"),
    		})
    		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.NtpServer;
    import com.pulumi.nxos.NtpServerArgs;
    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 NtpServer("example", NtpServerArgs.builder()        
                .keyId(10)
                .maxPoll(6)
                .minPoll(4)
                .type("server")
                .vrf("management")
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_nxos as nxos
    
    example = nxos.NtpServer("example",
        key_id=10,
        max_poll=6,
        min_poll=4,
        type="server",
        vrf="management")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nxos from "@lbrlabs/pulumi-nxos";
    
    const example = new nxos.NtpServer("example", {
        keyId: 10,
        maxPoll: 6,
        minPoll: 4,
        type: "server",
        vrf: "management",
    });
    
    resources:
      example:
        type: nxos:NtpServer
        properties:
          keyId: 10
          maxPoll: 6
          minPoll: 4
          type: server
          vrf: management
    

    Create NtpServer Resource

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

    Constructor syntax

    new NtpServer(name: string, args: NtpServerArgs, opts?: CustomResourceOptions);
    @overload
    def NtpServer(resource_name: str,
                  args: NtpServerArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def NtpServer(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  type: Optional[str] = None,
                  device: Optional[str] = None,
                  key_id: Optional[int] = None,
                  max_poll: Optional[int] = None,
                  min_poll: Optional[int] = None,
                  name: Optional[str] = None,
                  vrf: Optional[str] = None)
    func NewNtpServer(ctx *Context, name string, args NtpServerArgs, opts ...ResourceOption) (*NtpServer, error)
    public NtpServer(string name, NtpServerArgs args, CustomResourceOptions? opts = null)
    public NtpServer(String name, NtpServerArgs args)
    public NtpServer(String name, NtpServerArgs args, CustomResourceOptions options)
    
    type: nxos:NtpServer
    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 NtpServerArgs
    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 NtpServerArgs
    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 NtpServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NtpServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NtpServerArgs
    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 ntpServerResource = new Nxos.NtpServer("ntpServerResource", new()
    {
        Type = "string",
        Device = "string",
        KeyId = 0,
        MaxPoll = 0,
        MinPoll = 0,
        Name = "string",
        Vrf = "string",
    });
    
    example, err := nxos.NewNtpServer(ctx, "ntpServerResource", &nxos.NtpServerArgs{
    	Type:    pulumi.String("string"),
    	Device:  pulumi.String("string"),
    	KeyId:   pulumi.Int(0),
    	MaxPoll: pulumi.Int(0),
    	MinPoll: pulumi.Int(0),
    	Name:    pulumi.String("string"),
    	Vrf:     pulumi.String("string"),
    })
    
    var ntpServerResource = new NtpServer("ntpServerResource", NtpServerArgs.builder()
        .type("string")
        .device("string")
        .keyId(0)
        .maxPoll(0)
        .minPoll(0)
        .name("string")
        .vrf("string")
        .build());
    
    ntp_server_resource = nxos.NtpServer("ntpServerResource",
        type="string",
        device="string",
        key_id=0,
        max_poll=0,
        min_poll=0,
        name="string",
        vrf="string")
    
    const ntpServerResource = new nxos.NtpServer("ntpServerResource", {
        type: "string",
        device: "string",
        keyId: 0,
        maxPoll: 0,
        minPoll: 0,
        name: "string",
        vrf: "string",
    });
    
    type: nxos:NtpServer
    properties:
        device: string
        keyId: 0
        maxPoll: 0
        minPoll: 0
        name: string
        type: string
        vrf: string
    

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

    Type string
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    Device string
    A device name from the provider configuration.
    KeyId int
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    MaxPoll int
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    MinPoll int
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    Name string
    NTP server.
    Vrf string
    Identifies the VRF for the NTP providers. - Default value: default
    Type string
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    Device string
    A device name from the provider configuration.
    KeyId int
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    MaxPoll int
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    MinPoll int
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    Name string
    NTP server.
    Vrf string
    Identifies the VRF for the NTP providers. - Default value: default
    type String
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    device String
    A device name from the provider configuration.
    keyId Integer
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    maxPoll Integer
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    minPoll Integer
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    name String
    NTP server.
    vrf String
    Identifies the VRF for the NTP providers. - Default value: default
    type string
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    device string
    A device name from the provider configuration.
    keyId number
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    maxPoll number
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    minPoll number
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    name string
    NTP server.
    vrf string
    Identifies the VRF for the NTP providers. - Default value: default
    type str
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    device str
    A device name from the provider configuration.
    key_id int
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    max_poll int
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    min_poll int
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    name str
    NTP server.
    vrf str
    Identifies the VRF for the NTP providers. - Default value: default
    type String
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    device String
    A device name from the provider configuration.
    keyId Number
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    maxPoll Number
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    minPoll Number
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    name String
    NTP server.
    vrf String
    Identifies the VRF for the NTP providers. - Default value: default

    Outputs

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

    Get an existing NtpServer 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?: NtpServerState, opts?: CustomResourceOptions): NtpServer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            device: Optional[str] = None,
            key_id: Optional[int] = None,
            max_poll: Optional[int] = None,
            min_poll: Optional[int] = None,
            name: Optional[str] = None,
            type: Optional[str] = None,
            vrf: Optional[str] = None) -> NtpServer
    func GetNtpServer(ctx *Context, name string, id IDInput, state *NtpServerState, opts ...ResourceOption) (*NtpServer, error)
    public static NtpServer Get(string name, Input<string> id, NtpServerState? state, CustomResourceOptions? opts = null)
    public static NtpServer get(String name, Output<String> id, NtpServerState 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:
    Device string
    A device name from the provider configuration.
    KeyId int
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    MaxPoll int
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    MinPoll int
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    Name string
    NTP server.
    Type string
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    Vrf string
    Identifies the VRF for the NTP providers. - Default value: default
    Device string
    A device name from the provider configuration.
    KeyId int
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    MaxPoll int
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    MinPoll int
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    Name string
    NTP server.
    Type string
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    Vrf string
    Identifies the VRF for the NTP providers. - Default value: default
    device String
    A device name from the provider configuration.
    keyId Integer
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    maxPoll Integer
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    minPoll Integer
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    name String
    NTP server.
    type String
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    vrf String
    Identifies the VRF for the NTP providers. - Default value: default
    device string
    A device name from the provider configuration.
    keyId number
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    maxPoll number
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    minPoll number
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    name string
    NTP server.
    type string
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    vrf string
    Identifies the VRF for the NTP providers. - Default value: default
    device str
    A device name from the provider configuration.
    key_id int
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    max_poll int
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    min_poll int
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    name str
    NTP server.
    type str
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    vrf str
    Identifies the VRF for the NTP providers. - Default value: default
    device String
    A device name from the provider configuration.
    keyId Number
    NTP provider key ID. Possible range is from 1 to 65535. - Range: 1-65535
    maxPoll Number
    NTP maximum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 6
    minPoll Number
    NTP minimum interval default in seconds. Possible range is from 4 to 16. - Range: 4-16 - Default value: 4
    name String
    NTP server.
    type String
    NTP provider type. Possible values are server or peer. - Choices: server, peer
    vrf String
    Identifies the VRF for the NTP providers. - Default value: default

    Import

     $ pulumi import nxos:index/ntpServer:NtpServer example "sys/time/prov-[1.2.3.4]"
    

    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