:doc:`FraudDetector <../../frauddetector>` / Client / create_variable

***************
create_variable
***************



.. py:method:: FraudDetector.Client.create_variable(**kwargs)

  

  Creates a variable.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/frauddetector-2019-11-15/CreateVariable>`_  


  **Request Syntax**
  ::

    response = client.create_variable(
        name='string',
        dataType='STRING'|'INTEGER'|'FLOAT'|'BOOLEAN'|'DATETIME',
        dataSource='EVENT'|'MODEL_SCORE'|'EXTERNAL_MODEL_SCORE',
        defaultValue='string',
        description='string',
        variableType='string',
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the variable.

    

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

    The data type of the variable.

    

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

    The source of the data.

    

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

    The default value for the variable when no value is received.

    

  
  :type description: string
  :param description: 

    The description.

    

  
  :type variableType: string
  :param variableType: 

    The variable type. For more information see `Variable types <https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types>`__.

     

    Valid Values: ``AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT``

    

  
  :type tags: list
  :param tags: 

    A collection of key and value pairs.

    

  
    - *(dict) --* 

      A key and value pair.

      

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

        A tag key.

        

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

        A value assigned to a tag key.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`FraudDetector.Client.exceptions.ValidationException`

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

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

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

  