org.springframework.cloud.dataflow.server.controller

## Class StreamDeploymentController

- java.lang.Object
- - org.springframework.cloud.dataflow.server.controller.StreamDeploymentController

-     @RestController
       @RequestMapping(value="/streams/deployments")
       @ExposesResourceFor(value=StreamDeploymentResource.class)
      public class StreamDeploymentController
      extends Object

  Controller for deployment operations on `StreamDefinition`s. Support for stream update, rollback, and update history by delegating to `StreamService`.
  Author:
    Eric Bottard, Mark Fisher, Patrick Peralta, Ilayaperumal Gopinathan, Marius Bogoevici, Janne Valkealahti, Christian Tzolov, Gunnar Hillert, Christian Tzolov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamDeploymentController(StreamDefinitionRepository repository, StreamService streamService, StreamDefinitionService streamDefinitionService)` Construct a new UpdatableStreamDeploymentController, given a `StreamDeploymentController` and `StreamService`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.http.ResponseEntity<Void>` | `deploy(String name, Map<String,String> properties)` Request deployment of an existing stream definition.
    `Collection<org.springframework.cloud.skipper.domain.Release>` | `history(String releaseName)`
    `StreamDeploymentResource` | `info(String name, boolean reuseDeploymentProperties)` Request deployment of an existing stream definition.
    `org.springframework.http.ResponseEntity<String>` | `manifest(String name, Integer version)`
    `Collection<org.springframework.cloud.skipper.domain.Deployer>` | `platformList()`
    `org.springframework.http.ResponseEntity<Void>` | `rollback(String name, Integer version)`
    `org.springframework.http.ResponseEntity<Void>` | `scaleApplicationInstances(String streamName, String appName, Integer count, Map<String,String> properties)` Scale application instances in a deployed stream.
    `org.springframework.http.ResponseEntity<Void>` | `undeploy(String name)` Request un-deployment of an existing stream.
    `org.springframework.http.ResponseEntity<Void>` | `undeployAll()` Request un-deployment of all streams.
    `org.springframework.http.ResponseEntity<Void>` | `update(String name, UpdateStreamRequest updateStreamRequest)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StreamDeploymentController

          public StreamDeploymentController(StreamDefinitionRepository repository,
                                            StreamService streamService,
                                            StreamDefinitionService streamDefinitionService)

      Construct a new UpdatableStreamDeploymentController, given a `StreamDeploymentController` and `StreamService`
      Parameters:
        `repository` - the repository this controller will use for stream CRUD operations
        `streamService` - the underlying UpdatableStreamService to deploy the stream

  - ### Method Detail

    - #### scaleApplicationInstances

          @RequestMapping(value="/scale/{streamName}/{appName}/instances/{count}",
                          method=POST)
          public org.springframework.http.ResponseEntity<Void> scaleApplicationInstances(@PathVariable(value="streamName")
                                                                                                                                                                                               String streamName,
                                                                                                                                                                                               @PathVariable(value="appName")
                                                                                                                                                                                               String appName,
                                                                                                                                                                                               @PathVariable(value="count")
                                                                                                                                                                                               Integer count,
                                                                                                                                                                                               @RequestBody(required=false)
                                                                                                                                                                                               Map<String,String> properties)

      Scale application instances in a deployed stream.
      Parameters:
        `streamName` - the name of an existing stream definition (required)
        `appName` - in stream application name to scale (required)
        `count` - number of instances for the selected stream application (required)
        `properties` - scale deployment specific properties (optional)
      Returns:
        response without a body

    - #### update

          @RequestMapping(value="/update/{name}",
                          method=POST)
          public org.springframework.http.ResponseEntity<Void> update(@PathVariable(value="name")
                                                                                                                                           String name,
                                                                                                                                           @RequestBody
                                                                                                                                           UpdateStreamRequest updateStreamRequest)

    - #### rollback

          @RequestMapping(value="/rollback/{name}/{version}",
                          method=POST)
          public org.springframework.http.ResponseEntity<Void> rollback(@PathVariable(value="name")
                                                                                                                                                         String name,
                                                                                                                                                         @PathVariable(value="version")
                                                                                                                                                         Integer version)

    - #### manifest

          @RequestMapping(value="/manifest/{name}/{version}",
                          method=GET)
          public org.springframework.http.ResponseEntity<String> manifest(@PathVariable(value="name")
                                                                                                                                                          String name,
                                                                                                                                                          @PathVariable(value="version")
                                                                                                                                                          Integer version)

    - #### history

          @RequestMapping(path="/history/{name}",
                          method=GET)
           @ResponseStatus(value=OK)
          public Collection<org.springframework.cloud.skipper.domain.Release> history(@PathVariable(value="name")
                                                                                                                                                                                     String releaseName)

    - #### platformList

          @RequestMapping(path="/platform/list",
                          method=GET)
           @ResponseStatus(value=OK)
          public Collection<org.springframework.cloud.skipper.domain.Deployer> platformList()

    - #### undeploy

          @RequestMapping(value="/{name}",
                          method=DELETE)
          public org.springframework.http.ResponseEntity<Void> undeploy(@PathVariable(value="name")
                                                                                                                                        String name)

      Request un-deployment of an existing stream.
      Parameters:
        `name` - the name of an existing stream (required)
      Returns:
        response without a body

    - #### undeployAll

          @RequestMapping(value="",
                          method=DELETE)
          public org.springframework.http.ResponseEntity<Void> undeployAll()

      Request un-deployment of all streams.
      Returns:
        instance of `ResponseEntity`

    - #### info

          @RequestMapping(value="/{name}",
                          method=GET)
           @ResponseStatus(value=OK)
          public StreamDeploymentResource info(@PathVariable(value="name")
                                                                                                                                       String name,
                                                                                                                                       @RequestParam(value="reuse-deployment-properties",required=false)
                                                                                                                                       boolean reuseDeploymentProperties)

      Request deployment of an existing stream definition.
      Parameters:
        `name` - the name of an existing stream definition (required)
      Returns:
        The stream deployment

    - #### deploy

          @RequestMapping(value="/{name}",
                          method=POST)
          public org.springframework.http.ResponseEntity<Void> deploy(@PathVariable(value="name")
                                                                                                                                    String name,
                                                                                                                                    @RequestBody(required=false)
                                                                                                                                    Map<String,String> properties)

      Request deployment of an existing stream definition.
      Parameters:
        `name` - the name of an existing stream definition (required)
        `properties` - the deployment properties for the stream as a comma-delimited list of key=value pairs
      Returns:
        response without a body

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.