Ami Copy Args
data class AmiCopyArgs(val deprecationTime: Output<String>? = null, val description: Output<String>? = null, val destinationOutpostArn: Output<String>? = null, val ebsBlockDevices: Output<List<AmiCopyEbsBlockDeviceArgs>>? = null, val encrypted: Output<Boolean>? = null, val ephemeralBlockDevices: Output<List<AmiCopyEphemeralBlockDeviceArgs>>? = null, val kmsKeyId: Output<String>? = null, val name: Output<String>? = null, val sourceAmiId: Output<String>? = null, val sourceAmiRegion: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AmiCopyArgs>
The "AMI copy" resource allows duplication of an Amazon Machine Image (AMI), including cross-region copies. If the source AMI has associated EBS snapshots, those will also be duplicated along with the AMI. This is useful for taking a single AMI provisioned in one region and making it available in another for a multi-region deployment. Copying an AMI can take several minutes. The creation of this resource will block until the new AMI is available for use on new instances.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.AmiCopy;
import com.pulumi.aws.ec2.AmiCopyArgs;
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 example = new AmiCopy("example", AmiCopyArgs.builder()
.description("A copy of ami-xxxxxxxx")
.sourceAmiId("ami-xxxxxxxx")
.sourceAmiRegion("us-west-1")
.tags(Map.of("Name", "HelloWorld"))
.build());
}
}
Content copied to clipboard
Constructors
Link copied to clipboard
fun AmiCopyArgs(deprecationTime: Output<String>? = null, description: Output<String>? = null, destinationOutpostArn: Output<String>? = null, ebsBlockDevices: Output<List<AmiCopyEbsBlockDeviceArgs>>? = null, encrypted: Output<Boolean>? = null, ephemeralBlockDevices: Output<List<AmiCopyEphemeralBlockDeviceArgs>>? = null, kmsKeyId: Output<String>? = null, name: Output<String>? = null, sourceAmiId: Output<String>? = null, sourceAmiRegion: Output<String>? = null, tags: Output<Map<String, String>>? = null)
Functions
Properties
Link copied to clipboard
Date and time to deprecate the AMI. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. Valid values: RFC3339 time string (YYYY-MM-DDTHH:MM:SSZ
)
Link copied to clipboard