Amazon Fraud Detector

2023/06/05 - Amazon Fraud Detector - 3 updated api methods

Changes  Added new variable types, new DateTime data type, and new rules engine functions for interacting and working with DateTime data types.

BatchGetVariable (updated) Link ¶
Changes (response)
{'variables': {'dataType': {'DATETIME'}}}

Gets a batch of variables.

See also: AWS API Documentation

Request Syntax

client.batch_get_variable(
    names=[
        'string',
    ]
)
type names

list

param names

[REQUIRED]

The list of variable names to get.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'variables': [
        {
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'FLOAT'|'BOOLEAN'|'DATETIME',
            'dataSource': 'EVENT'|'MODEL_SCORE'|'EXTERNAL_MODEL_SCORE',
            'defaultValue': 'string',
            'description': 'string',
            'variableType': 'string',
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'errors': [
        {
            'name': 'string',
            'code': 123,
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • variables (list) --

      The returned variables.

      • (dict) --

        The variable.

        • name (string) --

          The name of the variable.

        • dataType (string) --

          The data type of the variable. For more information see Variable types .

        • dataSource (string) --

          The data source of the variable.

        • defaultValue (string) --

          The default value of the variable.

        • description (string) --

          The description of the variable.

        • variableType (string) --

          The variable type of the variable.

          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

        • lastUpdatedTime (string) --

          The time when variable was last updated.

        • createdTime (string) --

          The time when the variable was created.

        • arn (string) --

          The ARN of the variable.

    • errors (list) --

      The errors from the request.

      • (dict) --

        Provides the error of the batch get variable API.

        • name (string) --

          The error name.

        • code (integer) --

          The error code.

        • message (string) --

          The error message.

CreateVariable (updated) Link ¶
Changes (request)
{'dataType': {'DATETIME'}}

Creates a variable.

See also: AWS API Documentation

Request Syntax

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 .

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) --

GetVariables (updated) Link ¶
Changes (response)
{'variables': {'dataType': {'DATETIME'}}}

Gets all of the variables or the specific variable. This is a paginated API. Providing null maxSizePerPage results in retrieving maximum of 100 records per page. If you provide maxSizePerPage the value must be between 50 and 100. To get the next page result, a provide a pagination token from GetVariablesResult as part of your request. Null pagination token fetches the records from the beginning.

See also: AWS API Documentation

Request Syntax

client.get_variables(
    name='string',
    nextToken='string',
    maxResults=123
)
type name

string

param name

The name of the variable.

type nextToken

string

param nextToken

The next page token of the get variable request.

type maxResults

integer

param maxResults

The max size per page determined for the get variable request.

rtype

dict

returns

Response Syntax

{
    'variables': [
        {
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'FLOAT'|'BOOLEAN'|'DATETIME',
            'dataSource': 'EVENT'|'MODEL_SCORE'|'EXTERNAL_MODEL_SCORE',
            'defaultValue': 'string',
            'description': 'string',
            'variableType': 'string',
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • variables (list) --

      The names of the variables returned.

      • (dict) --

        The variable.

        • name (string) --

          The name of the variable.

        • dataType (string) --

          The data type of the variable. For more information see Variable types .

        • dataSource (string) --

          The data source of the variable.

        • defaultValue (string) --

          The default value of the variable.

        • description (string) --

          The description of the variable.

        • variableType (string) --

          The variable type of the variable.

          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

        • lastUpdatedTime (string) --

          The time when variable was last updated.

        • createdTime (string) --

          The time when the variable was created.

        • arn (string) --

          The ARN of the variable.

    • nextToken (string) --

      The next page token to be used in subsequent requests.