Container for the parameters to the UpdateMLModel operation. Updates the MLModelName and the ScoreThreshold of an MLModel.

You can use the GetMLModel operation to view the contents of the updated data element.

Inheritance: AmazonMachineLearningRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.MachineLearning.Model.UpdateMLModelRequest();

            if (cmdletContext.MLModelId != null)
            {
                request.MLModelId = cmdletContext.MLModelId;
            }
            if (cmdletContext.MLModelName != null)
            {
                request.MLModelName = cmdletContext.MLModelName;
            }
            if (cmdletContext.ScoreThreshold != null)
            {
                request.ScoreThreshold = cmdletContext.ScoreThreshold.Value;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateMLModel operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateMLModel operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<UpdateMLModelResponse> UpdateMLModelAsync(UpdateMLModelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateMLModelRequestMarshaller();
            var unmarshaller = UpdateMLModelResponseUnmarshaller.Instance;

            return InvokeAsync<UpdateMLModelRequest,UpdateMLModelResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 /// <summary>
 /// Updates the <code>MLModelName</code> and the <code>ScoreThreshold</code> of an <code>MLModel</code>.
 /// 
 ///  
 /// <para>
 /// You can use the <a>GetMLModel</a> operation to view the contents of the updated data
 /// element.
 /// </para>
 /// </summary>
 /// <param name="mlModelId">The ID assigned to the <code>MLModel</code> during creation.</param>
 /// <param name="mlModelName">A user-supplied name or description of the <code>MLModel</code>.</param>
 /// <param name="scoreThreshold">The <code>ScoreThreshold</code> used in binary classification <code>MLModel</code> that marks the boundary between a positive prediction and a negative prediction. Output values greater than or equal to the <code>ScoreThreshold</code> receive a positive result from the <code>MLModel</code>, such as <code>true</code>. Output values less than the <code>ScoreThreshold</code> receive a negative response from the <code>MLModel</code>, such as <code>false</code>.</param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the UpdateMLModel service method, as returned by MachineLearning.</returns>
 /// <exception cref="Amazon.MachineLearning.Model.InternalServerException">
 /// An error on the server occurred when trying to process a request.
 /// </exception>
 /// <exception cref="Amazon.MachineLearning.Model.InvalidInputException">
 /// An error on the client occurred. Typically, the cause is an invalid input value.
 /// </exception>
 /// <exception cref="Amazon.MachineLearning.Model.ResourceNotFoundException">
 /// A specified resource cannot be located.
 /// </exception>
 public Task<UpdateMLModelResponse> UpdateMLModelAsync(string mlModelId, string mlModelName, float scoreThreshold, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new UpdateMLModelRequest();
     request.MLModelId = mlModelId;
     request.MLModelName = mlModelName;
     request.ScoreThreshold = scoreThreshold;
     return UpdateMLModelAsync(request, cancellationToken);
 }
        internal UpdateMLModelResponse UpdateMLModel(UpdateMLModelRequest request)
        {
            var marshaller = new UpdateMLModelRequestMarshaller();
            var unmarshaller = UpdateMLModelResponseUnmarshaller.Instance;

            return Invoke<UpdateMLModelRequest,UpdateMLModelResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// Updates the <code>MLModelName</code> and the <code>ScoreThreshold</code> of an <code>MLModel</code>.
 /// 
 ///  
 /// <para>
 /// You can use the <code>GetMLModel</code> operation to view the contents of the updated
 /// data element.
 /// </para>
 /// </summary>
 /// <param name="mlModelId">The ID assigned to the <code>MLModel</code> during creation.</param>
 /// <param name="mlModelName">A user-supplied name or description of the <code>MLModel</code>.</param>
 /// <param name="scoreThreshold">The <code>ScoreThreshold</code> used in binary classification <code>MLModel</code> that marks the boundary between a positive prediction and a negative prediction. Output values greater than or equal to the <code>ScoreThreshold</code> receive a positive result from the <code>MLModel</code>, such as <code>true</code>. Output values less than the <code>ScoreThreshold</code> receive a negative response from the <code>MLModel</code>, such as <code>false</code>.</param>
 /// 
 /// <returns>The response from the UpdateMLModel service method, as returned by MachineLearning.</returns>
 /// <exception cref="Amazon.MachineLearning.Model.InternalServerException">
 /// An error on the server occurred when trying to process a request.
 /// </exception>
 /// <exception cref="Amazon.MachineLearning.Model.InvalidInputException">
 /// An error on the client occurred. Typically, the cause is an invalid input value.
 /// </exception>
 /// <exception cref="Amazon.MachineLearning.Model.ResourceNotFoundException">
 /// A specified resource cannot be located.
 /// </exception>
 public UpdateMLModelResponse UpdateMLModel(string mlModelId, string mlModelName, float scoreThreshold)
 {
     var request = new UpdateMLModelRequest();
     request.MLModelId = mlModelId;
     request.MLModelName = mlModelName;
     request.ScoreThreshold = scoreThreshold;
     return UpdateMLModel(request);
 }
 private Amazon.MachineLearning.Model.UpdateMLModelResponse CallAWSServiceOperation(IAmazonMachineLearning client, Amazon.MachineLearning.Model.UpdateMLModelRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Machine Learning", "UpdateMLModel");
     try
     {
         #if DESKTOP
         return(client.UpdateMLModel(request));
         #elif CORECLR
         return(client.UpdateMLModelAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateMLModel operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateMLModel operation on AmazonMachineLearningClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateMLModel
        ///         operation.</returns>
        public IAsyncResult BeginUpdateMLModel(UpdateMLModelRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new UpdateMLModelRequestMarshaller();
            var unmarshaller = UpdateMLModelResponseUnmarshaller.Instance;

            return BeginInvoke<UpdateMLModelRequest>(request, marshaller, unmarshaller,
                callback, state);
        }