Class AwsAccountBeanImpl
java.lang.Object
com.atlassian.bamboo.agent.elastic.aws.AwsAccountBeanImpl
- All Implemented Interfaces:
AwsAccountBean
-
Constructor Summary
ConstructorDescriptionAwsAccountBeanImpl
(ElasticAccountBean elasticAccountBean, com.atlassian.aws.AWSManager awsManager, SecretEncryptionService secretEncryptionService) -
Method Summary
Modifier and TypeMethodDescription@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 credentialsReturns a list of availability zones and their status.@NotNull com.atlassian.aws.AWSAccount
Returns an AWSAccount object that you can access certain services on@NotNull com.atlassian.aws.ec2.SpotPrices
This price list is cached and refreshed not more often than MAXIMUM_SPOT_PRICES_AGE.void
void
setMaximumEbsVolumeStatusAgeSeconds
(int maximumStatusAge) void
setMaximumInstanceStatusAgeSeconds
(int maximumStatusAge) void
setMaximumSpotRequestStatusAgeSeconds
(int maximumStatusAge)
-
Constructor Details
-
AwsAccountBeanImpl
public AwsAccountBeanImpl(ElasticAccountBean elasticAccountBean, com.atlassian.aws.AWSManager awsManager, SecretEncryptionService secretEncryptionService)
-
-
Method Details
-
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.AWSExceptionDescription 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
-
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)
-