:doc:`Greengrass <../../greengrass>` / Client / create_deployment

*****************
create_deployment
*****************



.. py:method:: Greengrass.Client.create_deployment(**kwargs)

  Creates a deployment. ''CreateDeployment'' requests are idempotent with respect to the ''X-Amzn-Client-Token'' token and the request parameters.

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeployment>`_  


  **Request Syntax**
  ::

    response = client.create_deployment(
        AmznClientToken='string',
        DeploymentId='string',
        DeploymentType='NewDeployment'|'Redeployment'|'ResetDeployment'|'ForceResetDeployment',
        GroupId='string',
        GroupVersionId='string'
    )
    
  :type AmznClientToken: string
  :param AmznClientToken: A client token used to correlate requests and responses.

  
  :type DeploymentId: string
  :param DeploymentId: The ID of the deployment if you wish to redeploy a previous deployment.

  
  :type DeploymentType: string
  :param DeploymentType: **[REQUIRED]** The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid.

  
  :type GroupId: string
  :param GroupId: **[REQUIRED]** The ID of the Greengrass group.

  
  :type GroupVersionId: string
  :param GroupVersionId: The ID of the group version to be deployed.

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

    
    ::

      {
          'DeploymentArn': 'string',
          'DeploymentId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* Success. The group was deployed.
      

      - **DeploymentArn** *(string) --* The ARN of the deployment.
      

      - **DeploymentId** *(string) --* The ID of the deployment.
  
  **Exceptions**
  
  *   :py:class:`Greengrass.Client.exceptions.BadRequestException`

  