
    9i9                        S r SSKrSSKrSSKrSSKrSSKJrJrJr  SSK	J
r
  SSKJrJrJr  SSKJrJr  SSKJr  \R(                  S   S:X  a  \\4rO\\4rS	r " S
 S\R4                  5      rg)z.
This module provides a client class for BCM.
    N)bce_base_clientutilscompat)bce_v1_signer)handlerbce_http_clienthttp_methods)bcm_handler	bcm_model)required   d   c                   	   \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSS jrSS jr  SS jr  SS jr SS jr   SS jr   SS jrSS jrSS jrSS jrSS jr SS jrSS jr SS jr SS jrSS jr SS jrSS jr SS jr SS jr SS  jr!\"" \#\#S!9SS" j5       r$\"" \#\#S!9SS# j5       r%\"" \#\#\&\&S$9SS% j5       r'S& r(\"" \#\#S!9SS' j5       r)\"" \#\#\&\&S$9  SS( j5       r*S) r+ SS* jr, SS+ jr-SS, jr.S- r/S. r0\"" \#\#S!9  SS/ j5       r1\"" \&S09   SS1 j5       r2\"" \&S09   SS2 j5       r3SS3 jr4SS4 jr5  SS5 jr6SS6 jr7SS7 jr8SS8 jr9SS9 jr:SS: jr;SS; jr<  SS< jr=SS= jr>SS> jr?SS? jr@SS@ jrASSA jrB SSB jrCSSC jrDSSD jrESSE jrFSSF jrG  SSG jrH\"" \I\I\&SH9SSI j5       rJSSJ jrKSSK jrL\"" \I\I\I\#\I\#\I\I\I\#\&\&SL9  SSM j5       rMSSN jrNSSO jrO\"" \I\I\I\I\#\I\#\I\I\I\#\&\&SP9  SSQ j5       rPSSR jrQSSS jrRSST jrSSSU jrTSSV jrU\"" \#\#\V\V\VSW9   SSX j5       rW\"" \#\#\V\V\VSW9   SSY j5       rX\"" \V\V\V\V\&SZ9S[ 5       rY\"" \V\V\V\V\VS\9S] 5       rZ\"" \V\V\V\V\V\VS^9S_ 5       r[\"" \V\VS`9Sa 5       r\\"" \V\VS`9Sb 5       r]\"" \V\#\#Sc9Sd 5       r^\"" \V\V\&Se9Sf 5       r_\"" \V\V\&Se9Sg 5       r`\"" \V\V\V\V\V\V\#\#Sh9Si 5       ra\"" \V\V\V\V\V\V\V\#\#Sj9	Sk 5       rb\"" \V\V\V\V\V\V\V\V\V\#\#Sl9Sm 5       rcSSn jrd   SSo jre   SSp jrf   SSq jrg   SSr jrhSSs jri   SSt jrj   SSu jrkSSv jrl   SSw jrm   SSx jrnSSy jro   SSz jrp   SS{ jrqSS| jrr   SS} jrs   SS~ jrtSS jru   SS jrv   SS jrwSS jrx   SS jry   SS jrzSS jr{SS jr|SS jr}SS jr~    SS jrSS jr    SS jrSS jr  SS jrSS jrSS jr   SS jrSS jrSS jrSS jrSS jr   SS jr   SS jrSS jrSS jrSS jrSS jr  SS jrSS jr    SS jr    SS jrSS jrSS jrSS jr\"" \&\#\#\#S9     SS j5       r\"" \&S9S 5       r\"" \&\#\#\#S9     SS j5       rSS jrS rS rS r  SS jr  SS jrS r  SS jr  SS jrS rSS jrSS jr\"" \V\V\V\V\&\&\V\&\#S9	  SS j5       r  SS jr SS jr SS jr SS jrSrg)	BcmClient#   z
BCM base sdk client
s	   /json-apis   /csm/apis
   /event-api   /v1   /v2s   content-types   application/json;charset=UTF-8s   x-bce-request-idNc                 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/bcm/bcm_client.pyr   BcmClient.__init__2   s    %%..t<    c                     Uc  U R                   $ [        R                  " U R                   5      nUR                  U5        U$ r   )r   copymerge_non_none_values)r   r   
new_configs      r   _merge_configBcmClient._merge_config5   s7    >;;4;;/J,,V4r   c           
         U R                  U5      nUc  [        R                  n[        R                  " U[
        R                  [        R                  U/U[        R                  [        R                  -   U-   X4U5      $ r   )r!   r   
parse_jsonr   send_requestr   signparse_errorr   prefixversionr   http_methodpathbodyheadersparamsr   body_parsers           r   _send_requestBcmClient._send_request=   sr     ##F+!,,K++M&&)<)<k(J))I,=,==DdU[] 	]r   c	           
         U R                  U5      nUc  [        R                  nUc  0 nU R                  U;  a  U R                  XPR                  '   U R
                  U;  a!  [        R                  " 5       XPR
                  '   [        R                  " U[        R                  [        R                  U/U[        R                  U-   U-   XEU5      $ r   )r!   r   r$   content_type_header_keycontent_type_header_valuerequest_id_header_keyuuiduuid4r   r%   r   r&   r
   r'   r   
csm_prefix)	r   r+   r,   r)   r-   r.   r/   r   r0   s	            r   _send_csm_requestBcmClient._send_csm_requestH   s    ##F+!,,K?G''w6484R4RG001%%W426**,G../++M&&)@)@+(N--7$>vW 	Wr   c           
         U R                  U5      nUc  [        R                  nUc  0 nU R                  U;  a  U R                  X@R                  '   U R
                  U;  a!  [        R                  " 5       X@R
                  '   [        R                  " U[        R                  [        R                  U/U[        R                  [        R                   -   U-   X4U5      $ r   )r!   r   r$   r4   r5   r6   r7   r8   r   r%   r   r&   r
   r'   r   event_prefixr)   r*   s           r   _send_event_requestBcmClient._send_event_requestX   s    ##F+!,,K?G''w6484R4RG001%%W426**,G../++M&&)@)@+(N//)2C2CCdJD[ac 	cr   c
                    [         R                  " U5      n[         R                  " U5      n[         R                  " U5      nSXU4-  n
0 nUb  XKS'   Ub  X[S'   Ub  XkS'   Ub  X{S'   Ub  XS'   U R                  [        R                  XU	S9$ )ag  
Return metric data of product instances owned by the authenticated user.

This site may help you: https://cloud.baidu.com/doc/BCM/s/9jwvym3kb

:param user_id:
    Master account ID
:type user_id: string

:param scope:
    Cloud product namespace, eg: BCE_BCC.
:type scope: string

:param metric_name:
    The metric name of baidu cloud monitor, eg: CpuIdlePercent.
:type metric_name: string

:param dimensions:
    Consists of dimensionName: dimensionValue.
    Use semicolons when items have multiple dimensions,
    such as dimensionName: dimensionValue; dimensionName: dimensionValue.
    Only one dimension value can be specified for the same dimension.
    eg: InstanceId:fakeid-2222
:type dimensions: string

:param statistics:
    According to the format of statistics1,statistics2,statistics3,
    the optional values are `average`, `maximum`, `minimum`, `sum`, `sampleCount`
:type statistics: string

:param start_time:
    Query start time.
    Please refer to the date and time, UTC date indication
:type start_time: string

:param end_time:
    Query end time.
    Please refer to the date and time, UTC date indication
:type end_time: string

:param period_in_second:
    Statistical period.
    Multiples of 60 in seconds (s).
:type period_in_second: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
s   /metricdata/%s/%s/%s
   dimensions   statistics[]	   startTime   endTime   periodInSecondr/   r   r   convert_to_bytesr1   r	   GETr   user_idscopemetric_name
dimensions
statistics
start_timeend_timeperiod_in_secondr   r,   r/   s               r   get_metric_dataBcmClient.get_metric_datah   s    l ))'2''.--k:&'+)FF!$.=!!&0?#!#-< !):'(8$%!!,"2"2DPV!WWr   c
                     [         R                  " U5      n[         R                  " U5      nSX4-  n
0 nUb  X;S'   Ub  XKS'   Ub  X[S'   Ub  XkS'   Ub  X{S'   Ub  XS'   U R                  [        R                  XU	S9$ )	a  
Return batch metric data of product instances owned by the authenticated user.

:param user_id:
    Master account ID
:type user_id: string

:param scope:
    Cloud product namespace, eg: BCE_BCC.
:type scope: string

:param metric_name:
    The metric name of baidu cloud monitor, eg: CpuIdlePercent.
    Use comma when items have multiple metrics,
    such as metric1,metric2,metric3.
:type metric_name: string

:param dimensions:
    Consists of dimensionName:dimensionValue.
    Use comma when items have multiple dimensions,
    such as dimensionName:dimensionValue,dimensionName:dimensionValue.
    Only one dimension value can be specified for the same dimension.
    eg: InstanceId:itk-1010,InstanceId:itk-1011
:type dimensions: string

:param statistics:
    According to the format of statistics1,statistics2,statistics3,
    the optional values are `average`, `maximum`, `minimum`, `sum`, `sampleCount`
:type statistics: string

:param start_time:
    Query start time.
    Please refer to the date and time, UTC date indication
:type start_time: string

:param end_time:
    Query end time.
    Please refer to the date and time, UTC date indication
:type end_time: string

:param period_in_second:
    Statistical period.
    Multiples of 60 in seconds (s).
:type period_in_second: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
s   /metricdata/batch/%s/%ss   metricName[]s   dimensions[]rB   rC   rD   rE   rF   rG   rJ   s               r   get_batch_metric_dataBcmClient.get_batch_metric_data   s    l ))'2''.)W,<<"&1?#!&0?#!&0?#!#-< !):'(8$%!!,"2"2DPV!WWr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eS[        R                  " U5      -  nUUUUS.nU R	                  [
        R                  U[        R                  " U5      US9$ )a  
create a custom namespace for custom monitor

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param name:
    namespace name
:type name: string

:param namespace_alias:
    namespace alias name
:type namespace_alias: string

:param comment:
    namespace comment
:type user_id: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   *user_id should not be none or empty string'name should not be none or empty strings#   /userId/%s/custom/namespaces/createuserIdnamenamespaceAliascommentr-   r   	len
ValueErrorr   rH   r:   r	   POSTjsondumpsr   rK   r]   namespace_aliasr_   r   r,   r-   s           r   create_namespaceBcmClient.create_namespace   s    8 w<1IJJt9>FGG58O8OPW8XX-	
 %%l&7&7DJJtDT]c%ddr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eS[        R                  " U5      -  nUUS.nU R	                  [
        R                  U[        R                  " U5      US9$ )ah  
create a custom namespace for custom monitor

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param names:
    namespace name collection
:type names: string array

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   names should not be emptys#   /userId/%s/custom/namespaces/delete)r\   namesr`   ra   )r   rK   rm   r   r,   r-   s         r   batch_delete_namespaces!BcmClient.batch_delete_namespaces%  s    ( w<1IJJu:?89958O8OPW8XX
 %%l&7&7DJJtDT]c%ddr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eS[        R                  " U5      -  nUUUUS.nU R	                  [
        R                  U[        R                  " U5      US9$ )a  
update a custom namespace for custom monitor

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param name:
    namespace name
:type name: string

:param namespace_alias:
    namespace alias name
:type namespace_alias: string

:param comment:
    namespace comment
:type user_id: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   rZ   s#   /userId/%s/custom/namespaces/updater[   r`   	rb   rc   r   rH   r:   r	   PUTre   rf   rg   s           r   update_namespaceBcmClient.update_namespaceE  s    8 w<1IJJt9>FGG58O8OPW8XX-	
 %%l&6&64::dCS\b%ccr   c                     [        U5      S::  a  [        S5      eS[        R                  " U5      -  nSU0nUb  X'S'   Uc  SUS'   OX7S'   Uc  SUS	'   OXGS	'   U R	                  [
        R                  XgUS
9$ )a  
list custom namespaces

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param name:
    namespace name prefix for query
:type name: string

:param page_no:
    page number
:type page_no: int

:param page_size:
    page size
:type page_size: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   s!   /userId/%s/custom/namespaces/list   userId   name      pageNo
      pageSizerF   rb   rc   r   rH   r:   r	   rI   )r   rK   r]   page_no	page_sizer   r,   r/   s           r   list_namespacesBcmClient.list_namespaceso  s    8 w<1IJJ3f6M6Mg6VVw
 "7O? !F9 '9"$F;"+;%%l&6&6TZ%[[r   c	                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eS[        R                  " U5      [        R                  " U5      4-  n	UUUS.n
Ub  XJS'   Ub  XZS'   Ub  XjS	'   OS
U
S	'   Ub  XzS'   O/ U
S'   U R	                  [
        R                  U	[        R                  " U
5      US9$ )a  
create custom metric in one namespace

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    namespace name
:type namespace: string

:param metric_name:
    custom metric name
:type metric_name: string

:param metric_alias:
    custom metric alias
:type metric_alias: string

:param unit:
    custom metric unit
:type unit: string

:param unit:
    custom metric unit
:type unit: string

:param cycle:
    custom metric cycle
:type cycle: int

:param dimensions:
    custom dimension collection
:type dimensions: CustomDimensionModel array

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   ,namespace should not be none or empty string.metric_name should not be none or empty strings.   /userId/%s/custom/namespaces/%s/metrics/create)r\   	namespace
metricNamemetricAliasunitcycle<   rN   r`   ra   r   rK   r   rM   metric_aliasr   r   rN   r   r,   r-   s              r   create_namespace_metric!BcmClient.create_namespace_metric  s    Z w<1IJJy>QKLL{q MNNA((163J3J93UVW "%

 #".L!MDM!!+!#D%%l&7&7DJJtDT]c%ddr   c                 <   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eS[        R                  " U5      [        R                  " U5      4-  nUUUS.nU R	                  [
        R                  U[        R                  " U5      US9$ )a  
batch delete custom metric in one namespace

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    custom namespace name
:type namespace: string

:param ids:
    namespace metric id collection
:type ids: int array

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   zids should not be emptys.   /userId/%s/custom/namespaces/%s/metrics/delete)r\   r   idsr`   ra   )r   rK   r   r   r   r,   r-   s          r   batch_delete_namespace_metrics(BcmClient.batch_delete_namespace_metrics  s    0 w<1IJJs8q=677A((163J3J93UVW "

 %%l&7&7DJJtDT]c%ddr   c	                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUc  [        S5      eS[        R                  " U5      [        R                  " U5      [        R                  " U5      4-  n	UUUUS.n
Ub  XJS'   Ub  XZS	'   Ub  XzS
'   U R	                  [
        R                  U	[        R                  " U
5      US9$ )a  
update custom metric in one namespace

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    namespace name
:type namespace: string

:param metric_name:
    custom metric name
:type metric_name: string

:param metric_alias:
    custom metric alias
:type metric_alias: string

:param unit:
    custom metric unit
:type unit: string

:param unit:
    custom metric unit
:type unit: string

:param cycle:
    custom metric cycle
:type cycle: int

:param dimensions:
    custom dimension collection
:type dimensions: CustomDimensionModel array

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r   r   zcycle should not be none*   /userId/%s/custom/namespaces/%s/metrics/%s)r\   r   r   r   r   r   rN   r`   rq   r   s              r   update_namespace_metric!BcmClient.update_namespace_metric  s   Z w<1IJJy>QKLL{q MNN=788=AXAXY`AaAGAXAXYbAcAGAXAXYdAeAg g "%	
 #".L!!+%%l&6&64::dCS\b%ccr   c                 4   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eS[        R                  " U5      -  nUUS.n	Ub  X9S'   Ub  XIS'   Uc  SU	S	'   OXYS	'   Uc  S
U	S'   OXiS'   U R	                  [
        R                  XUS9$ )aq  
list custom metric in one namespace

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    namespace name
:type namespace: string

:param metric_name:
    custom metric name prefix for query
:type metric_name: string

:param metric_alias:
    custom metric alias prefix for query
:type metric_alias: string

:param page_no:
    page number
:type page_no: int

:param page_size:
    page size
:type page_size: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r   s$   /userId/%s/custom/namespaces/metricsrv   	   namespace
   metricNames   metricAliasrx   ry   rz   r{   rF   r|   )
r   rK   r   rM   r   r}   r~   r   r,   r/   s
             r   list_namespace_metrics BcmClient.list_namespace_metricsW  s    J w<1IJJy>QKLL69P9PQX9YY#
 "$/=!#%1>"? !F9 '9"$F;"+;%%l&6&6TZ%[[r   c                 h   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eS[        R                  " U5      [        R                  " U5      [        R                  " U5      4-  n0 nU R	                  [
        R                  XVUS9$ )a  
get custom metric detail

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    namespace name
:type namespace: string

:param metric_name:
    custom metric name
:type metric_name: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r   r   r   rF   r|   )r   rK   r   rM   r   r,   r/   s          r   get_custom_metricBcmClient.get_custom_metric  s    0 w<1IJJy>QKLL{q MNN=AXAXY`AaAGAXAXYbAcAGAXAXYdAeAg g %%l&6&6TZ%[[r   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  R	                  U5      (       d3  [        S[        [        R                  R                  5       5      -  5      eSnUUUUS.n	Ub  XYS'   Ub  XiS	'   U R                  [        R                  U[        R                  " U	5      US
9$ )a  
create custom event in one namespace

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    namespace name
:type namespace: string

:param event_level:
    custom event level
:type event_level: ENUM {'NOTICE', 'WARNING', 'MAJOR', 'CRITICAL'}

:param event_name:
    custom event name
:type event_name: string

:param event_name_alias:
    custom event alias
:type event_name_alias: string

:param comment:
    custom event comment
:type comment: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r   -event_name should not be none or empty stringevent_level must be one of %ss   /custom/event/configs/creater\   r   	eventName
eventLeveleventNameAliasr_   r`   rb   rc   r   
EventLevelcontainsstrall_event_levelsr:   r	   rd   re   rf   
r   rK   r   
event_nameevent_levelevent_name_aliasr_   r   r,   r-   s
             r   create_namespace_event BcmClient.create_namespace_event      J w<1IJJy>QKLLz?aLMM##,,[99<s9CWCWChChCj?kkll."#%	
 '%5!"%O%%l&7&7DJJtDT]c%ddr   c                     [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSnUUUS.nU R                  [        R                  U[
        R                  " U5      US9$ )a  
batch delete custom metric in one namespace

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    custom namespace name
:type namespace: string

:param names:
    namespace event name collection
:type names: string array

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   rl   s   /custom/event/configs/delete)r\   r   rm   r`   rb   rc   r:   r	   rd   re   rf   )r   rK   r   rm   r   r,   r-   s          r   batch_delete_namespace_events'BcmClient.batch_delete_namespace_events  st    0 w<1IJJu:?899."

 %%l&7&7DJJtDT]c%ddr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  R	                  U5      (       d3  [        S[        [        R                  R                  5       5      -  5      eSnUUUUS.n	Ub  XYS'   Ub  XiS	'   U R                  [        R                  U[        R                  " U	5      US
9$ )a  
update custom event in one namespace

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    namespace name
:type namespace: string

:param event_level:
    custom event level
:type event_level: ENUM {'NOTICE', 'WARNING', 'MAJOR', 'CRITICAL'}

:param event_name:
    custom event name
:type event_name: string

:param event_name_alias:
    custom event alias
:type event_name_alias: string

:param comment:
    custom event comment
:type comment: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r   r   r   s   /custom/event/configs/updater   r   r_   r`   r   r   s
             r   update_namespace_event BcmClient.update_namespace_event  r   r   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUbW  [        R                  R	                  U5      (       d3  [        S[        [        R                  R                  5       5      -  5      eSnUUS.n	Ub  X9S'   Ub  XIS'   Uc  S	U	S
'   OXYS
'   Uc  SU	S'   OXiS'   U R                  [        R                  XUS9$ )a  
list custom event in one namespace

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    namespace name
:type namespace: string

:param name:
    custom metric name prefix for query
:type name: string

:param event_level:
    custom metric level
:type event_level: None or ENUM {'NOTICE', 'WARNING', 'MAJOR', 'CRITICAL'}

:param page_no:
    page number
:type page_no: int

:param page_size:
    page size
:type page_size: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r   z%event_level must be none or one of %ss   /custom/event/configs/listr   rw   s   event_levelrx   ry   rz   r{   rF   )
rb   rc   r   r   r   r   r   r:   r	   rI   )
r   rK   r   r]   r   r}   r~   r   r,   r/   s
             r   list_namespace_eventsBcmClient.list_namespace_eventsX  s    J w<1IJJy>QKLL"I,@,@,I,I+,V,VDs9K_K_KpKpKrGsstt,#
 "7O"%0>"? !F9 '9"$F;"+;%%l&6&6TZ%[[r   c                     [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSnUUUS.nU R                  [        R                  XVUS9$ )a  
get custom event detail

This site may help you: https://cloud.baidu.com/doc/BCM/s/cktnhszhv

:param user_id:
    master account id
:type user_id: string

:param namespace:
    namespace name
:type namespace: string

:param event_name:
    custom event name
:type event_name: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r   r   s   /custom/event/configs/detail)rv   r   	   eventNamerF   rb   rc   r:   r	   rI   )r   rK   r   r   r   r,   r/   s          r   get_custom_eventBcmClient.get_custom_event  s    0 w<1IJJy>QKLLz?aMNN.#$
 %%l&6&6TZ%[[r   )r}   r~   c                     U R                   U R                  0nSnUUUS.nU R                  [        R                  XT[
        R                  " U5      S9$ )
:param name: notify name
:type name: string
:param page_no: page number
:type page_no: int
:param page_size: page size
:type page_size: int

:return
:rtype baidubce.bce_response.BceResponse
s   /alarm/notify/group/listr]   pageNopageSizer.   r-   r4   r5   r1   r	   rd   re   rf   r   r}   r~   r]   r.   r,   r-   s          r   list_notify_groupBcmClient.list_notify_group  \     //1O1OP*!
 !!,"3"3TQUQ[Q[\`Qa!bbr   c                     U R                   U R                  0nSnUUUS.nU R                  [        R                  XT[
        R                  " U5      S9$ )r   s   /alarm/notify/party/listr   r   r   r   s          r   list_notify_partyBcmClient.list_notify_party  r   r   )r}   r~   notificationsmembersc                     Uc  / nUc  / nS[         R                  " U5      -  nUUUUUUS.nU R                  [        R                  U[
        R                  " U5      S9$ )a  
:param user_id:
:type user_id: string
:param notifications:
:type notifications: list of bcm_model.Notification
:param members:
:type members: list of bcm_model.Member
:param alias: action's alias
:type alias: string
:param disable_times: disable time
:type disable_times: list of bcm_model.DisableTime
:param action_callbacks: list of action callback
:type action_callbacks: list

:return
:rtype baidubce.bce_response.BceResponse
s   /userId/%s/action/create)r\   r   r   aliasdisableTimesactionCallBacksr-   r   rH   r:   r	   rd   re   rf   )	r   rK   r   r   r   disable_timesaction_callbacksr,   r-   s	            r   create_actionBcmClient.create_action  sr    &  M#!*V-D-DW-MM*)/
 %%l&7&7DJJtDT%UUr   c                 x    S[         R                  " U5      -  nSU0nU R                  [        R                  X4S9$ )z

:param user_id:
:type user_id: string
:param name: action name
:type name: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /userId/%s/action/deleterw   r/   r   rH   r:   r	   DELETE)r   rK   r]   r,   r/   s        r   delete_actionBcmClient.delete_action  s>     +V-D-DW-MM4%%l&9&94%OOr   c                     S[         R                  " U5      -  nUUUUS.nU R                  [        R                  U[
        R                  " U5      S9$ )a  

:param user_id:
:type user_id: string
:param page_no: page number
:type page_no: int
:param page_size: page size
:type page_size: int
:param name: action name
:type name: string
:param order: desc or asc
:type name: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /userId/%s/action/actionList)r]   r   r   orderr   r   )r   rK   r}   r~   r]   r   r,   r-   s           r   list_actionBcmClient.list_action  sU    $ /1H1H1QQ!	
 %%l&7&7DJJtDT%UUr   c           	          Uc  / nUc  / nS[         R                  " U5      -  nUUUUUUUSS.n	U R                  [        R                  U[
        R                  " U	5      S9$ )a  
:param user_id:
:type user_id: string
:param name: action name
:type name: string
:param notifications:
:type notifications: list of bcm_model.Notification
:param members:
:type members: list of bcm_model.Member
:param alias: action's alias
:type alias: string
:param disable_times: disable time
:type disable_times: list of bcm_model.DisableTime
:param action_callbacks: list of action callback
:type action_callbacks: list

:return
:rtype baidubce.bce_response.BceResponse
s   /userId/%s/action/updateUSER)productNamer]   r   r   r   r   r   sourcer   r   rH   r:   r	   rr   re   rf   )
r   rK   r]   r   r   r   r   r   r,   r-   s
             r   update_actionBcmClient.update_action:  sx    ,  M#!*V-D-DW-MM"*)/	
 %%l&6&64::dCS%TTr   c                     S[         R                  " U5      -  nUUS.nU R                  [        R                  U[
        R                  " U5      [        R                  S9$ )z

:param user_id:
:type user_id: string
:param extract_rule: the log extract rule
:type: string
:param log_example: log example
:type: string

:return
:rtype baidubce.bce_response.BceResponse
s!   /userId/%s/application/logextract)extractRule
logExample)r-   r0   	r   rH   r:   r	   rd   re   rf   r
   parse_json_list)r   rK   extract_rulelog_exampler,   r-   s         r   log_extractBcmClient.log_extracta  s`     4f6M6Mg6VV'%
 %%l&7&7DJJtDT2=2M2M & O 	Or   c                 P   S[         R                  " U5      [         R                  " U5      [         R                  " U5      4-  nUSR                  U5      S.n[        U5        Ub#  [	        U5      S:  a  SR                  U5      US'   U R                  [        R                  XxS9$ )a  

:param user_id:
:type user_id string
:param app_name: application name
:type app_name: string
:param task_name: task name
:type task_name: string
:param metric_name:
:type metric_name: string
:param dimension_keys: multi dimension keys
:type dimension_keys: list of string
:param instances: multiple instance names
:type instances: list of string

:return
:rtype baidubce.bce_response.BceResponse
s,   /userId/%s/application/%s/task/%s/metricMeta,)r   s   dimensionKeysr   	   instancesr   )r   rH   joinprintrb   r:   r	   rI   )	r   rK   app_name	task_namerM   dimension_keys	instancesr,   r/   s	            r   !query_metric_meta_for_application+BcmClient.query_metric_meta_for_applicationv  s    * @6CZCZ[bCcCICZCZ[cCdCICZCZ[dCeCg g "-@XYf S^a%7#&88I#6F< %%l&6&6%LLr   c                    S[         R                  " U5      [         R                  " U5      [         R                  " U5      4-  nXVUS.nU
b#  [        U
5      S:  a  SR                  U
5      US'   Ub
  US:  a  XS'   Ub  XS'   Ub#  [        U5      S:  a  SR                  U5      US'   U	b#  [        U	5      S:  a  SR                  U	5      US	'   U R	                  [
        R                  X[        R                  S
9$ )aV  

:param user_id:
:type user_id: string
:param app_name: application name
:type app_name: string
:param task_name: task name
:type task_name: string
:param metric_name: metric name
:type metric_name: string
:param start_time: start time, such as 2023-12-05T09:54:15Z
:type start_time: string
:param end_time: end time, such as 2023-12-05T09:54:15Z
:type end_time: string
:param instances: multiple instance names
:type instances: list of string
:param cycle: period time
:type cycle: int
:param dimensions: dimensions, such as ["httpMethod:POST___GET,path:apipath","httpMethod:POST,path:apipath1]
:type dimensions: list of string
:param statistics: statistics, enum: average, maximum, minimum, sum, sampleCount
:type statistics: list of string
:param aggr_data: is aggregation data
:type aggr_data: bool

:return
:rtype baidubce.bce_response.BceResponse
s,   /userId/%s/application/%s/task/%s/metricData)rC   rD   r   r   r   
   statistics   cycles   aggrDatar   rA   r/   r0   	r   rH   rb   r   r:   r	   rI   r
   r   )r   rK   r   r   rM   rP   rQ   r   r   rN   rO   	aggr_datar,   r/   s                 r   !query_metric_data_for_application+BcmClient.query_metric_data_for_application  s   < @6CZCZ[bCcCICZCZ[cCdCICZCZ[dCeCg g !+Q\]!c*o&9$'HHZ$8F=!$8 "+; S^a%7#&88I#6F< !c*o&9$'HHZ$8F=!%%l&6&6YdYtYt%uur   c                     S[         R                  " U5      [         R                  " U5      [         R                  " U5      4-  n0 nUc  XFS'   U R                  [        R                  XV[
        R                  S9$ )a  

:param user_id:
:type user_id: string
:param app_name: application name
:type app_name: string
:param task_name: task name
:type task_name: string
:param search_name: metric name
:type search_name: string

:return
:rtype baidubce.bce_response.BceResponse
s*   /userId/%s/application/%s/%s/alarm/metrics
   searchNamer  r   rH   r:   r	   rI   r
   r   )r   rK   r   r   search_namer,   r/   s          r   "list_alarm_metrics_for_application,BcmClient.list_alarm_metrics_for_application  s|     >AXAXY`AaAGAXAXYaAbAGAXAXYbAcAe e $/=!%%l&6&6YdYtYt%uur   c                     S[         R                  " U5      [         R                  " U5      4-  nSU0nU R                  [        R                  XES9$ )

:param user_id:
:type user_id: string
:param app_name: application name
:type app_name: string
:param alarm_name: alarm name
:type alarm_name: string

:return
:rtype baidubce.bce_response.BceResponse
s&   /userId/%s/application/alarm/%s/config   appNamer   r   rH   r:   r	   rI   )r   rK   
alarm_namer   r,   r/   s         r    get_alarm_policy_for_application*BcmClient.get_alarm_policy_for_application  sX     :V=T=TU\=]=C=T=TU_=`=b bh'%%l&6&6%LLr   c                     S[         R                  " U5      -  nUUS.nU R                  [        R                  U[
        R                  " U5      S9$ )r  s#   /userId/%s/application/alarm/config)appName	alarmNamer   r   rH   r:   r	   r   re   rf   )r   rK   r  r   r,   r-   s         r   #delete_alarm_policy_for_application-BcmClient.delete_alarm_policy_for_application  sQ     79P9PQX9YY#
 %%l&9&94djjQUFV%WWr   c	                     S[         R                  " U5      -  n	UUUUUUUS.n
U R                  [        R                  XS9$ )a  

:param user_id:
:type user_id: string
:param page_no: page number
:type page_no: int
:param app_name: application name
:type app_name: string
:param alarm_name: alarm name
:type alarm_name: string
:param action_enabled: is action enabled
:type action_enabled: bool
:param src_type: task type, enum: PROC,PORT,LOG,SCR
:type src_type: string
:param task_name: task name
:type task_name: string
:param page_size: page size
:type page_size: int

:return
:rtype baidubce.bce_response.BceResponse
s(   /userId/%s/application/alarm/config/list)ry   r{   r  	   alarmName   actionEnableds   srcTypes   taskNamer   r  )r   rK   r}   r~   r   r  action_enabledsrc_typer   r,   r/   s              r   !list_alarm_policy_for_application+BcmClient.list_alarm_policy_for_application  sT    2 <f>U>UV]>^^" $, "
 %%l&6&6%LLr   )rulesc                    S[         R                  " U5      -  n0 SU_SU_SU_SU_SU_SU_SU_S	U_S
U	_SU
_SU_SU_SU_SU_SU_SU_SU_SU0EnU R                  [        R                  U[
        R                  " U5      S9$ )j  
:param user_id:
:type user_id: string
:param alarm_description: alarm policy comment
:type alarm_description: string
:param alarm_name: unique alarm name in user_id
:type alarm_name: string
:param app_name: application name
:type app_name: string
:param monitor_object_type: monitor object type, enum: APP, SERVICE
:type monitor_object_type: string
:param monitor_object: application monitor object
:type monitor_object: bcm_model.ApplicationMonitorObject
:param src_name: task name
:type src_name: string
:param src_type: task type, enum: PROC,PORT,LOG,SCR
:type src_type: string
:param type: alarm type
:type type: string
:param level: alarm level
:type level: string
:param rules: list of application alarm rules
:type rules: list of ApplicationAlarmRule
:param action_enabled: is alarm action enabled
:type action_enabled: bool
:param incident_actions: The action to be taken in the alarm state
:type incident_actions: list of string
:param resume_actions: The action to be taken in the alarm resume
:type resume_actions: list of string
:param insufficient_actions:
:type insufficient_actions: list of string
:param insufficient_cycle: insufficient cycle
:type insufficient_cycle: int
:param repeat_alarm_cycle: repeat alarm_cycle
:type repeat_alarm_cycle: int
:param max_repeat_count: max repeat count
:type max_repeat_count: int

:return
:rtype baidubce.bce_response.BceResponse
s*   /userId/%s/application/alarm/config/creater\   alarmDescriptionr  r  monitorObjectTypemonitorObjectsrcNamesrcTypetypelevelactionEnabledincidentActionsresumeActionsinsufficientActionsinsufficientCyclerepeatAlarmCyclemaxRepeatCountr"  r   r   r   rK   alarm_descriptionr  r   monitor_object_typemonitor_objectsrc_namer  r*  r+  r"  r  incident_actionsresume_actionsinsufficient_actionsinsufficient_cyclerepeat_alarm_cyclemax_repeat_countr,   r-   s                        r   #create_alarm_policy_for_application-BcmClient.create_alarm_policy_for_application'  s&   ^ >@W@WX_@``
g
 1
 x
 	

  !4
 ^
 x
 x
 D
 U
 ^
 /
 ^
 "#7
  !3
   2!
" .#
$ U%
( %%l&7&7DJJtDT%UUr   c                    S[         R                  " U5      -  n0 SU_SU_SU_SU_SU_SU_SU_S	U_S
U	_SU
_SU_SU_SU_SU_SU_SU_SU_SU0EnU R                  [        R                  U[
        R                  " U5      S9$ )r$  s*   /userId/%s/application/alarm/config/updater\   r%  r  r  r&  r'  r(  r)  r*  r+  r,  r-  r.  r/  r0  r1  r2  r"  r   r   r3  s                        r   #update_alarm_policy_for_application-BcmClient.update_alarm_policy_for_applicationm  s&   ^ >@W@WX_@``
g
 1
 x
 	

  !4
 ^
 x
 x
 D
 U
 ^
 /
 ^
 "#7
  !3
   2!
" .#
$ U%
( %%l&6&64::dCS%TTr   c                     UUUUS.n[         R                  " U5      nSU-  nU R                  [        R                  U[
        R                  " U5      US9$ )a  
Create a dashboard
:param user_id:
     Master account ID
:type user_id: string

:param title:
    Title of the dashboard
:type title: string

:param configure:
    Configure the dashboard
:type configure:string

:param dashboard_type:
    Dashboard type
:type dashboard_type:string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r\   title	configurer*  s!   /dashboard/products/%s/dashboardsr`   r   )r   rK   rE  rF  dashboard_typer   r-   r,   s           r   create_dashboardBcmClient.create_dashboard  s]    4 ""	
 ))'23g=%%l&7&7DJJtDT]c%ddr   c                 
   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      n[        R                  " U5      nSX4-  nU R	                  [
        R                  XCS9$ 	  
Create a dashboard
:param user_id:
     Master account ID
:type user_id: string

:param dashboard_name:
    Dashboard name
:type dashboard_name:string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   1dashboard_name should not be none or empty string$   /dashboard/products/%s/dashboards/%sr   r|   r   rK   dashboard_namer   r,   s        r   get_dashboardBcmClient.get_dashboard  s~    " w<1IJJ~!#PQQ))'200@6'9RR%%l&6&6%LLr   c                 D   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUUUUS.n[        R                  " U5      n[        R                  " U5      nSX4-  nU R	                  [
        R                  U[        R                  " U5      US9$ )a  
Create a dashboard
:param user_id:
     Master account ID
:type user_id: string

:param title:
    Title of the dashboard
:type title: string

:param configure:
    Configure the dashboard
:type configure:string

:param dashboard_type:
    Dashboard type
:type dashboard_type:string

:param dashboard_name:
    Dashboard name
:type dashboard_name:string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   rM  rD  rN  r`   rq   )	r   rK   rE  rF  rG  rQ  r   r-   r,   s	            r   update_dashboardBcmClient.update_dashboard  s    < w<1IJJ~!#PQQ""	
 ))'200@6'9RR%%l&6&64::dCS\b%ccr   c                 
   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      n[        R                  " U5      nSX4-  nU R	                  [
        R                  XCS9$ rK  rb   rc   r   rH   r:   r	   r   rP  s        r   delete_dashboardBcmClient.delete_dashboard  s~    " w<1IJJ~!#PQQ))'200@6'9RR%%l&9&94%OOr   c                 :   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e0 n[        R                  " U5      n[        R                  " U5      nSX4-  nU R	                  [
        R                  U[        R                  " U5      US9$ )rL  r   rY   rM  s.   /dashboard/products/%s/dashboards/%s/duplicaterO  ra   r   rK   rQ  r   r-   r,   s         r   duplicate_dashboardBcmClient.duplicate_dashboard7  s    " w<1IJJ~!#PQQ
))'200@@GC\\%%l&7&7tzz$?OX^%__r   c                 :   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e0 n[        R                  " U5      n[        R                  " U5      nSX4-  nU R	                  [
        R                  U[        R                  " U5      US9$ )rL  r   rY   rM  s,   /dashboard/products/%s/dashboards/%s/widgetsr`   ra   r\  s         r   create_dashboard_widget!BcmClient.create_dashboard_widgetS  s    " w<1IJJ~!#PQQ
))'200@>'AZZ%%l&7&7DJJtDT]c%ddr   c                 l   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      n[        R                  " U5      n[        R                  " U5      nSXU4-  nU R	                  [
        R                  XTS9$ G  
Create a dashboard
:param user_id:
     Master account ID
:type user_id: string

:param dashboard_name:
    Dashboard name
:type dashboard_name:string

:param widget_name:
    Widget name
:type widget_name:string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   rM  *widget_name should be none or empty string/   /dashboard/products/%s/dashboards/%s/widgets/%srO  r|   r   rK   rQ  widget_namer   r,   s         r   get_dashboard_widgetBcmClient.get_dashboard_widgeto  s    * w<1IJJ~!#PQQ{q IJJ))'200@--k:AW^iDjj%%l&6&6%LLr   c                 l   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      n[        R                  " U5      n[        R                  " U5      nSXU4-  nU R	                  [
        R                  XTS9$ rc  rX  rg  s         r   delete_dashboard_widget!BcmClient.delete_dashboard_widget  s    * w<1IJJ~!#PQQ{q IJJ))'200@--k:AW^iDjj%%l&9&94%OOr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e0 n[        R                  " U5      n[        R                  " U5      n[        R                  " U5      nSXU4-  nU R	                  [
        R                  U[        R                  " U5      US9$ )rd  r   rY   rM  re  s9   /dashboard/products/%s/dashboards/%s/widgets/%s/duplicater`   ra   )r   rK   rQ  rh  r   r-   r,   s          r   duplicate_dashboard_widget$BcmClient.duplicate_dashboard_widget  s    * w<1IJJ~!#PQQ{q IJJ
))'200@--k:L+67%%l&7&7DJJtDT]c%ddr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUUUS.n[        R                  " U5      n[        R                  " U5      n[        R                  " U5      nSXU4-  n	U R	                  [
        R                  U	[        R                  " U5      US9$ )a  
Create a dashboard
:param user_id:
     Master account ID
:type user_id: string

:param dashboard_name:
    Dashboard name
:type dashboard_name:string

:param widget_name:
    Widget name
:type widget_name:string

:param widget_type:
    Widget type
:type widget_type:string

:param configure:
    Widget configure
:type configure:object

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   rM  re  )rE  r*  rF  rf  r`   rq   )
r   rK   rQ  rh  widget_typerE  rF  r   r-   r,   s
             r   update_dashboard_widget!BcmClient.update_dashboard_widget  s    < w<1IJJ~!#PQQ{q IJJ"

 ))'200@--k:AW^iDjj%%l&6&64::dCS\b%ccr   c                 x    UUS.nSnU R                  [        R                  U[        R                  " U5      US9$ )
Get dashboard report data
:param data:
    Query data
:type data: object

:param time:
    Query data time
:type time: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
datatimes   /dashboard/metric/reportr`   r:   r	   rd   re   rf   r   rx  ry  r   r-   r,   s         r   get_dashboard_report_data#BcmClient.get_dashboard_report_data  sB    $ 
 +%%l&7&7DJJtDT]c%ddr   c                 x    UUS.nSnU R                  [        R                  U[        R                  " U5      US9$ )rv  rw  s   /dashboard/metric/trendr`   rz  r{  s         r   get_dashboard_trend_data"BcmClient.get_dashboard_trend_data  sB    $ 
 *%%l&7&7DJJtDT]c%ddr   c                 x    UUS.nSnU R                  [        R                  U[        R                  " U5      US9$ )rv  rw  s   /dashboard/metric/gaugechartr`   rz  r{  s         r   get_dashboard_gauge_chart_data(BcmClient.get_dashboard_gauge_chart_data4  sB    $ 
 /%%l&7&7DJJtDT]c%ddr   c                 x    UUS.nSnU R                  [        R                  U[        R                  " U5      US9$ )rv  rw  s   /dashboard/metric/billboardr`   rz  r{  s         r   get_dashboard_billboard_data&BcmClient.get_dashboard_billboard_dataL  sB    $ 
 .%%l&7&7DJJtDT]c%ddr   c                 x    UUS.nSnU R                  [        R                  U[        R                  " U5      US9$ )rv  rw  s   /dashboard/metric/trend/seniorr`   rz  r{  s         r   get_dashboard_trend_senior_data)BcmClient.get_dashboard_trend_senior_datad  sB    $ 
 1%%l&7&7DJJtDT]c%ddr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUUUUUUS.n[        R                  " U5      n[        R                  " U5      n[        R                  " U5      nSXU4-  n	U R	                  [
        R                  XUS	9$ )
a  
Get dashboard dimensions
:param user_id:
     Master account ID
:type user_id: string

:param dimensions:
    dashboard dimensions
:type dimensions: string

:param metric_name:
    dashboard metric_name
:type metric_name: string

:param region:
    dashboard dimensions region
:type region: string

:param service:
    cloud service
:type service:

:param show_id:
    cloud resourceId
:type show_id:

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r   )region should not be none or empty stringz*service should not be none or empty stringz*show_id should not be none or empty string)rA   rv   r      regions   services   showIds2   /userId/%s/services/%s/region/%s/metric/dimensionsrF   r|   )
r   rK   rM   regionserviceshow_idrN   r   r/   r,   s
             r   get_dashboard_dimensions"BcmClient.get_dashboard_dimensions|  s    D w<1IJJ{q MNNv;!HIIw<1IJJw<1IJJ%&
 ))'2))'2((0DZ`Gaa%%l&6&6TZ%[[r   c                 d   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUUUS.nUb  XGS'   Ub  XWS'   [        R                  " U5      nSU-  nU R	                  [
        R                  U[        R                  " U5      US	9$ )
z
create application data
:param name:
:param type:
:param user_id:
:param alias:
:param description:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   user_id should not be nulltype should not be nullname should not be null)r]   r*  r\   r   description   /userId/%s/applicationr`   ra   )	r   r]   r*  rK   r   r  r   reqr,   s	            r   create_application_data!BcmClient.create_application_data  s     w<19::t9>677t9>677

  L"!,))'2(72%%l&7&7DJJsO\b%ccr   c                     [        U5      S::  a  [        S5      eUc  SnUc  Sn[        R                  " U5      nSU-  nUUS.nUb  XGS'   U R	                  [
        R                  XgUS9$ )	z
get_application_data_list
:param user_id:
:param page_no:
:param page_size:
:param search_name:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  rx   rz   r  )r{   ry   r	  rF   )rb   rc   r   rH   r1   r	   rI   )r   rK   r}   r~   r  r   r,   r/   s           r   get_application_data_list#BcmClient.get_application_data_list  s     w<19::?GI))'2(72"
 "$/=!!!,"2"2DPV!WWr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUUUUS.nUb  XXS'   Ub  XhS'   [        R                  " U5      nS	U-  n	U R	                  [
        R                  U	[        R                  " U5      US
9$ )z
update_application_data
:param user_id:
:param id:
:param name:
:param type:
:param alias:
:param description:
:param config:
:return:
r   r  r  r  id should not be null)r\   idr]   r*  r   r  r  r`   rq   )
r   rK   r  r]   r*  r   r  r   r  r,   s
             r   update_application_data!BcmClient.update_application_data  s     w<19::t9>677t9>677r7a<455	
  L"!,))'2(72%%l&6&64::c?[a%bbr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSU0n[        R                  " U5      nSU-  nU R	                  [
        R                  U[        R                  " U5      US9$ )zN
delete_application_data
:param user_id:
:param name:
:param config:
:return:
r   r  zname should null be nullr]   r  r`   	rb   rc   r   rH   r:   r	   r   re   rf   )r   rK   r]   r   r  r,   s         r   delete_application_data!BcmClient.delete_application_data  s     w<19::t9>788D
 ))'2(72%%l&9&94djjQTo^d%eer   c	                 n   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUc  SnUc  Sn[        R                  " U5      nSU-  n	UUUUUS.n
Ub  XzS	'   U R	                  [
        R                  U	[        R                  " U
5      US
9$ )z
get_application_instance_list
:param user_id:
:param region:
:param app_name:
:param search_name:
:param page_no:
:param page_size:
:param search_value:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  region should not be nullapp_name should not be nullrx   rz   s   /userId/%s/instances/all)r  r  r   r   
searchNamesearchValuer`   ra   )r   rK   r  r   r  r}   r~   search_valuer   r,   r  s              r   get_application_instance_list'BcmClient.get_application_instance_list%  s     w<19::v;!899x=A:;;?GI))'2*W4!%
 #!-%%l&7&7DJJsO\b%ccr   )rK   r   	host_listc                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e/ nU H  nUR                  U5        M     UUUS.n[        R                  " U5      nSU-  nU R                  [        R                  U[        R                  " U5      US9$ )z
create_application_instance
:param user_id:
:param app_name:
:param host_list:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  r  zhost_list should not be null)r  r\   hostLists$   /userId/%s/application/instance/bindr`   )
rb   rc   appendr   rH   r:   r	   rd   re   rf   )	r   rK   r   r  r   host_list_jsonhostr  r,   s	            r   create_application_instance%BcmClient.create_application_instanceK  s     w<19::x=A:;;y>Q;<<D!!$'   &

 ))'26@%%l&7&7DJJsO\b%ccr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      n[        R                  " U5      nSX4-  nSnUb  SU0nU R	                  [
        R                  XVUS9$ )zo
get_application_instance_created_list
:param user_id:
:param app_name:
:param region:
:param config:
:return:
r   r  r  s'   /userId/%s/application/%s/instance/listNr  rF   r|   )r   rK   r   r  r   r,   r/   s          r   %get_application_instance_created_list/BcmClient.get_application_instance_created_listj  s     w<19::x=A:;;))'2**849W<OO&F %%l&6&6TZ%[[r   c                 F   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      nSU-  nUUS.nU R	                  [
        R                  U[        R                  " U5      US9$ )za
delete_application_instance
:param user_id:
:param app_name:
:param id:
:param config:
:return:
r   r  r  r  s   /userId/%s/application/instance)r  r  r`   r  )r   rK   r   r  r   r,   r  s          r   delete_application_instance%BcmClient.delete_application_instance  s     w<19::x=A:;;r7a<455))'21G;
 %%l&9&94djjQTo^d%eer   )rK   r   
alias_namer*  targetr   r  r   
match_rulerateextract_resultmetricsc                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUc  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUc  SnU[        U5      UU[        U5      S.nUb  X~S	'   [        U5      S
:X  a  Uc  [        S5      eU	c  [        S5      eU
c  [        S5      eUc  [        S5      eUc  [        S5      eXS'   XS'   XS'   / nU H  nUR                  U5        M     XS'   / nU H  nUR                  U5        M     UUS'   [        R
                  " U5      nSU-  nU R                  [        R                  U[        R                  " U5      US9$ )a0  
create_application_instance_task
:param user_id:
:param app_name:
:param alias_name:
:param type:
:param target:
:param cycle:
:param description:
:param log_example:
:param match_rule:
:param rate:
:param extract_result:
:param metrics:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  r  r  alias_name should not be nulltarget should not be nullr   )r  r*  	aliasNamer  r   r  2log_example should not be nullmatch_rule should not be nullrate should not be null!extract_result should not be nullmetrics should not be nullr   	matchRuler  extractResultr  s"   /userId/%s/application/task/creater`   )rb   rc   r   r  r   rH   r:   r	   rd   re   rf   )r   rK   r   r  r*  r  r   r  r   r  r  r  r  r   r  extract_result_jsonresultmetrics_jsonmetricr,   s                       r    create_application_instance_task*BcmClient.create_application_instance_task  s   0 w<19::x=A:;;<677z?a<==v;!899=EI#Z
 "!,t9" !ABB! !@AA| !:;;% !DEE !=>> +)K"$(#**62 )#6 L!##F+ ")C	N))'24w>%%l&7&7DJJsO\b%ccr   c                 l   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      n[        R                  " U5      n[        R                  " U5      nSXU4-  nU R	                  [
        R                  XTS9$ )z
get_application_monitor_task_detail
:param user_id:
:param app_name:
:param task_name:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  r  ztask_name should not be nulls!   /userId/%s/application/%s/task/%srO  r|   )r   rK   r   r   r   r,   s         r   #get_application_monitor_task_detail-BcmClient.get_application_monitor_task_detail  s     w<19::x=A:;;y>Q;<<))'2**84++I6	3w)6TT%%l&6&6%LLr   c                 <   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      n[        R                  " U5      nSX4-  nSnUb  SU0nU R	                  [
        R                  XVU[        R                  S9$ )zi
get_application_monitor_task_list
:param user_id:
:param app_name:
:param type:
:param config:
:return:
r   r  r  s#   /userId/%s/application/%s/task/listNr*  )r/   r   r0   )	rb   rc   r   rH   r:   r	   rI   r
   r   )r   rK   r   r*  r   r,   r/   s          r   !get_application_monitor_task_list+BcmClient.get_application_monitor_task_list  s     w<19::x=A:;;))'2**8458KKF %%l&6&6TZ2=2M2M & O 	Or   )rK   r   r]   r  r*  r  r   r  r   r  r  r  r  c                 D   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUc  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUU[        U5      UUS.nUb  XS	'   Ub  XS
'   [        U5      S:X  a  U	c  [        S5      eU
c  [        S5      eUc  [        S5      eUc  [        S5      eUc  [        S5      eXS'   XS'   XS'   / nU H  nUR                  U5        M     UUS'   / nU H  nUR                  U5        M     UUS'   [        R
                  " U5      nSU-  nU R                  [        R                  U[        R                  " U5      US9$ )a<  
update application monitor task
:param user_id:
:param app_name:
:param alias_name:
:param name:
:param type:
:param target:
:param cycle:
:param description:
:param log_example:
:param match_rule:
:param rate:
:param extract_result:
:param metrics:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  r  r  r  r  r  )r  r]   r*  r  r  r   r  r  r  r  r  r  r  r   r  r  r  r  s"   /userId/%s/application/task/updater`   )rb   rc   r   r  r   rH   r:   r	   rr   re   rf   )r   rK   r   r  r]   r*  r  r   r  r   r  r  r  r  r   r  r  r  r  r  r,   s                        r   update_application_monitor_task)BcmClient.update_application_monitor_task	  s   2 w<19::x=A:;;t9>677<677z?a<==v;!899I#
  L"!,t9" !ABB! !@AA| !:;;% !DEE !=>> +)K"$(#**62 )#6C L!##F+ ")C	N))'24w>%%l&6&64::c?[a%bbr   c                 F   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      nSU-  nUUS.nU R	                  [
        R                  U[        R                  " U5      US9$ )z
delete_application_monitor_task
:param user_id:
:param name:
:param app_name:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  r  r  s"   /userId/%s/application/task/delete)r]   r  r`   r  )r   rK   r]   r   r   r,   r  s          r   delete_application_monitor_task)BcmClient.delete_application_monitor_task[	  s     w<19::x=A:;;t9>677))'24w>
 %%l&9&94djjQTo^d%eer   c                 ~   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUUUUS.n[        R                  " U5      nSU-  nU R	                  [
        R                  U[        R                  " U5      US9$ )	z
create_application_dimension_table
:param user_id:
:param app_name:
:param table_name:
:param map_content_json:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  r  table_name should not be null#map_content_json should not be nullr\   r  	tableNamemapContentJsons*   /userId/%s/application/dimensionMap/creater`   ra   r   rK   r   
table_namemap_content_jsonr   r  r,   s           r   "create_application_dimension_table,BcmClient.create_application_dimension_tables	  s     w<19::x=A:;;z?a<== A%BCC#.	
 ))'2<wF%%l&7&7DJJsO\b%ccr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        R                  " U5      n[        R                  " U5      nSX4-  nSnUb  SU0nU R	                  [
        R                  XVUS9$ )z
get_application_dimension_table_list
:param user_id:
:param app_name:
:param search_name:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  r  s+   /userId/%s/application/%s/dimensionMap/listNr  rF   r|   )r   rK   r   r  r   r,   r/   s          r   $get_application_dimension_table_list.BcmClient.get_application_dimension_table_list	  s     w<19::x=A:;;))'2**84=@SS"kF %%l&6&6TZ%[[r   c                 ~   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUUUUS.n[        R                  " U5      nSU-  nU R	                  [
        R                  U[        R                  " U5      US9$ )	z
update_application_dimension_table
:param user_id:
:param app_name:
:param table_name:
:param map_content_json:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  r  r  r  r  s*   /userId/%s/application/dimensionMap/updater`   rq   r  s           r   "update_application_dimension_table,BcmClient.update_application_dimension_table	  s     w<19::x=A:;;z?a<== A%BCC#.	
 ))'2<wF%%l&6&64::c?[a%bbr   c                 H   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUUUS.n[        R                  " U5      nSU-  nU R	                  [
        R                  U[        R                  " U5      US9$ )z
delete_application_dimension_table
:param user_id:
:param app_name:
:param table_name:
:param config:
:return:
:rtype baidubce.bce_response.BceResponse
r   r  r  r  )r\   r  r  s*   /userId/%s/application/dimensionMap/deleter`   r  )r   rK   r   r  r   r  r,   s          r   "delete_application_dimension_table,BcmClient.delete_application_dimension_table	  s     w<19::x=A:;;z?a<==#

 ))'2<wF%%l&9&94djjQTo^d%eer   )r}   r~   
account_idrP   rQ   c                 f    SnUUUUUUUUU	U
UUUUS.nU R                  [        R                  UUS9$ )az  
:param page_no: page number
:type page_no: int
:param page_size: page size
:type page_size: int
:param start_time: start time, such as 2023-12-05T09:54:15Z
:type start_time: string
:param end_time: end time, such as 2023-12-05T09:54:15Z
:type end_time: string
:param account_id: account id
:type account_id: string
:param ascending: ascending
:type ascending: bool
:param scope: scope
:type scope: string
:param region: region
:type region: string
:param event_level: event level
:type event_level: None or ENUM {'NOTICE', 'WARNING', 'MAJOR', 'CRITICAL'}
:param event_name: event name
:type event_name: string
:param event_alias: event alias
:type event_alias: string
:param resource_type: resource type
:type resource_type: string
:param resource_id: resource id
:type resource_id: string
:param event_id: event id
:type event_id: string

:return
:rtype baidubce.bce_response.BceResponse
s   /bce-event/list)ry   r{   rC   rD   	   accountId	   ascending   scoper  
   eventLevelr   
   eventAliass   resourceTypes
   resourceId   eventIdr   r>   r	   rI   )r   r}   r~   rP   rQ   r  	ascendingrL   r  r   r   event_aliasresource_typeresource_idevent_idr,   r/   s                    r   get_cloud_event_dataBcmClient.get_cloud_event_data	  s[    J ""$ $#&$&*& 
  ''(8(8$v'NNr   c                 `    SnUUUUUUUUU	U
UUS.nU R                  [        R                  XS9$ )a   
:param page_no: page number
:type page_no: int
:param page_size: page size
:type page_size: int
:param start_time: start time, such as 2023-12-05T09:54:15Z
:type start_time: string
:param end_time: end time, such as 2023-12-05T09:54:15Z
:type end_time: string
:param account_id: account id
:type account_id: string
:param ascending: ascending
:type ascending: bool
:param scope: scope
:type scope: string
:param region: region
:type region: string
:param event_level: event level
:type event_level: None or ENUM {'NOTICE', 'WARNING', 'MAJOR', 'CRITICAL'}
:param event_name: event name
:type event_name: string
:param event_alias: event alias
:type event_alias: string
:param event_id: event id
:type event_id: string

:return
:rtype baidubce.bce_response.BceResponse
s   /platform-event/list)ry   r{   rC   rD   r  r  r  r  r  r   r  r  r   r  )r   r}   r~   rP   rQ   r  r  rL   r  r   r   r  r  r,   r/   s                  r   get_platform_event_data!BcmClient.get_platform_event_data
  sS    B '"$ $#&$& 
 ''(8(8$'NNr   )r  service_namer]   block_statusr8  c                    Uc  [        S5      eUc  [        S5      eS[        R                  " U5      [        R                  " U5      4-  nUUUUUUUS.n	U R                  [        R
                  U[        R                  " U	5      S9$ )a  
:param account_id: account id
:type account_id: string
:param service_name: service name
:type service_name: string
:param name: event policy name
:type name: string
:param block_status: block status, enum: NORMAL, BLOCKED
:type block_status: string
:param event_filter: event filter
:type event_filter: EventFilter
:param resource: resource filter
:type resource: EventResourceFilter
:param incident_actions: incident actions
:type incident_actions: list of string
zevent_filter should not be nonezresource should not be nones'   /accounts/%s/services/%s/alarm-policies)r  r  r]   blockStatuseventFilterresourcer-  r   )rc   r   rH   r>   r	   rd   re   rf   )
r   r  r  r]   r	  event_filterr  r8  r,   r-   s
             r   create_event_policyBcmClient.create_event_policyH
  s    & >??:;;9V=T=TU_=`=C=T=TUa=b=d d %('' /
 ''(9(94djjQUFV'WWr   )rK   r  r  	type_namer]   c                     S[         R                  " U5      -  nUUUUUUS.nU R                  [        R                  U[
        R                  " U5      S9$ )aY  
:param user_id: user id
:type user_id: string
:param region: region
:type region: string
:param service_name: service name
:type service_name: string
:param type_name: type name
:type type_name: string
:param name: instance group name
:type name: string
:param resource_id_list: resource id list
:type resource_id_list: list of MonitorResource
   /userId/%s/instance-group)r\   r  serviceNametypeNamer]   resourceIdListr   r   )	r   rK   r  r  r  r]   resource_id_listr,   r-   s	            r   create_instance_groupBcmClient.create_instance_groupm
  s[      ,f.E.Eg.NN'!.
 %%l&7&7DJJtDT%UUr   )rK   ig_idr  r  r  r]   c                     S[         R                  " U5      -  nUUUUUUS.nU R                  [        R                  U[
        R                  " U5      S9$ )a3  
:param ig_id: instance group id
:type ig_id: string
:param user_id: user id
:type user_id: string
:param region: region
:type region: string
:param service_name: service name
:type service_name: string
:param type_name: type name
:type type_name: string
:param name: instance group name
:type name: string
r  )r  r\   r  r  r  r]   r   )r   rH   r:   r	   PATCHre   rf   )	r   r  rK   r  r  r  r]   r,   r-   s	            r   update_instance_groupBcmClient.update_instance_group
  s\      ,f.E.Eg.NN'!
 %%l&8&8$TZZPTEU%VVr   )rK   r  c                     S[         R                  " U5      [         R                  " U5      4-  nU R                  [        R                  U5      $ zc
:param user_id: user id
:type user_id: string
:param ig_id: instance group id
:type ig_id: string
s   /userId/%s/instance-group/%sr   r   rK   r  r,   s       r   delete_instance_groupBcmClient.delete_instance_group
  sD     /&2I2I'2RTZTkTklqTr1ss%%l&9&94@@r   c                     S[         R                  " U5      [         R                  " U5      4-  nU R                  [        R                  U5      $ r   r  r!  s       r   get_instance_groupBcmClient.get_instance_group
  sD     /&2I2I'2RTZTkTklqTr1ss%%l&6&6==r   )rK   r}   r~   c                     S[         R                  " U5      -  nUUUUUUUS.n	U R                  [        R                  XS9$ )a_  
:param user_id: user id
:type user_id: string
:param name: instance group name
:type name: string
:param service_name: service name
:type service_name: string
:param region: region
:type region: string
:param type_name: type name
:type type_name: string
:param page_no: page number
:type page_no: int
:param page_size: page size
:type page_size: int
s   /userId/%s/instance-group/list)rv   rw      serviceNamer     typeNamery   r{   r   r  )
r   rK   r]   r  r  r  r}   r~   r,   r/   s
             r   list_instance_groupBcmClient.list_instance_group
  sS    $ 163J3J73SS(""
 %%l&6&6%LLr   )rK   r  r  c                     S[         R                  " U5      [         R                  " U5      4-  nUUUS.nU R                  [        R                  U[
        R                  " U5      S9$ )
:param ig_id: instance group id
:type ig_id: string
:param user_id: user id
:type user_id: string
:param resource_id_list: resource id list
:type resource_id_list: list of MonitorResource
s)   /userId/%s/instance-group/%s/instance/addr  r\   r  r   r   r   r  rK   r  r,   r-   s         r   add_ig_instanceBcmClient.add_ig_instance
  sm     <v?V?VW^?_?E?V?VW\?]?_ _ .

 %%l&7&7DJJtDT%UUr   c                     S[         R                  " U5      [         R                  " U5      4-  nUUUS.nU R                  [        R                  U[
        R                  " U5      S9$ )r-  s,   /userId/%s/instance-group/%s/instance/remover.  r   r   r/  s         r   remove_ig_instanceBcmClient.remove_ig_instance
  sn     ?&BYBYZaBbBHBYBYZ_B`Bb b .

 %%l&7&7DJJtDT%UUr   )rK   r  r  r  r  	view_typer}   r~   c	           	          S[         R                  " U5      -  n	UUUUUUUUS.n
U R                  [        R                  XS9$ )a  
:param user_id: user id
:type user_id: string
:param ig_id: instance group id
:type ig_id: string
:param service_name: service name
:type service_name: string
:param type_name: type name
:type type_name: string
:param region: region
:type region: string
:param view_type: view type, enum: LIST_VIEW, DETAIL_VIEW
:type view_type: string
:param page_no: page number
:type page_no: int
:param page_size: page size
:type page_size: int
s'   /userId/%s/instance-group/instance/list)   idrv   r(  r)  r     viewTypery   r{   r   r  )r   rK   r  r  r  r  r5  r}   r~   r,   r/   s              r   list_ig_instanceBcmClient.list_ig_instance
  sW    * :F<S<ST[<\\("""	
 %%l&6&6%LLr   )	rK   r  r  r  r5  keyword_typekeywordr}   r~   c
           
          S[         R                  " U5      -  n
UUUUUUUUU	S.	nU R                  [        R                  XS9$ )a  
:param user_id: user id
:type user_id: string
:param service_name: service name
:type service_name: string
:param type_name: type name
:type type_name: string
:param region: region
:type region: string
:param view_type: view type, enum: LIST_VIEW, DETAIL_VIEW
:type view_type: string
:param keyword_type: keyword type, enum: name, id
:type keyword_type: string
:param keyword: keyword
:type keyword: string
:param page_no: page number
:type page_no: int
:param page_size: page size
:type page_size: int
s   /userId/%s/instance/list)	rv   r(  r)  r  r8     keywordType   keywordry   r{   r   r  )r   rK   r  r  r  r5  r;  r<  r}   r~   r,   r/   s               r   list_all_instanceBcmClient.list_all_instance  sY    0 +V-D-DW-MM(""("

 %%l&6&6%LLr   )rK   r  ig_uuidr  r  r  r5  r;  r<  r}   r~   c                     S[         R                  " U5      -  nUUUUUUUUU	U
US.nU R                  [        R                  XS9$ )af  
:param user_id: user id
:type user_id: string
:param ig_id: instance group id
:type ig_id: string
:param ig_uuid: instance group uuid
:type ig_uuid: string
:param service_name: service name
:type service_name: string
:param type_name: type name
:type type_name: string
:param region: region
:type region: string
:param view_type: view type, enum: LIST_VIEW, DETAIL_VIEW
:type view_type: string
:param keyword_type: keyword type, enum: name, id
:type keyword_type: string
:param keyword: keyword
:type keyword: string
:param page_no: page number
:type page_no: int
:param page_size: page size
:type page_size: int
s    /userId/%s/instance/filteredList)rv   r7  s   uuidr(  r)  r  r8  r>  r?  ry   r{   r   r  )r   rK   r  rB  r  r  r  r5  r;  r<  r}   r~   r,   r/   s                 r   list_filter_instanceBcmClient.list_filter_instanceE  s_    8 3V5L5LW5UU(""("
 %%l&6&6%LLr   c                     [         R                  " U5      n[         R                  " U5      nSX4-  nSU0nU R                  [        R                  U[
        R                  " U5      US9$ )z
:param user_id: user_id
:type user_id: string
:param scope: scope
:type scope: string
:param metric_data: metric_data
:type bcm_model.MetricDatum array
:return:
s   /metricdata/%s/%s
metricDatar`   )r   rH   r1   r	   rd   re   rf   )r   rK   rL   metric_datar   r,   r-   s          r   push_metric_dataBcmClient.push_metric_dataq  si     ))'2''.#w&66+
 !!,"3"3T

4@PY_!``r   c
                 *   [         R                  " U5      n[         R                  " U5      n[         R                  " U5      nSXU4-  n
UUUUUS.nU R                  [        R                  U
[
        R                  " U5      [        R                  U	S9$ )a[  
Return metric data of product instances owned by the authenticated user.

This site may help you: https://cloud.baidu.com/doc/BCM/s/9jwvym3kb

:param user_id:
    Master account ID
:type user_id: string

:param namespaces:
    Cloud product namespace, eg: BCE_BCC.
:type namespaces: string

:param metric_name:
    The metric name of baidu cloud monitor, eg: CpuIdlePercent.
:type metric_name: string

:param dimensions:
    Consists of dimensionName: dimensionValue.
    Use semicolons when items have multiple dimensions,
    such as dimensionName: dimensionValue; dimensionName: dimensionValue.
    Only one dimension value can be specified for the same dimension.
    eg: InstanceId:fakeid-2222
:type dimensions: string

:param statistics:
    According to the format of statistics1,statistics2,statistics3,
    the optional values are `average`, `maximum`, `minimum`, `sum`, `sampleCount`
:type statistics: string

:param start_time:
    Query start time.
    Please refer to the date and time, UTC date indication
:type start_time: string

:param end_time:
    Query end time.
    Please refer to the date and time, UTC date indication
:type end_time: string

:param cycle:
    Statistical period.
    Multiples of 60 in seconds (s).
:type cycle: int

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
s/   /userId/%s/custom/namespaces/%s/metrics/%s/data)rO   rN   	startTimeendTimer   )r-   r0   r   r   )r   rK   
namespacesrM   rN   rO   rP   rQ   r   r   r,   r-   s               r   get_custom_metric_data BcmClient.get_custom_metric_data  s    l ))'2,,Z8
--k:AWZeDff %$#
 %%l&7&7DJJtDT2=2M2MV\ & ^ 	^r   c                     [         R                  " U5      n[         R                  " U5      nSU-  nUUUUUS.n	U R                  [        R                  U[
        R                  " U	5      US9$ )a"  
:param user_id:
:type user_id: string
:param namespace:
:type namespace: string
:param metric_name:
:type metric_name: string
:param dimensions:
:type dimensions: bcm_model.Dimension array
:param value:
:type value: double
:param timestamp:
:type timestamp: string
:param config:
:return:
s   /userId/%s/custom/data)r   r   rN   value	timestampr`   r   )
r   rK   r   rM   rN   rR  rS  r   r,   r-   s
             r   push_custom_metric_data!BcmClient.push_custom_metric_data  sp    ( ))'2++I6	(G4"%$"
 %%l&7&7DJJtDT]c%ddr   c           
          [         R                  " U5      nSU-  nUUUUUUUUU	S.	nU R                  [        R                  U[
        R                  " U5      U
S9$ )  
:param user_id:
:type user_id: string
:param task_name:
:type task_name: string
:param address:
:type address: string
:param method:
:type method: string
:param post_content:
:type post_content: string
:param advance_config:
:type advance_config: bool
:param cycle:
:type cycle: int
:param idc:
:type idc: string
:param timeout:
:type timeout: int
:param config:
:type config
:return:
s   /userId/%s/site/http/create	r\   taskNameaddressmethodpostContentadvanceConfigr   idctimeoutr`   r   r   rK   r   rZ  r[  post_contentadvance_configr   r^  r_  r   r,   r-   s                r   create_site_http_task_config&BcmClient.create_site_http_task_config  sl    6 ))'2-9!'+

 %%l&7&7DJJtDT]c%ddr   c                     [         R                  " U5      nSU-  nUUUUUUUUU	U
S.
nU R                  [        R                  U[
        R                  " U5      US9$ )  
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param task_name:
:type task_name: string
:param address:
:type address: string
:param method:
:type method: string
:param post_content:
:type post_content: string
:param advance_config:
:type advance_config: bool
:param cycle:
:type cycle: int
:param idc:
:type idc: string
:param timeout:
:type timeout: int
:param config:
:type config
:return:
s   /userId/%s/site/http/update
r\   taskIdrY  rZ  r[  r\  r]  r   r^  r_  r`   r   r   rK   task_idr   rZ  r[  ra  rb  r   r^  r_  r   r,   r-   s                 r   update_site_http_task_config&BcmClient.update_site_http_task_config  so    : ))'2-9!'+
 %%l&6&64::dCS\b%ccr   c                     [         R                  " U5      nSU-  n0 nUb  X%S'   U R                  [        R                  XEUS9$ )r
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param config:
:type config
:return:
s   /userId/%s/site/http/detailrh  rF   r  r   rK   rj  r   r,   r/   s         r   get_site_http_task_config#BcmClient.get_site_http_task_configE  P     ))'2-9&8%%l&6&6TZ%[[r   c           
          [         R                  " U5      nSU-  nUUUUUUUUU	S.	nU R                  [        R                  U[
        R                  " U5      U
S9$ )rW  s   /userId/%s/site/https/createrX  r`   r   r`  s                r   create_site_https_task_config'BcmClient.create_site_https_task_configY  sl    6 ))'2.':!'+

 %%l&7&7DJJtDT]c%ddr   c                     [         R                  " U5      nSU-  nUUUUUUUUU	U
S.
nU R                  [        R                  U[
        R                  " U5      US9$ )rf  s   /userId/%s/site/https/updaterg  r`   r   ri  s                 r   update_site_https_task_config'BcmClient.update_site_https_task_config  so    : ))'2.':!'+
 %%l&6&64::dCS\b%ccr   c                     [         R                  " U5      nSU-  n0 nUb  X%S'   U R                  [        R                  XEUS9$ )rn  s   /userId/%s/site/https/detailrh  rF   r  ro  s         r   get_site_https_task_config$BcmClient.get_site_https_task_config  sP     ))'2.':&8%%l&6&6TZ%[[r   c
           	          [         R                  " U5      nSU-  n
UUUUUUUUS.nU R                  [        R                  U
[
        R                  " U5      U	S9$ )a^  
:param user_id:
:type user_id: string
:param task_name:
:type task_name: string
:param address:
:type address: string
:param packet_count:
:type packet_count: int
:param packet_loss_rate:
:type packet_loss_rate: int
:param cycle:
:type cycle: int
:param idc:
:type idc: string
:param timeout:
:type timeout: int
:param config:
:type config
:return:
s   /userId/%s/site/ping/create)r\   rY  rZ  packetCountpacketLossRater   r^  r_  r`   r   )r   rK   r   rZ  packet_countpacket_loss_rater   r^  r_  r   r,   r-   s               r   create_site_ping_task_config&BcmClient.create_site_ping_task_config  si    2 ))'2-9!'.	
 %%l&7&7DJJtDT]c%ddr   c           
          [         R                  " U5      nSU-  nUUUUUUUUU	S.	nU R                  [        R                  U[
        R                  " U5      U
S9$ )a  
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param task_name:
:type task_name: string
:param address:
:type address: string
:param packet_count:
:type packet_count: int
:param packet_loss_rate:
:type packet_loss_rate: int
:param cycle:
:type cycle: int
:param idc:
:type idc: string
:param timeout:
:type timeout: int
:param config:
:type config
:return:
s   /userId/%s/site/ping/update)	r\   rh  rY  rZ  r}  r~  r   r^  r_  r`   r   )r   rK   rj  r   rZ  r  r  r   r^  r_  r   r,   r-   s                r   update_site_ping_task_config&BcmClient.update_site_ping_task_config  sl    6 ))'2-9!'.

 %%l&6&64::dCS\b%ccr   c                     [         R                  " U5      nSU-  n0 nUb  X%S'   U R                  [        R                  XEUS9$ )rn  s   /userId/%s/site/ping/detailrh  rF   r  ro  s         r   get_site_ping_task_config#BcmClient.get_site_ping_task_config  rr  r   c                     [         R                  " U5      nSU-  nUUUUUU	U
UUUUUS.nU R                  [        R                  U[
        R                  " U5      US9$ )rW  s   /userId/%s/site/tcp/creater\   rY  rZ  portr]  	inputType
outputTypeinputexpectedOutputr   r^  r_  r`   r   r   rK   r   rZ  r  rb  r   r^  r_  
input_typeoutput_typer  expected_outputr   r,   r-   s                   r   create_site_tcp_task_config%BcmClient.create_site_tcp_task_config-  u    6 ))'2,8!+#%-
 %%l&7&7DJJtDT]c%ddr   c                     [         R                  " U5      nSU-  nUUUUUUU
UUUUUU	S.nU R                  [        R                  U[
        R                  " U5      US9$ )M  
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param task_name:
:type task_name: string
:param address:
:type address: string
:param port:
:type port: int
:param post_content:
:type post_content: string
:param advance_config:
:type advance_config: bool
:param cycle:
:type cycle: int
:param idc:
:type idc: string
:param timeout:
:type timeout: int
:param input_type:
:type input_type: int
:param output_type:
:type output_type: int
:param input:
:type input: string
:param expected_output:
:type expected_output: string
:param config:
:type config
:return:
s   /userId/%s/site/tcp/updater\   rh  rY  rZ  r  r]  r  r  r  r  r   r^  r_  r`   r   r   rK   rj  r   rZ  r  rb  r   r^  r_  r  r  r  r  r   r,   r-   s                    r   update_site_tcp_task_config%BcmClient.update_site_tcp_task_config[  y    J ))'2,8!+#%-
  %%l&6&64::dCS\b%ccr   c                     [         R                  " U5      nSU-  n0 nUb  X%S'   U R                  [        R                  XEUS9$ )rn  s   /userId/%s/site/tcp/detailrh  rF   r  ro  s         r   get_site_tcp_task_config"BcmClient.get_site_tcp_task_config  P     ))'2,8&8%%l&6&6TZ%[[r   c                     [         R                  " U5      nSU-  nUUUUUU	U
UUUUUS.nU R                  [        R                  U[
        R                  " U5      US9$ )rW  s   /userId/%s/site/udp/creater  r`   r   r  s                   r   create_site_udp_task_config%BcmClient.create_site_udp_task_config  r  r   c                     [         R                  " U5      nSU-  nUUUUUUU
UUUUUU	S.nU R                  [        R                  U[
        R                  " U5      US9$ )r  s   /userId/%s/site/udp/updater  r`   r   r  s                    r   update_site_udp_task_config%BcmClient.update_site_udp_task_config  r  r   c                     [         R                  " U5      nSU-  n0 nUb  X%S'   U R                  [        R                  XEUS9$ )rn  s   /userId/%s/site/udp/detailrh  rF   r  ro  s         r   get_site_udp_task_config"BcmClient.get_site_udp_task_config  r  r   c                     [         R                  " U5      nSU-  nUUUUUU	U
UUUS.
nU R                  [        R                  U[
        R                  " U5      US9$ )a  
:param user_id:
:type user_id: string
:param task_name:
:type task_name: string
:param address:
:type address: string
:param port:
:type port: int
:param post_content:
:type post_content: string
:param anonymous_login:
:type anonymous_login: bool
:param cycle:
:type cycle: int
:param idc:
:type idc: string
:param timeout:
:type timeout: int
:param user_name:
:type user_name: string
:param password:
:type password: string
:param config:
:type config
:return:
s   /userId/%s/site/ftp/create)
r\   rY  rZ  r  anonymousLoginuserNamepasswordr   r^  r_  r`   r   )r   rK   r   rZ  r  anonymous_loginr   r^  r_  	user_namer  r   r,   r-   s                 r   create_site_ftp_task_config%BcmClient.create_site_ftp_task_config#  so    > ))'2,8!-! 
 %%l&7&7DJJtDT]c%ddr   c                     [         R                  " U5      nSU-  nUUUUUUU
UUUU	S.nU R                  [        R                  U[
        R                  " U5      US9$ )a  
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param task_name:
:type task_name: string
:param address:
:type address: string
:param port:
:type port: int
:param post_content:
:type post_content: string
:param anonymous_login:
:type anonymous_login: bool
:param cycle:
:type cycle: int
:param idc:
:type idc: string
:param timeout:
:type timeout: int
:param user_name:
:type user_name: string
:param password:
:type password: string
:param config:
:type config
:return:
s   /userId/%s/site/ftp/update)r\   rh  rY  rZ  r  r  r  r  r   r^  r_  r`   r   )r   rK   rj  r   rZ  r  r  r   r^  r_  r  r  r   r,   r-   s                  r   update_site_ftp_task_config%BcmClient.update_site_ftp_task_configS  ss    B ))'2,8!-! 
 %%l&6&64::dCS\b%ccr   c                     [         R                  " U5      nSU-  n0 nUb  X%S'   U R                  [        R                  XEUS9$ )rn  s   /userId/%s/site/ftp/detailrh  rF   r  ro  s         r   get_site_ftp_task_config"BcmClient.get_site_ftp_task_config  r  r   c           
          [         R                  " U5      nSU-  nUUUUUU	UUUS.	nU R                  [        R                  U[
        R                  " U5      U
S9$ )a  
:param user_id:
:type user_id: string
:param task_name:
:type task_name: string
:param address:
:type address: string
:param post_content:
:type post_content: string
:param cycle:
:type cycle: int
:param idc:
:type idc: string
:param timeout:
:type timeout: int
:param server:
:type server: string
:param resolve_type:
:type resolve_type: ENUM {'RECURSION', 'ITERATION'}
:param kidnap_white:
:type kidnap_white: string
:param config:
:type config
:return:
s   /userId/%s/site/dns/create)	r\   rY  rZ  serverresolveTypekidnapWhiter   r^  r_  r`   r   )r   rK   r   rZ  r   r^  r_  r  resolve_typekidnap_whiter   r,   r-   s                r   create_site_dns_task_config%BcmClient.create_site_dns_task_config  sl    : ))'2,8!''

 %%l&7&7DJJtDT]c%ddr   c                     [         R                  " U5      nSU-  nUUUUUU	U
UUUS.
nU R                  [        R                  U[
        R                  " U5      US9$ )a  
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param task_name:
:type task_name: string
:param address:
:type address: string
:param post_content:
:type post_content: string
:param cycle:
:type cycle: int
:param idc:
:type idc: string
:param timeout:
:type timeout: int
:param server:
:type server: string
:param resolve_type:
:type resolve_type: ENUM {'RECURSION', 'ITERATION'}
:param kidnap_white:
:type kidnap_white: string
:param config:
:type config
:return:
s   /userId/%s/site/dns/update)
r\   rh  rY  rZ  r  r  r  r   r^  r_  r`   r   )r   rK   rj  r   rZ  r   r^  r_  r  r  r  r   r,   r-   s                 r   update_site_dns_task_config%BcmClient.update_site_dns_task_config  so    > ))'2,8!''
 %%l&6&64::dCS\b%ccr   c                     [         R                  " U5      nSU-  n0 nUb  X%S'   U R                  [        R                  XEUS9$ )rn  s   /userId/%s/site/dns/detailrh  rF   r  ro  s         r   get_site_dns_task_config"BcmClient.get_site_dns_task_config  r  r   c                     [         R                  " U5      nSU-  nUc  SnUUS.nUc  SUS'   OXHS'   Uc  SUS'   OXXS'   U R                  [        R                  XxUS9$ )	z
:param user_id:
:type user_id: string
:param query:
:type query: string
:param type:
:type type: string
:param page_no:
:type page_no: int
:param page_size:
:type page_size: int
:param config:
:type config:
:return:
s   /userId/%s/site/listzNAME:)s   query   typerx   ry   rz   r{   rF   r  )	r   rK   queryr*  r}   r~   r   r,   r/   s	            r   get_site_task_config_list#BcmClient.get_site_task_config_list  s    $ ))'2&'2=E

 ? !F9 '9"$F;"+;%%l&6&6TZ%[[r   c                 ~    [         R                  " U5      nSU-  nSU0nU R                  [        R                  XEUS9$ )s
:param user_id:
:type user_id: string
:param task_Id:
:type task_Id: string
:param config:
:type config:
:return:
s   /userId/%s/site/delete   taskIdrF   r   ro  s         r   delete_site_task_config!BcmClient.delete_site_task_config1  sK     ))'2(G4w
 %%l&9&94W]%^^r   c                     [         R                  " U5      n[         R                  " U5      nSX4-  nU R                  [        R                  XCS9$ )r  s   /userId/%s/site/%srO  r  )r   rK   rj  r   r,   s        r   get_site_task_config_info#BcmClient.get_site_task_config_infoE  sM     ))'2))'2$'99%%l&6&6%LLr   c                    [         R                  " U5      nSU-  n0 SU_SU_SU_SU_SU_SU_SU_S	U_S
U	_SU
_SU_SU_SU_SU_SU_SU_nU R                  [        R                  U[
        R                  " U5      US9$ )a  
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param comment:
:type comment: string
:param alias_name:
:type alias_name: string
:param level:
:type level: ENUM {'NOTICE', 'WARNING', 'CRITICAL', 'MAJOR', 'CUSTOM'}
:param action_enabled:
:type action_enabled: bool
:param resume_actions:
:type :type user_id: string: string
:param insufficient_actions:
:type insufficient_actions: string
:param incident_action:
:type incident_action: string
:param insufficient_cycle:
:type insufficient_cycle: int
:param rules:
:type rules: list of SiteAlarmRule
:param region:
:type region: string
:param callback_url:
:type callback_url: string
:param method:
:type method: string
:param site_monitor:
:type site_monitor: string
:param tag:
:type tag: string
:return:
s#   /userId/%s/site/alarm/config/creater\   rh  r_   r  r+  r,  r.  r/  incidentActionr0  r"  r  callbackUrlr[  siteMonitortagr`   r   )r   rK   rj  r_   r  r+  r  r9  r:  incident_actionr;  r"  r  callback_urlr[  site_monitorr  r   r,   r-   s                       r   create_site_alarm_config"BcmClient.create_site_alarm_configW  s   P ))'25A
g
g
 w
 	

 U
 ^
 ^
 "#7
 o
  !3
 U
 f
 <
 f
 <
  3!
& %%l&7&7DJJtDT]c%ddr   c                     [         R                  " U5      nSU-  nSU0nU R                  [        R                  U[
        R                  " U5      US9$ )zy
:param user_id:
:type user_id: string
:param alarm_names:
:type alarm_names: list
:param config:
:type config:
:return:
s#   /userId/%s/site/alarm/config/delete
alarmNamesr`   r  )r   rK   alarm_namesr   r,   r-   s         r   delete_site_alarm_config"BcmClient.delete_site_alarm_config  sW     ))'25A+
 %%l&9&94djjQUFV_e%ffr   c                 
   [         R                  " U5      nSU-  n0 SU_SU_SU_SU_SU_SU_SU_S	U_S
U	_SU
_SU_SU_SU_SU_SU_SU_SU_nU R                  [        R                  U[
        R                  " U5      US9$ )a<  
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param alarm_name:
:type alarm_name: string
:param comment:
:type comment: string
:param alias_name:
:type alias_name: string
:param level:
:type level: ENUM {'NOTICE', 'WARNING', 'CRITICAL', 'MAJOR', 'CUSTOM'}
:param action_enabled:
:type action_enabled: bool
:param resume_actions:
:type :type user_id: string: string
:param insufficient_actions:
:type insufficient_actions: string
:param incident_action:
:type incident_action: string
:param insufficient_cycle:
:type insufficient_cycle: int
:param rules:
:type rules: list of SiteAlarmRule
:param region:
:type region: string
:param callback_url:
:type callback_url: string
:param method:
:type method: string
:param site_monitor:
:type site_monitor: string
:param tag:
:type tag: string
:return:
s#   /userId/%s/site/alarm/config/updater\   rh  r  r_   r  r+  r,  r.  r/  r  r0  r"  r  r  r[  r  r  r`   r   )r   rK   rj  r  r_   r  r+  r  r9  r:  r  r;  r"  r  r  r[  r  r  r   r,   r-   s                        r   update_site_alarm_config"BcmClient.update_site_alarm_config  s   T ))'25A
g
g
 
 w	

 
 U
 ^
 ^
 "#7
 o
  !3
 U
 f
 <
 f
  <!
" 3#
( %%l&6&64::dCS\b%ccr   c                 ~    [         R                  " U5      nSU-  nSU0nU R                  [        R                  XEUS9$ )y
:param user_id:
:type user_id: string
:param alarm_name:
:type alarm_name: string
:param config:
:type config:
:return:
s#   /userId/%s/site/alarm/config/detailr  rF   r  )r   rK   r  r   r,   r/   s         r   get_site_alarm_config_detail&BcmClient.get_site_alarm_config_detail  sK     ))'25A*
 %%l&6&6TZ%[[r   c                     [         R                  " U5      nSU-  n0 n	Ub  X)S'   Ub  X9S'   Ub  XIS'   Uc  SU	S'   OXYS'   Uc  SU	S'   OXiS'   U R                  [        R                  XUS	9$ )
a  
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param alarm_name:
:type alarm_name: string
:param action_enabled:
:type action_enabled: bool
:param page_no:
:type page_no: int
:param page_size:
:type page_size: int
:param config:
:return:
s!   /userId/%s/site/alarm/config/listr  r  r  rx   ry   rz   r{   rF   r  )
r   rK   rj  r  r  r}   r~   r   r,   r/   s
             r   get_site_alarm_config_list$BcmClient.get_site_alarm_config_list   s    ( ))'23w? '9!#-< %'5#$? !F9 '9"$F;"+;%%l&6&6TZ%[[r   c                     [         R                  " U5      nSU-  nUUS.nU R                  [        R                  XVUS9$ )r  s"   /userId/%s/site/alarm/config/blockr  r   rF   r   rH   r:   r	   rd   r   rK   r  r   r   r,   r/   s          r   block_site_alarm_config!BcmClient.block_site_alarm_config*  sL     ))'24@#"

 %%l&7&7U[%\\r   c                     [         R                  " U5      nSU-  nUUS.nU R                  [        R                  XVUS9$ )r  s$   /userId/%s/site/alarm/config/unblockr  rF   r  r  s          r   unblock_site_alarm_config#BcmClient.unblock_site_alarm_config?  sL     ))'26'B#"

 %%l&7&7U[%\\r   c
                 .   [         R                  " U5      nSU-  n
SU0nUb  X;S'   Ub  XS'   Ub#  [        U5      S:  a  SR                  U5      US'   Ub  X[S'   Ub  XkS	'   Ub  X{S
'   U R	                  [
        R                  X[        R                  U	S9$ )a\  
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param metric_name:
:type metric_name: string
:param statistics:
:type statistics: list
:param start_time:
:type start_time: string
:param end_time:
:type end_time: string
:param cycle:
:type cycle: int
:param dimensions:
:type dimensions: string
:param config:
:return:
s   /userId/%s/site/metricSiteDatarh  r   rA   r   r   r  rC   rD   r  r/   r0   r   r  )r   rK   rj  rM   rO   rP   rQ   r   rN   r   r,   r/   s               r   get_site_metric_dataBcmClient.get_site_metric_dataT  s    2 ))'20G<g
 "$/=!!$.=!!c*o&9$'HHZ$8F=!!#-< !):$8%%l&6&62=2M2MV\ & ^ 	^r   c                     [         R                  " U5      nSU-  nSU0nU R                  [        R                  XE[
        R                  US9$ )s
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param config:
:type config:
:return:
s   /userId/%s/site/idc/overallViewrh  r  r
  ro  s         r   get_site_overall_viewBcmClient.get_site_overall_view  s\     ))'21W=g
 %%l&6&62=2M2MV\ & ^ 	^r   c                     [         R                  " U5      nSU-  nUUS.nU R                  [        R                  XV[
        R                  US9$ )z
:param user_id:
:type user_id: string
:param task_id:
:type task_id: string
:param isp:
:type isp: string
:param config:
:type config:
:return:
s"   /userId/%s/site/idc/provincialView)rh  ispr  r
  )r   rK   rj  r  r   r,   r/   s          r   get_site_provincial_view"BcmClient.get_site_provincial_view  s]     ))'24@

 %%l&6&62=2M2MV\ & ^ 	^r   c                     [         R                  " U5      nSU-  nU R                  [        R                  U[
        R                  US9$ )zM
:param user_id:
:type user_id: string
:param config:
:type config:
:return:
s   /userId/%s/site/agent/list)r0   r   r
  )r   rK   r   r,   s       r   get_site_agentBcmClient.get_site_agent  sE     ))'2,8%%l&6&6+JeJent%uur   c                 ~    [         R                  " U5      nSU-  nSU0nU R                  [        R                  XEUS9$ )r  s   /userId/%s/site/agent/idcIsprh  rF   r  ro  s         r   get_site_agent_for_task!BcmClient.get_site_agent_for_task  sK     ))'2.':g
 %%l&6&6TZ%[[r   c                 |   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUc  [        S5      e[        U5      S::  a  [        S	5      e[        U5      S::  a  [        S
5      eUc  / nU
c  / n
Sn0 SU_SU_SU_SU_SU_SU_SU_SU_SU
_SU_SU	_SU_SU_SU_SU_SU_SU_SU0EnU R                  [        R                  U[
        R                  " U5      S9  g)a)  
create alarm config

This site may help you: https://cloud.baidu.com/doc/BCM/s/Vks8iqqnx

:param user_id: master account id
:type user_id: string

:param alias_name: alarm config alias name
:type alias_name: string

:param scope: scope
:type scope: string

:param level: alarm level
:type level: string

:param region: alarm region
:type region: string

:param monitor_object: monitor object
:type monitor_object: MonitorObject

:param alarm_actions: alarm actions
:type alarm_actions: string array

:param rules: alarm rules
:type rules: AlarmRule double dimensional array

:param src_type: src type
:type src_type: string

:param ok_actions: ok actions
:type ok_actions: string array

:param insufficient_actions: insufficient actions
:type insufficient_actions: string array

:param config_type: alarm config type
:type config_type: string

:param insufficient_cycle: insufficient cycle
:type insufficient_cycle: int

:param max_repeat_count: max repeat count
:type max_repeat_count: int

:param repeat_alarm_cycle: repeat alarm cycle
:type repeat_alarm_cycle: int

:param callback_url: callback url
:type callback_url: string

:param callback_token: callback token
:type callback_token: string

:param description: description
:type description: string

:param config:
:type config: baidubce.BceClientConfiguration

r   rY   -alias_name should not be none or empty string(scope should not be none or empty stringr  (level should not be none or empty stringN!monitor_object should not be none!alarm_actions should not be emptyrules should not be emptys   /services/alarm/config/creater%  r  r\   rL   r  r+  r'  alarmActions	okActionsr/  r)  r*  r0  r2  r1  r  callbackTokenr"  r   r   )r   rK   r  rL   r+  r  r6  alarm_actionsr"  r  
ok_actionsr:  config_typer;  r=  r<  r  callback_tokenr  r   r,   r-   s                         r   create_alarm_configBcmClient.create_alarm_config  s   F w<1IJJz?aLMMu:?GHHv;!HIIu:?GHH!@AA}"@AAu:?899'#% J/


 g
 U	

 f
 U
 ^
 M
 
 "#7
 x
 K
  !3
 .
  2
  <!
" ^#
$ U%
( 	|00$TZZ=MNr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUc  [        S	5      e[        U5      S::  a  [        S
5      e[        U	5      S::  a  [        S5      eUc  / nUc  / nSn0 SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU
_SU_SU_SU_SU_SU_UU	S.EnU R                  [        R                  U[
        R                  " U5      S9  g) ah  
update alarm config

This site may help you: https://cloud.baidu.com/doc/BCM/s/Vks8iqqnx

:param user_id: master account id
:type user_id: string

:param alarm_name: alarm config name
:type alarm_name: string

:param alias_name: alarm config alias name
:type alias_name: string

:param scope: scope
:type scope: string

:param level: alarm level
:type level: string

:param region: alarm region
:type region: string

:param monitor_object: monitor object
:type monitor_object: MonitorObject

:param alarm_actions: alarm actions
:type alarm_actions: string array

:param rules: alarm rules
:type rules: AlarmRule double dimensional array

:param src_type: src type
:type src_type: string

:param ok_actions: ok actions
:type ok_actions: string array

:param insufficient_actions: insufficient actions
:type insufficient_actions: string array

:param config_type: alarm config type
:type config_type: string

:param insufficient_cycle: insufficient cycle
:type insufficient_cycle: int

:param max_repeat_count: max repeat count
:type max_repeat_count: int

:param repeat_alarm_cycle: repeat alarm cycle
:type repeat_alarm_cycle: int

:param callback_url: callback url
:type callback_url: string

:param callback_token: callback token
:type callback_token: string

:param description: description
:type description: string

:param config:
:type config: baidubce.BceClientConfiguration

r   rY   r	  -alarm_name should not be none or empty stringr
  r  r  Nr  r  r  s   /services/alarm/config/updater%  r  r  r\   rL   r  r+  r'  r  r  r/  r)  r*  r0  r2  r1  r  )r  r"  r   r   )r   rK   r  r  rL   r+  r  r6  r  r"  r  r  r:  r  r;  r=  r<  r  r  r  r   r,   r-   s                          r   update_alarm_configBcmClient.update_alarm_configB  s   N w<1IJJz?aLMMz?aLMMu:?GHHv;!HIIu:?GHH!@AA}"@AAu:?899'#% J/


 
 g	

 U
 f
 U
 ^
 M
 
 "#7
 x
 K
  !3
 .
   2!
" <#
$ ,'
* 	|00$TZZ=MNr   c                     [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSnUUUS.nU R                  [        R                  XVUS9  g)	a:  
delete alarm config

This site may help you: https://cloud.baidu.com/doc/BCM/s/Vks8iqqnx

:param user_id: master account id
:type user_id: string

:param alarm_name: alarm config name
:type alarm_name: string

:param scope: scope
:type scope: string

:param config:
:type config: baidubce.BceClientConfiguration

r   rY   r  r
  s   /services/alarm/config/deleter  rv   r  rF   Nrb   rc   r:   r	   rd   r   rK   r  rL   r   r,   r/   s          r   delete_alarm_configBcmClient.delete_alarm_config  s}    & w<1IJJz?aLMMu:?GHH/$

 	|00$fUr   c                     [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSnUUUS.nU R                  [        R                  XVUS9  g)	a9  
block alarm config

This site may help you: https://cloud.baidu.com/doc/BCM/s/Vks8iqqnx

:param user_id: master account id
:type user_id: string

:param alarm_name: alarm config name
:type alarm_name: string

:param scope: scope
:type scope: string

:param config:
:type config: baidubce.BceClientConfiguration

r   rY   r  r
  s   /services/alarm/config/blockr  rF   Nr  r  s          r   block_alarm_configBcmClient.block_alarm_config  s}    & w<1IJJz?aLMMu:?GHH.$

 	|00$fUr   c                     [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSnUUUS.nU R                  [        R                  XVUS9  g)	a;  
unblock alarm config

This site may help you: https://cloud.baidu.com/doc/BCM/s/Vks8iqqnx

:param user_id: master account id
:type user_id: string

:param alarm_name: alarm config name
:type alarm_name: string

:param scope: scope
:type scope: string

:param config:
:type config: baidubce.BceClientConfiguration

r   rY   r  r
  s   /services/alarm/config/unblockr  rF   Nr  r  s          r   unblock_alarm_configBcmClient.unblock_alarm_config  s}    & w<1IJJz?aLMMu:?GHH0$

 	|00$fUr   c                     [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSnUUUS.nU R                  [        R                  XVUS9$ )ap  
get alarm config detail

This site may help you: https://cloud.baidu.com/doc/BCM/s/Vks8iqqnx

:param user_id: master account id
:type user_id: string

:param alarm_name: alarm config name
:type alarm_name: string

:param scope: scope
:type scope: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r  r
  s   /services/alarm/configr  rF   r   r  s          r   get_alarm_config_detail!BcmClient.get_alarm_config_detail  s    * w<1IJJz?aLMMu:?GHH($

 %%l&6&6TZ%[[r   c           	      0   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUS::  a  [        S5      eUS::  a  [        S5      eSnUUUUUUU	US.nUb  U(       a  SUS	'   OS
US	'   U R                  [        R                  XU
S9$ )a  
get alarm config detail

This site may help you: https://cloud.baidu.com/doc/BCM/s/Vks8iqqnx

:param user_id: master account id
:type user_id: string

:param scope: scope
:type scope: string

:param region: region
:type region: string

:param page_no: page no
:type page_no: int

:param page_size: page size
:type page_size: int

:param alarm_name_prefix: alarm name prefix
:type alarm_name_prefix: string

:param action_enabled: action enable flag
:type action_enabled: bool

:param dimensions: dimensions
:type dimensions: string

:param order: order
:type order: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r
  z page_no should be greater than 0z"page_size should be greater than 0s   /services/alarm/config/list)r  rv   r  ry   r{   rA   s   orders   alarmNamePrefixtruer,  falserF   r   )r   rK   rL   r}   r~   r  alarm_name_prefixr  rN   r   r   r,   r/   s                r   !get_single_instance_alarm_configs+BcmClient.get_single_instance_alarm_configsB  s    R w<1IJJu:?GHHa<?@@>ABB-"% 1	
 %*0'*1'%%l&6&6TZ%[[r   c                     [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSnUUUUUUS.n	U R                  [        R                  X[
        R                  US9$ )a  
get alarm config detail

This site may help you: https://cloud.baidu.com/doc/BCM/s/Vks8iqqnx

:param user_id: master account id
:type user_id: string

:param scope: scope
:type scope: string

:param region: region
:type region: string

:param dimensions: dimensions
:type dimensions: string

:param metric_type: metric type
:type metric_type: string

:param locale: locale
:type locale: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r
  s   /services/alarm/config/metrics)r  rv   r  rA   r  s   localer  )rb   rc   r:   r	   rI   r
   r   )
r   rK   rL   r  rN   metric_typelocaler   r,   r/   s
             r   get_alarm_metricsBcmClient.get_alarm_metrics  s    < w<1IJJu:?GHH0% 
 %%l&6&62=2M2MV\ & ^ 	^r   c                 v   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S	5      eUS
:X  a  [        U	5      S::  a  [        S5      eUS:X  a  [        U5      S::  a  [        S5      eUS:X  a  [        U5      S::  a  [        S5      eUc  / nUc  / nU	c  / n	SX4-  n0 SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU
_SU_SU_SU_SU	_S U_nU R                  [        R                  U[
        R                  " U5      U[        R                  S!9$ )"a  
get alarm config detail

This site may help you: https://cloud.baidu.com/doc/BCM/s/blhrp7kdx

:param user_id: master account id
:type user_id: string

:param alias_name: alarm config alias name
:type alias_name: string

:param scope: scope
:type scope: string

:param target_type: alarm config target type
:type target_type: string

:param level: alarm level
:type level: string

:param region: alarm config region
:type region: string

:param actions: alarm actions
:type actions: AlarmAction array

:param policies: alarm config policies
:type policies: AlarmConfigPolicy array

:param target_instances: alarm config target instances
:type target_instances: TargetInstance array

:param insufficient_period: insufficient data pending period
:type insufficient_period: int

:param alarm_repeat_interval: alarm repeat interval
:type alarm_repeat_interval: int

:param alarm_repeat_count: alarm repeat count
:type alarm_repeat_count: int

:param callback_url: callback url
:type callback_url: string

:param callback_token: callback token
:type callback_token: string

:param target_instance_tags: target instance tags
:type target_instance_tags: KV array

:param target_instance_groups: target instance groups
:type target_instance_groups: string array

:param resource_type: resource type
:type resource_type: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r
  r	  .target_type should not be none or empty stringr  r  actions should not be emptypolicies should not be emptyTARGET_TYPE_MULTI_INSTANCES$target_instances should not be emptyTARGET_TYPE_INSTANCE_GROUP*target_instance_groups should not be emptyTARGET_TYPE_INSTANCE_TAGS(target_instance_tags should not be emptys*   /userId/%s/services/%s/alarm/config/creater\   rL   r  
targetTyperesourceType
alarmLeveltargetInstanceGroupstargetInstanceTagsr  r  insufficientDataPendingPeriodalarmRepeatIntervalalarmRepeatCountpoliciestargetInstancesactionsr-   r   r)   )	rb   rc   r:   r	   rd   re   rf   r   
version_v2)r   rK   r  rL   target_typer+  r  rJ  rH  target_instancesinsufficient_periodalarm_repeat_intervalalarm_repeat_countr  r  target_instance_tagstarget_instance_groupsr   r   r,   r-   s                        r   create_alarm_config_v2 BcmClient.create_alarm_config_v2  sd   F w<1IJJu:?GHHz?aLMM{q MNNu:?GHHv;!HIIw<1:;;x=A;<<77C@P<QUV<VCDD663?U;VZ[;[IJJ55#>R:SWX:XGHH!)%'"'#% #!<?OO
g
U
 
 +	

 M
 %
 #$:
 !"6
 <
 ^
 ,-@
 "#8
  2
 
 /
  w!
$ %%l&7&7DJJtDT]c.7.B.B & D 	Dr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S	5      e[        U	5      S::  a  [        S
5      eUS:X  a  [        U
5      S::  a  [        S5      eUS:X  a  [        U5      S::  a  [        S5      eUS:X  a  [        U5      S::  a  [        S5      eUc  / nUc  / nU
c  / n
SX4-  n0 SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_SU_S U	_S!U
_S"U_nU R                  [        R                  U[
        R                  " U5      U[        R                  S#9$ )$a  
get alarm config detail

This site may help you: https://cloud.baidu.com/doc/BCM/s/blhrp7kdx

:param user_id: master account id
:type user_id: string

:param alarm_name: alarm config name
:type alarm_name: string

:param alias_name: alarm config alias name
:type alias_name: string

:param scope: scope
:type scope: string

:param target_type: alarm config target type
:type target_type: string

:param level: alarm level
:type level: string

:param region: alarm config region
:type region: string

:param actions: alarm actions
:type actions: AlarmAction array

:param policies: alarm config policies
:type policies: AlarmConfigPolicy array

:param target_instances: alarm config target instances
:type target_instances: TargetInstance array

:param insufficient_period: insufficient data pending period
:type insufficient_period: int

:param alarm_repeat_interval: alarm repeat interval
:type alarm_repeat_interval: int

:param alarm_repeat_count: alarm repeat count
:type alarm_repeat_count: int

:param callback_url: callback url
:type callback_url: string

:param callback_token: callback token
:type callback_token: string

:param target_instance_tags: target instance tags
:type target_instance_tags: KV array

:param target_instance_groups: target instance groups
:type target_instance_groups: string array

:param resource_type: resource type
:type resource_type: string

:param config:
:type config: baidubce.BceClientConfiguration

:return:
:rtype baidubce.bce_response.BceResponse
r   rY   r
  r  r	  r7  r  r  r8  r9  r:  r;  r<  r=  r>  r?  s*   /userId/%s/services/%s/alarm/config/updater\   rL   r  r  r@  rA  rB  rC  rD  r  r  rE  rF  rG  rH  rI  rJ  rK  )	rb   rc   r:   r	   rr   re   rf   r   rL  )r   rK   r  r  rL   rM  r+  r  rJ  rH  rN  rO  rP  rQ  r  r  rR  rS  r   r   r,   r-   s                         r   update_alarm_config_v2 BcmClient.update_alarm_config_v2+  s   L w<1IJJu:?GHHz?aLMMz?aLMM{q MNNu:?GHHv;!HIIw<1:;;x=A;<<77C@P<QUV<VCDD663?U;VZ[;[IJJ55#>R:SWX:XGHH'#% !)%'"#!<?OO
g
U
 
 	

 +
 M
 %
 #$:
 !"6
 <
 ^
 ,-@
 "#8
  2
 
  /!
" w#
& %%l&6&64::dCS\b.7.B.B & D 	Dr   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSX4-  nSU0nU R                  [        R                  XVU[
        R                  S9  g)	a<  
block alarm config v2

This site may help you: https://cloud.baidu.com/doc/BCM/s/blhrp7kdx

:param user_id: master account id
:type user_id: string

:param alarm_name: alarm config name
:type alarm_name: string

:param scope: scope
:type scope: string

:param config:
:type config: baidubce.BceClientConfiguration

r   rY   r  r
  s)   /userId/%s/services/%s/alarm/config/blockr  r/   r   r)   Nrb   rc   r:   r	   rd   r   rL  r  s          r   block_alarm_config_v2BcmClient.block_alarm_config_v2  s    & w<1IJJz?aLMMu:?GHH;w>NN*
 	|00$f'0';'; 	 	=r   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSX4-  nSU0nU R                  [        R                  XVU[
        R                  S9  g)	a>  
unblock alarm config v2

This site may help you: https://cloud.baidu.com/doc/BCM/s/blhrp7kdx

:param user_id: master account id
:type user_id: string

:param alarm_name: alarm config name
:type alarm_name: string

:param scope: scope
:type scope: string

:param config:
:type config: baidubce.BceClientConfiguration

r   rY   r  r
  s+   /userId/%s/services/%s/alarm/config/unblockr  rZ  Nr[  r  s          r   unblock_alarm_config_v2!BcmClient.unblock_alarm_config_v2  s    & w<1IJJz?aLMMu:?GHH=@PP*
 	|00$f'0';'; 	 	=r   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eSX4-  nSU0nU R                  [        R                  XVU[
        R                  S9  g)	aA  
get alarm config detail v2

This site may help you: https://cloud.baidu.com/doc/BCM/s/blhrp7kdx

:param user_id: master account id
:type user_id: string

:param alarm_name: alarm config name
:type alarm_name: string

:param scope: scope
:type scope: string

:param config:
:type config: baidubce.BceClientConfiguration

r   rY   r  r
  s#   /userId/%s/services/%s/alarm/configr  rZ  N)rb   rc   r:   r	   rI   r   rL  r  s          r   get_alarm_config_detail_v2$BcmClient.get_alarm_config_detail_v2  s    & w<1IJJz?aLMMu:?GHH58HH*
 	|//V]f]q]qrr   )r"  r/  r1  r2  c                     Sn0 SU_SU_SU_SU_SU_SU_SU_S	U_S
U	_SU
_SU_SU_SU_SU_SU_SU_SU_SU0EnU R                  [        R                  U[        R                  " U5      S9$ )  
:param user_id:
:type user_id: string
:param alarm_name: alarm name
:type alarm_name: string
:param namespace: custom namespace
:type namespace: string
:param level: level
:type level: string  enum: NOTICE, NOTICE, CRITICAL, MAJOR
:param comment: comment
:type comment: string
:param action_enabled: is action enabled
:type action_enabled: bool
:param policy_enabled: is policy enabled
:type policy_enabled: bool
:param alarm_actions: alarm actions
:type alarm_actions: list
:param ok_actions: ok actions
:type ok_actions: list of string
:param insufficient_actions: insufficient actions
:type insufficient_actions: list of string
:param insufficient_cycle: insufficient cycle
:type insufficient_cycle: int
:param rules: rules
:type rules: list of CustomAlarmRule
:param region: region
:type region: string
:param callback_url: callback url
:type callback_url: string
:param callback_token: callback token
:type callback_token: string
:param tag: tag
:type tag: string
:param repeat_alarm_cycle: repeat alarm cycle
:type repeat_alarm_cycle: int
:param max_repeat_count: max repeat count
:type max_repeat_count: int

:return
:rtype baidubce.bce_response.BceResponse
s   /custom/alarm/configs/creater\   r  r   r+  r_   r,  policyEnabledr  r  r/  r0  r"  r  r  r  r1  r2  r  r   rz  r   rK   r  r   r+  r_   r  policy_enabledr  r  r:  r;  r"  r  r  r  r  r<  r=  r,   r-   s                        r   create_custom_alarm_policy$BcmClient.create_custom_alarm_policy	  s   ` /
g

 
 U	

 w
 ^
 ^
 M
 
 "#7
  !3
 U
 f
 <
 ^
   2!
" .#
$ 3%
( %%l&7&7DJJtDT%UUr   )custom_alarm_listc                     SnS/ 0nU H$  nUS   R                  US   US   US   S.5        M&     U R                  [        R                  U[        R
                  " U5      S9$ )z|
:param custom_alarm_list:
:type custom_alarm_list:  list of custom alarm

:return
:rtype baidubce.bce_response.BceResponse
s   /custom/alarm/configs/deletecustomAlarmListrL   r\   r  )rL   r\   r  r   )r  r:   r	   rd   re   rf   )r   rk  r,   r-   custom_alarms        r   delete_custom_alarm_policy$BcmClient.delete_custom_alarm_policyP  s~     0  
 .L"#**%g.&x0)+6,  . %%l&7&7DJJtDT%UUr   c                     Uc  / nU	c  / nU
c  / n
Sn0 SU_SU_SU_SU_SU_SU_SU_S	U_S
U	_SU
_SU_SU_SU_SU_SU_SU_SU_SU0EnU R                  [        R                  U[        R                  " U5      S9$ )re  s   /custom/alarm/configs/updater\   r  r   r+  r_   r,  rf  r  r  r/  r0  r"  r  r  r  r1  r2  r  r   )r:   r	   rr   re   rf   rg  s                        r   update_custom_alarm_policy$BcmClient.update_custom_alarm_policyf  s4   `  MM'#% .
g

 
 U	

 w
 ^
 ^
 M
 
 "#7
  !3
 U
 f
 <
 ^
   2!
" .#
$ 3%
( %%l&6&64::dCS%TTr   c                 T    UUUUUUS.nSnU R                  [        R                  XS9$ )ah  
:param user_id:
:type user_id: string
:param page_no: page number
:type page_no: int
:param page_size: page size
:type page_size: int
:param alarm_name: alarm name
:type alarm_name: string
:param namespace: namespace
:type namespace: string
:param action_enabled: is action enabled
:type action_enabled: bool

:return
:rtype baidubce.bce_response.BceResponse
)ry   r{   rv   r  r  r   s   /custom/alarm/configs/listr   r:   r	   rI   )	r   rK   r}   r~   r  r   r  r/   r,   s	            r   list_custom_policyBcmClient.list_custom_policy  s@    & "$,#
 -%%l&6&6%LLr   c                 N    UUUS.nSnU R                  [        R                  XTS9$ )z
:param user_id:
:type user_id: string
:param namespace: namespace
:type namespace: string
:param alarm_name: alarm name
:type alarm_name: string

:return: Returns detailed information about a custom policy.
:rtype: baidubce.bce_response.BceResponse
rv   r  r   s   /custom/alarm/configs/detailr   ru  r   rK   r   r  r/   r,   s         r   detail_custom_policyBcmClient.detail_custom_policy  s7     $#

 /%%l&6&6%LLr   c                 N    UUUS.nSnU R                  [        R                  XTS9$ )z
:param user_id: User's identifier
:type user_id: string
:param namespace: Namespace
:type namespace: string
:param alarm_name: Alarm name
:type alarm_name: string

:return:
:rtype: baidubce.bce_response.BceResponse
ry  s   /custom/alarm/configs/blockr   r:   r	   rd   rz  s         r   block_custom_policyBcmClient.block_custom_policy  s7     $#

 .%%l&7&7%MMr   c                 N    UUUS.nSnU R                  [        R                  XTS9$ )z
:param user_id: User's identifier
:type user_id: str
:param namespace: Namespace
:type namespace: str
:param alarm_name: Alarm name
:type alarm_name: str

:return:
:rtype: baidubce.bce_response.BceResponse
ry  s   /custom/alarm/configs/unblockr   r~  rz  s         r   unblock_custom_policyBcmClient.unblock_custom_policy  s7     $#

 0%%l&7&7%MMr   c                    / SQnUb  X;  a  [        S[        U5      -  5      eS[        R                  " U5      -  nUc  0 nUUUUUUUU	U
UUS.nU R	                  [
        R                  U[        R                  " U5      S9$ )a  
:param site_once_type: Type of site
:type site_once_type: str
:param user_id: User's identifier
:type user_id: str
:param address: Address
:type address: str
:param idc: IDC
:type idc: str
:param timeout: Timeout
:type timeout: int
:param protocol_type: Protocol type
:type protocol_type: str
:param once_config: Configuration for once
:type once_config: dict
:param task_type: Task type
:type task_type: str
:param ip_type: IP type
:type ip_type: str
:param advanced_flag: Advanced flag
:type advanced_flag: bool
:param advanced_config: Advanced configuration
:type advanced_config: dict
:param group_id: Group identifier
:type group_id: str

:return:
:rtype: baidubce.bce_response.BceResponse
)HTTPHTTPSPINGFTPTCPUDPDNSz(site_once_type must be none or one of %ss   /site/once/%s/taskCreate)r\   rZ  r^  r_  protocolType
onceConfigtaskTypeipTypeadvancedFlagadvancedConfiggroupIdr   )	rc   r   r   rH   r:   r	   rd   re   rf   )r   site_once_typerK   rZ  r^  r_  protocol_typeonce_config	task_typeip_typeadvanced_flagadvanced_configgroup_idtypesr,   r-   s                   r   create_site_once_taskBcmClient.create_site_once_task  s    @ F%.*EG#e*TUU+f.E.En.UU" O)%!)-
 %%l&7&7DJJtDT%UUr   c                     SnUUUUUUUS.n	U R                  [        R                  U[        R                  " U	5      S9$ )a  
:param user_id: User's identifier, defaults to None
:type user_id: str
:param url: URL
:type url: str
:param page_no: Page number
:type page_no: int
:param page_size: Page size
:type page_size: int
:param order: Order
:type order: str
:param order_by: Order by
:type order_by: str
:param group_id: Group identifier
:type group_id: str

:return:
:rtype: baidubce.bce_response.BceResponse
s   /site/once/taskList)r\   urlr   r   r   orderByr  r   rz  )
r   rK   r  r}   r~   r   order_byr  r,   r-   s
             r   list_site_once_records BcmClient.list_site_once_recordsB  sN    * &!
 %%l&7&7DJJtDT%UUr   c                 v    SnUUS.nU R                  [        R                  U[        R                  " U5      S9$ )
:param user_id: User's identifier
:type user_id: str
:param site_id: Site identifier
:type site_id: str

:return:
:rtype: baidubce.bce_response.BceResponse
s   /site/once/taskDeleter\   siteIdr   rz  r   rK   site_idr,   r-   s        r   delete_site_once_record!BcmClient.delete_site_once_recordc  s?     (
 %%l&7&7DJJtDT%UUr   c	           	          Sn	UUUUUUUUS.n
U R                  [        R                  U	[        R                  " U
5      S9$ )a  
:param user_id: User's identifier
:type user_id: str
:param site_id: Site identifier
:type site_id: str
:param page_no: Page number
:type page_no: int
:param page_size: Page size
:type page_size: int
:param order: Order
:type order: str
:param order_by: Order by
:type order_by: str
:param filter_area: Filter area
:type filter_area: str
:param filter_isp: Filter ISP
:type filter_isp: str

:return:
:rtype: baidubce.bce_response.BceResponse
s   /site/once/loadData)r\   r  r   r   r   r  
filterArea	filterIspr   rz  )r   rK   r  r}   r~   r   r  filter_area
filter_ispr,   r-   s              r   detail_site_once_result!BcmClient.detail_site_once_resultt  sQ    . &!%#	
 %%l&7&7DJJtDT%UUr   c                     SnUUUUUUUUU	U
S.
nU R                  [        R                  U[        R                  " U5      S9$ )a0  
:param user_id: User's identifier
:type user_id: str
:param site_id: Site identifier
:type site_id: str
:param site_ids: List of site identifiers
:type site_ids: list
:param group_id: Group identifier
:type group_id: str
:param page_no: Page number
:type page_no: int
:param page_size: Page size
:type page_size: int
:param order: Order
:type order: str
:param order_by: Order by
:type order_by: str
:param filter_area: Filter area
:type filter_area: str
:param filter_isp: Filter ISP
:type filter_isp: str

:return:
:rtype: baidubce.bce_response.BceResponse
s   /site/once/groupTask)
r\   r  siteIdsr  r   r   r   r  r  r  r   rz  )r   rK   r  site_idsr  r}   r~   r   r  r  r  r,   r-   s                r   detail_site_onceBcmClient.detail_site_once  sW    6 '!%#
 %%l&7&7DJJtDT%UUr   c                 v    SnUUS.nU R                  [        R                  U[        R                  " U5      S9$ )r  s   /site/once/createFromTaskr  r   rz  r  s        r   again_exec_site_onceBcmClient.again_exec_site_once  s?     ,
 %%l&7&7DJJtDT%UUr   c                 x    SnUUUS.nU R                  [        R                  U[        R                  " U5      S9$ )z
:param user_id: User's identifier
:type user_id: str
:param site_id: Site identifier
:type site_id: str
:param group_id: group identifier
:type group_id: str
:return:
:rtype: baidubce.bce_response.BceResponse
s   /site/once/groupTaskList)r\   r  r  r   rz  )r   rK   r  r  r,   r-   s         r   list_site_once_history BcmClient.list_site_once_history  sB     +

 %%l&7&7DJJtDT%UUr   c                     SS/nUb  X#;  a  [        S[        U5      -  5      eUUS.nSnU R                  [        R                  XTS9$ )z
:param user_id: User's identifier
:type user_id: str
:param ip_type: the type of ip, enum: ipv4, ipv6
:type ip_type: str

:return:
:rtype: baidubce.bce_response.BceResponse
ipv4ipv6z!ip_type must be none or one of %s)rv   s   ipTypes   /site/once/siteAgentr   )rc   r   r:   r	   rI   )r   rK   r  r  r/   r,   s         r   get_site_once_agentBcmClient.get_site_once_agent  s^      7#7@3u:MNN
 '%%l&6&6%LLr   )	rK   rL   r  r   rN   metric_namesrS  rO   r   c
                 p   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUc  [        S5      e[        U5      [        :  a  [        S[        -   5      eU	c  Sn	UUU	S.n
/ nU H  nUR                  U5        M     XS'   Ub  X:S	'   Ub  XJS
'   Ub   / nU H  nUR                  U5        M     XS'   Ub  XzS'   Ub  XS'   [        R
                  " U5      n[        R
                  " U5      nSX4-  nU R                  [        R                  US[        R                  " U
5      S9$ )z
:param user_id: str
:param scope: str
:param region: str
:param resource_type: str
:param dimensions: list
:param metric_names: list
:param timestamp: str
:param statistics: list
:param cycle: int

:return:
r   r  scope should not be nullmetric_names should not be null!dimensions size cannot more than r   )r\   rL   r   metricNamesr  rA  rN   rS  rO   s3   /userId/%s/services/%s/data/metricData/latest/batchr   r)   r-   rb   rc   MAX_INSTANCE_NUMBERr  r   rH   r:   r	   rd   re   rf   )r   rK   rL   r  r   rN   r  rS  rO   r   r-   metric_names_reqresdimensions_resr,   s                  r   "get_multi_dimension_latest_metrics,BcmClient.get_multi_dimension_latest_metrics  sb   " w<19::u:?788>??z?00@CVVWW=E

 C##C(  .]#N$#0 !N!%%c* "!/  )!!+))'2''.EHXX%%l&7&7vTXT^T^_cTd%eer   c                    [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U	5      [        :  a  [        S[        -   5      eUUUUUUS	.nUb  X}S
'   Ub  XS'   U	b   / nU	 H  nUR                  U5        M     XS'   U
b  XS'   Ub  XS'   Ub  XS'   [        R
                  " U5      n[        R
                  " U5      nSX4-  nU R                  [        R                  US[        R                  " U5      S9$ )a  
:param user_id: str
:param scope: str
:param statistics: list
:param metric_name: str
:param start_time: str
:param end_time: str
:param region: str
:param resource_type: str
:param dimensions: list
:param cycle: int
:param pageNo: int
:param pageSize: int

:return:
r   r  r  metric_name should not be nullstart_time should not be nullend_time should not be nullstatistics should not be nullr  )r\   rL   rL  rM  rO   r   r  rA  rN   r   r   r   s7   /userId/%s/services/%s/data/metricData/PartialDimensionr   r  r  )r   rK   rL   rO   rM   rP   rQ   r  r   rN   r   r   r   r-   r  r  r,   s                    r   !get_metrics_by_partial_dimensions+BcmClient.get_metrics_by_partial_dimensions1  s   & w<19::u:?788{q =>>z?a<==x=A:;;z?a<==z?00@CVVWW#$%
 #N$#0 !N!%%c* "!/!M#N'))'2''.IWL\\%%l&7&7vTXT^T^_cTd%eer   c           
         [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      eUc  [        S5      eUc  [        S5      eUc  [        S5      e[        U5      [        :  a  [        S[        -   5      eUUU
UUUUUUS	.	nU	b  XS
'   SnU R                  [        R
                  US[        R                  " U5      S9$ )a  
:param user_id: user_id
:type string

:param scope: scope
:type string

:param region: region
:type string

:param type: resource type
:type string

:param dimensions: dimensions
:type double string array

:param metric_names: metric names
:type  string array

:param statistics: statistics
:type  string array

:param cycle: cycle
:type  int

:param start_time: start time
:type  string

:param end_time: end time
:type  string
:return:
r   r  r  r  r  dimensions should not be nullr  r  	r\   rL   r   r  rL  rM  r  rN   rO   r*  s   /data/metricAllDatar   r  rb   rc   r  r:   r	   rd   re   rf   r   rK   rL   r  rN   r  rO   rP   rQ   r*  r   r-   r,   s                r   get_all_data_metrics_v2!BcmClient.get_all_data_metrics_v2n  s   F w<19::u:?788v;!899>??<==<==z?00@CVVWW#'$$

 L%%%l&7&7vTXT^T^_cTd%eer   c           
         [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      [        :  a  [        S[        -   5      eUUU
UUUUUUS	.	nU	b  XS
'   SnU R                  [        R
                  US[        R                  " U5      S9$ )a  
:param user_id: user_id
:type string

:param scope: scope
:type string

:param region: region
:type string

:param dimensions: dimensions
:type double dimensional dict array

:param metric_names: metric names
:type  string array

:param statistics: statistics
:type  string array

:param start_time: start time
:type  string

:param end_time: end time
:type  string

:param type: type
:type string

:param cycle: cycle
:type  int
:return:
r   r  r  r  r  r  r  r  r  r*  s   /data/metricAllData/batchr   r  r  r  s                r   batch_get_all_data_metrics_v2'BcmClient.batch_get_all_data_metrics_v2  s   F w<19::u:?788v;!899|!>??z?a<==z?a<==z?00@CVVWW#'$$

 L+%%l&7&7vTXT^T^_cTd%eer   c                 ^   [        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S5      e[        U5      S::  a  [        S	5      e[        U	5      S::  a  [        S
5      eUUUUU	UUUUU
US.nSnU R                  [        R                  US[
        R                  " U5      S9$ )a  
:param user_id: user_id
:type string

:param scope: scope
:type string

:param region: region
:type string

:param dimensions: dimensions
:type map

:param metric_name: metric_name
:type string

:param statistics: statistics
:type string

:param labels: labels
:type set

:param start_time: start_time
:type string

:param end_time: end_time
:type string

:param order: order default top
:type string

:param topNum: topNum default 10
:type int

:return:
r   r  r  r  r  r  zlables should not be nullr  r  r  )r\   rL   r  rL  rM  r   rN   rO   labelsr   topNums   /dimensions/topr   r  r   )r   rK   rL   r  rN   rM   rO   r  rP   rQ   r   r  r-   r,   s                 r   get_metric_dimension_top"BcmClient.get_metric_dimension_top  s;   N w<19::u:?788v;!899{q =>>z?a<==v;!899z?a<==z?a<==x=A:;; #%$$
 "%%l&7&7vTXT^T^_cTd%eer    r   )NNNNN)r   NNNNN)	NNNNNNNNN)NNN)NNNN)NN)NNNNNN)TNNNNr   r   )NNNNNNN)NNNNNNNN)rx   rz   NNNNNNNNNNNN)rx   rz   NNNNNNNNNN)
NNNNNNNNNN)NNNNNNNNNNN)NNNNNNNNNNNNN)NNNNNNNNNNNNNN)NNNNNNNNNNNN)NNNNNNNNNNNNNNNNN)NNNNNNNNNNNNNNNNNN)INSTANCENNNORMALr   r   r    r  r  N)bjr  Nr  descN)r  r  r  r  N)
Nr   r   r   r  r  NNInstanceN)r  TNNNNNNNNNr  r   r   )NET_QUAILTYr  FNN)NNrx   rz   NNN)rx   rz   NNNN)	NNNrx   rz   NNNN)r  r  r  )r  )r  r   )toprz   )__name__
__module____qualname____firstlineno____doc__r(   r9   r=   r)   rL  r4   r5   r6   r   r!   r1   r:   r>   rS   rV   ri   rn   rs   r   r   r   r   r   r   r   r   r   r   r   r   intr   r   listr   r   r   r   r   r   r  r  r  r  r   r>  rA  rH  rR  rU  rY  r]  r`  ri  rl  ro  rs  r|  r  r  r  r  r  r  r  r  r  r  
value_typer  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r"  r%  r*  r0  r3  r9  r@  rD  rI  rO  rT  rc  rk  rp  rt  rw  rz  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r   r#  r&  r)  r/  r4  rT  rW  r\  r_  rb  ri  ro  rr  rv  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  __static_attributes__r  r   r   r   r   #   s
    FJ LGJ- A/= 7;/3	] <BY]W" \`c  EIEIEIGXR KOKOKOHXT(eTe@(dT.\b cgHeT$eN cgFdR jn<\|$\N LP:ex#eL LP:ez ae>\@&\P cS)c *c, cS)c *c, cSdKV LVBP cS)V *V4 cSdKX\'+$U L$ULO, 59M@ sw-v^v0M$X( cS)lpX\"M *"MH D osst=>	CV CVJ D osst=>	CU CUJ!eFM4 DHJN+dZP4`8e8MBPB"eH VZUY-d^e0e0e0e0e2 :>8\td>X6 cDf& mq@D$dL j!dd8\.f. j:*SVs
PZ##dDR ptSWDdRDdLM,O0 j:JS]dgs
PZ##dDR osRVGcRGcRf0d:\0c:f2 cSSSSVWgkcg^b5O X5On cSSSSVWjnfj;?/O X/Ob 3Ss]ab"X c"XH c#C3SQV RV4 cSscX[\W ]W4 c%A &A c%> &> c3#6M 7M: ct<V =V$ ct<V =V$ c3#c]`S*M*M@ cs3RUdgqtS*"M*"MH ccs[^jmSCI(MI(MTa( QULPAED^L QU7;7;eB RV?Cei)eV `d?Cei,d\\( SW@Dfj)eV ae@Dfj,d\\( RV_c:>&eP `d_c:>)dV\( QUbfpt,e\ _cbfpt7dr\( QUbfpt,e\ _cbfpt7dr\( QUcgJN.e` _ccgJN1df\( QUBF^b+eZ _cBF^b.d`\($\L_(M$ ]alpcgei=e~g( nrlpcgei@dD\( QU]a(\T]*]* ]aCG59-^^^*^0v\* jrikFJmOb jrikFJ	tOl VD VD VD"\J np?CB\H-^` KLKLX\]a	tDn ^_KLX\]a	zDx=B=Bs@ DcCX[\XZlpjnfg45	DV ]DVL %V &V* DcCX[\XZlpjnfg45	KU ]KUZM:M(N(N* V[=A3Vj SUCGVBV" gk=A"VH jlQU(VTV"V&M( cSPT34sLmqei2fL2fl cg@D;f| NP@fF TV@fH LNIfr   r   )r  r   re   sysr7   baidubcer   r   r   baidubce.authr   baidubce.httpr   r   r	   baidubce.services.bcmr
   r   baidubce.utilsr   version_infor   unicoder  bytesr  r   r   r  r   r   <module>r     sp      
  3 3 ' @ @ 8 #A!wJuJ Y\f-- Y\fr   