create_ami: Create AMI

Description Usage Arguments Value References Examples

Description

Copy an AMI or create AMI from instance

Usage

1
2
3
4
5
6
7
8
create_image(instance, name, description = NULL,
  region = getOption("AWS_DEFAULT_REGION", "us-east-1"), mapping = NULL,
  noreboot = FALSE, ...)

copy_image(name, image, description = NULL,
  region = getOption("AWS_DEFAULT_REGION", "us-east-1"), token = NULL, ...)

deregister_image(image, ...)

Arguments

instance

A character string containing an EC2 instance ID or an object of class “ec2_instance”. Or, actions can be taken on multiple instances in one call by passing a character vector of instance IDs, or a list of objects of class “ec2_instance”.

name

A character string specifying a name for the new AMI

description

A character string containing a description of the AMI.

region

A character string specifying the AWS region to create the AMI in. The default is “us-east-1”.

mapping

...

noreboot

A logical. From the AWS documentation: “By default, this parameter is set to false, which means Amazon EC2 attempts to shut down the instance cleanly before image creation and then reboots the instance. When the parameter is set to true, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.”

...

Additional arguments passed to [ec2HTTP()].

image

A character string containing an Amazon Machine Image (AMI) image ID or an object of class “ec2_image”.

token

A (max 64-character) string containing a unique user-defined token. This can be used to ensure idempotency of requests in the event of a user-side failure. See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html for details.

Value

A list.

References

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html

Examples

1
2
3
4
5
## Not run: 
copy_image("example-rstudio-ami", "ami-7f9dc615", "This is a description")


## End(Not run)

cloudyr/aws.ec2 documentation built on Jan. 14, 2020, 4:55 a.m.