:doc:`ECS <../../ecs>` / Client / stop_service_deployment

***********************
stop_service_deployment
***********************



.. py:method:: ECS.Client.stop_service_deployment(**kwargs)

  

  Stops an ongoing service deployment.

   

  The following stop types are avaiable:

   

  
  * ROLLBACK - This option rolls back the service deployment to the previous service revision. You can use this option even if you didn't configure the service deployment for the rollback option.
  

   

  For more information, see `Stopping Amazon ECS service deployments <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/stop-service-deployment.html>`__ in the *Amazon Elastic Container Service Developer Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StopServiceDeployment>`_  


  **Request Syntax**
  ::

    response = client.stop_service_deployment(
        serviceDeploymentArn='string',
        stopType='ABORT'|'ROLLBACK'
    )
    
  :type serviceDeploymentArn: string
  :param serviceDeploymentArn: **[REQUIRED]** 

    The ARN of the service deployment that you want to stop.

    

  
  :type stopType: string
  :param stopType: 

    How you want Amazon ECS to stop the service.

     

    The valid values are ``ROLLBACK``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'serviceDeploymentArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **serviceDeploymentArn** *(string) --* 

        The ARN of the stopped service deployment.

        
  
  **Exceptions**
  
  *   :py:class:`ECS.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`ECS.Client.exceptions.ClientException`

  
  *   :py:class:`ECS.Client.exceptions.ConflictException`

  
  *   :py:class:`ECS.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`ECS.Client.exceptions.ServerException`

  
  *   :py:class:`ECS.Client.exceptions.ServiceDeploymentNotFoundException`

  
  *   :py:class:`ECS.Client.exceptions.UnsupportedFeatureException`

  