:doc:`Batch <../../batch>` / Client / describe_service_environments

*****************************
describe_service_environments
*****************************



.. py:method:: Batch.Client.describe_service_environments(**kwargs)

  

  Describes one or more of your service environments.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeServiceEnvironments>`_  


  **Request Syntax**
  ::

    response = client.describe_service_environments(
        serviceEnvironments=[
            'string',
        ],
        maxResults=123,
        nextToken='string'
    )
    
  :type serviceEnvironments: list
  :param serviceEnvironments: 

    An array of service environment names or ARN entries.

    

  
    - *(string) --* 

    

  :type maxResults: integer
  :param maxResults: 

    The maximum number of results returned by ``DescribeServiceEnvironments`` in paginated output. When this parameter is used, ``DescribeServiceEnvironments`` only returns ``maxResults`` results in a single page and a ``nextToken`` response element. The remaining results of the initial request can be seen by sending another ``DescribeServiceEnvironments`` request with the returned ``nextToken`` value. This value can be between 1 and 100. If this parameter isn't used, then ``DescribeServiceEnvironments`` returns up to 100 results and a ``nextToken`` value if applicable.

    

  
  :type nextToken: string
  :param nextToken: 

    The ``nextToken`` value returned from a previous paginated ``DescribeServiceEnvironments`` request where ``maxResults`` was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the ``nextToken`` value. This value is ``null`` when there are no more results to return.

     

    .. note::

      

      Treat this token as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.

      

    

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

    
    ::

      {
          'serviceEnvironments': [
              {
                  'serviceEnvironmentName': 'string',
                  'serviceEnvironmentArn': 'string',
                  'serviceEnvironmentType': 'SAGEMAKER_TRAINING',
                  'state': 'ENABLED'|'DISABLED',
                  'status': 'CREATING'|'UPDATING'|'DELETING'|'DELETED'|'VALID'|'INVALID',
                  'capacityLimits': [
                      {
                          'maxCapacity': 123,
                          'capacityUnit': 'string'
                      },
                  ],
                  'tags': {
                      'string': 'string'
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **serviceEnvironments** *(list) --* 

        The list of service environments that match the request.

        
        

        - *(dict) --* 

          Detailed information about a service environment, including its configuration, state, and capacity limits.

          
          

          - **serviceEnvironmentName** *(string) --* 

            The name of the service environment.

            
          

          - **serviceEnvironmentArn** *(string) --* 

            The Amazon Resource Name (ARN) of the service environment.

            
          

          - **serviceEnvironmentType** *(string) --* 

            The type of service environment. For SageMaker Training jobs, this value is ``SAGEMAKER_TRAINING``.

            
          

          - **state** *(string) --* 

            The state of the service environment. Valid values are ``ENABLED`` and ``DISABLED``.

            
          

          - **status** *(string) --* 

            The current status of the service environment.

            
          

          - **capacityLimits** *(list) --* 

            The capacity limits for the service environment. This defines the maximum resources that can be used by service jobs in this environment.

            
            

            - *(dict) --* 

              Defines the capacity limit for a service environment. This structure specifies the maximum amount of resources that can be used by service jobs in the environment.

              
              

              - **maxCapacity** *(integer) --* 

                The maximum capacity available for the service environment. This value represents the maximum amount of resources that can be allocated to service jobs.

                 

                For example, ``maxCapacity=50``, ``capacityUnit=NUM_INSTANCES``. This indicates that the maximum number of instances that can be run on this service environment is 50. You could then run 5 SageMaker Training jobs that each use 10 instances. However, if you submit another job that requires 10 instances, it will wait in the queue.

                
              

              - **capacityUnit** *(string) --* 

                The unit of measure for the capacity limit. This defines how the maxCapacity value should be interpreted. For ``SAGEMAKER_TRAINING`` jobs, use ``NUM_INSTANCES``.

                
          
        
          

          - **tags** *(dict) --* 

            The tags associated with the service environment. Each tag consists of a key and an optional value. For more information, see `Tagging your Batch resources <https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html>`__.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
    
      

      - **nextToken** *(string) --* 

        The ``nextToken`` value to include in a future ``DescribeServiceEnvironments`` request. When the results of a ``DescribeServiceEnvironments`` request exceed ``maxResults``, this value can be used to retrieve the next page of results. This value is ``null`` when there are no more results to return.

        
  
  **Exceptions**
  
  *   :py:class:`Batch.Client.exceptions.ClientException`

  
  *   :py:class:`Batch.Client.exceptions.ServerException`

  