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.pulumi.digitalocean.inputs.DropletState Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing DigitalOcean 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.pulumi.digitalocean.inputs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.digitalocean.enums.DropletSlug;
import com.pulumi.digitalocean.enums.Region;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class DropletState extends com.pulumi.resources.ResourceArgs {
public static final DropletState Empty = new DropletState();
/**
* Boolean controlling if backups are made. Defaults to
* false.
*
*/
@Import(name="backups")
private @Nullable Output backups;
/**
* @return Boolean controlling if backups are made. Defaults to
* false.
*
*/
public Optional> backups() {
return Optional.ofNullable(this.backups);
}
@Import(name="createdAt")
private @Nullable Output createdAt;
public Optional> createdAt() {
return Optional.ofNullable(this.createdAt);
}
/**
* The size of the instance's disk in GB
*
*/
@Import(name="disk")
private @Nullable Output disk;
/**
* @return The size of the instance's disk in GB
*
*/
public Optional> disk() {
return Optional.ofNullable(this.disk);
}
/**
* A boolean indicating whether to install the
* DigitalOcean agent used for providing access to the Droplet web console in
* the control panel. By default, the agent is installed on new Droplets but
* installation errors (i.e. OS not supported) are ignored. To prevent it from
* being installed, set to `false`. To make installation errors fatal, explicitly
* set it to `true`.
*
*/
@Import(name="dropletAgent")
private @Nullable Output dropletAgent;
/**
* @return A boolean indicating whether to install the
* DigitalOcean agent used for providing access to the Droplet web console in
* the control panel. By default, the agent is installed on new Droplets but
* installation errors (i.e. OS not supported) are ignored. To prevent it from
* being installed, set to `false`. To make installation errors fatal, explicitly
* set it to `true`.
*
*/
public Optional> dropletAgent() {
return Optional.ofNullable(this.dropletAgent);
}
/**
* The uniform resource name of the Droplet
*
*/
@Import(name="dropletUrn")
private @Nullable Output dropletUrn;
/**
* @return The uniform resource name of the Droplet
*
*/
public Optional> dropletUrn() {
return Optional.ofNullable(this.dropletUrn);
}
/**
* A boolean indicating whether the droplet
* should be gracefully shut down before it is deleted.
*
* > **NOTE:** If you use `volume_ids` on a Droplet, this provider will assume management over the full set volumes for the instance, and treat additional volumes as a drift. For this reason, `volume_ids` must not be mixed with external `digitalocean.VolumeAttachment` resources for a given instance.
*
*/
@Import(name="gracefulShutdown")
private @Nullable Output gracefulShutdown;
/**
* @return A boolean indicating whether the droplet
* should be gracefully shut down before it is deleted.
*
* > **NOTE:** If you use `volume_ids` on a Droplet, this provider will assume management over the full set volumes for the instance, and treat additional volumes as a drift. For this reason, `volume_ids` must not be mixed with external `digitalocean.VolumeAttachment` resources for a given instance.
*
*/
public Optional> gracefulShutdown() {
return Optional.ofNullable(this.gracefulShutdown);
}
/**
* The Droplet image ID or slug. This could be either image ID or droplet snapshot ID.
*
*/
@Import(name="image")
private @Nullable Output image;
/**
* @return The Droplet image ID or slug. This could be either image ID or droplet snapshot ID.
*
*/
public Optional> image() {
return Optional.ofNullable(this.image);
}
/**
* The IPv4 address
*
*/
@Import(name="ipv4Address")
private @Nullable Output ipv4Address;
/**
* @return The IPv4 address
*
*/
public Optional> ipv4Address() {
return Optional.ofNullable(this.ipv4Address);
}
/**
* The private networking IPv4 address
*
*/
@Import(name="ipv4AddressPrivate")
private @Nullable Output ipv4AddressPrivate;
/**
* @return The private networking IPv4 address
*
*/
public Optional> ipv4AddressPrivate() {
return Optional.ofNullable(this.ipv4AddressPrivate);
}
/**
* Boolean controlling if IPv6 is enabled. Defaults to false.
* Once enabled for a Droplet, IPv6 can not be disabled. When enabling IPv6 on
* an existing Droplet, [additional OS-level configuration](https://docs.digitalocean.com/products/networking/ipv6/how-to/enable/#on-existing-droplets)
* is required.
*
*/
@Import(name="ipv6")
private @Nullable Output ipv6;
/**
* @return Boolean controlling if IPv6 is enabled. Defaults to false.
* Once enabled for a Droplet, IPv6 can not be disabled. When enabling IPv6 on
* an existing Droplet, [additional OS-level configuration](https://docs.digitalocean.com/products/networking/ipv6/how-to/enable/#on-existing-droplets)
* is required.
*
*/
public Optional> ipv6() {
return Optional.ofNullable(this.ipv6);
}
/**
* The IPv6 address
*
*/
@Import(name="ipv6Address")
private @Nullable Output ipv6Address;
/**
* @return The IPv6 address
*
*/
public Optional> ipv6Address() {
return Optional.ofNullable(this.ipv6Address);
}
/**
* Is the Droplet locked
*
*/
@Import(name="locked")
private @Nullable Output locked;
/**
* @return Is the Droplet locked
*
*/
public Optional> locked() {
return Optional.ofNullable(this.locked);
}
@Import(name="memory")
private @Nullable Output memory;
public Optional> memory() {
return Optional.ofNullable(this.memory);
}
/**
* Boolean controlling whether monitoring agent is installed.
* Defaults to false. If set to `true`, you can configure monitor alert policies
* [monitor alert resource](https://www.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/monitor_alert)
*
*/
@Import(name="monitoring")
private @Nullable Output monitoring;
/**
* @return Boolean controlling whether monitoring agent is installed.
* Defaults to false. If set to `true`, you can configure monitor alert policies
* [monitor alert resource](https://www.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/monitor_alert)
*
*/
public Optional> monitoring() {
return Optional.ofNullable(this.monitoring);
}
/**
* The Droplet name.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The Droplet name.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* Droplet hourly price
*
*/
@Import(name="priceHourly")
private @Nullable Output priceHourly;
/**
* @return Droplet hourly price
*
*/
public Optional> priceHourly() {
return Optional.ofNullable(this.priceHourly);
}
/**
* Droplet monthly price
*
*/
@Import(name="priceMonthly")
private @Nullable Output priceMonthly;
/**
* @return Droplet monthly price
*
*/
public Optional> priceMonthly() {
return Optional.ofNullable(this.priceMonthly);
}
/**
* **Deprecated** Boolean controlling if private networking
* is enabled. This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region.
*
* @deprecated
* This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region.
*
*/
@Deprecated /* This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region. */
@Import(name="privateNetworking")
private @Nullable Output privateNetworking;
/**
* @return **Deprecated** Boolean controlling if private networking
* is enabled. This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region.
*
* @deprecated
* This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region.
*
*/
@Deprecated /* This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region. */
public Optional> privateNetworking() {
return Optional.ofNullable(this.privateNetworking);
}
/**
* The region where the Droplet will be created.
*
*/
@Import(name="region")
private @Nullable Output> region;
/**
* @return The region where the Droplet will be created.
*
*/
public Optional>> region() {
return Optional.ofNullable(this.region);
}
/**
* Boolean controlling whether to increase the disk
* size when resizing a Droplet. It defaults to `true`. When set to `false`,
* only the Droplet's RAM and CPU will be resized. **Increasing a Droplet's disk
* size is a permanent change**. Increasing only RAM and CPU is reversible.
*
*/
@Import(name="resizeDisk")
private @Nullable Output resizeDisk;
/**
* @return Boolean controlling whether to increase the disk
* size when resizing a Droplet. It defaults to `true`. When set to `false`,
* only the Droplet's RAM and CPU will be resized. **Increasing a Droplet's disk
* size is a permanent change**. Increasing only RAM and CPU is reversible.
*
*/
public Optional> resizeDisk() {
return Optional.ofNullable(this.resizeDisk);
}
/**
* The unique slug that identifies the type of Droplet. You can find a list of available slugs on [DigitalOcean API documentation](https://docs.digitalocean.com/reference/api/api-reference/#tag/Sizes).
*
*/
@Import(name="size")
private @Nullable Output> size;
/**
* @return The unique slug that identifies the type of Droplet. You can find a list of available slugs on [DigitalOcean API documentation](https://docs.digitalocean.com/reference/api/api-reference/#tag/Sizes).
*
*/
public Optional>> size() {
return Optional.ofNullable(this.size);
}
/**
* A list of SSH key IDs or fingerprints to enable in
* the format `[12345, 123456]`. To retrieve this info, use the
* [DigitalOcean API](https://docs.digitalocean.com/reference/api/api-reference/#tag/SSH-Keys)
* or CLI (`doctl compute ssh-key list`). Once a Droplet is created keys can not
* be added or removed via this provider. Modifying this field will prompt you
* to destroy and recreate the Droplet.
*
*/
@Import(name="sshKeys")
private @Nullable Output> sshKeys;
/**
* @return A list of SSH key IDs or fingerprints to enable in
* the format `[12345, 123456]`. To retrieve this info, use the
* [DigitalOcean API](https://docs.digitalocean.com/reference/api/api-reference/#tag/SSH-Keys)
* or CLI (`doctl compute ssh-key list`). Once a Droplet is created keys can not
* be added or removed via this provider. Modifying this field will prompt you
* to destroy and recreate the Droplet.
*
*/
public Optional>> sshKeys() {
return Optional.ofNullable(this.sshKeys);
}
/**
* The status of the Droplet
*
*/
@Import(name="status")
private @Nullable Output status;
/**
* @return The status of the Droplet
*
*/
public Optional> status() {
return Optional.ofNullable(this.status);
}
/**
* A list of the tags to be applied to this Droplet.
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return A list of the tags to be applied to this Droplet.
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* A string of the desired User Data for the Droplet.
*
*/
@Import(name="userData")
private @Nullable Output userData;
/**
* @return A string of the desired User Data for the Droplet.
*
*/
public Optional> userData() {
return Optional.ofNullable(this.userData);
}
/**
* The number of the instance's virtual CPUs
*
*/
@Import(name="vcpus")
private @Nullable Output vcpus;
/**
* @return The number of the instance's virtual CPUs
*
*/
public Optional> vcpus() {
return Optional.ofNullable(this.vcpus);
}
/**
* A list of the IDs of each block storage volume to be attached to the Droplet.
*
*/
@Import(name="volumeIds")
private @Nullable Output> volumeIds;
/**
* @return A list of the IDs of each block storage volume to be attached to the Droplet.
*
*/
public Optional>> volumeIds() {
return Optional.ofNullable(this.volumeIds);
}
/**
* The ID of the VPC where the Droplet will be located.
*
*/
@Import(name="vpcUuid")
private @Nullable Output vpcUuid;
/**
* @return The ID of the VPC where the Droplet will be located.
*
*/
public Optional> vpcUuid() {
return Optional.ofNullable(this.vpcUuid);
}
private DropletState() {}
private DropletState(DropletState $) {
this.backups = $.backups;
this.createdAt = $.createdAt;
this.disk = $.disk;
this.dropletAgent = $.dropletAgent;
this.dropletUrn = $.dropletUrn;
this.gracefulShutdown = $.gracefulShutdown;
this.image = $.image;
this.ipv4Address = $.ipv4Address;
this.ipv4AddressPrivate = $.ipv4AddressPrivate;
this.ipv6 = $.ipv6;
this.ipv6Address = $.ipv6Address;
this.locked = $.locked;
this.memory = $.memory;
this.monitoring = $.monitoring;
this.name = $.name;
this.priceHourly = $.priceHourly;
this.priceMonthly = $.priceMonthly;
this.privateNetworking = $.privateNetworking;
this.region = $.region;
this.resizeDisk = $.resizeDisk;
this.size = $.size;
this.sshKeys = $.sshKeys;
this.status = $.status;
this.tags = $.tags;
this.userData = $.userData;
this.vcpus = $.vcpus;
this.volumeIds = $.volumeIds;
this.vpcUuid = $.vpcUuid;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(DropletState defaults) {
return new Builder(defaults);
}
public static final class Builder {
private DropletState $;
public Builder() {
$ = new DropletState();
}
public Builder(DropletState defaults) {
$ = new DropletState(Objects.requireNonNull(defaults));
}
/**
* @param backups Boolean controlling if backups are made. Defaults to
* false.
*
* @return builder
*
*/
public Builder backups(@Nullable Output backups) {
$.backups = backups;
return this;
}
/**
* @param backups Boolean controlling if backups are made. Defaults to
* false.
*
* @return builder
*
*/
public Builder backups(Boolean backups) {
return backups(Output.of(backups));
}
public Builder createdAt(@Nullable Output createdAt) {
$.createdAt = createdAt;
return this;
}
public Builder createdAt(String createdAt) {
return createdAt(Output.of(createdAt));
}
/**
* @param disk The size of the instance's disk in GB
*
* @return builder
*
*/
public Builder disk(@Nullable Output disk) {
$.disk = disk;
return this;
}
/**
* @param disk The size of the instance's disk in GB
*
* @return builder
*
*/
public Builder disk(Integer disk) {
return disk(Output.of(disk));
}
/**
* @param dropletAgent A boolean indicating whether to install the
* DigitalOcean agent used for providing access to the Droplet web console in
* the control panel. By default, the agent is installed on new Droplets but
* installation errors (i.e. OS not supported) are ignored. To prevent it from
* being installed, set to `false`. To make installation errors fatal, explicitly
* set it to `true`.
*
* @return builder
*
*/
public Builder dropletAgent(@Nullable Output dropletAgent) {
$.dropletAgent = dropletAgent;
return this;
}
/**
* @param dropletAgent A boolean indicating whether to install the
* DigitalOcean agent used for providing access to the Droplet web console in
* the control panel. By default, the agent is installed on new Droplets but
* installation errors (i.e. OS not supported) are ignored. To prevent it from
* being installed, set to `false`. To make installation errors fatal, explicitly
* set it to `true`.
*
* @return builder
*
*/
public Builder dropletAgent(Boolean dropletAgent) {
return dropletAgent(Output.of(dropletAgent));
}
/**
* @param dropletUrn The uniform resource name of the Droplet
*
* @return builder
*
*/
public Builder dropletUrn(@Nullable Output dropletUrn) {
$.dropletUrn = dropletUrn;
return this;
}
/**
* @param dropletUrn The uniform resource name of the Droplet
*
* @return builder
*
*/
public Builder dropletUrn(String dropletUrn) {
return dropletUrn(Output.of(dropletUrn));
}
/**
* @param gracefulShutdown A boolean indicating whether the droplet
* should be gracefully shut down before it is deleted.
*
* > **NOTE:** If you use `volume_ids` on a Droplet, this provider will assume management over the full set volumes for the instance, and treat additional volumes as a drift. For this reason, `volume_ids` must not be mixed with external `digitalocean.VolumeAttachment` resources for a given instance.
*
* @return builder
*
*/
public Builder gracefulShutdown(@Nullable Output gracefulShutdown) {
$.gracefulShutdown = gracefulShutdown;
return this;
}
/**
* @param gracefulShutdown A boolean indicating whether the droplet
* should be gracefully shut down before it is deleted.
*
* > **NOTE:** If you use `volume_ids` on a Droplet, this provider will assume management over the full set volumes for the instance, and treat additional volumes as a drift. For this reason, `volume_ids` must not be mixed with external `digitalocean.VolumeAttachment` resources for a given instance.
*
* @return builder
*
*/
public Builder gracefulShutdown(Boolean gracefulShutdown) {
return gracefulShutdown(Output.of(gracefulShutdown));
}
/**
* @param image The Droplet image ID or slug. This could be either image ID or droplet snapshot ID.
*
* @return builder
*
*/
public Builder image(@Nullable Output image) {
$.image = image;
return this;
}
/**
* @param image The Droplet image ID or slug. This could be either image ID or droplet snapshot ID.
*
* @return builder
*
*/
public Builder image(String image) {
return image(Output.of(image));
}
/**
* @param ipv4Address The IPv4 address
*
* @return builder
*
*/
public Builder ipv4Address(@Nullable Output ipv4Address) {
$.ipv4Address = ipv4Address;
return this;
}
/**
* @param ipv4Address The IPv4 address
*
* @return builder
*
*/
public Builder ipv4Address(String ipv4Address) {
return ipv4Address(Output.of(ipv4Address));
}
/**
* @param ipv4AddressPrivate The private networking IPv4 address
*
* @return builder
*
*/
public Builder ipv4AddressPrivate(@Nullable Output ipv4AddressPrivate) {
$.ipv4AddressPrivate = ipv4AddressPrivate;
return this;
}
/**
* @param ipv4AddressPrivate The private networking IPv4 address
*
* @return builder
*
*/
public Builder ipv4AddressPrivate(String ipv4AddressPrivate) {
return ipv4AddressPrivate(Output.of(ipv4AddressPrivate));
}
/**
* @param ipv6 Boolean controlling if IPv6 is enabled. Defaults to false.
* Once enabled for a Droplet, IPv6 can not be disabled. When enabling IPv6 on
* an existing Droplet, [additional OS-level configuration](https://docs.digitalocean.com/products/networking/ipv6/how-to/enable/#on-existing-droplets)
* is required.
*
* @return builder
*
*/
public Builder ipv6(@Nullable Output ipv6) {
$.ipv6 = ipv6;
return this;
}
/**
* @param ipv6 Boolean controlling if IPv6 is enabled. Defaults to false.
* Once enabled for a Droplet, IPv6 can not be disabled. When enabling IPv6 on
* an existing Droplet, [additional OS-level configuration](https://docs.digitalocean.com/products/networking/ipv6/how-to/enable/#on-existing-droplets)
* is required.
*
* @return builder
*
*/
public Builder ipv6(Boolean ipv6) {
return ipv6(Output.of(ipv6));
}
/**
* @param ipv6Address The IPv6 address
*
* @return builder
*
*/
public Builder ipv6Address(@Nullable Output ipv6Address) {
$.ipv6Address = ipv6Address;
return this;
}
/**
* @param ipv6Address The IPv6 address
*
* @return builder
*
*/
public Builder ipv6Address(String ipv6Address) {
return ipv6Address(Output.of(ipv6Address));
}
/**
* @param locked Is the Droplet locked
*
* @return builder
*
*/
public Builder locked(@Nullable Output locked) {
$.locked = locked;
return this;
}
/**
* @param locked Is the Droplet locked
*
* @return builder
*
*/
public Builder locked(Boolean locked) {
return locked(Output.of(locked));
}
public Builder memory(@Nullable Output memory) {
$.memory = memory;
return this;
}
public Builder memory(Integer memory) {
return memory(Output.of(memory));
}
/**
* @param monitoring Boolean controlling whether monitoring agent is installed.
* Defaults to false. If set to `true`, you can configure monitor alert policies
* [monitor alert resource](https://www.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/monitor_alert)
*
* @return builder
*
*/
public Builder monitoring(@Nullable Output monitoring) {
$.monitoring = monitoring;
return this;
}
/**
* @param monitoring Boolean controlling whether monitoring agent is installed.
* Defaults to false. If set to `true`, you can configure monitor alert policies
* [monitor alert resource](https://www.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/monitor_alert)
*
* @return builder
*
*/
public Builder monitoring(Boolean monitoring) {
return monitoring(Output.of(monitoring));
}
/**
* @param name The Droplet name.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The Droplet name.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param priceHourly Droplet hourly price
*
* @return builder
*
*/
public Builder priceHourly(@Nullable Output priceHourly) {
$.priceHourly = priceHourly;
return this;
}
/**
* @param priceHourly Droplet hourly price
*
* @return builder
*
*/
public Builder priceHourly(Double priceHourly) {
return priceHourly(Output.of(priceHourly));
}
/**
* @param priceMonthly Droplet monthly price
*
* @return builder
*
*/
public Builder priceMonthly(@Nullable Output priceMonthly) {
$.priceMonthly = priceMonthly;
return this;
}
/**
* @param priceMonthly Droplet monthly price
*
* @return builder
*
*/
public Builder priceMonthly(Double priceMonthly) {
return priceMonthly(Output.of(priceMonthly));
}
/**
* @param privateNetworking **Deprecated** Boolean controlling if private networking
* is enabled. This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region.
*
* @return builder
*
* @deprecated
* This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region.
*
*/
@Deprecated /* This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region. */
public Builder privateNetworking(@Nullable Output privateNetworking) {
$.privateNetworking = privateNetworking;
return this;
}
/**
* @param privateNetworking **Deprecated** Boolean controlling if private networking
* is enabled. This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region.
*
* @return builder
*
* @deprecated
* This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region.
*
*/
@Deprecated /* This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region. */
public Builder privateNetworking(Boolean privateNetworking) {
return privateNetworking(Output.of(privateNetworking));
}
/**
* @param region The region where the Droplet will be created.
*
* @return builder
*
*/
public Builder region(@Nullable Output> region) {
$.region = region;
return this;
}
/**
* @param region The region where the Droplet will be created.
*
* @return builder
*
*/
public Builder region(Either region) {
return region(Output.of(region));
}
/**
* @param region The region where the Droplet will be created.
*
* @return builder
*
*/
public Builder region(String region) {
return region(Either.ofLeft(region));
}
/**
* @param region The region where the Droplet will be created.
*
* @return builder
*
*/
public Builder region(Region region) {
return region(Either.ofRight(region));
}
/**
* @param resizeDisk Boolean controlling whether to increase the disk
* size when resizing a Droplet. It defaults to `true`. When set to `false`,
* only the Droplet's RAM and CPU will be resized. **Increasing a Droplet's disk
* size is a permanent change**. Increasing only RAM and CPU is reversible.
*
* @return builder
*
*/
public Builder resizeDisk(@Nullable Output resizeDisk) {
$.resizeDisk = resizeDisk;
return this;
}
/**
* @param resizeDisk Boolean controlling whether to increase the disk
* size when resizing a Droplet. It defaults to `true`. When set to `false`,
* only the Droplet's RAM and CPU will be resized. **Increasing a Droplet's disk
* size is a permanent change**. Increasing only RAM and CPU is reversible.
*
* @return builder
*
*/
public Builder resizeDisk(Boolean resizeDisk) {
return resizeDisk(Output.of(resizeDisk));
}
/**
* @param size The unique slug that identifies the type of Droplet. You can find a list of available slugs on [DigitalOcean API documentation](https://docs.digitalocean.com/reference/api/api-reference/#tag/Sizes).
*
* @return builder
*
*/
public Builder size(@Nullable Output> size) {
$.size = size;
return this;
}
/**
* @param size The unique slug that identifies the type of Droplet. You can find a list of available slugs on [DigitalOcean API documentation](https://docs.digitalocean.com/reference/api/api-reference/#tag/Sizes).
*
* @return builder
*
*/
public Builder size(Either size) {
return size(Output.of(size));
}
/**
* @param size The unique slug that identifies the type of Droplet. You can find a list of available slugs on [DigitalOcean API documentation](https://docs.digitalocean.com/reference/api/api-reference/#tag/Sizes).
*
* @return builder
*
*/
public Builder size(String size) {
return size(Either.ofLeft(size));
}
/**
* @param size The unique slug that identifies the type of Droplet. You can find a list of available slugs on [DigitalOcean API documentation](https://docs.digitalocean.com/reference/api/api-reference/#tag/Sizes).
*
* @return builder
*
*/
public Builder size(DropletSlug size) {
return size(Either.ofRight(size));
}
/**
* @param sshKeys A list of SSH key IDs or fingerprints to enable in
* the format `[12345, 123456]`. To retrieve this info, use the
* [DigitalOcean API](https://docs.digitalocean.com/reference/api/api-reference/#tag/SSH-Keys)
* or CLI (`doctl compute ssh-key list`). Once a Droplet is created keys can not
* be added or removed via this provider. Modifying this field will prompt you
* to destroy and recreate the Droplet.
*
* @return builder
*
*/
public Builder sshKeys(@Nullable Output> sshKeys) {
$.sshKeys = sshKeys;
return this;
}
/**
* @param sshKeys A list of SSH key IDs or fingerprints to enable in
* the format `[12345, 123456]`. To retrieve this info, use the
* [DigitalOcean API](https://docs.digitalocean.com/reference/api/api-reference/#tag/SSH-Keys)
* or CLI (`doctl compute ssh-key list`). Once a Droplet is created keys can not
* be added or removed via this provider. Modifying this field will prompt you
* to destroy and recreate the Droplet.
*
* @return builder
*
*/
public Builder sshKeys(List sshKeys) {
return sshKeys(Output.of(sshKeys));
}
/**
* @param sshKeys A list of SSH key IDs or fingerprints to enable in
* the format `[12345, 123456]`. To retrieve this info, use the
* [DigitalOcean API](https://docs.digitalocean.com/reference/api/api-reference/#tag/SSH-Keys)
* or CLI (`doctl compute ssh-key list`). Once a Droplet is created keys can not
* be added or removed via this provider. Modifying this field will prompt you
* to destroy and recreate the Droplet.
*
* @return builder
*
*/
public Builder sshKeys(String... sshKeys) {
return sshKeys(List.of(sshKeys));
}
/**
* @param status The status of the Droplet
*
* @return builder
*
*/
public Builder status(@Nullable Output status) {
$.status = status;
return this;
}
/**
* @param status The status of the Droplet
*
* @return builder
*
*/
public Builder status(String status) {
return status(Output.of(status));
}
/**
* @param tags A list of the tags to be applied to this Droplet.
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags A list of the tags to be applied to this Droplet.
*
* @return builder
*
*/
public Builder tags(List tags) {
return tags(Output.of(tags));
}
/**
* @param tags A list of the tags to be applied to this Droplet.
*
* @return builder
*
*/
public Builder tags(String... tags) {
return tags(List.of(tags));
}
/**
* @param userData A string of the desired User Data for the Droplet.
*
* @return builder
*
*/
public Builder userData(@Nullable Output userData) {
$.userData = userData;
return this;
}
/**
* @param userData A string of the desired User Data for the Droplet.
*
* @return builder
*
*/
public Builder userData(String userData) {
return userData(Output.of(userData));
}
/**
* @param vcpus The number of the instance's virtual CPUs
*
* @return builder
*
*/
public Builder vcpus(@Nullable Output vcpus) {
$.vcpus = vcpus;
return this;
}
/**
* @param vcpus The number of the instance's virtual CPUs
*
* @return builder
*
*/
public Builder vcpus(Integer vcpus) {
return vcpus(Output.of(vcpus));
}
/**
* @param volumeIds A list of the IDs of each block storage volume to be attached to the Droplet.
*
* @return builder
*
*/
public Builder volumeIds(@Nullable Output> volumeIds) {
$.volumeIds = volumeIds;
return this;
}
/**
* @param volumeIds A list of the IDs of each block storage volume to be attached to the Droplet.
*
* @return builder
*
*/
public Builder volumeIds(List volumeIds) {
return volumeIds(Output.of(volumeIds));
}
/**
* @param volumeIds A list of the IDs of each block storage volume to be attached to the Droplet.
*
* @return builder
*
*/
public Builder volumeIds(String... volumeIds) {
return volumeIds(List.of(volumeIds));
}
/**
* @param vpcUuid The ID of the VPC where the Droplet will be located.
*
* @return builder
*
*/
public Builder vpcUuid(@Nullable Output vpcUuid) {
$.vpcUuid = vpcUuid;
return this;
}
/**
* @param vpcUuid The ID of the VPC where the Droplet will be located.
*
* @return builder
*
*/
public Builder vpcUuid(String vpcUuid) {
return vpcUuid(Output.of(vpcUuid));
}
public DropletState build() {
return $;
}
}
}