:doc:`Lambda <../../lambda>` / Client / put_provisioned_concurrency_config

**********************************
put_provisioned_concurrency_config
**********************************



.. py:method:: Lambda.Client.put_provisioned_concurrency_config(**kwargs)

  

  Adds a provisioned concurrency configuration to a function's alias or version.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutProvisionedConcurrencyConfig>`_  


  **Request Syntax**
  ::

    response = client.put_provisioned_concurrency_config(
        FunctionName='string',
        Qualifier='string',
        ProvisionedConcurrentExecutions=123
    )
    
  :type FunctionName: string
  :param FunctionName: **[REQUIRED]** 

    The name or ARN of the Lambda function.

     

    **Name formats**

     

    
    * **Function name** – ``my-function``.
     
    * **Function ARN** – ``arn:aws:lambda:us-west-2:123456789012:function:my-function``.
     
    * **Partial ARN** – ``123456789012:function:my-function``.
    

     

    The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

    

  
  :type Qualifier: string
  :param Qualifier: **[REQUIRED]** 

    The version number or alias name.

    

  
  :type ProvisionedConcurrentExecutions: integer
  :param ProvisionedConcurrentExecutions: **[REQUIRED]** 

    The amount of provisioned concurrency to allocate for the version or alias.

    

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

    
    ::

      {
          'RequestedProvisionedConcurrentExecutions': 123,
          'AvailableProvisionedConcurrentExecutions': 123,
          'AllocatedProvisionedConcurrentExecutions': 123,
          'Status': 'IN_PROGRESS'|'READY'|'FAILED',
          'StatusReason': 'string',
          'LastModified': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RequestedProvisionedConcurrentExecutions** *(integer) --* 

        The amount of provisioned concurrency requested.

        
      

      - **AvailableProvisionedConcurrentExecutions** *(integer) --* 

        The amount of provisioned concurrency available.

        
      

      - **AllocatedProvisionedConcurrentExecutions** *(integer) --* 

        The amount of provisioned concurrency allocated. When a weighted alias is used during linear and canary deployments, this value fluctuates depending on the amount of concurrency that is provisioned for the function versions.

        
      

      - **Status** *(string) --* 

        The status of the allocation process.

        
      

      - **StatusReason** *(string) --* 

        For failed allocations, the reason that provisioned concurrency could not be allocated.

        
      

      - **LastModified** *(string) --* 

        The date and time that a user last updated the configuration, in `ISO 8601 format <https://www.iso.org/iso-8601-date-and-time-format.html>`__.

        
  
  **Exceptions**
  
  *   :py:class:`Lambda.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`Lambda.Client.exceptions.ResourceConflictException`

  
  *   :py:class:`Lambda.Client.exceptions.ServiceException`

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

  
  *   :py:class:`Lambda.Client.exceptions.ResourceNotFoundException`

  

  **Examples**

  The following example allocates 100 provisioned concurrency for the BLUE alias of the specified function.
  ::

    response = client.put_provisioned_concurrency_config(
        FunctionName='my-function',
        ProvisionedConcurrentExecutions=100,
        Qualifier='BLUE',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'AllocatedProvisionedConcurrentExecutions': 0,
        'LastModified': '2019-11-21T19:32:12+0000',
        'RequestedProvisionedConcurrentExecutions': 100,
        'Status': 'IN_PROGRESS',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  