:doc:`ApiGatewayV2 <../../apigatewayv2>` / Client / create_deployment

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



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

  

  Creates a Deployment for an API.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateDeployment>`_  


  **Request Syntax**
  ::

    response = client.create_deployment(
        ApiId='string',
        Description='string',
        StageName='string'
    )
    
  :type ApiId: string
  :param ApiId: **[REQUIRED]** 

    The API identifier.

    

  
  :type Description: string
  :param Description: 

    The description for the deployment resource.

    

  
  :type StageName: string
  :param StageName: 

    The name of the Stage resource for the Deployment resource to create.

    

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

    
    ::

      {
          'AutoDeployed': True|False,
          'CreatedDate': datetime(2015, 1, 1),
          'DeploymentId': 'string',
          'DeploymentStatus': 'PENDING'|'FAILED'|'DEPLOYED',
          'DeploymentStatusMessage': 'string',
          'Description': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The request has succeeded and has resulted in the creation of a resource.

      
      

      - **AutoDeployed** *(boolean) --* 

        Specifies whether a deployment was automatically released.

        
      

      - **CreatedDate** *(datetime) --* 

        The date and time when the Deployment resource was created.

        
      

      - **DeploymentId** *(string) --* 

        The identifier for the deployment.

        
      

      - **DeploymentStatus** *(string) --* 

        The status of the deployment: PENDING, FAILED, or SUCCEEDED.

        
      

      - **DeploymentStatusMessage** *(string) --* 

        May contain additional feedback on the status of an API deployment.

        
      

      - **Description** *(string) --* 

        The description for the deployment.

        
  
  **Exceptions**
  
  *   :py:class:`ApiGatewayV2.Client.exceptions.NotFoundException`

  
  *   :py:class:`ApiGatewayV2.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`ApiGatewayV2.Client.exceptions.BadRequestException`

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

  