:doc:`Inspector <../../inspector>` / Client / list_assessment_templates

*************************
list_assessment_templates
*************************



.. py:method:: Inspector.Client.list_assessment_templates(**kwargs)

  

  Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListAssessmentTemplates>`_  


  **Request Syntax**
  ::

    response = client.list_assessment_templates(
        assessmentTargetArns=[
            'string',
        ],
        filter={
            'namePattern': 'string',
            'durationRange': {
                'minSeconds': 123,
                'maxSeconds': 123
            },
            'rulesPackageArns': [
                'string',
            ]
        },
        nextToken='string',
        maxResults=123
    )
    
  :type assessmentTargetArns: list
  :param assessmentTargetArns: 

    A list of ARNs that specifies the assessment targets whose assessment templates you want to list.

    

  
    - *(string) --* 

    

  :type filter: dict
  :param filter: 

    You can use this parameter to specify a subset of data to be included in the action's response.

     

    For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.

    

  
    - **namePattern** *(string) --* 

      For a record to match a filter, an explicit value or a string that contains a wildcard that is specified for this data type property must match the value of the **assessmentTemplateName** property of the  AssessmentTemplate data type.

      

    
    - **durationRange** *(dict) --* 

      For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the **durationInSeconds** property of the  AssessmentTemplate data type.

      

    
      - **minSeconds** *(integer) --* 

        The minimum value of the duration range. Must be greater than zero.

        

      
      - **maxSeconds** *(integer) --* 

        The maximum value of the duration range. Must be less than or equal to 604800 seconds (1 week).

        

      
    
    - **rulesPackageArns** *(list) --* 

      For a record to match a filter, the values that are specified for this data type property must be contained in the list of values of the **rulesPackageArns** property of the  AssessmentTemplate data type.

      

    
      - *(string) --* 

      
  
  
  :type nextToken: string
  :param nextToken: 

    You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the **ListAssessmentTemplates** action. Subsequent calls to the action fill **nextToken** in the request with the value of **NextToken** from the previous response to continue listing data.

    

  
  :type maxResults: integer
  :param maxResults: 

    You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.

    

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

    
    ::

      {
          'assessmentTemplateArns': [
              'string',
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **assessmentTemplateArns** *(list) --* 

        A list of ARNs that specifies the assessment templates returned by the action.

        
        

        - *(string) --* 
    
      

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

        When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the **nextToken** parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.

        
  
  **Exceptions**
  
  *   :py:class:`Inspector.Client.exceptions.InternalException`

  
  *   :py:class:`Inspector.Client.exceptions.InvalidInputException`

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

  
  *   :py:class:`Inspector.Client.exceptions.NoSuchEntityException`

  

  **Examples**

  Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.
  ::

    response = client.list_assessment_templates(
        assessmentTargetArns=[
            'arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq',
        ],
        maxResults=123,
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'assessmentTemplateArns': [
            'arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw',
            'arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-Uza6ihLh',
        ],
        'nextToken': '1',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  