CloudLoadBalancerProviderSetSessionPersistenceAsync Method |
This API is preliminary and subject to change.
Sets the session persistence configuration for a load balancer.
Namespace: net.openstack.Providers.RackspaceAssembly: openstacknet (in openstacknet.dll) Version: 1.7.7+Branch.master.Sha.25d803f397c8693c2c13777ef6675f796f520f2c
Syntax public Task SetSessionPersistenceAsync(
LoadBalancerId loadBalancerId,
SessionPersistence sessionPersistence,
AsyncCompletionOption completionOption,
CancellationToken cancellationToken,
IProgress<LoadBalancer> progress
)
Public Function SetSessionPersistenceAsync (
loadBalancerId As LoadBalancerId,
sessionPersistence As SessionPersistence,
completionOption As AsyncCompletionOption,
cancellationToken As CancellationToken,
progress As IProgress(Of LoadBalancer)
) As Task
public:
virtual Task^ SetSessionPersistenceAsync(
LoadBalancerId^ loadBalancerId,
SessionPersistence^ sessionPersistence,
AsyncCompletionOption completionOption,
CancellationToken cancellationToken,
IProgress<LoadBalancer^>^ progress
) sealed
abstract SetSessionPersistenceAsync :
loadBalancerId : LoadBalancerId *
sessionPersistence : SessionPersistence *
completionOption : AsyncCompletionOption *
cancellationToken : CancellationToken *
progress : IProgress<LoadBalancer> -> Task
override SetSessionPersistenceAsync :
loadBalancerId : LoadBalancerId *
sessionPersistence : SessionPersistence *
completionOption : AsyncCompletionOption *
cancellationToken : CancellationToken *
progress : IProgress<LoadBalancer> -> Task
Parameters
- loadBalancerId
- Type: net.openstack.Providers.Rackspace.Objects.LoadBalancersLoadBalancerId
The load balancer ID. This is obtained from LoadBalancer.Id. - sessionPersistence
- Type: net.openstack.Providers.Rackspace.Objects.LoadBalancersSessionPersistence
The session persistence configuration. - completionOption
- Type: net.openstack.CoreAsyncCompletionOption
Specifies when the Task representing the asynchronous server operation should be considered complete. - cancellationToken
- Type: System.ThreadingCancellationToken
The CancellationToken that the task will observe. - progress
- Type: SystemIProgressLoadBalancer
An optional callback object to receive progress notifications, if completionOption is RequestCompleted. If this is , no progress notifications are sent.
Return Value
Type:
Task
A
Task object representing the asynchronous operation. If
completionOption is
RequestCompleted, the task will not be considered complete until
the load balancer transitions out of the
PendingUpdate state.
Implements
ILoadBalancerServiceSetSessionPersistenceAsync(LoadBalancerId, SessionPersistence, AsyncCompletionOption, CancellationToken, IProgressLoadBalancer)Exceptions Remarks
You can only set one of the session persistence modes on a load balancer, and it can only support one
protocol, so if you set
HttpCookie mode for an HTTP load balancer,
then it will support session persistence for HTTP requests only. Likewise, if you set
SourceAddress mode for an HTTPS load balancer, then it will support
session persistence for HTTPS requests only.
If you want to support session persistence for both HTTP and HTTPS requests concurrently, then you have 2 choices:
- Use two load balancers, one configured for session persistence for HTTP requests and the other
configured for session persistence for HTTPS requests. That way, the load balancers together will support
session persistence for both HTTP and HTTPS requests concurrently, with each load balancer supporting one
of the protocols.
- Use one load balancer, configure it for session persistence for HTTP requests, and then enable SSL
termination for that load balancer (refer to Section 4.17, "SSL Termination" for details). The load
balancer will then support session persistence for both HTTP and HTTPS requests concurrently.
Version Information .NET Framework
Supported in: 4.5
openstack.net
Supported in: 1.6, 1.5, 1.4
See Also