1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. ImageImport
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.ecs.ImageImport

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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
    		}
    		_, 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 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.
    args 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 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.
    name String
    The unique name of the resource.
    args 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:

    DiskDeviceMappings List<Pulumi.AliCloud.Ecs.Inputs.ImageImportDiskDeviceMapping>
    The information about the custom image. See disk_device_mapping below.
    Architecture string
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    BootMode string
    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://.
    ImageName string
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    Platform string

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    DiskDeviceMappings []ImageImportDiskDeviceMappingArgs
    The information about the custom image. See disk_device_mapping below.
    Architecture string
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    BootMode string
    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://.
    ImageName string
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    Platform string

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    diskDeviceMappings List<ImageImportDiskDeviceMapping>
    The information about the custom image. See disk_device_mapping below.
    architecture String
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    bootMode String
    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://.
    imageName String
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    platform String

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    diskDeviceMappings ImageImportDiskDeviceMapping[]
    The information about the custom image. See disk_device_mapping below.
    architecture string
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    bootMode string
    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://.
    imageName string
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    platform string

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    disk_device_mappings Sequence[ImageImportDiskDeviceMappingArgs]
    The information about the custom image. See disk_device_mapping below.
    architecture str
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    boot_mode str
    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 be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_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 str
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    platform str

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    diskDeviceMappings List<Property Map>
    The information about the custom image. See disk_device_mapping below.
    architecture String
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    bootMode String
    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://.
    imageName String
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    platform String

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    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)
    Resource lookup is not supported in YAML
    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.
    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
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    BootMode string
    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://.
    DiskDeviceMappings List<Pulumi.AliCloud.Ecs.Inputs.ImageImportDiskDeviceMapping>
    The information about the custom image. See disk_device_mapping below.
    ImageName string
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    Platform string

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    Architecture string
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    BootMode string
    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://.
    DiskDeviceMappings []ImageImportDiskDeviceMappingArgs
    The information about the custom image. See disk_device_mapping below.
    ImageName string
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    Platform string

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    architecture String
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    bootMode String
    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://.
    diskDeviceMappings List<ImageImportDiskDeviceMapping>
    The information about the custom image. See disk_device_mapping below.
    imageName String
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    platform String

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    architecture string
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    bootMode string
    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://.
    diskDeviceMappings ImageImportDiskDeviceMapping[]
    The information about the custom image. See disk_device_mapping below.
    imageName string
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    platform string

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    architecture str
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    boot_mode str
    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 Sequence[ImageImportDiskDeviceMappingArgs]
    The information about the custom image. See disk_device_mapping below.
    image_name str
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_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 str
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    platform str

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    architecture String
    The architecture of the image. Default value: x86_64. Valid values: x86_64, i386.
    bootMode String
    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://.
    diskDeviceMappings List<Property Map>
    The information about the custom image. See disk_device_mapping below.
    imageName String
    The name of the image. The image_name must be 2 to 128 characters in length. The image_name must start with a letter and cannot start with acs: or aliyun. The image_name cannot contain http:// or https://. The image_name can contain letters, digits, periods (.), colons (:), underscores (_), and 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
    The type of the operating system. Default value: linux. Valid values: windows, linux.
    platform String

    The operating system platform. More valid values refer to ImportImage OpenAPI.

    NOTE: Before provider version 1.197.0, the default value of platform is Ubuntu.

    Supporting Types

    ImageImportDiskDeviceMapping, ImageImportDiskDeviceMappingArgs

    Device string
    The device name of the disk.
    DiskImageSize int
    The size of the disk. Default value: 5.
    Format string
    The format of the image. Valid values: RAW, VHD, qcow2.
    OssBucket string
    The OSS bucket where the image file is stored.
    OssObject string
    The name (key) of the object that the uploaded image is stored as in the OSS bucket.
    Device string
    The device name of the disk.
    DiskImageSize int
    The size of the disk. Default value: 5.
    Format string
    The format of the image. Valid values: RAW, VHD, qcow2.
    OssBucket string
    The OSS bucket where the image file is stored.
    OssObject string
    The name (key) of the object that the uploaded image is stored as in the OSS bucket.
    device String
    The device name of the disk.
    diskImageSize Integer
    The size of the disk. Default value: 5.
    format String
    The format of the image. Valid values: RAW, VHD, qcow2.
    ossBucket String
    The OSS bucket where the image file is stored.
    ossObject String
    The name (key) of the object that the uploaded image is stored as in the OSS bucket.
    device string
    The device name of the disk.
    diskImageSize number
    The size of the disk. Default value: 5.
    format string
    The format of the image. Valid values: RAW, VHD, qcow2.
    ossBucket string
    The OSS bucket where the image file is stored.
    ossObject string
    The name (key) of the object that the uploaded image is stored as in the OSS bucket.
    device str
    The device name of the disk.
    disk_image_size int
    The size of the disk. Default value: 5.
    format str
    The format of the image. Valid values: RAW, VHD, qcow2.
    oss_bucket str
    The OSS bucket where the image file is stored.
    oss_object str
    The name (key) of the object that the uploaded image is stored as in the OSS bucket.
    device String
    The device name of the disk.
    diskImageSize Number
    The size of the disk. Default value: 5.
    format String
    The format of the image. Valid values: RAW, VHD, qcow2.
    ossBucket String
    The OSS bucket where the image file is stored.
    ossObject String
    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi