:doc:`Connect <../../connect>` / Client / search_predefined_attributes

****************************
search_predefined_attributes
****************************



.. py:method:: Connect.Client.search_predefined_attributes(**kwargs)

  

  Searches predefined attributes that meet certain criteria. A *predefined attribute* is made up of a name and a value. You can use predefined attributes for:

   

  
  * Routing proficiency (for example, agent certification) that has predefined values (for example, a list of possible certifications). For more information, see `Create predefined attributes for routing contacts to agents <https://docs.aws.amazon.com/connect/latest/adminguide/predefined-attributes.html>`__.
   
  * Contact information that varies between transfers or conferences, such as the name of the business unit handling the contact. For more information, see `Use contact segment attributes <https://docs.aws.amazon.com/connect/latest/adminguide/use-contact-segment-attributes.html>`__.
  

   

  For the predefined attributes per instance quota, see `Amazon Connect quotas <https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html#connect-quotas>`__.

   

  **Endpoints**: See `Amazon Connect endpoints and quotas <https://docs.aws.amazon.com/general/latest/gr/connect_region.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/SearchPredefinedAttributes>`_  


  **Request Syntax**
  ::

    response = client.search_predefined_attributes(
        InstanceId='string',
        NextToken='string',
        MaxResults=123,
        SearchCriteria={
            'OrConditions': [
                {'... recursive ...'},
            ],
            'AndConditions': [
                {'... recursive ...'},
            ],
            'StringCondition': {
                'FieldName': 'string',
                'Value': 'string',
                'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
            }
        }
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

    

  
  :type NextToken: string
  :param NextToken: 

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return per page.

    

  
  :type SearchCriteria: dict
  :param SearchCriteria: 

    The search criteria to be used to return predefined attributes.

    

  
    - **OrConditions** *(list) --* 

      A list of conditions which would be applied together with an ``OR`` condition.

      

    
      - *(dict) --* 

        The search criteria to be used to return predefined attributes.

        

      
  
    - **AndConditions** *(list) --* 

      A list of conditions which would be applied together with an ``AND`` condition.

      

    
      - *(dict) --* 

        The search criteria to be used to return predefined attributes.

        

      
  
    - **StringCondition** *(dict) --* 

      A leaf node condition which can be used to specify a string condition.

      

    
      - **FieldName** *(string) --* 

        The name of the field in the string condition.

        

      
      - **Value** *(string) --* 

        The value of the string.

        

      
      - **ComparisonType** *(string) --* 

        The type of comparison to be made when evaluating the string condition.

        

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

    
    ::

      {
          'PredefinedAttributes': [
              {
                  'Name': 'string',
                  'Values': {
                      'StringList': [
                          'string',
                      ]
                  },
                  'Purposes': [
                      'string',
                  ],
                  'AttributeConfiguration': {
                      'EnableValueValidationOnAssociation': True|False,
                      'IsReadOnly': True|False
                  },
                  'LastModifiedTime': datetime(2015, 1, 1),
                  'LastModifiedRegion': 'string'
              },
          ],
          'NextToken': 'string',
          'ApproximateTotalCount': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **PredefinedAttributes** *(list) --* 

        Predefined attributes matched by the search criteria.

        
        

        - *(dict) --* 

          Information about a predefined attribute.

          
          

          - **Name** *(string) --* 

            The name of the predefined attribute.

            
          

          - **Values** *(dict) --* 

            The values of the predefined attribute.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``StringList``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **StringList** *(list) --* 

              Predefined attribute values of type string list.

              
              

              - *(string) --* 
          
        
          

          - **Purposes** *(list) --* 

            Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Amazon Connect admin website.

            
            

            - *(string) --* 
        
          

          - **AttributeConfiguration** *(dict) --* 

            Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Amazon Connect admin website.

            
            

            - **EnableValueValidationOnAssociation** *(boolean) --* 

              When this parameter is set to true, Amazon Connect enforces strict validation on the specific values, if the values are predefined in attributes. The contact will store only valid and predefined values for teh predefined attribute key.

              
            

            - **IsReadOnly** *(boolean) --* 

              A boolean flag used to indicate whether a predefined attribute should be displayed in the Amazon Connect admin website.

              
        
          

          - **LastModifiedTime** *(datetime) --* 

            Last modified time.

            
          

          - **LastModifiedRegion** *(string) --* 

            Last modified region.

            
      
    
      

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

        The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

        
      

      - **ApproximateTotalCount** *(integer) --* 

        The approximate number of predefined attributes which matched your search query.

        
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Connect.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`Connect.Client.exceptions.ResourceNotFoundException`

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

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  