alicloud.ecs.Image
Explore with Pulumi AI
Provides a ECS Image resource.
NOTE: If you want to create a template from an ECS instance, you can specify the instance ID (InstanceId) to create a custom image. You must make sure that the status of the specified instance is Running or Stopped. After a successful invocation, each disk of the specified instance has a new snapshot created.
NOTE: If you want to create a custom image based on the system disk of your ECS instance, you can specify one of the system disk snapshots (SnapshotId) to create a custom image. However, the specified snapshot cannot be created on or before July 15, 2013.
NOTE: If you want to combine snapshots of multiple disks into an image template, you can specify DiskDeviceMapping to create a custom image.
For information about ECS Image and how to use it, see What is Image.
NOTE: Available since v1.64.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const default = alicloud.getZones({
availableResourceCreation: "Instance",
});
const defaultGetInstanceTypes = alicloud.ecs.getInstanceTypes({
instanceTypeFamily: "ecs.sn1ne",
});
const defaultGetImages = alicloud.ecs.getImages({
nameRegex: "^ubuntu_18.*64",
owners: "system",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: "terraform-example",
cidrBlock: "172.17.3.0/24",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: "terraform-example",
cidrBlock: "172.17.3.0/24",
vpcId: defaultNetwork.id,
zoneId: _default.then(_default => _default.zones?.[0]?.id),
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
name: "terraform-example",
vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.ecs.Instance("default", {
availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
instanceName: "terraform-example",
securityGroups: [defaultSecurityGroup.id],
vswitchId: defaultSwitch.id,
instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.ids?.[0]),
imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.ids?.[0]),
internetMaxBandwidthOut: 10,
});
const defaultGetResourceGroups = alicloud.resourcemanager.getResourceGroups({});
const defaultInteger = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultImage = new alicloud.ecs.Image("default", {
instanceId: defaultInstance.id,
imageName: `terraform-example-${defaultInteger.result}`,
description: "terraform-example",
architecture: "x86_64",
resourceGroupId: defaultGetResourceGroups.then(defaultGetResourceGroups => defaultGetResourceGroups.ids?.[0]),
tags: {
FinanceDept: "FinanceDeptJoshua",
},
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
default = alicloud.get_zones(available_resource_creation="Instance")
default_get_instance_types = alicloud.ecs.get_instance_types(instance_type_family="ecs.sn1ne")
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
owners="system")
default_network = alicloud.vpc.Network("default",
vpc_name="terraform-example",
cidr_block="172.17.3.0/24")
default_switch = alicloud.vpc.Switch("default",
vswitch_name="terraform-example",
cidr_block="172.17.3.0/24",
vpc_id=default_network.id,
zone_id=default.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("default",
name="terraform-example",
vpc_id=default_network.id)
default_instance = alicloud.ecs.Instance("default",
availability_zone=default.zones[0].id,
instance_name="terraform-example",
security_groups=[default_security_group.id],
vswitch_id=default_switch.id,
instance_type=default_get_instance_types.ids[0],
image_id=default_get_images.ids[0],
internet_max_bandwidth_out=10)
default_get_resource_groups = alicloud.resourcemanager.get_resource_groups()
default_integer = random.index.Integer("default",
min=10000,
max=99999)
default_image = alicloud.ecs.Image("default",
instance_id=default_instance.id,
image_name=f"terraform-example-{default_integer['result']}",
description="terraform-example",
architecture="x86_64",
resource_group_id=default_get_resource_groups.ids[0],
tags={
"FinanceDept": "FinanceDeptJoshua",
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("Instance"),
}, nil)
if err != nil {
return err
}
defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
InstanceTypeFamily: pulumi.StringRef("ecs.sn1ne"),
}, nil)
if err != nil {
return err
}
defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
NameRegex: pulumi.StringRef("^ubuntu_18.*64"),
Owners: pulumi.StringRef("system"),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String("terraform-example"),
CidrBlock: pulumi.String("172.17.3.0/24"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.String("terraform-example"),
CidrBlock: pulumi.String("172.17.3.0/24"),
VpcId: defaultNetwork.ID(),
ZoneId: pulumi.String(_default.Zones[0].Id),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
Name: pulumi.String("terraform-example"),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
AvailabilityZone: pulumi.String(_default.Zones[0].Id),
InstanceName: pulumi.String("terraform-example"),
SecurityGroups: pulumi.StringArray{
defaultSecurityGroup.ID(),
},
VswitchId: defaultSwitch.ID(),
InstanceType: pulumi.String(defaultGetInstanceTypes.Ids[0]),
ImageId: pulumi.String(defaultGetImages.Ids[0]),
InternetMaxBandwidthOut: pulumi.Int(10),
})
if err != nil {
return err
}
defaultGetResourceGroups, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
if err != nil {
return err
}
defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
_, err = ecs.NewImage(ctx, "default", &ecs.ImageArgs{
InstanceId: defaultInstance.ID(),
ImageName: pulumi.Sprintf("terraform-example-%v", defaultInteger.Result),
Description: pulumi.String("terraform-example"),
Architecture: pulumi.String("x86_64"),
ResourceGroupId: pulumi.String(defaultGetResourceGroups.Ids[0]),
Tags: pulumi.StringMap{
"FinanceDept": pulumi.String("FinanceDeptJoshua"),
},
})
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 @default = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "Instance",
});
var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
{
InstanceTypeFamily = "ecs.sn1ne",
});
var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
{
NameRegex = "^ubuntu_18.*64",
Owners = "system",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = "terraform-example",
CidrBlock = "172.17.3.0/24",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = "terraform-example",
CidrBlock = "172.17.3.0/24",
VpcId = defaultNetwork.Id,
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = "terraform-example",
VpcId = defaultNetwork.Id,
});
var defaultInstance = new AliCloud.Ecs.Instance("default", new()
{
AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
InstanceName = "terraform-example",
SecurityGroups = new[]
{
defaultSecurityGroup.Id,
},
VswitchId = defaultSwitch.Id,
InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.Ids[0]),
ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Ids[0]),
InternetMaxBandwidthOut = 10,
});
var defaultGetResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke();
var defaultInteger = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultImage = new AliCloud.Ecs.Image("default", new()
{
InstanceId = defaultInstance.Id,
ImageName = $"terraform-example-{defaultInteger.Result}",
Description = "terraform-example",
Architecture = "x86_64",
ResourceGroupId = defaultGetResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0]),
Tags =
{
{ "FinanceDept", "FinanceDeptJoshua" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.ecs.Image;
import com.pulumi.alicloud.ecs.ImageArgs;
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 default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("Instance")
.build());
final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.instanceTypeFamily("ecs.sn1ne")
.build());
final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
.nameRegex("^ubuntu_18.*64")
.owners("system")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName("terraform-example")
.cidrBlock("172.17.3.0/24")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName("terraform-example")
.cidrBlock("172.17.3.0/24")
.vpcId(defaultNetwork.id())
.zoneId(default_.zones()[0].id())
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name("terraform-example")
.vpcId(defaultNetwork.id())
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.availabilityZone(default_.zones()[0].id())
.instanceName("terraform-example")
.securityGroups(defaultSecurityGroup.id())
.vswitchId(defaultSwitch.id())
.instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.ids()[0]))
.imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.ids()[0]))
.internetMaxBandwidthOut(10)
.build());
final var defaultGetResourceGroups = ResourcemanagerFunctions.getResourceGroups();
var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultImage = new Image("defaultImage", ImageArgs.builder()
.instanceId(defaultInstance.id())
.imageName(String.format("terraform-example-%s", defaultInteger.result()))
.description("terraform-example")
.architecture("x86_64")
.resourceGroupId(defaultGetResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
.tags(Map.of("FinanceDept", "FinanceDeptJoshua"))
.build());
}
}
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: terraform-example
cidrBlock: 172.17.3.0/24
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vswitchName: terraform-example
cidrBlock: 172.17.3.0/24
vpcId: ${defaultNetwork.id}
zoneId: ${default.zones[0].id}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: default
properties:
name: terraform-example
vpcId: ${defaultNetwork.id}
defaultInstance:
type: alicloud:ecs:Instance
name: default
properties:
availabilityZone: ${default.zones[0].id}
instanceName: terraform-example
securityGroups:
- ${defaultSecurityGroup.id}
vswitchId: ${defaultSwitch.id}
instanceType: ${defaultGetInstanceTypes.ids[0]}
imageId: ${defaultGetImages.ids[0]}
internetMaxBandwidthOut: 10
defaultInteger:
type: random:integer
name: default
properties:
min: 10000
max: 99999
defaultImage:
type: alicloud:ecs:Image
name: default
properties:
instanceId: ${defaultInstance.id}
imageName: terraform-example-${defaultInteger.result}
description: terraform-example
architecture: x86_64
resourceGroupId: ${defaultGetResourceGroups.ids[0]}
tags:
FinanceDept: FinanceDeptJoshua
variables:
default:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableResourceCreation: Instance
defaultGetInstanceTypes:
fn::invoke:
Function: alicloud:ecs:getInstanceTypes
Arguments:
instanceTypeFamily: ecs.sn1ne
defaultGetImages:
fn::invoke:
Function: alicloud:ecs:getImages
Arguments:
nameRegex: ^ubuntu_18.*64
owners: system
defaultGetResourceGroups:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments: {}
Create Image Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Image(name: string, args?: ImageArgs, opts?: CustomResourceOptions);
@overload
def Image(resource_name: str,
args: Optional[ImageArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Image(resource_name: str,
opts: Optional[ResourceOptions] = None,
architecture: Optional[str] = None,
boot_mode: Optional[str] = None,
delete_auto_snapshot: Optional[bool] = None,
description: Optional[str] = None,
detection_strategy: Optional[str] = None,
disk_device_mappings: Optional[Sequence[ImageDiskDeviceMappingArgs]] = None,
features: Optional[ImageFeaturesArgs] = None,
force: Optional[bool] = None,
image_family: Optional[str] = None,
image_name: Optional[str] = None,
image_version: Optional[str] = None,
instance_id: Optional[str] = None,
license_type: Optional[str] = None,
name: Optional[str] = None,
platform: Optional[str] = None,
resource_group_id: Optional[str] = None,
snapshot_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewImage(ctx *Context, name string, args *ImageArgs, opts ...ResourceOption) (*Image, error)
public Image(string name, ImageArgs? args = null, CustomResourceOptions? opts = null)
type: alicloud:ecs:Image
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 ImageArgs
- 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 ImageArgs
- 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 ImageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ImageArgs
- 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 imageResource = new AliCloud.Ecs.Image("imageResource", new()
{
Architecture = "string",
BootMode = "string",
DeleteAutoSnapshot = false,
Description = "string",
DetectionStrategy = "string",
DiskDeviceMappings = new[]
{
new AliCloud.Ecs.Inputs.ImageDiskDeviceMappingArgs
{
Device = "string",
DiskType = "string",
Format = "string",
ImportOssBucket = "string",
ImportOssObject = "string",
Progress = "string",
RemainTime = 0,
Size = 0,
SnapshotId = "string",
},
},
Features = new AliCloud.Ecs.Inputs.ImageFeaturesArgs
{
NvmeSupport = "string",
},
Force = false,
ImageFamily = "string",
ImageName = "string",
ImageVersion = "string",
InstanceId = "string",
LicenseType = "string",
Platform = "string",
ResourceGroupId = "string",
SnapshotId = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := ecs.NewImage(ctx, "imageResource", &ecs.ImageArgs{
Architecture: pulumi.String("string"),
BootMode: pulumi.String("string"),
DeleteAutoSnapshot: pulumi.Bool(false),
Description: pulumi.String("string"),
DetectionStrategy: pulumi.String("string"),
DiskDeviceMappings: ecs.ImageDiskDeviceMappingArray{
&ecs.ImageDiskDeviceMappingArgs{
Device: pulumi.String("string"),
DiskType: pulumi.String("string"),
Format: pulumi.String("string"),
ImportOssBucket: pulumi.String("string"),
ImportOssObject: pulumi.String("string"),
Progress: pulumi.String("string"),
RemainTime: pulumi.Int(0),
Size: pulumi.Int(0),
SnapshotId: pulumi.String("string"),
},
},
Features: &ecs.ImageFeaturesArgs{
NvmeSupport: pulumi.String("string"),
},
Force: pulumi.Bool(false),
ImageFamily: pulumi.String("string"),
ImageName: pulumi.String("string"),
ImageVersion: pulumi.String("string"),
InstanceId: pulumi.String("string"),
LicenseType: pulumi.String("string"),
Platform: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
SnapshotId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var imageResource = new Image("imageResource", ImageArgs.builder()
.architecture("string")
.bootMode("string")
.deleteAutoSnapshot(false)
.description("string")
.detectionStrategy("string")
.diskDeviceMappings(ImageDiskDeviceMappingArgs.builder()
.device("string")
.diskType("string")
.format("string")
.importOssBucket("string")
.importOssObject("string")
.progress("string")
.remainTime(0)
.size(0)
.snapshotId("string")
.build())
.features(ImageFeaturesArgs.builder()
.nvmeSupport("string")
.build())
.force(false)
.imageFamily("string")
.imageName("string")
.imageVersion("string")
.instanceId("string")
.licenseType("string")
.platform("string")
.resourceGroupId("string")
.snapshotId("string")
.tags(Map.of("string", "string"))
.build());
image_resource = alicloud.ecs.Image("imageResource",
architecture="string",
boot_mode="string",
delete_auto_snapshot=False,
description="string",
detection_strategy="string",
disk_device_mappings=[alicloud.ecs.ImageDiskDeviceMappingArgs(
device="string",
disk_type="string",
format="string",
import_oss_bucket="string",
import_oss_object="string",
progress="string",
remain_time=0,
size=0,
snapshot_id="string",
)],
features=alicloud.ecs.ImageFeaturesArgs(
nvme_support="string",
),
force=False,
image_family="string",
image_name="string",
image_version="string",
instance_id="string",
license_type="string",
platform="string",
resource_group_id="string",
snapshot_id="string",
tags={
"string": "string",
})
const imageResource = new alicloud.ecs.Image("imageResource", {
architecture: "string",
bootMode: "string",
deleteAutoSnapshot: false,
description: "string",
detectionStrategy: "string",
diskDeviceMappings: [{
device: "string",
diskType: "string",
format: "string",
importOssBucket: "string",
importOssObject: "string",
progress: "string",
remainTime: 0,
size: 0,
snapshotId: "string",
}],
features: {
nvmeSupport: "string",
},
force: false,
imageFamily: "string",
imageName: "string",
imageVersion: "string",
instanceId: "string",
licenseType: "string",
platform: "string",
resourceGroupId: "string",
snapshotId: "string",
tags: {
string: "string",
},
});
type: alicloud:ecs:Image
properties:
architecture: string
bootMode: string
deleteAutoSnapshot: false
description: string
detectionStrategy: string
diskDeviceMappings:
- device: string
diskType: string
format: string
importOssBucket: string
importOssObject: string
progress: string
remainTime: 0
size: 0
snapshotId: string
features:
nvmeSupport: string
force: false
imageFamily: string
imageName: string
imageVersion: string
instanceId: string
licenseType: string
platform: string
resourceGroupId: string
snapshotId: string
tags:
string: string
Image Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Image resource accepts the following input properties:
- Architecture string
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - Boot
Mode string The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- Delete
Auto boolSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- Description string
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - Detection
Strategy string The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- Disk
Device List<Pulumi.Mappings Ali Cloud. Ecs. Inputs. Image Disk Device Mapping> - Snapshot information for the image See
disk_device_mapping
below. - Features
Pulumi.
Ali Cloud. Ecs. Inputs. Image Features - Features See
features
below. - Force bool
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- Image
Family string - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- Image
Name string - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- Image
Version string The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- Instance
Id string - The instance ID.
- License
Type string - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- Name string
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- Platform string
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - Resource
Group stringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- Snapshot
Id string - The ID of the snapshot that you want to use to create the custom image.
- Dictionary<string, string>
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- Architecture string
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - Boot
Mode string The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- Delete
Auto boolSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- Description string
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - Detection
Strategy string The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- Disk
Device []ImageMappings Disk Device Mapping Args - Snapshot information for the image See
disk_device_mapping
below. - Features
Image
Features Args - Features See
features
below. - Force bool
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- Image
Family string - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- Image
Name string - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- Image
Version string The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- Instance
Id string - The instance ID.
- License
Type string - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- Name string
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- Platform string
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - Resource
Group stringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- Snapshot
Id string - The ID of the snapshot that you want to use to create the custom image.
- map[string]string
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- architecture String
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - boot
Mode String The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- delete
Auto BooleanSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- description String
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - detection
Strategy String The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- disk
Device List<ImageMappings Disk Device Mapping> - Snapshot information for the image See
disk_device_mapping
below. - features
Image
Features - Features See
features
below. - force Boolean
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- image
Family String - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- image
Name String - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- image
Version String The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- instance
Id String - The instance ID.
- license
Type String - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- name String
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- platform String
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - resource
Group StringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- snapshot
Id String - The ID of the snapshot that you want to use to create the custom image.
- Map<String,String>
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- architecture string
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - boot
Mode string The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- delete
Auto booleanSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- description string
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - detection
Strategy string The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- disk
Device ImageMappings Disk Device Mapping[] - Snapshot information for the image See
disk_device_mapping
below. - features
Image
Features - Features See
features
below. - force boolean
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- image
Family string - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- image
Name string - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- image
Version string The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- instance
Id string - The instance ID.
- license
Type string - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- name string
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- platform string
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - resource
Group stringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- snapshot
Id string - The ID of the snapshot that you want to use to create the custom image.
- {[key: string]: string}
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- architecture str
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - boot_
mode str The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- delete_
auto_ boolsnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- description str
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - detection_
strategy str The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- disk_
device_ Sequence[Imagemappings Disk Device Mapping Args] - Snapshot information for the image See
disk_device_mapping
below. - features
Image
Features Args - Features See
features
below. - force bool
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- image_
family str - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- image_
name str - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- image_
version str The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- instance_
id str - The instance ID.
- license_
type str - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- name str
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- platform str
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - resource_
group_ strid The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- snapshot_
id str - The ID of the snapshot that you want to use to create the custom image.
- Mapping[str, str]
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- architecture String
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - boot
Mode String The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- delete
Auto BooleanSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- description String
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - detection
Strategy String The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- disk
Device List<Property Map>Mappings - Snapshot information for the image See
disk_device_mapping
below. - features Property Map
- Features See
features
below. - force Boolean
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- image
Family String - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- image
Name String - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- image
Version String The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- instance
Id String - The instance ID.
- license
Type String - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- name String
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- platform String
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - resource
Group StringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- snapshot
Id String - The ID of the snapshot that you want to use to create the custom image.
- Map<String>
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
Outputs
All input properties are implicitly available as output properties. Additionally, the Image resource produces the following output properties:
- Create
Time string - The create time
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- Create
Time string - The create time
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- create
Time String - The create time
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- create
Time string - The create time
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- create_
time str - The create time
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- create
Time String - The create time
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
Look up Existing Image Resource
Get an existing Image 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?: ImageState, opts?: CustomResourceOptions): Image
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
architecture: Optional[str] = None,
boot_mode: Optional[str] = None,
create_time: Optional[str] = None,
delete_auto_snapshot: Optional[bool] = None,
description: Optional[str] = None,
detection_strategy: Optional[str] = None,
disk_device_mappings: Optional[Sequence[ImageDiskDeviceMappingArgs]] = None,
features: Optional[ImageFeaturesArgs] = None,
force: Optional[bool] = None,
image_family: Optional[str] = None,
image_name: Optional[str] = None,
image_version: Optional[str] = None,
instance_id: Optional[str] = None,
license_type: Optional[str] = None,
name: Optional[str] = None,
platform: Optional[str] = None,
resource_group_id: Optional[str] = None,
snapshot_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None) -> Image
func GetImage(ctx *Context, name string, id IDInput, state *ImageState, opts ...ResourceOption) (*Image, error)
public static Image Get(string name, Input<string> id, ImageState? state, CustomResourceOptions? opts = null)
public static Image get(String name, Output<String> id, ImageState 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.
- Architecture string
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - Boot
Mode string The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- Create
Time string - The create time
- Delete
Auto boolSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- Description string
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - Detection
Strategy string The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- Disk
Device List<Pulumi.Mappings Ali Cloud. Ecs. Inputs. Image Disk Device Mapping> - Snapshot information for the image See
disk_device_mapping
below. - Features
Pulumi.
Ali Cloud. Ecs. Inputs. Image Features - Features See
features
below. - Force bool
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- Image
Family string - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- Image
Name string - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- Image
Version string The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- Instance
Id string - The instance ID.
- License
Type string - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- Name string
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- Platform string
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - Resource
Group stringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- Snapshot
Id string - The ID of the snapshot that you want to use to create the custom image.
- Status string
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- Dictionary<string, string>
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- Architecture string
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - Boot
Mode string The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- Create
Time string - The create time
- Delete
Auto boolSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- Description string
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - Detection
Strategy string The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- Disk
Device []ImageMappings Disk Device Mapping Args - Snapshot information for the image See
disk_device_mapping
below. - Features
Image
Features Args - Features See
features
below. - Force bool
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- Image
Family string - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- Image
Name string - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- Image
Version string The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- Instance
Id string - The instance ID.
- License
Type string - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- Name string
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- Platform string
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - Resource
Group stringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- Snapshot
Id string - The ID of the snapshot that you want to use to create the custom image.
- Status string
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- map[string]string
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- architecture String
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - boot
Mode String The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- create
Time String - The create time
- delete
Auto BooleanSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- description String
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - detection
Strategy String The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- disk
Device List<ImageMappings Disk Device Mapping> - Snapshot information for the image See
disk_device_mapping
below. - features
Image
Features - Features See
features
below. - force Boolean
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- image
Family String - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- image
Name String - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- image
Version String The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- instance
Id String - The instance ID.
- license
Type String - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- name String
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- platform String
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - resource
Group StringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- snapshot
Id String - The ID of the snapshot that you want to use to create the custom image.
- status String
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- Map<String,String>
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- architecture string
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - boot
Mode string The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- create
Time string - The create time
- delete
Auto booleanSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- description string
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - detection
Strategy string The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- disk
Device ImageMappings Disk Device Mapping[] - Snapshot information for the image See
disk_device_mapping
below. - features
Image
Features - Features See
features
below. - force boolean
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- image
Family string - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- image
Name string - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- image
Version string The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- instance
Id string - The instance ID.
- license
Type string - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- name string
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- platform string
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - resource
Group stringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- snapshot
Id string - The ID of the snapshot that you want to use to create the custom image.
- status string
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- {[key: string]: string}
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- architecture str
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - boot_
mode str The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- create_
time str - The create time
- delete_
auto_ boolsnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- description str
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - detection_
strategy str The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- disk_
device_ Sequence[Imagemappings Disk Device Mapping Args] - Snapshot information for the image See
disk_device_mapping
below. - features
Image
Features Args - Features See
features
below. - force bool
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- image_
family str - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- image_
name str - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- image_
version str The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- instance_
id str - The instance ID.
- license_
type str - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- name str
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- platform str
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - resource_
group_ strid The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- snapshot_
id str - The ID of the snapshot that you want to use to create the custom image.
- status str
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- Mapping[str, str]
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
- architecture String
- The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, you must use Architecture to specify the system architecture of the system disk. Valid values:
i386
,x86\_64
,arm64
. Default value:x86\_64
. - boot
Mode String The new boot mode of the image. Valid values:
BIOS: Basic Input/Output System (BIOS)
UEFI: Unified Extensible Firmware Interface (UEFI)
UEFI-Preferred: BIOS and UEFI
NOTE: Before you change the boot mode, we recommend that you obtain the boot modes supported by the image. If you specify an unsupported boot mode for the image, ECS instances that use the image cannot start as expected. If you do not know which boot modes are supported by the image, we recommend that you use the image check feature to perform a check. For information about the image check feature, see Overview.
NOTE: For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
- create
Time String - The create time
- delete
Auto BooleanSnapshot - Not the public attribute and it used to automatically delete dependence snapshots while deleting the image.
- description String
- The new description of the custom image. The description must be 2 to 256 characters in length It cannot start with
http://
orhttps://
. This parameter is empty by default, which specifies that the original description is retained. - detection
Strategy String The mode in which to check the custom image. If you do not specify this parameter, the image is not checked. Only the standard check mode is supported.
NOTE: This parameter is supported for most Linux and Windows operating system versions. For information about image check items and operating system limits for image check, see Overview of image check and Operating system limits for image check.
- disk
Device List<Property Map>Mappings - Snapshot information for the image See
disk_device_mapping
below. - features Property Map
- Features See
features
below. - force Boolean
Whether to perform forced deletion. Value range:
- true: forcibly deletes the custom image, ignoring whether the current image is used by other instances.
- false: The custom image is deleted normally. Before deleting the custom image, check whether the current image is used by other instances.
Default value: false
- image
Family String - The name of the image family. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty.
- image
Name String - The name of the custom image. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with acs: or aliyun. It cannot contain http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). By default, this parameter is empty. In this case, the original name is retained.
- image
Version String The image version.
NOTE: If you specify an instance by configuring
InstanceId
, and the instance uses an Alibaba Cloud Marketplace image or a custom image that is created from an Alibaba Cloud Marketplace image, you must leave this parameter empty or set this parameter to the value of ImageVersion of the instance.- instance
Id String - The instance ID.
- license
Type String - The type of the license that is used to activate the operating system after the image is imported. Set the value to BYOL. BYOL: The license that comes with the source operating system is used. When you use the BYOL license, make sure that your license key is supported by Alibaba Cloud.
- name String
- . Field 'name' has been deprecated from provider version 1.227.0. New field 'image_name' instead.
- platform String
- The operating system distribution for the system disk in the custom image. If you specify a data disk snapshot to create the system disk of the custom image, use Platform to specify the operating system distribution for the system disk. Valid values:
Aliyun
,Anolis
,CentOS
,Ubuntu
,CoreOS
,SUSE
,Debian
,OpenSUSE
,FreeBSD
,RedHat
,Kylin
,UOS
,Fedora
,Fedora CoreOS
,CentOS Stream
,AlmaLinux
,Rocky Linux
,Gentoo
,Customized Linux
,Others Linux
,Windows Server 2022
,Windows Server 2019
,Windows Server 2016
,Windows Server 2012
,Windows Server 2008
,Windows Server 2003
. Default value:Others Linux
. - resource
Group StringId The ID of the resource group to which to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
NOTE: If you call the CreateImage operation as a Resource Access Management (RAM) user who does not have the permissions to manage the default resource group and do not specify
ResourceGroupId
, theForbbiden: User not authorized to operate on the specified resource
error message is returned. You must specify the ID of a resource group that the RAM user has the permissions to manage or grant the RAM user the permissions to manage the default resource group before you call the CreateImage operation again.- snapshot
Id String - The ID of the snapshot that you want to use to create the custom image.
- status String
- The status of the image. By default, if you do not specify this parameter, only images in the Available state are returned.
- Map<String>
The tag
The following arguments will be discarded. Please use new fields as soon as possible:
Supporting Types
ImageDiskDeviceMapping, ImageDiskDeviceMappingArgs
- Device string
- The device name of disk N in the custom image. Valid values:
- For disks other than basic disks, such as standard SSDs, ultra disks, and enhanced SSDs (ESSDs), the valid values range from /dev/vda to /dev/vdz in alphabetical order.
- For basic disks, the valid values range from /dev/xvda to /dev/xvdz in alphabetical order.
- Disk
Type string - The type of disk N in the custom image. You can specify this parameter to create the system disk of the custom image from a data disk snapshot. If you do not specify this parameter, the disk type is determined by the corresponding snapshot. Valid values:
- system: system disk. You can specify only one snapshot to use to create the system disk in the custom image.
- data: data disk. You can specify up to 16 snapshots to use to create data disks in the custom image.
- Format string
- Image format.
- Import
Oss stringBucket - Import the bucket of the OSS to which the image belongs.
- Import
Oss stringObject - Import the object of the OSS to which the image file belongs.
- Progress string
- Copy the progress of the task.
- Remain
Time int - For an image being replicated, return the remaining time of the replication task, in seconds.
- Size int
- The size of disk N in the custom image. Unit: GiB. The valid values and default value of DiskDeviceMapping.N.Size vary based on the value of DiskDeviceMapping.N.SnapshotId.
- If no corresponding snapshot IDs are specified in the value of DiskDeviceMapping.N.SnapshotId, DiskDeviceMapping.N.Size has the following valid values and default values:
- For basic disks, the valid values range from 5 to 2000, and the default value is 5.
- For other disks, the valid values range from 20 to 32768, and the default value is 20.
- If a corresponding snapshot ID is specified in the value of DiskDeviceMapping.N.SnapshotId, the value of DiskDeviceMapping.N.Size must be greater than or equal to the size of the specified snapshot. The default value of DiskDeviceMapping.N.Size is the size of the specified snapshot.
- Snapshot
Id string - The ID of snapshot N to use to create the custom image. .
- Device string
- The device name of disk N in the custom image. Valid values:
- For disks other than basic disks, such as standard SSDs, ultra disks, and enhanced SSDs (ESSDs), the valid values range from /dev/vda to /dev/vdz in alphabetical order.
- For basic disks, the valid values range from /dev/xvda to /dev/xvdz in alphabetical order.
- Disk
Type string - The type of disk N in the custom image. You can specify this parameter to create the system disk of the custom image from a data disk snapshot. If you do not specify this parameter, the disk type is determined by the corresponding snapshot. Valid values:
- system: system disk. You can specify only one snapshot to use to create the system disk in the custom image.
- data: data disk. You can specify up to 16 snapshots to use to create data disks in the custom image.
- Format string
- Image format.
- Import
Oss stringBucket - Import the bucket of the OSS to which the image belongs.
- Import
Oss stringObject - Import the object of the OSS to which the image file belongs.
- Progress string
- Copy the progress of the task.
- Remain
Time int - For an image being replicated, return the remaining time of the replication task, in seconds.
- Size int
- The size of disk N in the custom image. Unit: GiB. The valid values and default value of DiskDeviceMapping.N.Size vary based on the value of DiskDeviceMapping.N.SnapshotId.
- If no corresponding snapshot IDs are specified in the value of DiskDeviceMapping.N.SnapshotId, DiskDeviceMapping.N.Size has the following valid values and default values:
- For basic disks, the valid values range from 5 to 2000, and the default value is 5.
- For other disks, the valid values range from 20 to 32768, and the default value is 20.
- If a corresponding snapshot ID is specified in the value of DiskDeviceMapping.N.SnapshotId, the value of DiskDeviceMapping.N.Size must be greater than or equal to the size of the specified snapshot. The default value of DiskDeviceMapping.N.Size is the size of the specified snapshot.
- Snapshot
Id string - The ID of snapshot N to use to create the custom image. .
- device String
- The device name of disk N in the custom image. Valid values:
- For disks other than basic disks, such as standard SSDs, ultra disks, and enhanced SSDs (ESSDs), the valid values range from /dev/vda to /dev/vdz in alphabetical order.
- For basic disks, the valid values range from /dev/xvda to /dev/xvdz in alphabetical order.
- disk
Type String - The type of disk N in the custom image. You can specify this parameter to create the system disk of the custom image from a data disk snapshot. If you do not specify this parameter, the disk type is determined by the corresponding snapshot. Valid values:
- system: system disk. You can specify only one snapshot to use to create the system disk in the custom image.
- data: data disk. You can specify up to 16 snapshots to use to create data disks in the custom image.
- format String
- Image format.
- import
Oss StringBucket - Import the bucket of the OSS to which the image belongs.
- import
Oss StringObject - Import the object of the OSS to which the image file belongs.
- progress String
- Copy the progress of the task.
- remain
Time Integer - For an image being replicated, return the remaining time of the replication task, in seconds.
- size Integer
- The size of disk N in the custom image. Unit: GiB. The valid values and default value of DiskDeviceMapping.N.Size vary based on the value of DiskDeviceMapping.N.SnapshotId.
- If no corresponding snapshot IDs are specified in the value of DiskDeviceMapping.N.SnapshotId, DiskDeviceMapping.N.Size has the following valid values and default values:
- For basic disks, the valid values range from 5 to 2000, and the default value is 5.
- For other disks, the valid values range from 20 to 32768, and the default value is 20.
- If a corresponding snapshot ID is specified in the value of DiskDeviceMapping.N.SnapshotId, the value of DiskDeviceMapping.N.Size must be greater than or equal to the size of the specified snapshot. The default value of DiskDeviceMapping.N.Size is the size of the specified snapshot.
- snapshot
Id String - The ID of snapshot N to use to create the custom image. .
- device string
- The device name of disk N in the custom image. Valid values:
- For disks other than basic disks, such as standard SSDs, ultra disks, and enhanced SSDs (ESSDs), the valid values range from /dev/vda to /dev/vdz in alphabetical order.
- For basic disks, the valid values range from /dev/xvda to /dev/xvdz in alphabetical order.
- disk
Type string - The type of disk N in the custom image. You can specify this parameter to create the system disk of the custom image from a data disk snapshot. If you do not specify this parameter, the disk type is determined by the corresponding snapshot. Valid values:
- system: system disk. You can specify only one snapshot to use to create the system disk in the custom image.
- data: data disk. You can specify up to 16 snapshots to use to create data disks in the custom image.
- format string
- Image format.
- import
Oss stringBucket - Import the bucket of the OSS to which the image belongs.
- import
Oss stringObject - Import the object of the OSS to which the image file belongs.
- progress string
- Copy the progress of the task.
- remain
Time number - For an image being replicated, return the remaining time of the replication task, in seconds.
- size number
- The size of disk N in the custom image. Unit: GiB. The valid values and default value of DiskDeviceMapping.N.Size vary based on the value of DiskDeviceMapping.N.SnapshotId.
- If no corresponding snapshot IDs are specified in the value of DiskDeviceMapping.N.SnapshotId, DiskDeviceMapping.N.Size has the following valid values and default values:
- For basic disks, the valid values range from 5 to 2000, and the default value is 5.
- For other disks, the valid values range from 20 to 32768, and the default value is 20.
- If a corresponding snapshot ID is specified in the value of DiskDeviceMapping.N.SnapshotId, the value of DiskDeviceMapping.N.Size must be greater than or equal to the size of the specified snapshot. The default value of DiskDeviceMapping.N.Size is the size of the specified snapshot.
- snapshot
Id string - The ID of snapshot N to use to create the custom image. .
- device str
- The device name of disk N in the custom image. Valid values:
- For disks other than basic disks, such as standard SSDs, ultra disks, and enhanced SSDs (ESSDs), the valid values range from /dev/vda to /dev/vdz in alphabetical order.
- For basic disks, the valid values range from /dev/xvda to /dev/xvdz in alphabetical order.
- disk_
type str - The type of disk N in the custom image. You can specify this parameter to create the system disk of the custom image from a data disk snapshot. If you do not specify this parameter, the disk type is determined by the corresponding snapshot. Valid values:
- system: system disk. You can specify only one snapshot to use to create the system disk in the custom image.
- data: data disk. You can specify up to 16 snapshots to use to create data disks in the custom image.
- format str
- Image format.
- import_
oss_ strbucket - Import the bucket of the OSS to which the image belongs.
- import_
oss_ strobject - Import the object of the OSS to which the image file belongs.
- progress str
- Copy the progress of the task.
- remain_
time int - For an image being replicated, return the remaining time of the replication task, in seconds.
- size int
- The size of disk N in the custom image. Unit: GiB. The valid values and default value of DiskDeviceMapping.N.Size vary based on the value of DiskDeviceMapping.N.SnapshotId.
- If no corresponding snapshot IDs are specified in the value of DiskDeviceMapping.N.SnapshotId, DiskDeviceMapping.N.Size has the following valid values and default values:
- For basic disks, the valid values range from 5 to 2000, and the default value is 5.
- For other disks, the valid values range from 20 to 32768, and the default value is 20.
- If a corresponding snapshot ID is specified in the value of DiskDeviceMapping.N.SnapshotId, the value of DiskDeviceMapping.N.Size must be greater than or equal to the size of the specified snapshot. The default value of DiskDeviceMapping.N.Size is the size of the specified snapshot.
- snapshot_
id str - The ID of snapshot N to use to create the custom image. .
- device String
- The device name of disk N in the custom image. Valid values:
- For disks other than basic disks, such as standard SSDs, ultra disks, and enhanced SSDs (ESSDs), the valid values range from /dev/vda to /dev/vdz in alphabetical order.
- For basic disks, the valid values range from /dev/xvda to /dev/xvdz in alphabetical order.
- disk
Type String - The type of disk N in the custom image. You can specify this parameter to create the system disk of the custom image from a data disk snapshot. If you do not specify this parameter, the disk type is determined by the corresponding snapshot. Valid values:
- system: system disk. You can specify only one snapshot to use to create the system disk in the custom image.
- data: data disk. You can specify up to 16 snapshots to use to create data disks in the custom image.
- format String
- Image format.
- import
Oss StringBucket - Import the bucket of the OSS to which the image belongs.
- import
Oss StringObject - Import the object of the OSS to which the image file belongs.
- progress String
- Copy the progress of the task.
- remain
Time Number - For an image being replicated, return the remaining time of the replication task, in seconds.
- size Number
- The size of disk N in the custom image. Unit: GiB. The valid values and default value of DiskDeviceMapping.N.Size vary based on the value of DiskDeviceMapping.N.SnapshotId.
- If no corresponding snapshot IDs are specified in the value of DiskDeviceMapping.N.SnapshotId, DiskDeviceMapping.N.Size has the following valid values and default values:
- For basic disks, the valid values range from 5 to 2000, and the default value is 5.
- For other disks, the valid values range from 20 to 32768, and the default value is 20.
- If a corresponding snapshot ID is specified in the value of DiskDeviceMapping.N.SnapshotId, the value of DiskDeviceMapping.N.Size must be greater than or equal to the size of the specified snapshot. The default value of DiskDeviceMapping.N.Size is the size of the specified snapshot.
- snapshot
Id String - The ID of snapshot N to use to create the custom image. .
ImageFeatures, ImageFeaturesArgs
- Nvme
Support string - Specifies whether to support the Non-Volatile Memory Express (NVMe) protocol. Valid values:
- supported: The image supports NVMe. Instances created from this image also support NVMe.
- unsupported: The image does not support NVMe. Instances created from this image do not support NVMe.
- Nvme
Support string - Specifies whether to support the Non-Volatile Memory Express (NVMe) protocol. Valid values:
- supported: The image supports NVMe. Instances created from this image also support NVMe.
- unsupported: The image does not support NVMe. Instances created from this image do not support NVMe.
- nvme
Support String - Specifies whether to support the Non-Volatile Memory Express (NVMe) protocol. Valid values:
- supported: The image supports NVMe. Instances created from this image also support NVMe.
- unsupported: The image does not support NVMe. Instances created from this image do not support NVMe.
- nvme
Support string - Specifies whether to support the Non-Volatile Memory Express (NVMe) protocol. Valid values:
- supported: The image supports NVMe. Instances created from this image also support NVMe.
- unsupported: The image does not support NVMe. Instances created from this image do not support NVMe.
- nvme_
support str - Specifies whether to support the Non-Volatile Memory Express (NVMe) protocol. Valid values:
- supported: The image supports NVMe. Instances created from this image also support NVMe.
- unsupported: The image does not support NVMe. Instances created from this image do not support NVMe.
- nvme
Support String - Specifies whether to support the Non-Volatile Memory Express (NVMe) protocol. Valid values:
- supported: The image supports NVMe. Instances created from this image also support NVMe.
- unsupported: The image does not support NVMe. Instances created from this image do not support NVMe.
Import
ECS Image can be imported using the id, e.g.
$ pulumi import alicloud:ecs/image:Image 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.