Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi
oci.Core.getImage
Explore with Pulumi AI
This data source provides details about a specific Image resource in Oracle Cloud Infrastructure Core service.
Gets the specified image.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testImage = oci.Core.getImage({
imageId: oci_core_image.test_image.id,
});
import pulumi
import pulumi_oci as oci
test_image = oci.Core.get_image(image_id=oci_core_image["test_image"]["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Core.GetImage(ctx, &core.GetImageArgs{
ImageId: oci_core_image.Test_image.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testImage = Oci.Core.GetImage.Invoke(new()
{
ImageId = oci_core_image.Test_image.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.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 testImage = CoreFunctions.getImage(GetImageArgs.builder()
.imageId(oci_core_image.test_image().id())
.build());
}
}
variables:
testImage:
fn::invoke:
Function: oci:Core:getImage
Arguments:
imageId: ${oci_core_image.test_image.id}
Using getImage
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getImage(args: GetImageArgs, opts?: InvokeOptions): Promise<GetImageResult>
function getImageOutput(args: GetImageOutputArgs, opts?: InvokeOptions): Output<GetImageResult>
def get_image(image_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetImageResult
def get_image_output(image_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetImageResult]
func GetImage(ctx *Context, args *GetImageArgs, opts ...InvokeOption) (*GetImageResult, error)
func GetImageOutput(ctx *Context, args *GetImageOutputArgs, opts ...InvokeOption) GetImageResultOutput
> Note: This function is named GetImage
in the Go SDK.
public static class GetImage
{
public static Task<GetImageResult> InvokeAsync(GetImageArgs args, InvokeOptions? opts = null)
public static Output<GetImageResult> Invoke(GetImageInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Core/getImage:getImage
arguments:
# arguments dictionary
The following arguments are supported:
getImage Result
The following output properties are available:
- Agent
Features List<GetImage Agent Feature> - Oracle Cloud Agent features supported on the image.
- Base
Image stringId - The OCID of the image originally used to launch the instance.
- Billable
Size stringIn Gbs - The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example:
100
- Compartment
Id string - The OCID of the compartment containing the instance you want to use as the basis for the image.
- Create
Image boolAllowed - Whether instances launched with this image can be used to create new images. For example, you cannot create an image of an Oracle Database instance. Example:
true
- Dictionary<string, object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string - A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- Dictionary<string, object>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- The OCID of the image.
- Image
Id string - Image
Source List<GetDetails Image Image Source Detail> - Instance
Id string - Launch
Mode string - Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
- Launch
Options List<GetImage Launch Option> - Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
- Listing
Type string - The listing type of the image. The default value is "NONE".
- Operating
System string - The image's operating system. Example:
Oracle Linux
- Operating
System stringVersion - The image's operating system version. Example:
7.2
- Size
In stringMbs - The boot volume size for an instance launched from this image (1 MB = 1,048,576 bytes). Note this is not the same as the size of the image when it was exported or the actual size of the image. Example:
47694
- State string
- The current state of the image.
- Time
Created string - The date and time the image was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Agent
Features []GetImage Agent Feature - Oracle Cloud Agent features supported on the image.
- Base
Image stringId - The OCID of the image originally used to launch the instance.
- Billable
Size stringIn Gbs - The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example:
100
- Compartment
Id string - The OCID of the compartment containing the instance you want to use as the basis for the image.
- Create
Image boolAllowed - Whether instances launched with this image can be used to create new images. For example, you cannot create an image of an Oracle Database instance. Example:
true
- map[string]interface{}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string - A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- map[string]interface{}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- The OCID of the image.
- Image
Id string - Image
Source []GetDetails Image Image Source Detail - Instance
Id string - Launch
Mode string - Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
- Launch
Options []GetImage Launch Option - Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
- Listing
Type string - The listing type of the image. The default value is "NONE".
- Operating
System string - The image's operating system. Example:
Oracle Linux
- Operating
System stringVersion - The image's operating system version. Example:
7.2
- Size
In stringMbs - The boot volume size for an instance launched from this image (1 MB = 1,048,576 bytes). Note this is not the same as the size of the image when it was exported or the actual size of the image. Example:
47694
- State string
- The current state of the image.
- Time
Created string - The date and time the image was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- agent
Features List<GetImage Agent Feature> - Oracle Cloud Agent features supported on the image.
- base
Image StringId - The OCID of the image originally used to launch the instance.
- billable
Size StringIn Gbs - The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example:
100
- compartment
Id String - The OCID of the compartment containing the instance you want to use as the basis for the image.
- create
Image BooleanAllowed - Whether instances launched with this image can be used to create new images. For example, you cannot create an image of an Oracle Database instance. Example:
true
- Map<String,Object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String - A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<String,Object>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- The OCID of the image.
- image
Id String - image
Source List<GetDetails Image Image Source Detail> - instance
Id String - launch
Mode String - Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
- launch
Options List<GetImage Launch Option> - Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
- listing
Type String - The listing type of the image. The default value is "NONE".
- operating
System String - The image's operating system. Example:
Oracle Linux
- operating
System StringVersion - The image's operating system version. Example:
7.2
- size
In StringMbs - The boot volume size for an instance launched from this image (1 MB = 1,048,576 bytes). Note this is not the same as the size of the image when it was exported or the actual size of the image. Example:
47694
- state String
- The current state of the image.
- time
Created String - The date and time the image was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- agent
Features GetImage Agent Feature[] - Oracle Cloud Agent features supported on the image.
- base
Image stringId - The OCID of the image originally used to launch the instance.
- billable
Size stringIn Gbs - The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example:
100
- compartment
Id string - The OCID of the compartment containing the instance you want to use as the basis for the image.
- create
Image booleanAllowed - Whether instances launched with this image can be used to create new images. For example, you cannot create an image of an Oracle Database instance. Example:
true
- {[key: string]: any}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name string - A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- {[key: string]: any}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id string
- The OCID of the image.
- image
Id string - image
Source GetDetails Image Image Source Detail[] - instance
Id string - launch
Mode string - Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
- launch
Options GetImage Launch Option[] - Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
- listing
Type string - The listing type of the image. The default value is "NONE".
- operating
System string - The image's operating system. Example:
Oracle Linux
- operating
System stringVersion - The image's operating system version. Example:
7.2
- size
In stringMbs - The boot volume size for an instance launched from this image (1 MB = 1,048,576 bytes). Note this is not the same as the size of the image when it was exported or the actual size of the image. Example:
47694
- state string
- The current state of the image.
- time
Created string - The date and time the image was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- agent_
features Sequence[core.Get Image Agent Feature] - Oracle Cloud Agent features supported on the image.
- base_
image_ strid - The OCID of the image originally used to launch the instance.
- billable_
size_ strin_ gbs - The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example:
100
- compartment_
id str - The OCID of the compartment containing the instance you want to use as the basis for the image.
- create_
image_ boolallowed - Whether instances launched with this image can be used to create new images. For example, you cannot create an image of an Oracle Database instance. Example:
true
- Mapping[str, Any]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display_
name str - A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- Mapping[str, Any]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id str
- The OCID of the image.
- image_
id str - image_
source_ Sequence[core.details Get Image Image Source Detail] - instance_
id str - launch_
mode str - Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
- launch_
options Sequence[core.Get Image Launch Option] - Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
- listing_
type str - The listing type of the image. The default value is "NONE".
- operating_
system str - The image's operating system. Example:
Oracle Linux
- operating_
system_ strversion - The image's operating system version. Example:
7.2
- size_
in_ strmbs - The boot volume size for an instance launched from this image (1 MB = 1,048,576 bytes). Note this is not the same as the size of the image when it was exported or the actual size of the image. Example:
47694
- state str
- The current state of the image.
- time_
created str - The date and time the image was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- agent
Features List<Property Map> - Oracle Cloud Agent features supported on the image.
- base
Image StringId - The OCID of the image originally used to launch the instance.
- billable
Size StringIn Gbs - The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example:
100
- compartment
Id String - The OCID of the compartment containing the instance you want to use as the basis for the image.
- create
Image BooleanAllowed - Whether instances launched with this image can be used to create new images. For example, you cannot create an image of an Oracle Database instance. Example:
true
- Map<Any>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String - A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<Any>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- The OCID of the image.
- image
Id String - image
Source List<Property Map>Details - instance
Id String - launch
Mode String - Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
- launch
Options List<Property Map> - Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
- listing
Type String - The listing type of the image. The default value is "NONE".
- operating
System String - The image's operating system. Example:
Oracle Linux
- operating
System StringVersion - The image's operating system version. Example:
7.2
- size
In StringMbs - The boot volume size for an instance launched from this image (1 MB = 1,048,576 bytes). Note this is not the same as the size of the image when it was exported or the actual size of the image. Example:
47694
- state String
- The current state of the image.
- time
Created String - The date and time the image was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
Supporting Types
GetImageAgentFeature
- Is
Management boolSupported - This attribute is not used.
- Is
Monitoring boolSupported - This attribute is not used.
- Is
Management boolSupported - This attribute is not used.
- Is
Monitoring boolSupported - This attribute is not used.
- is
Management BooleanSupported - This attribute is not used.
- is
Monitoring BooleanSupported - This attribute is not used.
- is
Management booleanSupported - This attribute is not used.
- is
Monitoring booleanSupported - This attribute is not used.
- is_
management_ boolsupported - This attribute is not used.
- is_
monitoring_ boolsupported - This attribute is not used.
- is
Management BooleanSupported - This attribute is not used.
- is
Monitoring BooleanSupported - This attribute is not used.
GetImageImageSourceDetail
- Bucket
Name string - Namespace
Name string - Object
Name string - Operating
System string - The image's operating system. Example:
Oracle Linux
- Operating
System stringVersion - The image's operating system version. Example:
7.2
- Source
Image stringType - Source
Type string - Source
Uri string
- Bucket
Name string - Namespace
Name string - Object
Name string - Operating
System string - The image's operating system. Example:
Oracle Linux
- Operating
System stringVersion - The image's operating system version. Example:
7.2
- Source
Image stringType - Source
Type string - Source
Uri string
- bucket
Name String - namespace
Name String - object
Name String - operating
System String - The image's operating system. Example:
Oracle Linux
- operating
System StringVersion - The image's operating system version. Example:
7.2
- source
Image StringType - source
Type String - source
Uri String
- bucket
Name string - namespace
Name string - object
Name string - operating
System string - The image's operating system. Example:
Oracle Linux
- operating
System stringVersion - The image's operating system version. Example:
7.2
- source
Image stringType - source
Type string - source
Uri string
- bucket_
name str - namespace_
name str - object_
name str - operating_
system str - The image's operating system. Example:
Oracle Linux
- operating_
system_ strversion - The image's operating system version. Example:
7.2
- source_
image_ strtype - source_
type str - source_
uri str
- bucket
Name String - namespace
Name String - object
Name String - operating
System String - The image's operating system. Example:
Oracle Linux
- operating
System StringVersion - The image's operating system version. Example:
7.2
- source
Image StringType - source
Type String - source
Uri String
GetImageLaunchOption
- Boot
Volume stringType - Emulation type for the boot volume.
- Firmware string
- Firmware used to boot VM. Select the option that matches your operating system.
- Is
Consistent boolVolume Naming Enabled - Whether to enable consistent volume naming feature. Defaults to false.
- Is
Pv boolEncryption In Transit Enabled - Deprecated. Instead use
isPvEncryptionInTransitEnabled
in LaunchInstanceDetails. - Network
Type string - Emulation type for the physical network interface card (NIC).
- Remote
Data stringVolume Type - Emulation type for volume.
- Boot
Volume stringType - Emulation type for the boot volume.
- Firmware string
- Firmware used to boot VM. Select the option that matches your operating system.
- Is
Consistent boolVolume Naming Enabled - Whether to enable consistent volume naming feature. Defaults to false.
- Is
Pv boolEncryption In Transit Enabled - Deprecated. Instead use
isPvEncryptionInTransitEnabled
in LaunchInstanceDetails. - Network
Type string - Emulation type for the physical network interface card (NIC).
- Remote
Data stringVolume Type - Emulation type for volume.
- boot
Volume StringType - Emulation type for the boot volume.
- firmware String
- Firmware used to boot VM. Select the option that matches your operating system.
- is
Consistent BooleanVolume Naming Enabled - Whether to enable consistent volume naming feature. Defaults to false.
- is
Pv BooleanEncryption In Transit Enabled - Deprecated. Instead use
isPvEncryptionInTransitEnabled
in LaunchInstanceDetails. - network
Type String - Emulation type for the physical network interface card (NIC).
- remote
Data StringVolume Type - Emulation type for volume.
- boot
Volume stringType - Emulation type for the boot volume.
- firmware string
- Firmware used to boot VM. Select the option that matches your operating system.
- is
Consistent booleanVolume Naming Enabled - Whether to enable consistent volume naming feature. Defaults to false.
- is
Pv booleanEncryption In Transit Enabled - Deprecated. Instead use
isPvEncryptionInTransitEnabled
in LaunchInstanceDetails. - network
Type string - Emulation type for the physical network interface card (NIC).
- remote
Data stringVolume Type - Emulation type for volume.
- boot_
volume_ strtype - Emulation type for the boot volume.
- firmware str
- Firmware used to boot VM. Select the option that matches your operating system.
- is_
consistent_ boolvolume_ naming_ enabled - Whether to enable consistent volume naming feature. Defaults to false.
- is_
pv_ boolencryption_ in_ transit_ enabled - Deprecated. Instead use
isPvEncryptionInTransitEnabled
in LaunchInstanceDetails. - network_
type str - Emulation type for the physical network interface card (NIC).
- remote_
data_ strvolume_ type - Emulation type for volume.
- boot
Volume StringType - Emulation type for the boot volume.
- firmware String
- Firmware used to boot VM. Select the option that matches your operating system.
- is
Consistent BooleanVolume Naming Enabled - Whether to enable consistent volume naming feature. Defaults to false.
- is
Pv BooleanEncryption In Transit Enabled - Deprecated. Instead use
isPvEncryptionInTransitEnabled
in LaunchInstanceDetails. - network
Type String - Emulation type for the physical network interface card (NIC).
- remote
Data StringVolume Type - Emulation type for volume.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.