Interface ElasticImageConfigurationDao
- All Superinterfaces:
BambooObjectDao
,bucket.core.persistence.ObjectDao
- All Known Implementing Classes:
ElasticImageConfigurationHibernateDao
-
Method Summary
Modifier and TypeMethodDescription@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
Returns all elastic agents associated with a specific image configurationRetrieves a list of elastic agenst associated with the given elastic image configurationRetrieves 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) Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
-
Method Details
-
getAll
Get all Elastic Image Configuration objects- Returns:
- Collection of Elastic Image Configuration objects (empty if none found)
-
findById
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
-
remove
-
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
Retrieves a list of elastic agenst associated with the given elastic image configuration- Parameters:
id
- of the elasticImageConfiguration
-
getElasticImageConfigurationByAmi
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
-