Amazon Fraud Detector

2023/02/15 - Amazon Fraud Detector - 5 new api methods

Changes  This release introduces Lists feature which allows customers to reference a set of values in Fraud Detector's rules. With Lists, customers can dynamically manage these attributes in real time. Lists can be created/deleted and its contents can be modified using the Fraud Detector API.

CreateList (new) Link ¶

Creates a list.

List is a set of input data for a variable in your event dataset. You use the input data in a rule that's associated with your detector. For more information, see Lists.

See also: AWS API Documentation

Request Syntax

client.create_list(
    name='string',
    elements=[
        'string',
    ],
    variableType='string',
    description='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type name

string

param name

[REQUIRED]

The name of the list.

type elements

list

param elements

The names of the elements, if providing. You can also create an empty list and add elements later using the UpdateList API.

  • (string) --

type variableType

string

param variableType

The variable type of the list. You can only assign the variable type with String data type. For more information, see Variable types.

type description

string

param description

The description of the list.

type tags

list

param tags

A collection of the 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) --

DeleteList (new) Link ¶

Deletes the list, provided it is not used in a rule.

When you delete a list, Amazon Fraud Detector permanently deletes that list and the elements in the list.

See also: AWS API Documentation

Request Syntax

client.delete_list(
    name='string'
)
type name

string

param name

[REQUIRED]

The name of the list to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetListsMetadata (new) Link ¶

Gets the metadata of either all the lists under the account or the specified list.

See also: AWS API Documentation

Request Syntax

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

string

param name

The name of the list.

type nextToken

string

param nextToken

The next token for the subsequent request.

type maxResults

integer

param maxResults

The maximum number of objects to return for the request.

rtype

dict

returns

Response Syntax

{
    'lists': [
        {
            'name': 'string',
            'description': 'string',
            'variableType': 'string',
            'createdTime': 'string',
            'updatedTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • lists (list) --

      The metadata of the specified list or all lists under the account.

      • (dict) --

        The metadata of a list.

        • name (string) --

          The name of the list.

        • description (string) --

          The description of the list.

        • variableType (string) --

          The variable type of the list.

        • createdTime (string) --

          The time the list was created.

        • updatedTime (string) --

          The time the list was last updated.

        • arn (string) --

          The ARN of the list.

    • nextToken (string) --

      The next page token.

GetListElements (new) Link ¶

Gets all the elements in the specified list.

See also: AWS API Documentation

Request Syntax

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

string

param name

[REQUIRED]

The name of the list.

type nextToken

string

param nextToken

The next token for the subsequent request.

type maxResults

integer

param maxResults

The maximum number of objects to return for the request.

rtype

dict

returns

Response Syntax

{
    'elements': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • elements (list) --

      The list elements.

      • (string) --

    • nextToken (string) --

      The next page token.

UpdateList (new) Link ¶

Updates a list.

See also: AWS API Documentation

Request Syntax

client.update_list(
    name='string',
    elements=[
        'string',
    ],
    description='string',
    updateMode='REPLACE'|'APPEND'|'REMOVE',
    variableType='string'
)
type name

string

param name

[REQUIRED]

The name of the list to update.

type elements

list

param elements

One or more list elements to add or replace. If you are providing the elements, make sure to specify the updateMode to use.

If you are deleting all elements from the list, use REPLACE for the updateMode and provide an empty list (0 elements).

  • (string) --

type description

string

param description

The new description.

type updateMode

string

param updateMode

The update mode (type).

  • Use APPEND if you are adding elements to the list.

  • Use REPLACE if you replacing existing elements in the list.

  • Use REMOVE if you are removing elements from the list.

type variableType

string

param variableType

The variable type you want to assign to the list.

Note

You cannot update a variable type of a list that already has a variable type assigned to it. You can assign a variable type to a list only if the list does not already have a variable type.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --