:doc:`CloudWatchApplicationSignals <../../application-signals>` / Paginator / ListServiceStates

*****************
ListServiceStates
*****************



.. py:class:: CloudWatchApplicationSignals.Paginator.ListServiceStates

  ::

    
    paginator = client.get_paginator('list_service_states')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`CloudWatchApplicationSignals.Client.list_service_states`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/application-signals-2024-04-15/ListServiceStates>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          StartTime=datetime(2015, 1, 1),
          EndTime=datetime(2015, 1, 1),
          IncludeLinkedAccounts=True|False,
          AwsAccountId='string',
          AttributeFilters=[
              {
                  'AttributeFilterName': 'string',
                  'AttributeFilterValues': [
                      'string',
                  ]
              },
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type StartTime: datetime
    :param StartTime: **[REQUIRED]** 

      The start of the time period to retrieve service state information for. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example, ``1698778057``.

      

    
    :type EndTime: datetime
    :param EndTime: **[REQUIRED]** 

      The end of the time period to retrieve service state information for. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example, ``1698778057``.

      

    
    :type IncludeLinkedAccounts: boolean
    :param IncludeLinkedAccounts: 

      If you are using this operation in a monitoring account, specify ``true`` to include service states from source accounts in the returned data.

      

    
    :type AwsAccountId: string
    :param AwsAccountId: 

      The Amazon Web Services account ID to filter service states by. Use this to limit results to services from a specific account.

      

    
    :type AttributeFilters: list
    :param AttributeFilters: 

      A list of attribute filters to narrow down the services. You can filter by platform, environment, or other service attributes.

      

    
      - *(dict) --* 

        A structure that defines a filter for narrowing down results based on specific attribute values. This can be used to filter services by platform, environment, or other service characteristics.

        

      
        - **AttributeFilterName** *(string) --* **[REQUIRED]** 

          The name of the attribute to filter by, such as ``Platform``, ``Environment``, or ``BusinessUnit``.

          

        
        - **AttributeFilterValues** *(list) --* **[REQUIRED]** 

          An array of values to match for the specified attribute. Services that have any of these values for the attribute will be included in the results.

          

        
          - *(string) --* 

          
      
      
  
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

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

      
      ::

        {
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'ServiceStates': [
                {
                    'AttributeFilters': [
                        {
                            'AttributeFilterName': 'string',
                            'AttributeFilterValues': [
                                'string',
                            ]
                        },
                    ],
                    'Service': {
                        'string': 'string'
                    },
                    'LatestChangeEvents': [
                        {
                            'Timestamp': datetime(2015, 1, 1),
                            'AccountId': 'string',
                            'Region': 'string',
                            'Entity': {
                                'string': 'string'
                            },
                            'ChangeEventType': 'DEPLOYMENT'|'CONFIGURATION',
                            'EventId': 'string',
                            'UserName': 'string',
                            'EventName': 'string'
                        },
                    ]
                },
            ],
            
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **StartTime** *(datetime) --* 

          The start of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example, ``1698778057``.

          
        

        - **EndTime** *(datetime) --* 

          The end of the time period that the returned information applies to. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example, ``1698778057``.

          
        

        - **ServiceStates** *(list) --* 

          An array of structures, where each structure contains information about the state of one service, including its latest change events such as deployments.

          
          

          - *(dict) --* 

            A structure that contains information about the current state of a service, including its latest change events such as deployments and other state-changing activities.

            
            

            - **AttributeFilters** *(list) --* 

              The attribute filters that were applied when retrieving this service state information.

              
              

              - *(dict) --* 

                A structure that defines a filter for narrowing down results based on specific attribute values. This can be used to filter services by platform, environment, or other service characteristics.

                
                

                - **AttributeFilterName** *(string) --* 

                  The name of the attribute to filter by, such as ``Platform``, ``Environment``, or ``BusinessUnit``.

                  
                

                - **AttributeFilterValues** *(list) --* 

                  An array of values to match for the specified attribute. Services that have any of these values for the attribute will be included in the results.

                  
                  

                  - *(string) --* 
              
            
          
            

            - **Service** *(dict) --* 

              The key attributes that identify this service, including Type, Name, and Environment information.

              
              

              - *(string) --* 
                

                - *(string) --* 
          
        
            

            - **LatestChangeEvents** *(list) --* 

              An array containing the most recent change events for this service, such as deployments, with information about when they occurred and who initiated them.

              
              

              - *(dict) --* 

                A structure that contains information about a change event that occurred for a service, such as a deployment or configuration change.

                
                

                - **Timestamp** *(datetime) --* 

                  The timestamp when this change event occurred. When used in a raw HTTP Query API, it is formatted as epoch time in seconds.

                  
                

                - **AccountId** *(string) --* 

                  The Amazon Web Services account ID where this change event occurred.

                  
                

                - **Region** *(string) --* 

                  The Amazon Web Services region where this change event occurred.

                  
                

                - **Entity** *(dict) --* 

                  The entity (service or resource) that was affected by this change event, including its key attributes.

                   

                  This is a string-to-string map. It can include the following fields.

                   

                  
                  * ``Type`` designates the type of object this is.
                   
                  * ``ResourceType`` specifies the type of the resource. This field is used only when the value of the ``Type`` field is ``Resource`` or ``AWS::Resource``.
                   
                  * ``Name`` specifies the name of the object. This is used only if the value of the ``Type`` field is ``Service``, ``RemoteService``, or ``AWS::Service``.
                   
                  * ``Identifier`` identifies the resource objects of this resource. This is used only if the value of the ``Type`` field is ``Resource`` or ``AWS::Resource``.
                   
                  * ``Environment`` specifies the location where this object is hosted, or what it belongs to.
                   
                  * ``AwsAccountId`` specifies the account where this object is in.
                  

                   

                  Below is an example of a service.

                   

                  ``{ "Type": "Service", "Name": "visits-service", "Environment": "petclinic-test" }``

                   

                  Below is an example of a resource.

                   

                  ``{ "Type": "AWS::Resource", "ResourceType": "AWS::DynamoDB::Table", "Identifier": "Customers" }``

                  
                  

                  - *(string) --* 
                    

                    - *(string) --* 
              
            
                

                - **ChangeEventType** *(string) --* 

                  The type of change event that occurred, such as ``DEPLOYMENT``.

                  
                

                - **EventId** *(string) --* 

                  A unique identifier for this change event. For CloudTrail-based events, this is the CloudTrail event id. For other events, this will be ``Unknown``.

                  
                

                - **UserName** *(string) --* 

                  The name of the user who initiated this change event, if available.

                  
                

                - **EventName** *(string) --* 

                  The name or description of this change event.

                  
            
          
        
      
    