public static final class ImportImageRequest.DiskDeviceMapping.Builder extends Object
构造器和说明 |
---|
Builder() |
限定符和类型 | 方法和说明 |
---|---|
ImportImageRequest.DiskDeviceMapping |
build() |
ImportImageRequest.DiskDeviceMapping.Builder |
device(String device)
The device name of disk N in the custom image.
|
ImportImageRequest.DiskDeviceMapping.Builder |
diskImageSize(Integer diskImageSize)
The size of disk N in the custom image after the image is imported.
|
ImportImageRequest.DiskDeviceMapping.Builder |
diskImSize(Integer diskImSize)
The size of disk N in the custom image.
|
ImportImageRequest.DiskDeviceMapping.Builder |
format(String format)
The image format.
|
ImportImageRequest.DiskDeviceMapping.Builder |
OSSBucket(String OSSBucket)
The OSS bucket where the image file is stored.
|
ImportImageRequest.DiskDeviceMapping.Builder |
OSSObject(String OSSObject)
The name (key) of the object that the uploaded image is stored as in the OSS bucket.
|
public ImportImageRequest.DiskDeviceMapping.Builder device(String device)
> This parameter will be removed in the future. We recommend that you do not use this parameter to ensure future compatibility.
public ImportImageRequest.DiskDeviceMapping.Builder diskImSize(Integer diskImSize)
You can use this parameter to specify the sizes of the system disk and data disks in the custom image. When you specify the size of the system disk, make sure that the specified size is greater than or equal to the size of the imported image file. Unit: GiB. Valid values: * When the N value is 1, this parameter specifies the size of the system disk in the custom image. Valid values: 5 to 500. * When the N value is an integer in the range of 2 to 17, this parameter specifies the size of a data disk in the custom image. Valid values: 5 to 2000. After the image file is uploaded to an OSS bucket, you can view the size of the image file in the OSS bucket. > This parameter will be removed in the future. We recommend that you use `DiskDeviceMapping.N.DiskImageSize` to ensure future compatibility.
public ImportImageRequest.DiskDeviceMapping.Builder diskImageSize(Integer diskImageSize)
You can use this parameter to specify the sizes of the system disk and data disks in the custom image. When you specify the size of the system disk, make sure that the specified size is greater than or equal to the size of the imported image file. Unit: GiB. Valid values: * When the N value is 1, this parameter specifies the size of the system disk in the custom image. Valid values: 5 to 500. * When the N value is an integer in the range of 2 to 17, this parameter specifies the size of a data disk in the custom image. Valid values: 5 to 2000. After the image file is uploaded to an OSS bucket, you can view the size of the image file in the OSS bucket.
public ImportImageRequest.DiskDeviceMapping.Builder format(String format)
* RAW * VHD * QCOW2 This parameter is empty by default, which indicates that the system checks the format of the image and uses the check result as the value of this parameter.
public ImportImageRequest.DiskDeviceMapping.Builder OSSBucket(String OSSBucket)
> Before you import images for the first time, you must use RAM to authorize ECS to access your OSS buckets. If ECS is not authorized to access your OSS buckets, the `NoSetRoletoECSServiceAcount` error code is returned when you call the ImportImage operation. For more information, see the "**Usage notes**" section in this topic.
public ImportImageRequest.DiskDeviceMapping.Builder OSSObject(String OSSObject)
public ImportImageRequest.DiskDeviceMapping build()
Copyright © 2024. All rights reserved.