private static void DeleteVpc(VpcClient client) { var req = new DeleteVpcRequest { VpcId = "efa0d2e2-314f-44f2-99f6-ecfeaab3ba9d" }; try { DeleteVpcResponse resp = client.DeleteVpc(req); Console.WriteLine(resp.HttpStatusCode); } catch (RequestTimeoutException requestTimeoutException) { Console.WriteLine(requestTimeoutException.ErrorMessage); } catch (ServiceResponseException clientRequestException) { Console.WriteLine(clientRequestException.HttpStatusCode); Console.WriteLine(clientRequestException.ErrorCode); Console.WriteLine(clientRequestException.ErrorMsg); } catch (ConnectionException connectionException) { Console.WriteLine(connectionException.ErrorMessage); } }
public static DeleteVpcResponse Unmarshall(UnmarshallerContext context) { DeleteVpcResponse deleteVpcResponse = new DeleteVpcResponse(); deleteVpcResponse.HttpResponse = context.HttpResponse; deleteVpcResponse.RequestId = context.StringValue("DeleteVpc.RequestId"); return(deleteVpcResponse); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteVpcResponse response = new DeleteVpcResponse(); while (context.Read()) { } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteVpcResponse response = new DeleteVpcResponse(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth = 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return(response); }