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

****************
create_test_case
****************



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

  

  Creates a test case with its content and metadata for the specified Amazon Connect instance.

  

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


  **Request Syntax**
  ::

    response = client.create_test_case(
        InstanceId='string',
        Name='string',
        Description='string',
        Content='string',
        EntryPoint={
            'Type': 'VOICE_CALL',
            'VoiceCallEntryPointParameters': {
                'SourcePhoneNumber': 'string',
                'DestinationPhoneNumber': 'string',
                'FlowId': 'string'
            }
        },
        InitializationData='string',
        Status='PUBLISHED'|'SAVED',
        TestCaseId='string',
        Tags={
            'string': 'string'
        },
        LastModifiedTime=datetime(2015, 1, 1),
        LastModifiedRegion='string'
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance.

    

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

    The name of the test.

    

  
  :type Description: string
  :param Description: 

    The description of the test.

    

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

    The JSON string that represents the content of the test.

    

  
  :type EntryPoint: dict
  :param EntryPoint: 

    Defines the starting point for your test.

    

  
    - **Type** *(string) --* 

      The type of entry point.

      

    
    - **VoiceCallEntryPointParameters** *(dict) --* 

      Parameters for voice call entry point.

      

    
      - **SourcePhoneNumber** *(string) --* 

        The source phone number for the test.

        

      
      - **DestinationPhoneNumber** *(string) --* 

        The destination phone number for the test.

        

      
      - **FlowId** *(string) --* 

        The flow identifier for the test.

        

      
    
  
  :type InitializationData: string
  :param InitializationData: 

    Defines the initial custom attributes for your test.

    

  
  :type Status: string
  :param Status: 

    Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.

    

  
  :type TestCaseId: string
  :param TestCaseId: 

    Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency

    

  
  :type Tags: dict
  :param Tags: 

    The tags used to organize, track, or control access for this resource.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type LastModifiedTime: datetime
  :param LastModifiedTime: 

    The time at which the resource was last modified.

    

  
  :type LastModifiedRegion: string
  :param LastModifiedRegion: 

    The region in which the resource was last modified

    

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

    
    ::

      {
          'TestCaseId': 'string',
          'TestCaseArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **TestCaseId** *(string) --* 

        The identifier of the test.

        
      

      - **TestCaseArn** *(string) --* 

        The Amazon Resource Name (ARN) of the test.

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

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

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

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

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

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

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

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

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

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

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

  