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
new ImageImport(name: string, args: ImageImportArgs, opts?: CustomResourceOptions);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:
- Disk
Device List<Pulumi.Mappings Ali Cloud. Ecs. Inputs. Image Import Disk Device Mapping Args> 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 isx86_64.- Description string
Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
- Image
Name 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 (-).
- License
Type 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.- Os
Type string Operating system platform type. Valid values:
windows, Default islinux.- 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 isOthers Linux,Customized Linux.
- Disk
Device []ImageMappings Import Disk Device Mapping 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 isx86_64.- Description string
Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
- Image
Name 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 (-).
- License
Type 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.- Os
Type string Operating system platform type. Valid values:
windows, Default islinux.- 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 isOthers Linux,Customized Linux.
- disk
Device ImageMappings Import Disk Device Mapping[] 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 isx86_64.- description string
Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
- image
Name 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 (-).
- license
Type 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.- os
Type string Operating system platform type. Valid values:
windows, Default islinux.- 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 isOthers Linux,Customized Linux.
- disk_
device_ List[Imagemappings Import Disk Device Mapping] 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 isx86_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 islinux.- 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 isOthers Linux,Customized Linux.
Outputs
All input properties are implicitly available as output properties. Additionally, the ImageImport resource produces the following output properties:
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): ImageImportstatic 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 isx86_64.- Description string
Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
- Disk
Device List<Pulumi.Mappings Ali Cloud. Ecs. Inputs. Image Import Disk Device Mapping Args> Description of the system with disks and snapshots under the image.
- Image
Name 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 (-).
- License
Type 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.- Os
Type string Operating system platform type. Valid values:
windows, Default islinux.- 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 isOthers 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 isx86_64.- Description string
Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
- Disk
Device []ImageMappings Import Disk Device Mapping Description of the system with disks and snapshots under the image.
- Image
Name 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 (-).
- License
Type 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.- Os
Type string Operating system platform type. Valid values:
windows, Default islinux.- 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 isOthers 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 isx86_64.- description string
Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
- disk
Device ImageMappings Import Disk Device Mapping[] Description of the system with disks and snapshots under the image.
- image
Name 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 (-).
- license
Type 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.- os
Type string Operating system platform type. Valid values:
windows, Default islinux.- 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 isOthers 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 isx86_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_ List[Imagemappings Import Disk Device Mapping] 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 islinux.- 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 isOthers Linux,Customized Linux.
Supporting Types
ImageImportDiskDeviceMapping
- Device string
The name of disk N in the custom image.
- Disk
Image intSize 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,qcow2is imported into the image, the system automatically detects the image format, whichever comes first.- Oss
Bucket string Save the exported OSS bucket.
- Oss
Object string The file name of your OSS Object.
- Device string
The name of disk N in the custom image.
- Disk
Image intSize 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,qcow2is imported into the image, the system automatically detects the image format, whichever comes first.- Oss
Bucket string Save the exported OSS bucket.
- Oss
Object string The file name of your OSS Object.
- device string
The name of disk N in the custom image.
- disk
Image numberSize 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,qcow2is imported into the image, the system automatically detects the image format, whichever comes first.- oss
Bucket string Save the exported OSS bucket.
- oss
Object string The file name of your OSS Object.
- device str
The name of disk N in the custom image.
- disk
Image floatSize 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,qcow2is imported into the image, the system automatically detects the image format, whichever comes first.- oss
Object 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
alicloudTerraform Provider.