'Generates predictions for a group of observations. The
observations to process exist in one or more data files
referenced by a `DataSource`. This operation creates a new
`BatchPrediction`, and uses an `MLModel` and the data files
referenced by the `DataSource` as information sources.
`CreateBatchPrediction` is an asynchronous operation. In
response to `CreateBatchPrediction`, Amazon Machine Learning
(Amazon ML) immediately returns and sets the `BatchPrediction`
status to `PENDING`. After the `BatchPrediction` completes,
Amazon ML sets the status to `COMPLETED`.
You can poll for status updates by using the
GetBatchPrediction operation and checking the `Status`
parameter of the result. After the `COMPLETED` status appears,
the results are available in the location specified by the
`OutputUri` parameter.
:type batch_prediction_id: string
:param batch_prediction_id: A user-supplied ID that uniquely identifies
the `BatchPrediction`.
:type batch_prediction_name: string
:param batch_prediction_name: A user-supplied name or description of
the `BatchPrediction`. `BatchPredictionName` can only use the UTF-8
character set.
:type ml_model_id: string
:param ml_model_id: The ID of the `MLModel` that will generate
predictions for the group of observations.
:type batch_prediction_data_source_id: string
:param batch_prediction_data_source_id: The ID of the `DataSource` that
points to the group of observations to predict.
:type output_uri: string
:param output_uri: The location of an Amazon Simple Storage Service
(Amazon S3) bucket or directory to store the batch prediction
results. The following substrings are not allowed in the s3 key
portion of the "outputURI" field: \':\', \'//\', \'/./\', \'/../\'.
Amazon ML needs permissions to store and retrieve the logs on your
behalf. For information about how to set permissions, see the
`Amazon Machine Learning Developer Guide`_.'

def create_batch_prediction(self, batch_prediction_id, ml_model_id, batch_prediction_data_source_id, output_uri, batch_prediction_name=None):

    params = {'BatchPredictionId': batch_prediction_id, 'MLModelId': ml_model_id, 'BatchPredictionDataSourceId': batch_prediction_data_source_id, 'OutputUri': output_uri}
    if (batch_prediction_name is not None):
        params['BatchPredictionName'] = batch_prediction_name
    return self.make_request(action='CreateBatchPrediction', body=json.dumps(params))
