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

***********************
list_capacity_providers
***********************



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

  

  Returns a list of capacity providers in your account.

  

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


  **Request Syntax**
  ::

    response = client.list_capacity_providers(
        State='Pending'|'Active'|'Failed'|'Deleting',
        Marker='string',
        MaxItems=123
    )
    
  :type State: string
  :param State: 

    Filter capacity providers by their current state.

    

  
  :type Marker: string
  :param Marker: 

    Specify the pagination token that's returned by a previous request to retrieve the next page of results.

    

  
  :type MaxItems: integer
  :param MaxItems: 

    The maximum number of capacity providers to return.

    

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

    
    ::

      {
          'CapacityProviders': [
              {
                  'CapacityProviderArn': 'string',
                  'State': 'Pending'|'Active'|'Failed'|'Deleting',
                  'VpcConfig': {
                      'SubnetIds': [
                          'string',
                      ],
                      'SecurityGroupIds': [
                          'string',
                      ]
                  },
                  'PermissionsConfig': {
                      'CapacityProviderOperatorRoleArn': 'string'
                  },
                  'InstanceRequirements': {
                      'Architectures': [
                          'x86_64'|'arm64',
                      ],
                      'AllowedInstanceTypes': [
                          'string',
                      ],
                      'ExcludedInstanceTypes': [
                          'string',
                      ]
                  },
                  'CapacityProviderScalingConfig': {
                      'MaxVCpuCount': 123,
                      'ScalingMode': 'Auto'|'Manual',
                      'ScalingPolicies': [
                          {
                              'PredefinedMetricType': 'LambdaCapacityProviderAverageCPUUtilization',
                              'TargetValue': 123.0
                          },
                      ]
                  },
                  'KmsKeyArn': 'string',
                  'LastModified': 'string'
              },
          ],
          'NextMarker': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **CapacityProviders** *(list) --* 

        A list of capacity providers in your account.

        
        

        - *(dict) --* 

          A capacity provider manages compute resources for Lambda functions.

          
          

          - **CapacityProviderArn** *(string) --* 

            The Amazon Resource Name (ARN) of the capacity provider.

            
          

          - **State** *(string) --* 

            The current state of the capacity provider.

            
          

          - **VpcConfig** *(dict) --* 

            The VPC configuration for the capacity provider.

            
            

            - **SubnetIds** *(list) --* 

              A list of subnet IDs where the capacity provider launches compute instances.

              
              

              - *(string) --* 
          
            

            - **SecurityGroupIds** *(list) --* 

              A list of security group IDs that control network access for compute instances managed by the capacity provider.

              
              

              - *(string) --* 
          
        
          

          - **PermissionsConfig** *(dict) --* 

            The permissions configuration for the capacity provider.

            
            

            - **CapacityProviderOperatorRoleArn** *(string) --* 

              The ARN of the IAM role that the capacity provider uses to manage compute instances and other Amazon Web Services resources.

              
        
          

          - **InstanceRequirements** *(dict) --* 

            The instance requirements for compute resources managed by the capacity provider.

            
            

            - **Architectures** *(list) --* 

              A list of supported CPU architectures for compute instances. Valid values include ``x86_64`` and ``arm64``.

              
              

              - *(string) --* 
          
            

            - **AllowedInstanceTypes** *(list) --* 

              A list of EC2 instance types that the capacity provider is allowed to use. If not specified, all compatible instance types are allowed.

              
              

              - *(string) --* 
          
            

            - **ExcludedInstanceTypes** *(list) --* 

              A list of EC2 instance types that the capacity provider should not use, even if they meet other requirements.

              
              

              - *(string) --* 
          
        
          

          - **CapacityProviderScalingConfig** *(dict) --* 

            The scaling configuration for the capacity provider.

            
            

            - **MaxVCpuCount** *(integer) --* 

              The maximum number of vCPUs that the capacity provider can provision across all compute instances.

              
            

            - **ScalingMode** *(string) --* 

              The scaling mode that determines how the capacity provider responds to changes in demand.

              
            

            - **ScalingPolicies** *(list) --* 

              A list of scaling policies that define how the capacity provider scales compute instances based on metrics and thresholds.

              
              

              - *(dict) --* 

                A scaling policy for the capacity provider that automatically adjusts capacity to maintain a target value for a specific metric.

                
                

                - **PredefinedMetricType** *(string) --* 

                  The predefined metric type to track for scaling decisions.

                  
                

                - **TargetValue** *(float) --* 

                  The target value for the metric that the scaling policy attempts to maintain through scaling actions.

                  
            
          
        
          

          - **KmsKeyArn** *(string) --* 

            The ARN of the KMS key used to encrypt the capacity provider's resources.

            
          

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

            The date and time when the capacity provider was last modified.

            
      
    
      

      - **NextMarker** *(string) --* 

        The pagination token that's included if more results are available.

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

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

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

  