:doc:`ConnectCases <../../connectcases>` / Client / create_field

************
create_field
************



.. py:method:: ConnectCases.Client.create_field(**kwargs)

  

  Creates a field in the Cases domain. This field is used to define the case object model (that is, defines what data can be captured on cases) in a Cases domain.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connectcases-2022-10-03/CreateField>`_  


  **Request Syntax**
  ::

    response = client.create_field(
        domainId='string',
        name='string',
        type='Text'|'Number'|'Boolean'|'DateTime'|'SingleSelect'|'Url'|'User',
        description='string',
        attributes={
            'text': {
                'isMultiline': True|False
            }
        }
    )
    
  :type domainId: string
  :param domainId: **[REQUIRED]** 

    The unique identifier of the Cases domain.

    

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

    The name of the field.

    

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

    Defines the data type, some system constraints, and default display of the field.

    

  
  :type description: string
  :param description: 

    The description of the field.

    

  
  :type attributes: dict
  :param attributes: 

    Union of field attributes.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``text``. 

  
    - **text** *(dict) --* 

      Field attributes for Text field type.

      

    
      - **isMultiline** *(boolean) --* **[REQUIRED]** 

        Attribute that defines rendering component and validation.

        

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

    
    ::

      {
          'fieldId': 'string',
          'fieldArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **fieldId** *(string) --* 

        The unique identifier of a field.

        
      

      - **fieldArn** *(string) --* 

        The Amazon Resource Name (ARN) of the field.

        
  
  **Exceptions**
  
  *   :py:class:`ConnectCases.Client.exceptions.InternalServerException`

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

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

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

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

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

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

  