:doc:`IoT <../../iot>` / Client / create_authorizer

*****************
create_authorizer
*****************



.. py:method:: IoT.Client.create_authorizer(**kwargs)

  

  Creates an authorizer.

   

  Requires permission to access the `CreateAuthorizer <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/CreateAuthorizer>`_  


  **Request Syntax**
  ::

    response = client.create_authorizer(
        authorizerName='string',
        authorizerFunctionArn='string',
        tokenKeyName='string',
        tokenSigningPublicKeys={
            'string': 'string'
        },
        status='ACTIVE'|'INACTIVE',
        tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        signingDisabled=True|False,
        enableCachingForHttp=True|False
    )
    
  :type authorizerName: string
  :param authorizerName: **[REQUIRED]** 

    The authorizer name.

    

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

    The ARN of the authorizer's Lambda function.

    

  
  :type tokenKeyName: string
  :param tokenKeyName: 

    The name of the token key used to extract the token from the HTTP headers.

    

  
  :type tokenSigningPublicKeys: dict
  :param tokenSigningPublicKeys: 

    The public keys used to verify the digital signature returned by your custom authentication service.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type status: string
  :param status: 

    The status of the create authorizer request.

    

  
  :type tags: list
  :param tags: 

    Metadata which can be used to manage the custom authorizer.

     

    .. note::

      

      For URI Request parameters use format: ...key1=value1&key2=value2...

       

      For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."

       

      For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

      

    

  
    - *(dict) --* 

      A set of key/value pairs that are used to manage the resource.

      

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

        The tag's key.

        

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

        The tag's value.

        

      
    

  :type signingDisabled: boolean
  :param signingDisabled: 

    Specifies whether IoT validates the token signature in an authorization request.

    

  
  :type enableCachingForHttp: boolean
  :param enableCachingForHttp: 

    When ``true``, the result from the authorizer’s Lambda function is cached for clients that use persistent HTTP connections. The results are cached for the time specified by the Lambda function in ``refreshAfterInSeconds``. This value does not affect authorization of clients that use MQTT connections.

     

    The default value is ``false``.

    

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

    
    ::

      {
          'authorizerName': 'string',
          'authorizerArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **authorizerName** *(string) --* 

        The authorizer's name.

        
      

      - **authorizerArn** *(string) --* 

        The authorizer ARN.

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.ResourceAlreadyExistsException`

  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoT.Client.exceptions.LimitExceededException`

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

  
  *   :py:class:`IoT.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`IoT.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`IoT.Client.exceptions.InternalFailureException`

  