Interface AMIApi

All Known Subinterfaces:
AWSAMIApi

public interface AMIApi
Provides access to AMI Services.

  • Method Details

    • describeImagesInRegion

      @Named("DescribeImages") @POST @Path("/") Set<? extends Image> describeImagesInRegion(@Nullable String region, DescribeImagesOptions... options)
      Returns information about AMIs, AKIs, and ARIs. This includes image type, product codes, architecture, and kernel and RAM disk IDs. Images available to you include public images, private images that you own, and private images owned by other users for which you have explicit launch permissions.
      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      See Also:
      • invalid reference
        InstanceApi#describeInstances
      • invalid reference
        #describeImageAttribute
      • DescribeImagesOptions
    • describeImagesInRegionWithFilter

      @Named("DescribeImages") @POST @Path("/") Set<? extends Image> describeImagesInRegionWithFilter(@Nullable String region, com.google.common.collect.Multimap<String,String> filter, DescribeImagesOptions... options)
      Returns information about AMIs, AKIs, and ARIs. This includes image type, product codes, architecture, and kernel and RAM disk IDs. Images available to you include public images, private images that you own, and private images owned by other users for which you have explicit launch permissions.
      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      filter - Multimap of filter key/values.
      See Also:
      • invalid reference
        InstanceApi#describeInstances
      • invalid reference
        #describeImageAttribute
      • DescribeImagesOptions
    • createImageInRegion

      @Named("CreateImage") @POST @Path("/") String createImageInRegion(@Nullable String region, @FormParam("Name") String name, @FormParam("InstanceId") String instanceId, CreateImageOptions... options)
      Creates an AMI that uses an Amazon EBS root device from a "running" or "stopped" instance.
      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      name - The name of the AMI that was provided during image creation. 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores(_)
      instanceId - The ID of the instance.
      Returns:
      imageId
      See Also:
      • CreateImageOptions
      • invalid reference
        InstanceApi#runInstances
      • invalid reference
        InstanceApi#describeInstances
      • invalid reference
        InstanceApi#terminateInstances
    • deregisterImageInRegion

      Deregisters the specified AMI. Once deregistered, the AMI cannot be used to launch new instances.
      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      imageId - Unique ID of the AMI which was assigned during registration. To register an AMI, use RegisterImage. To view the AMI IDs of AMIs that belong to your identity. use DescribeImages.
      See Also:
      • invalid reference
        #describeImages
      • invalid reference
        #registerImage
    • registerImageFromManifestInRegion

      @Named("RegisterImage") @POST @Path("/") String registerImageFromManifestInRegion(@Nullable String region, @FormParam("Name") String imageName, @FormParam("ImageLocation") String pathToManifest, RegisterImageOptions... options)
      Registers an AMI with Amazon EC2. Images must be registered before they can be launched. To launch instances, use the
      invalid reference
      InstanceApi#runInstances
      operation.

      Each AMI is associated with an unique ID which is provided by the Amazon EC2 service through this operation. If needed, you can deregister an AMI at any time.

      Note

      Any modifications to an AMI backed by Amazon S3 invalidates this registration. If you make changes to an image, deregister the previous image and register the new image.
      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      pathToManifest - Full path to your AMI manifest in Amazon S3 storage.
      options - Options to specify metadata such as architecture or secondary volumes to be associated with this image.
      name - The name of the AMI that was provided during image creation. 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores(_)
      Returns:
      imageId
      See Also:
      • invalid reference
        #describeImages
      • invalid reference
        #deregisterImage
    • registerUnixImageBackedByEbsInRegion

      @Named("RegisterImage") @POST @Path("/") String registerUnixImageBackedByEbsInRegion(@Nullable String region, @FormParam("Name") String imageName, @FormParam("BlockDeviceMapping.0.Ebs.SnapshotId") String ebsSnapshotId, RegisterImageBackedByEbsOptions... options)
      Registers an AMI with Amazon EC2. Images must be registered before they can be launched. To launch instances, use the
      invalid reference
      InstanceApi#runInstances
      operation. The root device name is /dev/sda1

      Each AMI is associated with an unique ID which is provided by the Amazon EC2 service through this operation. If needed, you can deregister an AMI at any time.

      Note

      AMIs backed by Amazon EBS are automatically registered when you create the image. However, you can use this to register a snapshot of an instance backed by Amazon EBS.

      Amazon EBS snapshots are not guaranteed to be bootable.

      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      ebsSnapshotId - The id of the root snapshot (e.g., snap-6eba6e06).
      options - Options to specify metadata such as architecture or secondary volumes to be associated with this image.
      name - The name of the AMI that was provided during image creation. 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores(_)
      Returns:
      imageId
      See Also:
      • invalid reference
        #describeImages
      • invalid reference
        #deregisterImage
    • resetLaunchPermissionsOnImageInRegion

      Resets the launchPermissions on an AMI.
      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      imageId - ID of the AMI on which the attribute will be reset.
      See Also:
      • invalid reference
        #addLaunchPermissionsToImage
      • invalid reference
        #describeImageAttribute
      • invalid reference
        #removeProductCodesFromImage
    • addLaunchPermissionsToImageInRegion

      Adds launchPermissions to an AMI.
      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      userIds - AWS Access Key ID.
      userGroups - Name of the groups. Currently supports \"all.\""
      imageId - The AMI ID.
      See Also:
      • invalid reference
        #removeLaunchPermissionsFromImage
      • invalid reference
        #describeImageAttribute
      • invalid reference
        #resetImageAttribute
    • removeLaunchPermissionsFromImageInRegion

      See Also:
      • invalid reference
        AMIApi#removeLaunchPermissionsToImageInRegion
    • getLaunchPermissionForImageInRegion

      @Named("DescribeImageAttribute") @POST @Path("/") Permission getLaunchPermissionForImageInRegion(@Nullable String region, @FormParam("ImageId") String imageId)
      Returns the Permissions of an image.
      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      imageId - The ID of the AMI for which an attribute will be described
      See Also:
      • invalid reference
        #describeImages
      • invalid reference
        #modifyImageAttribute
      • invalid reference
        #resetImageAttribute
      • DescribeImagesOptions
    • getBlockDeviceMappingsForImageInRegion

      @Named("DescribeImageAttribute") @POST @Path("/") Map<String,Image.EbsBlockDevice> getBlockDeviceMappingsForImageInRegion(@Nullable String region, @FormParam("ImageId") String imageId)
      Returns a map of device name to block device for the image.
      Parameters:
      region - AMIs are tied to the Region where its files are located within Amazon S3.
      imageId - The ID of the AMI for which an attribute will be described
      See Also:
      • invalid reference
        #describeImages
      • invalid reference
        #modifyImageAttribute
      • invalid reference
        #resetImageAttribute
      • DescribeImagesOptions