Interface ElasticImageConfigurationDao
-
- All Superinterfaces:
BambooObjectDao
,bucket.core.persistence.ObjectDao
- All Known Implementing Classes:
ElasticImageConfigurationHibernateDao
public interface ElasticImageConfigurationDao extends BambooObjectDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable ElasticImageConfiguration
findById(long id)
Get Elastic Image Configuration from its id@NotNull List<ElasticImageConfiguration>
getAll()
Get all Elastic Image Configuration objectsint
getBuildCountForImageConfigurationId(long id)
Get the number of elastic agents associated with a given image configurationint
getElasticAgentCountForImageConfigurationId(long id)
Returns all elastic agents associated with a specific image configurationList<ElasticAgentDefinition>
getElasticAgentsForImageConfigurationId(long id)
Retrieves a list of elastic agenst associated with the given elastic image configurationList<ElasticImageConfiguration>
getElasticImageConfigurationByAmi(String amiId)
Retrieves a list of all elastic image configurations that use a specific image.@NotNull List<ElasticImageConfiguration>
getElasticImageConfigurationsByName(String configurationName, com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region)
Finds an elastic configuration by name in a given region.@NotNull List<ElasticImageConfiguration>
getImages(com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region, com.atlassian.aws.ec2.awssdk.AwsSupportConstants.RootDeviceType rootDeviceType, com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Architecture architectureType, com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Platform platform, @Nullable Boolean shippedWithBamboo)
void
remove(@NotNull ElasticImageConfiguration elasticImageConfiguration)
void
save(@NotNull ElasticImageConfiguration elasticImageConfiguration)
-
-
-
Method Detail
-
getAll
@NotNull @NotNull List<ElasticImageConfiguration> getAll()
Get all Elastic Image Configuration objects- Returns:
- Collection of Elastic Image Configuration objects (empty if none found)
-
findById
@Nullable @Nullable ElasticImageConfiguration findById(long id)
Get Elastic Image Configuration from its id- Specified by:
findById
in interfaceBambooObjectDao
- Parameters:
id
- Elastic Image Configuration's id- Returns:
- Elastic Image Configuration object or null if not found
-
getElasticAgentCountForImageConfigurationId
int getElasticAgentCountForImageConfigurationId(long id)
Returns all elastic agents associated with a specific image configuration- Parameters:
id
- for the image configuration- Returns:
- count of the elastic agent associated with the given image configuration
-
getBuildCountForImageConfigurationId
int getBuildCountForImageConfigurationId(long id)
Get the number of elastic agents associated with a given image configuration- Parameters:
id
- for the image configuration- Returns:
- count of the builds associated with the given image configuration
-
getElasticImageConfigurationsByName
@NotNull @NotNull List<ElasticImageConfiguration> getElasticImageConfigurationsByName(String configurationName, com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region)
Finds an elastic configuration by name in a given region.- Parameters:
configurationName
- name to look forregion
- region to check- Returns:
- the elasticImageConfig with the given name.
-
save
void save(@NotNull @NotNull ElasticImageConfiguration elasticImageConfiguration)
-
remove
void remove(@NotNull @NotNull ElasticImageConfiguration elasticImageConfiguration)
-
getImages
@NotNull @NotNull List<ElasticImageConfiguration> getImages(@Nullable com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region, @Nullable com.atlassian.aws.ec2.awssdk.AwsSupportConstants.RootDeviceType rootDeviceType, @Nullable com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Architecture architectureType, @Nullable com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Platform platform, @Nullable @Nullable Boolean shippedWithBamboo)
-
getElasticAgentsForImageConfigurationId
List<ElasticAgentDefinition> getElasticAgentsForImageConfigurationId(long id)
Retrieves a list of elastic agenst associated with the given elastic image configuration- Parameters:
id
- of the elasticImageConfiguration
-
getElasticImageConfigurationByAmi
List<ElasticImageConfiguration> getElasticImageConfigurationByAmi(String amiId)
Retrieves a list of all elastic image configurations that use a specific image.- Parameters:
amiId
- to filter with- Returns:
- list of ElasticAgentDefinition objects that use the given amiID
-
-