:doc:`MigrationHubRefactorSpaces <../../migration-hub-refactor-spaces>` / Client / list_routes

***********
list_routes
***********



.. py:method:: MigrationHubRefactorSpaces.Client.list_routes(**kwargs)

  

  Lists all the Amazon Web Services Migration Hub Refactor Spaces routes within an application.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/migration-hub-refactor-spaces-2021-10-26/ListRoutes>`_  


  **Request Syntax**
  ::

    response = client.list_routes(
        ApplicationIdentifier='string',
        EnvironmentIdentifier='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type ApplicationIdentifier: string
  :param ApplicationIdentifier: **[REQUIRED]** 

    The ID of the application.

    

  
  :type EnvironmentIdentifier: string
  :param EnvironmentIdentifier: **[REQUIRED]** 

    The ID of the environment.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned ``nextToken`` value.

    

  
  :type NextToken: string
  :param NextToken: 

    The token for the next page of results.

    

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

    
    ::

      {
          'NextToken': 'string',
          'RouteSummaryList': [
              {
                  'AppendSourcePath': True|False,
                  'ApplicationId': 'string',
                  'Arn': 'string',
                  'CreatedByAccountId': 'string',
                  'CreatedTime': datetime(2015, 1, 1),
                  'EnvironmentId': 'string',
                  'Error': {
                      'AccountId': 'string',
                      'AdditionalDetails': {
                          'string': 'string'
                      },
                      'Code': 'INVALID_RESOURCE_STATE'|'RESOURCE_LIMIT_EXCEEDED'|'RESOURCE_CREATION_FAILURE'|'RESOURCE_UPDATE_FAILURE'|'SERVICE_ENDPOINT_HEALTH_CHECK_FAILURE'|'RESOURCE_DELETION_FAILURE'|'RESOURCE_RETRIEVAL_FAILURE'|'RESOURCE_IN_USE'|'RESOURCE_NOT_FOUND'|'STATE_TRANSITION_FAILURE'|'REQUEST_LIMIT_EXCEEDED'|'NOT_AUTHORIZED',
                      'Message': 'string',
                      'ResourceIdentifier': 'string',
                      'ResourceType': 'ENVIRONMENT'|'APPLICATION'|'ROUTE'|'SERVICE'|'TRANSIT_GATEWAY'|'TRANSIT_GATEWAY_ATTACHMENT'|'API_GATEWAY'|'NLB'|'TARGET_GROUP'|'LOAD_BALANCER_LISTENER'|'VPC_LINK'|'LAMBDA'|'VPC'|'SUBNET'|'ROUTE_TABLE'|'SECURITY_GROUP'|'VPC_ENDPOINT_SERVICE_CONFIGURATION'|'RESOURCE_SHARE'|'IAM_ROLE'
                  },
                  'IncludeChildPaths': True|False,
                  'LastUpdatedTime': datetime(2015, 1, 1),
                  'Methods': [
                      'DELETE'|'GET'|'HEAD'|'OPTIONS'|'PATCH'|'POST'|'PUT',
                  ],
                  'OwnerAccountId': 'string',
                  'PathResourceToId': {
                      'string': 'string'
                  },
                  'RouteId': 'string',
                  'RouteType': 'DEFAULT'|'URI_PATH',
                  'ServiceId': 'string',
                  'SourcePath': 'string',
                  'State': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'UPDATING'|'INACTIVE',
                  'Tags': {
                      'string': 'string'
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The token for the next page of results.

        
      

      - **RouteSummaryList** *(list) --* 

        The list of ``RouteSummary`` objects.

        
        

        - *(dict) --* 

          The summary information for the routes as a response to ``ListRoutes``.

          
          

          - **AppendSourcePath** *(boolean) --* 

            If set to ``true``, this option appends the source path to the service URL endpoint.

            
          

          - **ApplicationId** *(string) --* 

            The unique identifier of the application.

            
          

          - **Arn** *(string) --* 

            The Amazon Resource Name (ARN) of the route.

            
          

          - **CreatedByAccountId** *(string) --* 

            The Amazon Web Services account ID of the route creator.

            
          

          - **CreatedTime** *(datetime) --* 

            A timestamp that indicates when the route is created.

            
          

          - **EnvironmentId** *(string) --* 

            The unique identifier of the environment.

            
          

          - **Error** *(dict) --* 

            Any error associated with the route resource.

            
            

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

              The Amazon Web Services account ID of the resource owner.

              
            

            - **AdditionalDetails** *(dict) --* 

              Additional details about the error.

              
              

              - *(string) --* 
                

                - *(string) --* 
          
        
            

            - **Code** *(string) --* 

              The error code associated with the error.

              
            

            - **Message** *(string) --* 

              The message associated with the error.

              
            

            - **ResourceIdentifier** *(string) --* 

              The ID of the resource.

              
            

            - **ResourceType** *(string) --* 

              The type of resource.

              
        
          

          - **IncludeChildPaths** *(boolean) --* 

            Indicates whether to match all subpaths of the given source path. If this value is ``false``, requests must match the source path exactly before they are forwarded to this route's service.

            
          

          - **LastUpdatedTime** *(datetime) --* 

            A timestamp that indicates when the route was last updated.

            
          

          - **Methods** *(list) --* 

            A list of HTTP methods to match. An empty list matches all values. If a method is present, only HTTP requests using that method are forwarded to this route’s service.

            
            

            - *(string) --* 
        
          

          - **OwnerAccountId** *(string) --* 

            The Amazon Web Services account ID of the route owner.

            
          

          - **PathResourceToId** *(dict) --* 

            A mapping of Amazon API Gateway path resources to resource IDs.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

          - **RouteId** *(string) --* 

            The unique identifier of the route.

            
          

          - **RouteType** *(string) --* 

            The route type of the route.

            
          

          - **ServiceId** *(string) --* 

            The unique identifier of the service.

            
          

          - **SourcePath** *(string) --* 

            This is the path that Refactor Spaces uses to match traffic. Paths must start with ``/`` and are relative to the base of the application. To use path parameters in the source path, add a variable in curly braces. For example, the resource path {user} represents a path parameter called 'user'.

            
          

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

            The current state of the route.

            
          

          - **Tags** *(dict) --* 

            The tags assigned to the route.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
    
  
  **Exceptions**
  
  *   :py:class:`MigrationHubRefactorSpaces.Client.exceptions.ResourceNotFoundException`

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

  
  *   :py:class:`MigrationHubRefactorSpaces.Client.exceptions.ConflictException`

  
  *   :py:class:`MigrationHubRefactorSpaces.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`MigrationHubRefactorSpaces.Client.exceptions.ValidationException`

  
  *   :py:class:`MigrationHubRefactorSpaces.Client.exceptions.ThrottlingException`

  
  *   :py:class:`MigrationHubRefactorSpaces.Client.exceptions.AccessDeniedException`

  