nxos.NtpServer
Explore with Pulumi AI
This resource can manage an ntp server or peer.
- API Documentation: datetimeNtpProvider
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.
Constructor 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
orpeer
. - Choices:server
,peer
- Device string
- A device name from the provider configuration.
- Key
Id int - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- Max
Poll int - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- Min
Poll int - NTP minimum interval default in seconds. Possible range is from
4
to16
. - 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
orpeer
. - Choices:server
,peer
- Device string
- A device name from the provider configuration.
- Key
Id int - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- Max
Poll int - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- Min
Poll int - NTP minimum interval default in seconds. Possible range is from
4
to16
. - 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
orpeer
. - Choices:server
,peer
- device String
- A device name from the provider configuration.
- key
Id Integer - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- max
Poll Integer - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- min
Poll Integer - NTP minimum interval default in seconds. Possible range is from
4
to16
. - 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
orpeer
. - Choices:server
,peer
- device string
- A device name from the provider configuration.
- key
Id number - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- max
Poll number - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- min
Poll number - NTP minimum interval default in seconds. Possible range is from
4
to16
. - 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
orpeer
. - Choices:server
,peer
- device str
- A device name from the provider configuration.
- key_
id int - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- max_
poll int - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- min_
poll int - NTP minimum interval default in seconds. Possible range is from
4
to16
. - 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
orpeer
. - Choices:server
,peer
- device String
- A device name from the provider configuration.
- key
Id Number - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- max
Poll Number - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- min
Poll Number - NTP minimum interval default in seconds. Possible range is from
4
to16
. - 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.
- Device string
- A device name from the provider configuration.
- Key
Id int - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- Max
Poll int - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- Min
Poll int - NTP minimum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:4
- Name string
- NTP server.
- Type string
- NTP provider type. Possible values are
server
orpeer
. - Choices:server
,peer
- Vrf string
- Identifies the VRF for the NTP providers. - Default value:
default
- Device string
- A device name from the provider configuration.
- Key
Id int - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- Max
Poll int - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- Min
Poll int - NTP minimum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:4
- Name string
- NTP server.
- Type string
- NTP provider type. Possible values are
server
orpeer
. - Choices:server
,peer
- Vrf string
- Identifies the VRF for the NTP providers. - Default value:
default
- device String
- A device name from the provider configuration.
- key
Id Integer - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- max
Poll Integer - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- min
Poll Integer - NTP minimum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:4
- name String
- NTP server.
- type String
- NTP provider type. Possible values are
server
orpeer
. - Choices:server
,peer
- vrf String
- Identifies the VRF for the NTP providers. - Default value:
default
- device string
- A device name from the provider configuration.
- key
Id number - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- max
Poll number - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- min
Poll number - NTP minimum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:4
- name string
- NTP server.
- type string
- NTP provider type. Possible values are
server
orpeer
. - 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
to65535
. - Range:1
-65535
- max_
poll int - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- min_
poll int - NTP minimum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:4
- name str
- NTP server.
- type str
- NTP provider type. Possible values are
server
orpeer
. - Choices:server
,peer
- vrf str
- Identifies the VRF for the NTP providers. - Default value:
default
- device String
- A device name from the provider configuration.
- key
Id Number - NTP provider key ID. Possible range is from
1
to65535
. - Range:1
-65535
- max
Poll Number - NTP maximum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:6
- min
Poll Number - NTP minimum interval default in seconds. Possible range is from
4
to16
. - Range:4
-16
- Default value:4
- name String
- NTP server.
- type String
- NTP provider type. Possible values are
server
orpeer
. - 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.