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
ConstructorDescriptionDeploymentEnvironmentResource
(AgentAssignmentService agentAssignmentService, AgentManager agentManager, EnvironmentService environmentService, EnvironmentCustomConfigService environmentCustomConfigService, DeploymentResultService deploymentResultService, DeploymentProjectService deploymentProjectService, 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.Response
createEnvironmentVariable
(Long environmentId, @Nullable RestVariable variable) javax.ws.rs.core.Response
deleteEnvironmentVariable
(Long environmentId, String variableName) findAssignedAgentsByEnvironment
(long environmentId) javax.ws.rs.core.Response
findPossibleAgentsForEnvironment
(long environmentId, @Nullable String searchTerm, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.Response
getAllEnvironmentVariables
(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.Response
getEnvironmentVariable
(Long environmentId, String variableName) javax.ws.rs.core.Response
moveEnvironment
(Long environmentId, @Nullable String positionString, Long relativeEnvironmentId) javax.ws.rs.core.Response
removeAgentAssignmentFromEnvironment
(long environmentId, String executorKey) javax.ws.rs.core.Response
saveDockerPipelinesConfiguration
(long environmentId, RestDockerPipelineConfiguration restDockerPipelineConfiguration) javax.ws.rs.core.Response
updateEnvironmentPrerequisites
(Long environmentId, @NotNull RestEnvironmentPrerequisites restEnvironmentPrerequisites) javax.ws.rs.core.Response
updateEnvironmentVariable
(Long environmentId, String variableName, @Nullable RestVariable variable)
-
Constructor Details
-
DeploymentEnvironmentResource
@Inject public DeploymentEnvironmentResource(AgentAssignmentService agentAssignmentService, AgentManager agentManager, EnvironmentService environmentService, EnvironmentCustomConfigService environmentCustomConfigService, DeploymentResultService deploymentResultService, DeploymentProjectService deploymentProjectService, 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)
-