/// <summary>
 /// Create a resource by ID.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceId'>
 /// The fully qualified ID of the resource, including the resource name and
 /// resource type. Use the format,
 /// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
 /// </param>
 /// <param name='apiVersion'>
 /// The API version to use for the operation.
 /// </param>
 /// <param name='parameters'>
 /// Create or update resource parameters.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GenericResourceInner> BeginCreateOrUpdateByIdAsync(this IResourcesOperations operations, string resourceId, string apiVersion, GenericResourceInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateByIdWithHttpMessagesAsync(resourceId, apiVersion, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }