:doc:`CloudFormation <../../cloudformation>` / Client / list_resource_scan_related_resources

************************************
list_resource_scan_related_resources
************************************



.. py:method:: CloudFormation.Client.list_resource_scan_related_resources(**kwargs)

  

  Lists the related resources for a list of resources from a resource scan. The response indicates whether each returned resource is already managed by CloudFormation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/ListResourceScanRelatedResources>`_  


  **Request Syntax**
  ::

    response = client.list_resource_scan_related_resources(
        ResourceScanId='string',
        Resources=[
            {
                'ResourceType': 'string',
                'ResourceIdentifier': {
                    'string': 'string'
                }
            },
        ],
        NextToken='string',
        MaxResults=123
    )
    
  :type ResourceScanId: string
  :param ResourceScanId: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the resource scan.

    

  
  :type Resources: list
  :param Resources: **[REQUIRED]** 

    The list of resources for which you want to get the related resources. Up to 100 resources can be provided.

    

  
    - *(dict) --* 

      Identifies a scanned resource. This is used with the ``ListResourceScanRelatedResources`` API action.

      

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

        The type of the resource, such as ``AWS::DynamoDB::Table``. For the list of supported resources, see `Resource type support for imports and drift detection <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import-supported-resources.html>`__ In the *CloudFormation User Guide*.

        

      
      - **ResourceIdentifier** *(dict) --* **[REQUIRED]** 

        A list of up to 256 key-value pairs that identifies the scanned resource. The key is the name of one of the primary identifiers for the resource. (Primary identifiers are specified in the ``primaryIdentifier`` list in the resource schema.) The value is the value of that primary identifier. For example, for a ``AWS::DynamoDB::Table`` resource, the primary identifiers is ``TableName`` so the key-value pair could be ``"TableName": "MyDDBTable"``. For more information, see `primaryIdentifier <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-primaryidentifier>`__ in the *CloudFormation Command Line Interface (CLI) User Guide*.

        

      
        - *(string) --* 

        
          - *(string) --* 

          
    
  
    

  :type NextToken: string
  :param NextToken: 

    The token for the next set of items to return. (You received this token from a previous call.)

    

  
  :type MaxResults: integer
  :param MaxResults: 

    If the number of available results exceeds this maximum, the response includes a ``NextToken`` value that you can use for the ``NextToken`` parameter to get the next set of results. By default the ``ListResourceScanRelatedResources`` API action will return up to 100 results in each response. The maximum value is 100.

    

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

    
    ::

      {
          'RelatedResources': [
              {
                  'ResourceType': 'string',
                  'ResourceIdentifier': {
                      'string': 'string'
                  },
                  'ManagedByStack': True|False
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RelatedResources** *(list) --* 

        List of up to ``MaxResults`` resources in the specified resource scan related to the specified resources.

        
        

        - *(dict) --* 

          A scanned resource returned by ``ListResourceScanResources`` or ``ListResourceScanRelatedResources``.

          
          

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

            The type of the resource, such as ``AWS::DynamoDB::Table``. For the list of supported resources, see `Resource type support for imports and drift detection <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import-supported-resources.html>`__ In the *CloudFormation User Guide*

            
          

          - **ResourceIdentifier** *(dict) --* 

            A list of up to 256 key-value pairs that identifies for the scanned resource. The key is the name of one of the primary identifiers for the resource. (Primary identifiers are specified in the ``primaryIdentifier`` list in the resource schema.) The value is the value of that primary identifier. For example, for a ``AWS::DynamoDB::Table`` resource, the primary identifiers is ``TableName`` so the key-value pair could be ``"TableName": "MyDDBTable"``. For more information, see `primaryIdentifier <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-primaryidentifier>`__ in the *CloudFormation Command Line Interface (CLI) User Guide*.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

          - **ManagedByStack** *(boolean) --* 

            If ``true``, the resource is managed by a CloudFormation stack.

            
      
    
      

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

        If the request doesn't return all the remaining results, ``NextToken`` is set to a token. To retrieve the next set of results, call ``ListResourceScanRelatedResources`` again and use that value for the ``NextToken`` parameter. If the request returns all results, ``NextToken`` is set to an empty string.

        
  
  **Exceptions**
  
  *   :py:class:`CloudFormation.Client.exceptions.ResourceScanNotFoundException`

  
  *   :py:class:`CloudFormation.Client.exceptions.ResourceScanInProgressException`

  