GetImage
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 this 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
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var example1 = Output.Create(DigitalOcean.GetImage.InvokeAsync(new DigitalOcean.GetImageArgs
{
Name = "example-1.0.0",
}));
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
example1 = digitalocean.get_image(name="example-1.0.0")import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const example1 = pulumi.output(digitalocean.getImage({
name: "example-1.0.0",
}, { async: true }));Using GetImage
function getImage(args: GetImageArgs, opts?: InvokeOptions): Promise<GetImageResult>function get_image(id=None, name=None, slug=None, source=None, opts=None)func GetImage(ctx *Context, args *GetImageArgs, opts ...InvokeOption) (*GetImageResult, error)public static class GetImage {
public static Task<GetImageResult> InvokeAsync(GetImageArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Id int
The id of the image
- Name string
The name of the image.
- Slug string
The slug of the official image.
- Source string
Restrict the search to one of the following categories of images: -
all- All images (whether public or private) -applications- One-click applications -distributions- Distributions -user- (Default) User (private) images
- Id int
The id of the image
- Name string
The name of the image.
- Slug string
The slug of the official image.
- Source string
Restrict the search to one of the following categories of images: -
all- All images (whether public or private) -applications- One-click applications -distributions- Distributions -user- (Default) User (private) images
- id number
The id of the image
- name string
The name of the image.
- slug string
The slug of the official image.
- source string
Restrict the search to one of the following categories of images: -
all- All images (whether public or private) -applications- One-click applications -distributions- Distributions -user- (Default) User (private) images
- id float
The id of the image
- name str
The name of the image.
- slug str
The slug of the official image.
- source str
Restrict the search to one of the following categories of images: -
all- All images (whether public or private) -applications- One-click applications -distributions- Distributions -user- (Default) User (private) images
GetImage Result
The following output properties are available:
- Created string
- Distribution string
The name of the distribution of the OS of the image. *
min_disk_size: The minimum ‘disk’ required for the image. *size_gigabytes: The size of the image in GB.- Error
Message string - Id int
- Image string
The id of the image (legacy parameter).
- Min
Disk intSize - Name string
- Private bool
Is image a public image or not. Public images represent Linux distributions or One-Click Applications, while non-public images represent snapshots and backups and are only available within your account. *
regions: A set of the regions that the image is available in. *tags: A set of tags applied to the image *created: When the image was created *status: Current status of the image *error_message: Any applicable error message pertaining to the image- Regions List<string>
- Size
Gigabytes double - Slug string
- Status string
- List<string>
- Type string
- Source string
- Created string
- Distribution string
The name of the distribution of the OS of the image. *
min_disk_size: The minimum ‘disk’ required for the image. *size_gigabytes: The size of the image in GB.- Error
Message string - Id int
- Image string
The id of the image (legacy parameter).
- Min
Disk intSize - Name string
- Private bool
Is image a public image or not. Public images represent Linux distributions or One-Click Applications, while non-public images represent snapshots and backups and are only available within your account. *
regions: A set of the regions that the image is available in. *tags: A set of tags applied to the image *created: When the image was created *status: Current status of the image *error_message: Any applicable error message pertaining to the image- Regions []string
- Size
Gigabytes float64 - Slug string
- Status string
- []string
- Type string
- Source string
- created string
- distribution string
The name of the distribution of the OS of the image. *
min_disk_size: The minimum ‘disk’ required for the image. *size_gigabytes: The size of the image in GB.- error
Message string - id number
- image string
The id of the image (legacy parameter).
- min
Disk numberSize - name string
- private boolean
Is image a public image or not. Public images represent Linux distributions or One-Click Applications, while non-public images represent snapshots and backups and are only available within your account. *
regions: A set of the regions that the image is available in. *tags: A set of tags applied to the image *created: When the image was created *status: Current status of the image *error_message: Any applicable error message pertaining to the image- regions string[]
- size
Gigabytes number - slug string
- status string
- string[]
- type string
- source string
- created str
- distribution str
The name of the distribution of the OS of the image. *
min_disk_size: The minimum ‘disk’ required for the image. *size_gigabytes: The size of the image in GB.- error_
message str - id float
- image str
The id of the image (legacy parameter).
- min_
disk_ floatsize - name str
- private bool
Is image a public image or not. Public images represent Linux distributions or One-Click Applications, while non-public images represent snapshots and backups and are only available within your account. *
regions: A set of the regions that the image is available in. *tags: A set of tags applied to the image *created: When the image was created *status: Current status of the image *error_message: Any applicable error message pertaining to the image- regions List[str]
- size_
gigabytes float - slug str
- status str
- List[str]
- type str
- source str
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.