ImageImportArgs

data class ImageImportArgs(val architecture: Output<String>? = null, val description: Output<String>? = null, val diskDeviceMappings: Output<List<ImageImportDiskDeviceMappingArgs>>? = null, val imageName: Output<String>? = null, val licenseType: Output<String>? = null, val osType: Output<String>? = null, val platform: Output<String>? = null) : ConvertibleToJava<ImageImportArgs>

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

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _this = new alicloud.ecs.ImageImport("this", {
description: "test import image",
architecture: "x86_64",
imageName: "test-import-image",
licenseType: "Auto",
platform: "Ubuntu",
osType: "linux",
diskDeviceMappings: [{
diskImageSize: 5,
ossBucket: "testimportimage",
ossObject: "root.img",
}],
});
import pulumi
import pulumi_alicloud as alicloud
this = alicloud.ecs.ImageImport("this",
description="test import image",
architecture="x86_64",
image_name="test-import-image",
license_type="Auto",
platform="Ubuntu",
os_type="linux",
disk_device_mappings=[alicloud.ecs.ImageImportDiskDeviceMappingArgs(
disk_image_size=5,
oss_bucket="testimportimage",
oss_object="root.img",
)])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @this = new AliCloud.Ecs.ImageImport("this", new()
{
Description = "test import image",
Architecture = "x86_64",
ImageName = "test-import-image",
LicenseType = "Auto",
Platform = "Ubuntu",
OsType = "linux",
DiskDeviceMappings = new[]
{
new AliCloud.Ecs.Inputs.ImageImportDiskDeviceMappingArgs
{
DiskImageSize = 5,
OssBucket = "testimportimage",
OssObject = "root.img",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewImageImport(ctx, "this", &ecs.ImageImportArgs{
Description: pulumi.String("test import image"),
Architecture: pulumi.String("x86_64"),
ImageName: pulumi.String("test-import-image"),
LicenseType: pulumi.String("Auto"),
Platform: pulumi.String("Ubuntu"),
OsType: pulumi.String("linux"),
DiskDeviceMappings: ecs.ImageImportDiskDeviceMappingArray{
&ecs.ImageImportDiskDeviceMappingArgs{
DiskImageSize: pulumi.Int(5),
OssBucket: pulumi.String("testimportimage"),
OssObject: pulumi.String("root.img"),
},
},
})
if err != nil {
return err
}
return nil
})
}
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()
.description("test import image")
.architecture("x86_64")
.imageName("test-import-image")
.licenseType("Auto")
.platform("Ubuntu")
.osType("linux")
.diskDeviceMappings(ImageImportDiskDeviceMappingArgs.builder()
.diskImageSize(5)
.ossBucket("testimportimage")
.ossObject("root.img")
.build())
.build());
}
}
resources:
this:
type: alicloud:ecs:ImageImport
properties:
description: test import image
architecture: x86_64
imageName: test-import-image
licenseType: Auto
platform: Ubuntu
osType: linux
diskDeviceMappings:
- diskImageSize: 5
ossBucket: testimportimage
ossObject: root.img

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***

Constructors

Link copied to clipboard
constructor(architecture: Output<String>? = null, description: Output<String>? = null, diskDeviceMappings: Output<List<ImageImportDiskDeviceMappingArgs>>? = null, imageName: Output<String>? = null, licenseType: Output<String>? = null, osType: Output<String>? = null, platform: Output<String>? = null)

Properties

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

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>? = null

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 imageName: Output<String>? = null

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>? = null

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>? = null

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

Link copied to clipboard
val platform: Output<String>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): ImageImportArgs