:doc:`ServiceQuotas <../../service-quotas>` / Client / list_service_quotas

*******************
list_service_quotas
*******************



.. py:method:: ServiceQuotas.Client.list_service_quotas(**kwargs)

  

  Lists the applied quota values for the specified Amazon Web Services service. For some quotas, only the default values are available. If the applied quota value is not available for a quota, the quota is not retrieved. Filter responses to return applied quota values at either the account level, resource level, or all levels.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/service-quotas-2019-06-24/ListServiceQuotas>`_  


  **Request Syntax**
  ::

    response = client.list_service_quotas(
        ServiceCode='string',
        NextToken='string',
        MaxResults=123,
        QuotaCode='string',
        QuotaAppliedAtLevel='ACCOUNT'|'RESOURCE'|'ALL'
    )
    
  :type ServiceCode: string
  :param ServiceCode: **[REQUIRED]** 

    Specifies the service identifier. To find the service code value for an Amazon Web Services service, use the  ListServices operation.

    

  
  :type NextToken: string
  :param NextToken: 

    Specifies a value for receiving additional results after you receive a ``NextToken`` response in a previous request. A ``NextToken`` response indicates that more output is available. Set this parameter to the value of the previous call's ``NextToken`` response to indicate where the output should continue from.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    Specifies the maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the ``NextToken`` response element is present and has a value (is not null). Include that value as the ``NextToken`` request parameter in the next call to the operation to get the next part of the results.

     

    .. note::

      

      An API operation can return fewer results than the maximum even when there are more results available. You should check ``NextToken`` after every operation to ensure that you receive all of the results.

      

    

  
  :type QuotaCode: string
  :param QuotaCode: 

    Specifies the quota identifier. To find the quota code for a specific quota, use the  ListServiceQuotas operation, and look for the ``QuotaCode`` response in the output for the quota you want.

    

  
  :type QuotaAppliedAtLevel: string
  :param QuotaAppliedAtLevel: 

    Filters the response to return applied quota values for the ``ACCOUNT``, ``RESOURCE``, or ``ALL`` levels. ``ACCOUNT`` is the default.

    

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

    
    ::

      {
          'NextToken': 'string',
          'Quotas': [
              {
                  'ServiceCode': 'string',
                  'ServiceName': 'string',
                  'QuotaArn': 'string',
                  'QuotaCode': 'string',
                  'QuotaName': 'string',
                  'Value': 123.0,
                  'Unit': 'string',
                  'Adjustable': True|False,
                  'GlobalQuota': True|False,
                  'UsageMetric': {
                      'MetricNamespace': 'string',
                      'MetricName': 'string',
                      'MetricDimensions': {
                          'string': 'string'
                      },
                      'MetricStatisticRecommendation': 'string'
                  },
                  'Period': {
                      'PeriodValue': 123,
                      'PeriodUnit': 'MICROSECOND'|'MILLISECOND'|'SECOND'|'MINUTE'|'HOUR'|'DAY'|'WEEK'
                  },
                  'ErrorReason': {
                      'ErrorCode': 'DEPENDENCY_ACCESS_DENIED_ERROR'|'DEPENDENCY_THROTTLING_ERROR'|'DEPENDENCY_SERVICE_ERROR'|'SERVICE_QUOTA_NOT_AVAILABLE_ERROR',
                      'ErrorMessage': 'string'
                  },
                  'QuotaAppliedAtLevel': 'ACCOUNT'|'RESOURCE'|'ALL',
                  'QuotaContext': {
                      'ContextScope': 'RESOURCE'|'ACCOUNT',
                      'ContextScopeType': 'string',
                      'ContextId': 'string'
                  },
                  'Description': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **NextToken** *(string) --* 

        If present, indicates that more output is available than is included in the current response. Use this value in the ``NextToken`` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the ``NextToken`` response element comes back as ``null``.

        
      

      - **Quotas** *(list) --* 

        Information about the quotas.

        
        

        - *(dict) --* 

          Information about a quota.

          
          

          - **ServiceCode** *(string) --* 

            Specifies the service identifier. To find the service code value for an Amazon Web Services service, use the  ListServices operation.

            
          

          - **ServiceName** *(string) --* 

            Specifies the service name.

            
          

          - **QuotaArn** *(string) --* 

            The Amazon Resource Name (ARN) of the quota.

            
          

          - **QuotaCode** *(string) --* 

            Specifies the quota identifier. To find the quota code for a specific quota, use the  ListServiceQuotas operation, and look for the ``QuotaCode`` response in the output for the quota you want.

            
          

          - **QuotaName** *(string) --* 

            Specifies the quota name.

            
          

          - **Value** *(float) --* 

            The quota value.

            
          

          - **Unit** *(string) --* 

            The unit of measurement.

            
          

          - **Adjustable** *(boolean) --* 

            Indicates whether the quota value can be increased.

            
          

          - **GlobalQuota** *(boolean) --* 

            Indicates whether the quota is global.

            
          

          - **UsageMetric** *(dict) --* 

            Information about the measurement.

            
            

            - **MetricNamespace** *(string) --* 

              The namespace of the metric.

              
            

            - **MetricName** *(string) --* 

              The name of the metric.

              
            

            - **MetricDimensions** *(dict) --* 

              The metric dimension. This is a name/value pair that is part of the identity of a metric.

              
              

              - *(string) --* 
                

                - *(string) --* 
          
        
            

            - **MetricStatisticRecommendation** *(string) --* 

              The metric statistic that we recommend you use when determining quota usage.

              
        
          

          - **Period** *(dict) --* 

            The period of time.

            
            

            - **PeriodValue** *(integer) --* 

              The value associated with the reported ``PeriodUnit``.

              
            

            - **PeriodUnit** *(string) --* 

              The time unit.

              
        
          

          - **ErrorReason** *(dict) --* 

            The error code and error reason.

            
            

            - **ErrorCode** *(string) --* 

              Service Quotas returns the following error values:

               

              
              * ``DEPENDENCY_ACCESS_DENIED_ERROR`` - The caller does not have the required permissions to complete the action. To resolve the error, you must have permission to access the Amazon Web Services service or quota.
               
              * ``DEPENDENCY_THROTTLING_ERROR`` - The Amazon Web Services service is throttling Service Quotas.
               
              * ``DEPENDENCY_SERVICE_ERROR`` - The Amazon Web Services service is not available.
               
              * ``SERVICE_QUOTA_NOT_AVAILABLE_ERROR`` - There was an error in Service Quotas.
              

              
            

            - **ErrorMessage** *(string) --* 

              The error message.

              
        
          

          - **QuotaAppliedAtLevel** *(string) --* 

            Filters the response to return applied quota values for the ``ACCOUNT``, ``RESOURCE``, or ``ALL`` levels. ``ACCOUNT`` is the default.

            
          

          - **QuotaContext** *(dict) --* 

            The context for this service quota.

            
            

            - **ContextScope** *(string) --* 

              Specifies the scope to which the quota value is applied. If the scope is ``RESOURCE``, the quota value is applied to each resource in the Amazon Web Services account. If the scope is ``ACCOUNT``, the quota value is applied to the Amazon Web Services account.

              
            

            - **ContextScopeType** *(string) --* 

              Specifies the resource type to which the quota can be applied.

              
            

            - **ContextId** *(string) --* 

              Specifies the resource, or resources, to which the quota applies. The value for this field is either an Amazon Resource Name (ARN) or *. If the value is an ARN, the quota value applies to that resource. If the value is *, then the quota value applies to all resources listed in the ``ContextScopeType`` field. The quota value applies to all resources for which you haven’t previously applied a quota value, and any new resources you create in your Amazon Web Services account.

              
        
          

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

            The quota description.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`ServiceQuotas.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`ServiceQuotas.Client.exceptions.NoSuchResourceException`

  
  *   :py:class:`ServiceQuotas.Client.exceptions.IllegalArgumentException`

  
  *   :py:class:`ServiceQuotas.Client.exceptions.InvalidPaginationTokenException`

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

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

  