Class Device
Provides a Packet device resource. This can be used to create, modify, and delete devices.
Note: All arguments including the
root_passwordanduser_datawill be stored in the raw state as plain-text. Read more about sensitive data in state.
Inherited Members
Namespace: Pulumi.Packet
Assembly: Pulumi.Packet.dll
Syntax
public class Device : CustomResource
Constructors
View SourceDevice(String, DeviceArgs, CustomResourceOptions)
Create a Device resource with the given unique name, arguments, and options.
Declaration
public Device(string name, DeviceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DeviceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAccessPrivateIpv4
The ipv4 private IP assigned to the device
Declaration
public Output<string> AccessPrivateIpv4 { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AccessPublicIpv4
The ipv4 maintenance IP assigned to the device
Declaration
public Output<string> AccessPublicIpv4 { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AccessPublicIpv6
The ipv6 maintenance IP assigned to the device
Declaration
public Output<string> AccessPublicIpv6 { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AlwaysPxe
If true, a device with OS custom_ipxe will
continue to boot via iPXE on reboots.
Declaration
public Output<bool?> AlwaysPxe { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
BillingCycle
monthly or hourly
Declaration
public Output<string> BillingCycle { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Created
The timestamp for when the device was created
Declaration
public Output<string> Created { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeployedFacility
The facility where the device is deployed.
Declaration
public Output<string> DeployedFacility { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
Description string for the device
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Facilities
List of facility codes with deployment preferences. Packet API will go through the list and will deploy your device to first facility with free capacity. List items must be facility codes or any (a wildcard). To find the facility code, visit Facilities API docs, set your API auth token in the top of the page and see JSON from the API response.
Declaration
public Output<ImmutableArray<string>> Facilities { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ForceDetachVolumes
Delete device even if it has volumes attached. Only applies for destroy action.
Declaration
public Output<bool?> ForceDetachVolumes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
HardwareReservationId
The ID of hardware reservation which this device occupies
hostname- The hostname of the device
Declaration
public Output<string> HardwareReservationId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Hostname
The device name
Declaration
public Output<string> Hostname { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IpAddresses
A list of IP address types for the device (structure is documented below).
Declaration
public Output<ImmutableArray<DeviceIpAddress>> IpAddresses { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<DeviceIpAddress>> |
IpxeScriptUrl
URL pointing to a hosted iPXE script. More information is in the Custom iPXE doc.
Declaration
public Output<string> IpxeScriptUrl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Locked
Whether the device is locked
Declaration
public Output<bool> Locked { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Networks
The device's private and public IP (v4 and v6) network details. When a device is run without any special network configuration, it will have 3 networks:
- Public IPv4 at
packet_device.name.network.0 - IPv6 at
packet_device.name.network.1 - Private IPv4 at
packet_device.name.network.2Elastic addresses then stack by type - an assigned public IPv4 will go after the management public IPv4 (to index 1), and will then shift the indices of the IPv6 and private IPv4. Assigned private IPv4 will go after the management private IPv4 (to the end of the network list). The fields of the network attributes are:
Declaration
public Output<ImmutableArray<DeviceNetwork>> Networks { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<DeviceNetwork>> |
NetworkType
Declaration
public Output<string> NetworkType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
OperatingSystem
The operating system slug. To find the slug, or visit Operating Systems API docs, set your API auth token in the top of the page and see JSON from the API response.
Declaration
public Output<string> OperatingSystem { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Plan
The device plan slug. To find the plan slug, visit Device plans API docs, set your auth token in the top of the page and see JSON from the API response.
Declaration
public Output<string> Plan { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ports
Ports assigned to the device
Declaration
public Output<ImmutableArray<DevicePort>> Ports { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<DevicePort>> |
ProjectId
The ID of the project in which to create the device
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ProjectSshKeyIds
Declaration
public Output<ImmutableArray<string>> ProjectSshKeyIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
RootPassword
Root password to the server (disabled after 24 hours)
Declaration
public Output<string> RootPassword { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SshKeyIds
List of IDs of SSH keys deployed in the device, can be both user and project SSH keys
Declaration
public Output<ImmutableArray<string>> SshKeyIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
State
The status of the device
Declaration
public Output<string> State { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Storage
JSON for custom partitioning. Only usable on reserved hardware. More information in in the Custom Partitioning and RAID doc.
- Please note that the disks.partitions.size attribute must be a string, not an integer. It can be a number string, or size notation string, e.g. "4G" or "8M" (for gigabytes and megabytes).
Declaration
public Output<string> Storage { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
Tags attached to the device
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Updated
The timestamp for the last time the device was updated
Declaration
public Output<string> Updated { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UserData
A string of the desired User Data for the device.
Declaration
public Output<string> UserData { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
WaitForReservationDeprovision
Only used for devices in reserved hardware. If set, the deletion of this device will block until the hardware reservation is marked provisionable (about 4 minutes in August 2019).
Declaration
public Output<bool?> WaitForReservationDeprovision { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Methods
View SourceGet(String, Input<String>, DeviceState, CustomResourceOptions)
Get an existing Device resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Device Get(string name, Input<string> id, DeviceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DeviceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Device |