public void CreateListenerMarshallTest() { var request = InstantiateClassGenerator.Execute <CreateListenerRequest>(); var marshaller = new CreateListenerRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <CreateListenerRequest>(request, jsonRequest); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("CreateListener").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = CreateListenerResponseUnmarshaller.Instance.Unmarshall(context) as CreateListenerResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void CreateListenerMarshallTest() { var operation = service_model.FindOperation("CreateListener"); var request = InstantiateClassGenerator.Execute<CreateListenerRequest>(); var marshaller = new CreateListenerRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreateListenerResponseUnmarshaller.Instance.Unmarshall(context) as CreateListenerResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void CreateListenerMarshallTest() { var operation = service_model.FindOperation("CreateListener"); var request = InstantiateClassGenerator.Execute <CreateListenerRequest>(); var marshaller = new CreateListenerRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreateListenerResponseUnmarshaller.Instance.Unmarshall(context) as CreateListenerResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CreateListener operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateListener operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<CreateListenerResponse> CreateListenerAsync(CreateListenerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateListenerRequestMarshaller(); var unmarshaller = CreateListenerResponseUnmarshaller.Instance; return InvokeAsync<CreateListenerRequest,CreateListenerResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Creates a listener for the specified Application Load Balancer. /// /// /// <para> /// You can create up to 10 listeners per load balancer. /// </para> /// /// <para> /// To update a listener, use <a>ModifyListener</a>. When you are finished with a listener, /// you can delete it using <a>DeleteListener</a>. If you are finished with both the listener /// and the load balancer, you can delete them both using <a>DeleteLoadBalancer</a>. /// </para> /// /// <para> /// For more information, see <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html">Listeners /// for Your Application Load Balancers</a> in the <i>Application Load Balancers Guide</i>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateListener service method.</param> /// /// <returns>The response from the CreateListener service method, as returned by ElasticLoadBalancingV2.</returns> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.CertificateNotFoundException"> /// The specified certificate does not exist. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.DuplicateListenerException"> /// A listener with the specified port already exists. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.IncompatibleProtocolsException"> /// The specified configuration is not valid with this protocol. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.InvalidConfigurationRequestException"> /// The requested configuration is not valid. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.LoadBalancerNotFoundException"> /// The specified load balancer does not exist. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.SSLPolicyNotFoundException"> /// The specified SSL policy does not exist. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.TargetGroupAssociationLimitException"> /// You've reached the limit on the number of load balancers per target group. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.TargetGroupNotFoundException"> /// The specified target group does not exist. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.TooManyCertificatesException"> /// You've reached the limit on the number of certificates per listener. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.TooManyListenersException"> /// You've reached the limit on the number of listeners per load balancer. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.TooManyRegistrationsForTargetIdException"> /// You've reached the limit on the number of times a target can be registered with a /// load balancer. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.UnsupportedProtocolException"> /// The specified protocol is not supported. /// </exception> public CreateListenerResponse CreateListener(CreateListenerRequest request) { var marshaller = new CreateListenerRequestMarshaller(); var unmarshaller = CreateListenerResponseUnmarshaller.Instance; return Invoke<CreateListenerRequest,CreateListenerResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateListener operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateListener operation on AmazonElasticLoadBalancingV2Client.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateListener /// operation.</returns> public IAsyncResult BeginCreateListener(CreateListenerRequest request, AsyncCallback callback, object state) { var marshaller = new CreateListenerRequestMarshaller(); var unmarshaller = CreateListenerResponseUnmarshaller.Instance; return BeginInvoke<CreateListenerRequest>(request, marshaller, unmarshaller, callback, state); }