Class AwsAccountBeanImpl
- java.lang.Object
-
- com.atlassian.bamboo.agent.elastic.aws.AwsAccountBeanImpl
-
- All Implemented Interfaces:
AwsAccountBean
@ThreadSafe public class AwsAccountBeanImpl extends Object implements AwsAccountBean
-
-
Constructor Summary
Constructors Constructor Description AwsAccountBeanImpl(ElasticAccountBean elasticAccountBean, com.atlassian.aws.AWSManager awsManager, SecretEncryptionService secretEncryptionService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable String
getAccountDetailsValidationError(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region, com.atlassian.aws.credentials.AWSCredentials awsCredentials)
Checks whether a basic command can be run using the supplied credentials@Nullable String
getAccountDetailsValidationError(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region, String awsAccessID, String awsSecretKey)
Checks whether a basic command can be run using the supplied credentials@NotNull Map<String,com.amazonaws.services.ec2.model.AvailabilityZone>
getAvailabilityZones()
Returns a list of availability zones and their status.@NotNull com.atlassian.aws.AWSAccount
getAwsAccount()
Returns an AWSAccount object that you can access certain services on@NotNull com.atlassian.aws.ec2.SpotPrices
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)
-
-
-
Constructor Detail
-
AwsAccountBeanImpl
public AwsAccountBeanImpl(ElasticAccountBean elasticAccountBean, com.atlassian.aws.AWSManager awsManager, SecretEncryptionService secretEncryptionService)
-
-
Method Detail
-
getAwsAccount
@NotNull public @NotNull com.atlassian.aws.AWSAccount getAwsAccount()
Description copied from interface:AwsAccountBean
Returns an AWSAccount object that you can access certain services on- Specified by:
getAwsAccount
in interfaceAwsAccountBean
-
getAvailabilityZones
@NotNull public @NotNull Map<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 interfaceAwsAccountBean
- Returns:
- A map of zones and their availability keyed by zone name.
- Throws:
com.atlassian.aws.AWSException
-
getAccountDetailsValidationError
@Nullable public @Nullable String getAccountDetailsValidationError(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region, String awsAccessID, String awsSecretKey) throws com.atlassian.aws.AWSException
Description copied from interface:AwsAccountBean
Checks whether a basic command can be run using the supplied credentials- Specified by:
getAccountDetailsValidationError
in interfaceAwsAccountBean
- 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)
-
getAccountDetailsValidationError
@Nullable public @Nullable String getAccountDetailsValidationError(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region, com.atlassian.aws.credentials.AWSCredentials awsCredentials) throws com.atlassian.aws.AWSException
Description copied from interface:AwsAccountBean
Checks whether a basic command can be run using the supplied credentials- Specified by:
getAccountDetailsValidationError
in interfaceAwsAccountBean
- 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 @NotNull com.atlassian.aws.ec2.SpotPrices getCurrentSpotPrices()
This price list is cached and refreshed not more often than MAXIMUM_SPOT_PRICES_AGE.- Specified by:
getCurrentSpotPrices
in interfaceAwsAccountBean
- Returns:
- spot price list
-
setMaximumEbsVolumeStatusAgeSeconds
public void setMaximumEbsVolumeStatusAgeSeconds(int maximumStatusAge)
-
setMaximumInstanceStatusAgeSeconds
public void setMaximumInstanceStatusAgeSeconds(int maximumStatusAge)
-
setMaximumSpotRequestStatusAgeSeconds
public void setMaximumSpotRequestStatusAgeSeconds(int maximumStatusAge)
-
-