Class DeploymentEnvironmentResource
java.lang.Object
com.atlassian.bamboo.plugins.rest.deployments.environments.DeploymentEnvironmentResource
@Path("deploy/environment")
@Consumes("application/json")
@Produces("application/json")
@Singleton
public class DeploymentEnvironmentResource
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionDeploymentEnvironmentResource(AgentAssignmentService agentAssignmentService, AgentManager agentManager, CachedEnvironmentService cachedEnvironmentService, EnvironmentService environmentService, EnvironmentCustomConfigService environmentCustomConfigService, DeploymentResultService deploymentResultService, CachedDeploymentProjectService cachedDeploymentProjectService, com.atlassian.sal.api.message.I18nResolver i18nResolver, com.atlassian.event.api.EventPublisher eventPublisher, ElasticImageConfigurationManager elasticImageConfigurationManager, EnvironmentRequirementService environmentRequirementService, VariableDefinitionManager variableDefinitionManager, AdministrationConfigurationAccessor administrationConfigurationAccessor, BambooPermissionManager bambooPermissionManager, VariableConfigurationService variableConfigurationService, AgentCapabilityService agentCapabilityService, LinkService linkService, EphemeralAgentsService ephemeralAgentsService) -
Method Summary
Modifier and TypeMethodDescriptionaddAgentAssignmentForEnvironment(long environmentId, Map<String, String> agentAssignmentKey) javax.ws.rs.core.ResponsecreateEnvironmentVariable(Long environmentId, @Nullable RestVariable variable) javax.ws.rs.core.ResponsedeleteEnvironmentVariable(Long environmentId, String variableName) findAssignedAgentsByEnvironment(long environmentId) javax.ws.rs.core.ResponsefindPossibleAgentsForEnvironment(long environmentId, @Nullable String searchTerm, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.ResponsegetAllEnvironmentVariables(Long environmentId) getDeploymentResultList(long environmentId, String expandParam, javax.ws.rs.core.UriInfo uriInfo) getDockerPipelinesConfiguration(long environmentId) getEnvironment(long environmentId) getEnvironmentsExecutableByAgent(String filter, long agentId, PageRequest pageRequest, javax.ws.rs.core.UriInfo uriInfo) getEnvironmentsExecutableByElasticConfiguration(String filter, Long configurationId, PageRequest pageRequest, javax.ws.rs.core.UriInfo uriInfo) getEnvironmentsExecutableByEphemeralAgentTemplate(String filter, Long templateId, PageRequest pageRequest, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.ResponsegetEnvironmentVariable(Long environmentId, String variableName) javax.ws.rs.core.ResponsemoveEnvironment(Long environmentId, @Nullable String positionString, Long relativeEnvironmentId) javax.ws.rs.core.ResponseremoveAgentAssignmentFromEnvironment(long environmentId, String executorKey) javax.ws.rs.core.ResponsesaveDockerPipelinesConfiguration(long environmentId, RestDockerPipelineConfiguration restDockerPipelineConfiguration) javax.ws.rs.core.ResponseupdateEnvironmentPrerequisites(Long environmentId, @NotNull RestEnvironmentPrerequisites restEnvironmentPrerequisites) javax.ws.rs.core.ResponseupdateEnvironmentVariable(Long environmentId, String variableName, @Nullable RestVariable variable)
-
Constructor Details
-
DeploymentEnvironmentResource
@Inject public DeploymentEnvironmentResource(AgentAssignmentService agentAssignmentService, AgentManager agentManager, CachedEnvironmentService cachedEnvironmentService, EnvironmentService environmentService, EnvironmentCustomConfigService environmentCustomConfigService, DeploymentResultService deploymentResultService, CachedDeploymentProjectService cachedDeploymentProjectService, com.atlassian.sal.api.message.I18nResolver i18nResolver, com.atlassian.event.api.EventPublisher eventPublisher, ElasticImageConfigurationManager elasticImageConfigurationManager, EnvironmentRequirementService environmentRequirementService, VariableDefinitionManager variableDefinitionManager, AdministrationConfigurationAccessor administrationConfigurationAccessor, BambooPermissionManager bambooPermissionManager, VariableConfigurationService variableConfigurationService, AgentCapabilityService agentCapabilityService, LinkService linkService, EphemeralAgentsService ephemeralAgentsService)
-
-
Method Details
-
getEnvironment
@GET @Path("{environmentId}") public RestEnvironmentWithConfigCounts getEnvironment(@PathParam("environmentId") long environmentId) -
getEnvironmentsExecutableByAgent
@GET @Path("agent/{agentId}") public RestPageModel<RestEnvironmentForExecutablesView> getEnvironmentsExecutableByAgent(@QueryParam("filter") @DefaultValue("") String filter, @PathParam("agentId") long agentId, @BeanParam PageRequest pageRequest, @Context javax.ws.rs.core.UriInfo uriInfo) -
getEnvironmentsExecutableByElasticConfiguration
@GET @Path("elasticImageConfiguration/{configurationId}") public RestPageModel<RestEnvironmentForExecutablesView> getEnvironmentsExecutableByElasticConfiguration(@QueryParam("filter") @DefaultValue("") String filter, @PathParam("configurationId") Long configurationId, @BeanParam PageRequest pageRequest, @Context javax.ws.rs.core.UriInfo uriInfo) -
getEnvironmentsExecutableByEphemeralAgentTemplate
@GET @Path("ephemeral/{templateId}") public RestPageModel<RestEnvironmentForExecutablesView> getEnvironmentsExecutableByEphemeralAgentTemplate(@QueryParam("filter") @DefaultValue("") String filter, @PathParam("templateId") Long templateId, @BeanParam PageRequest pageRequest, @Context javax.ws.rs.core.UriInfo uriInfo) -
getDeploymentResultList
@GET @Path("{environmentId}/results") public RestDeploymentResultList getDeploymentResultList(@PathParam("environmentId") long environmentId, @QueryParam("expand") String expandParam, @Context javax.ws.rs.core.UriInfo uriInfo) -
findAssignedAgentsByEnvironment
@GET @Path("{environmentId}/agent-assignment") public List<RestAgentAssignmentExecutorDetails> findAssignedAgentsByEnvironment(@PathParam("environmentId") long environmentId) -
findPossibleAgentsForEnvironment
@GET @Path("{environmentId}/possible-agent-assignment") public javax.ws.rs.core.Response findPossibleAgentsForEnvironment(@PathParam("environmentId") long environmentId, @Nullable @QueryParam("searchTerm") @Nullable String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo) -
addAgentAssignmentForEnvironment
@POST @Path("{environmentId}/agent-assignment") public RestAgentAssignmentExecutorDetails addAgentAssignmentForEnvironment(@PathParam("environmentId") long environmentId, Map<String, String> agentAssignmentKey) throws WebValidationException- Throws:
WebValidationException
-
removeAgentAssignmentFromEnvironment
@DELETE @Path("{environmentId}/agent-assignment/{executorKey}") public javax.ws.rs.core.Response removeAgentAssignmentFromEnvironment(@PathParam("environmentId") long environmentId, @PathParam("executorKey") String executorKey) throws WebValidationException - Throws:
WebValidationException
-
getDockerPipelinesConfiguration
@GET @Path("{environmentId}/docker") public RestDockerPipelineConfiguration getDockerPipelinesConfiguration(@PathParam("environmentId") long environmentId) -
saveDockerPipelinesConfiguration
@PUT @Path("{environmentId}/docker") public javax.ws.rs.core.Response saveDockerPipelinesConfiguration(@PathParam("environmentId") long environmentId, RestDockerPipelineConfiguration restDockerPipelineConfiguration) -
moveEnvironment
@POST @Path("{environmentId}/move/{position}/{relativeEnvironmentId}") public javax.ws.rs.core.Response moveEnvironment(@PathParam("environmentId") Long environmentId, @PathParam("position") @Nullable @Nullable String positionString, @PathParam("relativeEnvironmentId") Long relativeEnvironmentId) throws WebValidationException, NotFoundException -
getAllEnvironmentVariables
@GET @Path("{environmentId}/variables") public javax.ws.rs.core.Response getAllEnvironmentVariables(@PathParam("environmentId") Long environmentId) -
getEnvironmentVariable
-
createEnvironmentVariable
@POST @Path("{environmentId}/variable") public javax.ws.rs.core.Response createEnvironmentVariable(@PathParam("environmentId") Long environmentId, @Nullable @Nullable RestVariable variable) -
updateEnvironmentVariable
@PUT @Path("{environmentId}/variable/{variableName}") public javax.ws.rs.core.Response updateEnvironmentVariable(@PathParam("environmentId") Long environmentId, @PathParam("variableName") String variableName, @Nullable @Nullable RestVariable variable) -
deleteEnvironmentVariable
-
updateEnvironmentPrerequisites
@PUT @Path("{environmentId}/prerequisites") public javax.ws.rs.core.Response updateEnvironmentPrerequisites(@PathParam("environmentId") Long environmentId, @NotNull @NotNull RestEnvironmentPrerequisites restEnvironmentPrerequisites)
-