Cisco NX-OS v0.0.2 published on Friday, Sep 29, 2023 by lbrlabs
nxos.getNtpServer
Explore with Pulumi AI
This data source can read an ntp server or peer.
- API Documentation: datetimeNtpProvider
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",
});
});
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
})
}
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());
}
}
import pulumi
import pulumi_nxos as nxos
example = nxos.get_ntp_server(name="1.2.3.4")
import * as pulumi from "@pulumi/pulumi";
import * as nxos from "@pulumi/nxos";
const example = nxos.getNtpServer({
name: "1.2.3.4",
});
variables:
example:
fn::invoke:
Function: nxos:getNtpServer
Arguments:
name: 1.2.3.4
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>
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]
func LookupNtpServer(ctx *Context, args *LookupNtpServerArgs, opts ...InvokeOption) (*LookupNtpServerResult, error)
func LookupNtpServerOutput(ctx *Context, args *LookupNtpServerOutputArgs, opts ...InvokeOption) LookupNtpServerResultOutput
> 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)
}
public static CompletableFuture<GetNtpServerResult> getNtpServer(GetNtpServerArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: nxos:index/getNtpServer:getNtpServer
arguments:
# arguments dictionary
The following arguments are supported:
getNtpServer Result
The following output properties are available:
- Id string
- The distinguished name of the object.
- Key
Id int - NTP provider key ID. Possible range is from
1
to65535
. - Max
Poll int - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Min
Poll int - NTP minimum interval default in seconds. Possible range is from
4
to16
. - Name string
- NTP server.
- Type string
- NTP provider type. Possible values are
server
orpeer
. - 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.
- Key
Id int - NTP provider key ID. Possible range is from
1
to65535
. - Max
Poll int - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Min
Poll int - NTP minimum interval default in seconds. Possible range is from
4
to16
. - Name string
- NTP server.
- Type string
- NTP provider type. Possible values are
server
orpeer
. - 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.
- key
Id Integer - NTP provider key ID. Possible range is from
1
to65535
. - max
Poll Integer - NTP maximum interval default in seconds. Possible range is from
4
to16
. - min
Poll Integer - NTP minimum interval default in seconds. Possible range is from
4
to16
. - name String
- NTP server.
- type String
- NTP provider type. Possible values are
server
orpeer
. - 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.
- key
Id number - NTP provider key ID. Possible range is from
1
to65535
. - max
Poll number - NTP maximum interval default in seconds. Possible range is from
4
to16
. - min
Poll number - NTP minimum interval default in seconds. Possible range is from
4
to16
. - name string
- NTP server.
- type string
- NTP provider type. Possible values are
server
orpeer
. - 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
to65535
. - max_
poll int - NTP maximum interval default in seconds. Possible range is from
4
to16
. - min_
poll int - NTP minimum interval default in seconds. Possible range is from
4
to16
. - name str
- NTP server.
- type str
- NTP provider type. Possible values are
server
orpeer
. - 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.
- key
Id Number - NTP provider key ID. Possible range is from
1
to65535
. - max
Poll Number - NTP maximum interval default in seconds. Possible range is from
4
to16
. - min
Poll Number - NTP minimum interval default in seconds. Possible range is from
4
to16
. - name String
- NTP server.
- type String
- NTP provider type. Possible values are
server
orpeer
. - 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.