:doc:`Athena <../../athena>` / Client / put_capacity_assignment_configuration

*************************************
put_capacity_assignment_configuration
*************************************



.. py:method:: Athena.Client.put_capacity_assignment_configuration(**kwargs)

  

  Puts a new capacity assignment configuration for a specified capacity reservation. If a capacity assignment configuration already exists for the capacity reservation, replaces the existing capacity assignment configuration.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/PutCapacityAssignmentConfiguration>`_  


  **Request Syntax**
  ::

    response = client.put_capacity_assignment_configuration(
        CapacityReservationName='string',
        CapacityAssignments=[
            {
                'WorkGroupNames': [
                    'string',
                ]
            },
        ]
    )
    
  :type CapacityReservationName: string
  :param CapacityReservationName: **[REQUIRED]** 

    The name of the capacity reservation to put a capacity assignment configuration for.

    

  
  :type CapacityAssignments: list
  :param CapacityAssignments: **[REQUIRED]** 

    The list of assignments for the capacity assignment configuration.

    

  
    - *(dict) --* 

      A mapping between one or more workgroups and a capacity reservation.

      

    
      - **WorkGroupNames** *(list) --* 

        The list of workgroup names for the capacity assignment.

        

      
        - *(string) --* 

        
    
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`Athena.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Athena.Client.exceptions.InternalServerException`

  