public class CreateImageRequest
extends com.aliyun.tea.TeaModel
限定符和类型 | 类和说明 |
---|---|
static class |
CreateImageRequest.CreateImageRequestDiskDeviceMapping |
static class |
CreateImageRequest.CreateImageRequestTag |
限定符和类型 | 字段和说明 |
---|---|
String |
architecture
The system architecture of the system disk.
|
String |
bootMode
The boot mode of the custom image.
|
String |
clientToken
The client token that is used to ensure the idempotence of the request.
|
String |
description
The description of the custom image.
|
String |
detectionStrategy
The mode that you want to use to check the source image.
|
List<CreateImageRequest.CreateImageRequestDiskDeviceMapping> |
diskDeviceMapping
The information about the custom image.
|
String |
imageFamily
The name of the family of the custom image.
|
String |
imageName
The name of the custom image.
|
String |
imageVersion
The version of the custom image.
|
String |
instanceId
The ID of the instance that is used to create the custom image.
|
String |
ownerAccount |
Long |
ownerId |
String |
platform
The distribution of the operating system for the system disk in the custom image.
|
String |
regionId
The region ID of the custom image that you want to create.
|
String |
resourceGroupId
The ID of the resource group to which you want to assign the custom image.
|
String |
resourceOwnerAccount |
Long |
resourceOwnerId |
String |
snapshotId
The ID of the snapshot that is used to create the custom image.
|
List<CreateImageRequest.CreateImageRequestTag> |
tag
The tags that you want to add to the custom image.
|
构造器和说明 |
---|
CreateImageRequest() |
@NameInMap(value="Architecture") public String architecture
The system architecture of the system disk. If you specify a data disk snapshot to create the system disk of the custom image, use the Architecture parameter to specify the system architecture of the system disk. Valid values:
* i386
* x86\_64
* arm64
Default value: x86\_64.
@NameInMap(value="BootMode") public String bootMode
The boot mode of the custom image. Valid values:
* BIOS
* UEFI
> You must be familiar with the boot modes that are supported by the specified image. When you use this parameter to change the boot mode of the image, specify a boot mode that is supported by the image to ensure that instances that use this image can start as expected.
@NameInMap(value="ClientToken") public String clientToken
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. **The token can contain only ASCII characters and cannot exceed 64 characters in length.** For more information, see [How to ensure idempotence](~~25693~~).
@NameInMap(value="Description") public String description
The description of the custom image. The description must be 2 to 256 characters in length and cannot start with [http:// or https://.](http://https://。)
@NameInMap(value="DetectionStrategy") public String detectionStrategy
The mode that you want to use to check the source image. If you do not specify this parameter, the source image is not checked. You can check only Linux images. Set the value to Standard, which specifies the standard check mode.
The following items are checked in standard check mode:
* Virtio: whether the virtio driver is installed.
* Fstab: whether the mounting configurations in the fstab file are valid.
* Grub: whether the GRand Unified Bootloader (GRUB) configurations are valid.
* SystemImage: whether the image is valid. Do not import images that are in the ISO format or empty.
* CloudInit: whether cloud-init is installed.
* NVMe: whether the NVMe driver is installed.
* Selinux: whether SElinux is enabled.
* OnlineResizeFS: whether the root partition can be automatically resized.
* Dhcp: whether Dynamic Host Configuration Protocol (DHCP) is enabled for network interfaces.
* RtcTimeMode: the RTC time mode.
* Platform: the platform. Example: Linux or Windows.
* OSVersion: the operating system version. Example: Centos 7.9.
* Architecture: the architecture. Example: ARM or x86\_64.
* BootMode: the boot mode. Example: UEFI or Legacy.
* KernelVersion: the kernel version.
* CloudAssistant: whether the Cloud Assistant client is installed.
* SecurityCenterAgent: whether the Security Center agent is installed.
@NameInMap(value="DiskDeviceMapping") public List<CreateImageRequest.CreateImageRequestDiskDeviceMapping> diskDeviceMapping
The information about the custom image.
@NameInMap(value="ImageFamily") public String imageFamily
The name of the family of the custom image. The name must be 2 to 128 characters in length. The name must start with a letter but cannot start with acs: or aliyun. The name cannot contain [http:// or https://. The name can contain letters, digits, colons (:), underscores (\_), and hyphens (-).](http://https://。、(:)、(\_)(-)。)
@NameInMap(value="ImageName") public String imageName
The name of the custom image. The name must be 2 to 128 characters in length. The name must start with a letter but cannot start with [http:// or https://. The name can contain letters, digits, colons (:), underscores (\_), and hyphens (-).](http://https://。、(:)、(\_)(-)。)
@NameInMap(value="ImageVersion") public String imageVersion
The version of the custom image.
> If you specify an instance by using the `InstanceId` parameter 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 the ImageVersion parameter of the instance.
@NameInMap(value="InstanceId") public String instanceId
The ID of the instance that is used to create the custom image.
@NameInMap(value="OwnerAccount") public String ownerAccount
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="Platform") public String platform
The distribution of the operating system 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 the Platform parameter to specify the distribution of the operating system for the system disk. Valid values:
* CentOS
* Ubuntu
* SUSE
* OpenSUSE
* RedHat
* Debian
* CoreOS
* Aliyun
* Windows Server 2012
* Windows 7
* Customized Linux
* Others Linux
Default value: Others Linux.
@NameInMap(value="RegionId") public String regionId
The region ID of the custom image that you want to create. You can call the [DescribeRegions](~~25609~~) operation to query the most recent region list.
@NameInMap(value="ResourceGroupId") public String resourceGroupId
The ID of the resource group to which you want to assign the custom image. If you do not specify this parameter, the image is assigned to the default resource group.
> If you call the CreateImage operation as a RAM user who is not authorized to manage the default resource group and you do not specify the `ResourceGroupId` parameter, the `Forbidden: 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 is authorized to manage or authorize the RAM user to manage the default resource group before you call the CreateImage operation again.
@NameInMap(value="ResourceOwnerAccount") public String resourceOwnerAccount
@NameInMap(value="ResourceOwnerId") public Long resourceOwnerId
@NameInMap(value="SnapshotId") public String snapshotId
The ID of the snapshot that is used to create the custom image.
@NameInMap(value="Tag") public List<CreateImageRequest.CreateImageRequestTag> tag
The tags that you want to add to the custom image.
public static CreateImageRequest build(Map<String,?> map) throws Exception
Exception
public CreateImageRequest setArchitecture(String architecture)
public String getArchitecture()
public CreateImageRequest setBootMode(String bootMode)
public String getBootMode()
public CreateImageRequest setClientToken(String clientToken)
public String getClientToken()
public CreateImageRequest setDescription(String description)
public String getDescription()
public CreateImageRequest setDetectionStrategy(String detectionStrategy)
public String getDetectionStrategy()
public CreateImageRequest setDiskDeviceMapping(List<CreateImageRequest.CreateImageRequestDiskDeviceMapping> diskDeviceMapping)
public List<CreateImageRequest.CreateImageRequestDiskDeviceMapping> getDiskDeviceMapping()
public CreateImageRequest setImageFamily(String imageFamily)
public String getImageFamily()
public CreateImageRequest setImageName(String imageName)
public String getImageName()
public CreateImageRequest setImageVersion(String imageVersion)
public String getImageVersion()
public CreateImageRequest setInstanceId(String instanceId)
public String getInstanceId()
public CreateImageRequest setOwnerAccount(String ownerAccount)
public String getOwnerAccount()
public CreateImageRequest setOwnerId(Long ownerId)
public Long getOwnerId()
public CreateImageRequest setPlatform(String platform)
public String getPlatform()
public CreateImageRequest setRegionId(String regionId)
public String getRegionId()
public CreateImageRequest setResourceGroupId(String resourceGroupId)
public String getResourceGroupId()
public CreateImageRequest setResourceOwnerAccount(String resourceOwnerAccount)
public String getResourceOwnerAccount()
public CreateImageRequest setResourceOwnerId(Long resourceOwnerId)
public Long getResourceOwnerId()
public CreateImageRequest setSnapshotId(String snapshotId)
public String getSnapshotId()
public CreateImageRequest setTag(List<CreateImageRequest.CreateImageRequestTag> tag)
public List<CreateImageRequest.CreateImageRequestTag> getTag()
Copyright © 2023. All rights reserved.