:doc:`PrivateCAConnectorforSCEP <../../pca-connector-scep>` / Client / create_challenge

****************
create_challenge
****************



.. py:method:: PrivateCAConnectorforSCEP.Client.create_challenge(**kwargs)

  

  For general-purpose connectors. Creates a *challenge password* for the specified connector. The SCEP protocol uses a challenge password to authenticate a request before issuing a certificate from a certificate authority (CA). Your SCEP clients include the challenge password as part of their certificate request to Connector for SCEP. To retrieve the connector Amazon Resource Names (ARNs) for the connectors in your account, call `ListConnectors <https://docs.aws.amazon.com/C4SCEP_API/pca-connector-scep/latest/APIReference/API_ListConnectors.html>`__.

   

  To create additional challenge passwords for the connector, call ``CreateChallenge`` again. We recommend frequently rotating your challenge passwords.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pca-connector-scep-2018-05-10/CreateChallenge>`_  


  **Request Syntax**
  ::

    response = client.create_challenge(
        ConnectorArn='string',
        ClientToken='string',
        Tags={
            'string': 'string'
        }
    )
    
  :type ConnectorArn: string
  :param ConnectorArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the connector that you want to create a challenge for.

    

  
  :type ClientToken: string
  :param ClientToken: 

    Custom string that can be used to distinguish between calls to the `CreateChallenge <https://docs.aws.amazon.com/C4SCEP_API/pca-connector-scep/latest/APIReference/API_CreateChallenge.html>`__ action. Client tokens for ``CreateChallenge`` time out after five minutes. Therefore, if you call ``CreateChallenge`` multiple times with the same client token within five minutes, Connector for SCEP recognizes that you are requesting only one challenge and will only respond with one. If you change the client token for each call, Connector for SCEP recognizes that you are requesting multiple challenge passwords.

    This field is autopopulated if not provided.

  
  :type Tags: dict
  :param Tags: 

    The key-value pairs to associate with the resource.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'Challenge': {
              'Arn': 'string',
              'ConnectorArn': 'string',
              'CreatedAt': datetime(2015, 1, 1),
              'UpdatedAt': datetime(2015, 1, 1),
              'Password': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Challenge** *(dict) --* 

        Returns the challenge details for the specified connector.

        
        

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

          The Amazon Resource Name (ARN) of the challenge.

          
        

        - **ConnectorArn** *(string) --* 

          The Amazon Resource Name (ARN) of the connector.

          
        

        - **CreatedAt** *(datetime) --* 

          The date and time that the challenge was created.

          
        

        - **UpdatedAt** *(datetime) --* 

          The date and time that the challenge was updated.

          
        

        - **Password** *(string) --* 

          The SCEP challenge password, in UUID format.

          
    
  
  **Exceptions**
  
  *   :py:class:`PrivateCAConnectorforSCEP.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`PrivateCAConnectorforSCEP.Client.exceptions.BadRequestException`

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

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

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

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

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

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

  