|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.xerox.amazonws.common.AWSConnection com.xerox.amazonws.common.AWSQueryConnection com.xerox.amazonws.ec2.AutoScaling
public class AutoScaling
A Java wrapper for the AutoScaling web services API
Field Summary |
---|
Fields inherited from class com.xerox.amazonws.common.AWSConnection |
---|
headers |
Constructor Summary | |
---|---|
AutoScaling(String awsAccessId,
String awsSecretKey)
Initializes the AutoScaling service with your AWS login information. |
|
AutoScaling(String awsAccessId,
String awsSecretKey,
boolean isSecure)
Initializes the AutoScaling service with your AWS login information. |
|
AutoScaling(String awsAccessId,
String awsSecretKey,
boolean isSecure,
String server)
Initializes the AutoScaling service with your AWS login information. |
|
AutoScaling(String awsAccessId,
String awsSecretKey,
boolean isSecure,
String server,
int port)
Initializes the AutoScaling service with your AWS login information. |
Method Summary | ||
---|---|---|
void |
createAutoScalingGroup(String autoScalingGroupName,
String launchConfigurationName,
int minSize,
int maxSize,
int cooldown,
List<String> availabilityZones)
Creates a new auto scaling group |
|
void |
createLaunchConfiguration(LaunchConfiguration config)
Create a launch configuration |
|
void |
createOrUpdateScalingTrigger(ScalingTrigger trigger)
Creates a scaling trigger, or updates an existing one |
|
void |
deleteAutoScalingGroup(String autoScalingGroupName)
Deletes a auto scaling group |
|
void |
deleteLaunchConfiguration(String configName)
Delete a launch configuration |
|
void |
deleteTrigger(String triggerName,
String autoScalingGroupName)
Deletes a trigger |
|
List<AutoScalingGroup> |
describeAutoScalingGroups(List<String> autoScalingGroupNames)
Describes one or more auto scaling groups |
|
List<LaunchConfiguration> |
describeLaunchConfigurations(List<String> configNames)
Describe the launch configurations that have been created |
|
List<Activity> |
describeScalingActivities(List<String> activityIds,
String autoScalingGroupName)
Describes the autoScaling activities for a given group. |
|
List<ScalingTrigger> |
describeTriggers(String autoScalingGroupName)
Describes the scaling triggers for a given group. |
|
protected
|
makeRequestInt(org.apache.http.client.methods.HttpRequestBase method,
String action,
Map<String,String> params,
Class<T> respType)
|
|
void |
setDesiredCapacity(String autoScalingGroupName,
int desiredCapacity)
Adjusts a auto scaling groups' capacity |
|
Activity |
terminateInstancesInAutoScalingGroup(String instanceId,
boolean shouldDecrement)
Terminates a running instance. |
|
void |
updateAutoScalingGroup(String autoScalingGroupName,
String launchConfigurationName,
int minSize,
int maxSize,
int defaultCooldown)
Update a auto scaling group |
Methods inherited from class com.xerox.amazonws.common.AWSQueryConnection |
---|
close, close, getConnectionManagerTimeout, getConnectionTimeout, getHeaders, getHttpClient, getMaxConnections, getMaxRetries, getServerTimeZone, getSoTimeout, getString, httpDate, makeRequest, setConnectionManagerTimeout, setConnectionTimeout, setHttpClient, setMaxConnections, setMaxRetries, setProxyValues, setProxyValues, setProxyValues, setServerTimeZone, setSoTimeout, useSystemProxy |
Methods inherited from class com.xerox.amazonws.common.AWSConnection |
---|
encode, encode, getAlgorithm, getAwsAccessKeyId, getPort, getResourcePrefix, getSecretAccessKey, getServer, getSignatureVersion, getUrl, isSecure, makeURL, setResourcePrefix, setServer, setSignatureVersion, urlencode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AutoScaling(String awsAccessId, String awsSecretKey)
awsAccessId
- The your user key into AWSawsSecretKey
- The secret string used to generate signatures for authentication.public AutoScaling(String awsAccessId, String awsSecretKey, boolean isSecure)
awsAccessId
- The your user key into AWSawsSecretKey
- The secret string used to generate signatures for authentication.isSecure
- True if the data should be encrypted on the wire on the way to or from EC2.public AutoScaling(String awsAccessId, String awsSecretKey, boolean isSecure, String server)
awsAccessId
- The your user key into AWSawsSecretKey
- The secret string used to generate signatures for authentication.isSecure
- True if the data should be encrypted on the wire on the way to or from EC2.server
- Which host to connect to. Usually, this will be autoscaling.amazonaws.compublic AutoScaling(String awsAccessId, String awsSecretKey, boolean isSecure, String server, int port)
awsAccessId
- The your user key into AWSawsSecretKey
- The secret string used to generate signatures for authentication.isSecure
- True if the data should be encrypted on the wire on the way to or from EC2.server
- Which host to connect to. Usually, this will be autoscaling.amazonaws.comport
- Which port to use.Method Detail |
---|
public void createLaunchConfiguration(LaunchConfiguration config) throws AutoScalingException
config
- the launch configuration
AutoScalingException
- wraps checked exceptionspublic void deleteLaunchConfiguration(String configName) throws AutoScalingException
configName
- the name of the configuration to delete
AutoScalingException
- wraps checked exceptionspublic List<LaunchConfiguration> describeLaunchConfigurations(List<String> configNames) throws AutoScalingException
configNames
- the names of the configurations to show, null for all
LaunchConfiguration
configs
AutoScalingException
- wraps checked exceptionspublic Activity terminateInstancesInAutoScalingGroup(String instanceId, boolean shouldDecrement) throws AutoScalingException
instanceId
- An instance idshouldDecrement
- true of desired capacity should be decremented at the same time
AutoScalingException
- wraps checked exceptionspublic List<Activity> describeScalingActivities(List<String> activityIds, String autoScalingGroupName) throws AutoScalingException
activityIds
- activity ids used to filter the list, null for allautoScalingGroupName
- an auto scaling group name
AutoScalingException
- wraps checked exceptionspublic void createOrUpdateScalingTrigger(ScalingTrigger trigger) throws AutoScalingException
trigger
- the information about the trigger
AutoScalingException
- wraps checked exceptionspublic void deleteTrigger(String triggerName, String autoScalingGroupName) throws AutoScalingException
triggerName
- An trigger nameautoScalingGroupName
- a autoScaling group name
AutoScalingException
- wraps checked exceptionspublic List<ScalingTrigger> describeTriggers(String autoScalingGroupName) throws AutoScalingException
autoScalingGroupName
- a autoScaling group name
AutoScalingException
- wraps checked exceptionspublic void createAutoScalingGroup(String autoScalingGroupName, String launchConfigurationName, int minSize, int maxSize, int cooldown, List<String> availabilityZones) throws AutoScalingException
autoScalingGroupName
- a autoScaling group namelaunchConfigurationName
- name of launch configuration for this groupminSize
- min number of servers in this groupmaxSize
- max number of servers in this group (must be < 1000)cooldown
- number of seconds to wait before adjusting capacityavailabilityZones
- zones for this group
AutoScalingException
- wraps checked exceptionspublic void deleteAutoScalingGroup(String autoScalingGroupName) throws AutoScalingException
autoScalingGroupName
- a autoScaling group name
AutoScalingException
- wraps checked exceptionspublic List<AutoScalingGroup> describeAutoScalingGroups(List<String> autoScalingGroupNames) throws AutoScalingException
autoScalingGroupNames
- a auto scaling group name
AutoScalingException
- wraps checked exceptionspublic void setDesiredCapacity(String autoScalingGroupName, int desiredCapacity) throws AutoScalingException
autoScalingGroupName
- a autoScaling group namedesiredCapacity
- the new capacity setting
AutoScalingException
- wraps checked exceptionspublic void updateAutoScalingGroup(String autoScalingGroupName, String launchConfigurationName, int minSize, int maxSize, int defaultCooldown) throws AutoScalingException
autoScalingGroupName
- a autoScaling group namelaunchConfigurationName
- name of launch configuration for this groupminSize
- min number of servers in this groupmaxSize
- max number of servers in this group (must be < 1000)defaultCooldown
- number of seconds to wait before adjusting capacity
AutoScalingException
- wraps checked exceptionsprotected <T> T makeRequestInt(org.apache.http.client.methods.HttpRequestBase method, String action, Map<String,String> params, Class<T> respType) throws AutoScalingException
AutoScalingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |