/// <summary> /// Create a new Azure ML web service or update an existing one. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='createOrUpdatePayload'> /// The payload to create or update the Azure ML web service. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group. /// </param> /// <param name='webServiceName'> /// The Azure ML web service name which you want to reach. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> /// <remarks> /// In case of an error, the thrown CloudException contains the proper request id to monitor the reasons for the failure /// </remarks> public static async Task <WebService> CreateOrUpdateWithRequestIdAsync(this IWebServicesOperations operations, WebService createOrUpdatePayload, string resourceGroupName, string webServiceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWebServiceWithProperRequestIdAsync(createOrUpdatePayload, resourceGroupName, webServiceName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }