/// <summary> /// <para> Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified /// expiration period. This policy can be associated only with HTTP/HTTPS listeners. </para> <para> When a load balancer implements this policy, /// the load balancer uses a special cookie to track the backend server instance for each request. When the load balancer receives a request, it /// first checks to see if this cookie is present in the request. If so, the load balancer sends the request to the application server specified /// in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load balancing algorithm. /// </para> <para> A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the /// cookie is based on the cookie expiration time, which is specified in the policy configuration. </para> /// </summary> /// /// <param name="createLBCookieStickinessPolicyRequest">Container for the necessary parameters to execute the CreateLBCookieStickinessPolicy /// service method on AmazonElasticLoadBalancing.</param> /// /// <returns>The response from the CreateLBCookieStickinessPolicy service method, as returned by AmazonElasticLoadBalancing.</returns> /// /// <exception cref="InvalidConfigurationRequestException"/> /// <exception cref="TooManyPoliciesException"/> /// <exception cref="DuplicatePolicyNameException"/> /// <exception cref="LoadBalancerNotFoundException"/> public CreateLBCookieStickinessPolicyResponse CreateLBCookieStickinessPolicy(CreateLBCookieStickinessPolicyRequest createLBCookieStickinessPolicyRequest) { IRequest <CreateLBCookieStickinessPolicyRequest> request = new CreateLBCookieStickinessPolicyRequestMarshaller().Marshall(createLBCookieStickinessPolicyRequest); CreateLBCookieStickinessPolicyResponse response = Invoke <CreateLBCookieStickinessPolicyRequest, CreateLBCookieStickinessPolicyResponse> (request, this.signer, CreateLBCookieStickinessPolicyResponseUnmarshaller.GetInstance()); return(response); }
public void CreateLBCookieStickinessPolicyMarshallTest() { var operation = service_model.FindOperation("CreateLBCookieStickinessPolicy"); var request = InstantiateClassGenerator.Execute <CreateLBCookieStickinessPolicyRequest>(); var marshaller = new CreateLBCookieStickinessPolicyRequestMarshaller(); 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 = CreateLBCookieStickinessPolicyResponseUnmarshaller.Instance.Unmarshall(context) as CreateLBCookieStickinessPolicyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CreateLBCookieStickinessPolicy operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateLBCookieStickinessPolicy 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<CreateLBCookieStickinessPolicyResponse> CreateLBCookieStickinessPolicyAsync(CreateLBCookieStickinessPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateLBCookieStickinessPolicyRequestMarshaller(); var unmarshaller = CreateLBCookieStickinessPolicyResponseUnmarshaller.Instance; return InvokeAsync<CreateLBCookieStickinessPolicyRequest,CreateLBCookieStickinessPolicyResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal CreateLBCookieStickinessPolicyResponse CreateLBCookieStickinessPolicy(CreateLBCookieStickinessPolicyRequest request) { var marshaller = new CreateLBCookieStickinessPolicyRequestMarshaller(); var unmarshaller = CreateLBCookieStickinessPolicyResponseUnmarshaller.Instance; return Invoke<CreateLBCookieStickinessPolicyRequest,CreateLBCookieStickinessPolicyResponse>(request, marshaller, unmarshaller); }
IAsyncResult invokeCreateLBCookieStickinessPolicy(CreateLBCookieStickinessPolicyRequest createLBCookieStickinessPolicyRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateLBCookieStickinessPolicyRequestMarshaller().Marshall(createLBCookieStickinessPolicyRequest); var unmarshaller = CreateLBCookieStickinessPolicyResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para> Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified /// expiration period. This policy can be associated only with HTTP/HTTPS listeners. </para> <para> When a load balancer implements this policy, /// the load balancer uses a special cookie to track the backend server instance for each request. When the load balancer receives a request, it /// first checks to see if this cookie is present in the request. If so, the load balancer sends the request to the application server specified /// in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load balancing algorithm. /// </para> <para> A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the /// cookie is based on the cookie expiration time, which is specified in the policy configuration. </para> <para>For more information, see <a href="http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsLBCookies">Enabling Duration-Based Session Stickiness</a> in the <i>Elastic Load Balancing Developer Guide</i> .</para> /// </summary> /// /// <param name="createLBCookieStickinessPolicyRequest">Container for the necessary parameters to execute the CreateLBCookieStickinessPolicy /// service method on AmazonElasticLoadBalancing.</param> /// /// <returns>The response from the CreateLBCookieStickinessPolicy service method, as returned by AmazonElasticLoadBalancing.</returns> /// /// <exception cref="T:Amazon.ElasticLoadBalancing.Model.InvalidConfigurationRequestException" /> /// <exception cref="T:Amazon.ElasticLoadBalancing.Model.DuplicatePolicyNameException" /> /// <exception cref="T:Amazon.ElasticLoadBalancing.Model.TooManyPoliciesException" /> /// <exception cref="T:Amazon.ElasticLoadBalancing.Model.LoadBalancerNotFoundException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<CreateLBCookieStickinessPolicyResponse> CreateLBCookieStickinessPolicyAsync(CreateLBCookieStickinessPolicyRequest createLBCookieStickinessPolicyRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateLBCookieStickinessPolicyRequestMarshaller(); var unmarshaller = CreateLBCookieStickinessPolicyResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateLBCookieStickinessPolicyRequest, CreateLBCookieStickinessPolicyResponse>(createLBCookieStickinessPolicyRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para> Generates a stickiness policy with sticky session lifetimes /// controlled by the lifetime of the browser (user-agent) or a specified /// expiration period. This policy can only be associated only with HTTP /// listeners. </para> <para> When a load balancer implements this policy, /// the load balancer uses a special cookie to track the backend server /// instance for each request. When the load balancer receives a request, /// it first checks to see if this cookie is present in the request. If /// so, the load balancer sends the request to the application server /// specified in the cookie. If not, the load balancer sends the request /// to a server that is chosen based on the existing load balancing /// algorithm. </para> <para> A cookie is inserted into the response for /// binding subsequent requests from the same user to that server. The /// validity of the cookie is based on the cookie expiration time, which /// is specified in the policy configuration. </para> /// </summary> /// /// <param name="createLBCookieStickinessPolicyRequest">Container for the /// necessary parameters to execute the CreateLBCookieStickinessPolicy /// service method on AmazonElasticLoadBalancing.</param> /// /// <returns>The response from the CreateLBCookieStickinessPolicy service /// method, as returned by AmazonElasticLoadBalancing.</returns> /// /// <exception cref="TooManyPoliciesException"/> /// <exception cref="DuplicatePolicyNameException"/> /// <exception cref="LoadBalancerNotFoundException"/> /// <exception cref="InvalidConfigurationRequestException"/> public CreateLBCookieStickinessPolicyResponse CreateLBCookieStickinessPolicy(CreateLBCookieStickinessPolicyRequest createLBCookieStickinessPolicyRequest) { IRequest<CreateLBCookieStickinessPolicyRequest> request = new CreateLBCookieStickinessPolicyRequestMarshaller().Marshall(createLBCookieStickinessPolicyRequest); CreateLBCookieStickinessPolicyResponse response = Invoke<CreateLBCookieStickinessPolicyRequest, CreateLBCookieStickinessPolicyResponse> (request, this.signer, CreateLBCookieStickinessPolicyResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the CreateLBCookieStickinessPolicy operation. /// <seealso cref="Amazon.ElasticLoadBalancing.IAmazonElasticLoadBalancing.CreateLBCookieStickinessPolicy"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateLBCookieStickinessPolicy 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<CreateLBCookieStickinessPolicyResponse> CreateLBCookieStickinessPolicyAsync(CreateLBCookieStickinessPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateLBCookieStickinessPolicyRequestMarshaller(); var unmarshaller = CreateLBCookieStickinessPolicyResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateLBCookieStickinessPolicyRequest, CreateLBCookieStickinessPolicyResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
public void CreateLBCookieStickinessPolicyMarshallTest() { var operation = service_model.FindOperation("CreateLBCookieStickinessPolicy"); var request = InstantiateClassGenerator.Execute<CreateLBCookieStickinessPolicyRequest>(); var marshaller = new CreateLBCookieStickinessPolicyRequestMarshaller(); 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 = CreateLBCookieStickinessPolicyResponseUnmarshaller.Instance.Unmarshall(context) as CreateLBCookieStickinessPolicyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
IAsyncResult invokeCreateLBCookieStickinessPolicy(CreateLBCookieStickinessPolicyRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreateLBCookieStickinessPolicyRequestMarshaller(); var unmarshaller = CreateLBCookieStickinessPolicyResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// Initiates the asynchronous execution of the CreateLBCookieStickinessPolicy operation. /// <seealso cref="Amazon.ElasticLoadBalancing.IAmazonElasticLoadBalancing"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateLBCookieStickinessPolicy operation on AmazonElasticLoadBalancingClient.</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 EndCreateLBCookieStickinessPolicy /// operation.</returns> public IAsyncResult BeginCreateLBCookieStickinessPolicy(CreateLBCookieStickinessPolicyRequest request, AsyncCallback callback, object state) { var marshaller = new CreateLBCookieStickinessPolicyRequestMarshaller(); var unmarshaller = CreateLBCookieStickinessPolicyResponseUnmarshaller.Instance; return BeginInvoke<CreateLBCookieStickinessPolicyRequest>(request, marshaller, unmarshaller, callback, state); }