Example #1
0
        /// <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));
        }
Example #2
0
        internal virtual ListVirtualMachinesResponse ListVirtualMachines(ListVirtualMachinesRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListVirtualMachinesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListVirtualMachinesResponseUnmarshaller.Instance;

            return(Invoke <ListVirtualMachinesResponse>(request, options));
        }
Example #3
0
        public ListVirtualMachinesResponse ListVirtualMachines(ListVirtualMachinesRequest request)
        {
            var command = new ListVirtualMachines(_apiKey, _secret, _baseUri, _authenticator, _builder)
            {
                Parameters = request
            };

            return((ListVirtualMachinesResponse)((ICommandExecutor)this).Execute(command));
        }
Example #4
0
        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);
            }
        }
Example #5
0
        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);
            }
        }
Example #6
0
 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);
     }
 }