Class 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+.
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",
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.Ecs
Assembly: Pulumi.AliCloud.dll
Syntax
public class ImageImport : CustomResource
Constructors
View SourceImageImport(String, ImageImportArgs, CustomResourceOptions)
Create a ImageImport resource with the given unique name, arguments, and options.
Declaration
public ImageImport(string name, ImageImportArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ImageImportArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArchitecture
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.
Declaration
public Output<string> Architecture { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DiskDeviceMappings
Description of the system with disks and snapshots under the image.
Declaration
public Output<ImmutableArray<ImageImportDiskDeviceMapping>> DiskDeviceMappings { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ImageImportDiskDeviceMapping>> |
ImageName
The image name. The length is 2 ~ 128 English or Chinese characters. Must start with a capital letter or Chinese, and cannot start with http: // and https: //. Can contain numbers, colons (:), underscores (_), or hyphens (-).
Declaration
public Output<string> ImageName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LicenseType
Declaration
public Output<string> LicenseType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
OsType
Operating system platform type. Valid values: windows, Default is linux.
Declaration
public Output<string> OsType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Platform
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.
Declaration
public Output<string> Platform { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ImageImportState, CustomResourceOptions)
Get an existing ImageImport resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ImageImport Get(string name, Input<string> id, ImageImportState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ImageImportState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ImageImport |