/// <summary> /// Lists your virtual machines. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListVirtualMachines service method.</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 ListVirtualMachines service method, as returned by BackupGateway.</returns> /// <exception cref="Amazon.BackupGateway.Model.InternalServerException"> /// The operation did not succeed because an internal error occurred. Try again later. /// </exception> /// <exception cref="Amazon.BackupGateway.Model.ValidationException"> /// The operation did not succeed because a validation error occurred. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/ListVirtualMachines">REST API Reference for ListVirtualMachines Operation</seealso> public virtual Task <ListVirtualMachinesResponse> ListVirtualMachinesAsync(ListVirtualMachinesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListVirtualMachinesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListVirtualMachinesResponseUnmarshaller.Instance; return(InvokeAsync <ListVirtualMachinesResponse>(request, options, cancellationToken)); }
internal virtual ListVirtualMachinesResponse ListVirtualMachines(ListVirtualMachinesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListVirtualMachinesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListVirtualMachinesResponseUnmarshaller.Instance; return(Invoke <ListVirtualMachinesResponse>(request, options)); }
public ListVirtualMachinesResponse ListVirtualMachines(ListVirtualMachinesRequest request) { var command = new ListVirtualMachines(_apiKey, _secret, _baseUri, _authenticator, _builder) { Parameters = request }; return((ListVirtualMachinesResponse)((ICommandExecutor)this).Execute(command)); }
internal void ListVirtualMachines() { try { ListVirtualMachinesRequest request = new ListVirtualMachinesRequest(); if (!String.IsNullOrEmpty(_zoneId)) { request.ZoneId = Guid.Parse(_zoneId); } var response = _client.ListVirtualMachines(request); _logWriter(response.ToString()); } catch (System.Exception wex) { _logWriter(wex.Message); } }
internal void ListVirtualMachines() { Client session = new Client(serviceUri, apiKey, secretKey); try { ListVirtualMachinesRequest request = new ListVirtualMachinesRequest() { ZoneId = zoneId }; ListVirtualMachinesResponse response = session.ListVirtualMachines(request); logWriter(response.ToString()); } catch (System.Exception wex) { logWriter(wex.Message); } }