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

nxos.getNtpServer

Explore with Pulumi AI

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

This data source can read an ntp server or peer.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nxos = Pulumi.Nxos;

return await Deployment.RunAsync(() => 
{
    var example = Nxos.GetNtpServer.Invoke(new()
    {
        Name = "1.2.3.4",
    });

});
Copy
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.LookupNtpServer(ctx, &nxos.LookupNtpServerArgs{
			Name: "1.2.3.4",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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.GetNtpServerArgs;
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.getNtpServer(GetNtpServerArgs.builder()
            .name("1.2.3.4")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as nxos from "@pulumi/nxos";

const example = nxos.getNtpServer({
    name: "1.2.3.4",
});
Copy
import pulumi
import pulumi_nxos as nxos

example = nxos.get_ntp_server(name="1.2.3.4")
Copy
variables:
  example:
    fn::invoke:
      Function: nxos:getNtpServer
      Arguments:
        name: 1.2.3.4
Copy

Using getNtpServer

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 getNtpServer(args: GetNtpServerArgs, opts?: InvokeOptions): Promise<GetNtpServerResult>
function getNtpServerOutput(args: GetNtpServerOutputArgs, opts?: InvokeOptions): Output<GetNtpServerResult>
Copy
def get_ntp_server(device: Optional[str] = None,
                   name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetNtpServerResult
def get_ntp_server_output(device: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetNtpServerResult]
Copy
func LookupNtpServer(ctx *Context, args *LookupNtpServerArgs, opts ...InvokeOption) (*LookupNtpServerResult, error)
func LookupNtpServerOutput(ctx *Context, args *LookupNtpServerOutputArgs, opts ...InvokeOption) LookupNtpServerResultOutput
Copy

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

public static class GetNtpServer 
{
    public static Task<GetNtpServerResult> InvokeAsync(GetNtpServerArgs args, InvokeOptions? opts = null)
    public static Output<GetNtpServerResult> Invoke(GetNtpServerInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNtpServerResult> getNtpServer(GetNtpServerArgs args, InvokeOptions options)
public static Output<GetNtpServerResult> getNtpServer(GetNtpServerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: nxos:index/getNtpServer:getNtpServer
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
NTP server.
Device string
A device name from the provider configuration.
Name This property is required. string
NTP server.
Device string
A device name from the provider configuration.
name This property is required. String
NTP server.
device String
A device name from the provider configuration.
name This property is required. string
NTP server.
device string
A device name from the provider configuration.
name This property is required. str
NTP server.
device str
A device name from the provider configuration.
name This property is required. String
NTP server.
device String
A device name from the provider configuration.

getNtpServer Result

The following output properties are available:

Id string
The distinguished name of the object.
KeyId int
NTP provider key ID. Possible range is from 1 to 65535.
MaxPoll int
NTP maximum interval default in seconds. Possible range is from 4 to 16.
MinPoll int
NTP minimum interval default in seconds. Possible range is from 4 to 16.
Name string
NTP server.
Type string
NTP provider type. Possible values are server or peer.
Vrf string
Identifies the VRF for the NTP providers.
Device string
A device name from the provider configuration.
Id string
The distinguished name of the object.
KeyId int
NTP provider key ID. Possible range is from 1 to 65535.
MaxPoll int
NTP maximum interval default in seconds. Possible range is from 4 to 16.
MinPoll int
NTP minimum interval default in seconds. Possible range is from 4 to 16.
Name string
NTP server.
Type string
NTP provider type. Possible values are server or peer.
Vrf string
Identifies the VRF for the NTP providers.
Device string
A device name from the provider configuration.
id String
The distinguished name of the object.
keyId Integer
NTP provider key ID. Possible range is from 1 to 65535.
maxPoll Integer
NTP maximum interval default in seconds. Possible range is from 4 to 16.
minPoll Integer
NTP minimum interval default in seconds. Possible range is from 4 to 16.
name String
NTP server.
type String
NTP provider type. Possible values are server or peer.
vrf String
Identifies the VRF for the NTP providers.
device String
A device name from the provider configuration.
id string
The distinguished name of the object.
keyId number
NTP provider key ID. Possible range is from 1 to 65535.
maxPoll number
NTP maximum interval default in seconds. Possible range is from 4 to 16.
minPoll number
NTP minimum interval default in seconds. Possible range is from 4 to 16.
name string
NTP server.
type string
NTP provider type. Possible values are server or peer.
vrf string
Identifies the VRF for the NTP providers.
device string
A device name from the provider configuration.
id str
The distinguished name of the object.
key_id int
NTP provider key ID. Possible range is from 1 to 65535.
max_poll int
NTP maximum interval default in seconds. Possible range is from 4 to 16.
min_poll int
NTP minimum interval default in seconds. Possible range is from 4 to 16.
name str
NTP server.
type str
NTP provider type. Possible values are server or peer.
vrf str
Identifies the VRF for the NTP providers.
device str
A device name from the provider configuration.
id String
The distinguished name of the object.
keyId Number
NTP provider key ID. Possible range is from 1 to 65535.
maxPoll Number
NTP maximum interval default in seconds. Possible range is from 4 to 16.
minPoll Number
NTP minimum interval default in seconds. Possible range is from 4 to 16.
name String
NTP server.
type String
NTP provider type. Possible values are server or peer.
vrf String
Identifies the VRF for the NTP providers.
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.
Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs