Image Export
Export a custom image to the OSS bucket in the same region as the custom image.
NOTE: If you create an ECS instance using a mirror image and create a system disk snapshot again, exporting a custom image created from the system disk snapshot is not supported. NOTE: Support for exporting custom images that include data disk snapshot information in the image. The number of data disks cannot exceed 4 and the maximum capacity of a single data disk cannot exceed 500 GiB. NOTE: Before exporting the image, you must authorize the cloud server ECS official service account to write OSS permissions through RAM. NOTE: Available in 1.68.0+.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.ImageExport;
import com.pulumi.alicloud.ecs.ImageExportArgs;
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) {
var default_ = new ImageExport("default", ImageExportArgs.builder()
.imageId("m-bp1gxy***")
.ossBucket("ecsimageexportconfig")
.ossPrefix("ecsExport")
.build());
}
}
Content copied to clipboard
Attributes Reference0
The following attributes are exported:
id
- ID of the image.