/// <summary> /// Creates a new machine. /// </summary> /// <remarks> /// Required permissions: Machines.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='machineDto'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MachineDto> PostAsync(this IMachines operations, MachineDto machineDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.PostWithHttpMessagesAsync(machineDto, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a new machine. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Machines or Machines.Write. /// /// Required permissions: Machines.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <MachineDto> PostAsync(this IMachines operations, MachineDto body = default(MachineDto), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }