You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/09/06 17:54:53 UTC
[36/51] [partial] merging master branch to 4.0.0-grouping - 6th Sept
http://git-wip-us.apache.org/repos/asf/stratos/blob/397d9926/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/ElasticBlockStoreApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/ElasticBlockStoreApi.java b/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/ElasticBlockStoreApi.java
deleted file mode 100644
index 69c92bf..0000000
--- a/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/ElasticBlockStoreApi.java
+++ /dev/null
@@ -1,602 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.features;
-
-import static org.jclouds.aws.reference.FormParameters.ACTION;
-
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.FormParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.aws.filters.FormSigner;
-import org.jclouds.ec2.EC2Fallbacks.VoidOnVolumeAvailable;
-import org.jclouds.ec2.binders.BindFiltersToIndexedFormParams;
-import org.jclouds.ec2.binders.BindUserGroupsToIndexedFormParams;
-import org.jclouds.ec2.binders.BindUserIdsToIndexedFormParams;
-import org.jclouds.ec2.binders.BindVolumeIdsToIndexedFormParams;
-import org.jclouds.ec2.domain.Attachment;
-import org.jclouds.ec2.domain.Permission;
-import org.jclouds.ec2.domain.Snapshot;
-import org.jclouds.ec2.domain.Volume;
-import org.jclouds.ec2.options.CreateSnapshotOptions;
-import org.jclouds.ec2.options.DescribeSnapshotsOptions;
-import org.jclouds.ec2.options.DetachVolumeOptions;
-import org.jclouds.ec2.xml.AttachmentHandler;
-import org.jclouds.ec2.xml.CreateVolumeResponseHandler;
-import org.jclouds.ec2.xml.DescribeSnapshotsResponseHandler;
-import org.jclouds.ec2.xml.DescribeVolumesResponseHandler;
-import org.jclouds.ec2.xml.PermissionHandler;
-import org.jclouds.ec2.xml.SnapshotHandler;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
-import org.jclouds.location.functions.ZoneToEndpoint;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.FormParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.VirtualHost;
-import org.jclouds.rest.annotations.XMLResponseParser;
-
-import com.google.common.collect.Multimap;
-
-/**
- * Provides access to EC2 Elastic Block Store services via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-@RequestFilters(FormSigner.class)
-@VirtualHost
-public interface ElasticBlockStoreApi {
-
- /**
- * Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same
- * Availability Zone. For more information about Amazon EBS, go to the Amazon Elastic Compute
- * Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.
- *
- * @param availabilityZone
- * An Amazon EBS volume must be located within the same Availability Zone as the
- * instance to which it attaches.
- * @param snapshotId
- * The snapshot from which to create the new volume.
- *
- * @see #describeVolumesInRegion
- * @see #deleteVolumeInRegion
- * @see #attachVolumeInRegion
- * @see #detachVolumeInRegion
- * @see AvailabilityZoneAndRegionApi#describeAvailabilityZonesInRegion
- *
- *
- * @see <a href=
- * "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html"
- * />
- */
- @Named("CreateVolume")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "CreateVolume")
- @XMLResponseParser(CreateVolumeResponseHandler.class)
- Volume createVolumeFromSnapshotInAvailabilityZone(
- @EndpointParam(parser = ZoneToEndpoint.class) @FormParam("AvailabilityZone") String availabilityZone,
- @FormParam("SnapshotId") String snapshotId);
-
- /**
- * Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same
- * Availability Zone. This is overloaded {@link #createVolumeFromSnapshotInAvailabilityZone},
- * which creates a volume with a specific size.
- * For more information about Amazon EBS, go to the Amazon Elastic Compute
- * Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.
- *
- * @param availabilityZone
- * An Amazon EBS volume must be located within the same Availability Zone as the
- * instance to which it attaches.
- * @param size
- * Size of volume to be created
- * @param snapshotId
- * The snapshot from which to create the new volume.
- *
- * @see #createVolumeFromSnapshotInAvailabilityZone
- * @see #describeVolumesInRegion
- * @see #deleteVolumeInRegion
- * @see #attachVolumeInRegion
- * @see #detachVolumeInRegion
- * @see AvailabilityZoneAndRegionApi#describeAvailabilityZonesInRegion
- *
- *
- * @see <a href=
- * "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html"
- * />
- */
- @Named("CreateVolume")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "CreateVolume")
- @XMLResponseParser(CreateVolumeResponseHandler.class)
- Volume createVolumeFromSnapshotInAvailabilityZone(
- @EndpointParam(parser = ZoneToEndpoint.class) @FormParam("AvailabilityZone") String availabilityZone,
- @FormParam("Size") int size, @FormParam("SnapshotId") String snapshotId);
-
- /**
- * Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same
- * Availability Zone. For more information about Amazon EBS, go to the Amazon Elastic Compute
- * Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.
- *
- * @param availabilityZone
- * An Amazon EBS volume must be located within the same Availability Zone as the
- * instance to which it attaches.
- * @param size
- * The size of the volume, in GiBs (1-1024). Required if you are not creating a volume
- * from a snapshot.
- *
- *
- * @see #describeVolumesInRegion
- * @see #deleteVolumeInRegion
- * @see #attachVolumeInRegion
- * @see #detachVolumeInRegion
- * @see AvailabilityZoneAndRegionApi#describeAvailabilityZonesInRegion
- * @see <a href=
- * "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html"
- * />
- */
- @Named("CreateVolume")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "CreateVolume")
- @XMLResponseParser(CreateVolumeResponseHandler.class)
- Volume createVolumeInAvailabilityZone(
- @EndpointParam(parser = ZoneToEndpoint.class) @FormParam("AvailabilityZone") String availabilityZone,
- @FormParam("Size") int size);
-
- /**
- * Describes the specified Amazon EBS volumes that you own. If you do not specify one or more
- * volume IDs, Amazon EBS describes all volumes that you own. For more information about Amazon
- * EBS, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud
- * User Guide.
- *
- * @param region
- * region where the volume is defined
- * @param volumeIds
- * The ID of the volume to list. Defaults to describe all volumes that you own.
- *
- * @see #createSnapshotInRegion
- * @see #describeSnapshotInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVolumes.html"
- * />
- */
- @POST
- @Named("DescribeVolumes")
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeVolumes")
- @XMLResponseParser(DescribeVolumesResponseHandler.class)
- Set<Volume> describeVolumesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindVolumeIdsToIndexedFormParams.class) String... volumeIds);
-
- /**
- * Describes the specified Amazon EBS volumes that you own and match the given filters. If you
- * do not specify any filters, Amazon EBS describes all volumes that you own. For more
- * information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide or
- * Amazon Elastic Compute Cloud User Guide.
- *
- * @param region
- * region where the volume is defined
- * @param filter
- * Multimap of filter key/values
- *
- * @see #createSnapshotInRegion
- * @see #describeSnapshotInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVolumes.html"
- * />
- */
- @POST
- @Named("DescribeVolumes")
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeVolumes")
- @XMLResponseParser(DescribeVolumesResponseHandler.class)
- Set<Volume> describeVolumesInRegionWithFilter(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindFiltersToIndexedFormParams.class) Multimap<String, String> filter);
-
- /**
- * Deletes an Amazon EBS volume that you own. For more information about Amazon EBS, go to the
- * Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.
- *
- * @param region
- * region where the volume is defined
- * @param volumeId
- * The ID of the volume to delete. The volume remains in the deleting state for several
- * minutes after entering this command.
- *
- * @see #describeVolumesInRegion
- * @see #createVolumeInRegion
- * @see #attachVolumeInRegion
- * @see #detachVolumeInRegion
- *
- * @see <a href=
- * "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteVolume.html"
- * />
- */
- @Named("DeleteVolume")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DeleteVolume")
- void deleteVolumeInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("VolumeId") String volumeId);
-
- /**
- * Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.
- * <p/>
- *
- * <h3>Note</h3>
- *
- * Windows instances currently support devices xvda through xvdp. Devices xvda and xvdb are
- * reserved by the operating system, xvdc is assigned to drive C:\, and, depending on the
- * instance type, devices xvdd through xvde might be reserved by the instance stores. Any device
- * that is not reserved can be attached to an Amazon EBS volume. For a list of devices that are
- * reserved by the instance stores, go to the Amazon Elastic Compute Cloud Developer Guide or
- * Amazon Elastic Compute Cloud User Guide.
- *
- * @param region
- * region where the volume is defined
- * @param volumeId
- * The ID of the volume to delete. The volume remains in the deleting state for several
- * minutes after entering this command.
- * @param force
- * Forces detachment if the previous detachment attempt did not occur cleanly (logging
- * into an instance, unmounting the volume, and detaching normally). This option can
- * lead to data loss or a corrupted file system. Use this option only as a last resort
- * to detach a volume from a failed instance. The instance will not have an opportunity
- * to flush file system caches nor file system meta data. If you use this option, you
- * must perform file system check and repair procedures.
- *
- * @param options
- * options like force()
- *
- * @see #describeVolumesInRegion
- * @see #createVolumeInRegion
- * @see #attachVolumeInRegion
- * @see #deleteVolumeInRegion
- *
- * @see <a href=
- * "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DetachVolume.html"
- * />
- */
- @Named("DetachVolume")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DetachVolume")
- @Fallback(VoidOnVolumeAvailable.class)
- void detachVolumeInRegion(@EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("VolumeId") String volumeId, @FormParam("Force") boolean force, DetachVolumeOptions... options);
-
- /**
- * Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.
- *
- * <h3>Note</h3> Windows instances currently support devices xvda through xvdp. Devices xvda and
- * xvdb are reserved by the operating system, xvdc is assigned to drive C:\, and, depending on
- * the instance type, devices xvdd through xvde might be reserved by the instance stores. Any
- * device that is not reserved can be attached to an Amazon EBS volume. For a list of devices
- * that are reserved by the instance stores, go to the Amazon Elastic Compute Cloud Developer
- * Guide or Amazon Elastic Compute Cloud User Guide.
- *
- * @param region
- * region where the volume is defined
- * @param volumeId
- * The ID of the Amazon EBS volume. The volume and instance must be within the same
- * Availability Zone and the instance must be running.
- * @param instanceId
- * The ID of the instance to which the volume attaches. The volume and instance must be
- * within the same Availability Zone and the instance must be running.
- * @param device
- * Specifies how the device is exposed to the instance (e.g., /dev/sdh).
- *
- * @see #describeVolumesInRegion
- * @see #createVolumeInRegion
- * @see #detachVolumeInRegion
- * @see #deleteVolumeInRegion
- *
- * @see <a href=
- * "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AttachVolume.html"
- * />
- */
- @Named("AttachVolume")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "AttachVolume")
- @XMLResponseParser(AttachmentHandler.class)
- Attachment attachVolumeInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("VolumeId") String volumeId, @FormParam("InstanceId") String instanceId,
- @FormParam("Device") String device);
-
- /**
- * Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3. You can use snapshots
- * for backups, to make identical copies of instance devices, and to save data before shutting
- * down an instance. For more information about Amazon EBS, go to the Amazon Elastic Compute
- * Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.
- * <p/>
- * When taking a snapshot of a file system, we recommend unmounting it first. This ensures the
- * file system metadata is in a consistent state, that the 'mounted indicator' is cleared, and
- * that all applications using that file system are stopped and in a consistent state. Some file
- * systems, such as xfs, can freeze and unfreeze activity so a snapshot can be made without
- * unmounting.
- * <p/>
- * For Linux/UNIX, enter the following command from the command line.
- *
- * <pre>
- * umount - d / dev / sdh
- * </pre>
- * <p/>
- * For Windows, open Disk Management, right-click the volume to unmount, and select Change Drive
- * Letter and Path. Then, select the mount point to remove and click Remove.
- *
- * @param region
- * Snapshots are tied to Regions and can only be used for volumes within the same
- * Region.
- * @param volumeId
- * The ID of the Amazon EBS volume of which to take a snapshot.
- * @param options
- * options like passing a description.
- * @return the Snapshot in progress
- *
- * @see #describeSnapshotsInRegion
- * @see #deleteSnapshotInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSnapshot.html"
- * />
- */
- @Named("CreateSnapshot")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "CreateSnapshot")
- @XMLResponseParser(SnapshotHandler.class)
- Snapshot createSnapshotInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("VolumeId") String volumeId, CreateSnapshotOptions... options);
-
- /**
- * Returns information about Amazon EBS snapshots available to the user. Information returned
- * includes volume ID, status, start time, progress, owner ID, volume size, and description.
- * Snapshots available to the user include public snapshots available for any user to
- * createVolume, private snapshots owned by the user making the request, and private snapshots
- * owned by other users for which the user granted explicit create volume permissions.
- * <p/>
- * The create volume permissions fall into 3 categories:
- * <p/>
- * <table>
- * <tr>
- * <td>Permission</td>
- * <td>Description</td>
- * </tr>
- * <tr>
- * <td>public</td>
- * <td>The owner of the snapshot granted create volume permissions for the snapshot to the all
- * group. All users have create volume permissions for these snapshots.</td>
- * </tr>
- * <tr>
- * <td>explicit</td>
- * <td>The owner of the snapshot granted create volume permissions to a specific user.</td>
- * </tr>
- * <tr>
- * <td>implicit</td>
- * <td>A user has implicit create volume permissions for all snapshots he or she owns.</td>
- * </tr>
- * </table>
- * <p/>
- *
- * The list of snapshots returned can be modified by specifying snapshot IDs, snapshot owners, or
- * users with create volume permissions. If no options are specified, Amazon EC2 returns all
- * snapshots for which the user has create volume permissions.
- * <p/>
- * If you specify one or more snapshot IDs, only snapshots that have the specified IDs are
- * returned. If you specify an invalid snapshot ID, a fault is returned. If you specify a
- * snapshot ID for which you do not have access, it will not be included in the returned results.
- * <p/>
- * If you specify one or more snapshot owners, only snapshots from the specified owners and for
- * which you have access are returned. The results can include the AWS Account IDs of the
- * specified owners, amazon for snapshots owned by Amazon or self for snapshots that you own.
- * <p/>
- * If you specify a list of restorable users, only users that have create snapshot permissions
- * for the snapshots are returned. You can specify AWS Account IDs (if you own the snapshot(s)),
- * self for snapshots for which you own or have explicit permissions, or all for public
- * snapshots.
- *
- * @param region
- * Snapshots are tied to Regions and can only be used for volumes within the same
- * Region.
- * @param options
- * specify the snapshot ids or other parameters to clarify the list.
- * @return matching snapshots.
- *
- * @see #createSnapshotsInRegion
- * @see #deleteSnapshotInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html"
- * />
- */
- @Named("DescribeSnapshots")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeSnapshots")
- @XMLResponseParser(DescribeSnapshotsResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- Set<Snapshot> describeSnapshotsInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- DescribeSnapshotsOptions... options);
-
- /**
- * Returns information about EBS snapshots matching the given filters.
- *
- * @param region
- * Snapshots are tied to Regions and can only be used for volumes within the same
- * Region.
- * @param filter
- * Multimap of filter key/values.
- * @param options
- * specify the snapshot ids or other parameters to clarify the list.
- * @return matching snapshots.
- *
- * @see #describeSnapshotsInRegion
- * @see #createSnapshotsInRegion
- * @see #deleteSnapshotInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html"
- * />
- */
- @Named("DescribeSnapshots")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeSnapshots")
- @XMLResponseParser(DescribeSnapshotsResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- Set<Snapshot> describeSnapshotsInRegionWithFilter(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindFiltersToIndexedFormParams.class) Multimap<String, String> filter,
- DescribeSnapshotsOptions... options);
-
- /**
- * Deletes a snapshot of an Amazon EBS volume that you own. For more information, go to the
- * Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.
- *
- * @param region
- * Snapshots are tied to Regions and can only be used for volumes within the same
- * Region.
- * @param snapshotId
- * The ID of the Amazon EBS snapshot to delete.
- *
- * @see #createSnapshotInRegion
- * @see #deleteSnapshotInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSnapshot.html"
- * />
- */
- @Named("DeleteSnapshot")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DeleteSnapshot")
- void deleteSnapshotInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("SnapshotId") String snapshotId);
-
- /**
- * Adds {@code createVolumePermission}s to an EBS snapshot.
- *
- * @param region
- * Snapshots are tied to Regions and can only be used for volumes within the same
- * Region.
- * @param userIds
- * AWS Access Key ID.
- * @param userGroups
- * Name of the groups. Currently supports \"all.\""
- * @param snapshotId
- * The ID of the Amazon EBS snapshot.
- *
- * @see #removeCreateVolumePermissionsFromSnapshot
- * @see #describeSnapshotAttribute
- * @see #resetSnapshotAttribute
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifySnapshotAttribute.html"
- * />
- */
- @Named("ModifySnapshotAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifySnapshotAttribute", "add",
- "createVolumePermission" })
- void addCreateVolumePermissionsToSnapshotInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds,
- @BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups,
- @FormParam("SnapshotId") String snapshotId);
-
- /**
- * Removes {@code createVolumePermission}s from an EBS snapshot.
- *
- * @param region
- * Snapshots are tied to Regions and can only be used for volumes within the same
- * Region.
- * @param userIds
- * AWS Access Key ID.
- * @param userGroups
- * Name of the groups. Currently supports \"all.\""
- * @param snapshotId
- * The ID of the Amazon EBS snapshot.
- *
- * @see #addCreateVolumePermissionsToSnapshot
- * @see #describeSnapshotAttribute
- * @see #resetSnapshotAttribute
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifySnapshotAttribute.html"
- * />
- */
- @Named("ModifySnapshotAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "OperationType", "Attribute" }, values = { "ModifySnapshotAttribute", "remove",
- "createVolumePermission" })
- void removeCreateVolumePermissionsFromSnapshotInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindUserIdsToIndexedFormParams.class) Iterable<String> userIds,
- @BinderParam(BindUserGroupsToIndexedFormParams.class) Iterable<String> userGroups,
- @FormParam("SnapshotId") String snapshotId);
-
- /**
- * Returns the {@link Permission}s of an snapshot.
- *
- * @param region
- * AMIs are tied to the Region where its files are located within Amazon S3.
- * @param snapshotId
- * The ID of the AMI for which an attribute will be described
- * @see #describeSnapshots
- * @see #modifySnapshotAttribute
- * @see #resetSnapshotAttribute
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshotAttribute.html"
- * />
- * @see DescribeSnapshotsOptions
- */
- @Named("DescribeSnapshotAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeSnapshotAttribute", "createVolumePermission" })
- @XMLResponseParser(PermissionHandler.class)
- Permission getCreateVolumePermissionForSnapshotInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("SnapshotId") String snapshotId);
-
- /**
- * Resets the {@code createVolumePermission}s on an EBS snapshot.
- *
- * @param region
- * Snapshots are tied to Regions and can only be used for volumes within the same
- * Region.
- * @param snapshotId
- * The ID of the Amazon EBS snapshot.
- *
- * @see #addCreateVolumePermissionsToSnapshot
- * @see #describeSnapshotAttribute
- * @see #removeProductCodesFromSnapshot
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ResetSnapshotAttribute.html"
- * />
- */
- @Named("ResetSnapshotAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ResetSnapshotAttribute", "createVolumePermission" })
- void resetCreateVolumePermissionsOnSnapshotInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("SnapshotId") String snapshotId);
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/397d9926/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/ElasticIPAddressApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/ElasticIPAddressApi.java b/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/ElasticIPAddressApi.java
deleted file mode 100644
index 3401cde..0000000
--- a/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/ElasticIPAddressApi.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.features;
-
-import static org.jclouds.aws.reference.FormParameters.ACTION;
-
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.FormParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.aws.filters.FormSigner;
-import org.jclouds.ec2.binders.BindFiltersToIndexedFormParams;
-import org.jclouds.ec2.binders.BindPublicIpsToIndexedFormParams;
-import org.jclouds.ec2.domain.PublicIpInstanceIdPair;
-import org.jclouds.ec2.xml.AllocateAddressResponseHandler;
-import org.jclouds.ec2.xml.DescribeAddressesResponseHandler;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.FormParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SinceApiVersion;
-import org.jclouds.rest.annotations.VirtualHost;
-import org.jclouds.rest.annotations.XMLResponseParser;
-
-import com.google.common.collect.Multimap;
-
-/**
- * Provides access to EC2 Elastic IP Addresses via REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-@RequestFilters(FormSigner.class)
-@VirtualHost
-public interface ElasticIPAddressApi {
-
- /**
- * Acquires an elastic IP address for use with your identity.
- *
- * @param region
- * Elastic IP addresses are tied to a Region and cannot be mapped across Regions.
- * @see #describeAddresses
- * @see #releaseAddress
- * @see #associateAddress
- * @see #disassociateAddress
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AllocateAddress.html"
- */
- @Named("AllocateAddress")
- @POST
- @Path("/")
- @XMLResponseParser(AllocateAddressResponseHandler.class)
- @FormParams(keys = ACTION, values = "AllocateAddress")
- String allocateAddressInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region);
-
- /**
- * Associates an elastic IP address with an instance. If the IP address is currently assigned to
- * another instance, the IP address is assigned to the new instance. This is an idempotent
- * operation. If you enter it more than once, Amazon EC2 does not return an error.
- *
- * @param region
- * Elastic IP addresses are tied to a Region and cannot be mapped across Regions.
- * @param publicIp
- * IP address that you are assigning to the instance.
- * @param instanceId
- * The instance to associate with the IP address.
- *
- * @see #allocateAddress
- * @see #describeAddresses
- * @see #releaseAddress
- * @see #disassociateAddress
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-AssociateAddress.html"
- */
- @Named("AssociateAddress")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "AssociateAddress")
- void associateAddressInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("PublicIp") String publicIp, @FormParam("InstanceId") String instanceId);
-
- /**
- * Disassociates the specified elastic IP address from the instance to which it is assigned. This
- * is an idempotent operation. If you enter it more than once, Amazon EC2 does not return an
- * error.
- *
- * @param region
- * Elastic IP addresses are tied to a Region and cannot be mapped across Regions.
- * @param publicIp
- * IP address that you are assigning to the instance.
- *
- * @see #allocateAddress
- * @see #describeAddresses
- * @see #releaseAddress
- * @see #associateAddress
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-DisassociateAddress.html"
- */
- @Named("DisassociateAddress")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DisassociateAddress")
- void disassociateAddressInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("PublicIp") String publicIp);
-
- /**
- * Releases an elastic IP address associated with your identity.
- *
- * @param region
- * Elastic IP addresses are tied to a Region and cannot be mapped across Regions.
- * @param publicIp
- * The IP address that you are releasing from your identity.
- *
- * @see #allocateAddress
- * @see #describeAddresses
- * @see #associateAddress
- * @see #disassociateAddress
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-ReleaseAddress.html"
- */
- @Named("ReleaseAddress")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "ReleaseAddress")
- void releaseAddressInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("PublicIp") String publicIp);
-
- /**
- * Lists elastic IP addresses assigned to your identity or provides information about a specific
- * address.
- *
- * @param region
- * Elastic IP addresses are tied to a Region and cannot be mapped across Regions.
- * @param publicIps
- * Elastic IP address to describe.
- *
- * @throws AWSResponseException
- * if the requested publicIp is not found
- * @see #allocateAddress
- * @see #releaseAddress
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAddresses.html"
- * />
- */
- @Named("DescribeAddresses")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeAddresses")
- @XMLResponseParser(DescribeAddressesResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- Set<PublicIpInstanceIdPair> describeAddressesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindPublicIpsToIndexedFormParams.class) String... publicIps);
-
- /**
- * Lists elastic IP addresses assigned to your identity or provides information on addresses
- * matching a given filter.
- *
- * @param region
- * Elastic IP addresses are tied to a Region and cannot be mapped across Regions.
- * @param filter
- *
- * @throws AWSResponseException
- * if the requested publicIp is not found
- * @see #allocateAddress
- * @see #releaseAddress
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAddresses.html"
- * />
- */
- @SinceApiVersion("2010-08-31")
- @Named("DescribeAddresses")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeAddresses")
- @XMLResponseParser(DescribeAddressesResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- Set<PublicIpInstanceIdPair> describeAddressesInRegionWithFilter(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindFiltersToIndexedFormParams.class) Multimap<String, String> filter);
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/397d9926/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/InstanceApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/InstanceApi.java b/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/InstanceApi.java
deleted file mode 100644
index 5d7a591..0000000
--- a/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/InstanceApi.java
+++ /dev/null
@@ -1,803 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.features;
-
-import static org.jclouds.aws.reference.FormParameters.ACTION;
-
-import java.util.Map;
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.FormParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.aws.filters.FormSigner;
-import org.jclouds.ec2.binders.BindBlockDeviceMappingToIndexedFormParams;
-import org.jclouds.ec2.binders.BindFiltersToIndexedFormParams;
-import org.jclouds.ec2.binders.BindInstanceIdsToIndexedFormParams;
-import org.jclouds.ec2.binders.IfNotNullBindAvailabilityZoneToFormParam;
-import org.jclouds.ec2.domain.BlockDevice;
-import org.jclouds.ec2.domain.InstanceStateChange;
-import org.jclouds.ec2.domain.Reservation;
-import org.jclouds.ec2.domain.RunningInstance;
-import org.jclouds.ec2.domain.Volume.InstanceInitiatedShutdownBehavior;
-import org.jclouds.ec2.functions.ConvertUnencodedBytesToBase64EncodedString;
-import org.jclouds.ec2.options.RunInstancesOptions;
-import org.jclouds.ec2.xml.BlockDeviceMappingHandler;
-import org.jclouds.ec2.xml.BooleanValueHandler;
-import org.jclouds.ec2.xml.DescribeInstancesResponseHandler;
-import org.jclouds.ec2.xml.GetConsoleOutputResponseHandler;
-import org.jclouds.ec2.xml.InstanceInitiatedShutdownBehaviorHandler;
-import org.jclouds.ec2.xml.InstanceStateChangeHandler;
-import org.jclouds.ec2.xml.InstanceTypeHandler;
-import org.jclouds.ec2.xml.RunInstancesResponseHandler;
-import org.jclouds.ec2.xml.StringValueHandler;
-import org.jclouds.ec2.xml.UnencodeStringValueHandler;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.FormParams;
-import org.jclouds.rest.annotations.ParamParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SinceApiVersion;
-import org.jclouds.rest.annotations.VirtualHost;
-import org.jclouds.rest.annotations.XMLResponseParser;
-
-import com.google.common.collect.Multimap;
-
-/**
- * Provides access to EC2 Instance Services via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-@RequestFilters(FormSigner.class)
-@VirtualHost
-public interface InstanceApi {
-
- /**
- * Returns information about instances that you own.
- * <p/>
- *
- * If you specify one or more instance IDs, Amazon EC2 returns information
- * for those instances. If you do not specify instance IDs, Amazon EC2
- * returns information for all relevant instances. If you specify an invalid
- * instance ID, a fault is returned. If you specify an instance that you do
- * not own, it will not be included in the returned results.
- * <p/>
- * Recently terminated instances might appear in the returned results.This
- * interval is usually less than one hour.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- *
- * @see #runInstancesInRegion
- * @see #terminateInstancesInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html"
- * />
- */
- @Named("DescribeInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeInstances")
- @XMLResponseParser(DescribeInstancesResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- Set<? extends Reservation<? extends RunningInstance>> describeInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- * Returns information about instances that you own.
- * <p/>
- *
- * If you specify one or filters, Amazon EC2 returns information for instances
- * matching those filters. If you do not specify any filters, Amazon EC2
- * returns information for all relevant instances. If you specify an invalid
- * filter, a fault is returned. Only instances you own will be included in the
- * results.
- * <p/>
- * Recently terminated instances might appear in the returned results. This
- * interval is usually less than one hour.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param filter
- *
- * @see #runInstancesInRegion
- * @see #terminateInstancesInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html"
- * />
- */
- @SinceApiVersion("2010-08-31")
- @Named("DescribeInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeInstances")
- @XMLResponseParser(DescribeInstancesResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- Set<? extends Reservation<? extends RunningInstance>> describeInstancesInRegionWithFilter(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindFiltersToIndexedFormParams.class) Multimap<String, String> filter);
-
- /**
- * Launches a specified number of instances of an AMI for which you have
- * permissions.
- * <p/>
- *
- * If Amazon EC2 cannot launch the minimum number AMIs you request, no
- * instances will be launched. If there is insufficient capacity to launch
- * the maximum number of AMIs you request, Amazon EC2 launches the minimum
- * number specified for each AMI and allocate the remaining available
- * instances using round robin.
- * <p/>
- * <h4>Security Groups</h4>
- * <b>Note:</b> Every instance is launched in a security group (created using
- * the CreateSecurityGroup operation.
- * <h4>Key Pair</h4>
- * You can provide an optional key pair ID for each image in the launch
- * request (created using the CreateKeyPair operation). All instances that
- * are created from images that use this key pair will have access to the
- * associated public key at boot. You can use this key to provide secure
- * access to an instance of an image on a per-instance basis. Amazon EC2
- * public images use this feature to provide secure access without passwords.
- * <p/>
- * <b>Note:</b> Launching public images without a key pair ID will leave them
- * inaccessible.
- * <p/>
- * The public key material is made available to the instance at boot time by
- * placing it in the openssh_id.pub file on a logical device that is exposed
- * to the instance as /dev/sda2 (the instance store). The format of this file
- * is suitable for use as an entry within ~/.ssh/authorized_keys (the OpenSSH
- * format). This can be done at boot (e.g., as part of rc.local) allowing for
- * secure access without passwords.
- * <h4>User Data</h4>
- * Optional user data can be provided in the launch request. All instances
- * that collectively comprise the launch request have access to this data.
- * For more information, go the Amazon Elastic Compute Cloud Developer Guide.
- * <h4>Product Codes</h4>
- *
- * <b>Note:</b> If any of the AMIs have a product code attached for which the
- * user has not subscribed, the RunInstances call will fail.
- * <h4>Kernel</h4>
- *
- * <b>Important:</b> We strongly recommend using the 2.6.18 Xen stock kernel
- * with High-CPU and High-Memory instances. Although the default Amazon EC2
- * kernels will work, the new kernels provide greater stability and
- * performance for these instance types. For more information about kernels,
- * go the Amazon Elastic Compute Cloud Developer Guide.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param nullableAvailabilityZone
- * Specifies the placement constraints (Availability Zones) for
- * launching the instances. If null, Amazon will determine the best
- * availability zone to place the instance.
- * @param imageId
- * Unique ID of a machine image, returned by a call to
- * @param minCount
- * Minimum number of instances to launch. If the value is more than
- * Amazon EC2 can launch, no instances a re launched at all.
- * Constraints: Between 1 and the maximum number allowed for your
- * account (default: 20).
- * @param maxCount
- * Maximum number of instances to launch. If the value is more than
- * Amazon EC2 can launch, the largest possible number above
- * minCount will be launched instead. Constraints: Between 1 and
- * the maximum number allowed for your account (default: 20).
- * @see #describeInstancesInRegion
- * @see #terminateInstancesInRegion
- * @see #authorizeSecurityGroupIngressInRegion
- * @see #revokeSecurityGroupIngressInRegion
- * @see #describeSecurityGroupsInRegion
- * @see #createSecurityGroupInRegion
- * @see #createKeyPairInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RunInstances.html"
- * />
- * @see RunInstancesOptions
- */
- @Named("RunInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "RunInstances")
- @XMLResponseParser(RunInstancesResponseHandler.class)
- Reservation<? extends RunningInstance> runInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @Nullable @BinderParam(IfNotNullBindAvailabilityZoneToFormParam.class) String nullableAvailabilityZone,
- @FormParam("ImageId") String imageId, @FormParam("MinCount") int minCount,
- @FormParam("MaxCount") int maxCount, RunInstancesOptions... options);
-
- /**
- * Requests a reboot of one or more instances. This operation is
- * asynchronous; it only queues a request to reboot the specified
- * instance(s). The operation will succeed if the instances are valid and
- * belong to you. Requests to reboot terminated instances are ignored. <h3>
- * Note</h3> If a Linux/UNIX instance does not cleanly shut down within four
- * minutes, Amazon EC2 will perform a hard reboot.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- *
- * @param instanceIds
- * Instance ID to reboot.
- *
- * @see #startInstancesInRegion
- * @see #runInstancesInRegion
- * @see #describeInstancesInRegion
- * @see #terminateInstancesInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-StopInstances.html"
- * />
- */
- @Named("RebootInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "RebootInstances")
- void rebootInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- * Shuts down one or more instances. This operation is idempotent; if you
- * terminate an instance more than once, each call will succeed.
- * <p/>
- * Terminated instances will remain visible after termination (approximately
- * one hour).
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceIds
- * Instance ID to terminate.
- * @see #describeInstancesInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-TerminateInstances.html"
- * />
- */
- @Named("TerminateInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "TerminateInstances")
- @XMLResponseParser(InstanceStateChangeHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- Set<? extends InstanceStateChange> terminateInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- * Stops an instance that uses an Amazon EBS volume as its root device.
- * <p/>
- * Instances that use Amazon EBS volumes as their root devices can be quickly
- * stopped and started. When an instance is stopped, the compute resources
- * are released and you are not billed for hourly instance usage. However,
- * your root partition Amazon EBS volume remains, continues to persist your
- * data, and you are charged for Amazon EBS volume usage. You can restart
- * your instance at any time.
- * <h3>Note</h3>
- * Before stopping an instance, make sure it is in a state from which it can
- * be restarted. Stopping an instance does not preserve data stored in RAM.
- * <p/>
- * Performing this operation on an instance that uses an instance store as
- * its root device returns an error.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param force
- * Forces the instance to stop. The instance will not have an
- * opportunity to flush file system caches nor file system meta
- * data. If you use this option, you must perform file system check
- * and repair procedures. This option is not recommended for
- * Windows instances.
- * @param instanceIds
- * Instance ID to stop.
- *
- * @see #startInstancesInRegion
- * @see #runInstancesInRegion
- * @see #describeInstancesInRegion
- * @see #terminateInstancesInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-StopInstances.html"
- * />
- */
- @Named("StopInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "StopInstances")
- @XMLResponseParser(InstanceStateChangeHandler.class)
- Set<? extends InstanceStateChange> stopInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("Force") boolean force,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- * Starts an instance that uses an Amazon EBS volume as its root device.
- * <p/>
- * Instances that use Amazon EBS volumes as their root devices can be quickly
- * stopped and started. When an instance is stopped, the compute resources
- * are released and you are not billed for hourly instance usage. However,
- * your root partition Amazon EBS volume remains, continues to persist your
- * data, and you are charged for Amazon EBS volume usage. You can restart
- * your instance at any time.
- * <h3>Note</h3>
- * Before stopping an instance, make sure it is in a state from which it can
- * be restarted. Stopping an instance does not preserve data stored in RAM.
- * <p/>
- * Performing this operation on an instance that uses an instance store as
- * its root device returns an error.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceIds
- * Instance ID to start.
- *
- * @see #stopInstancesInRegion
- * @see #runInstancesInRegion
- * @see #describeInstancesInRegion
- * @see #terminateInstancesInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-StartInstances.html"
- * />
- */
- @Named("StartInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "StartInstances")
- @XMLResponseParser(InstanceStateChangeHandler.class)
- Set<? extends InstanceStateChange> startInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to describe the attribute of
- * @return unencoded user data
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "userData" })
- @XMLResponseParser(UnencodeStringValueHandler.class)
- String getUserDataForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to describe the attribute of
- * @return The root device name (e.g., /dev/sda1).
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "rootDeviceName" })
- @XMLResponseParser(StringValueHandler.class)
- String getRootDeviceNameForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to describe the attribute of
- * @return the ID of the RAM disk associated with the AMI.
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "ramdisk" })
- @XMLResponseParser(StringValueHandler.class)
- String getRamdiskForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to describe the attribute of
- * @return the ID of the kernel associated with the AMI.
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "kernel" })
- @XMLResponseParser(StringValueHandler.class)
- String getKernelForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to describe the attribute of
- * @return Specifies whether the instance can be terminated using the APIs.
- * You must modify this attribute before you can terminate any
- * "locked" instances from the APIs.
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "disableApiTermination" })
- @XMLResponseParser(BooleanValueHandler.class)
- boolean isApiTerminationDisabledForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to describe the attribute of
- * @return The instance type of the instance.
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "instanceType" })
- @XMLResponseParser(InstanceTypeHandler.class)
- String getInstanceTypeForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to describe the attribute of
- * @return whether the instance's Amazon EBS volumes are stopped or
- * terminated when the instance is shut down.
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute",
- "instanceInitiatedShutdownBehavior" })
- @XMLResponseParser(InstanceInitiatedShutdownBehaviorHandler.class)
- InstanceInitiatedShutdownBehavior getInstanceInitiatedShutdownBehaviorForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to describe the attribute of
- * @return Describes the mapping that defines native device names to use when
- * exposing virtual devices.
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "blockDeviceMapping" })
- @XMLResponseParser(BlockDeviceMappingHandler.class)
- Map<String, BlockDevice> getBlockDeviceMappingForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * Resets an attribute of an instance to its default value.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to reset the attribute of
- * @return the ID of the RAM disk associated with the AMI.
- */
- @Named("ResetInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ResetInstanceAttribute", "ramdisk" })
- void resetRamdiskForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * Resets an attribute of an instance to its default value.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to reset the attribute of
- * @return the ID of the kernel associated with the AMI.
- */
- @Named("ResetInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ResetInstanceAttribute", "kernel" })
- void resetKernelForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * Sets the userData used for starting the instance.
- * <p/>
- * The instance needs to be in a {@link InstanceState#STOPPED} state, which
- * implies two things:
- * <ol>
- * <li>The instance was launched from an EBS-backed AMI so that it can stop</li>
- * <li>You have stopped and waited for the instance to transition from
- * {@link InstanceState#STOPPING} to {@link InstanceState#STOPPED}</li>
- * </ol>
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to change the attribute of
- * @param unencodedData
- * unencoded data to set as userData
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html"
- * />
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "userData" })
- void setUserDataForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId,
- @FormParam("Value") @ParamParser(ConvertUnencodedBytesToBase64EncodedString.class) byte[] unencodedData);
-
- /**
- * Sets the ramdisk used for starting the instance.
- * <p/>
- * The instance needs to be in a {@link InstanceState#STOPPED} state, which
- * implies two things:
- * <ol>
- * <li>The instance was launched from an EBS-backed AMI so that it can stop</li>
- * <li>You have stopped and waited for the instance to transition from
- * {@link InstanceState#STOPPING} to {@link InstanceState#STOPPED}</li>
- * </ol>
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to change the attribute of
- * @param ramdisk
- * ramdisk used to start the instance
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html"
- * />
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "ramdisk" })
- void setRamdiskForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId, @FormParam("Value") String ramdisk);
-
- /**
- * Sets the kernelId used for starting the instance.
- * <p/>
- * The instance needs to be in a {@link InstanceState#STOPPED} state, which
- * implies two things:
- * <ol>
- * <li>The instance was launched from an EBS-backed AMI so that it can stop</li>
- * <li>You have stopped and waited for the instance to transition from
- * {@link InstanceState#STOPPING} to {@link InstanceState#STOPPED}</li>
- * </ol>
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to change the attribute of
- * @param kernel
- * kernelId used to start the instance
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html"
- * />
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "kernel" })
- void setKernelForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId, @FormParam("Value") String kernel);
-
- /**
- * This command works while the instance is running and controls whether or
- * not the api can be used to terminate the instance.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to reset the attribute of
- * @param apiTerminationDisabled
- * true to disable api termination
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html"
- * />
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "disableApiTermination" })
- void setApiTerminationDisabledForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId, @FormParam("Value") boolean apiTerminationDisabled);
-
- /**
- * Sets the instanceType used for starting the instance.
- * <p/>
- * The instance needs to be in a {@link InstanceState#STOPPED} state, which
- * implies two things:
- * <ol>
- * <li>The instance was launched from an EBS-backed AMI so that it can stop</li>
- * <li>You have stopped and waited for the instance to transition from
- * {@link InstanceState#STOPPING} to {@link InstanceState#STOPPED}</li>
- * </ol>
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to change the attribute of
- * @param instanceType
- * instanceType used to start the instance
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html"
- * />
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "instanceType" })
- void setInstanceTypeForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId, @FormParam("Value") String instanceType);
-
- /**
- * Specifies whether the instance's Amazon EBS volumes are stopped or
- * terminated when the instance is shut down.
- * <p/>
- * The instance needs to be in a {@link InstanceState#STOPPED} state, which
- * implies two things:
- * <ol>
- * <li>The instance was launched from an EBS-backed AMI so that it can stop</li>
- * <li>You have stopped and waited for the instance to transition from
- * {@link InstanceState#STOPPING} to {@link InstanceState#STOPPED}</li>
- * </ol>
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to change the attribute of
- * @param instanceInitiatedShutdownBehavior
- * whether the instance's Amazon EBS volumes are stopped or
- * terminated when the instance is shut down.
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html"
- * />
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute",
- "instanceInitiatedShutdownBehavior" })
- void setInstanceInitiatedShutdownBehaviorForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId,
- @FormParam("Value") InstanceInitiatedShutdownBehavior instanceInitiatedShutdownBehavior);
-
- /**
- * Sets the blockDeviceMapping used for an instance.
- * <p/>
- * The instance needs to be in a {@link InstanceState#STOPPED} state, which
- * implies two things:
- * <ol>
- * <li>The instance was launched from an EBS-backed AMI so that it can stop</li>
- * <li>You have stopped and waited for the instance to transition from
- * {@link InstanceState#STOPPING} to {@link InstanceState#STOPPED}</li>
- * </ol>
- *
- * To create the instances of {@link BlockDevice}, the
- * constructor can be used with the following parameters:
- * {@link BlockDevice#EbsBlockDevice(String, String, boolean)}
- * , that are:
- * <ol>
- * <li>Volume id (required), for instance, "vol-blah"</li>
- * <li>Device name (optional), for instance, "/dev/sda1". To find out more
- * about device names, read the next paragraph.</li>
- * <li>Delete on termination flag (optional), which defines whether the
- * volume will be deleted upon instance's termination.</li>
- * </ol>
- * <p/>
- * Note that the device names between Linux and Windows differ. For Linux,
- * ensure that your device name is in the form /dev/sd[a-z] . For example,
- * /dev/sda , /dev/sdb and /dev/sdh are all valid device names.
- * <p/>
- * For Windows, the root device is still referred to as /dev/sda1 . For other
- * devices, ensure that they are in the form /xvd[c-p] . For example, /xvde ,
- * /xvdf and /xvdp are all valid Windows device names.
- * <p/>
- * <b>NOTE</b>: As of now 02/20/2010, this command only works to change the
- * DeleteOnTermination property of the device. The volume must be
- * <i>attached</i> to a stopped instance.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to change the attribute of
- * @param blockDeviceMapping
- * blockDeviceMapping used to start the instance
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyInstanceAttribute.html"
- * />
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION }, values = { "ModifyInstanceAttribute" })
- void setBlockDeviceMappingForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId,
- @BinderParam(BindBlockDeviceMappingToIndexedFormParams.class) Map<String, BlockDevice> blockDeviceMapping);
-
- /**
- * Retrieves console output for the specified instance.
- *
- * Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves
- * the most recent 64 KB output which will be available for at least one hour after the most recent post.
- *
- * @param region
- * Instances are tied to Availability Zones. However, the instance
- * ID is tied to the Region.
- * @param instanceId
- * which instance to retrieve console output for
- * @return The console output
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-GetConsoleOutput.html">
- * ApiReference query GetConsoleOutput</a>
- */
- @Named("GetConsoleOutput")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION }, values = { "GetConsoleOutput" })
- @XMLResponseParser(GetConsoleOutputResponseHandler.class)
- String getConsoleOutputForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/397d9926/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/KeyPairApi.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/KeyPairApi.java b/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/KeyPairApi.java
deleted file mode 100644
index c10f3eb..0000000
--- a/dependencies/jclouds/apis/ec2/1.7.1-stratos/src/main/java/org/jclouds/ec2/features/KeyPairApi.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.ec2.features;
-
-import static org.jclouds.aws.reference.FormParameters.ACTION;
-
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.FormParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.aws.filters.FormSigner;
-import org.jclouds.ec2.binders.BindFiltersToIndexedFormParams;
-import org.jclouds.ec2.binders.BindKeyNamesToIndexedFormParams;
-import org.jclouds.ec2.domain.KeyPair;
-import org.jclouds.ec2.xml.DescribeKeyPairsResponseHandler;
-import org.jclouds.ec2.xml.KeyPairResponseHandler;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.FormParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.VirtualHost;
-import org.jclouds.rest.annotations.XMLResponseParser;
-
-import com.google.common.collect.Multimap;
-
-/**
- * Provides access to EC2 via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-@RequestFilters(FormSigner.class)
-@VirtualHost
-public interface KeyPairApi {
-
- /**
- * Creates a new 2048-bit RSA key pair with the specified name. The public key is stored by
- * Amazon EC2 and the private key is displayed on the console. The private key is returned as an
- * unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists,
- * Amazon EC2 returns an error.
- *
- * @param region
- * Key pairs (to connect to instances) are Region-specific.
- * @param keyName
- * A unique name for the key pair.
- *
- * @see #runInstances
- * @see #describeKeyPairs
- * @see #deleteKeyPair
- *
- * @see <a href=
- * "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateKeyPair.html"
- * />
- */
- @Named("CreateKeyPair")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "CreateKeyPair")
- @XMLResponseParser(KeyPairResponseHandler.class)
- KeyPair createKeyPairInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("KeyName") String keyName);
-
- /**
- * Returns information about key pairs available to you. If you specify key pairs, information
- * about those key pairs is returned. Otherwise, information for all registered key pairs is
- * returned.
- *
- * @param region
- * Key pairs (to connect to instances) are Region-specific.
- * @param keyPairNames
- * Key pairs to describe.
- *
- * @see #runInstances
- * @see #describeAvailabilityZones
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeKeyPairs.html"
- * />
- */
- @Named("DescribeKeyPairs")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeKeyPairs")
- @XMLResponseParser(DescribeKeyPairsResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- Set<KeyPair> describeKeyPairsInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindKeyNamesToIndexedFormParams.class) String... keyPairNames);
-
- /**
- * Returns information about key pairs available to you. If you specify filters,
- * information about keypairs matching those filters is returned. Otherwise, all
- * keypairs you have access to are returned.
- *
- * @param region
- * Key pairs (to connect to instances) are Region-specific.
- * @param filter
- * Multimap of filter key/values.
- *
- * @see #runInstances
- * @see #describeAvailabilityZones
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeKeyPairs.html"
- * />
- */
- @Named("DescribeKeyPairs")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeKeyPairs")
- @XMLResponseParser(DescribeKeyPairsResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- Set<KeyPair> describeKeyPairsInRegionWithFilter(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindFiltersToIndexedFormParams.class) Multimap<String, String> filter);
-
- /**
- * Deletes the specified key pair, by removing the public key from Amazon EC2. You must own the
- * key pair
- *
- * @param region
- * Key pairs (to connect to instances) are Region-specific.
- * @param keyName
- * Name of the key pair to delete
- *
- * @see #describeKeyPairs
- * @see #createKeyPair
- *
- * @see <a href=
- * "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteKeyPair.html"
- * />
- */
- @Named("DeleteKeyPair")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DeleteKeyPair")
- void deleteKeyPairInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("KeyName") String keyName);
-
-}