com.atlassian.bamboo.agent.elastic.aws
Class AwsAccountBeanImpl

java.lang.Object
  extended by com.atlassian.bamboo.agent.elastic.aws.AwsAccountBeanImpl
All Implemented Interfaces:
AwsAccountBean

@ThreadSafe
public class AwsAccountBeanImpl
extends java.lang.Object
implements AwsAccountBean


Constructor Summary
AwsAccountBeanImpl(ElasticAccountBean elasticAccountBean, com.atlassian.aws.AWSManager awsManager)
           
 
Method Summary
 java.lang.String getAccountDetailsValidationError(java.lang.String awsAccessID, java.lang.String awsSecretKey)
          Checks whether a basic command can be run using the supplied credenials
 com.google.common.collect.ImmutableMap<java.lang.String,com.amazonaws.services.ec2.model.AvailabilityZone> getAvailabilityZones()
          Returns a list of availability zones and their status.
 com.atlassian.aws.AWSAccount getAwsAccount()
          Returns an AWSAccount object that you can access certain services on
 com.atlassian.aws.ec2.SpotPriceMatrix getCurrentSpotPrices()
          This price list is cached and refreshed not more often than MAXIMUM_SPOT_PRICES_AGE.
 void onElasticConfigUpdatedEvent(ElasticConfigUpdatedEvent event)
           
 void setMaximumEbsVolumeStatusAgeSeconds(int maximumStatusAge)
           
 void setMaximumInstanceStatusAgeSeconds(int maximumStatusAge)
           
 void setMaximumSpotRequestStatusAgeSeconds(int maximumStatusAge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AwsAccountBeanImpl

public AwsAccountBeanImpl(ElasticAccountBean elasticAccountBean,
                          com.atlassian.aws.AWSManager awsManager)
Method Detail

getAwsAccount

@NotNull
public com.atlassian.aws.AWSAccount getAwsAccount()
                                           throws com.atlassian.aws.AWSException
Description copied from interface: AwsAccountBean
Returns an AWSAccount object that you can access certain services on

Specified by:
getAwsAccount in interface AwsAccountBean
Returns:
Throws:
com.atlassian.aws.AWSException

getAvailabilityZones

@NotNull
public com.google.common.collect.ImmutableMap<java.lang.String,com.amazonaws.services.ec2.model.AvailabilityZone> getAvailabilityZones()
                                                                                                                                throws com.atlassian.aws.AWSException
Description copied from interface: AwsAccountBean
Returns a list of availability zones and their status.

Specified by:
getAvailabilityZones in interface AwsAccountBean
Returns:
A map of zones and their availability keyed by zone name.
Throws:
com.atlassian.aws.AWSException

getAccountDetailsValidationError

@Nullable
public java.lang.String getAccountDetailsValidationError(java.lang.String awsAccessID,
                                                                  java.lang.String awsSecretKey)
                                                  throws com.atlassian.aws.AWSException
Description copied from interface: AwsAccountBean
Checks whether a basic command can be run using the supplied credenials

Specified by:
getAccountDetailsValidationError in interface AwsAccountBean
Returns:
null if everything went well, an error message otherwise
Throws:
com.atlassian.aws.AWSException - if a connection error occurred (not that the credentials were correct or incorrect)

onElasticConfigUpdatedEvent

@EventListener
public void onElasticConfigUpdatedEvent(ElasticConfigUpdatedEvent event)

getCurrentSpotPrices

@NotNull
public com.atlassian.aws.ec2.SpotPriceMatrix getCurrentSpotPrices()
This price list is cached and refreshed not more often than MAXIMUM_SPOT_PRICES_AGE.

Specified by:
getCurrentSpotPrices in interface AwsAccountBean
Returns:

setMaximumEbsVolumeStatusAgeSeconds

public void setMaximumEbsVolumeStatusAgeSeconds(int maximumStatusAge)

setMaximumInstanceStatusAgeSeconds

public void setMaximumInstanceStatusAgeSeconds(int maximumStatusAge)

setMaximumSpotRequestStatusAgeSeconds

public void setMaximumSpotRequestStatusAgeSeconds(int maximumStatusAge)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.