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 image.
|
String |
clientToken
The client token that is used to ensure the idempotence of the request.
|
String |
description
The image description.
|
String |
detectionStrategy
The mode in which to check the custom image.
|
List<CreateImageRequest.CreateImageRequestDiskDeviceMapping> |
diskDeviceMapping
The information about the custom image.
|
String |
imageFamily
The name of the image family.
|
String |
imageName
The name of the custom image.
|
String |
imageVersion
The image version.
|
String |
instanceId
The instance ID.
|
String |
ownerAccount |
Long |
ownerId |
String |
platform
The operating system distribution 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 to assign the custom image.
|
String |
resourceOwnerAccount |
Long |
resourceOwnerId |
String |
snapshotId
The ID of the snapshot that you want to use to create the custom image.
|
List<CreateImageRequest.CreateImageRequestTag> |
tag
The tags.
|
构造器和说明 |
---|
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, you must use Architecture to specify the system architecture of the system disk. Valid values:
Default value: x86_64.
example:x86_64
@NameInMap(value="BootMode") public String bootMode
The boot mode of the image. Valid values:
Before you change the boot mode of an image, we recommend that you get familiar with the boot modes supported by the image to ensure that instances created from the image can 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 of image check.
example:For information about the UEFI-Preferred boot mode, see Best practices for ECS instance boot modes.
BIOS
@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 value of ClientToken can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.
example:123e4567-e89b-12d3-a456-426655440000
@NameInMap(value="Description") public String description
The image description. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
example:ImageTestDescription
@NameInMap(value="DetectionStrategy") public String detectionStrategy
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.
example: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.
Standard
@NameInMap(value="DiskDeviceMapping") public List<CreateImageRequest.CreateImageRequestDiskDeviceMapping> diskDeviceMapping
The information about the custom image.
@NameInMap(value="ImageFamily") public String imageFamily
The name of the image family. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with acs: or aliyun. The name cannot contain http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
example:hangzhou-daily-update
@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 and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
example:TestCentOS
@NameInMap(value="ImageVersion") public String imageVersion
The image version.
example: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.
2017011017
@NameInMap(value="InstanceId") public String instanceId
The instance ID.
example:i-bp1g6zv0ce8oghu7****
@NameInMap(value="OwnerAccount") public String ownerAccount
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="Platform") public String platform
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:
Default value: Others Linux.
example:CentOS
@NameInMap(value="RegionId") public String regionId
The region ID of the custom image that you want to create. You can call the DescribeRegions operation to query the most recent list of regions.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="ResourceGroupId") public String resourceGroupId
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.
example: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.
rg-bp67acfmxazb4p****
@NameInMap(value="ResourceOwnerAccount") public String resourceOwnerAccount
@NameInMap(value="ResourceOwnerId") public Long resourceOwnerId
@NameInMap(value="SnapshotId") public String snapshotId
The ID of the snapshot that you want to use to create the custom image.
example:s-bp17441ohwkdca0****
@NameInMap(value="Tag") public List<CreateImageRequest.CreateImageRequestTag> tag
The tags.
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 © 2024. All rights reserved.