You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ab...@apache.org on 2013/07/01 21:13:21 UTC
[16/20] JCLOUDS-150 - Removal of async from AWS - specifically EC2
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceAsyncClient.java
deleted file mode 100644
index 0a1968d..0000000
--- a/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceAsyncClient.java
+++ /dev/null
@@ -1,361 +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.services;
-
-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.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.VirtualHost;
-import org.jclouds.rest.annotations.XMLResponseParser;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * Provides access to EC2 Instance Services via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-@RequestFilters(FormSigner.class)
-@VirtualHost
-public interface InstanceAsyncClient {
-
- /**
- * @see InstanceClient#describeInstancesInRegion
- */
- @Named("DescribeInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeInstances")
- @XMLResponseParser(DescribeInstancesResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<? extends Set<? extends Reservation<? extends RunningInstance>>> describeInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- * @see InstanceClient#runInstancesInRegion
- */
- @Named("RunInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "RunInstances")
- @XMLResponseParser(RunInstancesResponseHandler.class)
- ListenableFuture<? extends 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);
-
- /**
- * @see InstanceClient#rebootInstancesInRegion
- */
- @Named("RebootInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "RebootInstances")
- ListenableFuture<Void> rebootInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- * @see InstanceClient#terminateInstancesInRegion
- */
- @Named("TerminateInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "TerminateInstances")
- @XMLResponseParser(InstanceStateChangeHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<Set<? extends InstanceStateChange>> terminateInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- * @see InstanceClient#stopInstancesInRegion
- */
- @Named("StopInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "StopInstances")
- @XMLResponseParser(InstanceStateChangeHandler.class)
- ListenableFuture<Set<? extends InstanceStateChange>> stopInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("Force") boolean force,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- * @see InstanceClient#startInstancesInRegion
- */
- @Named("StartInstances")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "StartInstances")
- @XMLResponseParser(InstanceStateChangeHandler.class)
- ListenableFuture<Set<? extends InstanceStateChange>> startInstancesInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindInstanceIdsToIndexedFormParams.class) String... instanceIds);
-
- /**
- * @see AMIClient#getUserDataForInstanceInRegion
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "userData" })
- @XMLResponseParser(UnencodeStringValueHandler.class)
- ListenableFuture<String> getUserDataForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see AMIClient#getRootDeviceNameForInstanceInRegion
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "rootDeviceName" })
- @XMLResponseParser(StringValueHandler.class)
- ListenableFuture<String> getRootDeviceNameForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see AMIClient#getRamdiskForInstanceInRegion
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "ramdisk" })
- @XMLResponseParser(StringValueHandler.class)
- ListenableFuture<String> getRamdiskForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see AMIClient#getKernelForInstanceInRegion
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "kernel" })
- @XMLResponseParser(StringValueHandler.class)
- ListenableFuture<String> getKernelForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see AMIClient#isApiTerminationDisabledForInstanceInRegion
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "disableApiTermination" })
- @XMLResponseParser(BooleanValueHandler.class)
- ListenableFuture<Boolean> isApiTerminationDisabledForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see AMIClient#getInstanceTypeForInstanceInRegion
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "instanceType" })
- @XMLResponseParser(InstanceTypeHandler.class)
- ListenableFuture<String> getInstanceTypeForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see AMIClient#getInstanceInitiatedShutdownBehaviorForInstanceInRegion
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute",
- "instanceInitiatedShutdownBehavior" })
- @XMLResponseParser(InstanceInitiatedShutdownBehaviorHandler.class)
- ListenableFuture<InstanceInitiatedShutdownBehavior> getInstanceInitiatedShutdownBehaviorForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see InstanceClient#getBlockDeviceMappingForInstanceInRegion
- */
- @Named("DescribeInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "DescribeInstanceAttribute", "blockDeviceMapping" })
- @XMLResponseParser(BlockDeviceMappingHandler.class)
- ListenableFuture<? extends Map<String, BlockDevice>> getBlockDeviceMappingForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see AMIClient#resetRamdiskForInstanceInRegion
- */
- @Named("ResetInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ResetInstanceAttribute", "ramdisk" })
- ListenableFuture<Void> resetRamdiskForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see AMIClient#resetKernelForInstanceInRegion
- */
- @Named("ResetInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ResetInstanceAttribute", "kernel" })
- ListenableFuture<Void> resetKernelForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
- /**
- * @see AMIClient#setUserDataForInstanceInRegion
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "userData" })
- ListenableFuture<Void> setUserDataForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId,
- @FormParam("Value") @ParamParser(ConvertUnencodedBytesToBase64EncodedString.class) byte[] unencodedData);
-
- /**
- * @see AMIClient#setRamdiskForInstanceInRegion
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "ramdisk" })
- ListenableFuture<Void> setRamdiskForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId, @FormParam("Value") String ramdisk);
-
- /**
- * @see AMIClient#setKernelForInstanceInRegion
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "kernel" })
- ListenableFuture<Void> setKernelForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId, @FormParam("Value") String kernel);
-
- /**
- * @see AMIClient#setApiTerminationDisabledForInstanceInRegion
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "disableApiTermination" })
- ListenableFuture<Void> setApiTerminationDisabledForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId, @FormParam("Value") boolean apiTerminationDisabled);
-
- /**
- * @see AMIClient#setInstanceTypeForInstanceInRegion
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute", "instanceType" })
- ListenableFuture<Void> setInstanceTypeForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId, @FormParam("Value") String instanceType);
-
- /**
- * @see AMIClient#setInstanceInitiatedShutdownBehaviorForInstanceInRegion
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION, "Attribute" }, values = { "ModifyInstanceAttribute",
- "instanceInitiatedShutdownBehavior" })
- ListenableFuture<Void> setInstanceInitiatedShutdownBehaviorForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId,
- @FormParam("Value") InstanceInitiatedShutdownBehavior instanceInitiatedShutdownBehavior);
-
- /**
- * @see InstanceClient#setBlockDeviceMappingForInstanceInRegion
- */
- @Named("ModifyInstanceAttribute")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION }, values = { "ModifyInstanceAttribute" })
- ListenableFuture<Void> setBlockDeviceMappingForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId,
- @BinderParam(BindBlockDeviceMappingToIndexedFormParams.class) Map<String, BlockDevice> blockDeviceMapping);
-
- /**
- * @see InstanceClient#getConsoleOutputForInstanceInRegion(String, String)
- */
- @Named("GetConsoleOutput")
- @POST
- @Path("/")
- @FormParams(keys = { ACTION }, values = { "GetConsoleOutput" })
- @XMLResponseParser(GetConsoleOutputResponseHandler.class)
- ListenableFuture<String> getConsoleOutputForInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java
deleted file mode 100644
index 2bd6e26..0000000
--- a/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java
+++ /dev/null
@@ -1,587 +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.services;
-
-import java.util.Map;
-import java.util.Set;
-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.options.RunInstancesOptions;
-import org.jclouds.javax.annotation.Nullable;
-
-/**
- * Provides access to EC2 via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-public interface InstanceClient {
-
- /**
- * 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"
- * />
- */
- Set<? extends Reservation<? extends RunningInstance>> describeInstancesInRegion(@Nullable String region,
- String... instanceIds);
-
- /**
- * 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
- */
- Reservation<? extends RunningInstance> runInstancesInRegion(@Nullable String region,
- @Nullable String nullableAvailabilityZone, String imageId,
- int minCount, int maxCount, RunInstancesOptions... options);
-
- /**
- * 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"
- * />
- */
- Set<? extends InstanceStateChange> terminateInstancesInRegion(@Nullable String region,
- 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"
- * />
- */
- Set<? extends InstanceStateChange> stopInstancesInRegion(@Nullable String region,
- boolean force, String... instanceIds);
-
- /**
- * 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"
- * />
- */
- void rebootInstancesInRegion(@Nullable String region, 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"
- * />
- */
- Set<? extends InstanceStateChange> startInstancesInRegion(@Nullable String region,
- 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
- */
- String getUserDataForInstanceInRegion(@Nullable String region,
- 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).
- */
- String getRootDeviceNameForInstanceInRegion(@Nullable String region,
- 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.
- */
- String getRamdiskForInstanceInRegion(@Nullable String region,
- 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.
- */
- String getKernelForInstanceInRegion(@Nullable String region,
- 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.
- */
- boolean isApiTerminationDisabledForInstanceInRegion(@Nullable String region,
- 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.
- */
- String getInstanceTypeForInstanceInRegion(@Nullable String region,
- 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.
- */
- InstanceInitiatedShutdownBehavior getInstanceInitiatedShutdownBehaviorForInstanceInRegion(
- String region, 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.
- */
- Map<String, BlockDevice> getBlockDeviceMappingForInstanceInRegion(
- @Nullable String region, 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.
- */
- String resetRamdiskForInstanceInRegion(@Nullable String region,
- 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.
- */
- String resetKernelForInstanceInRegion(@Nullable String region,
- 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"
- * />
- */
- void setUserDataForInstanceInRegion(@Nullable String region,
- String instanceId, 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"
- * />
- */
- void setRamdiskForInstanceInRegion(@Nullable String region,
- String instanceId, 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"
- * />
- */
- void setKernelForInstanceInRegion(@Nullable String region,
- String instanceId, 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"
- * />
- */
- void setApiTerminationDisabledForInstanceInRegion(@Nullable String region,
- String instanceId, 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"
- * />
- */
- void setInstanceTypeForInstanceInRegion(@Nullable String region,
- String instanceId, 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"
- * />
- */
- void setInstanceInitiatedShutdownBehaviorForInstanceInRegion(
- @Nullable String region, String instanceId,
- 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"
- * />
- */
- void setBlockDeviceMappingForInstanceInRegion(@Nullable String region,
- String instanceId, 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>
- */
- String getConsoleOutputForInstanceInRegion(@Nullable String region,
- String instanceId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairAsyncClient.java
deleted file mode 100644
index 48e0059..0000000
--- a/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairAsyncClient.java
+++ /dev/null
@@ -1,92 +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.services;
-
-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.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.util.concurrent.ListenableFuture;
-
-/**
- * Provides access to EC2 via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-@RequestFilters(FormSigner.class)
-@VirtualHost
-public interface KeyPairAsyncClient {
-
- /**
- * @see KeyPairClient#createKeyPairInRegion
- */
- @Named("CreateKeyPair")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "CreateKeyPair")
- @XMLResponseParser(KeyPairResponseHandler.class)
- ListenableFuture<KeyPair> createKeyPairInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("KeyName") String keyName);
-
- /**
- * @see KeyPairClient#describeKeyPairsInRegion
- */
- @Named("DescribeKeyPairs")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeKeyPairs")
- @XMLResponseParser(DescribeKeyPairsResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<? extends Set<KeyPair>> describeKeyPairsInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindKeyNamesToIndexedFormParams.class) String... keyPairNames);
-
- /**
- * @see KeyPairClient#deleteKeyPairInRegion
- */
- @Named("DeleteKeyPair")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DeleteKeyPair")
- ListenableFuture<Void> deleteKeyPairInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("KeyName") String keyName);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java
deleted file mode 100644
index 0210f9d..0000000
--- a/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java
+++ /dev/null
@@ -1,87 +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.services;
-
-import java.util.Set;
-import org.jclouds.ec2.domain.KeyPair;
-import org.jclouds.javax.annotation.Nullable;
-
-/**
- * Provides access to EC2 via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-public interface KeyPairClient {
-
- /**
- * 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"
- * />
- */
- KeyPair createKeyPairInRegion(@Nullable String region, 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"
- * />
- */
- Set<KeyPair> describeKeyPairsInRegion(@Nullable String region, String... keyPairNames);
-
- /**
- * 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"
- * />
- */
- void deleteKeyPairInRegion(@Nullable String region, String keyName);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupAsyncClient.java
deleted file mode 100644
index 0de10f9..0000000
--- a/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupAsyncClient.java
+++ /dev/null
@@ -1,145 +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.services;
-
-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.Fallbacks.VoidOnNotFoundOr404;
-import org.jclouds.aws.filters.FormSigner;
-import org.jclouds.ec2.binders.BindGroupNamesToIndexedFormParams;
-import org.jclouds.ec2.binders.BindUserIdGroupPairToSourceSecurityGroupFormParams;
-import org.jclouds.ec2.domain.SecurityGroup;
-import org.jclouds.ec2.domain.UserIdGroupPair;
-import org.jclouds.ec2.xml.DescribeSecurityGroupsResponseHandler;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull;
-import org.jclouds.net.domain.IpProtocol;
-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.util.concurrent.ListenableFuture;
-
-/**
- * Provides access to EC2 via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-@RequestFilters(FormSigner.class)
-@VirtualHost
-public interface SecurityGroupAsyncClient {
-
- /**
- * @see SecurityGroupClient#createSecurityGroupInRegion
- */
- @Named("CreateSecurityGroup")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "CreateSecurityGroup")
- ListenableFuture<Void> createSecurityGroupInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("GroupName") String name, @FormParam("GroupDescription") String description);
-
- /**
- * @see SecurityGroupClient#deleteSecurityGroupInRegion
- */
- @Named("DeleteSecurityGroup")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DeleteSecurityGroup")
- @Fallback(VoidOnNotFoundOr404.class)
- ListenableFuture<Void> deleteSecurityGroupInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region, @FormParam("GroupName") String name);
-
- /**
- * @see SecurityGroupClient#describeSecurityGroupsInRegion
- */
- @Named("DescribeSecurityGroups")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeSecurityGroups")
- @XMLResponseParser(DescribeSecurityGroupsResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<? extends Set<SecurityGroup>> describeSecurityGroupsInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindGroupNamesToIndexedFormParams.class) String... securityGroupNames);
-
- /**
- * @see SecurityGroupClient#authorizeSecurityGroupIngressInRegion(@ org.jclouds.javax.annotation.Nullable Region,
- * String,UserIdGroupPair)
- */
- @Named("AuthorizeSecurityGroupIngress")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "AuthorizeSecurityGroupIngress")
- ListenableFuture<Void> authorizeSecurityGroupIngressInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("GroupName") String groupName,
- @BinderParam(BindUserIdGroupPairToSourceSecurityGroupFormParams.class) UserIdGroupPair sourceSecurityGroup);
-
- /**
- * @see SecurityGroupClient#authorizeSecurityGroupIngressInRegion(@ org.jclouds.javax.annotation.Nullable Region,
- * String,IpProtocol,int,int,String)
- */
- @Named("AuthorizeSecurityGroupIngress")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "AuthorizeSecurityGroupIngress")
- ListenableFuture<Void> authorizeSecurityGroupIngressInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("GroupName") String groupName, @FormParam("IpProtocol") IpProtocol ipProtocol,
- @FormParam("FromPort") int fromPort, @FormParam("ToPort") int toPort, @FormParam("CidrIp") String cidrIp);
-
- /**
- * @see SecurityGroupClient#revokeSecurityGroupIngressInRegion(@Nullable Region,
- * String,UserIdGroupPair)
- */
- @Named("RevokeSecurityGroupIngress")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "RevokeSecurityGroupIngress")
- ListenableFuture<Void> revokeSecurityGroupIngressInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("GroupName") String groupName,
- @BinderParam(BindUserIdGroupPairToSourceSecurityGroupFormParams.class) UserIdGroupPair sourceSecurityGroup);
-
- /**
- * @see SecurityGroupClient#revokeSecurityGroupIngressInRegion(@ org.jclouds.javax.annotation.Nullable Region,
- * String,IpProtocol,int,int,String)
- */
- @Named("RevokeSecurityGroupIngress")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "RevokeSecurityGroupIngress")
- ListenableFuture<Void> revokeSecurityGroupIngressInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("GroupName") String groupName, @FormParam("IpProtocol") IpProtocol ipProtocol,
- @FormParam("FromPort") int fromPort, @FormParam("ToPort") int toPort, @FormParam("CidrIp") String cidrIp);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java
deleted file mode 100644
index 23c8272..0000000
--- a/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java
+++ /dev/null
@@ -1,226 +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.services;
-
-import java.util.Set;
-import org.jclouds.ec2.domain.SecurityGroup;
-import org.jclouds.ec2.domain.UserIdGroupPair;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.net.domain.IpProtocol;
-
-/**
- * Provides access to EC2 via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-public interface SecurityGroupClient {
-
- /**
- * Creates a new security group. Group names must be unique per identity.
- *
- * @param region
- * Security groups are not copied across Regions. Instances within the Region cannot
- * communicate with instances outside the Region using group-based firewall rules.
- * Traffic from instances in another Region is seen as WAN bandwidth.
- * @param name
- * Name of the security group. Accepts alphanumeric characters, spaces, dashes, and
- * underscores.
- * @param description
- * Description of the group. This is informational only. If the description contains
- * spaces, you must enc lose it in single quotes (') or URL-encode it. Accepts
- * alphanumeric characters, spaces, dashes, and underscores.
- * @see #runInstances
- * @see #describeSecurityGroups
- * @see #authorizeSecurityGroupIngress
- * @see #revokeSecurityGroupIngress
- * @see #deleteSecurityGroup
- *
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSecurityGroup.html"
- * />
- */
- void createSecurityGroupInRegion(@Nullable String region, String name, String description);
-
- /**
- * Deletes a security group that you own.
- *
- * @param region
- * Security groups are not copied across Regions. Instances within the Region cannot
- * communicate with instances outside the Region using group-based firewall rules.
- * Traffic from instances in another Region is seen as WAN bandwidth.
- * @param name
- * Name of the security group to delete.
- *
- * @see #describeSecurityGroups
- * @see #authorizeSecurityGroupIngress
- * @see #revokeSecurityGroupIngress
- * @see #createSecurityGroup
- *
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSecurityGroup.html"
- * />
- */
- void deleteSecurityGroupInRegion(@Nullable String region, String name);
-
- /**
- * Returns information about security groups that you own.
- *
- * @param region
- * Security groups are not copied across Regions. Instances within the Region cannot
- * communicate with instances outside the Region using group-based firewall rules.
- * Traffic from instances in another Region is seen as WAN bandwidth.
- * @param securityGroupNames
- * Name of the security groups
- *
- * @see #createSecurityGroup
- * @see #authorizeSecurityGroupIngress
- * @see #revokeSecurityGroupIngress
- * @see #deleteSecurityGroup
- *
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSecurityGroups.html"
- * />
- */
- Set<SecurityGroup> describeSecurityGroupsInRegion(@Nullable String region,
- String... securityGroupNames);
-
- /**
- *
- * Adds permissions to a security group based on another group.
- *
- * @param region
- * Security groups are not copied across Regions. Instances within the Region cannot
- * communicate with instances outside the Region using group-based firewall rules.
- * Traffic from instances in another Region is seen as WAN bandwidth.
- * @param groupName
- * Name of the group to modify. The name must be valid and belong to the identity
- * @param sourceSecurityGroup
- * group to associate with this group.
- *
- * @see #createSecurityGroup
- * @see #describeSecurityGroups
- * @see #revokeSecurityGroupIngress
- * @see #deleteSecurityGroup
- *
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AuthorizeSecurityGroupIngress.html"
- *
- */
- void authorizeSecurityGroupIngressInRegion(@Nullable String region, String groupName,
- UserIdGroupPair sourceSecurityGroup);
-
- /**
- *
- * Adds permissions to a security group.
- * <p/>
- * Permissions are specified by the IP protocol (TCP, UDP or ICMP), the source of the request (by
- * IP range or an Amazon EC2 user-group pair), the source and destination port ranges (for TCP
- * and UDP), and the ICMP codes and types (for ICMP). When authorizing ICMP, -1 can be used as a
- * wildcard in the type and code fields. Permission changes are propagated to instances within
- * the security group as quickly as possible. However, depending on the number of instances, a
- * small delay might occur.
- *
- * @param region
- * Security groups are not copied across Regions. Instances within the Region cannot
- * communicate with instances outside the Region using group-based firewall rules.
- * Traffic from instances in another Region is seen as WAN bandwidth.
- * @param groupName
- * Name of the group to modify. The name must be valid and belong to the identity
- * @param ipProtocol
- * IP protocol.
- * @param fromPort
- * Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP
- * type number of -1 indicates a wildcard (i.e., any ICMP type number).
- * @param toPort
- * End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1
- * indicates a wildcard (i.e., any ICMP code).
- * @param cidrIp
- * CIDR range.
- *
- * @see #createSecurityGroup
- * @see #describeSecurityGroups
- * @see #revokeSecurityGroupIngress
- * @see #deleteSecurityGroup
- *
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AuthorizeSecurityGroupIngress.html"
- *
- */
- void authorizeSecurityGroupIngressInRegion(@Nullable String region, String groupName,
- IpProtocol ipProtocol, int fromPort, int toPort, String cidrIp);
-
- /**
- *
- * Revokes permissions from a security group. The permissions used to revoke must be specified
- * using the same values used to grant the permissions.
- *
- * @param region
- * Security groups are not copied across Regions. Instances within the Region cannot
- * communicate with instances outside the Region using group-based firewall rules.
- * Traffic from instances in another Region is seen as WAN bandwidth.
- * @param groupName
- * Name of the group to modify. The name must be valid and belong to the identity
- * @param sourceSecurityGroup
- * group to associate with this group.
- *
- * @see #createSecurityGroup
- * @see #describeSecurityGroups
- * @see #authorizeSecurityGroupIngress
- * @see #deleteSecurityGroup
- *
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RevokeSecurityGroupIngress.html"
- *
- */
- void revokeSecurityGroupIngressInRegion(@Nullable String region, String groupName,
- UserIdGroupPair sourceSecurityGroup);
-
- /**
- *
- * Revokes permissions from a security group. The permissions used to revoke must be specified
- * using the same values used to grant the permissions.
- * <p/>
- * Permissions are specified by IP protocol (TCP, UDP, or ICMP), the source of the request (by IP
- * range or an Amazon EC2 user-group pair), the source and destination port ranges (for TCP and
- * UDP), and the ICMP codes and types (for ICMP).
- *
- * Permission changes are quickly propagated to instances within the security group. However,
- * depending on the number of instances in the group, a small delay is might occur.
- *
- * @param region
- * Security groups are not copied across Regions. Instances within the Region cannot
- * communicate with instances outside the Region using group-based firewall rules.
- * Traffic from instances in another Region is seen as WAN bandwidth.
- * @param groupName
- * Name of the group to modify. The name must be valid and belong to the identity
- * @param ipProtocol
- * IP protocol.
- * @param fromPort
- * Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP
- * type number of -1 indicates a wildcard (i.e., any ICMP type number).
- * @param toPort
- * End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1
- * indicates a wildcard (i.e., any ICMP code).
- * @param cidrIp
- * CIDR range.
- *
- * @see #createSecurityGroup
- * @see #describeSecurityGroups
- * @see #authorizeSecurityGroupIngress
- * @see #deleteSecurityGroup
- *
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RevokeSecurityGroupIngress.html"
- *
- */
- void revokeSecurityGroupIngressInRegion(@Nullable String region, String groupName, IpProtocol ipProtocol,
- int fromPort, int toPort, String cidrIp);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsAsyncClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsAsyncClient.java
deleted file mode 100644
index 70d2cc8..0000000
--- a/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsAsyncClient.java
+++ /dev/null
@@ -1,112 +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.services;
-
-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.BindBundleIdsToIndexedFormParams;
-import org.jclouds.ec2.binders.BindS3UploadPolicyAndSignature;
-import org.jclouds.ec2.domain.BundleTask;
-import org.jclouds.ec2.domain.PasswordData;
-import org.jclouds.ec2.options.BundleInstanceS3StorageOptions;
-import org.jclouds.ec2.xml.BundleTaskHandler;
-import org.jclouds.ec2.xml.DescribeBundleTasksResponseHandler;
-import org.jclouds.ec2.xml.GetPasswordDataResponseHandler;
-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.util.concurrent.ListenableFuture;
-
-/**
- * Provides access to EC2 Windows via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- */
-@RequestFilters(FormSigner.class)
-@VirtualHost
-public interface WindowsAsyncClient {
-
- /**
- * @see WindowsClient#bundleInstanceInRegion
- */
- @Named("BundleInstance")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "BundleInstance")
- @XMLResponseParser(BundleTaskHandler.class)
- ListenableFuture<BundleTask> bundleInstanceInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId, @FormParam("Storage.S3.Prefix") String prefix,
- @FormParam("Storage.S3.Bucket") String bucket,
- @BinderParam(BindS3UploadPolicyAndSignature.class) String uploadPolicy,
- BundleInstanceS3StorageOptions... options);
-
- /**
- * @see WindowsClient#cancelBundleTaskInRegion
- */
- @Named("CancelBundleTask")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "CancelBundleTask")
- @XMLResponseParser(BundleTaskHandler.class)
- ListenableFuture<BundleTask> cancelBundleTaskInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("BundleId") String bundleId);
-
- /**
- * @see BundleTaskClient#describeBundleTasksInRegion
- */
- @Named("DescribeBundleTasks")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "DescribeBundleTasks")
- @XMLResponseParser(DescribeBundleTasksResponseHandler.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<? extends Set<BundleTask>> describeBundleTasksInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @BinderParam(BindBundleIdsToIndexedFormParams.class) String... bundleTaskIds);
-
- /**
- * @see WindowsClient#getPasswordDataInRegion
- */
- @Named("GetPasswordData")
- @POST
- @Path("/")
- @FormParams(keys = ACTION, values = "GetPasswordData")
- @XMLResponseParser(GetPasswordDataResponseHandler.class)
- ListenableFuture<PasswordData> getPasswordDataInRegion(
- @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
- @FormParam("InstanceId") String instanceId);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java
deleted file mode 100644
index e03320a..0000000
--- a/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java
+++ /dev/null
@@ -1,116 +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.services;
-
-import java.util.Set;
-import org.jclouds.ec2.domain.BundleTask;
-import org.jclouds.ec2.domain.PasswordData;
-import org.jclouds.ec2.options.BundleInstanceS3StorageOptions;
-import org.jclouds.javax.annotation.Nullable;
-
-/**
- * Provides windows services for EC2. For more information, refer to the Amazon
- * EC2 Developer Guide.
- * <p/>
- *
- * @author Adrian Cole
- */
-public interface WindowsClient {
- /**
- * Bundles the Windows instance. This procedure is not applicable for Linux
- * and UNIX instances. For more information, go to the Amazon Elastic Compute
- * Cloud Developer Guide or Amazon Elastic Compute Cloud Getting Started
- * Guide.
- *
- * @param region
- * Bundles are tied to the Region where its files are located
- * within Amazon S3.
- *
- * @param instanceId
- * The ID of the instance to bundle.
- * @param prefix
- * Specifies the beginning of the file name of the AMI.
- * @param bucket
- * The bucket in which to store the AMI. You can specify a bucket
- * that you already own or a new bucket that Amazon EC2 creates on
- * your behalf. If you specify a bucket that belongs to someone
- * else, Amazon EC2 returns an error.
- * @param uploadPolicy
- * An Amazon S3 upload policy that gives Amazon EC2 permission to
- * upload items into Amazon S3 on the user's behalf.
- * <p/>
- * ex.
- *
- * <pre>
- * {"expiration": "2008-08-30T08:49:09Z","conditions": ["bucket": "my-bucket"},["starts-with", "$key", "my-new-image"]]}
- * </pre>
- *
- * @param options
- * if the bucket isn't owned by you, use this to set the bucket's
- * accesskeyid
- * @return status of the work
- *
- * @see #cancelBundleTaskInRegion
- * @see #describeBundleTasksInRegion
- *
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-BundleInstance.html"
- * />
- */
- BundleTask bundleInstanceInRegion(@Nullable String region, String instanceId, String prefix, String bucket,
- String uploadPolicy, BundleInstanceS3StorageOptions... options);
-
- /**
- * Cancels an Amazon EC2 bundling operation.
- *
- * @param region
- * The bundleTask ID is tied to the Region.
- * @param bundleId
- * The ID of the bundle task to cancel.
- * @return task for the cancel.
- *
- * @see #bundleInstanceInRegion
- * @see #describeBundleTasksInRegion
- *
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CancelBundleTask.html"
- * />
- */
- BundleTask cancelBundleTaskInRegion(@Nullable String region, String bundleId);
-
- /**
- *
- * Describes current bundling tasks.
- *
- * @param region
- * The bundleTask ID is tied to the Region.
- *
- * @see #cancelBundleTaskInRegion
- * @see #bundleInstanceInRegion
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeBundleTasks.html"
- * />
- */
- Set<BundleTask> describeBundleTasksInRegion(@Nullable String region, String... bundleTaskIds);
-
- /**
- *
- * Retrieves the encrypted administrator password for the instances running Windows.
- *
- * @param region The region where the instance is based
- * @param instanceId The ID of the instance to query
- * @see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-GetPasswordData.html" />
- */
- PasswordData getPasswordDataInRegion(@Nullable String region, String instanceId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeAvailabilityZonesInRegion.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeAvailabilityZonesInRegion.java b/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeAvailabilityZonesInRegion.java
index cd7767c..f97e962 100644
--- a/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeAvailabilityZonesInRegion.java
+++ b/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeAvailabilityZonesInRegion.java
@@ -23,9 +23,9 @@ import javax.annotation.Resource;
import javax.inject.Inject;
import javax.inject.Singleton;
-import org.jclouds.ec2.EC2Client;
+import org.jclouds.ec2.EC2Api;
import org.jclouds.ec2.domain.AvailabilityZoneInfo;
-import org.jclouds.ec2.services.AvailabilityZoneAndRegionClient;
+import org.jclouds.ec2.features.AvailabilityZoneAndRegionApi;
import org.jclouds.http.HttpResponseException;
import org.jclouds.location.Region;
import org.jclouds.location.suppliers.RegionIdToZoneIdsSupplier;
@@ -45,12 +45,12 @@ public class DescribeAvailabilityZonesInRegion implements RegionIdToZoneIdsSuppl
@Resource
protected Logger logger = Logger.NULL;
- private final AvailabilityZoneAndRegionClient client;
+ private final AvailabilityZoneAndRegionApi client;
private final Supplier<Set<String>> regions;
@Inject
- public DescribeAvailabilityZonesInRegion(EC2Client client, @Region Supplier<Set<String>> regions) {
- this.client = client.getAvailabilityZoneAndRegionServices();
+ public DescribeAvailabilityZonesInRegion(EC2Api client, @Region Supplier<Set<String>> regions) {
+ this.client = client.getAvailabilityZoneAndRegionApi().get();
this.regions = regions;
}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/5f3b8d3f/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeRegionsForRegionURIs.java
----------------------------------------------------------------------
diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeRegionsForRegionURIs.java b/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeRegionsForRegionURIs.java
index 0cbaee8..d8d7a51 100644
--- a/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeRegionsForRegionURIs.java
+++ b/apis/ec2/src/main/java/org/jclouds/ec2/suppliers/DescribeRegionsForRegionURIs.java
@@ -22,8 +22,8 @@ import java.util.Map;
import javax.inject.Inject;
import javax.inject.Singleton;
-import org.jclouds.ec2.EC2Client;
-import org.jclouds.ec2.services.AvailabilityZoneAndRegionClient;
+import org.jclouds.ec2.EC2Api;
+import org.jclouds.ec2.features.AvailabilityZoneAndRegionApi;
import org.jclouds.location.Region;
import org.jclouds.location.suppliers.RegionIdToURISupplier;
import org.jclouds.util.Suppliers2;
@@ -33,11 +33,11 @@ import com.google.common.collect.Maps;
@Singleton
public class DescribeRegionsForRegionURIs implements RegionIdToURISupplier {
- private final AvailabilityZoneAndRegionClient client;
+ private final AvailabilityZoneAndRegionApi client;
@Inject
- public DescribeRegionsForRegionURIs(EC2Client client) {
- this.client = client.getAvailabilityZoneAndRegionServices();
+ public DescribeRegionsForRegionURIs(EC2Api client) {
+ this.client = client.getAvailabilityZoneAndRegionApi().get();
}
@Singleton