ImageImport

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+.

Attributes Reference0

The following attributes are exported:

  • id - ID of the image.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @this = new AliCloud.Ecs.ImageImport("this", new AliCloud.Ecs.ImageImportArgs
        {
            Architecture = "x86_64",
            Description = "test import image",
            DiskDeviceMappings = 
            {
                new AliCloud.Ecs.Inputs.ImageImportDiskDeviceMappingArgs
                {
                    DiskImageSize = 5,
                    OssBucket = "testimportimage",
                    OssObject = "root.img",
                },
            },
            ImageName = "test-import-image",
            LicenseType = "Auto",
            OsType = "linux",
            Platform = "Ubuntu",
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

this = alicloud.ecs.ImageImport("this",
    architecture="x86_64",
    description="test import image",
    disk_device_mappings=[{
        "diskImageSize": 5,
        "oss_bucket": "testimportimage",
        "ossObject": "root.img",
    }],
    image_name="test-import-image",
    license_type="Auto",
    os_type="linux",
    platform="Ubuntu")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const thisImageImport = new alicloud.ecs.ImageImport("this", {
    architecture: "x86_64",
    description: "test import image",
    diskDeviceMappings: [{
        diskImageSize: 5,
        ossBucket: "testimportimage",
        ossObject: "root.img",
    }],
    imageName: "test-import-image",
    licenseType: "Auto",
    osType: "linux",
    platform: "Ubuntu",
});

Create a ImageImport Resource

def ImageImport(resource_name, opts=None, architecture=None, description=None, disk_device_mappings=None, image_name=None, license_type=None, os_type=None, platform=None, __props__=None);
func NewImageImport(ctx *Context, name string, args ImageImportArgs, opts ...ResourceOption) (*ImageImport, error)
public ImageImport(string name, ImageImportArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ImageImportArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ImageImportArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ImageImportArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ImageImport Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ImageImport resource accepts the following input properties:

DiskDeviceMappings List<Pulumi.AliCloud.Ecs.Inputs.ImageImportDiskDeviceMappingArgs>

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

Architecture 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.

Description string

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

ImageName 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 (-).

LicenseType 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.

OsType string

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

Platform string

Specifies the operating system platform 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: CentOS, Ubuntu, SUSE, OpenSUSE, Debian, CoreOS, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows 7, Default is Others Linux, Customized Linux.

DiskDeviceMappings []ImageImportDiskDeviceMapping

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

Architecture 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.

Description string

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

ImageName 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 (-).

LicenseType 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.

OsType string

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

Platform string

Specifies the operating system platform 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: CentOS, Ubuntu, SUSE, OpenSUSE, Debian, CoreOS, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows 7, Default is Others Linux, Customized Linux.

diskDeviceMappings ImageImportDiskDeviceMapping[]

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

architecture 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.

description string

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

imageName 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 (-).

licenseType 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.

osType string

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

platform string

Specifies the operating system platform 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: CentOS, Ubuntu, SUSE, OpenSUSE, Debian, CoreOS, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows 7, Default is Others Linux, Customized Linux.

disk_device_mappings List[ImageImportDiskDeviceMapping]

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

architecture str

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.

description str

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

image_name str

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 (-).

license_type str

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

os_type str

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

platform str

Specifies the operating system platform 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: CentOS, Ubuntu, SUSE, OpenSUSE, Debian, CoreOS, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows 7, Default is Others Linux, Customized Linux.

Outputs

All input properties are implicitly available as output properties. Additionally, the ImageImport resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ImageImport Resource

Get an existing ImageImport resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ImageImportState, opts?: CustomResourceOptions): ImageImport
static get(resource_name, id, opts=None, architecture=None, description=None, disk_device_mappings=None, image_name=None, license_type=None, os_type=None, platform=None, __props__=None);
func GetImageImport(ctx *Context, name string, id IDInput, state *ImageImportState, opts ...ResourceOption) (*ImageImport, error)
public static ImageImport Get(string name, Input<string> id, ImageImportState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Architecture 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.

Description string

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

DiskDeviceMappings List<Pulumi.AliCloud.Ecs.Inputs.ImageImportDiskDeviceMappingArgs>

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

ImageName 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 (-).

LicenseType 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.

OsType string

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

Platform string

Specifies the operating system platform 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: CentOS, Ubuntu, SUSE, OpenSUSE, Debian, CoreOS, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows 7, Default is Others Linux, Customized Linux.

Architecture 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.

Description string

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

DiskDeviceMappings []ImageImportDiskDeviceMapping

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

ImageName 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 (-).

LicenseType 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.

OsType string

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

Platform string

Specifies the operating system platform 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: CentOS, Ubuntu, SUSE, OpenSUSE, Debian, CoreOS, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows 7, Default is Others Linux, Customized Linux.

architecture 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.

description string

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

diskDeviceMappings ImageImportDiskDeviceMapping[]

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

imageName 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 (-).

licenseType 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.

osType string

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

platform string

Specifies the operating system platform 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: CentOS, Ubuntu, SUSE, OpenSUSE, Debian, CoreOS, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows 7, Default is Others Linux, Customized Linux.

architecture str

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.

description str

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

disk_device_mappings List[ImageImportDiskDeviceMapping]

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

image_name str

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 (-).

license_type str

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

os_type str

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

platform str

Specifies the operating system platform 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: CentOS, Ubuntu, SUSE, OpenSUSE, Debian, CoreOS, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows 7, Default is Others Linux, Customized Linux.

Supporting Types

ImageImportDiskDeviceMapping

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Device string

The name of disk N in the custom image.

DiskImageSize int

Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.

Format string

Image format. Value range: When the RAW, VHD, qcow2 is imported into the image, the system automatically detects the image format, whichever comes first.

OssBucket string

Save the exported OSS bucket.

OssObject string

The file name of your OSS Object.

Device string

The name of disk N in the custom image.

DiskImageSize int

Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.

Format string

Image format. Value range: When the RAW, VHD, qcow2 is imported into the image, the system automatically detects the image format, whichever comes first.

OssBucket string

Save the exported OSS bucket.

OssObject string

The file name of your OSS Object.

device string

The name of disk N in the custom image.

diskImageSize number

Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.

format string

Image format. Value range: When the RAW, VHD, qcow2 is imported into the image, the system automatically detects the image format, whichever comes first.

ossBucket string

Save the exported OSS bucket.

ossObject string

The file name of your OSS Object.

device str

The name of disk N in the custom image.

diskImageSize float

Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.

format str

Image format. Value range: When the RAW, VHD, qcow2 is imported into the image, the system automatically detects the image format, whichever comes first.

ossObject str

The file name of your OSS Object.

oss_bucket str

Save the exported OSS bucket.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.