getDatabaseConnectionPoolPlain(GetDatabaseConnectionPoolPlainArgs args, InvokeOptions options) {
+ return Deployment.getInstance().invokeAsync("digitalocean:index/getDatabaseConnectionPool:getDatabaseConnectionPool", TypeShape.of(GetDatabaseConnectionPoolResult.class), args, Utilities.withVersion(options));
+ }
+ /**
+ * Provides information on a DigitalOcean database replica.
+ *
+ * ## Example Usage
+ *
+ * <!--Start PulumiCodeChooser -->
+ *
+ * {@code
+ * package generated_program;
+ *
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.digitalocean.DigitaloceanFunctions;
+ * import com.pulumi.digitalocean.inputs.GetDatabaseClusterArgs;
+ * import com.pulumi.digitalocean.inputs.GetDatabaseReplicaArgs;
+ * 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) {
+ * final var example = DigitaloceanFunctions.getDatabaseCluster(GetDatabaseClusterArgs.builder()
+ * .name("example-cluster")
+ * .build());
+ *
+ * final var read-only = DigitaloceanFunctions.getDatabaseReplica(GetDatabaseReplicaArgs.builder()
+ * .clusterId(example.applyValue(getDatabaseClusterResult -> getDatabaseClusterResult.id()))
+ * .name("terra-test-ro")
+ * .build());
+ *
+ * ctx.export("replicaOutput", read_only.uri());
* }
* }
* }
@@ -1646,6 +1974,55 @@ public static CompletableFuture getDatabaseReplicaPlai
public static Output getDatabaseReplica(GetDatabaseReplicaArgs args, InvokeOptions options) {
return Deployment.getInstance().invoke("digitalocean:index/getDatabaseReplica:getDatabaseReplica", TypeShape.of(GetDatabaseReplicaResult.class), args, Utilities.withVersion(options));
}
+ /**
+ * Provides information on a DigitalOcean database replica.
+ *
+ * ## Example Usage
+ *
+ * <!--Start PulumiCodeChooser -->
+ *
+ * {@code
+ * package generated_program;
+ *
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.digitalocean.DigitaloceanFunctions;
+ * import com.pulumi.digitalocean.inputs.GetDatabaseClusterArgs;
+ * import com.pulumi.digitalocean.inputs.GetDatabaseReplicaArgs;
+ * 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) {
+ * final var example = DigitaloceanFunctions.getDatabaseCluster(GetDatabaseClusterArgs.builder()
+ * .name("example-cluster")
+ * .build());
+ *
+ * final var read-only = DigitaloceanFunctions.getDatabaseReplica(GetDatabaseReplicaArgs.builder()
+ * .clusterId(example.applyValue(getDatabaseClusterResult -> getDatabaseClusterResult.id()))
+ * .name("terra-test-ro")
+ * .build());
+ *
+ * ctx.export("replicaOutput", read_only.uri());
+ * }
+ * }
+ * }
+ *
+ * <!--End PulumiCodeChooser -->
+ *
+ */
+ public static Output getDatabaseReplica(GetDatabaseReplicaArgs args, InvokeOutputOptions options) {
+ return Deployment.getInstance().invoke("digitalocean:index/getDatabaseReplica:getDatabaseReplica", TypeShape.of(GetDatabaseReplicaResult.class), args, Utilities.withVersion(options));
+ }
/**
* Provides information on a DigitalOcean database replica.
*
@@ -1888,22 +2265,14 @@ public static Output getDatabaseUser(GetDatabaseUserArgs
* <!--End PulumiCodeChooser -->
*
*/
- public static CompletableFuture getDatabaseUserPlain(GetDatabaseUserPlainArgs args, InvokeOptions options) {
- return Deployment.getInstance().invokeAsync("digitalocean:index/getDatabaseUser:getDatabaseUser", TypeShape.of(GetDatabaseUserResult.class), args, Utilities.withVersion(options));
+ public static Output getDatabaseUser(GetDatabaseUserArgs args, InvokeOutputOptions options) {
+ return Deployment.getInstance().invoke("digitalocean:index/getDatabaseUser:getDatabaseUser", TypeShape.of(GetDatabaseUserResult.class), args, Utilities.withVersion(options));
}
/**
- * Get information on a domain. This data source provides the name, TTL, and zone
- * file as configured on your DigitalOcean account. This is useful if the domain
- * name in question is not managed by this provider or you need to utilize TTL or zone
- * file data.
- *
- * An error is triggered if the provided domain name is not managed with your
- * DigitalOcean account.
+ * Provides information on a DigitalOcean database user resource.
*
* ## Example Usage
*
- * Get the zone file for a domain:
- *
* <!--Start PulumiCodeChooser -->
*
* {@code
@@ -1913,7 +2282,8 @@ public static CompletableFuture getDatabaseUserPlain(GetD
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDomainArgs;
+ * import com.pulumi.digitalocean.inputs.GetDatabaseClusterArgs;
+ * import com.pulumi.digitalocean.inputs.GetDatabaseUserArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -1927,11 +2297,16 @@ public static CompletableFuture getDatabaseUserPlain(GetD
* }
*
* public static void stack(Context ctx) {
- * final var example = DigitaloceanFunctions.getDomain(GetDomainArgs.builder()
- * .name("example.com")
+ * final var main = DigitaloceanFunctions.getDatabaseCluster(GetDatabaseClusterArgs.builder()
+ * .name("main-cluster")
* .build());
*
- * ctx.export("domainOutput", example.applyValue(getDomainResult -> getDomainResult.zoneFile()));
+ * final var example = DigitaloceanFunctions.getDatabaseUser(GetDatabaseUserArgs.builder()
+ * .clusterId(main.applyValue(getDatabaseClusterResult -> getDatabaseClusterResult.id()))
+ * .name("example-user")
+ * .build());
+ *
+ * ctx.export("databaseUserPassword", example.applyValue(getDatabaseUserResult -> getDatabaseUserResult.password()));
* }
* }
* }
@@ -1939,8 +2314,8 @@ public static CompletableFuture getDatabaseUserPlain(GetD
* <!--End PulumiCodeChooser -->
*
*/
- public static Output getDomain(GetDomainArgs args) {
- return getDomain(args, InvokeOptions.Empty);
+ public static CompletableFuture getDatabaseUserPlain(GetDatabaseUserPlainArgs args, InvokeOptions options) {
+ return Deployment.getInstance().invokeAsync("digitalocean:index/getDatabaseUser:getDatabaseUser", TypeShape.of(GetDatabaseUserResult.class), args, Utilities.withVersion(options));
}
/**
* Get information on a domain. This data source provides the name, TTL, and zone
@@ -1990,8 +2365,8 @@ public static Output getDomain(GetDomainArgs args) {
* <!--End PulumiCodeChooser -->
*
*/
- public static CompletableFuture getDomainPlain(GetDomainPlainArgs args) {
- return getDomainPlain(args, InvokeOptions.Empty);
+ public static Output getDomain(GetDomainArgs args) {
+ return getDomain(args, InvokeOptions.Empty);
}
/**
* Get information on a domain. This data source provides the name, TTL, and zone
@@ -2041,8 +2416,8 @@ public static CompletableFuture getDomainPlain(GetDomainPlainAr
* <!--End PulumiCodeChooser -->
*
*/
- public static Output getDomain(GetDomainArgs args, InvokeOptions options) {
- return Deployment.getInstance().invoke("digitalocean:index/getDomain:getDomain", TypeShape.of(GetDomainResult.class), args, Utilities.withVersion(options));
+ public static CompletableFuture getDomainPlain(GetDomainPlainArgs args) {
+ return getDomainPlain(args, InvokeOptions.Empty);
}
/**
* Get information on a domain. This data source provides the name, TTL, and zone
@@ -2092,23 +2467,21 @@ public static Output getDomain(GetDomainArgs args, InvokeOption
* <!--End PulumiCodeChooser -->
*
*/
- public static CompletableFuture getDomainPlain(GetDomainPlainArgs args, InvokeOptions options) {
- return Deployment.getInstance().invokeAsync("digitalocean:index/getDomain:getDomain", TypeShape.of(GetDomainResult.class), args, Utilities.withVersion(options));
+ public static Output getDomain(GetDomainArgs args, InvokeOptions options) {
+ return Deployment.getInstance().invoke("digitalocean:index/getDomain:getDomain", TypeShape.of(GetDomainResult.class), args, Utilities.withVersion(options));
}
/**
- * Get information on domains for use in other resources, with the ability to filter and sort the results.
- * If no filters are specified, all domains will be returned.
- *
- * This data source is useful if the domains in question are not managed by this provider or you need to
- * utilize any of the domains' data.
+ * Get information on a domain. This data source provides the name, TTL, and zone
+ * file as configured on your DigitalOcean account. This is useful if the domain
+ * name in question is not managed by this provider or you need to utilize TTL or zone
+ * file data.
*
- * Note: You can use the `digitalocean.Domain` data source to obtain metadata
- * about a single domain if you already know the `name`.
+ * An error is triggered if the provided domain name is not managed with your
+ * DigitalOcean account.
*
* ## Example Usage
*
- * Use the `filter` block with a `key` string and `values` list to filter domains. (This example
- * also uses the regular expression `match_by` mode in order to match domains by suffix.)
+ * Get the zone file for a domain:
*
* <!--Start PulumiCodeChooser -->
*
@@ -2119,7 +2492,7 @@ public static CompletableFuture getDomainPlain(GetDomainPlainAr
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDomainsArgs;
+ * import com.pulumi.digitalocean.inputs.GetDomainArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -2133,7 +2506,111 @@ public static CompletableFuture getDomainPlain(GetDomainPlainAr
* }
*
* public static void stack(Context ctx) {
- * final var examples = DigitaloceanFunctions.getDomains(GetDomainsArgs.builder()
+ * final var example = DigitaloceanFunctions.getDomain(GetDomainArgs.builder()
+ * .name("example.com")
+ * .build());
+ *
+ * ctx.export("domainOutput", example.applyValue(getDomainResult -> getDomainResult.zoneFile()));
+ * }
+ * }
+ * }
+ *
+ * <!--End PulumiCodeChooser -->
+ *
+ */
+ public static Output getDomain(GetDomainArgs args, InvokeOutputOptions options) {
+ return Deployment.getInstance().invoke("digitalocean:index/getDomain:getDomain", TypeShape.of(GetDomainResult.class), args, Utilities.withVersion(options));
+ }
+ /**
+ * Get information on a domain. This data source provides the name, TTL, and zone
+ * file as configured on your DigitalOcean account. This is useful if the domain
+ * name in question is not managed by this provider or you need to utilize TTL or zone
+ * file data.
+ *
+ * An error is triggered if the provided domain name is not managed with your
+ * DigitalOcean account.
+ *
+ * ## Example Usage
+ *
+ * Get the zone file for a domain:
+ *
+ * <!--Start PulumiCodeChooser -->
+ *
+ * {@code
+ * package generated_program;
+ *
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.digitalocean.DigitaloceanFunctions;
+ * import com.pulumi.digitalocean.inputs.GetDomainArgs;
+ * 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) {
+ * final var example = DigitaloceanFunctions.getDomain(GetDomainArgs.builder()
+ * .name("example.com")
+ * .build());
+ *
+ * ctx.export("domainOutput", example.applyValue(getDomainResult -> getDomainResult.zoneFile()));
+ * }
+ * }
+ * }
+ *
+ * <!--End PulumiCodeChooser -->
+ *
+ */
+ public static CompletableFuture getDomainPlain(GetDomainPlainArgs args, InvokeOptions options) {
+ return Deployment.getInstance().invokeAsync("digitalocean:index/getDomain:getDomain", TypeShape.of(GetDomainResult.class), args, Utilities.withVersion(options));
+ }
+ /**
+ * Get information on domains for use in other resources, with the ability to filter and sort the results.
+ * If no filters are specified, all domains will be returned.
+ *
+ * This data source is useful if the domains in question are not managed by this provider or you need to
+ * utilize any of the domains' data.
+ *
+ * Note: You can use the `digitalocean.Domain` data source to obtain metadata
+ * about a single domain if you already know the `name`.
+ *
+ * ## Example Usage
+ *
+ * Use the `filter` block with a `key` string and `values` list to filter domains. (This example
+ * also uses the regular expression `match_by` mode in order to match domains by suffix.)
+ *
+ * <!--Start PulumiCodeChooser -->
+ *
+ * {@code
+ * package generated_program;
+ *
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.digitalocean.DigitaloceanFunctions;
+ * import com.pulumi.digitalocean.inputs.GetDomainsArgs;
+ * 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) {
+ * final var examples = DigitaloceanFunctions.getDomains(GetDomainsArgs.builder()
* .filters(GetDomainsFilterArgs.builder()
* .key("name")
* .values("example\\.com$")
@@ -2375,6 +2852,62 @@ public static CompletableFuture getDomainsPlain(GetDomainsPlai
public static Output getDomains(GetDomainsArgs args, InvokeOptions options) {
return Deployment.getInstance().invoke("digitalocean:index/getDomains:getDomains", TypeShape.of(GetDomainsResult.class), args, Utilities.withVersion(options));
}
+ /**
+ * Get information on domains for use in other resources, with the ability to filter and sort the results.
+ * If no filters are specified, all domains will be returned.
+ *
+ * This data source is useful if the domains in question are not managed by this provider or you need to
+ * utilize any of the domains' data.
+ *
+ * Note: You can use the `digitalocean.Domain` data source to obtain metadata
+ * about a single domain if you already know the `name`.
+ *
+ * ## Example Usage
+ *
+ * Use the `filter` block with a `key` string and `values` list to filter domains. (This example
+ * also uses the regular expression `match_by` mode in order to match domains by suffix.)
+ *
+ * <!--Start PulumiCodeChooser -->
+ *
+ * {@code
+ * package generated_program;
+ *
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.digitalocean.DigitaloceanFunctions;
+ * import com.pulumi.digitalocean.inputs.GetDomainsArgs;
+ * 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) {
+ * final var examples = DigitaloceanFunctions.getDomains(GetDomainsArgs.builder()
+ * .filters(GetDomainsFilterArgs.builder()
+ * .key("name")
+ * .values("example\\.com$")
+ * .matchBy("re")
+ * .build())
+ * .build());
+ *
+ * }
+ * }
+ * }
+ *
+ * <!--End PulumiCodeChooser -->
+ *
+ */
+ public static Output getDomains(GetDomainsArgs args, InvokeOutputOptions options) {
+ return Deployment.getInstance().invoke("digitalocean:index/getDomains:getDomains", TypeShape.of(GetDomainsResult.class), args, Utilities.withVersion(options));
+ }
/**
* Get information on domains for use in other resources, with the ability to filter and sort the results.
* If no filters are specified, all domains will be returned.
@@ -3154,17 +3687,21 @@ public static Output getDroplet(GetDropletArgs args, InvokeOpt
* <!--End PulumiCodeChooser -->
*
*/
- public static CompletableFuture getDropletPlain(GetDropletPlainArgs args, InvokeOptions options) {
- return Deployment.getInstance().invokeAsync("digitalocean:index/getDroplet:getDroplet", TypeShape.of(GetDropletResult.class), args, Utilities.withVersion(options));
+ public static Output getDroplet(GetDropletArgs args, InvokeOutputOptions options) {
+ return Deployment.getInstance().invoke("digitalocean:index/getDroplet:getDroplet", TypeShape.of(GetDropletResult.class), args, Utilities.withVersion(options));
}
/**
- * Droplet snapshots are saved instances of a Droplet. Use this data
- * source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other
- * resources.
+ * Get information on a Droplet for use in other resources. This data source provides
+ * all of the Droplet's properties as configured on your DigitalOcean account. This
+ * is useful if the Droplet in question is not managed by this provider or you need to
+ * utilize any of the Droplet's data.
+ *
+ * **Note:** This data source returns a single Droplet. When specifying a `tag`, an
+ * error is triggered if more than one Droplet is found.
*
* ## Example Usage
*
- * Get the Droplet snapshot:
+ * Get the Droplet by name:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3175,7 +3712,7 @@ public static CompletableFuture getDropletPlain(GetDropletPlai
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3189,19 +3726,18 @@ public static CompletableFuture getDropletPlain(GetDropletPlai
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
+ * final var example = DigitaloceanFunctions.getDroplet(GetDropletArgs.builder()
+ * .name("web")
* .build());
*
+ * ctx.export("dropletOutput", example.applyValue(getDropletResult -> getDropletResult.ipv4Address()));
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
- * Create image from snapshot:
+ * Get the Droplet by tag:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3212,9 +3748,7 @@ public static CompletableFuture getDropletPlain(GetDropletPlai
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
- * import com.pulumi.digitalocean.Droplet;
- * import com.pulumi.digitalocean.DropletArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3228,17 +3762,8 @@ public static CompletableFuture getDropletPlain(GetDropletPlai
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
- * .build());
- *
- * var from_snapshot = new Droplet("from-snapshot", DropletArgs.builder()
- * .image(web_snapshot.id())
- * .name("web-02")
- * .region("nyc3")
- * .size("s-2vcpu-4gb")
+ * final var example = DigitaloceanFunctions.getDroplet(GetDropletArgs.builder()
+ * .tag("web")
* .build());
*
* }
@@ -3247,18 +3772,7 @@ public static CompletableFuture getDropletPlain(GetDropletPlai
*
* <!--End PulumiCodeChooser -->
*
- */
- public static Output getDropletSnapshot() {
- return getDropletSnapshot(GetDropletSnapshotArgs.Empty, InvokeOptions.Empty);
- }
- /**
- * Droplet snapshots are saved instances of a Droplet. Use this data
- * source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other
- * resources.
- *
- * ## Example Usage
- *
- * Get the Droplet snapshot:
+ * Get the Droplet by ID:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3269,7 +3783,7 @@ public static Output getDropletSnapshot() {
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3283,10 +3797,8 @@ public static Output getDropletSnapshot() {
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
+ * final var example = DigitaloceanFunctions.getDroplet(GetDropletArgs.builder()
+ * .id(exampleDigitaloceanKubernetesCluster.nodePool()[0].nodes()[0].dropletId())
* .build());
*
* }
@@ -3295,7 +3807,14 @@ public static Output getDropletSnapshot() {
*
* <!--End PulumiCodeChooser -->
*
- * Create image from snapshot:
+ */
+ public static CompletableFuture getDropletPlain(GetDropletPlainArgs args, InvokeOptions options) {
+ return Deployment.getInstance().invokeAsync("digitalocean:index/getDroplet:getDroplet", TypeShape.of(GetDropletResult.class), args, Utilities.withVersion(options));
+ }
+ /**
+ * ## Example Usage
+ *
+ * Get the Droplet Autoscale pool by name:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3306,9 +3825,7 @@ public static Output getDropletSnapshot() {
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
- * import com.pulumi.digitalocean.Droplet;
- * import com.pulumi.digitalocean.DropletArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3322,17 +3839,8 @@ public static Output getDropletSnapshot() {
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
- * .build());
- *
- * var from_snapshot = new Droplet("from-snapshot", DropletArgs.builder()
- * .image(web_snapshot.id())
- * .name("web-02")
- * .region("nyc3")
- * .size("s-2vcpu-4gb")
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .name(my_existing_autoscale_pool.name())
* .build());
*
* }
@@ -3341,18 +3849,7 @@ public static Output getDropletSnapshot() {
*
* <!--End PulumiCodeChooser -->
*
- */
- public static CompletableFuture getDropletSnapshotPlain() {
- return getDropletSnapshotPlain(GetDropletSnapshotPlainArgs.Empty, InvokeOptions.Empty);
- }
- /**
- * Droplet snapshots are saved instances of a Droplet. Use this data
- * source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other
- * resources.
- *
- * ## Example Usage
- *
- * Get the Droplet snapshot:
+ * Get the Droplet Autoscale pool by ID:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3363,7 +3860,7 @@ public static CompletableFuture getDropletSnapshotPlai
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3377,10 +3874,8 @@ public static CompletableFuture getDropletSnapshotPlai
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .id(my_existing_autoscale_pool.id())
* .build());
*
* }
@@ -3389,7 +3884,14 @@ public static CompletableFuture getDropletSnapshotPlai
*
* <!--End PulumiCodeChooser -->
*
- * Create image from snapshot:
+ */
+ public static Output getDropletAutoscale() {
+ return getDropletAutoscale(GetDropletAutoscaleArgs.Empty, InvokeOptions.Empty);
+ }
+ /**
+ * ## Example Usage
+ *
+ * Get the Droplet Autoscale pool by name:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3400,9 +3902,7 @@ public static CompletableFuture getDropletSnapshotPlai
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
- * import com.pulumi.digitalocean.Droplet;
- * import com.pulumi.digitalocean.DropletArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3416,17 +3916,43 @@ public static CompletableFuture getDropletSnapshotPlai
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .name(my_existing_autoscale_pool.name())
* .build());
*
- * var from_snapshot = new Droplet("from-snapshot", DropletArgs.builder()
- * .image(web_snapshot.id())
- * .name("web-02")
- * .region("nyc3")
- * .size("s-2vcpu-4gb")
+ * }
+ * }
+ * }
+ *
+ * <!--End PulumiCodeChooser -->
+ *
+ * Get the Droplet Autoscale pool by ID:
+ *
+ * <!--Start PulumiCodeChooser -->
+ *
+ * {@code
+ * package generated_program;
+ *
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.digitalocean.DigitaloceanFunctions;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
+ * 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) {
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .id(my_existing_autoscale_pool.id())
* .build());
*
* }
@@ -3436,17 +3962,13 @@ public static CompletableFuture getDropletSnapshotPlai
* <!--End PulumiCodeChooser -->
*
*/
- public static Output getDropletSnapshot(GetDropletSnapshotArgs args) {
- return getDropletSnapshot(args, InvokeOptions.Empty);
+ public static CompletableFuture getDropletAutoscalePlain() {
+ return getDropletAutoscalePlain(GetDropletAutoscalePlainArgs.Empty, InvokeOptions.Empty);
}
/**
- * Droplet snapshots are saved instances of a Droplet. Use this data
- * source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other
- * resources.
- *
* ## Example Usage
*
- * Get the Droplet snapshot:
+ * Get the Droplet Autoscale pool by name:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3457,7 +3979,7 @@ public static Output getDropletSnapshot(GetDropletSnap
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3471,10 +3993,8 @@ public static Output getDropletSnapshot(GetDropletSnap
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .name(my_existing_autoscale_pool.name())
* .build());
*
* }
@@ -3483,7 +4003,7 @@ public static Output getDropletSnapshot(GetDropletSnap
*
* <!--End PulumiCodeChooser -->
*
- * Create image from snapshot:
+ * Get the Droplet Autoscale pool by ID:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3494,9 +4014,7 @@ public static Output getDropletSnapshot(GetDropletSnap
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
- * import com.pulumi.digitalocean.Droplet;
- * import com.pulumi.digitalocean.DropletArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3510,17 +4028,8 @@ public static Output getDropletSnapshot(GetDropletSnap
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
- * .build());
- *
- * var from_snapshot = new Droplet("from-snapshot", DropletArgs.builder()
- * .image(web_snapshot.id())
- * .name("web-02")
- * .region("nyc3")
- * .size("s-2vcpu-4gb")
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .id(my_existing_autoscale_pool.id())
* .build());
*
* }
@@ -3530,17 +4039,13 @@ public static Output getDropletSnapshot(GetDropletSnap
* <!--End PulumiCodeChooser -->
*
*/
- public static CompletableFuture getDropletSnapshotPlain(GetDropletSnapshotPlainArgs args) {
- return getDropletSnapshotPlain(args, InvokeOptions.Empty);
+ public static Output getDropletAutoscale(GetDropletAutoscaleArgs args) {
+ return getDropletAutoscale(args, InvokeOptions.Empty);
}
/**
- * Droplet snapshots are saved instances of a Droplet. Use this data
- * source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other
- * resources.
- *
* ## Example Usage
*
- * Get the Droplet snapshot:
+ * Get the Droplet Autoscale pool by name:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3551,7 +4056,7 @@ public static CompletableFuture getDropletSnapshotPlai
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3565,10 +4070,8 @@ public static CompletableFuture getDropletSnapshotPlai
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .name(my_existing_autoscale_pool.name())
* .build());
*
* }
@@ -3577,7 +4080,7 @@ public static CompletableFuture getDropletSnapshotPlai
*
* <!--End PulumiCodeChooser -->
*
- * Create image from snapshot:
+ * Get the Droplet Autoscale pool by ID:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3588,9 +4091,7 @@ public static CompletableFuture getDropletSnapshotPlai
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
- * import com.pulumi.digitalocean.Droplet;
- * import com.pulumi.digitalocean.DropletArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3604,17 +4105,8 @@ public static CompletableFuture getDropletSnapshotPlai
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
- * .build());
- *
- * var from_snapshot = new Droplet("from-snapshot", DropletArgs.builder()
- * .image(web_snapshot.id())
- * .name("web-02")
- * .region("nyc3")
- * .size("s-2vcpu-4gb")
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .id(my_existing_autoscale_pool.id())
* .build());
*
* }
@@ -3624,17 +4116,13 @@ public static CompletableFuture getDropletSnapshotPlai
* <!--End PulumiCodeChooser -->
*
*/
- public static Output getDropletSnapshot(GetDropletSnapshotArgs args, InvokeOptions options) {
- return Deployment.getInstance().invoke("digitalocean:index/getDropletSnapshot:getDropletSnapshot", TypeShape.of(GetDropletSnapshotResult.class), args, Utilities.withVersion(options));
+ public static CompletableFuture getDropletAutoscalePlain(GetDropletAutoscalePlainArgs args) {
+ return getDropletAutoscalePlain(args, InvokeOptions.Empty);
}
/**
- * Droplet snapshots are saved instances of a Droplet. Use this data
- * source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other
- * resources.
- *
* ## Example Usage
*
- * Get the Droplet snapshot:
+ * Get the Droplet Autoscale pool by name:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3645,7 +4133,7 @@ public static Output getDropletSnapshot(GetDropletSnap
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3659,10 +4147,8 @@ public static Output getDropletSnapshot(GetDropletSnap
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .name(my_existing_autoscale_pool.name())
* .build());
*
* }
@@ -3671,7 +4157,7 @@ public static Output getDropletSnapshot(GetDropletSnap
*
* <!--End PulumiCodeChooser -->
*
- * Create image from snapshot:
+ * Get the Droplet Autoscale pool by ID:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3682,9 +4168,7 @@ public static Output getDropletSnapshot(GetDropletSnap
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
- * import com.pulumi.digitalocean.Droplet;
- * import com.pulumi.digitalocean.DropletArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3698,17 +4182,8 @@ public static Output getDropletSnapshot(GetDropletSnap
* }
*
* public static void stack(Context ctx) {
- * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
- * .nameRegex("^web")
- * .region("nyc3")
- * .mostRecent(true)
- * .build());
- *
- * var from_snapshot = new Droplet("from-snapshot", DropletArgs.builder()
- * .image(web_snapshot.id())
- * .name("web-02")
- * .region("nyc3")
- * .size("s-2vcpu-4gb")
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .id(my_existing_autoscale_pool.id())
* .build());
*
* }
@@ -3718,27 +4193,13 @@ public static Output getDropletSnapshot(GetDropletSnap
* <!--End PulumiCodeChooser -->
*
*/
- public static CompletableFuture getDropletSnapshotPlain(GetDropletSnapshotPlainArgs args, InvokeOptions options) {
- return Deployment.getInstance().invokeAsync("digitalocean:index/getDropletSnapshot:getDropletSnapshot", TypeShape.of(GetDropletSnapshotResult.class), args, Utilities.withVersion(options));
+ public static Output getDropletAutoscale(GetDropletAutoscaleArgs args, InvokeOptions options) {
+ return Deployment.getInstance().invoke("digitalocean:index/getDropletAutoscale:getDropletAutoscale", TypeShape.of(GetDropletAutoscaleResult.class), args, Utilities.withVersion(options));
}
/**
- * Get information on Droplets for use in other resources, with the ability to filter and sort the results.
- * If no filters are specified, all Droplets will be returned.
- *
- * This data source is useful if the Droplets in question are not managed by the provider or you need to
- * utilize any of the Droplets' data.
- *
- * By default, only non-GPU Droplets are returned. To list only GPU Droplets, set
- * the `gpus` attribute to `true`.
- *
- * Note: You can use the `digitalocean.Droplet` data source to obtain metadata
- * about a single Droplet if you already know the `id`, unique `name`, or unique `tag` to retrieve.
- *
* ## Example Usage
*
- * Use the `filter` block with a `key` string and `values` list to filter images.
- *
- * For example to find all Droplets with size `s-1vcpu-1gb`:
+ * Get the Droplet Autoscale pool by name:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3749,7 +4210,7 @@ public static CompletableFuture getDropletSnapshotPlai
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletsArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3763,11 +4224,8 @@ public static CompletableFuture getDropletSnapshotPlai
* }
*
* public static void stack(Context ctx) {
- * final var small = DigitaloceanFunctions.getDroplets(GetDropletsArgs.builder()
- * .filters(GetDropletsFilterArgs.builder()
- * .key("size")
- * .values("s-1vcpu-1gb")
- * .build())
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .name(my_existing_autoscale_pool.name())
* .build());
*
* }
@@ -3776,7 +4234,7 @@ public static CompletableFuture getDropletSnapshotPlai
*
* <!--End PulumiCodeChooser -->
*
- * You can filter on multiple fields and sort the results as well:
+ * Get the Droplet Autoscale pool by ID:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3787,7 +4245,7 @@ public static CompletableFuture getDropletSnapshotPlai
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletsArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3801,20 +4259,8 @@ public static CompletableFuture getDropletSnapshotPlai
* }
*
* public static void stack(Context ctx) {
- * final var small-with-backups = DigitaloceanFunctions.getDroplets(GetDropletsArgs.builder()
- * .filters(
- * GetDropletsFilterArgs.builder()
- * .key("size")
- * .values("s-1vcpu-1gb")
- * .build(),
- * GetDropletsFilterArgs.builder()
- * .key("backups")
- * .values("true")
- * .build())
- * .sorts(GetDropletsSortArgs.builder()
- * .key("created_at")
- * .direction("desc")
- * .build())
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .id(my_existing_autoscale_pool.id())
* .build());
*
* }
@@ -3824,27 +4270,13 @@ public static CompletableFuture getDropletSnapshotPlai
* <!--End PulumiCodeChooser -->
*
*/
- public static Output getDroplets() {
- return getDroplets(GetDropletsArgs.Empty, InvokeOptions.Empty);
+ public static Output getDropletAutoscale(GetDropletAutoscaleArgs args, InvokeOutputOptions options) {
+ return Deployment.getInstance().invoke("digitalocean:index/getDropletAutoscale:getDropletAutoscale", TypeShape.of(GetDropletAutoscaleResult.class), args, Utilities.withVersion(options));
}
/**
- * Get information on Droplets for use in other resources, with the ability to filter and sort the results.
- * If no filters are specified, all Droplets will be returned.
- *
- * This data source is useful if the Droplets in question are not managed by the provider or you need to
- * utilize any of the Droplets' data.
- *
- * By default, only non-GPU Droplets are returned. To list only GPU Droplets, set
- * the `gpus` attribute to `true`.
- *
- * Note: You can use the `digitalocean.Droplet` data source to obtain metadata
- * about a single Droplet if you already know the `id`, unique `name`, or unique `tag` to retrieve.
- *
* ## Example Usage
*
- * Use the `filter` block with a `key` string and `values` list to filter images.
- *
- * For example to find all Droplets with size `s-1vcpu-1gb`:
+ * Get the Droplet Autoscale pool by name:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3855,7 +4287,7 @@ public static Output getDroplets() {
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletsArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3869,11 +4301,8 @@ public static Output getDroplets() {
* }
*
* public static void stack(Context ctx) {
- * final var small = DigitaloceanFunctions.getDroplets(GetDropletsArgs.builder()
- * .filters(GetDropletsFilterArgs.builder()
- * .key("size")
- * .values("s-1vcpu-1gb")
- * .build())
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .name(my_existing_autoscale_pool.name())
* .build());
*
* }
@@ -3882,7 +4311,7 @@ public static Output getDroplets() {
*
* <!--End PulumiCodeChooser -->
*
- * You can filter on multiple fields and sort the results as well:
+ * Get the Droplet Autoscale pool by ID:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3893,7 +4322,7 @@ public static Output getDroplets() {
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletsArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletAutoscaleArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3907,20 +4336,8 @@ public static Output getDroplets() {
* }
*
* public static void stack(Context ctx) {
- * final var small-with-backups = DigitaloceanFunctions.getDroplets(GetDropletsArgs.builder()
- * .filters(
- * GetDropletsFilterArgs.builder()
- * .key("size")
- * .values("s-1vcpu-1gb")
- * .build(),
- * GetDropletsFilterArgs.builder()
- * .key("backups")
- * .values("true")
- * .build())
- * .sorts(GetDropletsSortArgs.builder()
- * .key("created_at")
- * .direction("desc")
- * .build())
+ * final var my-imported-autoscale-pool = DigitaloceanFunctions.getDropletAutoscale(GetDropletAutoscaleArgs.builder()
+ * .id(my_existing_autoscale_pool.id())
* .build());
*
* }
@@ -3930,27 +4347,17 @@ public static Output getDroplets() {
* <!--End PulumiCodeChooser -->
*
*/
- public static CompletableFuture getDropletsPlain() {
- return getDropletsPlain(GetDropletsPlainArgs.Empty, InvokeOptions.Empty);
+ public static CompletableFuture getDropletAutoscalePlain(GetDropletAutoscalePlainArgs args, InvokeOptions options) {
+ return Deployment.getInstance().invokeAsync("digitalocean:index/getDropletAutoscale:getDropletAutoscale", TypeShape.of(GetDropletAutoscaleResult.class), args, Utilities.withVersion(options));
}
/**
- * Get information on Droplets for use in other resources, with the ability to filter and sort the results.
- * If no filters are specified, all Droplets will be returned.
- *
- * This data source is useful if the Droplets in question are not managed by the provider or you need to
- * utilize any of the Droplets' data.
- *
- * By default, only non-GPU Droplets are returned. To list only GPU Droplets, set
- * the `gpus` attribute to `true`.
- *
- * Note: You can use the `digitalocean.Droplet` data source to obtain metadata
- * about a single Droplet if you already know the `id`, unique `name`, or unique `tag` to retrieve.
+ * Droplet snapshots are saved instances of a Droplet. Use this data
+ * source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other
+ * resources.
*
* ## Example Usage
*
- * Use the `filter` block with a `key` string and `values` list to filter images.
- *
- * For example to find all Droplets with size `s-1vcpu-1gb`:
+ * Get the Droplet snapshot:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3961,7 +4368,7 @@ public static CompletableFuture getDropletsPlain() {
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletsArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -3975,11 +4382,10 @@ public static CompletableFuture getDropletsPlain() {
* }
*
* public static void stack(Context ctx) {
- * final var small = DigitaloceanFunctions.getDroplets(GetDropletsArgs.builder()
- * .filters(GetDropletsFilterArgs.builder()
- * .key("size")
- * .values("s-1vcpu-1gb")
- * .build())
+ * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
+ * .nameRegex("^web")
+ * .region("nyc3")
+ * .mostRecent(true)
* .build());
*
* }
@@ -3988,7 +4394,7 @@ public static CompletableFuture getDropletsPlain() {
*
* <!--End PulumiCodeChooser -->
*
- * You can filter on multiple fields and sort the results as well:
+ * Create image from snapshot:
*
* <!--Start PulumiCodeChooser -->
*
@@ -3999,7 +4405,9 @@ public static CompletableFuture getDropletsPlain() {
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.digitalocean.DigitaloceanFunctions;
- * import com.pulumi.digitalocean.inputs.GetDropletsArgs;
+ * import com.pulumi.digitalocean.inputs.GetDropletSnapshotArgs;
+ * import com.pulumi.digitalocean.Droplet;
+ * import com.pulumi.digitalocean.DropletArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
@@ -4013,20 +4421,17 @@ public static CompletableFuture getDropletsPlain() {
* }
*
* public static void stack(Context ctx) {
- * final var small-with-backups = DigitaloceanFunctions.getDroplets(GetDropletsArgs.builder()
- * .filters(
- * GetDropletsFilterArgs.builder()
- * .key("size")
- * .values("s-1vcpu-1gb")
- * .build(),
- * GetDropletsFilterArgs.builder()
- * .key("backups")
- * .values("true")
- * .build())
- * .sorts(GetDropletsSortArgs.builder()
- * .key("created_at")
- * .direction("desc")
- * .build())
+ * final var web-snapshot = DigitaloceanFunctions.getDropletSnapshot(GetDropletSnapshotArgs.builder()
+ * .nameRegex("^web")
+ * .region("nyc3")
+ * .mostRecent(true)
+ * .build());
+ *
+ * var from_snapshot = new Droplet("from-snapshot", DropletArgs.builder()
+ * .image(web_snapshot.id())
+ * .name("web-02")
+ * .region("nyc3")
+ * .size("s-2vcpu-4gb")
* .build());
*
* }
@@ -4036,27 +4441,17 @@ public static CompletableFuture getDropletsPlain() {
* <!--End PulumiCodeChooser -->
*
*/
- public static Output getDroplets(GetDropletsArgs args) {
- return getDroplets(args, InvokeOptions.Empty);
+ public static Output