ImageImport

class ImageImport : KotlinCustomResource

Import a copy of your local on-premise file to ECS, and appear as a custom replacement in the corresponding domain.

NOTE: You must upload the image file to the object storage OSS in advance. NOTE: The region where the image is imported must be the same region as the OSS bucket where the image file is uploaded. NOTE: Available in 1.69.0+.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.ImageImport;
import com.pulumi.alicloud.ecs.ImageImportArgs;
import com.pulumi.alicloud.ecs.inputs.ImageImportDiskDeviceMappingArgs;
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) {
var this_ = new ImageImport("this", ImageImportArgs.builder()
.architecture("x86_64")
.description("test import image")
.diskDeviceMappings(ImageImportDiskDeviceMappingArgs.builder()
.diskImageSize(5)
.ossBucket("testimportimage")
.ossObject("root.img")
.build())
.imageName("test-import-image")
.licenseType("Auto")
.osType("linux")
.platform("Ubuntu")
.build());
}
}

Attributes Reference0

The following attributes are exported:

  • id - ID of the image.

Import

image can be imported using the id, e.g.

$ pulumi import alicloud:ecs/imageImport:ImageImport default m-uf66871ape***yg1q***

Properties

Link copied to clipboard
val architecture: Output<String>?

Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values: i386 , Default is x86_64.

Link copied to clipboard
val description: Output<String>?

Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.

Link copied to clipboard

Description of the system with disks and snapshots under the image.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val imageName: Output<String>?

The image name. The length is 2 ~ 128 English or Chinese characters. Must start with a english letter or Chinese, and cannot start with http: // and https: //. Can contain numbers, colons (:), underscores (_), or hyphens (-).

Link copied to clipboard
val licenseType: Output<String>?

The type of the license used to activate the operating system after the image is imported. Default value: Auto. Valid values: Auto,Aliyun,BYOL.

Link copied to clipboard
val osType: Output<String>?

Operating system platform type. Valid values: windows, Default is linux.

Link copied to clipboard
val platform: Output<String>

The operating system distribution. Default value: Others Linux. More valid values refer to ImportImage OpenAPI. NOTE: It's default value is Ubuntu before version 1.197.0.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>