alicloud.ecs.ImageImport
Explore with Pulumi AI
Provides a ECS Image Import resource.
For information about ECS Image Import and how to use it, see What is Image Import.
NOTE: Available since v1.69.0.
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.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-image-import-example";
const _default = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultBucket = new alicloud.oss.Bucket("default", {bucket: `${name}-${_default.result}`});
const defaultBucketObject = new alicloud.oss.BucketObject("default", {
bucket: defaultBucket.id,
key: "fc/hello.zip",
content: ` # -*- coding: utf-8 -*-
def handler(event, context):
print "hello world"
return 'hello world'
`,
});
const defaultImageImport = new alicloud.ecs.ImageImport("default", {
architecture: "x86_64",
osType: "linux",
platform: "Ubuntu",
licenseType: "Auto",
imageName: name,
description: name,
diskDeviceMappings: [{
ossBucket: defaultBucket.id,
ossObject: defaultBucketObject.id,
diskImageSize: 5,
}],
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-image-import-example"
default = random.index.Integer("default",
min=10000,
max=99999)
default_bucket = alicloud.oss.Bucket("default", bucket=f"{name}-{default['result']}")
default_bucket_object = alicloud.oss.BucketObject("default",
bucket=default_bucket.id,
key="fc/hello.zip",
content=""" # -*- coding: utf-8 -*-
def handler(event, context):
print "hello world"
return 'hello world'
""")
default_image_import = alicloud.ecs.ImageImport("default",
architecture="x86_64",
os_type="linux",
platform="Ubuntu",
license_type="Auto",
image_name=name,
description=name,
disk_device_mappings=[{
"oss_bucket": default_bucket.id,
"oss_object": default_bucket_object.id,
"disk_image_size": 5,
}])
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-image-import-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
defaultBucket, err := oss.NewBucket(ctx, "default", &oss.BucketArgs{
Bucket: pulumi.Sprintf("%v-%v", name, _default.Result),
})
if err != nil {
return err
}
defaultBucketObject, err := oss.NewBucketObject(ctx, "default", &oss.BucketObjectArgs{
Bucket: defaultBucket.ID(),
Key: pulumi.String("fc/hello.zip"),
Content: pulumi.String(" # -*- coding: utf-8 -*-\n def handler(event, context):\n print \"hello world\"\n return 'hello world'\n"),
})
if err != nil {
return err
}
_, err = ecs.NewImageImport(ctx, "default", &ecs.ImageImportArgs{
Architecture: pulumi.String("x86_64"),
OsType: pulumi.String("linux"),
Platform: pulumi.String("Ubuntu"),
LicenseType: pulumi.String("Auto"),
ImageName: pulumi.String(name),
Description: pulumi.String(name),
DiskDeviceMappings: ecs.ImageImportDiskDeviceMappingArray{
&ecs.ImageImportDiskDeviceMappingArgs{
OssBucket: defaultBucket.ID(),
OssObject: defaultBucketObject.ID(),
DiskImageSize: pulumi.Int(5),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-image-import-example";
var @default = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultBucket = new AliCloud.Oss.Bucket("default", new()
{
BucketName = $"{name}-{@default.Result}",
});
var defaultBucketObject = new AliCloud.Oss.BucketObject("default", new()
{
Bucket = defaultBucket.Id,
Key = "fc/hello.zip",
Content = @" # -*- coding: utf-8 -*-
def handler(event, context):
print ""hello world""
return 'hello world'
",
});
var defaultImageImport = new AliCloud.Ecs.ImageImport("default", new()
{
Architecture = "x86_64",
OsType = "linux",
Platform = "Ubuntu",
LicenseType = "Auto",
ImageName = name,
Description = name,
DiskDeviceMappings = new[]
{
new AliCloud.Ecs.Inputs.ImageImportDiskDeviceMappingArgs
{
OssBucket = defaultBucket.Id,
OssObject = defaultBucketObject.Id,
DiskImageSize = 5,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.oss.Bucket;
import com.pulumi.alicloud.oss.BucketArgs;
import com.pulumi.alicloud.oss.BucketObject;
import com.pulumi.alicloud.oss.BucketObjectArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-image-import-example");
var default_ = new Integer("default", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultBucket = new Bucket("defaultBucket", BucketArgs.builder()
.bucket(String.format("%s-%s", name,default_.result()))
.build());
var defaultBucketObject = new BucketObject("defaultBucketObject", BucketObjectArgs.builder()
.bucket(defaultBucket.id())
.key("fc/hello.zip")
.content("""
# -*- coding: utf-8 -*-
def handler(event, context):
print "hello world"
return 'hello world'
""")
.build());
var defaultImageImport = new ImageImport("defaultImageImport", ImageImportArgs.builder()
.architecture("x86_64")
.osType("linux")
.platform("Ubuntu")
.licenseType("Auto")
.imageName(name)
.description(name)
.diskDeviceMappings(ImageImportDiskDeviceMappingArgs.builder()
.ossBucket(defaultBucket.id())
.ossObject(defaultBucketObject.id())
.diskImageSize(5)
.build())
.build());
}
}
configuration:
name:
type: string
default: terraform-image-import-example
resources:
default:
type: random:integer
properties:
min: 10000
max: 99999
defaultBucket:
type: alicloud:oss:Bucket
name: default
properties:
bucket: ${name}-${default.result}
defaultBucketObject:
type: alicloud:oss:BucketObject
name: default
properties:
bucket: ${defaultBucket.id}
key: fc/hello.zip
content: |2
# -*- coding: utf-8 -*-
def handler(event, context):
print "hello world"
return 'hello world'
defaultImageImport:
type: alicloud:ecs:ImageImport
name: default
properties:
architecture: x86_64
osType: linux
platform: Ubuntu
licenseType: Auto
imageName: ${name}
description: ${name}
diskDeviceMappings:
- ossBucket: ${defaultBucket.id}
ossObject: ${defaultBucketObject.id}
diskImageSize: 5
Create ImageImport Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ImageImport(name: string, args: ImageImportArgs, opts?: CustomResourceOptions);
@overload
def ImageImport(resource_name: str,
args: ImageImportArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ImageImport(resource_name: str,
opts: Optional[ResourceOptions] = None,
disk_device_mappings: Optional[Sequence[ImageImportDiskDeviceMappingArgs]] = None,
architecture: Optional[str] = None,
boot_mode: Optional[str] = None,
description: Optional[str] = None,
image_name: Optional[str] = None,
license_type: Optional[str] = None,
os_type: Optional[str] = None,
platform: Optional[str] = None)
func NewImageImport(ctx *Context, name string, args ImageImportArgs, opts ...ResourceOption) (*ImageImport, error)
public ImageImport(string name, ImageImportArgs args, CustomResourceOptions? opts = null)
public ImageImport(String name, ImageImportArgs args)
public ImageImport(String name, ImageImportArgs args, CustomResourceOptions options)
type: alicloud:ecs:ImageImport
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ImageImportArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. ImageImportArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ImageImportArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ImageImportArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. ImageImportArgs - The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var imageImportResource = new AliCloud.Ecs.ImageImport("imageImportResource", new()
{
DiskDeviceMappings = new[]
{
new AliCloud.Ecs.Inputs.ImageImportDiskDeviceMappingArgs
{
Device = "string",
DiskImageSize = 0,
Format = "string",
OssBucket = "string",
OssObject = "string",
},
},
Architecture = "string",
BootMode = "string",
Description = "string",
ImageName = "string",
LicenseType = "string",
OsType = "string",
Platform = "string",
});
example, err := ecs.NewImageImport(ctx, "imageImportResource", &ecs.ImageImportArgs{
DiskDeviceMappings: ecs.ImageImportDiskDeviceMappingArray{
&ecs.ImageImportDiskDeviceMappingArgs{
Device: pulumi.String("string"),
DiskImageSize: pulumi.Int(0),
Format: pulumi.String("string"),
OssBucket: pulumi.String("string"),
OssObject: pulumi.String("string"),
},
},
Architecture: pulumi.String("string"),
BootMode: pulumi.String("string"),
Description: pulumi.String("string"),
ImageName: pulumi.String("string"),
LicenseType: pulumi.String("string"),
OsType: pulumi.String("string"),
Platform: pulumi.String("string"),
})
var imageImportResource = new ImageImport("imageImportResource", ImageImportArgs.builder()
.diskDeviceMappings(ImageImportDiskDeviceMappingArgs.builder()
.device("string")
.diskImageSize(0)
.format("string")
.ossBucket("string")
.ossObject("string")
.build())
.architecture("string")
.bootMode("string")
.description("string")
.imageName("string")
.licenseType("string")
.osType("string")
.platform("string")
.build());
image_import_resource = alicloud.ecs.ImageImport("imageImportResource",
disk_device_mappings=[{
"device": "string",
"disk_image_size": 0,
"format": "string",
"oss_bucket": "string",
"oss_object": "string",
}],
architecture="string",
boot_mode="string",
description="string",
image_name="string",
license_type="string",
os_type="string",
platform="string")
const imageImportResource = new alicloud.ecs.ImageImport("imageImportResource", {
diskDeviceMappings: [{
device: "string",
diskImageSize: 0,
format: "string",
ossBucket: "string",
ossObject: "string",
}],
architecture: "string",
bootMode: "string",
description: "string",
imageName: "string",
licenseType: "string",
osType: "string",
platform: "string",
});
type: alicloud:ecs:ImageImport
properties:
architecture: string
bootMode: string
description: string
diskDeviceMappings:
- device: string
diskImageSize: 0
format: string
ossBucket: string
ossObject: string
imageName: string
licenseType: string
osType: string
platform: string
ImageImport Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ImageImport resource accepts the following input properties:
- Disk
Device Mappings This property is required. Changes to this property will trigger replacement.
Ali Cloud. Ecs. Inputs. Image Import Disk Device Mapping> - The information about the custom image. See
disk_device_mapping
below. - Architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - Boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - Description string
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - Image
Name string - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - Platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- Disk
Device Mappings This property is required. Changes to this property will trigger replacement.
Import Disk Device Mapping Args - The information about the custom image. See
disk_device_mapping
below. - Architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - Boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - Description string
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - Image
Name string - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - Platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- disk
Device Mappings This property is required. Changes to this property will trigger replacement.
Import Disk Device Mapping> - The information about the custom image. See
disk_device_mapping
below. - architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - description String
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - image
Name String - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- disk
Device Mappings This property is required. Changes to this property will trigger replacement.
Import Disk Device Mapping[] - The information about the custom image. See
disk_device_mapping
below. - architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - description string
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - image
Name string - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- disk_
device_ mappings This property is required. Changes to this property will trigger replacement.
Import Disk Device Mapping Args] - The information about the custom image. See
disk_device_mapping
below. - architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - boot_
mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - description str
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - image_
name str - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- disk
Device Mappings This property is required. Changes to this property will trigger replacement.
- The information about the custom image. See
disk_device_mapping
below. - architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - description String
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - image
Name String - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
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 string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up 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
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
architecture: Optional[str] = None,
boot_mode: Optional[str] = None,
description: Optional[str] = None,
disk_device_mappings: Optional[Sequence[ImageImportDiskDeviceMappingArgs]] = None,
image_name: Optional[str] = None,
license_type: Optional[str] = None,
os_type: Optional[str] = None,
platform: Optional[str] = None) -> ImageImport
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)
public static ImageImport get(String name, Output<String> id, ImageImportState state, CustomResourceOptions options)
resources: _: type: alicloud:ecs:ImageImport get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - Boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - Description string
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - Disk
Device Mappings Changes to this property will trigger replacement.
Ali Cloud. Ecs. Inputs. Image Import Disk Device Mapping> - The information about the custom image. See
disk_device_mapping
below. - Image
Name string - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - Platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- Architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - Boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - Description string
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - Disk
Device Mappings Changes to this property will trigger replacement.
Import Disk Device Mapping Args - The information about the custom image. See
disk_device_mapping
below. - Image
Name string - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - Platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - description String
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - disk
Device Mappings Changes to this property will trigger replacement.
Import Disk Device Mapping> - The information about the custom image. See
disk_device_mapping
below. - image
Name String - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - description string
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - disk
Device Mappings Changes to this property will trigger replacement.
Import Disk Device Mapping[] - The information about the custom image. See
disk_device_mapping
below. - image
Name string - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - boot_
mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - description str
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - disk_
device_ mappings Changes to this property will trigger replacement.
Import Disk Device Mapping Args] - The information about the custom image. See
disk_device_mapping
below. - image_
name str - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
- architecture
Changes to this property will trigger replacement.
- The architecture of the image. Default value:
x86_64
. Valid values:x86_64
,i386
. - boot
Mode Changes to this property will trigger replacement.
- The boot mode of the image. Valid values:
BIOS
,UEFI
. - description String
- The description of the image. The
description
must be 2 to 256 characters in length and cannot start with http:// or https://. - disk
Device Mappings Changes to this property will trigger replacement.
- The information about the custom image. See
disk_device_mapping
below. - image
Name String - The name of the image. The
image_name
must be2
to128
characters in length. Theimage_name
must start with a letter and cannot start with acs: or aliyun. Theimage_name
cannot contain http:// or https://. Theimage_name
can contain letters, digits, periods (.), colons (:), underscores (_), and 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 Changes to this property will trigger replacement.
- The type of the operating system. Default value:
linux
. Valid values:windows
,linux
. - platform
Changes to this property will trigger replacement.
The operating system platform. More valid values refer to ImportImage OpenAPI.
NOTE: Before provider version 1.197.0, the default value of
platform
isUbuntu
.
Supporting Types
ImageImportDiskDeviceMapping, ImageImportDiskDeviceMappingArgs
- Device
Changes to this property will trigger replacement.
- The device name of the disk.
- Disk
Image Size Changes to this property will trigger replacement.
- The size of the disk. Default value:
5
. - Format
Changes to this property will trigger replacement.
- The format of the image. Valid values:
RAW
,VHD
,qcow2
. - Oss
Bucket Changes to this property will trigger replacement.
- The OSS bucket where the image file is stored.
- Oss
Object Changes to this property will trigger replacement.
- The name (key) of the object that the uploaded image is stored as in the OSS bucket.
- Device
Changes to this property will trigger replacement.
- The device name of the disk.
- Disk
Image Size Changes to this property will trigger replacement.
- The size of the disk. Default value:
5
. - Format
Changes to this property will trigger replacement.
- The format of the image. Valid values:
RAW
,VHD
,qcow2
. - Oss
Bucket Changes to this property will trigger replacement.
- The OSS bucket where the image file is stored.
- Oss
Object Changes to this property will trigger replacement.
- The name (key) of the object that the uploaded image is stored as in the OSS bucket.
- device
Changes to this property will trigger replacement.
- The device name of the disk.
- disk
Image Size Changes to this property will trigger replacement.
- The size of the disk. Default value:
5
. - format
Changes to this property will trigger replacement.
- The format of the image. Valid values:
RAW
,VHD
,qcow2
. - oss
Bucket Changes to this property will trigger replacement.
- The OSS bucket where the image file is stored.
- oss
Object Changes to this property will trigger replacement.
- The name (key) of the object that the uploaded image is stored as in the OSS bucket.
- device
Changes to this property will trigger replacement.
- The device name of the disk.
- disk
Image Size Changes to this property will trigger replacement.
- The size of the disk. Default value:
5
. - format
Changes to this property will trigger replacement.
- The format of the image. Valid values:
RAW
,VHD
,qcow2
. - oss
Bucket Changes to this property will trigger replacement.
- The OSS bucket where the image file is stored.
- oss
Object Changes to this property will trigger replacement.
- The name (key) of the object that the uploaded image is stored as in the OSS bucket.
- device
Changes to this property will trigger replacement.
- The device name of the disk.
- disk_
image_ size Changes to this property will trigger replacement.
- The size of the disk. Default value:
5
. - format
Changes to this property will trigger replacement.
- The format of the image. Valid values:
RAW
,VHD
,qcow2
. - oss_
bucket Changes to this property will trigger replacement.
- The OSS bucket where the image file is stored.
- oss_
object Changes to this property will trigger replacement.
- The name (key) of the object that the uploaded image is stored as in the OSS bucket.
- device
Changes to this property will trigger replacement.
- The device name of the disk.
- disk
Image Size Changes to this property will trigger replacement.
- The size of the disk. Default value:
5
. - format
Changes to this property will trigger replacement.
- The format of the image. Valid values:
RAW
,VHD
,qcow2
. - oss
Bucket Changes to this property will trigger replacement.
- The OSS bucket where the image file is stored.
- oss
Object Changes to this property will trigger replacement.
- The name (key) of the object that the uploaded image is stored as in the OSS bucket.
Import
ECS Image Import can be imported using the id, e.g.
$ pulumi import alicloud:ecs/imageImport:ImageImport example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.