FraudDetector / Client / update_model_version

update_model_version#

FraudDetector.Client.update_model_version(**kwargs)#

Updates a model version. Updating a model version retrains an existing model version using updated training data and produces a new minor version of the model. You can update the training data set location and data access role attributes using this action. This action creates and trains a new minor version of the model, for example version 1.01, 1.02, 1.03.

See also: AWS API Documentation

Request Syntax

response = client.update_model_version(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
    majorVersionNumber='string',
    externalEventsDetail={
        'dataLocation': 'string',
        'dataAccessRoleArn': 'string'
    },
    ingestedEventsDetail={
        'ingestedEventsTimeWindow': {
            'startTime': 'string',
            'endTime': 'string'
        }
    },
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters:
  • modelId (string) –

    [REQUIRED]

    The model ID.

  • modelType (string) –

    [REQUIRED]

    The model type.

  • majorVersionNumber (string) –

    [REQUIRED]

    The major version number.

  • externalEventsDetail (dict) –

    The details of the external events data used for training the model version. Required if trainingDataSource is EXTERNAL_EVENTS.

    • dataLocation (string) – [REQUIRED]

      The Amazon S3 bucket location for the data.

    • dataAccessRoleArn (string) – [REQUIRED]

      The ARN of the role that provides Amazon Fraud Detector access to the data location.

  • ingestedEventsDetail (dict) –

    The details of the ingested event used for training the model version. Required if your trainingDataSource is INGESTED_EVENTS.

    • ingestedEventsTimeWindow (dict) – [REQUIRED]

      The start and stop time of the ingested events.

      • startTime (string) – [REQUIRED]

        Timestamp of the first ingensted event.

      • endTime (string) – [REQUIRED]

        Timestamp of the final ingested event.

  • tags (list) –

    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.

Return type:

dict

Returns:

Response Syntax

{
    'modelId': 'string',
    'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
    'modelVersionNumber': 'string',
    'status': 'string'
}

Response Structure

  • (dict) –

    • modelId (string) –

      The model ID.

    • modelType (string) –

      The model type.

    • modelVersionNumber (string) –

      The model version number of the model version updated.

    • status (string) –

      The status of the updated model version.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException

  • FraudDetector.Client.exceptions.ResourceNotFoundException

  • FraudDetector.Client.exceptions.AccessDeniedException

  • FraudDetector.Client.exceptions.ThrottlingException

  • FraudDetector.Client.exceptions.InternalServerException

  • FraudDetector.Client.exceptions.ConflictException