/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateVpcEndpointResponse response = new CreateVpcEndpointResponse(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth = 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("clientToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ClientToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("vpcEndpoint", targetDepth)) { var unmarshaller = VpcEndpointUnmarshaller.Instance; response.VpcEndpoint = unmarshaller.Unmarshall(context); continue; } } } return(response); }
public static CreateVpcEndpointResponse Unmarshall(UnmarshallerContext context) { CreateVpcEndpointResponse createVpcEndpointResponse = new CreateVpcEndpointResponse(); createVpcEndpointResponse.HttpResponse = context.HttpResponse; createVpcEndpointResponse.RequestId = context.StringValue("CreateVpcEndpoint.RequestId"); createVpcEndpointResponse.VpcEndpointId = context.StringValue("CreateVpcEndpoint.VpcEndpointId"); return(createVpcEndpointResponse); }
public static void CreateVPCEndpoint() { AmazonEC2Client client = new AmazonEC2Client(); CreateVpcRequest vpcRequest = new CreateVpcRequest("10.32.0.0/16"); CreateVpcResponse vpcResponse = client.CreateVpc(vpcRequest); Vpc vpc = vpcResponse.Vpc; CreateVpcEndpointRequest endpointRequest = new CreateVpcEndpointRequest(); endpointRequest.VpcId = vpc.VpcId; endpointRequest.ServiceName = "com.amazonaws.us-west-2.s3"; CreateVpcEndpointResponse cVpcErsp = client.CreateVpcEndpoint(endpointRequest); VpcEndpoint vpcEndPoint = cVpcErsp.VpcEndpoint; }
public static CreateVpcEndpointResponse Unmarshall(UnmarshallerContext _ctx) { CreateVpcEndpointResponse createVpcEndpointResponse = new CreateVpcEndpointResponse(); createVpcEndpointResponse.HttpResponse = _ctx.HttpResponse; createVpcEndpointResponse.EndpointId = _ctx.StringValue("CreateVpcEndpoint.EndpointId"); createVpcEndpointResponse.CreateTime = _ctx.StringValue("CreateVpcEndpoint.CreateTime"); createVpcEndpointResponse.RequestId = _ctx.StringValue("CreateVpcEndpoint.RequestId"); createVpcEndpointResponse.EndpointName = _ctx.StringValue("CreateVpcEndpoint.EndpointName"); createVpcEndpointResponse.VpcId = _ctx.StringValue("CreateVpcEndpoint.VpcId"); createVpcEndpointResponse.EndpointDescription = _ctx.StringValue("CreateVpcEndpoint.EndpointDescription"); createVpcEndpointResponse.ServiceId = _ctx.StringValue("CreateVpcEndpoint.ServiceId"); createVpcEndpointResponse.ServiceName = _ctx.StringValue("CreateVpcEndpoint.ServiceName"); createVpcEndpointResponse.EndpointBusinessStatus = _ctx.StringValue("CreateVpcEndpoint.EndpointBusinessStatus"); createVpcEndpointResponse.EndpointStatus = _ctx.StringValue("CreateVpcEndpoint.EndpointStatus"); createVpcEndpointResponse.ConnectionStatus = _ctx.StringValue("CreateVpcEndpoint.ConnectionStatus"); createVpcEndpointResponse.EndpointDomain = _ctx.StringValue("CreateVpcEndpoint.EndpointDomain"); createVpcEndpointResponse.Bandwidth = _ctx.LongValue("CreateVpcEndpoint.Bandwidth"); return(createVpcEndpointResponse); }