
    9i6                    <   S r SSKrSSKrSSKrSSKrSSKrSSKJr  SSKJ	r	  SSK
Jr  SSK
Jr  SSK
Jr  SSKJr  SS	KJr  SS
KJr  \R$                  S:  a  \" \5        \R(                  " S5        \R*                  " \5      r " S S\R0                  5      rS r\rg)z.
This module provides a client class for BLB.
    N)bce_base_client)bce_v1_signer)bce_http_client)handler)http_methods)utils)required)compat3zutf-8c                      \ rS rSrSrSrS9S jrS9S jr  S:S jr\	" \
\4\
\4S9  S;S	 j5       r   S<S
 jr\	" \
\4S9S9S j5       r\	" \
\4S9  S;S j5       r\	" \
\4S9S=S j5       r\	" \
\4S9S>S j5       r\	" \
\4\
\4S9  S;S j5       r   S<S jr\	" \
\4\\\
\4S9     S?S j5       r\	" \
\4\\\
\4\
\4S9       S@S j5       r\	" \
\4\\\
\4S9             SAS j5       r\	" \
\4\\\
\4\S9               SBS j5       r\	" \
\4\\\
\4\S9       SCS j5       r\	" \
\4S9  S;S j5       r\	" \
\4S9  S;S j5       r\	" \
\4S9  S;S j5       r\	" \
\4S9  S;S j5       r\	" \
\4S9  S;S j5       r\	" \
\4S9  S;S  j5       r \	" \
\4\S!9      S<S" j5       r!\	" \
\4\\S#9          SDS$ j5       r"\	" \
\4\S!9              SES% j5       r#\	" \
\4\S!9              SFS& j5       r$\	" \
\4\S!9          SGS' j5       r%\	" \
\4\S(9S=S) j5       r& \	" \
\4\S*9 S=S+ j5       r'\	" \
\4\S!9 S>S, j5       r(\	" \
\4S9  S>S- j5       r)\	" \
\4\S*9 S=S. j5       r*\	" \
\4\S*9 S=S/ j5       r+\	" \
\4\S09 S=S1 j5       r,\	" \
\4\S09 S=S2 j5       r-\	" \
\4S9 S=S3 j5       r.\	" \
\4\S49 S=S5 j5       r/\	" \
\4\S49 S=S6 j5       r0\	" \
\4S9 S=S7 j5       r1S8r2g)H	BlbClient)   z
BLB base sdk client
s   /v1Nc                 B    [         R                  R                  X5        g N)r   BceBaseClient__init__)selfconfigs     `/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/baidubce/services/blb/blb_client.pyr   BlbClient.__init__/   s    %%..t<    c                     Uc  U R                   $ [        R                  " U R                   5      nUR                  U5        U$ )zG
:param config:
:type config: baidubce.BceClientConfiguration
:return:
)r   copymerge_non_none_values)r   r   
new_configs      r   _merge_configBlbClient._merge_config2   s9     >;;4;;/J,,V4r   c           
          U R                  U5      nUc  [        R                  nUc  SSS.n[        R                  " U[
        R                  [        R                  U/XX4U5      $ )Ns   */*s   application/json;charset=utf-8)s   Accepts   Content-Type)r   r   
parse_jsonr   send_requestr   signparse_error)r   http_methodpathbodyheadersparamsr   body_parsers           r   _send_requestBlbClient._send_request?   sj     ##F+!,,K?"((IKG++M&&)<)<k(Jtf6 	6r   )vpc_id	subnet_idc                    [         R                  " U R                  S5      n0 nUc  [        5       US'   OXXS'   0 n	Ub  [        R
                  " U5      U	S'   Ub  [        R
                  " U5      U	S'   [        R
                  " U5      U	S'   [        R
                  " U5      U	S'   U R                  [        R                  U[        R                  " U	5      UUS9$ )  
Create a LoadBalancer with the specified options.

:param name:
        the name of LoadBalancer to create
:type name: string

:param desc:
        The description of LoadBalancer
:type desc: string

:param vpc_id:
        id of vpc which the LoadBalancer belong to
:type vpc_id: string

:param subnet_id:
        id of subnet which the LoadBalancer belong to
:type subnet_id: string

:param client_token:
    If the clientToken is not specified by the user, a random String
    generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
blb   clientTokennamedescvpcIdsubnetIdr%   r'   r   r   
append_uriversiongenerate_client_tokenr
   convert_to_stringr)   r   POSTjsondumps
r   r+   r,   r1   r2   client_tokenr   r$   r'   r%   s
             r   create_loadbalancerBlbClient.create_loadbalancerL   s    D e4%:%<F>"%1>"!33D9DL!33D9DL008W!33I>Z!!,"3"3T'+zz$'7)/ " 1 	1r   c                     [         R                  " U R                  S5      n0 n	Ub  XS'   Ub  X)S'   Ub  X9S'   Ub  XIS'   Ub  XYS'   Ub  XiS'   U R                  [        R
                  UXS9$ )	  
Return a list of LoadBalancers

:param address:
    Intranet service address in dotted decimal notation
:type address: string

:param name:
    name of LoadBalancer to describe
:type name: string

:param blb_id:
    id of LoadBalancer to describe
:type blb_id: string

:param bcc_id:
    bcc which bind the LoadBalancers
:type bcc_id: string

:param marker:
    The optional parameter marker specified in the original
    request to specify where in the results to begin listing.
    Together with the marker, specifies the list result
    which listing should begin.
    If the marker is not specified, the list result will
    listing from the first one.
:type marker: string

:param max_keys
The optional parameter to specifies the max number of list
result to return.
    The default value is 1000.
:type max_keys: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/      address   name   blbId   bccId   marker   maxKeysr'   r   r   r7   r8   r)   r   GET
r   addressr1   blb_idbcc_idmarkermax_keysr   r$   r'   s
             r   describe_loadbalancers BlbClient.describe_loadbalancers   s    V e4!(:"7O%8%8 &9!):!!,"2"2D)/ " @ 	@r   )rO   c                     [         R                  " U R                  SU5      nU R                  [        R
                  UUS9$ )z
Return detail imformation of specific LoadBalancer

:param blb_id:
    id of LoadBalancer to describe
:type blb_id: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   )r   rK   )r   rO   r   r$   s       r   describe_loadbalancer_detail&BlbClient.describe_loadbalancer_detail   sA     eV<!!,"2"2D)/ " 1 	1r   )blbIdc                 P   [         R                  " U R                  SU5      n0 nUc  [        5       US'   OXGS'   0 nUb  [        R
                  " U5      US'   Ub  [        R
                  " U5      US'   U R                  [        R                  U[        R                  " U5      XuS9$ )aY  
Modify the special attribute to new value of the LoadBalancer
owned by the user.

:param name:
        name of LoadBalancer to describe
:type name: string

:param blb_id:
        id of LoadBalancer to describe
:type blb_id: string

:param desc:
        The description of LoadBalancer
:type desc: string

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm
        will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r0   r1   r2   rJ   )r   r7   r8   r9   r
   r:   r)   r   PUTr<   r=   )	r   rO   r1   r2   r?   r   r$   r'   r%   s	            r   update_loadbalancerBlbClient.update_loadbalancer   s    > eV<%:%<F>"%1>"!33D9DL!33D9DL!!,"2"2D$**T:J)/ " @ 	@r   c                     [         R                  " U R                  SU5      n0 nUc  [        5       US'   OX%S'   U R	                  [
        R                  UXSS9$ )a  
delete the LoadBalancer owned by the user.

:param blb_id:
        id of LoadBalancer to describe
:type blb_id: string

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm
        will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r0   rJ   )r   r7   r8   r9   r)   r   DELETEr   rO   r?   r   r$   r'   s         r   delete_loadbalancerBlbClient.delete_loadbalancer  sc    * eV<%:%<F>"%1>"!!,"5"5t)/ " @ 	@r   c                     [         R                  " U R                  SU5      n0 nUc  [        5       US'   OX&S'   0 nUb  X7S'   OSUS'   U R	                  [
        R                  U[        R                  " U5      XdS9$ )a$  
update the specified LoadBalancer to support the acl feature.

:param blb_id:
        id of LoadBalancer to describe
:type blb_id: string

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm
        will be used.
:type client_token: string

:param support_acl:
        parameters to support LoadBalancer acl, default is true.
:type support_acl: Boolean

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
zblb/aclr0   
supportAclTrJ   	r   r7   r8   r9   r)   r   rZ   r<   r=   )r   rO   r?   support_aclr   r$   r'   r%   s           r   update_loadbalancer_acl!BlbClient.update_loadbalancer_acl$  s    2 i@%:%<F>"%1>""!,!%D!!,"2"2D$**T:J)/ " @ 	@r   c                    [         R                  " U R                  S5      n0 nUc  [        5       US'   OXXS'   0 n	Ub  [        R
                  " U5      U	S'   Ub  [        R
                  " U5      U	S'   [        R
                  " U5      U	S'   [        R
                  " U5      U	S'   [        R
                  " S5      U	S'   U R                  [        R                  U[        R                  " U	5      UUS	9$ )
r.   r/   r0   r1   r2   r3   r4   ipv6typer5   r6   r>   s
             r   create_ipv6_loadbalancer"BlbClient.create_ipv6_loadbalancerN  s    D e4%:%<F>"%1>"!33D9DL!33D9DL008W!33I>Z//7V!!,"3"3T'+zz$'7)/ " 1 	1r   c                    [         R                  " U R                  S5      n0 n	Ub  XS'   Ub  X)S'   Ub  X9S'   Ub  XIS'   Ub  XYS'   Ub  XiS'   [        R                  " S5      U	S	'   U R                  [        R                  UXS
9$ )rC   r/   rD   rE   rF   rG   rH   rI   ri   s   typerJ   )r   r7   r8   r
   r:   r)   r   rL   rM   s
             r   describe_ipv6_loadbalancers%BlbClient.describe_ipv6_loadbalancers  s    V e4!(:"7O%8%8 &9!): 226:w!!,"2"2D)/ " @ 	@r   )rO   listener_portbackend_port	schedulerc                 N   [         R                  " U R                  SUS5      n0 nU	c  [        5       US'   OXS'   UU[        R
                  " U5      S.nUb  UUS'   Ub  XmS'   Ub  X}S'   Ub  XS'   U R                  [        R                  U[        R                  " U5      UU
S	9$ )
a  
Create a tcp listener rule with the specified options.

:param blb_id:
    the id of blb which the listener work on
:type blb_id: string

:param listener_port:
    port to be linstened owned by listener
:value 1-65535
:type listener_port: int

:param backend_port:
    port to be listened owned by Backend server
:value 1-65535
:type backend_port: int

:param scheduler
    balancing algorithm
:value 'RoundRobin' or 'LeastConnection' or 'Hash'
:type scheduler: string

:param health_check_timeout_in_second
    Health check timeout
:value 1-60, default: 3, unit: seconds
:type health_check_timeout_in_second: string

:param health_check_interval
    Health check interval
:value 1-10, default: 3, unit: seconds
:type health_check_interval: string

:param unhealthy_threshold
    Unhealthy threshold,
    how many consecutive health check failures,
    shielding the backend server
:value 2-5, default: 3
:type unhealthy_threshold: string

:param healthy_threshold
    Health threshold,
    how many consecutive health checks are successful,
    then re-use the back-end server
:value 2-5, default: 3
:type healthy_threshold: string

:param client_token:
    If the clientToken is not specified by the user, a random String
    generated by default algorithm will be used.
:type client_token: string

 :param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   TCPlistenerr0   listenerPortbackendPortrr   healthCheckTimeoutInSecondhealthCheckIntervalunhealthyThresholdhealthyThresholdr5   r6   )r   rO   rp   rq   rr   health_check_timeout_in_secondhealth_check_intervalunhealthy_thresholdhealthy_thresholdr?   r   r$   r'   r%   s                 r   create_tcp_listenerBlbClient.create_tcp_listener  s    H eV]K%:%<F>"%1>" *'11)<
 *5. -. ,*?&'*)<%&('8#$!!,"3"3T'+zz$'7)/ " 1 	1r   )rO   rp   rq   rr   health_check_stringc                    [         R                  " U R                  SUS5      n0 nUc  [        5       US'   OXS'   UU[        R
                  " U5      [        R
                  " U5      S.nUb  UUS'   Ub  UUS'   Ub  UUS'   U	b  U	US'   U
b  U
US	'   Ub  UUS
'   U R                  [        R                  U[        R                  " U5      UUS9$ )aE  
 Create a udp listener rule with the specified options.

 :param blb_id:
     the id of blb which the listener work on
 :type blb_id: string

 :param listener_port:
     port to be linstened owned by listener
 :value 1-65535
 :type listener_port: int

 :param backend_port:
     port to be listened owned by Backend server
 :value 1-65535
 :type backend_port: int

 :param scheduler
     balancing algorithm
 :value 'RoundRobin' or 'LeastConnection' or 'Hash'
 :type scheduler: string

 :param health_check_string
     The request string sent by the health,
     the backend server needs to respond after receiving it.
 :type health_check_string: string

 :param health_check_type
     Health check protocol
 :value 'UDP' or 'ICMP'
 :type health_check_type: string

 :param health_check_port
     Health check port, the default is the same as backend_port.
 :type health_check_port: int

 :param health_check_timeout_in_second
     Health check timeout
 :value 1-60, default: 3, unit: seconds
 :type health_check_timeout_in_second: string

 :param health_check_interval
     Health check interval
 :value 1-10, default: 3, unit: seconds
 :type health_check_interval: string

:param unhealthy_threshold
     Unhealthy threshold,
     how many consecutive health check failures,
     shielding the backend server
 :value 2-5, default: 3
 :type unhealthy_threshold: string

 :param healthy_threshold
     Health threshold,
     how many consecutive health checks are successful,
     then re-use the back-end server
 :value 2-5, default: 3
 :type healthy_threshold: string

 :param client_token:
     If the clientToken is not specified by the user, a random String
     generated by default algorithm will be used.
 :type client_token: string

  :param config:
 :type config: baidubce.BceClientConfiguration

 :return:
 :rtype baidubce.bce_response.BceResponse
 r/   UDPlistenerr0   )rv   rw   rr   healthCheckStringhealthCheckTypehealthCheckPortrx   ry   rz   r{   r5   r6   )r   rO   rp   rq   rr   r   health_check_typehealth_check_portr|   r}   r~   r   r?   r   r$   r'   r%   s                    r   create_udp_listenerBlbClient.create_udp_listener%  s	   j eV]K%:%<F>"%1>" *'11)<!'!9!9:M!N	
 (&7D"#(&7D"#)5. -. ,*?D&'*)<D%&('8D#$!!,"3"3T'+zz$'7)/ " 1 	1r   c                 ~   [         R                  " U R                  SUS5      n0 nUc  [        5       US'   OUUS'   UU[        R
                  " U5      S.nUb  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   U	b  U	US	'   U
b  [        R
                  " U
5      US
'   Ub  UUS'   Ub  [        R
                  " U5      US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  [        R
                  " U5      US'   Ub  UUS'   Ub  UUS'   U R                  [        R                  U[        R                  " U5      UUS9$ )a  
Create a http listener rule with the specified options.
:param blb_id:
    the id of blb which the listener work on
:type blb_id: string
:param listener_port:
    port to be linstened owned by listener
:value 1-65535
:type listener_port: int
:param backend_port:
    port to be listened owned by Backend server
:value 1-65535
:type backend_port: int
:param scheduler:
    balancing algorithm
:value 'RoundRobin' or 'LeastConnection'
:type scheduler: string
:param keep_session:
    Whether to enable the session hold function,
    that is,the request sent by the same client will
    reach the same backend server
:value true or false  default:false
:type keep_session: bool
:param keep_session_type:
    The cookie handling method maintained by the session,
    valid only if the session is held open
    :value 'insert' or 'rewrite'  default:insert
:type keep_session_type: string
:param keep_session_duration:
    The time the cookie is kept in session (in seconds),
    valid only if the session is held open
    :value 1-15552000  default:3600
:type keep_session_duration: int
:param keep_session_cookie_name:
    The session keeps the name of the cookie that needs to be
    overridden if and only if session persistence is enabled
    and keep_session_type="rewrite"
:type keep_session_cookie_name: int
:param x_forward_for:
    Whether to enable the real IP address of the client,
    the backend server can obtain the real address of the client
    through the X-Forwarded-For HTTP header.
:value true or false, default: False
:type x_forward_for: bool
:param health_check_type:
    Health check protocol
:value 'HTTP' or 'TCP'
:type health_check_type: string
:param health_check_port:
    Health check port, the default is the same as backend_port
:type health_check_port: int
:param health_check_uri:
    Health check URI, default '/'.
    Effective when the health check protocol is "HTTP"
:type health_check_uri: string
:param health_check_timeout_in_second:
    Health check timeout (unit: second)
    :value 1-60, default: 3
:type health_check_timeout_in_second: int
:param health_check_interval:
    Health check interval (unit: second)
    :value 1-10, default: 3
:type health_check_interval: int
:param unhealthy_threshold:
    The unhealthy threshold, that is,
    how many consecutive health check failures,
    shields the backend server.
:value 2-5, default: 3
:type unhealthy_threshold: int
:param healthy_threshold:
    Health threshold, that is,
    how many consecutive health checks are successful,
    then re-use the back-end server
value: 2-5, default: 3
:type health_threshold: int
:param health_check_normal_status:
    The HTTP status code when the health check is normal supports
    a combination of five types of status codes,
    such as "http_1xx|http_2xx",
    Effective when the health check protocol is "HTTP"
:value default:http_2xx|http_3xx
:type health_check_normal_status:string
:param server_timeout:
    Backend server maximum timeout (unit: second)
:value 1-3600, default: 30
:type server_timeout:int
:param redirect_port:
    Forward the request received by this listener to the
    HTTPS listener, which is specified by the HTTPS listener.
:type redirect_port:int
:param client_token:
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
:type client_token: string
:param config:
:type config: baidubce.BceClientConfiguration
:return:
:rtype baidubce.bce_response.BceResponse
r/   HTTPlistenerr0   ru   keepSessionkeepSessionTypekeepSessionDurationkeepSessionCookieNamexForwardForr   r   healthCheckURIrx   ry   rz   r{   healthCheckNormalStatusserverTimeoutredirectPortr5   r6   )r   rO   rp   rq   rr   keep_sessionkeep_session_typekeep_session_durationkeep_session_cookie_namex_forward_forr   r   health_check_urir|   r}   r~   r   health_check_normal_statusserver_timeoutredirect_portr?   r   r$   r'   r%   s                            r   create_http_listenerBlbClient.create_http_listener  s   h eV^L%:%<F>"%1F>")'11)<> #".D(&7D"# ,*?D&'#/,DD()$"/D((():; "#(&7D"#'(()9: !")5. -. ,*?D&'*)<D%&('8D#$%1(()CD *+%$2D!$#0D !!,"3"3T'+zz$'7)/ " 1 	1r   )rO   rp   rq   rr   cert_idsc                    [         R                  " U R                  SUS5      n0 nUc  [        5       US'   OUUS'   X#[        R
                  " U5      US.nUb  UUS'   Ub  [        R
                  " U5      US'   Ub  UUS'   U	b  U	US'   U
b  U
US	'   Ub  [        R
                  " U5      US
'   Ub  UUS'   Ub  [        R
                  " U5      US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  [        R
                  " U5      US'   Ub  UUS'   Ub  UUS'   Ub  [        R
                  " U5      US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   U R                  [        R                  U[        R                  " U5      UUS9$ )a  
Create a https listener rule with the specified options
:param blb_id:
    The id of blb which the listener work on
:type blb_id: string
:param listener_port:
    port to be linstened owned by listener
:value 1-65535
:type listener_port: int
:param backend_port:
    Port to be listened owned by Backend server
:value 1-65535
:type backend_port: int
:param scheduler:
    balancing algorithm
:value 'RoundRobin' or 'LeastConnection'
:type scheduler: string
:param cert_ids:
    The certificate to be loaded by the listener.
:type cert_ids: List<String>
:param keep_session:
    Whether to enable the session hold function,
    that is, the request sent by the same client will reach the
    same backend server
:value true or false, default: false
:type keep_session: bool
:param keep_session_type:
    The cookie handling method maintained by the session,
    valid only if the session is held open
:value 'insert' or 'rewrite', default:insert
:type keep_session_type: string
:param keep_session_duration:
    The time the cookie is kept in session (in seconds),
    valid only if the session is held open
:value 1-15552000, default:3600
:type keep_session_duration: int
:param keep_session_cookie_name:
    The session keeps the name of the cookie that needs
    to be overridden if and only if session persistence
    is enabled and keep_session_type="rewrite"
:type keep_session_cookie_name: int
:param x_forward_for:
    Whether to enable the real IP address of the client,
    the backend server can obtain the real address of the client
    through the X-Forwarded-For HTTP header.
:value true or false, default: flase
:type x_forward_for: bool
:param health_check_type:
    Health check protocol
:value 'HTTP' or 'TCP'
:type health_check_type: string
:param health_check_port:
    Health check port, the default is the same as backend_port
:type health_check_port: int
:param health_check_uri:
    Health check URI, default '/'.
    Effective when the health check protocol is "HTTP"
:type health_check_uri: string
:param health_check_timeout_in_second:
    Health check timeout (unit: second)
    :value 1-60, default:3
:type health_check_timeout_in_second: int
:param health_check_interval:
    Health check interval (unit: second)
:value 1-10, default: 3
:type health_check_interval: int
:param unhealth_threshold:
    The unhealthy threshold, that is, how many consecutive health
     check failures, shields the backend server.
:value 2-5, default: 3
:type unhealth_threshold: int
:param health_threshold:
    Health threshold, that is, how many consecutive health checks
     are successful, then re-use the back-end server
:value:2-5, default: 3
:type health_threshold: int
:param health_check_normal_status:
    The HTTP status code when the health check is normal
    supports a combination of five types of status codes,
    such as "http_1xx|http_2xx", Effective when the health check
    protocol is "HTTP"
:value default: http_2xx|http_3xx
:type health_check_normal_status: string
:param server_timeout:
    Backend server maximum timeout (unit: second)
:value 1-3600, default: 30
:type server_timeout: int
:param ie6_compatible:
    compatible with IE6 HTTPS request
    (the protocol format is earlier SSL3.0, the security is poor)
:value true or false, default: true
:type ie6_compatible: bool
:param encryption_type:
    Encryption options, support three types:
    compatibleIE or incompatibleIE or userDefind,
    corresponding to:
    IE-compatible encryption or disabled unsecure encryption
    or custom encryption,
    when encryptionType is valid and legitimate,
    ie6Compatible field transfer value will not take effect
type: encryption_type:string
:param encryption_protocols:
    When the encryptionType value is userDefind,
    the list of protocol types is a string list composed of four protocols:
    "sslv3", "tlsv10", "tlsv11", "tlsv12".
type: encryption_protocols:list
:param dual_auth:
    Whether to Open Two-way Authentication,
    default:false
:type dual_auth: boolean
:param client_certIds:
    When dualAuth is true, the loaded client certificate chain
:type client_certIds: list
:param additional_cert_domains:
    Additional domain name,each element is an object that contains two attributes, namely "certId" and "host"
:type additional_cert_domains: list
:param client_token:
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
:type client_token: string
:param config:
:type config: baidubce.BceClientConfiguration
:return
:rtype baidubce.bce_response.BceResponse
r/   HTTPSlistenerr0   rv   rw   rr   certIdsr   r   r   r   r   r   r   r   rx   ry   rz   r{   r   r   ie6CompatibleencryptionTypeencryptionProtocolsdualAuthclientCertIdsadditionalCertDomainsr5   r6   )r   rO   rp   rq   rr   r   r   r   r   r   r   r   r   r   r|   r}   unhealth_thresholdhealth_thresholdr   r   ie6_compatibleencryption_typeencryption_protocols	dual_authclient_certIdsadditional_cert_domainsr?   r   r$   r'   r%   s                                  r   create_https_listenerBlbClient.create_https_listener?  s.   ^ eV_M%:%<F>"%1F>")11)<! #".D((():; "# ,*?D&'#/,DD()$"/D((():; "#(&7D"#'(()9: !")5. -. ,*?D&'));D%&''7D#$%1(()CD *+%$2D!%$2D!&((9 !"+*>D&' (D%$2D!".,CD()!!,"3"3T'+zz$'7)/ " @ 	@r   c                    [         R                  " U R                  SUS5      n0 nUc  [        5       US'   OUUS'   X#[        R
                  " U5      US.nUb  UUS'   Ub  UUS'   Ub  UUS'   U	b  U	US'   U
b  U
US	'   Ub  [        R
                  " U5      US
'   Ub  UUS'   Ub  UUS'   Ub  UUS'   U R                  [        R                  U[        R                  " U5      UUS9$ )a
  
Create a ssl listener rule with thSe specified options.
:param blb_id:
    The id of blb which the listener work on
:type blb_id: string
:param listener_port:
    port to be linstened owned by listener
:value 1-65535
:type listener_port: int
:param backend_port:
    Port to be listened owned by Backend server
:value 1-65535
:type backend_port: int
:param scheduler:
    balancing algorithm
:value 'RoundRobin' or 'LeastConnection'
:type scheduler: string
:param cert_ids:
    The SSL certificate to be loaded by the listener.
    Currently HTTPS listeners can only bind one SSL certificate.
:type cert_ids: List<String>
:param health_check_timeout_in_second:
    Health check timeout (unit: second)
    :value 1-60, default:3
:type health_check_timeout_in_second: int
:param health_check_interval:
    Health check interval (unit: second)
:value 1-10, default: 3
:type health_check_interval: int
:param unhealth_threshold:
    The unhealthy threshold, that is, how many consecutive health
     check failures, shields the backend server.
:value 2-5, default: 3
:type unhealth_threshold: int
:param health_threshold:
    Health threshold, that is, how many consecutive health checks
     are successful, then re-use the back-end server
:value:2-5, default: 3
:type health_threshold: int
:param ie6_compatible:
    compatible with IE6 HTTPS request
    (the protocol format is earlier SSL3.0, the security is poor)
:value true or false, default: true
:type ie6_compatible: bool
:param encryption_type:
    Encryption options, support three types:
    compatibleIE or incompatibleIE or userDefind,
    corresponding to:
    IE-compatible encryption or disabled unsecure encryption
    or custom encryption,
    when encryptionType is valid and legitimate,
    ie6Compatible field transfer value will not take effect
type: encryption_type:string
:param encryption_protocols:
    When the encryptionType value is userDefind,
    the list of protocol types is a string list composed of four protocols:
    "sslv3", "tlsv10", "tlsv11", "tlsv12".
type: encryption_protocols:list
:param dual_auth:
    Whether to Open Two-way Authentication,
    default:false
:type dual_auth: boolean
:param client_certIds:
    When dualAuth is true, the loaded client certificate chain
:type client_certIds: list
:param client_token:
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
:type client_token: string
:param config:
:type config: baidubce.BceClientConfiguration
:return
:rtype baidubce.bce_response.BceResponse
r/   SSLlistenerr0   r   rx   ry   rz   r{   r   r   r   r   r   r5   r6   )r   rO   rp   rq   rr   r   r|   r}   r   r   r   r   r   r   r   r?   r   r$   r'   r%   s                       r   create_ssl_listenerBlbClient.create_ssl_listener
  s<   j eV]K%:%<F>"%1F>")11)<! *5. -. ,*?D&'));D%&''7D#$%$2D!&((9 !"+*>D&' (D%$2D! !!,"3"3T'+zz$'7)/ " @ 	@r   c                     [         R                  " U R                  SUS5      n0 nUb  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R
                  UXuS9$ )a#  
get tcp listeners identified by blbID

:param blb_id
     the id of blb which the listener work on
:type blb_id:string

:param listener_port
     The listener port to query
:type listener_port:int

:param marker
    The optional parameter marker specified in the
    original request to specify
    where in the results to begin listing.
    Together with the marker, specifies the list result
    which listing should begin.
    If the marker is not specified, the list result will
    listing from the first one.
:type marker: string

:param max_keys
    The optional parameter to specifies the max number of
    list result to return.
    The default value is 1000.
:type max_keys: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   rt      listenerPortrH   rI   rJ   rK   r   rO   rp   rQ   rR   r   r$   r'   s           r   describe_tcp_listenerBlbClient.describe_tcp_listener  su    H eV]K$&3?# &9!):!!,"2"2D)/ " @ 	@r   c                     [         R                  " U R                  SUS5      n0 nUb  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R
                  UXuS9$ )a  
get udp listeners identified by blbID

:param blb_id
     the id of blb which the listener work on
:type blb_id:string

:param listener_port
     The listener port to query
:type listener_port:int

:param marker
    The optional parameter marker specified in the original
    request to specify where in the results to begin listing.
    Together with the marker, specifies the list result which
    listing should begin.
    If the marker is not specified, the list result will
    listing from the first one.
:type marker: string

:param max_keys
The optional parameter to specifies the max number of
list result to return.
    The default value is 1000.
:type max_keys: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r   rH   rI   rJ   rK   r   s           r   describe_udp_listenerBlbClient.describe_udp_listener  u    F eV]K$&3?# &9!):!!,"2"2D)/ " @ 	@r   c                     [         R                  " U R                  SUS5      n0 nUb  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R
                  UXuS9$ )a   
get http listeners identified by blbID

:param blb_id
     the id of blb which the listener work on
:type blb_id:string

:param listener_port
     The listener port to query
:type listener_port:int

:param marker
    The optional parameter marker specified in the original
    request to specify where in the results to begin listing.
    Together with the marker, specifies the list result which
    listing should begin.
    If the marker is not specified, the list result will listing
    from the first one.
:type marker: string

:param max_keys
    The optional parameter to specifies the max number of list
    result to return.
    The default value is 1000.
:type max_keys: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r   rH   rI   rJ   rK   r   s           r   describe_http_listener BlbClient.describe_http_listener  su    F eV^L$&3?# &9!):!!,"2"2D)/ " @ 	@r   c                     [         R                  " U R                  SUS5      n0 nUb  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R
                  UXuS9$ )a!  
get https listeners identified by blbID

:param blb_id
     the id of blb which the listener work on
:type blb_id:string

:param listener_port
     The listener port to query
:type listener_port:int

:param marker
    The optional parameter marker specified in the original
    request to specify where in the results to begin listing.
    Together with the marker, specifies the list result which
    listing should begin.
    If the marker is not specified, the list result will listing
    from the first one.
:type marker: string

:param max_keys
    The optional parameter to specifies the max number of list
    result to return.
    The default value is 1000.
:type max_keys: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r   rH   rI   rJ   rK   r   s           r   describe_https_listener!BlbClient.describe_https_listener  su    F eV_M$&3?# &9!):!!,"2"2D)/ " @ 	@r   c                     [         R                  " U R                  SUS5      n0 nUb  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R
                  UXuS9$ )a  
get ssl listeners identified by blbID

:param blb_id
     the id of blb which the listener work on
:type blb_id:string

:param listener_port
     The listener port to query
:type listener_port:int

:param marker
    The optional parameter marker specified in the original
    request to specify where in the results to begin listing.
    Together with the marker, specifies the list result which
    listing should begin.
    If the marker is not specified, the list result will listing
    from the first one.
:type marker: string

:param max_keys
    The optional parameter to specifies the max number of list
    result to return.
    The default value is 1000.
:type max_keys: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r   rH   rI   rJ   rK   r   s           r   describe_ssl_listenerBlbClient.describe_ssl_listenerD  r   r   c                     [         R                  " U R                  SUS5      n0 nUb  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R
                  UXuS9$ )a  
get all listeners identified by blbID

:param blb_id
     the id of blb which the listener work on
:type blb_id:string

:param listener_port
     The listener port to query
:type listener_port:int

:param marker
    The optional parameter marker specified in the original
    request to specify where in the results to begin listing.
    Together with the marker, specifies the list result which
    listing should begin.
    If the marker is not specified, the list result will listing
    from the first one.
:type marker: string

:param max_keys
    The optional parameter to specifies the max number of list
    result to return.
    The default value is 1000.
:type max_keys: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   listenerr   rH   rI   rJ   rK   r   s           r   describe_all_listeners BlbClient.describe_all_listenerst  su    F eVZH$&3?# &9!):!!,"2"2D)/ " @ 	@r   )rO   rp   c
                 B   [         R                  " U R                  SUS5      n
0 nX+S'   0 nUb  X<S'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  XlS'   Ub  X|S'   Ub  XS	'   U R                  [        R                  U
[        R                  " U5      UU	S
9$ )a  
update a tcp listener rule with the specified options.

:param blb_id:
    the id of blb which the listener work on
:type blb_id:string

:param listener_port:
     port to be linstened owned by listener
:value 1-65535
:type listener_port:int

:param backend_port:
    port to be listened owned by Backend server
:value 1-65535
:type backend_port:int

:param scheduler
    balancing algorithm
:value 'RoundRobin'or'LeastConnection'or'Hash'
:type scheduler:string

:param health_check_timeout_in_second
    Health check timeout
:value 1-60  default:3 unit:seconds
:type health_check_timeout_in_second:string

:param health_check_interval
    Health check interval
:value 1-10 default:3 unit:seconds
:type health_check_interval:string

:param unhealth_threshold
    Unhealthy threshold,
     how many consecutive health check failures,
     shielding the backend server
:value 2-5 default:3
:type unhealth_threshold:string

:param health_threshold
    Health threshold,
    how many consecutive health checks are successful,
    then re-use the back-end server
:value 2-5 default:3
:type health_threshold:string

 :param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   rt   r   rw   rr   rx   ry   rz   r{   r5   
r   r7   r8   r
   r:   r)   r   rZ   r<   r=   )r   rO   rp   rq   rr   r|   r}   r   r   r   r$   r'   r%   s                r   update_tcp_listenerBlbClient.update_tcp_listener  s    z eV]K"/#".  & 8 8 CD)5. -. ,*?&'));%&''7#$!!,"2"2D'+zz$'7)/ " 1 	1r   )rO   rp   rq   c                    [         R                  " U R                  SUS5      n0 nX.S'   0 nUb  X?S'   Ub  [        R                  " U5      US'   Ub  [        R                  " U5      US'   Ub  XoS'   Ub  [        R                  " U5      US'   Ub  UUS	'   U	b  XS
'   U
b  XS'   Ub  XS'   U R                  [        R                  U[        R                  " U5      XS9$ )a  
update a udp listener rule with the specified options.

:param blb_id:
        the id of blb which the listener work on
:type blb_id:string

:param listener_port:
        port to be linstened owned by listener
:value 1-65535
:type listener_port:int

:param backend_port:
        port to be listened owned by Backend server
:value 1-65535
:type backend_port:int

:param scheduler
      balancing algorithm
:value 'RoundRobin'or'LeastConnection'or'Hash'
:type scheduler:string

:param health_check_type
      Health check protocol
:value 'UDP' or 'ICMP'
:type health_check_type:string

:param health_check_port
      Health check port, the default is the same as backend_port.
      This field can only be updated if health_check_type is UDP.
:type health_check_port:int

:param health_check_string
      The request string sent by the health,
      the backend server needs to respond after receiving it,
      and supports standard escaping
:type health_check_string:string

:param health_check_timeout_in_second
        Health check timeout
:value 1-60  default:3 unit:seconds
:type health_check_timeout_in_second:string

:param health_check_interval
        Health check interval
:value 1-10 default:3 unit:seconds
:type health_check_interval:string

:param unhealth_threshold
        Unhealthy threshold,
         how many consecutive health check failures,
         shielding the backend server
:value 2-5 default:3
:type unhealth_threshold:string

:param health_threshold
        Health threshold,
        how many consecutive health checks are successful,
        then re-use the back-end server
:value 2-5 default:3
:type health_threshold:string

 :param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r   rw   rr   r   r   r   rx   ry   rz   r{   r5   r   )r   rO   rp   rq   rr   r   r   r   r|   r}   r   r   r   r$   r'   r%   s                   r   update_udp_listenerBlbClient.update_udp_listener  s   b eV]K"/#".  & 8 8 CD((():; "#(&7"#*(()<= $%)5. -. ,*?&'));%&''7#$!!,"2"2D'+zz$'7)/ " @ 	@r   c                    [         R                  " U R                  SUS5      n0 nUUS'   0 nUb  UUS'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  UUS	'   U	b  U	US
'   U
b  [        R                  " U
5      US'   Ub  UUS'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  UUS'   U R                  [        R                  U[        R                  " U5      UUS9$ )a  
update a http listener rule with the specified options.
:param blb_id:
    The id of blb which the listener work on
:type blb_id: string
:param listener_port:
    Port to be linstened owned by listener
:value 1-65535
:type listener_port: int
:param backend_port:
    port to be listened owned by Backend server
:value 1-65535
:type backend_port: int
:param scheduler:
    Balancing algorithm
:value 'RoundRobin' or 'LeastConnection' or 'Hash'
:type scheduler: string
:param keep_session:
    Whether to enable the session hold function, that is,
    the request sent by the same client will reach the
    same backend server
:value true or false, default:false
:type keep_session: bool
:param keep_session_type:
    The cookie handling method maintained by the session,
    valid only if the session is held open
:value 'insert' or 'rewrite', default:insert
:type keep_session_type: string
:param keep_session_duration:
    The time the cookie is kept in session (in seconds),
    valid only if the session is held open
:value 1-15552000, default:3600
:type keep_session_duration: int
:param keep_session_cookie_name:
    The session keeps the name of the cookie that needs
    to be overridden,if and only if session persistence is
    enabled and keep_session_type="rewrite"
:type keep_session_cookie_name: int
:param x_forward_for:
    Whether to enable the real IP address of the client,
    the backend server can obtain the real address of the
    client through the X-Forwarded-For HTTP header.
:value true or false, default: flase
:type x_forward_for: bool
:param health_check_type:
    Health check protocol
:value 'HTTP' or 'TCP'
:type health_check_type: string
:param health_check_port:
    Health check port, the default is the same as backend_port
:type health_check_port: int
:param health_check_uri:
    Health check URI, default '/'.
    Effective when the health check protocol is "HTTP"
:type health_check_uri: string
:param health_check_timeout_in_second:
    Health check timeout (unit: second)
:value 1-60, default: 3
:type health_check_timeout_in_second: int
:param health_check_interval:
    Health check interval (unit: second)
:value 1-10, default: 3
:type health_check_interval: int
:param unhealth_threshold:
    The unhealthy threshold, that is, how many consecutive health
    check failures, shields the backend server.
:value 2-5, default: 3
:type unhealth_threshold: int
:param health_threshold:
    Health threshold, that is, how many consecutive health checks
    are successful, then re-use the back-end server
:value:2-5, default: 3
:type health_threshold: int
:param health_check_normal_status:
    The HTTP status code when the health check is normal supports
    a combination of five types of status codes,
    such as "http_1xx|http_2xx", Effective when the health check
    protocol is "HTTP"
:value default: http_2xx|http_3xx
:type health_check_normal_status: string
:param server_timeout:
    Backend server maximum timeout (unit: second)
:value 1-3600, default: 30
:type server_timeout: int
:param redirect_port:
    Forward the request received by this listener to the HTTPS
    listener, which is specified by the HTTPS listener.
:type redirect_port: int
:param config:
:type config: baidubce.BceClientConfiguration
:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r   rw   rr   r   r   r   r   r   r   r   r   rx   ry   rz   r{   r   r   r   r5   r   )r   rO   rp   rq   rr   r   r   r   r   r   r   r   r   r|   r}   r   r   r   r   r   r   r$   r'   r%   s                           r   update_http_listenerBlbClient.update_http_listenerj  s   Z eV^L"/#".D  & 8 8 CD#".D((():; "# ,*?D&'#/,DD()$"/D((():; "#(&7D"#'(()9: !")5. -. ,*?D&'));D%&''7D#$%1(()CD *+%$2D!$#0D !!,"2"2D'+zz$'7)/ " @ 	@r   c                    [         R                  " U R                  SUS5      n0 nUUS'   0 nUb  UUS'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  UUS	'   U	b  U	US
'   U
b  [        R                  " U
5      US'   Ub  UUS'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   U R                  [        R                  U[        R                  " U5      UUS9$ )ag  
update a https listener rule with the specified options.
:param blb_id:
    The id of blb which the listener work on
:type blb_id: string
:param listener_port:
    Port to be linstened owned by listener
:value 1-65535
:type listener_port: int
:param backend_port:
    Port to be listened owned by Backend server
:value 1-65535
:type backend_port: int
:param scheduler:
    Balancing algorithm
:value 'RoundRobin' or 'LeastConnection' or 'Hash'
:type scheduler: string
:param keep_session:
    Whether to enable the session hold function, that is, the request
    sent by the same client will reach the same backend server
:value true or false, default: false
:type keep_session: bool
:param keep_session_type:
    The cookie handling method maintained by the session,
    valid only if the session is held open
:value 'insert' or 'rewrite', default: insert
:type keep_session_type: string
:param keep_session_duration:
    The time the cookie is kept in session (in seconds),
    valid only if the session is held open
:value 1-15552000, default:3600
:type keep_session_duration: int
:param keep_session_cookie_name:
    The session keeps the name of the cookie that needs to be
    overridden,if and only if session persistence is enabled and
    keep_session_type="rewrite"
:type keep_session_cookie_name: int
:param x_forward_for:
    Whether to enable the real IP address of the client,
    the backend server can obtain the real address of the client
    through the X-Forwarded-For HTTP header.
:value true or false, default: False
:type x_forward_for: bool
:param health_check_type:
    Health check protocol
:value 'HTTP' or 'TCP'
:type health_check_type: string
:param health_check_port:
    Health check port, the default is the same as backend_port
:type health_check_port: int
:param health_check_uri:
    Health check URI, default '/'.
    Effective when the health check protocol is "HTTP"
:type health_check_uri: string
:param health_check_timeout_in_second:
    Health check timeout (unit: second)
:value 1-60, default: 3
:type health_check_timeout_in_second: int
:param health_check_interval:
    Health check interval (unit: second)
:value 1-10, default: 3
:type health_check_interval: int
:param unhealth_threshold:
    The unhealthy threshold, that is, how many consecutive health
    check failures, shields the backend server.
:value 2-5, default: 3
:type unhealth_threshold: int
:param health_threshold:
    Health threshold, that is, how many consecutive health checks
    are successful, then re-use the back-end server
:value:2-5, default: 3
:type health_threshold: int
:param health_check_normal_status:
    The HTTP status code when the health check is normal supports
    a combination of five types of status codes,
    such as "http_1xx|http_2xx", Effective when the health check
    protocol is "HTTP"
:value default: http_2xx|http_3xx
:type health_check_normal_status: string
:param server_timeout:
    Backend server maximum timeout (unit: second)
:value 1-3600, default: 30
:type server_timeout: int
:param cert_ids:
    The SSL certificate to be loaded by the listener.
    Currently HTTPS listeners can only bind one SSL certificate.
:type cert_ids:List<String>
:param: additional_cert_domains:
    Additional domain name,each element is an object that contains two attributes, namely "cert_id" and "host"
:type additional_cert_domains: list
:param ie6_compatible:
    Is it compatible with IE6 HTTPS request
    (the protocol format is earlier SSL3.0, the security is poor)
:value true or false, default: true
:type ie6_compatible: bool
:param config:
:type config: baidubce.BceClientConfiguration
:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r   rw   rr   r   r   r   r   r   r   r   r   rx   ry   rz   r{   r   r   r   r   r   r5   r   )r   rO   rp   rq   rr   r   r   r   r   r   r   r   r   r|   r}   r   r   r   r   r   r   r   r   r$   r'   r%   s                             r   update_https_listenerBlbClient.update_https_listener  s   h eV_M"/#".D  & 8 8 CD#".D((():; "# ,*?D&'#/,DD()$"/D((():; "#(&7D"#'(()9: !")5. -. ,*?D&'));D%&''7D#$%1(()CD *+%$2D!&DO".,CD()%$2D!!!,"2"2D'+zz$'7)/ " 1 	1r   c                    [         R                  " U R                  SUS5      n0 nUUS'   0 nUb  UUS'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS	'   U	b  U	US
'   U
b  U
US'   Ub  [        R                  " U5      US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   U R                  [        R                  U[        R                  " U5      UUS9$ )aa	  
update a ssl listener rule with the specified options.
:param blb_id:
    The id of blb which the listener work on
:type blb_id: string
:param listener_port:
    port to be linstened owned by listener
:value 1-65535
:type listener_port: int
:param backend_port:
    Port to be listened owned by Backend server
:value 1-65535
:type backend_port: int
:param scheduler:
    balancing algorithm
:value 'RoundRobin' or 'LeastConnection'
:type scheduler: string
:param health_check_timeout_in_second:
    Health check timeout (unit: second)
    :value 1-60, default:3
:type health_check_timeout_in_second: int
:param health_check_interval:
    Health check interval (unit: second)
:value 1-10, default: 3
:type health_check_interval: int
:param unhealth_threshold:
    The unhealthy threshold, that is, how many consecutive health
     check failures, shields the backend server.
:value 2-5, default: 3
:type unhealth_threshold: int
:param health_threshold:
    Health threshold, that is, how many consecutive health checks
     are successful, then re-use the back-end server
:value:2-5, default: 3
:type health_threshold: int
:param cert_ids:
    The SSL certificate to be loaded by the listener.
    Currently HTTPS listeners can only bind one SSL certificate.
:type cert_ids: List<String>
:param ie6_compatible:
    compatible with IE6 HTTPS request
    (the protocol format is earlier SSL3.0, the security is poor)
:value true or false, default: true
:type ie6_compatible: bool
:param encryption_type:
    Encryption options, support three types:
    compatibleIE or incompatibleIE or userDefind,
    corresponding to:
    IE-compatible encryption or disabled unsecure encryption or
    custom encryption,
    when encryptionType is valid and legitimate,
    ie6Compatible field transfer value will not take effect
type: encryption_type:string
:param encryption_protocols:
    When the encryptionType value is userDefind,
    the list of protocol types is a string list composed of four protocols:
    "sslv3", "tlsv10", "tlsv11", "tlsv12".
type: encryption_protocols:list
:param dual_auth:
    Whether to Open Two-way Authentication,
    default:false
:type dual_auth: boolean
:param client_certIds:
    When dualAuth is true, the loaded client certificate chain
:type client_certIds: list
:param config:
:type config: baidubce.BceClientConfiguration
:return
:rtype baidubce.bce_response.BceResponse
r/   r   r   rw   rr   rx   ry   rz   r{   r   r   r   r   r   r   r5   r   )r   rO   rp   rq   rr   r|   r}   r   r   r   r   r   r   r   r   r   r$   r'   r%   s                      r   update_ssl_listenerBlbClient.update_ssl_listener  sI   d eV]K"/#".D  & 8 8 CD)5. -. ,*?D&'));D%&''7D#$&DO%$2D!&((9 !"+*>D&' (D%$2D!!!,"2"2D'+zz$'7)/ " @ 	@r   )rO   portListc                     [         R                  " U R                  SUS5      n0 nSUS'   Uc  [        5       US'   OX6S'   0 nX'S'   U R	                  [
        R                  U[        R                  " U5      UUS9$ )a  
Release the listener under the specified LoadBalancer,
the listener is specified by listening to the port.

:param blb_id:
    id of LoadBalancer
:type blb_id:string

:param portList:
    The ports of listeners to be released
:type portList:list<int>

:param client_token:
    If the clientToken is not specified by the user, a random String
    generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   Ns   batchdeleter0   r   r5   rd   )r   rO   r   r?   r   r$   r'   r%   s           r   delete_listenersBlbClient.delete_listeners"  s    4 eVZH!%~%:%<F>"%1>"#Z!!,"2"2D'+zz$'7)/ " 1 	1r   )rO   backend_server_listc                     [         R                  " U R                  SUS5      n0 nUc  [        5       US'   OX6S'   0 nX'S'   U R	                  [
        R                  U[        R                  " U5      UUS9$ )a  
Add a backend server for the specified LoadBalancer,
support batch add

:param blb_id:
        id of LoadBalancer
:type blb_id:string

:param backend_server_list
        List of backend servers to be added
:type backend_server_list:List<BackendServerModel>
BackendServerModel{:param:instanceId
                       id of  Backend server
                   :type instanceId:string

                   :param weight
                       Backend server weight, value range [0, 100],
                       weight 0 means not to forward traffic to
                       the backend server
                   :type weight:int
                  }

:param client_token:
    If the clientToken is not specified by the user, a random String
    generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   backendserverr0   backendServerListr5   )	r   r7   r8   r9   r)   r   r;   r<   r=   r   rO   r   r?   r   r$   r'   r%   s           r   add_backend_serversBlbClient.add_backend_serversQ  s    J eV_M%:%<F>"%1>"$7 !!!,"3"3T'+zz$'7)/ " 1 	1r   c                     [         R                  " U R                  SUS5      n0 nX'S'   Ub  X7S'   Ub  XGS'   U R                  [        R
                  XgUS9$ )ag  
Query the information about the backend server under the specified
LoadBalancer identified by listenPort

:param blb_id:
    id of LoadBalancer
:type blb_id: string

:param listener_port:
    port to be linstened owned by listener
:value 1-65535
:type listener_port: int

:param marker:
    The optional parameter marker specified in the original request
    to specify where in the results to begin listing.
    Together with the marker, specifies the list result which listing
    should begin. If the marker is not specified, the list result will
    listing from the first one.
:type marker: string

:param max_keys:
    The optional parameter to specifies the max number of list
    result to return.
    The default value is 1000.
:type max_keys: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r   rH   rI   rJ   rK   r   s           r   describe_health_status BlbClient.describe_health_status  sm    J eV_M"/ &9!):!!,"2"2D)/ " 1 	1r   c                     [         R                  " U R                  SUS5      n0 nUb  X&S'   Ub  X6S'   U R                  [        R
                  XVUS9$ )a  
Query the list of backend servers under the specified LoadBalancer

:param blb_id:
    Id of LoadBalancer
:type blb_id:string

:param marker:
    The optional parameter marker specified in the original
    request to specify where in the results to begin listing.
    Together with the marker, specifies the list result which
    listing should begin. If the marker is not specified,
    the list result will listing from the first one.
:type marker: string

:param max_keys:
    The optional parameter to specifies the max number of
    list result to return.
    The default value is 1000.
:type max_keys: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   rH   rI   rJ   rK   )r   rO   rQ   rR   r   r$   r'   s          r   describe_backend_servers"BlbClient.describe_backend_servers  sd    < eV_M &9!):!!,"2"2D)/ " 1 	1r   c                     [         R                  " U R                  SUS5      n0 nSUS'   Uc  [        5       US'   OX6S'   0 nX'S'   U R	                  [
        R                  U[        R                  " U5      UUS9$ )a  
update the information about the backend server under
the specified LoadBalancer

:param blb_id:
    id of LoadBalancer
:type blb_id:string

:param backend_server_list:
    List of backend servers to be updated
:type backend_server_list:List<BackendServerModel>
BackendServerModel{:param:instanceId
                      id of  Backend server
                   :type instanceId:string

                   :param weight
                       Backend server weight, value range [0, 100],
                       weight 0 means not to forward traffic to
                       the backend server
                   :type weight:int
                  }

:param client_token:
    If the clientToken is not specified by the user, a random String
    generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   Ns   updater0   r   r5   rd   r   s           r   update_backend_servers BlbClient.update_backend_servers  s    J eV_M y%:%<F>"%1>"$7 !!!,"2"2D'+zz$'7)/ " 1 	1r   c                     [         R                  " U R                  SUS5      n0 nUc  [        5       US'   OX6S'   0 nX'S'   U R	                  [
        R                  U[        R                  " U5      UUS9$ )a8  
Release the backend server under the specified LoadBalancer,
which is specified by its backend server

:param blb_id:
        id of LoadBalancer
:type blb_id:string

:param backend_server_list:
        List of backend servers to be removed
:type backend_server_list:List<string>

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r0   r   r5   rd   r   s           r   remove_backend_servers BlbClient.remove_backend_servers	  s    6 eV_M%:%<F>"%1>"$7 !!!,"2"2D'+zz$'7)/ " 1 	1r   )rO   securitygroupidsc                     [         R                  " U R                  SUS5      n0 nSUS'   Uc  [        5       US'   OX6S'   0 nX'S'   U R	                  [
        R                  U[        R                  " U5      UUS9$ )a  
bind the blb security groups (normal/ipv6 LoadBalancer)

:param blb_id:
        id of LoadBalancer
:type blb_id:string

:param securitygroupids:
        List of security group ids to be bind
:type securitygroupids:List<string>

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   securitygroupN   bindr0   securityGroupIdsr5   rd   r   rO   r   r?   r   r$   r'   r%   s           r   bind_security_groupsBlbClient.bind_security_groupsA	  s    4 eV_Mw%:%<F>"%1>"#3 !!,"2"2D'+zz$'7)/ " 1 	1r   c                     [         R                  " U R                  SUS5      n0 nSUS'   Uc  [        5       US'   OX6S'   0 nX'S'   U R	                  [
        R                  U[        R                  " U5      UUS9$ )a  
unbind the blb security groups (normal/ipv6 LoadBalancer)

:param blb_id:
        id of LoadBalancer
:type blb_id:string

:param securitygroupids:
        List of security group ids to be bind
:type securitygroupids:List<string>

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   N   unbindr0   r   r5   rd   r   s           r   unbind_security_groups BlbClient.unbind_security_groupsj	  s    4 eV_M y%:%<F>"%1>"#3 !!,"2"2D'+zz$'7)/ " 1 	1r   c                     [         R                  " U R                  SUS5      n0 nUc  [        5       US'   OX%S'   U R	                  [
        R                  XEUS9$ )a  
describe the blb security groups (normal/ipv6 LoadBalancer)

:param blb_id:
        id of LoadBalancer
:type blb_id:string

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r   r0   rJ   r   r7   r8   r9   r)   r   rL   r_   s         r   describe_security_groups"BlbClient.describe_security_groups	  sc    * eV_M%:%<F>"%1>"!!,"2"2D)/ " 1 	1r   )rO   enterprisesecuritygroupidsc                     [         R                  " U R                  SUSS5      n0 nSUS'   Uc  [        5       US'   OX6S'   0 nX'S'   U R	                  [
        R                  U[        R                  " U5      UUS9$ )	a.  
bind the blb enterprise security groups (normal/ipv6 LoadBalancer)

:param blb_id:
        id of LoadBalancer
:type blb_id:string

:param enterprisesecuritygroupids:
        List of enterprise security group ids to be bind
:type enterprisesecuritygroupids:List<string>

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   
enterpriser   Nr   r0   enterpriseSecurityGroupIdsr5   rd   r   rO   r  r?   r   r$   r'   r%   s           r   bind_enterprise_security_groups)BlbClient.bind_enterprise_security_groups	  s    4 eV\?[w%:%<F>"%1>"-G)*!!,"2"2D'+zz$'7)/ " 1 	1r   c                     [         R                  " U R                  SUSS5      n0 nSUS'   Uc  [        5       US'   OX6S'   0 nX'S'   U R	                  [
        R                  U[        R                  " U5      UUS9$ )	a2  
unbind the blb enterprise security groups (normal/ipv6 LoadBalancer)

:param blb_id:
        id of LoadBalancer
:type blb_id:string

:param enterprisesecuritygroupids:
        List of enterprise security group ids to be unbind
:type enterprisesecuritygroupids:List<string>

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r
  r   Nr  r0   r  r5   rd   r  s           r   !unbind_enterprise_security_groups+BlbClient.unbind_enterprise_security_groups	  s    4 eV\?[ y%:%<F>"%1>"-G)*!!,"2"2D'+zz$'7)/ " 1 	1r   c                     [         R                  " U R                  SUSS5      n0 nUc  [        5       US'   OX%S'   U R	                  [
        R                  XEUS9$ )a  
describe the blb enterprise security groups (normal/ipv6 LoadBalancer)

:param blb_id:
        id of LoadBalancer
:type blb_id:string

:param client_token:
        If the clientToken is not specified by the user,
        a random String generated by default algorithm will be used.
:type client_token: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r/   r
  r   r0   rJ   r  r_   s         r   #describe_enterprise_security_groups-BlbClient.describe_enterprise_security_groups
  se    * eV\?[%:%<F>"%1>"!!,"2"2D)/ " 1 	1r    r   )NNNNN)NNNN)NNNNNNN)NN)NNN)NNNNNN)NNNNNNNN)NNNNNNNNNNNNNNNNN)NNNNNNNNNNNNNNNNNNNNNN)NNNNNNNNNNN)
NNNNNNNNNN)NNNNNNNNNNNNNNNNNN)NNNNNNNNNNNNNNNNNNNN)NNNNNNNNNNNNN)3__name__
__module____qualname____firstlineno____doc__r8   r   r   r)   r	   bytesstrr@   rS   rV   r[   r`   rf   rk   rn   intr   r   r   listr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  __static_attributes__r  r   r   r   r   )   s    G= 7;/36 eS\&:>AE21&21h FJBF&*<@| eS\"1 #1& UCL!:>6:.@ ".@` eS\"@ #@< eS\"'@ #'@R eS\&?CFJ31&31j KOGK+/>@@ eS\& <@2604.26:Z1	&Z1x eS\#(#,	0 /3.2;?2604.26:o10
o1b eS\5#,8 CG376:+/GK.2<@3715/38<@D7;`18`1D eS\5#,G AE04487;DHGK=A48HL9=BFIM=A6:8<G@GG@R eS\5#,G <@26FJAE15;?6:u@Gu@n eS\":>AE.@ #.@` eS\"GK48-@ #-@^ eS\";?BF-@ #-@^ eS\"<@CG-@ #-@^ eS\":>AE-@ #-@^ eS\";?BF-@ #-@^ eS\! :>;?26/3-1#'Q1!Q1f eS\  GK&*.2.204;?26/3-1#'l@ l@\ eS\!GK:>/3376:+/GK.2<@37GK8<,08<Y@!Y@v eS\5+/;?04487;DHGK=A48HL9=-1EI:>d1 6d1L eS\59=;?26/3<@+/,015;?#'q@ 6q@f eS\'1'1R eS\"&( 7;11(11f eS\! CG.1!.1` eS\"6:7;&1 #&1P eS\"&( :>21(21h eS\"&( :>&1(&1P eS\#% 8<%1%%1N eS\#% :>%1%%1N eS\";?1 #1> eS\)-/ CG%1/%1N eS\)-/ EI%1/%1N eS\"FJ1 #1r   r   c                  >    [        [        R                  " 5       5      $ )z
The default method to generate the random string for client_token
if the optional parameter client_token is not specified by the user.

:return:
:rtype string
)r  uuiduuid4r  r   r   generate_client_token_by_uuidr#  &
  s     tzz|r   )r  r   r<   loggingr!  sysbaidubcer   baidubce.authr   baidubce.httpr   r   r   r   baidubce.utilsr	   r
   r8   reloadsetdefaultencoding	getLoggerr  _loggerr   r   r#  r9   r  r   r   <module>r.     s        
 $ ' ) ! &  # ;;
3K7#


H
%z'1-- z'1zO 6 r   