proxmoxve.Time
Explore with Pulumi AI
Manages the time for a specific node.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
const firstNodeTime = new proxmoxve.Time("firstNodeTime", {
nodeName: "first-node",
timeZone: "UTC",
});
import pulumi
import pulumi_proxmoxve as proxmoxve
first_node_time = proxmoxve.Time("firstNodeTime",
node_name="first-node",
time_zone="UTC")
package main
import (
"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := proxmoxve.NewTime(ctx, "firstNodeTime", &proxmoxve.TimeArgs{
NodeName: pulumi.String("first-node"),
TimeZone: pulumi.String("UTC"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ProxmoxVE = Pulumi.ProxmoxVE;
return await Deployment.RunAsync(() =>
{
var firstNodeTime = new ProxmoxVE.Time("firstNodeTime", new()
{
NodeName = "first-node",
TimeZone = "UTC",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.proxmoxve.Time;
import com.pulumi.proxmoxve.TimeArgs;
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 firstNodeTime = new Time("firstNodeTime", TimeArgs.builder()
.nodeName("first-node")
.timeZone("UTC")
.build());
}
}
resources:
firstNodeTime:
type: proxmoxve:Time
properties:
nodeName: first-node
timeZone: UTC
Create Time Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Time(name: string, args: TimeArgs, opts?: CustomResourceOptions);
@overload
def Time(resource_name: str,
args: TimeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Time(resource_name: str,
opts: Optional[ResourceOptions] = None,
node_name: Optional[str] = None,
time_zone: Optional[str] = None)
func NewTime(ctx *Context, name string, args TimeArgs, opts ...ResourceOption) (*Time, error)
public Time(string name, TimeArgs args, CustomResourceOptions? opts = null)
type: proxmoxve:Time
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 TimeArgs
- 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 TimeArgs
- 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 TimeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TimeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TimeArgs
- 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 timeResource = new ProxmoxVE.Time("timeResource", new()
{
NodeName = "string",
TimeZone = "string",
});
example, err := proxmoxve.NewTime(ctx, "timeResource", &proxmoxve.TimeArgs{
NodeName: pulumi.String("string"),
TimeZone: pulumi.String("string"),
})
var timeResource = new Time("timeResource", TimeArgs.builder()
.nodeName("string")
.timeZone("string")
.build());
time_resource = proxmoxve.Time("timeResource",
node_name="string",
time_zone="string")
const timeResource = new proxmoxve.Time("timeResource", {
nodeName: "string",
timeZone: "string",
});
type: proxmoxve:Time
properties:
nodeName: string
timeZone: string
Time Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Time resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Time resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- local_
time str - The node's local time.
- utc_
time str - The node's local time formatted as UTC.
Look up Existing Time Resource
Get an existing Time 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?: TimeState, opts?: CustomResourceOptions): Time
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
local_time: Optional[str] = None,
node_name: Optional[str] = None,
time_zone: Optional[str] = None,
utc_time: Optional[str] = None) -> Time
func GetTime(ctx *Context, name string, id IDInput, state *TimeState, opts ...ResourceOption) (*Time, error)
public static Time Get(string name, Input<string> id, TimeState? state, CustomResourceOptions? opts = null)
public static Time get(String name, Output<String> id, TimeState 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.
- local_
time str - The node's local time.
- node_
name str - A node name.
- time_
zone str - The node's time zone.
- utc_
time str - The node's local time formatted as UTC.
Import
Instances can be imported using the node_name
, e.g.,
bash
$ pulumi import proxmoxve:index/time:Time first_node first-node
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- proxmoxve muhlba91/pulumi-proxmoxve
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
proxmox
Terraform Provider.