internal void Reboot() { CheckProtected(ProductionOptions.NonStop); RebootInstancesResponse resp = myController.ec2.RebootInstances(new RebootInstancesRequest() .WithInstanceId(InstanceId)); }
public static RebootInstancesResponse Unmarshall(UnmarshallerContext context) { RebootInstancesResponse rebootInstancesResponse = new RebootInstancesResponse(); rebootInstancesResponse.HttpResponse = context.HttpResponse; rebootInstancesResponse.RequestId = context.StringValue("RebootInstances.RequestId"); return(rebootInstancesResponse); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { RebootInstancesResponse response = new RebootInstancesResponse(); while (context.Read()) { } return(response); }
public void reboot() { try { RebootInstancesRequest request = new RebootInstancesRequest(); request.InstanceId.Add(_instanceId); RebootInstancesResponse response = _service.RebootInstances(request); } catch (AmazonEC2Exception ex) { throw new Exception("Caught Exception: " + ex.XML); } }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { RebootInstancesResponse response = new RebootInstancesResponse(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth = 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return(response); }
public static RebootInstancesResponse Unmarshall(UnmarshallerContext _ctx) { RebootInstancesResponse rebootInstancesResponse = new RebootInstancesResponse(); rebootInstancesResponse.HttpResponse = _ctx.HttpResponse; rebootInstancesResponse.RequestId = _ctx.StringValue("RebootInstances.RequestId"); List <RebootInstancesResponse.RebootInstances_InstanceResponse> rebootInstancesResponse_instanceResponses = new List <RebootInstancesResponse.RebootInstances_InstanceResponse>(); for (int i = 0; i < _ctx.Length("RebootInstances.InstanceResponses.Length"); i++) { RebootInstancesResponse.RebootInstances_InstanceResponse instanceResponse = new RebootInstancesResponse.RebootInstances_InstanceResponse(); instanceResponse.InstanceId = _ctx.StringValue("RebootInstances.InstanceResponses[" + i + "].InstanceId"); instanceResponse.PreviousStatus = _ctx.StringValue("RebootInstances.InstanceResponses[" + i + "].PreviousStatus"); instanceResponse.CurrentStatus = _ctx.StringValue("RebootInstances.InstanceResponses[" + i + "].CurrentStatus"); instanceResponse.Code = _ctx.StringValue("RebootInstances.InstanceResponses[" + i + "].Code"); instanceResponse.Message = _ctx.StringValue("RebootInstances.InstanceResponses[" + i + "].Message"); rebootInstancesResponse_instanceResponses.Add(instanceResponse); } rebootInstancesResponse.InstanceResponses = rebootInstancesResponse_instanceResponses; return(rebootInstancesResponse); }
public string RebbotInstance(IAmazonEC2 ec2, string instidstr) //stop ec2 instance { RebootInstancesRequest rebootreq; RebootInstancesResponse rebootInstancesResponse = null; try { rebootreq = new RebootInstancesRequest { InstanceIds = new List <string>() { instidstr } }; rebootInstancesResponse = ec2.RebootInstances(rebootreq); return("Done"); } catch (Exception ex) { return(ex.Message + "\n" + ex.StackTrace); } }