import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Image resource in Oracle Cloud Infrastructure Core service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/iaas/latest/Image * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/ * * Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service. * * When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and * the OCID of the compartment containing that instance. For more information about images, * see [Managing Custom Images](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm). * * When importing an exported image from Object Storage, you specify the source information * in [ImageSourceDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/ImageSourceDetails). * * When importing an image based on the namespace, bucket name, and object name, * use [ImageSourceViaObjectStorageTupleDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/ImageSourceViaObjectStorageTupleDetails). * * When importing an image based on the Object Storage URL, use * [ImageSourceViaObjectStorageUriDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/requests/ImageSourceViaObjectStorageUriDetails). * See [Object Storage URLs](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm#URLs) and [Using Pre-Authenticated Requests](https://docs.cloud.oracle.com/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm) * for constructing URLs for image import/export. * * For more information about importing exported images, see * [Image Import/Export](https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/imageimportexport.htm). * * You may optionally specify a *display name* for the image, which is simply a friendly name or description. * It does not have to be unique, and you can change it. See [UpdateImage](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Image/UpdateImage). * Avoid entering confidential information. * * ## Example Usage * * ### Create image from instance in tenancy * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testImage = new oci.core.Image("test_image", { * compartmentId: compartmentId, * instanceId: testInstance.id, * definedTags: { * "Operations.CostCenter": "42", * }, * displayName: imageDisplayName, * launchMode: imageLaunchMode, * freeformTags: { * Department: "Finance", * }, * }); * ``` * * ### Create image from exported image via direct access to object store * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testImage = new oci.core.Image("test_image", { * compartmentId: compartmentId, * displayName: imageDisplayName, * launchMode: imageLaunchMode, * imageSourceDetails: { * sourceType: "objectStorageTuple", * bucketName: bucketName, * namespaceName: namespace, * objectName: objectName, * operatingSystem: imageImageSourceDetailsOperatingSystem, * operatingSystemVersion: imageImageSourceDetailsOperatingSystemVersion, * sourceImageType: sourceImageType, * }, * }); * ``` * * ### Create image from exported image at publicly accessible uri * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testImage = new oci.core.Image("test_image", { * compartmentId: compartmentId, * displayName: imageDisplayName, * launchMode: imageLaunchMode, * imageSourceDetails: { * sourceType: "objectStorageUri", * sourceUri: sourceUri, * operatingSystem: imageImageSourceDetailsOperatingSystem, * operatingSystemVersion: imageImageSourceDetailsOperatingSystemVersion, * sourceImageType: sourceImageType, * }, * }); * ``` * * ## Import * * Images can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:Core/image:Image test_image "id" * ``` */ export declare class Image extends pulumi.CustomResource { /** * Get an existing Image resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ImageState, opts?: pulumi.CustomResourceOptions): Image; /** * Returns true if the given object is an instance of Image. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Image; /** * Oracle Cloud Agent features supported on the image. */ readonly agentFeatures: pulumi.Output; /** * The OCID of the image originally used to launch the instance. */ readonly baseImageId: pulumi.Output; /** * The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example: `100` */ readonly billableSizeInGbs: pulumi.Output; /** * (Updatable) The OCID of the compartment you want the image to be created in. */ readonly compartmentId: pulumi.Output; /** * 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` */ readonly createImageAllowed: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information. * * You cannot use a platform image name as a custom image name. * * Example: `My Oracle Linux image` */ readonly displayName: pulumi.Output; /** * (Updatable) 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; readonly imageSourceDetails: pulumi.Output; /** * The OCID of the instance you want to use as the basis for the image. */ readonly instanceId: pulumi.Output; /** * Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. * * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. * * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. * * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly launchMode: pulumi.Output; /** * Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values. */ readonly launchOptions: pulumi.Output; /** * The listing type of the image. The default value is "NONE". */ readonly listingType: pulumi.Output; /** * The image's operating system. Example: `Oracle Linux` */ readonly operatingSystem: pulumi.Output; /** * The image's operating system version. Example: `7.2` */ readonly operatingSystemVersion: pulumi.Output; /** * 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` */ readonly sizeInMbs: pulumi.Output; /** * The current state of the image. */ readonly state: pulumi.Output; /** * The date and time the image was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` */ readonly timeCreated: pulumi.Output; /** * Create a Image resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ImageArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Image resources. */ export interface ImageState { /** * Oracle Cloud Agent features supported on the image. */ agentFeatures?: pulumi.Input[] | undefined>; /** * The OCID of the image originally used to launch the instance. */ baseImageId?: pulumi.Input; /** * The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes). Example: `100` */ billableSizeInGbs?: pulumi.Input; /** * (Updatable) The OCID of the compartment you want the image to be created in. */ compartmentId?: pulumi.Input; /** * 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` */ createImageAllowed?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information. * * You cannot use a platform image name as a custom image name. * * Example: `My Oracle Linux image` */ displayName?: pulumi.Input; /** * (Updatable) 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; imageSourceDetails?: pulumi.Input; /** * The OCID of the instance you want to use as the basis for the image. */ instanceId?: pulumi.Input; /** * Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. * * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. * * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. * * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ launchMode?: pulumi.Input; /** * Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values. */ launchOptions?: pulumi.Input[] | undefined>; /** * The listing type of the image. The default value is "NONE". */ listingType?: pulumi.Input; /** * The image's operating system. Example: `Oracle Linux` */ operatingSystem?: pulumi.Input; /** * The image's operating system version. Example: `7.2` */ operatingSystemVersion?: pulumi.Input; /** * 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` */ sizeInMbs?: pulumi.Input; /** * The current state of the image. */ state?: pulumi.Input; /** * The date and time the image was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` */ timeCreated?: pulumi.Input; } /** * The set of arguments for constructing a Image resource. */ export interface ImageArgs { /** * (Updatable) The OCID of the compartment you want the image to be created in. */ compartmentId: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name for the image. It does not have to be unique, and it's changeable. Avoid entering confidential information. * * You cannot use a platform image name as a custom image name. * * Example: `My Oracle Linux image` */ displayName?: pulumi.Input; /** * (Updatable) 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; imageSourceDetails?: pulumi.Input; /** * The OCID of the instance you want to use as the basis for the image. */ instanceId?: pulumi.Input; /** * Specifies the configuration mode for launching virtual machine (VM) instances. The configuration modes are: * * `NATIVE` - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. * * `EMULATED` - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * * `PARAVIRTUALIZED` - VM instances launch with paravirtualized devices using VirtIO drivers. * * `ACCELERATEDPV` - VM instances launch with accelerated paravirtualized networking type. * * `CUSTOM` - VM instances launch with custom configuration settings specified in the `LaunchOptions` parameter. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ launchMode?: pulumi.Input; } //# sourceMappingURL=image.d.ts.map