get Image
Get information on an image for use in other resources (e.g. creating a Droplet based on snapshot). This data source provides all of the image properties as configured on your DigitalOcean account. This is useful if the image in question is not managed by the provider or you need to utilize any of the image's data. An error is triggered if zero or more than one result is returned by the query.
Example Usage
Get the data about a snapshot:
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.GetImageArgs;
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 example1 = DigitaloceanFunctions.getImage(GetImageArgs.builder()
.name("example-1.0.0")
.build());
}
}
Return
A collection of values returned by getImage.
Parameters
A collection of arguments for invoking getImage.
Return
A collection of values returned by getImage.
See also
Parameters
The id of the image
The name of the image.
The slug of the official image. If name
is specified, you may also specify:
Restrict the search to one of the following categories of images:
Return
A collection of values returned by getImage.
See also
Parameters
Builder for com.pulumi.digitalocean.kotlin.inputs.GetImagePlainArgs.