1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getImage
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.Core.getImage

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    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:

    ImageId string
    The OCID of the image.
    ImageId string
    The OCID of the image.
    imageId String
    The OCID of the image.
    imageId string
    The OCID of the image.
    image_id str
    The OCID of the image.
    imageId String
    The OCID of the image.

    getImage Result

    The following output properties are available:

    AgentFeatures List<GetImageAgentFeature>
    Oracle Cloud Agent features supported on the image.
    BaseImageId string
    The OCID of the image originally used to launch the instance.
    BillableSizeInGbs string
    The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example: 100
    CompartmentId string
    The OCID of the compartment containing the instance you want to use as the basis for the image.
    CreateImageAllowed bool
    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
    DefinedTags 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"}
    DisplayName string
    A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags 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.
    ImageId string
    ImageSourceDetails List<GetImageImageSourceDetail>
    InstanceId string
    LaunchMode string
    Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
    LaunchOptions List<GetImageLaunchOption>
    Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
    ListingType string
    The listing type of the image. The default value is "NONE".
    OperatingSystem string
    The image's operating system. Example: Oracle Linux
    OperatingSystemVersion string
    The image's operating system version. Example: 7.2
    SizeInMbs string
    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.
    TimeCreated string
    The date and time the image was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    AgentFeatures []GetImageAgentFeature
    Oracle Cloud Agent features supported on the image.
    BaseImageId string
    The OCID of the image originally used to launch the instance.
    BillableSizeInGbs string
    The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example: 100
    CompartmentId string
    The OCID of the compartment containing the instance you want to use as the basis for the image.
    CreateImageAllowed bool
    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
    DefinedTags 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"}
    DisplayName string
    A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags 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.
    ImageId string
    ImageSourceDetails []GetImageImageSourceDetail
    InstanceId string
    LaunchMode string
    Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
    LaunchOptions []GetImageLaunchOption
    Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
    ListingType string
    The listing type of the image. The default value is "NONE".
    OperatingSystem string
    The image's operating system. Example: Oracle Linux
    OperatingSystemVersion string
    The image's operating system version. Example: 7.2
    SizeInMbs string
    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.
    TimeCreated string
    The date and time the image was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    agentFeatures List<GetImageAgentFeature>
    Oracle Cloud Agent features supported on the image.
    baseImageId String
    The OCID of the image originally used to launch the instance.
    billableSizeInGbs String
    The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example: 100
    compartmentId String
    The OCID of the compartment containing the instance you want to use as the basis for the image.
    createImageAllowed Boolean
    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
    definedTags 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"}
    displayName String
    A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags 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.
    imageId String
    imageSourceDetails List<GetImageImageSourceDetail>
    instanceId String
    launchMode String
    Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
    launchOptions List<GetImageLaunchOption>
    Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
    listingType String
    The listing type of the image. The default value is "NONE".
    operatingSystem String
    The image's operating system. Example: Oracle Linux
    operatingSystemVersion String
    The image's operating system version. Example: 7.2
    sizeInMbs String
    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.
    timeCreated String
    The date and time the image was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    agentFeatures GetImageAgentFeature[]
    Oracle Cloud Agent features supported on the image.
    baseImageId string
    The OCID of the image originally used to launch the instance.
    billableSizeInGbs string
    The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example: 100
    compartmentId string
    The OCID of the compartment containing the instance you want to use as the basis for the image.
    createImageAllowed boolean
    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
    definedTags {[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"}
    displayName string
    A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags {[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.
    imageId string
    imageSourceDetails GetImageImageSourceDetail[]
    instanceId string
    launchMode string
    Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
    launchOptions GetImageLaunchOption[]
    Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
    listingType string
    The listing type of the image. The default value is "NONE".
    operatingSystem string
    The image's operating system. Example: Oracle Linux
    operatingSystemVersion string
    The image's operating system version. Example: 7.2
    sizeInMbs string
    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.
    timeCreated 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.GetImageAgentFeature]
    Oracle Cloud Agent features supported on the image.
    base_image_id str
    The OCID of the image originally used to launch the instance.
    billable_size_in_gbs str
    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_allowed bool
    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
    defined_tags 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.
    freeform_tags 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_details Sequence[core.GetImageImageSourceDetail]
    instance_id str
    launch_mode str
    Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
    launch_options Sequence[core.GetImageLaunchOption]
    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_version str
    The image's operating system version. Example: 7.2
    size_in_mbs str
    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
    agentFeatures List<Property Map>
    Oracle Cloud Agent features supported on the image.
    baseImageId String
    The OCID of the image originally used to launch the instance.
    billableSizeInGbs String
    The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example: 100
    compartmentId String
    The OCID of the compartment containing the instance you want to use as the basis for the image.
    createImageAllowed Boolean
    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
    definedTags 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"}
    displayName String
    A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags 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.
    imageId String
    imageSourceDetails List<Property Map>
    instanceId String
    launchMode String
    Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are:
    launchOptions List<Property Map>
    Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
    listingType String
    The listing type of the image. The default value is "NONE".
    operatingSystem String
    The image's operating system. Example: Oracle Linux
    operatingSystemVersion String
    The image's operating system version. Example: 7.2
    sizeInMbs String
    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.
    timeCreated 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

    IsManagementSupported bool
    This attribute is not used.
    IsMonitoringSupported bool
    This attribute is not used.
    IsManagementSupported bool
    This attribute is not used.
    IsMonitoringSupported bool
    This attribute is not used.
    isManagementSupported Boolean
    This attribute is not used.
    isMonitoringSupported Boolean
    This attribute is not used.
    isManagementSupported boolean
    This attribute is not used.
    isMonitoringSupported boolean
    This attribute is not used.
    is_management_supported bool
    This attribute is not used.
    is_monitoring_supported bool
    This attribute is not used.
    isManagementSupported Boolean
    This attribute is not used.
    isMonitoringSupported Boolean
    This attribute is not used.

    GetImageImageSourceDetail

    BucketName string
    NamespaceName string
    ObjectName string
    OperatingSystem string
    The image's operating system. Example: Oracle Linux
    OperatingSystemVersion string
    The image's operating system version. Example: 7.2
    SourceImageType string
    SourceType string
    SourceUri string
    BucketName string
    NamespaceName string
    ObjectName string
    OperatingSystem string
    The image's operating system. Example: Oracle Linux
    OperatingSystemVersion string
    The image's operating system version. Example: 7.2
    SourceImageType string
    SourceType string
    SourceUri string
    bucketName String
    namespaceName String
    objectName String
    operatingSystem String
    The image's operating system. Example: Oracle Linux
    operatingSystemVersion String
    The image's operating system version. Example: 7.2
    sourceImageType String
    sourceType String
    sourceUri String
    bucketName string
    namespaceName string
    objectName string
    operatingSystem string
    The image's operating system. Example: Oracle Linux
    operatingSystemVersion string
    The image's operating system version. Example: 7.2
    sourceImageType string
    sourceType string
    sourceUri string
    bucket_name str
    namespace_name str
    object_name str
    operating_system str
    The image's operating system. Example: Oracle Linux
    operating_system_version str
    The image's operating system version. Example: 7.2
    source_image_type str
    source_type str
    source_uri str
    bucketName String
    namespaceName String
    objectName String
    operatingSystem String
    The image's operating system. Example: Oracle Linux
    operatingSystemVersion String
    The image's operating system version. Example: 7.2
    sourceImageType String
    sourceType String
    sourceUri String

    GetImageLaunchOption

    BootVolumeType string
    Emulation type for the boot volume.
    Firmware string
    Firmware used to boot VM. Select the option that matches your operating system.
    IsConsistentVolumeNamingEnabled bool
    Whether to enable consistent volume naming feature. Defaults to false.
    IsPvEncryptionInTransitEnabled bool
    Deprecated. Instead use isPvEncryptionInTransitEnabled in LaunchInstanceDetails.
    NetworkType string
    Emulation type for the physical network interface card (NIC).
    RemoteDataVolumeType string
    Emulation type for volume.
    BootVolumeType string
    Emulation type for the boot volume.
    Firmware string
    Firmware used to boot VM. Select the option that matches your operating system.
    IsConsistentVolumeNamingEnabled bool
    Whether to enable consistent volume naming feature. Defaults to false.
    IsPvEncryptionInTransitEnabled bool
    Deprecated. Instead use isPvEncryptionInTransitEnabled in LaunchInstanceDetails.
    NetworkType string
    Emulation type for the physical network interface card (NIC).
    RemoteDataVolumeType string
    Emulation type for volume.
    bootVolumeType String
    Emulation type for the boot volume.
    firmware String
    Firmware used to boot VM. Select the option that matches your operating system.
    isConsistentVolumeNamingEnabled Boolean
    Whether to enable consistent volume naming feature. Defaults to false.
    isPvEncryptionInTransitEnabled Boolean
    Deprecated. Instead use isPvEncryptionInTransitEnabled in LaunchInstanceDetails.
    networkType String
    Emulation type for the physical network interface card (NIC).
    remoteDataVolumeType String
    Emulation type for volume.
    bootVolumeType string
    Emulation type for the boot volume.
    firmware string
    Firmware used to boot VM. Select the option that matches your operating system.
    isConsistentVolumeNamingEnabled boolean
    Whether to enable consistent volume naming feature. Defaults to false.
    isPvEncryptionInTransitEnabled boolean
    Deprecated. Instead use isPvEncryptionInTransitEnabled in LaunchInstanceDetails.
    networkType string
    Emulation type for the physical network interface card (NIC).
    remoteDataVolumeType string
    Emulation type for volume.
    boot_volume_type str
    Emulation type for the boot volume.
    firmware str
    Firmware used to boot VM. Select the option that matches your operating system.
    is_consistent_volume_naming_enabled bool
    Whether to enable consistent volume naming feature. Defaults to false.
    is_pv_encryption_in_transit_enabled bool
    Deprecated. Instead use isPvEncryptionInTransitEnabled in LaunchInstanceDetails.
    network_type str
    Emulation type for the physical network interface card (NIC).
    remote_data_volume_type str
    Emulation type for volume.
    bootVolumeType String
    Emulation type for the boot volume.
    firmware String
    Firmware used to boot VM. Select the option that matches your operating system.
    isConsistentVolumeNamingEnabled Boolean
    Whether to enable consistent volume naming feature. Defaults to false.
    isPvEncryptionInTransitEnabled Boolean
    Deprecated. Instead use isPvEncryptionInTransitEnabled in LaunchInstanceDetails.
    networkType String
    Emulation type for the physical network interface card (NIC).
    remoteDataVolumeType String
    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.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi