Image Copy Args
Copies a custom image from one region to another. You can use copied images to perform operations in the target region, such as creating instances (RunInstances) and replacing system disks (ReplaceSystemDisk).
NOTE: You can only copy the custom image when it is in the Available state. NOTE: You can only copy the image belonging to your Alibaba Cloud account. Images cannot be copied from one account to another. NOTE: If the copying is not completed, you cannot call DeleteImage to delete the image but you can call CancelCopyImage to cancel the copying. NOTE: Available in 1.66.0+.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.ImageCopy;
import com.pulumi.alicloud.ecs.ImageCopyArgs;
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 ImageCopy("default", ImageCopyArgs.builder()
.description("test-image")
.imageName("test-image")
.sourceImageId("m-bp1gxyhdswlsn18tu***")
.sourceRegionId("cn-hangzhou")
.tags(Map.of("FinanceDept", "FinanceDeptJoshua"))
.build());
}
}
Attributes Reference0
The following attributes are exported:
id
- ID of the image.
Import
image can be imported using the id, e.g.
$ pulumi import alicloud:ecs/imageCopy:ImageCopy default m-uf66871ape***yg1q***
Constructors
Functions
Properties
The ID of the region to which the source custom image belongs. You can call DescribeRegions to view the latest regions of Alibaba Cloud.