Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.equinix.pulumi.metal.DeviceArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing equinix cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.equinix.pulumi.metal;
import com.equinix.pulumi.metal.enums.BillingCycle;
import com.equinix.pulumi.metal.enums.Facility;
import com.equinix.pulumi.metal.enums.OperatingSystem;
import com.equinix.pulumi.metal.enums.Plan;
import com.equinix.pulumi.metal.inputs.DeviceBehaviorArgs;
import com.equinix.pulumi.metal.inputs.DeviceIpAddressArgs;
import com.equinix.pulumi.metal.inputs.DeviceReinstallArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class DeviceArgs extends com.pulumi.resources.ResourceArgs {
public static final DeviceArgs Empty = new DeviceArgs();
/**
* If true, a device with OS custom_ipxe will
*
*/
@Import(name="alwaysPxe")
private @Nullable Output alwaysPxe;
/**
* @return If true, a device with OS custom_ipxe will
*
*/
public Optional> alwaysPxe() {
return Optional.ofNullable(this.alwaysPxe);
}
@Import(name="behavior")
private @Nullable Output behavior;
public Optional> behavior() {
return Optional.ofNullable(this.behavior);
}
/**
* monthly or hourly
*
*/
@Import(name="billingCycle")
private @Nullable Output> billingCycle;
/**
* @return monthly or hourly
*
*/
public Optional>> billingCycle() {
return Optional.ofNullable(this.billingCycle);
}
/**
* A string of the desired Custom Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"custom_data"`, the device will be updated in-place instead of recreated.
*
*/
@Import(name="customData")
private @Nullable Output customData;
/**
* @return A string of the desired Custom Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"custom_data"`, the device will be updated in-place instead of recreated.
*
*/
public Optional> customData() {
return Optional.ofNullable(this.customData);
}
/**
* Description string for the device
*
*/
@Import(name="description")
private @Nullable Output description;
/**
* @return Description string for the device
*
*/
public Optional> description() {
return Optional.ofNullable(this.description);
}
/**
* List of facility codes with deployment preferences. Equinix Metal 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](https://metal.equinix.com/developers/api/facilities/), set your API auth token in the top of the page and see JSON from the API response. Conflicts with metro
*
* @deprecated
* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices
*
*/
@Deprecated /* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices */
@Import(name="facilities")
private @Nullable Output>> facilities;
/**
* @return List of facility codes with deployment preferences. Equinix Metal 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](https://metal.equinix.com/developers/api/facilities/), set your API auth token in the top of the page and see JSON from the API response. Conflicts with metro
*
* @deprecated
* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices
*
*/
@Deprecated /* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices */
public Optional>>> facilities() {
return Optional.ofNullable(this.facilities);
}
/**
* Delete device even if it has volumes attached. Only applies for destroy action
*
*/
@Import(name="forceDetachVolumes")
private @Nullable Output forceDetachVolumes;
/**
* @return Delete device even if it has volumes attached. Only applies for destroy action
*
*/
public Optional> forceDetachVolumes() {
return Optional.ofNullable(this.forceDetachVolumes);
}
/**
* The UUID of the hardware reservation where you want this device deployed, or next-available if you want to pick your next available reservation automatically
*
*/
@Import(name="hardwareReservationId")
private @Nullable Output hardwareReservationId;
/**
* @return The UUID of the hardware reservation where you want this device deployed, or next-available if you want to pick your next available reservation automatically
*
*/
public Optional> hardwareReservationId() {
return Optional.ofNullable(this.hardwareReservationId);
}
/**
* The device hostname used in deployments taking advantage of Layer3 DHCP or metadata service configuration.
*
*/
@Import(name="hostname")
private @Nullable Output hostname;
/**
* @return The device hostname used in deployments taking advantage of Layer3 DHCP or metadata service configuration.
*
*/
public Optional> hostname() {
return Optional.ofNullable(this.hostname);
}
/**
* A list of IP address types for the device (structure is documented below)
*
*/
@Import(name="ipAddresses")
private @Nullable Output> ipAddresses;
/**
* @return A list of IP address types for the device (structure is documented below)
*
*/
public Optional>> ipAddresses() {
return Optional.ofNullable(this.ipAddresses);
}
/**
* URL pointing to a hosted iPXE script. More
*
*/
@Import(name="ipxeScriptUrl")
private @Nullable Output ipxeScriptUrl;
/**
* @return URL pointing to a hosted iPXE script. More
*
*/
public Optional> ipxeScriptUrl() {
return Optional.ofNullable(this.ipxeScriptUrl);
}
/**
* Whether the device is locked or unlocked. Locking a device prevents you from deleting or reinstalling the device or performing a firmware update on the device, and it prevents an instance with a termination time set from being reclaimed, even if the termination time was reached
*
*/
@Import(name="locked")
private @Nullable Output locked;
/**
* @return Whether the device is locked or unlocked. Locking a device prevents you from deleting or reinstalling the device or performing a firmware update on the device, and it prevents an instance with a termination time set from being reclaimed, even if the termination time was reached
*
*/
public Optional> locked() {
return Optional.ofNullable(this.locked);
}
/**
* Metro area for the new device. Conflicts with facilities
*
*/
@Import(name="metro")
private @Nullable Output metro;
/**
* @return Metro area for the new device. Conflicts with facilities
*
*/
public Optional> metro() {
return Optional.ofNullable(this.metro);
}
/**
* The operating system slug. To find the slug, or visit [Operating Systems API docs](https://metal.equinix.com/developers/api/operatingsystems), set your API auth token in the top of the page and see JSON from the API response. By default, changing this attribute will cause your device to be deleted and recreated. If `reinstall` is enabled, the device will be updated in-place instead of recreated.
*
*/
@Import(name="operatingSystem", required=true)
private Output> operatingSystem;
/**
* @return The operating system slug. To find the slug, or visit [Operating Systems API docs](https://metal.equinix.com/developers/api/operatingsystems), set your API auth token in the top of the page and see JSON from the API response. By default, changing this attribute will cause your device to be deleted and recreated. If `reinstall` is enabled, the device will be updated in-place instead of recreated.
*
*/
public Output> operatingSystem() {
return this.operatingSystem;
}
/**
* The device plan slug. To find the plan slug, visit the [bare-metal server](https://deploy.equinix.com/product/bare-metal/servers/) and [plan documentation](https://deploy.equinix.com/developers/docs/metal/hardware/standard-servers/)
*
*/
@Import(name="plan", required=true)
private Output> plan;
/**
* @return The device plan slug. To find the plan slug, visit the [bare-metal server](https://deploy.equinix.com/product/bare-metal/servers/) and [plan documentation](https://deploy.equinix.com/developers/docs/metal/hardware/standard-servers/)
*
*/
public Output> plan() {
return this.plan;
}
/**
* The ID of the project in which to create the device
*
*/
@Import(name="projectId", required=true)
private Output projectId;
/**
* @return The ID of the project in which to create the device
*
*/
public Output projectId() {
return this.projectId;
}
/**
* Array of IDs of the project SSH keys which should be added to the device. If you specify this array, only the listed project SSH keys (and any SSH keys for the users specified in user*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. Project SSH keys can be created with the equinix*metal*project*ssh*key resource
*
*/
@Import(name="projectSshKeyIds")
private @Nullable Output> projectSshKeyIds;
/**
* @return Array of IDs of the project SSH keys which should be added to the device. If you specify this array, only the listed project SSH keys (and any SSH keys for the users specified in user*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. Project SSH keys can be created with the equinix*metal*project*ssh*key resource
*
*/
public Optional>> projectSshKeyIds() {
return Optional.ofNullable(this.projectSshKeyIds);
}
@Import(name="reinstall")
private @Nullable Output reinstall;
public Optional> reinstall() {
return Optional.ofNullable(this.reinstall);
}
/**
* JSON for custom partitioning. Only usable on reserved hardware. More information in in the [Custom Partitioning and RAID](https://metal.equinix.com/developers/docs/servers/custom-partitioning-raid/) doc
*
*/
@Import(name="storage")
private @Nullable Output storage;
/**
* @return JSON for custom partitioning. Only usable on reserved hardware. More information in in the [Custom Partitioning and RAID](https://metal.equinix.com/developers/docs/servers/custom-partitioning-raid/) doc
*
*/
public Optional> storage() {
return Optional.ofNullable(this.storage);
}
/**
* Tags attached to the device
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return Tags attached to the device
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* Timestamp for device termination. For example "2021-09-03T16:32:00+03:00". If you don't supply timezone info, timestamp is assumed to be in UTC.
*
*/
@Import(name="terminationTime")
private @Nullable Output terminationTime;
/**
* @return Timestamp for device termination. For example "2021-09-03T16:32:00+03:00". If you don't supply timezone info, timestamp is assumed to be in UTC.
*
*/
public Optional> terminationTime() {
return Optional.ofNullable(this.terminationTime);
}
/**
* A string of the desired User Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"user_data"`, the device will be updated in-place instead of recreated.
*
*/
@Import(name="userData")
private @Nullable Output userData;
/**
* @return A string of the desired User Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"user_data"`, the device will be updated in-place instead of recreated.
*
*/
public Optional> userData() {
return Optional.ofNullable(this.userData);
}
/**
* Array of IDs of the users whose SSH keys should be added to the device. If you specify this array, only the listed users' SSH keys (and any project SSH keys specified in project*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. User SSH keys can be created with the equinix*metal*ssh*key resource
*
*/
@Import(name="userSshKeyIds")
private @Nullable Output> userSshKeyIds;
/**
* @return Array of IDs of the users whose SSH keys should be added to the device. If you specify this array, only the listed users' SSH keys (and any project SSH keys specified in project*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. User SSH keys can be created with the equinix*metal*ssh*key resource
*
*/
public Optional>> userSshKeyIds() {
return Optional.ofNullable(this.userSshKeyIds);
}
/**
* 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)
*
*/
@Import(name="waitForReservationDeprovision")
private @Nullable Output waitForReservationDeprovision;
/**
* @return 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)
*
*/
public Optional> waitForReservationDeprovision() {
return Optional.ofNullable(this.waitForReservationDeprovision);
}
private DeviceArgs() {}
private DeviceArgs(DeviceArgs $) {
this.alwaysPxe = $.alwaysPxe;
this.behavior = $.behavior;
this.billingCycle = $.billingCycle;
this.customData = $.customData;
this.description = $.description;
this.facilities = $.facilities;
this.forceDetachVolumes = $.forceDetachVolumes;
this.hardwareReservationId = $.hardwareReservationId;
this.hostname = $.hostname;
this.ipAddresses = $.ipAddresses;
this.ipxeScriptUrl = $.ipxeScriptUrl;
this.locked = $.locked;
this.metro = $.metro;
this.operatingSystem = $.operatingSystem;
this.plan = $.plan;
this.projectId = $.projectId;
this.projectSshKeyIds = $.projectSshKeyIds;
this.reinstall = $.reinstall;
this.storage = $.storage;
this.tags = $.tags;
this.terminationTime = $.terminationTime;
this.userData = $.userData;
this.userSshKeyIds = $.userSshKeyIds;
this.waitForReservationDeprovision = $.waitForReservationDeprovision;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(DeviceArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private DeviceArgs $;
public Builder() {
$ = new DeviceArgs();
}
public Builder(DeviceArgs defaults) {
$ = new DeviceArgs(Objects.requireNonNull(defaults));
}
/**
* @param alwaysPxe If true, a device with OS custom_ipxe will
*
* @return builder
*
*/
public Builder alwaysPxe(@Nullable Output alwaysPxe) {
$.alwaysPxe = alwaysPxe;
return this;
}
/**
* @param alwaysPxe If true, a device with OS custom_ipxe will
*
* @return builder
*
*/
public Builder alwaysPxe(Boolean alwaysPxe) {
return alwaysPxe(Output.of(alwaysPxe));
}
public Builder behavior(@Nullable Output behavior) {
$.behavior = behavior;
return this;
}
public Builder behavior(DeviceBehaviorArgs behavior) {
return behavior(Output.of(behavior));
}
/**
* @param billingCycle monthly or hourly
*
* @return builder
*
*/
public Builder billingCycle(@Nullable Output> billingCycle) {
$.billingCycle = billingCycle;
return this;
}
/**
* @param billingCycle monthly or hourly
*
* @return builder
*
*/
public Builder billingCycle(Either billingCycle) {
return billingCycle(Output.of(billingCycle));
}
/**
* @param billingCycle monthly or hourly
*
* @return builder
*
*/
public Builder billingCycle(String billingCycle) {
return billingCycle(Either.ofLeft(billingCycle));
}
/**
* @param billingCycle monthly or hourly
*
* @return builder
*
*/
public Builder billingCycle(BillingCycle billingCycle) {
return billingCycle(Either.ofRight(billingCycle));
}
/**
* @param customData A string of the desired Custom Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"custom_data"`, the device will be updated in-place instead of recreated.
*
* @return builder
*
*/
public Builder customData(@Nullable Output customData) {
$.customData = customData;
return this;
}
/**
* @param customData A string of the desired Custom Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"custom_data"`, the device will be updated in-place instead of recreated.
*
* @return builder
*
*/
public Builder customData(String customData) {
return customData(Output.of(customData));
}
/**
* @param description Description string for the device
*
* @return builder
*
*/
public Builder description(@Nullable Output description) {
$.description = description;
return this;
}
/**
* @param description Description string for the device
*
* @return builder
*
*/
public Builder description(String description) {
return description(Output.of(description));
}
/**
* @param facilities List of facility codes with deployment preferences. Equinix Metal 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](https://metal.equinix.com/developers/api/facilities/), set your API auth token in the top of the page and see JSON from the API response. Conflicts with metro
*
* @return builder
*
* @deprecated
* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices
*
*/
@Deprecated /* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices */
public Builder facilities(@Nullable Output>> facilities) {
$.facilities = facilities;
return this;
}
/**
* @param facilities List of facility codes with deployment preferences. Equinix Metal 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](https://metal.equinix.com/developers/api/facilities/), set your API auth token in the top of the page and see JSON from the API response. Conflicts with metro
*
* @return builder
*
* @deprecated
* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices
*
*/
@Deprecated /* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices */
public Builder facilities(List> facilities) {
return facilities(Output.of(facilities));
}
/**
* @param facilities List of facility codes with deployment preferences. Equinix Metal 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](https://metal.equinix.com/developers/api/facilities/), set your API auth token in the top of the page and see JSON from the API response. Conflicts with metro
*
* @return builder
*
* @deprecated
* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices
*
*/
@Deprecated /* Use metro instead of facilities. For more information, read the migration guide: https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices */
public Builder facilities(Either... facilities) {
return facilities(List.of(facilities));
}
/**
* @param forceDetachVolumes Delete device even if it has volumes attached. Only applies for destroy action
*
* @return builder
*
*/
public Builder forceDetachVolumes(@Nullable Output forceDetachVolumes) {
$.forceDetachVolumes = forceDetachVolumes;
return this;
}
/**
* @param forceDetachVolumes Delete device even if it has volumes attached. Only applies for destroy action
*
* @return builder
*
*/
public Builder forceDetachVolumes(Boolean forceDetachVolumes) {
return forceDetachVolumes(Output.of(forceDetachVolumes));
}
/**
* @param hardwareReservationId The UUID of the hardware reservation where you want this device deployed, or next-available if you want to pick your next available reservation automatically
*
* @return builder
*
*/
public Builder hardwareReservationId(@Nullable Output hardwareReservationId) {
$.hardwareReservationId = hardwareReservationId;
return this;
}
/**
* @param hardwareReservationId The UUID of the hardware reservation where you want this device deployed, or next-available if you want to pick your next available reservation automatically
*
* @return builder
*
*/
public Builder hardwareReservationId(String hardwareReservationId) {
return hardwareReservationId(Output.of(hardwareReservationId));
}
/**
* @param hostname The device hostname used in deployments taking advantage of Layer3 DHCP or metadata service configuration.
*
* @return builder
*
*/
public Builder hostname(@Nullable Output hostname) {
$.hostname = hostname;
return this;
}
/**
* @param hostname The device hostname used in deployments taking advantage of Layer3 DHCP or metadata service configuration.
*
* @return builder
*
*/
public Builder hostname(String hostname) {
return hostname(Output.of(hostname));
}
/**
* @param ipAddresses A list of IP address types for the device (structure is documented below)
*
* @return builder
*
*/
public Builder ipAddresses(@Nullable Output> ipAddresses) {
$.ipAddresses = ipAddresses;
return this;
}
/**
* @param ipAddresses A list of IP address types for the device (structure is documented below)
*
* @return builder
*
*/
public Builder ipAddresses(List ipAddresses) {
return ipAddresses(Output.of(ipAddresses));
}
/**
* @param ipAddresses A list of IP address types for the device (structure is documented below)
*
* @return builder
*
*/
public Builder ipAddresses(DeviceIpAddressArgs... ipAddresses) {
return ipAddresses(List.of(ipAddresses));
}
/**
* @param ipxeScriptUrl URL pointing to a hosted iPXE script. More
*
* @return builder
*
*/
public Builder ipxeScriptUrl(@Nullable Output ipxeScriptUrl) {
$.ipxeScriptUrl = ipxeScriptUrl;
return this;
}
/**
* @param ipxeScriptUrl URL pointing to a hosted iPXE script. More
*
* @return builder
*
*/
public Builder ipxeScriptUrl(String ipxeScriptUrl) {
return ipxeScriptUrl(Output.of(ipxeScriptUrl));
}
/**
* @param locked Whether the device is locked or unlocked. Locking a device prevents you from deleting or reinstalling the device or performing a firmware update on the device, and it prevents an instance with a termination time set from being reclaimed, even if the termination time was reached
*
* @return builder
*
*/
public Builder locked(@Nullable Output locked) {
$.locked = locked;
return this;
}
/**
* @param locked Whether the device is locked or unlocked. Locking a device prevents you from deleting or reinstalling the device or performing a firmware update on the device, and it prevents an instance with a termination time set from being reclaimed, even if the termination time was reached
*
* @return builder
*
*/
public Builder locked(Boolean locked) {
return locked(Output.of(locked));
}
/**
* @param metro Metro area for the new device. Conflicts with facilities
*
* @return builder
*
*/
public Builder metro(@Nullable Output metro) {
$.metro = metro;
return this;
}
/**
* @param metro Metro area for the new device. Conflicts with facilities
*
* @return builder
*
*/
public Builder metro(String metro) {
return metro(Output.of(metro));
}
/**
* @param operatingSystem The operating system slug. To find the slug, or visit [Operating Systems API docs](https://metal.equinix.com/developers/api/operatingsystems), set your API auth token in the top of the page and see JSON from the API response. By default, changing this attribute will cause your device to be deleted and recreated. If `reinstall` is enabled, the device will be updated in-place instead of recreated.
*
* @return builder
*
*/
public Builder operatingSystem(Output> operatingSystem) {
$.operatingSystem = operatingSystem;
return this;
}
/**
* @param operatingSystem The operating system slug. To find the slug, or visit [Operating Systems API docs](https://metal.equinix.com/developers/api/operatingsystems), set your API auth token in the top of the page and see JSON from the API response. By default, changing this attribute will cause your device to be deleted and recreated. If `reinstall` is enabled, the device will be updated in-place instead of recreated.
*
* @return builder
*
*/
public Builder operatingSystem(Either operatingSystem) {
return operatingSystem(Output.of(operatingSystem));
}
/**
* @param operatingSystem The operating system slug. To find the slug, or visit [Operating Systems API docs](https://metal.equinix.com/developers/api/operatingsystems), set your API auth token in the top of the page and see JSON from the API response. By default, changing this attribute will cause your device to be deleted and recreated. If `reinstall` is enabled, the device will be updated in-place instead of recreated.
*
* @return builder
*
*/
public Builder operatingSystem(String operatingSystem) {
return operatingSystem(Either.ofLeft(operatingSystem));
}
/**
* @param operatingSystem The operating system slug. To find the slug, or visit [Operating Systems API docs](https://metal.equinix.com/developers/api/operatingsystems), set your API auth token in the top of the page and see JSON from the API response. By default, changing this attribute will cause your device to be deleted and recreated. If `reinstall` is enabled, the device will be updated in-place instead of recreated.
*
* @return builder
*
*/
public Builder operatingSystem(OperatingSystem operatingSystem) {
return operatingSystem(Either.ofRight(operatingSystem));
}
/**
* @param plan The device plan slug. To find the plan slug, visit the [bare-metal server](https://deploy.equinix.com/product/bare-metal/servers/) and [plan documentation](https://deploy.equinix.com/developers/docs/metal/hardware/standard-servers/)
*
* @return builder
*
*/
public Builder plan(Output> plan) {
$.plan = plan;
return this;
}
/**
* @param plan The device plan slug. To find the plan slug, visit the [bare-metal server](https://deploy.equinix.com/product/bare-metal/servers/) and [plan documentation](https://deploy.equinix.com/developers/docs/metal/hardware/standard-servers/)
*
* @return builder
*
*/
public Builder plan(Either plan) {
return plan(Output.of(plan));
}
/**
* @param plan The device plan slug. To find the plan slug, visit the [bare-metal server](https://deploy.equinix.com/product/bare-metal/servers/) and [plan documentation](https://deploy.equinix.com/developers/docs/metal/hardware/standard-servers/)
*
* @return builder
*
*/
public Builder plan(String plan) {
return plan(Either.ofLeft(plan));
}
/**
* @param plan The device plan slug. To find the plan slug, visit the [bare-metal server](https://deploy.equinix.com/product/bare-metal/servers/) and [plan documentation](https://deploy.equinix.com/developers/docs/metal/hardware/standard-servers/)
*
* @return builder
*
*/
public Builder plan(Plan plan) {
return plan(Either.ofRight(plan));
}
/**
* @param projectId The ID of the project in which to create the device
*
* @return builder
*
*/
public Builder projectId(Output projectId) {
$.projectId = projectId;
return this;
}
/**
* @param projectId The ID of the project in which to create the device
*
* @return builder
*
*/
public Builder projectId(String projectId) {
return projectId(Output.of(projectId));
}
/**
* @param projectSshKeyIds Array of IDs of the project SSH keys which should be added to the device. If you specify this array, only the listed project SSH keys (and any SSH keys for the users specified in user*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. Project SSH keys can be created with the equinix*metal*project*ssh*key resource
*
* @return builder
*
*/
public Builder projectSshKeyIds(@Nullable Output> projectSshKeyIds) {
$.projectSshKeyIds = projectSshKeyIds;
return this;
}
/**
* @param projectSshKeyIds Array of IDs of the project SSH keys which should be added to the device. If you specify this array, only the listed project SSH keys (and any SSH keys for the users specified in user*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. Project SSH keys can be created with the equinix*metal*project*ssh*key resource
*
* @return builder
*
*/
public Builder projectSshKeyIds(List projectSshKeyIds) {
return projectSshKeyIds(Output.of(projectSshKeyIds));
}
/**
* @param projectSshKeyIds Array of IDs of the project SSH keys which should be added to the device. If you specify this array, only the listed project SSH keys (and any SSH keys for the users specified in user*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. Project SSH keys can be created with the equinix*metal*project*ssh*key resource
*
* @return builder
*
*/
public Builder projectSshKeyIds(String... projectSshKeyIds) {
return projectSshKeyIds(List.of(projectSshKeyIds));
}
public Builder reinstall(@Nullable Output reinstall) {
$.reinstall = reinstall;
return this;
}
public Builder reinstall(DeviceReinstallArgs reinstall) {
return reinstall(Output.of(reinstall));
}
/**
* @param storage JSON for custom partitioning. Only usable on reserved hardware. More information in in the [Custom Partitioning and RAID](https://metal.equinix.com/developers/docs/servers/custom-partitioning-raid/) doc
*
* @return builder
*
*/
public Builder storage(@Nullable Output storage) {
$.storage = storage;
return this;
}
/**
* @param storage JSON for custom partitioning. Only usable on reserved hardware. More information in in the [Custom Partitioning and RAID](https://metal.equinix.com/developers/docs/servers/custom-partitioning-raid/) doc
*
* @return builder
*
*/
public Builder storage(String storage) {
return storage(Output.of(storage));
}
/**
* @param tags Tags attached to the device
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags Tags attached to the device
*
* @return builder
*
*/
public Builder tags(List tags) {
return tags(Output.of(tags));
}
/**
* @param tags Tags attached to the device
*
* @return builder
*
*/
public Builder tags(String... tags) {
return tags(List.of(tags));
}
/**
* @param terminationTime Timestamp for device termination. For example "2021-09-03T16:32:00+03:00". If you don't supply timezone info, timestamp is assumed to be in UTC.
*
* @return builder
*
*/
public Builder terminationTime(@Nullable Output terminationTime) {
$.terminationTime = terminationTime;
return this;
}
/**
* @param terminationTime Timestamp for device termination. For example "2021-09-03T16:32:00+03:00". If you don't supply timezone info, timestamp is assumed to be in UTC.
*
* @return builder
*
*/
public Builder terminationTime(String terminationTime) {
return terminationTime(Output.of(terminationTime));
}
/**
* @param userData A string of the desired User Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"user_data"`, the device will be updated in-place instead of recreated.
*
* @return builder
*
*/
public Builder userData(@Nullable Output userData) {
$.userData = userData;
return this;
}
/**
* @param userData A string of the desired User Data for the device. By default, changing this attribute will cause the provider to destroy and recreate your device. If `reinstall` is specified or `behavior.allow_changes` includes `"user_data"`, the device will be updated in-place instead of recreated.
*
* @return builder
*
*/
public Builder userData(String userData) {
return userData(Output.of(userData));
}
/**
* @param userSshKeyIds Array of IDs of the users whose SSH keys should be added to the device. If you specify this array, only the listed users' SSH keys (and any project SSH keys specified in project*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. User SSH keys can be created with the equinix*metal*ssh*key resource
*
* @return builder
*
*/
public Builder userSshKeyIds(@Nullable Output> userSshKeyIds) {
$.userSshKeyIds = userSshKeyIds;
return this;
}
/**
* @param userSshKeyIds Array of IDs of the users whose SSH keys should be added to the device. If you specify this array, only the listed users' SSH keys (and any project SSH keys specified in project*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. User SSH keys can be created with the equinix*metal*ssh*key resource
*
* @return builder
*
*/
public Builder userSshKeyIds(List userSshKeyIds) {
return userSshKeyIds(Output.of(userSshKeyIds));
}
/**
* @param userSshKeyIds Array of IDs of the users whose SSH keys should be added to the device. If you specify this array, only the listed users' SSH keys (and any project SSH keys specified in project*ssh*key*ids) will be added. If no SSH keys are specified (both user*ssh*keys*ids and project*ssh*key*ids are empty lists or omitted), all parent project keys, parent project members keys and organization members keys will be included. User SSH keys can be created with the equinix*metal*ssh*key resource
*
* @return builder
*
*/
public Builder userSshKeyIds(String... userSshKeyIds) {
return userSshKeyIds(List.of(userSshKeyIds));
}
/**
* @param 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)
*
* @return builder
*
*/
public Builder waitForReservationDeprovision(@Nullable Output waitForReservationDeprovision) {
$.waitForReservationDeprovision = waitForReservationDeprovision;
return this;
}
/**
* @param 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)
*
* @return builder
*
*/
public Builder waitForReservationDeprovision(Boolean waitForReservationDeprovision) {
return waitForReservationDeprovision(Output.of(waitForReservationDeprovision));
}
public DeviceArgs build() {
if ($.operatingSystem == null) {
throw new MissingRequiredPropertyException("DeviceArgs", "operatingSystem");
}
if ($.plan == null) {
throw new MissingRequiredPropertyException("DeviceArgs", "plan");
}
if ($.projectId == null) {
throw new MissingRequiredPropertyException("DeviceArgs", "projectId");
}
return $;
}
}
}