GetImage
Use this data source to get the ID of an available OpenStack image.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var ubuntu = Output.Create(OpenStack.Images.GetImage.InvokeAsync(new OpenStack.Images.GetImageArgs
{
MostRecent = true,
Name = "Ubuntu 16.04",
Properties =
{
{ "key", "value" },
},
}));
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
ubuntu = openstack.images.get_image(most_recent=True,
name="Ubuntu 16.04",
properties={
"key": "value",
})import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const ubuntu = pulumi.output(openstack.images.getImage({
mostRecent: true,
name: "Ubuntu 16.04",
properties: {
key: "value",
},
}, { async: true }));Using GetImage
function getImage(args: GetImageArgs, opts?: InvokeOptions): Promise<GetImageResult>function get_image(member_status=None, most_recent=None, name=None, owner=None, properties=None, region=None, size_max=None, size_min=None, sort_direction=None, sort_key=None, tag=None, visibility=None, opts=None)func LookupImage(ctx *Context, args *LookupImageArgs, opts ...InvokeOption) (*LookupImageResult, error)Note: This function is named
LookupImagein the Go SDK.
public static class GetImage {
public static Task<GetImageResult> InvokeAsync(GetImageArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Member
Status string The status of the image. Must be one of “accepted”, “pending”, “rejected”, or “all”.
- Most
Recent bool If more than one result is returned, use the most recent image.
- Name string
The name of the image.
- Owner string
The owner (UUID) of the image.
- Properties Dictionary<string, object>
a map of key/value pairs to match an image with. All specified properties must be matched.
- Region string
The region in which to obtain the V2 Glance client. A Glance client is needed to create an Image that can be used with a compute instance. If omitted, the
regionargument of the provider is used.- Size
Max int The maximum size (in bytes) of the image to return.
- Size
Min int The minimum size (in bytes) of the image to return.
- Sort
Direction string Order the results in either
ascordesc.- Sort
Key string Sort images based on a certain key. Defaults to
name.- Tag string
Search for images with a specific tag.
- Visibility string
The visibility of the image. Must be one of “public”, “private”, “community”, or “shared”. Defaults to “private”.
- Member
Status string The status of the image. Must be one of “accepted”, “pending”, “rejected”, or “all”.
- Most
Recent bool If more than one result is returned, use the most recent image.
- Name string
The name of the image.
- Owner string
The owner (UUID) of the image.
- Properties map[string]interface{}
a map of key/value pairs to match an image with. All specified properties must be matched.
- Region string
The region in which to obtain the V2 Glance client. A Glance client is needed to create an Image that can be used with a compute instance. If omitted, the
regionargument of the provider is used.- Size
Max int The maximum size (in bytes) of the image to return.
- Size
Min int The minimum size (in bytes) of the image to return.
- Sort
Direction string Order the results in either
ascordesc.- Sort
Key string Sort images based on a certain key. Defaults to
name.- Tag string
Search for images with a specific tag.
- Visibility string
The visibility of the image. Must be one of “public”, “private”, “community”, or “shared”. Defaults to “private”.
- member
Status string The status of the image. Must be one of “accepted”, “pending”, “rejected”, or “all”.
- most
Recent boolean If more than one result is returned, use the most recent image.
- name string
The name of the image.
- owner string
The owner (UUID) of the image.
- properties {[key: string]: any}
a map of key/value pairs to match an image with. All specified properties must be matched.
- region string
The region in which to obtain the V2 Glance client. A Glance client is needed to create an Image that can be used with a compute instance. If omitted, the
regionargument of the provider is used.- size
Max number The maximum size (in bytes) of the image to return.
- size
Min number The minimum size (in bytes) of the image to return.
- sort
Direction string Order the results in either
ascordesc.- sort
Key string Sort images based on a certain key. Defaults to
name.- tag string
Search for images with a specific tag.
- visibility string
The visibility of the image. Must be one of “public”, “private”, “community”, or “shared”. Defaults to “private”.
- member_
status str The status of the image. Must be one of “accepted”, “pending”, “rejected”, or “all”.
- most_
recent bool If more than one result is returned, use the most recent image.
- name str
The name of the image.
- owner str
The owner (UUID) of the image.
- properties Dict[str, Any]
a map of key/value pairs to match an image with. All specified properties must be matched.
- region str
The region in which to obtain the V2 Glance client. A Glance client is needed to create an Image that can be used with a compute instance. If omitted, the
regionargument of the provider is used.- size_
max float The maximum size (in bytes) of the image to return.
- size_
min float The minimum size (in bytes) of the image to return.
- sort_
direction str Order the results in either
ascordesc.- sort_
key str Sort images based on a certain key. Defaults to
name.- tag str
Search for images with a specific tag.
- visibility str
The visibility of the image. Must be one of “public”, “private”, “community”, or “shared”. Defaults to “private”.
GetImage Result
The following output properties are available:
- Checksum string
The checksum of the data associated with the image.
- Container
Format string - Created
At string The date the image was created. *
container_format: The format of the image’s container. *disk_format: The format of the image’s disk.- Disk
Format string - File string
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- Id string
The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, object>
The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
- Min
Disk intGb The minimum amount of disk space required to use the image.
- Min
Ram intMb The minimum amount of ram required to use the image.
- Protected bool
Whether or not the image is protected.
- Region string
- Schema string
The path to the JSON-schema that represent the image or image
- Size
Bytes int The size of the image (in bytes).
- List<string>
The tags list of the image.
- Updated
At string The date the image was last updated.
- Member
Status string - Most
Recent bool - Name string
- Owner string
- Properties Dictionary<string, object>
Freeform information about the image.
- Size
Max int - Size
Min int - Sort
Direction string - Sort
Key string - Tag string
- Visibility string
- Checksum string
The checksum of the data associated with the image.
- Container
Format string - Created
At string The date the image was created. *
container_format: The format of the image’s container. *disk_format: The format of the image’s disk.- Disk
Format string - File string
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- Id string
The provider-assigned unique ID for this managed resource.
- Metadata map[string]interface{}
The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
- Min
Disk intGb The minimum amount of disk space required to use the image.
- Min
Ram intMb The minimum amount of ram required to use the image.
- Protected bool
Whether or not the image is protected.
- Region string
- Schema string
The path to the JSON-schema that represent the image or image
- Size
Bytes int The size of the image (in bytes).
- []string
The tags list of the image.
- Updated
At string The date the image was last updated.
- Member
Status string - Most
Recent bool - Name string
- Owner string
- Properties map[string]interface{}
Freeform information about the image.
- Size
Max int - Size
Min int - Sort
Direction string - Sort
Key string - Tag string
- Visibility string
- checksum string
The checksum of the data associated with the image.
- container
Format string - created
At string The date the image was created. *
container_format: The format of the image’s container. *disk_format: The format of the image’s disk.- disk
Format string - file string
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- id string
The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: any}
The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
- min
Disk numberGb The minimum amount of disk space required to use the image.
- min
Ram numberMb The minimum amount of ram required to use the image.
- protected boolean
Whether or not the image is protected.
- region string
- schema string
The path to the JSON-schema that represent the image or image
- size
Bytes number The size of the image (in bytes).
- string[]
The tags list of the image.
- updated
At string The date the image was last updated.
- member
Status string - most
Recent boolean - name string
- owner string
- properties {[key: string]: any}
Freeform information about the image.
- size
Max number - size
Min number - sort
Direction string - sort
Key string - tag string
- visibility string
- checksum str
The checksum of the data associated with the image.
- container_
format str - created_
at str The date the image was created. *
container_format: The format of the image’s container. *disk_format: The format of the image’s disk.- disk_
format str - file str
the trailing path after the glance endpoint that represent the location of the image or the path to retrieve it.
- id str
The provider-assigned unique ID for this managed resource.
- metadata Dict[str, Any]
The metadata associated with the image. Image metadata allow for meaningfully define the image properties and tags. See https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
- min_
disk_ floatgb The minimum amount of disk space required to use the image.
- min_
ram_ floatmb The minimum amount of ram required to use the image.
- protected bool
Whether or not the image is protected.
- region str
- schema str
The path to the JSON-schema that represent the image or image
- size_
bytes float The size of the image (in bytes).
- List[str]
The tags list of the image.
- updated_
at str The date the image was last updated.
- member_
status str - most_
recent bool - name str
- owner str
- properties Dict[str, Any]
Freeform information about the image.
- size_
max float - size_
min float - sort_
direction str - sort_
key str - tag str
- visibility str
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.